1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7595],{92144:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/mylibrary",function(){return t(26695)}])},8198:function(e,n,t){"use strict";var i=t(85893);t(67294);var r=t(59901),o=t(58377),s=t.n(o);n.Z=e=>{let{label:n,level:t="primary",type:o="fill",size:l=40,leftIcon:a,rightIcon:c,centerIcon:u,fullWidth:_=!1,loading:d=!1,disabled:f=!1,className:h="",onClick:b,children:y,buttonType:m="button",id:g,title:x,leftIconSize:k=null,rightIconSize:p=null,centerIconSize:v=null}=e,j="fill"===o?({primary:s().fillPrimary,secondary:s().fillSecondary,infinit:s().fillInfinit,third:s().fillThird})[t]:"outline"===o?({primary:s().outlinePrimary,secondary:s().outlineSecondary,infinit:s().outlineInfinit,third:s().outlineThird})[t]:"fill-with-outline"===o?({primary:s().fillPrimaryWithOutlinePrimary,secondary:s().fillSecondaryWithOutlineSecondary,infinit:s().fillInfinitWithOutlineInfinit,third:s().fillThirdWithOutlineThird})[t]:({primary:s().textPrimary,secondary:s().textSecondary,infinit:s().textInfinit,third:s().textThird})[t],B=!!u,I=[s().button,j,s()["size".concat(l)],B?s().centerIcon:"",_?s().fullWidth:"",d?s().loading:"",f?s().disabled:"",h].filter(Boolean).join(" "),Z=()=>32===l||36===l?16:20,P=(e,n)=>(0,i.jsx)(r.Z,{name:e,size:n||Z(),className:s().icon});return(0,i.jsx)("button",{type:m,id:g,className:I,onClick:b,disabled:f||d,title:x,children:d?(0,i.jsx)("div",{className:s().loader,children:(0,i.jsx)("div",{className:s().spinner})}):(()=>{if(y)return y;let e=(0,i.jsx)(i.Fragment,{children:n});return u?(0,i.jsxs)(i.Fragment,{children:[e,P(u,v)]}):(0,i.jsxs)(i.Fragment,{children:[c&&P(c,p),e,a&&P(a,k)]})})()})}},59901:function(e,n,t){"use strict";t.d(n,{J:function(){return r}});var i=t(85893);let r=e=>{let{name:n,size:t=24,path:r="icons",inline:o=!1,className:s="",style:l,...a}=e,c=o?"icon-inline":"icon",u=s?"".concat(c," ").concat(s).trim():c,_={display:o?"inline-block":"block",...l};return(0,i.jsx)("img",{src:"/".concat(r,"/").concat(n,".svg"),alt:n,width:t,height:t,className:u,style:_,"aria-hidden":!a["aria-label"]||void 0,...a})};n.Z=r},14564:function(e,n,t){"use strict";var i=t(85893),r=t(67799),o=t(68547),s=t(59860),l=t.n(s);n.Z=e=>{let{appBrowser:n=r.OG.WebView}=e;return n===r.OG.WebView||void 0===n?(0,i.jsx)("div",{className:l().loading,children:(0,i.jsx)(o.Z,{})}):(0,i.jsx)(o.Z,{})}},26695:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return v}});var i=t(85893),r=t(11163),o=t.n(r),s=t(9008),l=t.n(s),a=t(41664),c=t.n(a),u=t(67294),_=t(87447),d=t(88714),f=t(67799),h=t(21252),b=t(68547),y=t(95990),m=t.n(y),g=t(49706),x=t(8198),k=t(14564),p=e=>{let n,{type:t}=e,[r,s]=(0,u.useState)({books:[],hasMore:!0}),[a,y]=(0,u.useState)({books:[],hasMore:!0}),[p,v]=(0,u.useState)({books:[],hasMore:!0}),[j,B]=(0,u.useState)({books:[],hasMore:!0}),{isAuthenticated:I,loading:Z}=(0,u.useContext)(g.V),P=(0,u.useRef)(null),L=(0,u.useRef)(null),S=(0,u.useRef)(null),T=(0,u.useRef)(null),w=(e,n,t,i,r)=>{e.hasMore&&(0,d.av)(e.books.length,24,n,t,r).then(n=>{if((null==n?void 0:n.status)===f.kF.Success){let t=n.result.books.map(e=>e.book),r=n.result.books.reduce(function(e,n){return e[n.book]=n.status,e},{});t.length>0?(0,d.yZ)(t).then(n=>{n&&(n.forEach(e=>{e.myLibraryStatus=r[e.id]}),i({books:e.books.concat(n),hasMore:24==n.length}))}):i({books:e.books,hasMore:!1})}})};return(0,u.useEffect)(()=>{if((I||!Z)&&t)return n=new IntersectionObserver(e=>{if(e[0].isIntersecting)switch(t){case"text":w(r,!1,"text",s,!1);break;case"audio":w(a,!1,"audio",y,!1);break;case"bookmarks":w(p,!0,null,v,!1);break;case"subscriptions":w(j,!1,null,B,!0)}},{rootMargin:"100px"}),P.current&&n.observe(P.current),L.current&&n.observe(L.current),S.current&&n.observe(S.current),T.current&&n.observe(T.current),()=>{n.disconnect()}},[t,r,a,p,j,I,Z]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l(),{children:[(0,i.jsx)("title",{children:"کتابخاÙÙ Ù
Ù | ".concat(_.Z.appNameFA)}),(0,i.jsx)("meta",{name:"robots",content:"noindex"})]}),(0,i.jsx)("div",{className:"container",children:Z||I?Z?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(k.Z,{})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("ul",{className:m().tabs,children:[(0,i.jsx)("li",{className:"".concat("text"==t?m().active:""),children:(0,i.jsx)(c(),{href:"/mylibrary?type=text",shallow:!0,children:(0,i.jsx)("span",{children:"کتاب اÙکترÙÙÛÚ©"})})}),(0,i.jsx)("li",{className:"".concat("audio"==t?m().active:""),children:(0,i.jsx)(c(),{href:"/mylibrary?type=audio",shallow:!0,children:(0,i.jsx)("span",{children:"کتاب ØµÙØªÛ"})})}),(0,i.jsx)("li",{className:"".concat("bookmarks"==t?m().active:""),children:(0,i.jsx)(c(),{href:"/mylibrary?type=bookmarks",shallow:!0,children:(0,i.jsx)("span",{children:"ÙØ´Ø§Ù Ø´Ø¯Ù ÙØ§"})})}),(0,i.jsx)("li",{className:"".concat("subscriptions"==t?m().active:""),children:(0,i.jsx)(c(),{href:"/mylibrary?type=subscriptions",shallow:!0,children:(0,i.jsx)("span",{children:"اشتراک Ø¨Û ÙÙØ§Ûت"})})})]}),"text"==t&&(0,i.jsx)(h.Z,{bookList:{books:r.books},inLib:!0}),"text"==t&&r.hasMore&&(0,i.jsx)("div",{ref:P,children:(0,i.jsx)(b.Z,{})}),"audio"==t&&(0,i.jsx)(h.Z,{bookList:{books:a.books},inLib:!0}),"audio"==t&&a.hasMore&&(0,i.jsx)("div",{ref:L,children:(0,i.jsx)(b.Z,{})}),"bookmarks"==t&&(0,i.jsx)(h.Z,{bookList:{books:p.books},inLib:!1,hasChip:!0}),"bookmarks"==t&&p.hasMore&&(0,i.jsx)("div",{ref:S,children:(0,i.jsx)(b.Z,{})}),"subscriptions"==t&&(0,i.jsx)(h.Z,{bookList:{books:j.books},inLib:!0,orderType:f.ed.Borrow}),"subscriptions"==t&&j.hasMore&&(0,i.jsx)("div",{ref:T,children:(0,i.jsx)(b.Z,{})})]}):(0,i.jsxs)("div",{className:m().notLoggedIn,children:[(0,i.jsx)("img",{className:m().notLoggedInImage,src:"/images/search/not-found-image.webp",alt:""}),(0,i.jsxs)("p",{className:m().notLoggedInText,children:["Ø¨Ø±Ø§Û Ù
Ø´Ø§ÙØ¯Ù کتابâÙØ§Ûت ",(0,i.jsx)("br",{}),"ÙØ§Ø²Ù
است ÙØ§Ø±Ø¯ ØØ³Ø§Ø¨ کاربرÛâØ§Øª Ø´ÙÛ."]}),(0,i.jsx)(x.Z,{className:m().loginButton,label:"ÙØ±Ùد",size:42,onClick:()=>{o().push("/login")},level:"primary",type:"fill"})]})})]})},v=()=>{let{type:e}=(0,r.useRouter)().query;if(e=Array.isArray(e)?e[0]:e,console.log("MyLibrary Route"),e)switch(e.toLowerCase()){case"text":default:e="text";break;case"audio":e="audio";break;case"bookmarks":e="bookmarks";break;case"subscriptions":e="subscriptions"}return e?(0,i.jsx)(p,{type:e}):null}},88714:function(e,n,t){"use strict";t.d(n,{GL:function(){return c},J1:function(){return a},Jh:function(){return y},Oh:function(){return f},S2:function(){return h},Zu:function(){return b},ac:function(){return u},av:function(){return o},fb:function(){return d},i0:function(){return m},mV:function(){return l},vn:function(){return _},yZ:function(){return s}});var i=t(76446),r=t(83454);function o(e,n,t,r,o){return i.ZP.post("/mybook/PostSslService.svc/v2/GetMyLibrary",{start:e,size:n,type:r,bookmarked:t,borrowed:o})}function s(e){return i.Bp.post("/v2/book/list",e)}function l(e){return i.ZP.post("/mybook/postsslservice.svc/BookmarkBooks",{bookIds:[e]})}function a(e){return i.ZP.post("/mybook/postsslservice.svc/ArchiveBooks",{bookIds:[e]})}let c=e=>i.ZP.post("/v1/quotes/".concat(e,"/like"),{},r.env.NEXT_PUBLIC_BOOK_QUOTE_URL),u=e=>i.ZP.post("/v1/quotes/".concat(e,"/dislike"),{},r.env.NEXT_PUBLIC_BOOK_QUOTE_URL),_=e=>i.ZP.post("/v2/reviews/".concat(e,"/like"),{}),d=e=>i.ZP.post("/v2/reviews/".concat(e,"/dislike"),{}),f=e=>i.ZP.post("/v2/reviews/".concat(e,"/clearlike"),{}),h=(e,n)=>i.ZP.post("/v2/reviews/".concat(e,"/reply"),{comment:n,parentId:e}),b=e=>i.ZP.post("/v2/reviews",e),y=e=>i.ZP.get("/v2/reviews",{bookId:e}),m=e=>i.ZP.post("/v2/reviews/".concat(e,"/delete"),{})},58377:function(e){e.exports={button:"generalButton_button__N96Dh",disabled:"generalButton_disabled__MJd44",fillPrimary:"generalButton_fillPrimary__VSRpQ",fillPrimaryWithOutlinePrimary:"generalButton_fillPrimaryWithOutlinePrimary__fLkTT",fillSecondary:"generalButton_fillSecondary__eY_Tc",fillSecondaryWithOutlineSecondary:"generalButton_fillSecondaryWithOutlineSecondary__HfFoe",fillInfinit:"generalButton_fillInfinit__tR2J2",fillInfinitWithOutlineInfinit:"generalButton_fillInfinitWithOutlineInfinit__Y_Ug_",fillThird:"generalButton_fillThird__Hh7Yj",fillThirdWithOutlineThird:"generalButton_fillThirdWithOutlineThird__AKK9w",outlineBase:"generalButton_outlineBase__OSIN7",outlineThird:"generalButton_outlineThird__kacQu",outlineInfinit:"generalButton_outlineInfinit__PVWuH",outlineSecondary:"generalButton_outlineSecondary__sc7pT",outlinePrimary:"generalButton_outlinePrimary__oqs_Q",textBase:"generalButton_textBase__SRZ8M",textThird:"generalButton_textThird__Z2MxX",textInfinit:"generalButton_textInfinit__iBY2S",textSecondary:"generalButton_textSecondary__Hrv8P",textPrimary:"generalButton_textPrimary__qDRKv",size32:"generalButton_size32__CZZNL",size36:"generalButton_size36__LKhWR",size40:"generalButton_size40__ld7s3",size42:"generalButton_size42__xLcUl",fullWidth:"generalButton_fullWidth__fZnp2",loading:"generalButton_loading__xuFM1",loader:"generalButton_loader____D8I",spinner:"generalButton_spinner__SccxV",spin:"generalButton_spin__vmC0A",label:"generalButton_label__uMqvh",icon:"generalButton_icon__stCXD",centerIcon:"generalButton_centerIcon__0_bP4"}},59860:function(e){e.exports={loading:"fullScreenLoading_loading__OXHe7"}},95990:function(e){e.exports={tabs:"mylibrary_tabs__LOaW0",active:"mylibrary_active__gWhHF",bookList:"mylibrary_bookList__BRvO8",bookReadStatus:"mylibrary_bookReadStatus__d13Ns",libraryItemMenu:"mylibrary_libraryItemMenu__OURfF",notLoggedIn:"mylibrary_notLoggedIn__WBM9J",notLoggedInImage:"mylibrary_notLoggedInImage__pTf0F",notLoggedInText:"mylibrary_notLoggedInText__nwYmE",loginButton:"mylibrary_loginButton__H3_U1"}}},function(e){e.O(0,[1252,9774,2888,179],function(){return e(e.s=92144)}),_N_E=e.O()}]);
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.