1import{R as m}from"./db-Bfypsywf.js";import{R as h}from"./app-ot2mVJTe.js";import{s as u}from"./subscriptions-2LKBr3rM.js";import{_ as T,r as c,o as l,c as b,C as _}from"./_plugin-vue_export-helper-CZA__Pdj.js";import"./Crypt-DGbh7Fnm.js";const R={components:{Read:m,ReadFa:h},data(){return{bookToken:void 0,bookTitle:"",password:"",windowSize:{height:window.innerHeight,width:window.innerWidth}}},computed:{isFa(){return!window.location.pathname.includes("/en/")&&(window.location.pathname.includes("/fa/")||!0)}},beforeRouteEnter(i,k,s){s(async o=>{var e,t,a,d,p;window.addEventListener("resize",o.resize);try{if(o.library&&typeof o.library.load=="function"){await o.library.load();const r=o.library.items.find(n=>n.book&&n.book.token===i.params.token);r&&(o.password=r.password||"",o.bookTitle=((e=r.book)==null?void 0:e.title)||((t=r.book)==null?void 0:t.name)||"")}if(!o.password){const n=(((a=(await u.library()).data)==null?void 0:a.data)||[]).find(f=>{var w;return((w=f.book)==null?void 0:w.token)===i.params.token});n!=null&&n.access_active&&(o.password=n.password||"",o.bookTitle=((d=n.book)==null?void 0:d.title)||((p=n.book)==null?void 0:p.name)||"")}}catch(r){console.error("Failed to load password from library:",r)}o.bookToken=i.params.token})},beforeRouteLeave(i,k,s){window.removeEventListener("resize",this.resize),s()},methods:{resize(){this.windowSize={height:window.innerHeight,width:window.innerWidth}}}};function y(i,k,s,o,e,t){const a=c("ReadFa"),d=c("Read",!0);return t.isFa&&e.bookToken?(l(),b(a,{token:e.bookToken,method:"online",password:e.password,bookTitle:e.bookTitle,key:e.bookToken},null,8,["token","password","bookTitle"])):e.bookToken?(l(),b(d,{token:e.bookToken,method:"online",password:e.password,key:e.bookToken},null,8,["token","password"])):_("",!0)}const E=T(R,[["render",y]]);export{E 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.