1"use strict";(self.webpackChunkreact_starter=self.webpackChunkreact_starter||[]).push([[8256],{88256:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k});var i=r(9950),s=r(21215),n=r.n(s),o=r(77409),a=r.n(o),l=r(28429),d=(r(69011),r(11312),r(22326),r(18446)),c=r(44027),u=r(76639),h=r(67818),p=r(44414);function f(e){let{contact:t}=e;const[r,s]=(0,i.useState)(!1),{t:n}=(0,h.Bd)();return(0,p.jsx)("div",{onClick:()=>s((e=>!e)),className:"link",style:{background:"transparent",width:"70%",height:"60%",position:"absolute",top:"45%",left:"50%",transform:"translate(-50%,-50%)",zIndex:1e3,cursor:"pointer",borderRadius:"12px"},children:(0,p.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"story-link "+(r?"show":""),children:n("Havolaga o'tish")})})}function m(){const e=(0,l.zy)(),t=n().parse(e.search,{ignoreQueryPrefix:!0}),{defMuted:r,redirect_url:s}=t,[o,a]=(0,i.useState)(!r||"false"!==r),d=(0,l.Zp)();return(0,i.useEffect)((()=>{const e=document.querySelector(".story-modal video");e&&(e.muted=o)}),[o]),(0,i.useEffect)((()=>{if(r){a(!r||"false"!==r);const i={...t};delete i.defMuted,i.defMuted=o?"false":"true",d({pathname:e.pathname,search:`?redirect_url=${s||"/"}`},{replace:!0})}}),[r]),(0,p.jsx)("button",{onClick:()=>a(!o),className:"mute-btn",style:{position:"absolute",top:35,left:15,background:"rgba(255,255,255,0.8)",color:"#000",border:"none",borderRadius:"50%",width:36,height:36,fontSize:18,cursor:"pointer",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center"},children:o?(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",class:"lucide lucide-volume-off-icon lucide-volume-off",children:[(0,p.jsx)("path",{d:"M16 9a5 5 0 0 1 .95 2.293"}),(0,p.jsx)("path",{d:"M19.364 5.636a9 9 0 0 1 1.889 9.96"}),(0,p.jsx)("path",{d:"m2 2 20 20"}),(0,p.jsx)("path",{d:"m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11"}),(0,p.jsx)("path",{d:"M9.828 4.172A.686.686 0 0 1 11 4.657v.686"})]}):(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",class:"lucide lucide-volume2-icon lucide-volume-2",children:[(0,p.jsx)("path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"}),(0,p.jsx)("path",{d:"M16 9a5 5 0 0 1 0 6"}),(0,p.jsx)("path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728"})]})})}const g=r.p+"static/media/like.635b206d0f6218412ca9d6f24bc1669b.svg";const x=r.p+"static/media/share.23421127282c35b320c2fc6e6ef84ce5.svg";var v=r(41937);function b(e){let{currentStory:t={},shareUrl:r}=e;const{t:s}=(0,h.Bd)(),[n,o]=(0,i.useState)(t.likes),{mutate:a}=(0,v.YK)({name:"likeStory",method:"post"});return(0,p.jsx)("div",{className:"controls",style:{position:"absolute",bottom:"-5px",zIndex:1e3,width:"100%"},children:(0,p.jsxs)("div",{style:{display:"flex",marginBottom:10,justifyContent:"space-between",padding:"0 7px"},children:[(0,p.jsxs)("button",{onClick:()=>{var e;(e=t.id)&&(a({url:`/tutorial-items/like/${e}`,data:{action:"like"}}),o(n+1))},style:{background:"#332B42",height:56,borderRadius:8,display:"flex",alignItems:"center",justifyContent:"center",color:"white",cursor:"pointer",width:"49%",border:"none"},children:[(0,p.jsx)("img",{src:g,style:{marginRight:12,width:"20px"},width:20,height:20,alt:""}),n]}),(0,p.jsxs)("button",{onClick:async()=>{if(navigator.share)try{await navigator.share({url:r})}catch(e){}else navigator.clipboard.writeText(r).then((()=>{alert(s("Link nusxalandi!"))}))},style:{background:"#4E4698",height:56,borderRadius:8,width:"49%",display:"flex",alignItems:"center",justifyContent:"center",border:"none",color:"white",cursor:"pointer"},children:[(0,p.jsx)("img",{src:x,style:{marginRight:12,width:"20px"},width:18,height:20,alt:""}),s("Ulashish")]})]})})}var y=r(41397);const j=e=>(e.items||[]).map((e=>{const t=(0,y.get)(e,"file.thumbnails.origin.src"),r="mp4"===(0,y.get)(e,"file.ext")?"video":"image";return{id:e.id,url:t,type:r,likes:e.likes||0,contact:e.contact||""}})),w={width:"100%",height:"100%",borderRadius:"20px",overflow:"hidden",marginTop:"20px",position:"relative",display:"flex",alignItems:"center",objectFit:"cover",justifyContent:"center"};function k(){const e=(0,l.Zp)(),{id:t}=(0,l.g)(),r=(0,l.zy)(),s=n().parse(r.search,{ignoreQueryPrefix:!0}),{redirect_url:o,current:h}=s,[g,x]=(0,i.useState)(!1),[v,y]=(0,i.useState)(0),[k,S]=(0,i.useState)(0),C=(0,i.useRef)(null),[I,N]=(0,i.useState)(0);return(0,i.useEffect)((()=>{const e=document.querySelector(".story-modal"),t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);e&&(t?e.classList.add("stories-ios"):e.classList.add("stories-android"))}),[]),(0,p.jsx)(u.A,{name:"tutorials",url:"/tutorials",params:{extra:{tutorial_id:t,sort:"sort"},include:"itemsCount,file,items.file"},onError:()=>{e("/auth/login")},onSuccess:e=>{if(null!==e&&void 0!==e&&e.data&&h){const r=null===e||void 0===e?void 0:e.data.filter((e=>e.id===Number(t)))[0];r&&r.items.length>0&&N(r.items.findIndex((e=>Number(e.id)===Number(h))))}},children:i=>{let{data:n}=i;
1if(!n.data)return null;const l=n.data.findIndex((e=>e.id==t));return(0,p.jsx)("div",{className:"my-swiperrr",style:{background:"rgb(17, 17, 17)",height:"100vh",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,p.jsx)(c.RC,{effect:"coverflow",centeredSlides:!0,initialSlide:l,onSlideChange:e=>S(e.activeIndex),slidesPerView:"auto",onSwiper:e=>C.current=e,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!1},modules:[d.t9],className:"mySwiper",children:null===n||void 0===n?void 0:n.data.map(((t,i)=>{var l,d,u,g;const S=j({items:null===t||void 0===t?void 0:t.items});if(h&&I){y(-1!==I?I:0);delete{...s}.current,e({pathname:r.pathname,search:`?redirect_url=${o||"/"}`},{replace:!0})}if("last"===h){y(h?S.length-1:0);delete{...s}.last,e({pathname:r.pathname,search:`?redirect_url=${o||"/"}`},{replace:!0})}return(0,p.jsx)(c.qr,{children:(0,p.jsx)("div",{className:"stories-parent swiper-no-swiping",style:{maxWidth:"500px",height:"100%",position:"relative",zIndex:1e3},children:k===i?(0,p.jsxs)("div",{children:[(0,p.jsx)("button",{onClick:()=>e(o||"/"),className:"close-btn",style:{position:"absolute",top:35,right:15,background:"rgba(255,255,255,0.8)",color:"#000",border:"none",borderRadius:"50%",width:36,height:36,fontSize:18,zIndex:1e3,cursor:"pointer"},children:"\u2715"}),!(0===k&&0===v)&&(0,p.jsx)("button",{onClick:()=>{x(!1),v>0&&y(v-1),0===v&&C.current&&(0!==k&&e({pathname:r.pathname,search:`?redirect_url=${o||"/"}&defMuted=false¤t=last`},{replace:!0}),C.current.slidePrev())},className:"stories-nav prev",style:{position:"absolute",top:400,left:-60,background:"rgba(255,255,255,0.8)",color:"#000",border:"none",borderRadius:"50%",width:50,zIndex:100,height:50,fontSize:30,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:"\u2039"}),!(k===n.data.length-1&&v===S.length-1)&&(0,p.jsx)("button",{onClick:()=>{var t;(x(!1),v+1<S.length)?y(v+1):(y(0),null===(t=C.current)||void 0===t||t.slideNext(),e({pathname:r.pathname,search:`?redirect_url=${o||"/"}&defMuted=false`},{replace:!0}))},className:"stories-nav next",style:{position:"absolute",top:400,right:-60,background:"rgba(255,255,255,0.8)",color:"#000",border:"none",borderRadius:"50%",width:50,zIndex:100,height:50,fontSize:30,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:"\u203a"}),"video"===(null===(l=S[v])||void 0===l?void 0:l.type)&&(0,p.jsx)(m,{}),(0,p.jsxs)("div",{className:"ios-div",children:[(null===(d=S[v])||void 0===d?void 0:d.contact)&&(0,p.jsx)(f,{contact:null===(u=S[v])||void 0===u?void 0:u.contact}),(0,p.jsxs)("div",{className:"stories story-modal",style:{position:"relative",height:"100%"},children:[(0,p.jsx)(a(),{storyStyles:w,stories:S,currentIndex:v,width:"100%",height:"90%",onNext:()=>(e=>{x(!1),v+1<e.length&&y(v+1)})(S),onPrevious:()=>{x(!1),v>0&&y(v-1),0===v&&C.current&&(0!==k&&e({pathname:r.pathname,search:`?redirect_url=${o||"/"}&defMuted=false¤t=last`},{replace:!0}),C.current.slidePrev())},onStoryEnd:()=>(e=>{x(!1),v+1<e.length&&y(v+1)})(S),onAllStoriesEnd:()=>{n.data.length===k+1||y(0),C.current&&(C.current.slideNext(),e({pathname:r.pathname,search:`?redirect_url=${o||"/"}&defMuted=false`},{replace:!0}))}}),(0,p.jsx)(b,{currentStory:S[v],shareUrl:`/stories/${t.id}?redirect_url=/¤t=${null===(g=S[v])||void 0===g?void 0:g.id}`},v)]})]})]}):"video"===S[0].type?(0,p.jsx)("video",{src:S[0].url,muted:!0,playsInline:!0,loop:!0,style:{width:"100%",height:"100vh",objectFit:"cover",borderRadius:"20px"}}):(0,p.jsx)("img",{src:S[0].url,alt:"",style:{width:"100%",height:"100vh",objectFit:"cover",borderRadius:"20px"}})})})}))})})}})}}}]);
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.