PageSourceSearch

https://storyweaver.org.in/assets/index.BB1osOfA.js

js storyweaver.org.in collected 2026-10-01 10:11:53 UTC 51,567 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.Dho8pJLQ.js","assets/react-vendor.B75MsAI9.js","assets/AuthModalContainer.D3JsQqnf.js","assets/AuthModalContainer-BhQ3rY72.css","assets/LazyFontLoader.5DGfhuFK.js","assets/en-US.BYLOiXxf.js","assets/endOfMonth.CYWL2Q7x.js","assets/index-CoO0T_UM.css","assets/PTRTooltip.CziHDFkS.js","assets/HeroBookGroup.BYxXR1UA.js","assets/HeroBookGroup-Da2qfauK.css","assets/PTRTooltip-BLDjbLhO.css","assets/index.CZkUVtJR.js","assets/SiteNavLink.CgvBTSZT.js","assets/SiteNavLink-DnJGfQCh.css","assets/index-BLADOrBL.css","assets/index.CYf-x9VU.js","assets/index-CzDW3Tb8.css","assets/index.BBIJzrcx.js","assets/RTLProvider.Bmr48mpV.js","assets/Stuffer.D9jR5Zya.js","assets/Stuffer-D3rST8fq.css","assets/index.W3QIN98f.js","assets/index-BehCaPI4.css"])))=>i.map(i=>d[i]);
2import{u as e,t as a,s as l,aS as r,p as n,O as t,z as i,hT as o,L as s,aq as d,cB as c,aQ as h,S as g,cr as u,cI as m,cO as v,a6 as p,aP as f,x as b,iL as _,dH as j,iM as x,cV as w,iN as k,hU as L,a3 as y,az as $,Q as S,iO as C,fu as R,g as W,iP as N,w as T,a as E,dr as A,aB as P,c9 as B,a4 as H}from"./AuthModalContainer.D3JsQqnf.js";import{r as O,j as M,R as F}from"./react-vendor.B75MsAI9.js";import{S as D}from"./SiteNavLink.CgvBTSZT.js";import{A as V}from"./AutoSuggestionsEl.IEWpptRY.js";import"./index.W3QIN98f.js";const I=O.lazy(()=>P(()=>import("./index.Dho8pJLQ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),q=O.lazy(()=>P(()=>import("./PTRTooltip.CziHDFkS.js"),__vite__mapDeps([8,1,2,3,9,10,11]))),G=O.lazy(()=>P(()=>import("./index.CZkUVtJR.js"),__vite__mapDeps([12,1,2,3,13,14,15]))),z=O.lazy(()=>P(()=>import("./index.CYf-x9VU.js"),__vite__mapDeps([16,1,2,3,13,14,17]))),Q=O.lazy(()=>P(()=>import("./index.BBIJzrcx.js"),__vite__mapDeps([18,1,2,3,19,20,21,22,23]))),U=({content:e,backLinkContent:a,baseClassName:l,goBackTo:r,updateActiveMenuSelected:n,menuSelected:t,rightIcon:i,leftIcon:o,isRtl:s,t:d,onTriggerEvents:c,eventLabel:h,eventAction:g,parentClassName:u})=>{const v={[`${l}
2__nav-secondary-header`]:!0,[`${l}__nav-secondary-header--light`]:t!==m.main};return M.jsxs("div",{className:u,children:[a&&M.jsxs(D,{variant:"bordered",isRtl:s,parentClassName:S(v),respondFontSize:!0,truncateLongText:!0,fullWidth:!0,noLeftPadding:s,onClick:()=>{r&&(n(r),c&&c({gaEvent:`clicked_${g}`,gaCategory:T.navigation,gaLabel:`${W.mobileApp}_${h}`}))},children:[o,a,i]}),t!==m.main&&t!==m.user&&t!==m.bottomResources&&t!==m.gcr&&t!==m.mobSiteLang&&t!==m.bottomGcr&&M.jsx("div",{className:s&&t!==m.siteLang?`${l}__sub-header ${l}__sub-header--rtl`:`${l}__sub-header`,children:d(`global.${t}`,1)}),e]})},Y=({viewport:P={},isLoggedIn:H=!1,user:Y={},logout:J=()=>Promise.resolve(),isFetchingMe:K=!1,offline:X=!1,openAuthModal:Z=()=>{},addSlimNotification:ee=()=>{},isRtl:ae=!1,activeDropdown:le="",menuSelected:re="",bottomMenuSelected:ne="",isBottomMenuSelected:te=!1,updateActiveDropdownLink:ie=()=>{},updateActiveMenuSelected:oe=()=>{},changeLanguage:se=()=>{},filters:de=[],fetchAutoSuggestionsWorkflow:ce=()=>Promise.resolve(),updateWordSearchFrequencyWorkFlow:he=()=>Promise.resolve(),addNewSearchWordWorkFlow:ge=()=>Promise.resolve({ok:!0}),autoSuggestions:ue=[],searchQuery:me="",isFetchingAutoSuggestions:ve=!1,platformNotifications:pe=[],fetchAllListsFiltersWorkflow:fe=()=>Promise.resolve(),fetchTrendingThemesWorkflow:be=()=>Promise.resolve(),trendingThemes:_e=[],isTrendingTheme:je=!1,raFilters:xe={},fetchAllReadalongFiltersWorkflow:we=()=>Promise.resolve(),localePreferences:ke="",staticSubGcrData:Le={},isTrendingLanguagesList:ye=!1,fetchTrendingLanguagesListWorkflow:$e=()=>Promise.resolve(),trendingLanguagesList:Se=[],isFetchingTrendingThemes:Ce=!1,isFetchingTrendingLanguagesList:Re=!1,isUpdatingRPBooks:We=!1})=>{var Ne,Te;const Ee=e(),Ae=a(),Pe=l(),Be=r(),He=n(e=>{var a;return null==(a=e.stem)?void 0:a.isOdosWeek}),Oe=He?t.oneDayOneStory(ke||i):t.pledgeToRead(ke||i),[Me,Fe]=O.useState(!1),De=O.useRef(!1),Ve=e=>{Ae(oe(e))},Ie=e=>{Ae(ne(e))},[qe,Ge]=O.useState(localStorage.getItem("locale")||"en"),[ze,Qe]=O.useState(""),[Ue,Ye]=O.useState(!1),[Je,Ke]=O.useState(!1),Xe=O.useRef(null),Ze="pb-site-header",ea=[Ze];ae&&ea.push(`${Ze}--rtl`);const aa=o.sort((e,a)=>e.queryValue>a.queryValue?1:-1),la=[...L,...aa];re&&!P.medium&&(te?ea.push(`${Ze}--bottom-menu-open`):ea.push(`${Ze}--menu-open`)),O.useEffect(()=>{const e=e=>{Xe.current&&!Xe.current.contains(e.target)&&re&&Ve("")};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[re,oe]),O.useEffect(()=>{const e=e=>{if("sw-log-in-out-activity"===e.key)/\/v0\//g.test(window.location.href)?window.location.href=t.home():window.location.reload();else if("locale"===e.key){const e=localStorage.getItem("locale")||"en",a=window.location.pathname+window.location.search+window.location.hash,l=new RegExp(`^/(?:${B})$`),r=new RegExp(`^/(?:${B})/`);l.test(a)?window.location.assign(a.replace(l,`/${e}`)):r.test(a)?window.location.assign(a.replace(r,`/${e}/`)):window.location.assign(`/${e}${a}`)}};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}},[]),O.useEffect(()=>{(()=>{const e=document.getElementsByClassName("pb-site-header__primary-container")[0];e&&e.clientHeight>N.height&&Ye(!0)})()},[P,re,H,Y]),O.useEffect(()=>{const e=()=>{const e=document.getElementsByClassName("pb-site-header__primary-container")[0],a=document.getElementsByClassName("pb-site-header__nav-secondary")[0];if(P.large&&a){const l=a.offsetTop;window.pageYOffset>l?(e&&e.classList.remove("pb-site-header__primary-container--sticky"),a.classList.add("pb-site-header__nav-secondary--sticky")):a.classList.remove("pb-site-header__nav-secondary--sticky")}if(!P.large&&e){const l=e.offsetTop;window.pageYOffset>l?(a&&a.classList.remove("pb-site-header__nav-secondary--sticky"),e.classList.add("pb-site-header__primary-container--sticky")):e.classList.remove("pb-site-header__primary-container--sticky")}};return window.addEventListener("scroll",e,{passive:!0}),()=>{window.removeEventListener("scroll",e)}},[P]);const ra=(e,a)=>{const l=he(a);(l&&"function"==typeof l.then?l:Promise.resolve()).then(()=>{ia({gaEvent:E.clickedSearch,gaCategory:T.navigation,gaLabel:E.search,itemType:W.searchTerm,itemValue:e}),window.location.href=t.searchBy(e)}).catch(a=>{ia({gaEvent:E.clickedSearch,gaCategory:T.navigation,gaLabel:E.search,itemType:W.searchTerm,itemValue:e}),window.location.href=t.searchBy(e)})},na=(e="")=>{const a=t.advancedSearch(e),l="undefined"!=typeof window&&!0===window.__STORYWEAVER_BOOKENDS_MODE__,r=Be.pathname.includes("/offline");ia({gaEvent:E.clickedSearch,gaCategory:T.navigation,gaLabel:E.search,itemType:W.searchTerm,itemValue:e||null}),re&&Ve(""),l||r?window.location.href=a:(Pe(a.replace(`/${i}`,""),{replace:!0}),Qe(""))},ta=()=>{localStorage.setItem("sw-log-in-out-activity","logout"+Math.random()),localStorage.removeItem("userName"),localStorage.removeItem("userId"),localStorage.removeItem("profileType"),("function"==typeof J?J():Promise.resolve()).then(()=>{window.location.href=Y.redirectOnLogOut||t.home()}).catch(e=>{window.location.href=Y.redirectOnLogOut||t.home()})},ia=e=>{const{gaEvent:a,gaCategory:l,gaLabel:r,itemType:n,itemValue:t}=e;"undefined"!=typeof window&&window.dataLayer&&window.dataLayer.push({category:l,event:a,label:r,item_type:n||null,item_value:t||null,item_id:null,user_profile:(null==Y?void 0:Y.profile_type)||null,user_id:(null==Y?void 0:Y.id)||null})},oa=e=>{const a=A.filter(a=>a.queryValue===e)[0];return a?a.name:e},sa=e=>{var a;return(null==(a=e.props)?void 0:a.href)&&window.location.pathname.includes(e.props.href.split("?")[0])?F.cloneElement(e,{active:!0}):e},da=[M.jsx(s,{fullWidth:!0,href:t.userOpdsDashboard(),children:Ee("global.op
2ds-dashboard")},"opds-dashboard"),M.jsx(s,{fullWidth:!0,href:t.userOrgDetails(Y.orgId),children:Ee("global.organisation-settings")},"organisation-settings"),M.jsx(s,{fullWidth:!0,href:t.dashboard(),children:Ee("global.content-manager-dashboard")},"content-manager-dashboard"),M.jsx(s,{fullWidth:!0,href:t.contests(),children:Ee("global.contest-dashboard")},"contest-dashboard"),M.jsx(s,{fullWidth:!0,href:t.blogDashboard(),children:Ee("global.blog-dashboard")},"blog-dashboard"),M.jsx(s,{fullWidth:!0,href:t.ratingDashboard(),children:Ee("global.rating-dashboard")},"rating-dashboard"),M.jsx(s,{fullWidth:!0,href:t.translationDashboard(),children:Ee("global.translation-dashboard")},"translation-dashboard"),M.jsx(s,{fullWidth:!0,onClick:()=>{P.medium?window.location.href=t.jotformDashboard():ee({id:"Book.mobile-editor-notification",content:"Jotform dashboard is accessible only on desktop/Laptop"})},children:Ee("global.jotform-dashboard")},"jotform-dashboard"),M.jsx(s,{fullWidth:!0,href:t.rateStory(),children:Ee("global.rate-a-story")},"rate-a-story"),M.jsx(s,{fullWidth:!0,href:t.rateIllustration(),children:Ee("global.rate-a-illustration")},"rate-a-illustration"),M.jsx(s,{fullWidth:!0,href:t.unreviewedStories(),children:Ee("global.review-a-story")},"review-a-story"),M.jsx(s,{fullWidth:!0,href:t.untranslatedStories(),children:Ee("global.translate-a-story")},"translate-a-story"),M.jsx(s,{noSiteLocale:!0,fullWidth:!0,href:t.analytics(),shouldOpenNewPage:!0,children:Ee("global.analytics")},"analytics"),M.jsx(s,{fullWidth:!0,href:t.translationAnalytics(),children:Ee("global.analytics")},"translation-analytics"),M.jsx(s,{fullWidth:!0,href:t.publisherDashboard(),children:Ee("global.publisher-dashboard")},"publisher-dashboard"),M.jsx(s,{fullWidth:!0,href:t.publisherAnalytics(),children:Ee("global.analytics")},"publisher-analytics")],ca={content_manager:["content-manager-dashboard","contest-dashboard","blog-dashboard","rating-dashboard","translation-dashboard","analytics","rate-a-story","rate-a-illustration"],promotion_manager:["contest-dashboard","blog-dashboard"],partnerships_manager:["analytics"],reviewer:["rate-a-story"],translator:["translate-a-story"],studio_team:["jotform-dashboard"],editor:["review-a-story"],translation_partner_admin:["translation-dashboard","translation-analytics"],publisher:["publisher-dashboard","publisher-analytics"],org_admin:["organisation-settings"],illustration_reviewer:["rate-a-illustration"],user:[]};!Y.roles||Y.roles.includes("publisher")||Y.roles.includes("translation_partner_admin")||(ca.org_admin=ca.org_admin.concat("opds-dashboard"));const ha=da.filter(e=>!!Y.roles&&Y.roles.reduce((e,a)=>e.concat(ca[a]||[]),[]).includes(e.key));let ga,ua,ma;const va=()=>{"undefined"!=typeof window&&window.dataLayer&&window.dataLayer.push({event:E.bookshelfClicked,category:T.bookShelf,label:T.homePage,item_type:null,item_id:null,item_value:null,user_id:null==Y?void 0:Y.id,user_profile:null==Y?void 0:Y.profile_type})};if(H&&P.large&&(ha.length>0&&(ha.unshift(M.jsx("div",{className:`${Ze}__drop-down-spacer`},"spacer")),ha.push(M.jsx("div",{className:`${Ze}__drop-down-spacer`},"spacer2"))),ua=[M.jsx(s,{fullWidth:!0,href:t.userProfileBookShelf(Y.id),onClick:va,children:Ee("global.bookshelf")},"bookshelf"),M.jsx(s,{fullWidth:!0,href:t.profileDashboard(),children:Ee("global.dashboard")},"dashboard"),M.jsx(s,{fullWidth:!0,href:t.editProfile(),children:Ee("Profile.edit-profile")},"userProfile"),...ha,M.jsx(s,{onClick:ta,fullWidth:!0,children:Ee("global.sign-out")},"sign-out")]),H&&!P.large){const e=[...ha];e.length>0&&(e.unshift(M.jsx("div",{className:`${Ze}__sub-section-header`,children:Ee("global.my-organization")},"sub-section-header")),e.unshift(M.jsx(d,{},"divider"))),ma=[M.jsx("div",{className:`${Ze}__sub-section-header`,children:Ee("global.my-account")},"sub-section-header"),M.jsx(s,{fullWidth:!0,href:t.userProfileBookShelf(Y.id),onClick:va,children:Ee("global.bookshelf")},"bookshelf"),M.jsx(s,{fullWidth:!0,href:t.profileDashboard(),children:Ee("global.dashboard")},"dashboard"),M.jsx(s,{fullWidth:!0,href:t.editProfile(),children:Ee("Profile.edit-profile")},"userProfile"),...e,M.jsx(d,{},"divider"),M.jsx(s,{onClick:ta,fullWidth:!0,children:Ee("global.sign-out")},"sign-out")]}if(ga=H?P.large?M.jsx(c,{toggleEl:M.jsx(D,{parentClassName:ae?`${Ze}__dropdown-link`:null,noLeftPadding:ae,respondFontSize:!0,truncateTitle:Ue,title:Y.first_name,caret:"down",borderLeft:!0,smallFont:!0,children:Y.first_name}),parentClassName:`${Ze}__dropdown ${Ze}__first-name`,toggleClassName:`${Ze}__dropdown-toggle`,isRtl:ae,children:M.jsx(h,{nowrap:!0,alignRight:ae,children:ua})}):M.jsxs("div",{children:[M.jsx(g,{name:"user",variant:"circular-white",pushRight:!ae,pushLeft:ae,title:Ee("SvgTitle.user")}),Ee("global.welcome"),", ",Y.first_name,"!"]}):P.large?M.jsx(D,{parentClassName:`${Ze}__link-placeholder`,truncateTitle:Ue,title:Ee("global.sign-up-log-in"),respondFontSize:!0,onClick:Z,borderLeft:P.medium,smallFont:!0,children:K?M.jsx(u,{}):M.jsxs(O.Fragment,{children:[M.jsx(g,{name:"user",variant:P.medium?"circular":"circular-white",pushRight:!0,title:Ee("SvgTitle.user")}),Ee("global.sign-up-log-in")]})},"sign-up-log-in"):M.jsxs("div",{onClick:Z,className:`${Ze}__signup`,children:[M.jsx(g,{name:"user",variant:"circular-white",pushRight:!ae,pushLeft:ae,title:Ee("SvgTitle.user")}),Ee("global.sign-up-log-in")]}),X){const e=localStorage.getItem("userName");ga=e?M.jsx(D,{truncateTitle:Ue,disabled:!0,respondFontSize:!0,borderLeft:!0,children:e}):null}const pa=("undefined"!=typeof window?window.location.host:"").split(".")[0],fa=M.jsx("span",{className:`${Ze}__new-entry-point`,children:Ee("global.new")}),ba=M.jsx(D,{isInternal:!1,href:t.offlineBooks(),respondWidth:!X,title:Ee("global.offline-library",2),variant:P.large?"default":"bordered",disabled:!("serviceWorker"
2in navigator),isIcon:!0,smallFont:!0,truncateTitle:Ue,smallLineHeight:!P.large,children:M.jsxs("span",{id:"offline-library",children:[M.jsx(g,{variant:window.location.pathname.includes("/offline")?"accent":null,pushRight:!0,name:"offline",title:Ee("SvgTitle.header-offline"),size:"m"}),P.large?Ee("global.offline-library"):null]})}),_a=M.jsx(D,{caret:re===m.mobSiteLang?"up":"down",parentClassName:`${Ze}__site-lang--mob`,onClick:()=>{re&&re===m.mobSiteLang?(Ve(""),Ie("")):(Ve(m.mobSiteLang),Ie(""))},smallLineHeight:!P.large,noLeftPadding:!0,children:oa(qe)}),ja=()=>{de&&0!==de.length||Ae(fe())},xa=()=>{Ve(""),Ie("")},wa=()=>{if(H)if(Y.emailConfirmed)if(P.medium){const e=document.getElementsByTagName("body")[0];e&&(e.style.opacity=.5,e.style.pointerEvents="none"),Ke(!0),window.location.href=t.create()}else ee({id:"Book.mobile-editor-notification",content:Ee("Book.mobile-editor-notification-text")});else ee({id:"OTP.confirm-email-action",content:Ee("OTP.confirm-email-action",{action:Ee("global.create-storybooks")})});else Z()},ka=(e,a)=>{e.length<=0||!H?(La(W.storyweaverGcr),window.location.href=Oe):a&&1===e.length?(La(e[0].id),window.location.href=e[0].url):Ve(m.gcr)},La=e=>{ia({gaEvent:E.clickedGcr,gaCategory:T.navigation,gaLabel:`${e}-gcr`})},{languagePreferences:ya=[],readingLevels:$a=[]}=Y,Sa=[M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[5]),children:Ee("global.emergent-readers")},"level 1 emergent stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[1]),children:Ee("global.level-books",{level_no:1})},"level 1 stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[2]),children:Ee("global.level-books",{level_no:2})},"level 2 stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[3]),children:Ee("global.level-books",{level_no:3})},"level 3 stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[4]),children:Ee("global.level-books",{level_no:4})},"level 4 stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,$a),children:Ee("global.all-book")},"all-stories")],Ca=[M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.bookFormats("readalongs"),children:Ee("global.readalongs")},"audio-stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.videos(),children:Ee("global.videos")},"video"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,$a,void 0,["gif"]),children:Ee("global.gif")},"gif")],Ra=[M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[5]),children:Ee("global.emergent-readers")},"level 1 emergent stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[1]),children:Ee("global.level-books",{level_no:1})},"level 1 stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[2]),children:Ee("global.level-books",{level_no:2})},"level 2 stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[3]),children:Ee("global.level-books",{level_no:3})},"level 3 stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,[4]),children:Ee("global.level-books",{level_no:4})},"level 4 stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.bookFormats("readalongs"),children:Ee("global.readalongs")},"audio-stories"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.videos(),children:Ee("global.videos")},"video"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,$a,void 0,["gif"]),children:Ee("global.gif")},"gif"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,$a),children:Ee("global.all-book")},"all-stories")],Wa=[..._e||[]].map(e=>M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,ya,$a,[e.queryValue]),title:e.name,children:e.name},e.name)),Na=[...Se||[]].map(e=>M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allBooks(void 0,[e.queryValue||e.name],$a),title:e.name,children:e.name},e.name)),Ta=M.jsx(c,{toggleEl:M.jsx(D,{variant:"bordered",caret:"down",noLeftPadding:!0,onHover:()=>{(()=>{if(De.current)return;De.current=!0;const e=_e&&_e.length>0,a=Se&&Se.length>0;!je||Ce||e||be(),!ye||Re||a||$e()})()},children:Ee("global.read",1)},"stories"),align:ae?"right":"left",noPadding:!0,disabled:!1,isRtl:ae,minWidth:"xxxl",noMargin:!0,bordered:!0,variant:"hover",updateActiveDropdownLink:ie,activeDropdown:le,children:M.jsxs(v,{noGutter:!0,bordered:!0,isRtl:ae,children:[M.jsxs("div",{className:`${Ze}__column ${Ze}__column--cta`,children:[M.jsxs("div",{children:[M.jsxs("div",{className:`${Ze}__column-heading`,children:[Ee("global.trending-themes")," ",M.jsx(g,{name:"trending",size:"sm",title:Ee("SvgTitle.trending")})]}),M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__column-list ${Ze}__trending-theme`,alignRight:ae,children:Wa})]}),M.jsx("div",{className:ae?`${Ze}__column-cta--rtl`:`${Ze}__column-cta`,onClick:()=>{ia({gaEvent:"clicked_menu",gaCategory:T.navigation,gaLabel:"view_all_trending_themes"}),window.location.href=t.allBooks(void 0,ya,$a),localStorage.setItem("sw-trending-theme-clicked","true")},children:Ee("global.view-all")})]}),M.jsxs("div",{className:`${Ze}__column ${Ze}__column--cta`,children:[M.jsxs("div",{children:[M.jsxs("div",{className:`${Ze}__column-heading`,children:[Ee("global.trending-languages")," ",M.jsx(g,{name:"trending",size:"sm",title:Ee("SvgTitle.trending")})]}),M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__column-list ${Ze}__trending-language`,alignRight:ae,children:Na})]}),M.jsx("div",{className:ae?`${Ze}__column-cta--rtl`:`${Ze}__column-cta`,onClick:()=>{ia({gaEvent:"clicked_menu",gaCategory:T.navigation,gaLabel:"view_all_trending_languages"}),window.location.href=t.allBooks(void 0,ya,$a),localStorage.setItem("sw-trending-language-clicked","true")},children:Ee("global.view-all")})]}),M.jsxs("div",{className:`${Ze}__column ${Ze}__column--light`,children:[M.jsxs("div",{children:[M.jsx("div",{className:`${Ze}__column-heading`,children:Ee("global.explore-books")}),M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__column-list`,alignRight:ae,children:Sa})]}),M.jsxs("div",{className:`${Ze}__column-section`,children:[M.jsx("div",{className:`${Ze}__column-heading`,children:Ee("global.explore-formats")}),M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__column-list`,alignRight:ae,children:Ca})]})]})]})}),Ea=[M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,alignLeft:!0,newEl:Je&&M.jsx(u,{}),onClick:wa,parentClassName:Je?ae?`${Ze}__loader-space--rtl`:`${Ze}__loader-space`:null,children:Ee("global.create",1)},"create story"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,alignLeft:!0,href:t.allIllustrations(),children:Ee("global.image",2)},"image")],Aa=M.jsx(c,{toggleEl:M.jsx(D,{variant:"bordered",caret:"down",noLeftPadding:!0,children:Ee("global.create",1)},"create"),align:ae?"right":"left",disabled:!1,isRtl:ae,noMargin:!0,bordered:!0,variant:!Je&&"hover",updateActiveDropdownLink:ie,activeDropdown:le,children:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__create`,alignRight:ae,children:Ea})}),Pa=[M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.parentHome(),active:window.location.href.includes(t.parentHome()),children:Ee("global.for-parents")},"parent"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.educatorHome(),active:window.location.href.includes(t.educatorHome()),children:Ee("global.for-educators")},"educator"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.studentHome(),active:window.location.href.includes(t.studentHome()),children:Ee("global.for-students")},"student")],Ba=M.jsx(c,{toggleEl:M.jsx(D,{variant:"bordered",caret:"down",noLeftPadding:!0,children:Ee("global.discover")},"discover"),align:ae?"right":"left",disabled:!1,isRtl:ae,noMargin:!0,bordered:!0,variant:"hover",updateActiveDropdownLink:ie,activeDropdown:le,children:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__create`,alignRight:ae,children:Pa})}),Ha=Array.isArray(de)?null==(Te=null==(Ne=de.filter(e=>"Language"===e.name))?void 0:Ne[0])?void 0:Te.queryValues:void 0,Oa=[M.jsxs(D,{active:re===m.stem,variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,onHover:()=>P.large&&Ve(m.stem),onClick:()=>{Ve(m.stem)},children:[M.jsxs("div",{className:`${Ze}__align`,children:[Ee("global.stem"),M.jsxs("div",{className:`${Ze}__sub-text`,children:[Ee("global.stem-grades")," | ",Ee("global.stem-subjects")]})]}),M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee("SvgTitle.chevron-right")})]},"stem"),M.jsx(d,{variant:"padding"},"stem-divider-1"),M.jsxs(D,{active:re===m.flpHome,variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,onHover:()=>
2P.large&&Ve(m.flpHome),onClick:()=>Ve(m.flpHome),children:[M.jsxs("div",{className:`${Ze}__align`,children:[Ee("global.flp-home"),M.jsx("div",{className:`${Ze}__sub-text`,children:Ee("global.levels")})]}),M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee("SvgTitle.chevron-right")})]},"flp-home"),M.jsx(d,{variant:"padding"},"divider-2"),M.jsxs(D,{active:re===m.ece,variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,onHover:()=>P.large&&Ve(m.ece),onClick:()=>Ve(m.ece),children:[M.jsxs("div",{className:`${Ze}__align`,children:[Ee("global.ece"),M.jsx("div",{className:`${Ze}__sub-text`,children:Ee("global.levels")})]}),M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee("SvgTitle.chevron-right")})]},"ece"),M.jsx(d,{variant:"padding"},"divider-3"),M.jsxs(D,{active:re===m.readingProgram,variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,onHover:()=>P.large&&Ve(m.readingProgram),onClick:()=>Ve(m.readingProgram),children:[M.jsxs("div",{className:`${Ze}__align`,children:[Ee("global.reading-program",1),M.jsx("div",{className:`${Ze}__sub-text`,children:Ee("global.grades")})]}),M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee("SvgTitle.chevron-right")})]},"reading program"),M.jsx(d,{variant:"padding"},"divider-4"),M.jsxs(D,{active:re===m.bookLists,variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,onClick:()=>{Ve(m.bookLists),ja()},onHover:()=>{P.large&&(Ve(m.bookLists),ja())},children:[M.jsxs("div",{className:`${Ze}__align`,children:[Ee("global.book-lists"),M.jsx("div",{className:`${Ze}__sub-text`,children:Ee("global.grades")})]}),M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee("SvgTitle.chevron-right")})]},"lists"),M.jsx(d,{variant:"padding"},"divider-5"),M.jsxs(D,{active:re===m.bookFormats,variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,onHover:()=>P.large&&Ve(m.bookFormats),onClick:()=>Ve(m.bookFormats),children:[M.jsxs("div",{className:`${Ze}__align`,children:[Ee("global.book-formats"),M.jsxs("div",{className:`${Ze}__sub-text`,children:[Ee("global.stem-grades")," ",fa]})]}),M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee("SvgTitle.chevron-right")})]},"book-formats")],Ma=Object.entries(p.siteHeaderLinks).filter(([e,a])=>"English"===a.label).concat(f(Object.entries(p.siteHeaderLinks).filter(([e,a])=>"English"!==a.label),([e,a])=>a.label)).map(([e,a])=>M.jsx(D,{parentClassName:`${Ze}__drop-down-link`,variant:"bordered",active:window.location.search.split("=")[1]===a.value&&window.location.href.includes("reading-programme"),respondWidth:!0,href:`/reading-programme?language=${a.value}`,children:a.label},a.value)),Fa=Ha&&Ha.filter(e=>"English"===e.queryValue).concat(f(Ha.filter(e=>"English"!==e.queryValue),e=>e.queryValue)).map(e=>M.jsx(D,{parentClassName:`${Ze}__drop-down-link`,variant:"bordered",respondWidth:!0,active:b.parse(window.location.search).language===e.queryValue,href:t.allLists({language:e.queryValue}),children:e.queryValue},e.name)),Da=Object.entries(_.siteHeaderLinks).map(([e,a])=>M.jsx(D,{parentClassName:`${Ze}__drop-down-link`,variant:"bordered",respondWidth:!0,active:b.parse(window.location.search).language===a.value&&"foundational-literacy"===Be.pathname.replace(`/${i}`,"").replace(/\/([^/]*).*$/,"$1"),href:t.csf(a.value),children:a.label},`csf-${e}`)),Va=Object.entries(j.siteHeaderLinks).filter(([e,a])=>"English"===a.label).concat(f(Object.entries(j.siteHeaderLinks).filter(([e,a])=>"English"!==a.label),([e,a])=>a.label)).map(([e,a])=>M.jsx(D,{parentClassName:`${Ze}__drop-down-link`,variant:"bordered",respondWidth:!0,active:b.parse(window.location.search).language===a.value&&"foundational-literacy-programme"===Be.pathname.replace(`/${i}
2`,"").replace(/\/([^/]*).*$/,"$1"),href:t.flpHome(a.value),children:a.label},`flp-${e}`)),Ia=[M.jsx(D,{parentClassName:`${Ze}__drop-down-link`,variant:"bordered",respondWidth:!0,active:b.parse(window.location.search).language===x.siteHeaderLinks.hindi.value&&window.location.href.includes("early-learning-resources"),href:t.ece(x.siteHeaderLinks.hindi.value),children:x.siteHeaderLinks.hindi.label},"ece-hi")],qa=Object.entries(w.siteHeaderLinks).filter(([e,a])=>!1===a.disable).map(([e,a])=>M.jsx(D,{parentClassName:`${Ze}__drop-down-link`,variant:"bordered",respondWidth:!0,active:b.parse(window.location.search).language===a.value&&"stem-literacy-programme"===Be.pathname.replace(`/${i}`,"").replace(/\/([^/]*).*$/,"$1"),href:t.stemHome(a.value),children:a.label},`stem-${e}`)),Ga=Object.entries(k.siteHeaderLinks).map(([e,a])=>M.jsx(D,{parentClassName:`${Ze}__drop-down-link`,variant:"bordered",respondWidth:!0,active:Be.pathname.replace(`/${i}`,"").replace(/\/([^/]*).*$/,"$1")===a.value.toLowerCase(),href:t.bookFormats(a.value.toLowerCase()),onClick:()=>ia({gaEvent:`${a.value.toLowerCase()}_clicked`,gaCategory:T.navigation,gaLabel:"resource"}),children:a.label},`book-formats-${e}`)),za=Object.entries(p.siteHeaderLinks).filter(([e,a])=>"English"===a.label).concat(f(Object.entries(p.siteHeaderLinks).filter(([e,a])=>"English"!==a.label),([e,a])=>a.label)).map(([e,a])=>M.jsx(D,{variant:"bordered",fullWidth:!0,alignLeft:!0,active:window.location.search.split("=")[1]===a.value&&window.location.href.includes("reading-programme"),respondWidth:!0,href:`/reading-programme?language=${a.value}`,children:a.label},a.value)),Qa=Ha&&Ha.filter(e=>"English"===e.queryValue).concat(f(Ha.filter(e=>"English"!==e.queryValue),e=>e.queryValue)).map(e=>M.jsx(D,{variant:"bordered",fullWidth:!0,alignLeft:!0,respondWidth:!0,active:b.parse(window.location.search).language===e.queryValue,href:t.allLists({language:e.queryValue}),children:e.queryValue},e.name)),Ua=Object.entries(_.siteHeaderLinks).map(([e,a])=>M.jsx(D,{variant:"bordered",fullWidth:!0,alignLeft:!0,active:b.parse(window.location.search).language===a.value&&"foundational-literacy"===Be.pathname.replace(`/${i}`,"").replace(/\/([^/]*).*$/,"$1"),respondWidth:!0,href:t.csf(a.value),children:a.label},`csf-${e}`)),Ya=Object.entries(j.siteHeaderLinks).filter(([e,a])=>"English"===a.label).concat(f(Object.entries(j.siteHeaderLinks).filter(([e,a])=>"English"!==a.label),([e,a])=>a.label)).map(([e,a])=>M.jsx(D,{variant:"bordered",fullWidth:!0,alignLeft:!0,active:b.parse(window.location.search).language===a.value&&"foundational-literacy-programme"===Be.pathname.replace(`/${i}`,"").replace(/\/([^/]*).*$/,"$1"),respondWidth:!0,href:t.flpHome(a.value),
2children:a.label},`flp-${e}`)),Ja=[M.jsx(D,{variant:"bordered",fullWidth:!0,alignLeft:!0,active:b.parse(window.location.search).language===x.siteHeaderLinks.hindi.value&&window.location.href.includes("early-learning-resources"),respondWidth:!0,href:t.ece(x.siteHeaderLinks.hindi.value),children:x.siteHeaderLinks.hindi.label},"ece-hi")],Ka=Object.entries(w.siteHeaderLinks).filter(([e,a])=>!1===a.disable).map(([e,a])=>M.jsx(D,{variant:"bordered",fullWidth:!0,alignLeft:!0,active:b.parse(window.location.search).language===a.value&&"stem-literacy-programme"===Be.pathname.replace(`/${i}`,"").replace(/\/([^/]*).*$/,"$1"),respondWidth:!0,href:t.stemHome(a.value),children:a.label},`stem-${e}`)),Xa=Object.entries(k.siteHeaderLinks).map(([e,a])=>M.jsx(D,{variant:"bordered",fullWidth:!0,alignLeft:!0,active:Be.pathname.replace(`/${i}`,"").replace(/\/([^/]*).*$/,"$1")===a.value.toLowerCase(),respondWidth:!0,href:t.bookFormats(a.value.toLowerCase()),onClick:()=>ia({gaEvent:`${a.value.toLowerCase()}_clicked`,gaCategory:T.navigation,gaLabel:"resource"}),children:a.label},`book-formats-${e}`)),Za=M.jsx(h,{nowrap:!0,children:la.map(e=>M.jsx(D,{parentClassName:`${Ze}__drop-down-link ${Ze}__link--ltr ${Ze}__site-lang--dropdown`,alignLeft:!0,isIcon:!0,onClick:()=>se(e.queryValue),respondWidth:!0,children:e.name},e.queryValue))}),el=M.jsx(c,{toggleEl:M.jsx(D,{variant:"bordered",caret:"down",noLeftPadding:!0,children:Ee("global.resources",1)},"resources"),align:ae?"right":"left",noPadding:!0,disabled:!1,noMargin:!0,bordered:!0,variant:"hover",minWidth:re?"xxl":"xl",updateActiveMenuSelected:Ve,updateActiveDropdownLink:ie,activeDropdown:le,isRtl:ae,children:re===m.readingProgram?M.jsxs(v,{noGutter:!0,bordered:!0,isRtl:ae,columns:["60%","40%"],children:[M.jsx(h,{parentClassName:`${Ze}__resources-column`,nowrap:!0,alignRight:ae,children:Oa}),M.jsx(h,{parentClassName:`${Ze}__resources-column ${Ze}__resources-column-list`,nowrap:!0,children:Ma})]}):re===m.bookLists?M.jsxs(v,{noGutter:!0,bordered:!0,isRtl:ae,columns:["60%","40%"],children:[M.jsx(h,{parentClassName:`${Ze}__resources-column`,nowrap:!0,alignRight:ae,children:Oa}),M.jsx(h,{parentClassName:`${Ze}__resources-column ${Ze}__resources-column-list`,nowrap:!0,children:Fa})]}):re===m.csf?M.jsxs(v,{noGutter:!0,bordered:!0,isRtl:ae,columns:["60%","40%"],children:[M.jsx(h,{parentClassName:`${Ze}__resources-column`,nowrap:!0,alignRight:ae,children:Oa}),M.jsx(h,{parentClassName:`${Ze}__resources-column ${Ze}__resources-column-list`,nowrap:!0,children:Da})]}):re===m.flpHome?M.jsxs(v,{noGutter:!0,bordered:!0,isRtl:ae,columns:["60%","40%"],children:[M.jsx(h,{parentClassName:`${Ze}__resources-column`,nowrap:!0,alignRight:ae,children:Oa}),M.jsx(h,{parentClassName:`${Ze}__resources-column ${Ze}__resources-column-list`,nowrap:!0,children:Va})]}):re===m.ece?M.jsxs(v,{noGutter:!0,bordered:!0,isRtl:ae,columns:["60%","40%"],children:[M.jsx(h,{parentClassName:`${Ze}__resources-column`,nowrap:!0,alignRight:ae,children:Oa}),M.jsx(h,{parentClassName:`${Ze}__resources-column ${Ze}__resources-column-list`,nowrap:!0,children:Ia})]}):re===m.stem?M.jsxs(v,{noGutter:!0,bordered:!0,isRtl:ae,columns:["60%","40%"],children:[M.jsx(h,{parentClassName:`${Ze}__resources-column`,nowrap:!0,alignRight:ae,children:Oa}),M.jsx(h,{parentClassName:`${Ze}__resources-column ${Ze}__resources-column-list`,nowrap:!0,children:qa})]}):re===m.bookFormats?M.jsxs(v,{noGutter:!0,bordered:!0,isRtl:ae,columns:["60%","40%"],children:[M.jsx(h,{parentClassName:`${Ze}__resources-column`,nowrap:!0,alignRight:ae,children:Oa}),M.jsx(h,{parentClassName:`${Ze}__resources-column ${Ze}__resources-column-list`,nowrap:!0,children:Ga})]}):M.jsx(v,{noGutter:!0,bordered:!0,isRtl:ae,children:M.jsx(h,{parentClassName:`${Ze}__resources-column`,nowrap:!0,alignRight:ae,children:Oa})})});let al=[];const ll=Array.isArray(Le)?Le:[],rl=ll.length>0?[{name:"StoryWeaver's #GetChildrenReading",logo:y.campaigns.swLogo,key:"storyweaver",url:Oe,id:"StoryWeaver"},...ll.filter(e=>e&&e.isActive).map(e=>{var a,l,r,n,o;return{name:e.menuPartnerName,logo:null==(a=e.menuPartnerLogo)?void 0:a.url,key:e.menuPartnerName,url:t.gcrSubCampaign((null==(l=e.languageSupport)?void 0:l.find(e=>e.point===ke))?ke:(null==(r=e.languageSupport)?void 0:r.find(e=>e.point===i))?i:(null==(o=null==(n=e.languageSupport)?void 0:n[0])?void 0:o.point)||i,e.partnerName),id:e.partnerName}})]:[{name:"StoryWeaver's #GetChildrenReading",logo:y.campaigns.swLogo,key:"storyweaver",url:Oe,id:"StoryWeaver"}];Y.ptrOrgs&&Y.ptrOrgs.length>
20&&Y.ptrOrgs.forEach(e=>{if(e){const a=rl.find(a=>e===a.id);a&&al.push(a)}});const nl=M.jsxs("div",{className:`${Ze}__gcr-img`,children:[M.jsx("img",{className:`${Ze}__gcr-img--blink`,src:y.campaigns.stars,alt:"gcr"})," ",M.jsxs("span",{children:["#GetChildrenReading",al.length>1&&P.large&&M.jsx($,{direction:"down",parentClassName:`${Ze}__gcr-caret`})]})]}),tl=al&&al.length>0?al.reverse().map(e=>M.jsxs(s,{href:e.url,onClick:()=>La(e.id),children:[M.jsxs("span",{className:`${Ze}__gcr-menu`,children:[M.jsx("img",{className:`${Ze}__gcr-menu--logo`,src:e.logo,alt:"partner logo"}),M.jsx("p",{className:`${Ze}__gcr-menu--title`,title:e.name,children:e.name})]}),M.jsx(d,{})]},e.id)):null,il=Be.pathname.replace(`/${i}`,""),ol="/about/campaigns/getchildrenreading"===il||"/about/campaigns/getchildrenreading/pcertificate"===il||"/about/campaigns/getchildrenreading/partner"===il||"/about/campaigns/onedayonestory"===il||"/about/campaigns/onedayonestory/certificate"===il||"/about/campaigns/onedayonestory/worldbookday23"===il?[]:il.includes("/getchildrenreading")?[M.jsxs(D,{variant:"bordered",respondWidth:!0,fullWidth:!0,alignLeft:!0,isRtl:ae,onClick:()=>ka(al,tl),parentClassName:`${Ze}__gcr`,children:[nl,al.length>1&&M.jsx(g,{parentClassName:`${Ze}__gcr-close`,name:ae?"chevron-left":"chevron-right"})]},"gcr"),M.jsx(d,{variant:"padding"},"divider-6")]:[M.jsxs(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,onClick:()=>{Ve(m.mobSiteLang)},children:[Ee("global.site-language")," : ",oa(qe)," ",M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee(ae?"SvgTitle.chevron-left":"SvgTitle.chevron-right")})]},"language dropdown"),M.jsx(d,{variant:"padding"},"divider-6"),M.jsxs(D,{variant:"bordered",respondWidth:!0,fullWidth:!0,alignLeft:!0,isRtl:ae,onClick:()=>ka(al,tl),parentClassName:`${Ze}__gcr`,children:[nl,al.length>1&&M.jsx(g,{parentClassName:`${Ze}__gcr-close`,name:ae?"chevron-left":"chevron-right"})]},"gcr"),M.jsx(d,{variant:"padding"},"divider-7")],sl=[M.jsxs(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,onClick:()=>{we(),Ve(m.read)},children:[Ee("global.read",1)," ",M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee(ae?"SvgTitle.chevron-left":"SvgTitle.chevron-right")})]},"stories"),M.jsx(d,{variant:"padding"},"divider-1"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.translate(),children:Ee("global.translate")},"translate"),M.jsx(d,{variant:"padding"},"divider-2"),M.jsxs(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,onClick:()=>{Ve(m.resources)},children:[M.jsxs("span",{className:`${Ze}__new-entry-wrapper`,children:[Ee("global.resources")," ",fa]})," ",M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee(ae?"SvgTitle.chevron-left":"SvgTitle.chevron-right")})]},"resources"),M.jsx(d,{variant:"padding"},"divider-8"),M.jsxs(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,onClick:()=>{Ve(m.discover)},children:[Ee("global.discover")," ",M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee(ae?"SvgTitle.chevron-left":"SvgTitle.chevron-right")})]},"discover"),M.jsx(d,{variant:"padding"},"divider-3"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.offlineBooks(),children:Ee("global.offline-library",2)},"offline-library"),M.jsx(d,{variant:"padding"},"divider-4"),M.jsx(D,{variant:"bordered",isRtl:ae,respondWidth:!0,fullWidth:!0,alignLeft:!0,href:t.allIllustrations(),children:Ee("global.image",2)},"image"),M.jsx(d,{variant:"padding"},"divider-5"),...ol||[],M.jsx(D,{fullWidth:!0,alignLeft:!0,href:t.donate(),parentClassName:`${Ze}__donate`,children:Ee("global.donate")},"donate"),M.jsx(d,{variant:"padding"},"divider-8"),M.jsx(D,{variant:"sublinks",isRtl:ae,respondWidth:!0,alignLeft:!ae,onClick:wa,children:Ee("global.create")},"create")],dl=al.length<=0||!H?M.jsx(s,{href:Oe,onClick:()=>La(W.storyweaverGcr),children:nl},"gcr"):tl&&1===tl.length?M.jsx(s,{href:al[0].url,onClick:()=>La(al[0].id),children:nl},"gcr"):M.jsx(c,{toggleEl:nl,align:"left",disabled:!1,isRtl:!1,noMargin:!0,variant:"hover",updateActiveDropdownLink:ie,activeDropdown:le,children:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__create`,children:tl})}),cl=Be.pathname.replace(`/${i}`,"");let hl=[M.jsx("div",{className:`${Ze}__nav-link-wrapper`,children:Ta},"read dropdown"),M.jsx(D,{variant:"bordered",respondWidth:!0,href:t.translate(),children:Ee("global.translate")},"translate"),M.jsx("div",{className:`${Ze}__nav-link-wrapper`,children:Aa},"create"),M.jsx("div",{className:`${Ze}__nav-link-wrapper`,children:M.jsxs("span",{className:`${Ze}__new-entry-wrapper`,children:[el," ",fa]})},"resources"),M.jsx("div",{className:`${Ze}__nav-link-wrapper`,children:Ba},"discover"),M.jsx(D,{href:t.donate(),parentClassName:`${Ze}__donate`,children:Ee("global.donate")},"donate"),M.jsx("div",{className:"/donate"===cl?`${Ze}__gcr ${Ze}__gcr-donate`:`${Ze}__gcr`,children:M.jsxs("span",{className:`${Ze}__gcr-tp`,children:[dl,Y.showPtrFirstPopUp&&!He&&(window.location.pathname===t.home()||window.location.pathname===t.studentHome()||window.location.pathname===t.parentHome()||window.location.pathname===t.educatorHome())&&M.jsx(O.Suspense,{fallback:null,children:M.jsx(q,{})})]})},"gcr")];"/donate"===cl&&(hl=hl?hl.filter(e=>"donate"!==e.key):null),("/about/campaigns/getchildrenreading"===cl||"/about/campaigns/getchildrenreading/pcertificate"===cl||"/about/campaigns/getchildrenreading/partner"===cl||"/about/campaigns/onedayonestory"===cl||"/about/campaigns/onedayonestory/certificate"===cl||"/about/campaigns/onedayonestory/worldbookday23"===cl)&&(hl=hl?hl.filter(e=>"gcr"!==e.key):null),hl&&Array.isArray(hl)&&(hl=hl.map(sa));const gl=sl.map(sa),ul=!window.location.pathname.includes("/advanced-search");return M.jsxs("div",{ref:Xe,className:S(ea),children:[pa===C.ddl&&M.jsx(O.Suspense,{fallback:null,children:M.jsx(G,{redirectOnLogOut:Y.redirectOnLogOut,viewport:P,user:Y})}),pa===C.gd&&M.jsx(O.Suspense,{fallback:null,children:M.jsx(z,{redirectOnLogOut:Y.redirectOnLogOut,viewport:P,user:Y})}),M.jsxs("div",{className:`${Ze}__container`,children:[M.jsxs("div",{className:`${Ze}__primary-container`,children:[!te&&M.jsx("div",{className:`${Ze}__brand`,children:M.jsx(R,{href:X?null:t.home(),parentClassName:`${Ze}__logo`,onClick:()=>{"undefined"!=typeof window&&window.dataLayer&&window.dataLayer.push({category:T.navigation,event:E.clickedLogo,label:T.homePage,item_type:null,item_id:null,item_value:null,user_id:null==Y?void 0:Y.id,user_profile:null==Y?void 0:Y.profile_type})}})}),!X&&P.large&&ul&&M.jsx("div",{className:`${Ze}__suggestion-el ${Ze}__suggestion-el--advanced`,children:M.jsx(V,{autoSuggestions:ue,fetchAutoSuggestionsWorkflow:ce,onSearch:e=>na((e||ze||me||"").trim()),baseClassName:Ze,onSelect:ra,onQueryChange:Qe,onInputFocus:e=>na((e||ze||me||"").trim()),searchQuery:me,t:Ee,placeholder:Ee("global.search-topics")})}),!te&&M.jsxs("div",{className:`${Ze}__nav-primary`,children:[window.location.pathname.includes("/getchildrenreading")||window.location.pathname.includes("/onedayonestory")||P.large?null:_a,X||P.large||!ul?null:M.jsx(D,{onClick:()=>na((ze||me||"").trim()),borderLeft:!0,smallLineHeight:!P.large,title:Ee("SvgTitle.search"),children:M.jsx(g,{name:"search",title:Ee("SvgTitle.search"),size:"m",parentClassName:`${Ze}__search-icon-rainbow`})}),P.large||X?ba:null,P.large?ga:null,!P.large||window.location.pathname.includes("/getchildrenreading")||window.location.pathname.includes("/onedayonestory")?null:M.jsx("div",{className:`${Ze}__nav-link-wrapper ${Ze}__nav-link-wrapper--border-left`,children:X?M.jsx(D,{noLeftPadding:!0,disabled:!0,uppercase:!0,children:qe}):M.jsx(c,{toggleEl:M.jsx(D,{caret:"down",noLeftPadding:!0,children:oa(qe)}),disabled:!1,variant:"hover",updateActiveDropdownLink:ie,activeDropdown:le,isRtl:ae,verticalPadding:!0,children:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__rp-drop-down`,children:la.map(e=>M.jsx(D,{parentClassName:`${Ze}__drop-down-link ${Ze}__site-lang`,variant:"bordered",isIcon:!0,onClick:()=>se(e.queryValue),respondWidth:!0,children:e.name},"languages"))})})},"language-dropdown"),P.large&&H&&!X?M.jsx(D,{borderLeft:!0,smallLineHeight:!P.large,children:null!=pe?M.jsx(O.Suspense,{fallback:M.jsx(u,{}),children:M.jsx(I,{data:pe,viewport:P,user:Y})}):M.jsx(u,{})},"notification"):null,P.large||X?null:M.jsx(D,{onClick:()=>{re&&re===m.main?(Ve(""),Ie("")):(Ve(m.main),Ie(""),window.scrollTo(0,0),ia({gaEvent:"clicked_menu",gaCategory:T.navigation,gaLabel:W.mobileAp
2p}))},borderLeft:!0,smallLineHeight:!P.large,children:M.jsx(g,{name:re&&re!==m.mobSiteLang?"close":"menu",title:Ee(re?"SvgTitle.close":"SvgTitle.menu"),size:"m"})})]})]}),!X&&Me&&M.jsx(O.Suspense,{fallback:null,children:M.jsx(Q,{viewport:P,onClose:()=>{Fe(!1)},onSubmit:e=>{if(e){const a=ge(e);(a&&"function"==typeof a.then?a:Promise.resolve({ok:!0})).then(a=>{var l;a&&a.ok?(ia({gaEvent:E.clickedSearch,gaCategory:T.navigation,gaLabel:E.search,itemType:W.searchTerm,itemValue:e}),window.location.href=t.searchBy(e)):ee({id:"global-auto-suggest",content:(null==(l=null==a?void 0:a.data)?void 0:l.errorMessage)||"An error occurred during search"})}).catch(a=>{ia({gaEvent:E.clickedSearch,gaCategory:T.navigation,gaLabel:E.search,itemType:W.searchTerm,itemValue:e}),window.location.href=t.searchBy(e)})}else{const{languagePreferences:e,readingLevels:a}=Y;window.location.href=t.allBooks(void 0,e,a)}Fe(!1)},onSelect:ra,isRtl:ae,fetchAutoSuggestionsWorkflow:ce,autoSuggestions:ue,searchQuery:me})}),(re||P.medium)&&!X&&M.jsx("div",{className:ae&&P.medium&&re!==m.gcr&&re!==m.bottomGcr?`${Ze}__nav-secondary ${Ze}__nav-secondary--rtl`:`${Ze}__nav-secondary`,children:P.large?hl:M.jsxs("div",{children:[re===m.main&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:gl}),goBackTo:H?"user":null,backLinkContent:ga,rightIcon:H&&M.jsx(g,{name:ae?"chevron-left":"chevron-right",title:Ee(ae?"SvgTitle.chevron-left":"SvgTitle.chevron-right")}),baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.user&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:ma}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-main")]}),goBackTo:m.main,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,onTriggerEvents:ia,eventAction:W.backMenu,eventLabel:m.user,t:Ee}),re===m.mobSiteLang&&M.jsx(U,{content:Za,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,onTriggerEvents:ia,eventAction:W.backMenu,eventLabel:m.siteLang,t:Ee}),re===m.read&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Ra}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-main")]}),goBackTo:m.main,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,onTriggerEvents:ia,eventAction:W.backMenu,eventLabel:m.read,t:Ee}),re===m.resources&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Oa}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-main")]}),goBackTo:m.main,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,onTriggerEvents:ia,eventAction:W.backMenu,eventLabel:m.resources,t:Ee}),re===m.bottomResources&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Oa}),rightIcon:te&&M.jsx("div",{onClick:xa,children:M.jsx(g,{name:"close",title:Ee("SvgTitle.close")})}),backLinkContent:Ee("global.resources"),baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.readingProgram&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:za}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-resources")]}),goBackTo:te===m.bottomResources?m.bottomResources:m.resources,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.bookLists&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Qa}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-resources")]}),goBackTo:te===m.bottomResources?m.bottomResources:m.resources,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.csf&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Ua}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-resources")]}),goBackTo:te===m.bottomResources?m.bottomResources:m.resources,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.flpHome&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Ya}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-resources")]}),goBackTo:te===m.bottomResources?m.bottomResources:m.resources,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.ece&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Ja}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-resources")]}),goBackTo:te===m.bottomResources?m.bottomResources:m.resources,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.stem&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Ka}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-resources")]}),goBackTo:te===m.bottomResources?m.bottomResources:m.resources,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.bookFormats&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Xa}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-resources")]}),goBackTo:te===m.bottomResources?m.bottomResources:m.resources,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,t:Ee}),re===m.discover&&M.jsx(U,{content:M.jsx(h,{nowrap:!0,parentClassName:`${Ze}__user`,alignRight:ae,children:Pa}),backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-main")]}),goBackTo:m.main,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,onTriggerEvents:ia,eventAction:W.backMenu,eventLabel:m.discover,t:Ee}),re===m.gcr&&M.jsx(U,{content:tl,backLinkContent:M.jsxs("div",{children:[M.jsx(g,{name:ae?"chevron-right":"chevron-left",title:Ee(ae?"SvgTitle.chevron-right":"SvgTitle.chevron-left"),pushRight:!ae,pushLeft:ae}),Ee("global.back-to-main")]}),goBackTo:m.main,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:ae,onTriggerEvents:ia,eventAction:W.backMenu,eventLabel:m.gcr,t:Ee}),re===m.bottomGcr&&(()=>{if(al.length<=0||!H)La(W.storyweaverGcr),window.location.href=Oe;else{if(!tl||1!==al.length)return M.jsx(U,{content:tl,rightIcon:te&&M.jsx("div",{className:`${Ze}__gcr-close`,onClick:xa,children:M.jsx(g,{name:"close",title:Ee("SvgTitle.close")})}),backLinkContent:nl,baseClassName:Ze,menuSelected:re,updateActiveMenuSelected:Ve,isRtl:!1,t:Ee,parentClassName:`${Ze}__gcr-close`});La(al[0].id),window.location.href=al[0].url}})()]})})]})]})};Y.propTypes={isLoggedIn:H.bool,user:H.shape({first_name:H.string,redirectOnLogOut:H.string}),viewport:H.object,logout:H.func,offline:H.bool,openAuthModal:H.func,addSlimNotification:H.func,isRtl:H.bool,activeDropdown:H.string,menuSelected:H.str
2ing,bottomMenuSelected:H.func,isBottomMenuSelected:H.bool,updateActiveDropdownLink:H.func,updateActiveMenuSelected:H.func,changeLanguage:H.func,filters:H.object,fetchAutoSuggestionsWorkflow:H.func,updateWordSearchFrequencyWorkFlow:H.func,addNewSearchWordWorkFlow:H.func,autoSuggestions:H.array,searchQuery:H.string,isFetchingAutoSuggestions:H.bool,platformNotifications:H.array,fetchAllListsFiltersWorkflow:H.func,fetchTrendingThemesWorkflow:H.func,trendingThemes:H.array,isTrendingTheme:H.bool,raFilters:H.object,fetchAllReadalongFiltersWorkflow:H.func,localePreferences:H.string,staticSubGcrData:H.object,isTrendingLanguagesList:H.bool,fetchTrendingLanguagesListWorkflow:H.func,trendingLanguagesList:H.array,isFetchingMe:H.bool,isFetchingTrendingThemes:H.bool,isFetchingTrendingLanguagesList:H.bool,isUpdatingRPBooks:H.bool};export{Y as default};

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.