{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/4bVqWZ6io8YXo2Ljz7UN/3pYwBPSM8X03329n8GIi/Pdfviewer.js"],
  "sourcesContent": ["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{motion,AnimatePresence}from\"framer-motion\";import{useEffect,useRef,useState}from\"react\";import{getDocument,GlobalWorkerOptions,getPdfFilenameFromUrl}from\"https://cdn.jsdelivr.net/npm/pdfjs-dist@4.5.136/legacy/build/pdf.min.mjs\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */GlobalWorkerOptions.workerSrc=\"https://cdn.jsdelivr.net/npm/pdfjs-dist@4.5.136/legacy/build/pdf.worker.mjs\"||\"\";export default function Pdfviewer(props){const{fileChoose,file,fileURL,pageNumber,scale,buttonText,buttonStyles,modalStyles,customFileName}=props;const[modalOpen,setModalOpen]=useState(false);const canvasRef=useRef(null);const[loadingScreen,setLoadingScreen]=useState(false);const[totalPages,setTotalPages]=useState(null);const[pageRendering,setPageRendering]=useState(false);const[pageScale,setPageScale]=useState(scale);const[downloadURL,setdownloadURL]=useState(null);const selectedFile=fileChoose===\"Upload\"?file:fileURL;const renderAllPages=async pdf=>{if(!canvasRef.current)return;const scrollContainer=canvasRef.current;const previousScrollPercent=scrollContainer.scrollTop/scrollContainer.scrollHeight||0;const existingCanvases=scrollContainer.querySelectorAll(\"canvas\");for(let i=1;i<=pdf.numPages;i++){const page=await pdf.getPage(i);const viewport=page.getViewport({scale:pageScale});let canvas;let context;// Reuse canvas if it exists\nif(existingCanvases[i-1]){canvas=existingCanvases[i-1];context=canvas.getContext(\"2d\");}else{canvas=document.createElement(\"canvas\");context=canvas.getContext(\"2d\");scrollContainer.appendChild(canvas);}canvas.width=viewport.width;canvas.height=viewport.height;const renderContext={canvasContext:context,viewport:viewport};await page.render(renderContext).promise;}// Remove any extra canvases (e.g. if zoomed out to fewer pages)\nfor(let j=pdf.numPages;j<existingCanvases.length;j++){existingCanvases[j].remove();}requestAnimationFrame(()=>{scrollContainer.scrollTop=scrollContainer.scrollHeight*previousScrollPercent;});};const downloadData=async pdf=>{const data=await pdf?.getData();const blobUrl=window?.URL.createObjectURL(new Blob([data],{type:\"application/pdf\"}));const fileURL=await pdf?._transport?._networkStream?.source?.url;const pdfFileName=getPdfFilenameFromUrl(fileURL);setdownloadURL({blob:blobUrl,fileName:pdfFileName});};const download=(e,url)=>{e.stopPropagation();const a=document.createElement(\"a\");if(!a.click){throw new Error('DownloadManager: \"a.click()\" is not supported.');}a.href=url.blob+\"#pdfjs.action=download\";a.target=\"_parent\";// Use a.download if available. This increases the likelihood that\n// the file is downloaded instead of opened by another PDF plugin.\nif(\"download\"in a){a.download=customFileName||url.fileName;}(document.body||document.documentElement).append(a);a.click();a.remove();};/**\n     * If another page rendering in progress, waits until the rendering is\n     * finised. Otherwise, executes rendering immediately.\n     */const pdfZoomIn=e=>{e.stopPropagation();if(pageScale>3){return;}if(!pageRendering){setPageScale(pageScale+.1);}};const pdfZoomOut=e=>{e.stopPropagation();if(pageScale<=scale){return;}if(!pageRendering){setPageScale(pageScale-.1);}};useEffect(()=>{const body=document.getElementsByTagName(\"body\")[0];if(selectedFile!==undefined&&modalOpen){//hide body scrollbar\nbody.style.overflow=\"hidden\";body.style.height=\"100%\";const loadingTask=getDocument({url:selectedFile});setLoadingScreen(true);loadingTask?.promise.then(pdf=>{// you can now use *pdf* here\nrenderAllPages(pdf);setTotalPages(pdf.numPages);pdf.currentScaleValue=pageScale//zoom in/out\n;downloadData(pdf)// load blob data\n;},error=>{console.error(error);});//get progress data\nloadingTask.onProgress=data=>{if(data.loaded){setLoadingScreen(false);}else{setLoadingScreen(true);}};}else{if(pageScale>scale){setPageScale(scale);}body.style.overflow=\"auto\";body.style.height=\"auto\";}},[fileChoose,file,fileURL,selectedFile,modalOpen,pageScale,setLoadingScreen]);const close=()=>setModalOpen(false);const open=()=>setModalOpen(true);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(motion.button,{whileTap:{scale:.9},onClick:()=>modalOpen?close():open(),style:{...buttonStyles.fontStyle,padding:buttonStyles.padding,backgroundColor:buttonStyles.background,borderRadius:buttonStyles.borderRadius,borderStyle:buttonStyles.border?.borderStyle,borderColor:buttonStyles.border?.borderColor,borderTopWidth:buttonStyles.border?.borderTopWidth,borderLeftWidth:buttonStyles.border?.borderLeftWidth,borderBottomWidth:buttonStyles.border?.borderBottomWidth,borderRightWidth:buttonStyles.border?.borderRightWidth,textDecoration:buttonStyles.textDecoration,color:buttonStyles.color,boxShadow:buttonStyles.shadow,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",gap:\"5px\",overflow:\"hidden\"},\"aria-label\":\"Button\",children:[buttonStyles.buttonIcon&&/*#__PURE__*/_jsx(motion.div,{style:{width:buttonStyles.pdfIcon?.size+\"px\",height:buttonStyles.pdfIcon?.size+\"px\",color:buttonStyles.pdfIcon?.color,display:\"flex\",overflow:\"hidden\"},dangerouslySetInnerHTML:{__html:buttonStyles.pdfIcon.icon}}),buttonText]}),/*#__PURE__*/_jsx(AnimatePresence,{// Disable any initial animations on children that\n// are present when the component is first rendered\ninitial:false,// Only render one component at a time.\n// The exiting component will finish its exit\n// animation before entering component is rendered\nmode:\"wait\",// Fires when all exiting nodes have completed animating out\nonExitComplete:()=>null,children:modalOpen&&selectedFile!==undefined&&/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",position:\"fixed\",inset:0,zIndex:11},children:/*#__PURE__*/_jsxs(motion.div,{onClick:close,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{position:\"absolute\",top:0,left:0,height:\"100%\",width:\"100%\",backgroundColor:modalStyles.backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(motion.div,{onClick:e=>e.stopPropagation(),initial:{opacity:0},animate:{opacity:1,transition:{duration:1,type:\"spring\",damping:25,stiffness:500}},exit:{opacity:0},style:{width:\"auto\",height:\"88vh\",margin:\"auto\",display:\"flex\",flexDirection:\"column\",alignItems:\"start\",overflow:\"overlay\",zIndex:1},children:/*#__PURE__*/_jsx(\"div\",{ref:canvasRef,style:{display:\"flex\",flexDirection:\"column\",gap:\"16px\",overflowY:\"auto\",height:\"100%\",padding:\"10px\"}})}),loadingScreen&&/*#__PURE__*/_jsxs(motion.div,{style:{position:\"absolute\",left:0,right:0,top:0,bottom:0,height:\"100%\",width:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                                           .lds-dual-ring,\n                                           .lds-dual-ring:after {\n                                               box-sizing: border-box;\n                                           }\n                                           .lds-dual-ring {\n                                               display: inline-block;\n                                               width: 30px;\n                                               height: 30px;\n                                               color:#fff;\n                                           }\n                                           .lds-dual-ring:after {\n                                               content: \" \";\n                                               display: block;\n                                               width: 30px;\n                                               height: 30px;\n                                               margin: 8px;\n                                               border-radius: 50%;\n                                               border: 3px solid currentColor;\n                                               border-color: currentColor transparent currentColor transparent;\n                                               animation: lds-dual-ring 1.2s linear infinite;\n                                           }\n                                           @keyframes lds-dual-ring {\n                                               0% {\n                                                   transform: rotate(0deg);\n                                               }\n                                               100% {\n                                                   transform: rotate(360deg);\n                                               }\n                                           }\n                                           `}),/*#__PURE__*/_jsx(motion.div,{className:\"lds-dual-ring\"})]}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:\"10px\",left:\"10px\",right:\"10px\",display:\"flex\",justifyContent:\"flex-end\",alignItems:\"start\",margin:\"auto\",maxWidth:\"1440px\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"10px\",zIndex:2},children:[/*#__PURE__*/_jsx(\"div\",{onClick:close,children:/*#__PURE__*/_jsx(\"div\",{role:\"button\",\"aria-label\":\"Close Button\",style:{padding:modalStyles.closebtn.padding,backgroundColor:\"#19282f\",borderRadius:modalStyles.closebtn.borderRadius,width:modalStyles.closebtn.size+\"px\",height:modalStyles.closebtn.size+\"px\",display:\"flex\",color:modalStyles.closebtn.color,cursor:\"pointer\"},dangerouslySetInnerHTML:{__html:modalStyles.closebtn.closeIcon}})}),/*#__PURE__*/_jsx(\"div\",{onClick:pdfZoomOut,children:/*#__PURE__*/_jsx(\"div\",{role:\"button\",\"aria-label\":\"Zoom-out Button\",style:{padding:modalStyles.zoomControls.padding,backgroundColor:\"#19282f\",borderRadius:modalStyles.zoomControls.borderRadius,width:modalStyles.zoomControls.size+\"px\",height:modalStyles.zoomControls.size+\"px\",color:modalStyles.zoomControls.color,cursor:\"pointer\",display:\"flex\"},dangerouslySetInnerHTML:{__html:modalStyles.zoomControls.zoomOutIcon}})}),/*#__PURE__*/_jsx(\"div\",{onClick:pdfZoomIn,children:/*#__PURE__*/_jsx(\"div\",{role:\"button\",\"aria-label\":\"Zoom-in Button\",style:{padding:modalStyles.zoomControls.padding,backgroundColor:\"#19282f\",borderRadius:modalStyles.zoomControls.borderRadius,width:modalStyles.zoomControls.size+\"px\",height:modalStyles.zoomControls.size+\"px\",color:modalStyles.zoomControls.color,cursor:\"pointer\",display:\"flex\"},dangerouslySetInnerHTML:{__html:modalStyles.zoomControls.zoomInIcon}})}),/*#__PURE__*/_jsx(\"div\",{onClick:e=>download(e,downloadURL),children:/*#__PURE__*/_jsx(\"div\",{role:\"button\",\"aria-label\":\"Download Button\",style:{padding:modalStyles.downloadbtn.padding,backgroundColor:\"#19282f\",borderRadius:modalStyles.downloadbtn.borderRadius,width:modalStyles.downloadbtn.size+\"px\",height:modalStyles.downloadbtn.size+\"px\",color:modalStyles.downloadbtn.color,cursor:\"pointer\",display:\"flex\"},dangerouslySetInnerHTML:{__html:modalStyles.downloadbtn.downloadIcon}})})]})}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",inset:\"10px\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",maxWidth:\"1440px\",margin:\"auto\"}})]})})})]});}Pdfviewer.displayName=\"PDF Viewer\";addPropertyControls(Pdfviewer,{fileChoose:{type:ControlType.Enum,title:\"Choose\",options:[\"Upload\",\"URL\"],defaultValue:\"Upload\",displaySegmentedControl:true},file:{title:\"File\",type:ControlType.File,allowedFileTypes:[\"pdf\"],hidden:props=>props.fileChoose!==\"Upload\"},fileURL:{type:ControlType.String,title:\"URL\",defaultValue:\"\",hidden:props=>props.fileChoose!==\"URL\"},scale:{type:ControlType.Number,title:\"Scale\",max:3,min:.5,step:.1,displayStepper:true,defaultValue:1.2},buttonText:{title:\"Button Text\",type:ControlType.String,defaultValue:\"View PDF\"},buttonStyles:{type:ControlType.Object,title:\"Button Styles\",controls:{color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},background:{type:ControlType.Color,title:\"Button color\",defaultValue:\"#ffffff\"},fontStyle:{title:\"Font Style\",type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\"},border:{type:ControlType.Border,title:\"Border\",defaultValue:{borderBottomWidth:0,borderColor:\"black\",borderLeftWidth:0,borderRightWidth:0,borderStyle:\"solid\",borderTopWidth:0}},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"25px\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"10px 20px 10px 20px\"},shadow:{type:ControlType.BoxShadow,title:\"Shadow\",defaultValue:\"0px 0px 0px 0px rgba(0, 0, 0, 0)\"},textDecoration:{type:ControlType.Enum,title:\"Text Decoration\",options:[\"none\",\"underline\",\"overline\",\"line-through\"],optionTitles:[\"None\",\"Underline\",\"Overline\",\"Line Through\"],defaultValue:\"none\"},buttonIcon:{type:ControlType.Boolean,title:\"Button Icon\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},pdfIcon:{type:ControlType.Object,title:\"Icon Styles\",controls:{icon:{type:ControlType.String,title:\"Icon\",defaultValue:`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><rect width=\"256\" height=\"256\" fill=\"none\"/><polyline points=\"216 152 184 152 184 208\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"208\" y1=\"184\" x2=\"184\" y2=\"184\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><path d=\"M48,192H64a20,20,0,0,0,0-40H48v56\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><path d=\"M112,152v56h16a28,28,0,0,0,0-56Z\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><path d=\"M48,112V40a8,8,0,0,1,8-8h96l56,56v24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><polyline points=\"152 32 152 88 208 88\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/></svg>`},size:{type:ControlType.Number,title:\"Size\",defaultValue:24},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"red\",description:\"Note: \\n if you want to replace default svg icon, please change 'fill/stroke' property to 'currentColor', then only icon color property will be overide\"}},hidden(props){return props.buttonIcon===false;}}}},modalStyles:{type:ControlType.Object,title:\"Viewer Styles\",controls:{pageCounter:{type:ControlType.Object,title:\"Counter Styles\",controls:{fontStyle:{title:\"Font Style\",type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"5px 10px 5px 10px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"5px\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"rgba(0,0,0,0.3)\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#ffffff\"}}},arrows:{type:ControlType.Object,title:\"Nav Styles\",controls:{leftIcon:{type:ControlType.String,title:\"Left Icon\",defaultValue:`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"currentColor\" viewBox=\"0 0 256 256\"><path d=\"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z\"></path></svg>`},rightIcon:{type:ControlType.String,title:\"Right Icon\",defaultValue:`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"currentColor\" viewBox=\"0 0 256 256\"><path d=\"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z\"></path></svg>`},size:{type:ControlType.Number,title:\"Icon Size\",defaultValue:40},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"5px 10px 5px 10px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"5px\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"rgba(0,0,0,0.3)\"},color:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#ffffff\",description:\"Note: \\n if you want to replace default svg icon, please change 'fill/stroke' property to 'currentColor', then only icon color property will be overide\"}}},zoomControls:{type:ControlType.Object,title:\"Zoom Styles\",controls:{zoomOutIcon:{type:ControlType.String,title:\"Zoom-Out Icon\",defaultValue:`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"currentColor\" viewBox=\"0 0 256 256\"><path d=\"M152,112a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z\"></path></svg>`},zoomInIcon:{type:ControlType.String,title:\"Zoom-In Icon\",defaultValue:`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"currentColor\" viewBox=\"0 0 256 256\"><path d=\"M152,112a8,8,0,0,1-8,8H120v24a8,8,0,0,1-16,0V120H80a8,8,0,0,1,0-16h24V80a8,8,0,0,1,16,0v24h24A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z\"></path></svg>`},size:{type:ControlType.Number,title:\"Icon Size\",defaultValue:40},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"5px 10px 5px 10px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"5px\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"rgba(0,0,0,0.3)\"},color:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#ffffff\",description:\"Note: \\n if you want to replace default svg icon, please change 'fill/stroke' property to 'currentColor', then only icon color property will be overide\"}}},closebtn:{type:ControlType.Object,title:\"Close Styles\",controls:{closeIcon:{type:ControlType.String,title:\"Close Icon\",defaultValue:`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"currentColor\" viewBox=\"0 0 256 256\"><path d=\"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z\"></path></svg>`},size:{type:ControlType.Number,title:\"Icon Size\",defaultValue:40},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"5px 10px 5px 10px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"5px\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"rgba(0,0,0,0.3)\"},color:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#ffffff\",description:\"Note: \\n if you want to replace default svg icon, please change 'fill/stroke' property to 'currentColor', then only icon color property will be overide\"}}},downloadbtn:{type:ControlType.Object,title:\"Download Styles\",controls:{downloadIcon:{type:ControlType.String,title:\"Download Icon\",defaultValue:`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"currentColor\" viewBox=\"0 0 256 256\"><path d=\"M224,152v56a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a8,8,0,0,1,16,0v56H208V152a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,132.69V40a8,8,0,0,0-16,0v92.69L93.66,106.34a8,8,0,0,0-11.32,11.32Z\"></path></svg>`},size:{type:ControlType.Number,title:\"Icon Size\",defaultValue:40},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"5px 10px 5px 10px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"5px\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"rgba(0,0,0,0.3)\"},color:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#ffffff\",description:\"Note: \\n if you want to replace default svg icon, please change 'fill/stroke' property to 'currentColor', then only icon color property will be overide\"}}},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"rgba(0,0,0,0.7)\"}}},customFileName:{title:\"Download Name\",type:ControlType.String,defaultValue:\"Download\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Pdfviewer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__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AkB,SAAS,CAAC,aAAa,CAAC,KAAKA,EAAY,OAAO,MAAM,gBAAgB,aAAa,qWAAqW,EAAE,KAAK,CAAC,KAAKA,EAAY,OAAO,MAAM,YAAY,aAAa,EAAE,EAAE,QAAQ,CAAC,KAAKA,EAAY,QAAQ,MAAM,UAAU,aAAa,mBAAmB,EAAE,aAAa,CAAC,KAAKA,EAAY,aAAa,MAAM,gBAAgB,aAAa,KAAK,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,mBAAmB,aAAa,iBAAiB,EAAE,MAAM,CAAC,KAAKA,EAAY,MAAM,MAAM,aAAa,aAAa,UAAU,YAAY;AAAA,gJAAyJ,CAAC,CAAC,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,mBAAmB,aAAa,iBAAiB,CAAC,CAAC,EAAE,eAAe,CAAC,MAAM,gBAAgB,KAAKA,EAAY,OAAO,aAAa,UAAU,CAAC,CAAC",
  "names": ["fe", "Pdfviewer", "props", "fileChoose", "file", "fileURL", "pageNumber", "scale", "buttonText", "buttonStyles", "modalStyles", "customFileName", "modalOpen", "setModalOpen", "ye", "canvasRef", "pe", "loadingScreen", "setLoadingScreen", "totalPages", "setTotalPages", "pageRendering", "setPageRendering", "pageScale", "setPageScale", "downloadURL", "setdownloadURL", "selectedFile", "renderAllPages", "pdf", "scrollContainer", "previousScrollPercent", "existingCanvases", "i", "page", "viewport", "canvas", "context", "renderContext", "j", "downloadData", "data", "blobUrl", "window", "pdfFileName", "Ne", "download", "e", "url", "a", "pdfZoomIn", "pdfZoomOut", "ue", "body", "loadingTask", "Le", "error", "close", "open", "u", "l", "motion", "p", "AnimatePresence", "addPropertyControls", "ControlType"]
}
