PageSourceSearch

https://www.soliver.cz/_nuxt/CCGK3HuS.js

js soliver.cz collected 2026-10-05 09:45:14 UTC 6,022 bytes, 1 lines download raw bytes

1import{al as W,y as $,aC as j,f3 as H,z as U,K as F,A as d,cF as C,bt as Z}from"./B0_CeJP0.js";function E(e){return e?e.replace(/\/+$/g,"")||"/":""}function I(e){if(!e)return"";const[a=""]=e.split(/[?#]/);let l=E(a);return l.startsWith("/")||(l=`/${l}`),l.replace(/^\/[a-z]{2}(?:-[A-Z]{2})?\/c(?=\/)/,"").replace(/^\/c(?=\/)/,"")}function b(e){return e?.type==="category"?I(e.category?.path):e?.type==="individual-link"?I(e.options?.url):e?.type==="page"?I(e.page):""}function B(e){return e?.type==="category"?e.category?.id??null:e?.type==="individual-link"&&typeof e.customData?.representsCategoryId=="number"?e.customData.representsCategoryId:null}function G(e){return!!(e?.children?.length||e?.type==="category"&&e.category?.childrenIds?.length||e?.type==="individual-link"&&typeof e.customData?.representsCategoryId=="number")}function M(e,a,l=null){if(!e||a==null)return null;for(const u of e){if(u.id===a)return{item:u,parent:l};const v=M(u.children,a,u);if(v)return v}return null}function T(e,a){if(!a)return null;for(const l of e??[]){if(B(l)===a)return{item:l,parent:null};const u=T(l.children,a);if(u)return{item:u.item,parent:u.parent??l}}return null}function K(e,a){const l=I(a);if(!e||!l)return null;let u=null,v=-1;const S=(m,N)=>{for(const y of m){const s=b(y);s&&(l===s||l.startsWith(`${s}/`))&&s.length>v&&(u={item:y,parent:N},v=s.length),y.children?.length&&S(y.children,y)}};return S(e,null),u}function Q(e){return e?G(e.item)?e.item:e.parent??e.item:null}function q(e=!1){const a=W("tab-nav",()=>({previousActiveCategory:void 0,activeCategory:void 0,activeTabIndex:0,isNestedView:!1,isShopSelectorView:!1,isSideNavigationOpen:!1,activeItem:void 0,path:"",parent:null,isFlyoutShown:!1})),l=$(),{categoryPath:u}=j(),{navigationTreeItems:v}=H(),S=d(()=>a.value.activeCategory),m=d(()=>Math.max(0,a.value.path.split("/").length-2)),N=d(()=>m.value>0),y=d(()=>m.value>0||a.value.isShopSelectorView),{debugLog:s}=U("navigation"),V=d(()=>a.value.isShopSelectorView),A=async t=>{if(typeof t=="number"||t?.childrenIds.length&&!t.children){const i=typeof t=="number"?t:t.id,{data:r}=await C(i,2);if(!r.value){a.value.activeCategory=null;return}t=r.value,s({type:"load-category",category:t})}a.value.activeCategory=t},p=async t=>{const i=D(t);s({type:"set-active",item:t,cleanedUp:i}),a.value.activeItem=i,a.value.path=b(i);const r=v.value?.[0]?.items||[],n=M(r,i.id);if(a.value.parent=n?.parent??null,!n){const o=i.type==="category"?i.category?.parentId:void 0;if(o)a.value.parent=T(r,o)?.item??null;else{const f=a.value.path.split("/").slice(0,-1).join("/");f&&(a.value.parent=await h(r,f))}}const c=B(t);t.type==="category"?(await A(t.category),a.value.isFlyoutShown=!0):c?(await A(c),a.value.isFlyoutShown=!0):a.value.isFlyoutShown=!1},z=(t=!0)=>{a.value.isShopSelectorView=t},_=()=>{a.value.activeItem=void 0,a.value.activeCategory=void 0},x=async()=>{const t=a.value.parent;if(t){await p(t);return}const i=a.value.activeCategory?.parentId;if(i){const r=v.value?.[0]?.items||[],n=T(r,i)?.item;if(n){await p(n);return}const{data:c}=await C(i,2);c.value&&await p(w(c.value))}};async function k(){if(!v.value?.length)return;const t=v.value[0].items,i=Z("sol-gender-choice"),r=I(u.value||l.path),n=K(t,r);if(n?.item.type==="individual-link"){let g=Q(n);if(g){await p(g);const P=n.parent;g.id===n.item.id&&!n.item.children?.length&&!a.value.activeCategory?.children?.length&&P&&(g=P,await p(P)),s({type:"active-individual-link-found",activeItem:n.item,displayedItem:g,path:r});return}}const c=r.split("/").slice(0,-1).join("/")||r;let o=await h(t,c);!o&&i.value&&(o=await h(t,i.value));const f={activeItem:o,parentPath:c,path:r};if(o){p(o),s({type:"active-item-found",...f});return}else s({type:"no-active-item-found",...f});s({type:"update-by-default",activeItem:t[0]}),p(t[0])}function D(t){if(!t)return t;const i=t.children?.filter(L)??[];return i.forEach(D),{...t,children:i}}function L(t){const i=R(new Date),r=O(t.visibleFrom),n=O(t.visibleTo);return n&&n<i?(s({type:"hide-item",item:t,now:i,to:n}),!1):r&&r>i?(s({type:"hide-item",item:t,now:i,from:r}),!1):!0}e&&(F(()=>a.value.activeCategory,(t,i)=>{a.value.previousActiveCategory=i},{deep:!1}),F(u,k),a.value.activeItem||k());async function h(t,i){if(i=I(i),!t||!i)return null;let r=null;for(const n of t){if(b(n)===i)return n;if(!u.value){if(n.type==="individual-link"&&n?.children?.some(f=>b(f)===i))return n;if(n.children?.length){const o=await h(n.children,l.path);if(o){r=o;break}}else continue}const c=await h(n.children,i);if(c){r=c;break}if(n.type==="category"&&!n.category){const{data:o}=await C(n.id,5);if(!o.value)return null;n.category=o.value}if(n.type==="category"&&i.startsWith(n.category.path)){if(n.category.childrenIds.length&&!n.category.children){const{data:o}=await C(n.category.id,5);if(!o.value)return null;n.category=o.value}for(const o of n.category.children||[]){const f=w(o);if(o.path===i){r=f;break}else{const g=await h(f.children,i);if(g){r=g;break}}}}}return r}function w(t){return typeof t=="number"?{id:t,type:"category",__pseudo:!0}:{...t,id:t.id,type:"category",category:t,children:t.children?.map(w)||t.childrenIds?.map(w)||[],__pseudo:!0}}return{activeTabIndex:m,canGoBack:N,isNestedView:y,activeCategory:S,setActiveItem:p,activeItem:d(()=>a.value.activeItem),previousActiveCategory:d(()=>a.value?.previousActiveCategory),isShopSelectorView:V,showShopSelector:z,isSideNavigationOpen:d(()=>a.value.isSideNavigationOpen),closeSideNavigation:()=>{a.value.isSideNavigationOpen=!1},toggleSideNavigation:t=>{t&&(_(),k()),a.value.isSideNavigationOpen=t??!a.value.isSideNavigationOpen},parent:d(()=>a.value.parent),backToParent:x,mapCategoryToNavigationTreeItem:w,isFlyoutShown:d(()=>a.value.isFlyoutShown)}}function O(e){return e&&new Date(new Date(e).getTime()+7200*1e3).toISOString().replace("Z","")}function R(e){const a=l=>String(l).padStart(2,"0");return e.getFullYear()+"-"+a(e.getMonth()+1)+"-"+a(e.getDate())+"T"+a(e.getHours())+":"+a(e.getMinutes())+":"+a(e.getSeconds())}
1export{I as a,B as b,b as g,G as n,q as u};

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.