PageSourceSearch

https://dayfiles.com/assets/toolConnectivity-Bk7-4Cia.js

js dayfiles.com collected 2026-09-24 14:41:29 UTC 9,927 bytes, 1 lines download raw bytes

1import{G as k,H as S,r as u,m as A,I as h,K as P,k as j,M as p,O as T,Q as I,R as C,j as n,X as z,T as R,L as N}from"./index-zdiqHW5r.js";const F=S("NativeInAppReview"),_="private-pdf-review-successful-export-count",y="private-pdf-in-app-review-attempted",L="private-pdf-rating-prompt-rated",B="private-pdf-rating-prompt-pending",E="private-pdf-rating-prompt-dismissed-at",g=3;function K(){if(typeof window>"u")return null;try{return window.localStorage??null}catch{return null}}function M(e){const t=Number.parseInt(e.getItem(_)??"",10);return!Number.isFinite(t)||t<0?0:Math.min(t,g)}function H(e){return e.getItem(y)==="true"||e.getItem(L)==="true"}function $(e){e.removeItem(B),e.removeItem(E)}async function Y(){if(!k())return"not-eligible";const e=K();if(!e||H(e))return"not-eligible";const t=Math.min(M(e)+1,g);if(e.setItem(_,String(t)),$(e),t<g)return"not-eligible";e.setItem(y,"true");try{return await F.requestReview(),"requested"}catch{return e.removeItem(y),"failed"}}function Z({visible:e}){const[t,r]=u.useState(!1),[o,s]=u.useState(!1),l=u.useSyncExternalStore(A,h,h),i=!!(l.adsRemoved||l.premium||l.lifetimeOwned||l.subscriptionActive);return u.useEffect(()=>{if(!e||o||i||!P(j())){let f=!0;return p().finally(()=>{f&&r(!1)}),()=>{f=!1}}let d=!0,c=!1,a=null;const w=window.setTimeout(()=>{T().then(f=>{if(d&&!f){r(!1);return}d&&f&&!c&&(a=window.setTimeout(()=>{d&&!c&&(r(!1),p())},15e3))})},1200),v=I(()=>{d&&(c=!0,a!==null&&window.clearTimeout(a),r(!0))},()=>{d&&(c=!1,a!==null&&window.clearTimeout(a),r(!1))});return()=>{d=!1,window.clearTimeout(w),a!==null&&window.clearTimeout(a),p(),C(v)}},[i,o,e]),!e||!t||o||i?null:n.jsxs(n.Fragment,{children:[n.jsx("div",{"aria-hidden":"true",className:"h-[calc(env(safe-area-inset-bottom)+5rem)]","data-testid":"native-tool-page-ad-spacer"}),n.jsxs("button",{type:"button","aria-label":"Close ad and view ad-free options",className:"fixed right-2 bottom-[calc(env(safe-area-inset-bottom)+6.5rem)] z-[65] inline-flex min-h-9 items-center gap-1.5 rounded-full border border-slate-200 bg-white/96 px-3 text-xs font-bold text-slate-700 shadow-lg",onClick:()=>{s(!0),p(),R("ad_close")},children:[n.jsx(z,{size:14})," Remove ads"]})]})}function ee({title:e,description:t,helperText:r,primaryAction:o,secondaryActions:s,onClearLocalFiles:l}){return n.jsxs("div",{className:"space-y-3 rounded-xl border border-slate-200 bg-slate-50/80 p-3","data-testid":"result-connectivity",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("p",{className:"text-sm font-semibold text-slate-900",children:e}),n.jsx("p",{className:"text-sm text-slate-700",children:t}),n.jsx("p",{className:"text-xs text-slate-500",children:r})]}),n.jsx(N,{to:o.to,"data-testid":"result-primary-next",className:"block w-full min-w-0 rounded-lg border border-emerald-300 bg-white px-4 py-2 text-center text-sm font-semibold leading-tight text-emerald-900 whitespace-normal transition hover:border-emerald-400 hover:bg-emerald-50",children:o.label}),s.length?n.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(i=>n.jsx(N,{to:i.to,className:"rounded-full border border-slate-300 bg-white px-3 py-1.5 text-sm leading-tight text-slate-700 whitespace-normal transition hover:border-slate-400 hover:bg-slate-100",children:i.label},`${i.to}-${i.label}`))}):null,n.jsx("button",{type:"button",onClick:()=>{l()},className:"text-xs font-semibold text-slate-600 underline decoration-slate-400 underline-offset-4",children:"Clear local files"})]})}function te({title:e,description:t,onUse:r,onDismiss:o,onClearLocalFiles:s}){return n.jsxs("section",{className:"rounded-2xl border border-emerald-200 bg-emerald-50/70 p-4 shadow-sm","data-testid":"tool-handoff-card",children:[n.jsx("p",{className:"text-sm font-semibold text-emerald-950",children:e}),n.jsx("p",{className:"mt-1 text-sm text-emerald-900",children:t}),n.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[n.jsx("button",{type:"button","data-testid":"use-recent-handoff",onClick:()=>{r()},className:"rounded-lg bg-emerald-700 px-4 py-2 text-sm font-semibold leading-tight text-white whitespace-normal",children:e}),n.jsx("button",{type:"button",onClick:o,className:"rounded-lg border border-emerald-300 bg-white px-4 py-2 text-sm font-semibold leading-tight text-emerald-900 whitespace-normal",children:"Choose different file"})]}),n.jsx("button",{type:"button",onClick:()=>{s()},className:"mt-3 text-xs font-semibold text-emerald-900 underline decoration-emerald-400 underline-offset-4",children:"Clear local files"})]})}const O=new Set(["pdf_page_count","pdf_file_size","pdf_metadata","pdf_editability","pdf_password_status","pdf_page_size","pdf_offline_compatibility"]),D={ocr_pdf:{handoffSource:"result",primaryNext:"lock",secondaryNext:["edit_pdf"],nextAfterPrimary:"download"},edit_pdf:{handoffSource:"result",primaryNext:"minify",secondaryNext:["e_sign","lock"],nextAfterPrimary:"lock"},merge:{handoffSource:"result",primaryNext:"minify",secondaryNext:["organize","lock"],nextAfterPrimary:"lock"},minify:{handoffSource:"result",primaryNext:"lock",secondaryNext:["e_sign","merge"],nextAfterPrimary:"download"},lock:{handoffSource:"result",primaryNext:"pdf_password_status",secondaryNext:["unlock","pdf_metadata"],nextAfterPrimary:"download"},unlock:{handoffSource:"result",primaryNext:"edit_pdf",secondaryNext:["fill_forms","e_sign"],nextAfterPrimary:"lock"},pdf_page_count:{handoffSource:"source",primaryNext:"split",secondaryNext:["extract_pages","merge"],nextAfterPrimary:"minify"},pdf_file_size:{handoffSource:"source",primaryNext:"minify",secondaryNext:["merge","pdf_page_count"],nextAfterPrimary:"lock"},pdf_metadata:{handoffSource:"source",primaryNext:"lock",secondaryNext:["unlock","pdf_password_status"],nextAfterPrimary:"download"},pdf_editability:{handoffSource:"source",primaryNext:"edit_pdf",secondaryNext:["fill_forms","e_sign"],nextAfterPrimary:"lock"},pdf_password_status:{handoffSource:"source",primaryNext:"unlock",secondaryNext:["lock","edit_pdf"],nextAfterPrimary:"lock"},pdf_page_size:{handoffSource:"source",primaryNext:"crop",secondaryNext:["organize","pdf_to_jpg"],nextAfterPrimary:"minify"},pdf_offline_compatibility:{handoffSource:"source",primaryNext:"minify",secondaryNext:["unlock","pdf_to_jpg"],nextAfterPrimary:"download"},split:{handoffSource:"result_if_single",primaryNext:"minify",secondaryNext:["lock","merge"],nextAfterPrimary:"lock",eligibility:{singleResultOnly:!0}},extract_pages:{handoffSource:"result_if_single",primaryNext:"minify",secondaryNext:["lock","merge"],nextAfterPrimary:"lock",eligibility:{singleResultOnly:!0}},rotate:{handoffSource:"result",primaryNext:"crop",secondaryNext:["organize","minify"],nextAfterPrimary:"lock"},organize:{handoffSource:"result",primaryNext:"minify",secondaryNext:["page_numbers","lock"],nextAfterPrimary:"lock"},remove_pages:{handoffSource:"result",primaryNext:"minify",secondaryNext:["page_numbers","lock"],nextAfterPrimary:"lock"},redact:{handoffSource:"result",primaryNext:"lock",secondaryNext:["minify","watermark"],nextAfterPrimary:"download"},crop:{handoffSource:"result",primaryNext:"minify",secondaryNext:["watermark","pdf_to_jpg"],nextAfterPrimary:"lock"},watermark:{handoffSource:"result",primaryNext:"lock",secondaryNext:["minify","e_sign"],nextAfterPrimary:"download"},e_sign:{handoffSource:"result",primaryNext:"lock",secondaryNext:["minify","fill_forms"],nextAfterPrimary:"download"},fill_forms:{handoffSource:"result",primaryNext:"e_sign",secondaryNext:["lock","minify"],nextAfterPrimary:"download"},page_numbers:{handoffSource:"result",primaryNext:"minify",secondaryNext:["watermark","lock"],nextAfterPrimary:"lock"},pdf_to_jpg:{handoffSource:"result",primaryNext:"jpg_to_pdf",secondaryNext:[],nextAfterPrimary:"download"},pdf_to_docx:{handoffSource:"result",primaryNext:"docx_to_pdf",secondaryNext:[],nextAfterPrimary:"download"},jpg_to_pdf:{handoffSource:"result",primaryNext:"merge",secondaryNext:["minify","lock"],nextAfterPrimary:"lock"},docx_to_pdf:{handoffSource:"result",primaryNext:"minify",secondaryNext:["merge","lock"],nextAfterPrimary:"lock"},html_to_pdf:{handoffSource:"result",primaryNext:"minify",secondaryNext:["merge","lock"],nextAfterPrimary:"lock"}};function re(e){return O.has(e)}function b(e){return D[e]}function x(e){return e.match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()??""}function q(e){return e.type==="application/pdf"||x(e.name)==="pdf"}function G(e){return e.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||x(e.name)==="docx"}function Q(e){const t=x(e.name);return e.type==="text/html"||t==="html"||t==="htm"}function U(e){const t=x(e.name);return e.type.startsWith("image/")||t==="jpg"||t==="jpeg"||t==="jpe"||t==="jfif"||t==="png"||t==="heic"||t==="heif"||t==="hif"}function W(e,t){return t==="pdf"?q(e):t==="docx"?G(e):t==="html"?Q(e):U(e)}function ne(e,t){return e.length?e.every(r=>t.some(o=>W(r,o))):!1}function m(e,t,r){return new File([e],t,{type:r??e.type??"application/octet-stream"})}function X(e){return e.blobs.map((t,r)=>m(t,`${e.name}-${r+1}.jpg`,t.type||"image/jpeg"))}function J(e){if(e.type==="images")return X(e);if(e.type==="pdf")return[m(e.blob,e.name,"application/pdf")];if(e.type==="zip")return[m(e.blob,e.name,"application/zip")];if(e.type==="pdf-batch"){const t=e.items.filter(r=>r.status==="ready");return t.length!==1||t[0].status!=="ready"?null:[m(t[0].blob,t[0].name,"application/pdf")]}return[m(e.blob,e.name)]}function oe(e,t,r){const o=b(e.id);return o.handoffSource==="source"?r.length?r:null:!t||t.type==="inspection"||o.handoffSource==="result_if_single"&&t.type==="zip"?null:J(t)}function ae(e,t,r){const o=b(e),s=t?"direct":"route_only",l=a=>!r||r.has(a),i=[o.primaryNext,...o.secondaryNext].filter(l),[d,...c]=i;return d?{primary:{toolId:d,mode:s},secondary:c.map(a=>({toolId:a,mode:s}))}:{primary:{toolId:e,mode:"route_only"},secondary:[]}}
1export{te as L,Z as N,ee as R,ae as a,W as b,oe as c,ne as f,b as g,re as i,Y as r};

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.