','objs','workerSrc','.png','use','revokeObjectURL','4wGNBDm','createElement','putImageData','\x22\x20/>','zb_users/plugin/xc_toolbox/sdk/pdf/pdf.worker.min.js','pdf','1607670KwfLwg','catch',',\x20got\x20','length','下載失敗','display','54ngPSbc','paintImageXObject','25918NFDLAF','reload','each','blob','file','append','img','parent','images.zip','未提取到圖片','image/png','#imglist','preview','GlobalWorkerOptions','.\x20Expected\x20','','none','.pdfimg','get','','body','22YQeCqx','src','error','5028rpyUuP','
','
'];_0x2fc0=function(){return _0x39002c;};return _0x2fc0();}function _0x4269(_0x363c7b,_0x4b0e71){const _0x2fc0f6=_0x2fc0();return _0x4269=function(_0x426995,_0x1fee6b){_0x426995=_0x426995-0x1af;let _0x1621db=_0x2fc0f6[_0x426995];return _0x1621db;},_0x4269(_0x363c7b,_0x4b0e71);}(function(_0x56114d,_0x5b976c){const _0x34652c=_0x4269,_0x4b77c9=_0x56114d();while(!![]){try{const _0x3b3ea2=parseInt(_0x34652c(0x1b1))/0x1*(-parseInt(_0x34652c(0x1f6))/0x2)+-parseInt(_0x34652c(0x1dc))/0x3+parseInt(_0x34652c(0x1e8))/0x4*(parseInt(_0x34652c(0x1ee))/0x5)+-parseInt(_0x34652c(0x1b4))/0x6*(parseInt(_0x34652c(0x1d8))/0x7)+parseInt(_0x34652c(0x1df))/0x8*(parseInt(_0x34652c(0x1f4))/0x9)+parseInt(_0x34652c(0x1c3))/0xa+parseInt(_0x34652c(0x1be))/0xb;if(_0x3b3ea2===_0x5b976c)break;else _0x4b77c9['push'](_0x4b77c9['shift']());}catch(_0xfad40b){_0x4b77c9['push'](_0x4b77c9['shift']());}}}(_0x2fc0,0x5963c),pdfjsLib[_0x45408e(0x203)][_0x45408e(0x1e4)]=bloghost+_0x45408e(0x1ec),layui[_0x45408e(0x1e6)]([_0x45408e(0x1cb),_0x45408e(0x1b7)],function(){const _0x55e7e7=_0x45408e;var _0x36809e=layui[_0x55e7e7(0x1cb)],_0x56027b=layui['layer'];_0x36809e[_0x55e7e7(0x1cc)]({'elem':_0x55e7e7(0x1cd),'accept':_0x55e7e7(0x1fa),'exts':_0x55e7e7(0x1ed),'multiple':!![],'auto':![],'choose':function(_0x399f76){const _0x5d118c=_0x55e7e7;_0x399f76[_0x5d118c(0x202)](function(_0x247e12,_0x16e37c,_0x5c248f){const _0x26ab35=_0x5d118c;let _0x2fd9a6=URL['createObjectURL'](_0x16e37c);$(_0x26ab35(0x201))[_0x26ab35(0x1c2)]('')[_0x26ab35(0x1ca)](_0x26ab35(0x1f3),'none'),$(_0x26ab35(0x207))[_0x26ab35(0x1ca)](_0x26ab35(0x1f3),_0x26ab35(0x206)),extractImagesFromPDF(_0x2fd9a6);});}});}));async function extractImagesFromPDF(_0xb1d5ef){const _0x5dbf71=_0x45408e;layer[_0x5dbf71(0x1cf)](0x3);const _0x1e99b0=await pdfjsLib[_0x5dbf71(0x1dd)](_0xb1d5ef)['promise'],_0x575425=_0x1e99b0['numPages'],_0x10ee39=[];for(let _0x2ca7f0=0x1;_0x2ca7f0<=_0x575425;_0x2ca7f0++){try{const _0x19406d=await _0x1e99b0[_0x5dbf71(0x1b8)](_0x2ca7f0),_0x57396e=await _0x19406d[_0x5dbf71(0x1d9)](),_0x2fe3c1=_0x57396e['argsArray'];for(let _0x5f0929=0x0;_0x5f0929<_0x57396e[_0x5dbf71(0x1bd)][_0x5dbf71(0x1f1)];_0x5f0929++){if(_0x57396e[_0x5dbf71(0x1bd)][_0x5f0929]===pdfjsLib[_0x5dbf71(0x1c8)][_0x5dbf71(0x1f5)]){const _0x300a8d=_0x2fe3c1[_0x5f0929][0x0],_0x1713b2=await _0x19406d[_0x5dbf71(0x1e3)][_0x5dbf71(0x208)](_0x300a8d);_0x1713b2&&imageDataToBlobUrl(_0x1713b2)[_0x5dbf71(0x1da)](_0x3b0907=>{const _0x561ed2=_0x5dbf71;let _0x928522=_0x561ed2(0x1bf);_0x928522+=_0x561ed2(0x1bf),_0x928522+='',_0x928522+='
![]()
console['error'](_0x5dbf71(0x1d2),_0x34a57a));}}}catch(_0x8d905e){console[_0x5dbf71(0x1b3)]('Error\x20processing\x20page\x20'+_0x2ca7f0+':',_0x8d905e);}}return layer['closeAll'](),_0x10ee39[_0x5dbf71(0x1f1)]<0x1&&layer[_0x5dbf71(0x1de)](_0x5dbf71(0x1ff),function(){const _0x461a3e=_0x5dbf71;location[_0x461a3e(0x1f7)]();}),_0x10ee39;}$(_0x45408e(0x1b0))['on'](_0x45408e(0x1d1),_0x45408e(0x1db),function(){const _0x233544=_0x45408e;$(this)['parent']()['parent']()[_0x233544(0x1fd)]()['remove']();}),$('body')['on']('click','.icoxiazai',function(){const _0x5a081e=_0x45408e;let _0x3875ce=$(this)['parent']()[_0x5a081e(0x1fd)]()['parent'](),_0x16ee0e=_0x3875ce[_0x5a081e(0x1d0)](_0x5a081e(0x1fc))[_0x5a081e(0x1d4)](_0x5a081e(0x1b2));saveAs(_0x16ee0e,'dowimg.png');}),$(_0x45408e(0x1b0))['on'](_0x45408e(0x1d1),_0x45408e(0x1b9),function(){const _0x2b700c=_0x45408e;let _0x587083=$(this)[_0x2b700c(0x1d4)]('src');layer[_0x2b700c(0x1c1)]({'type':0x1,'area':[get_alert_aotu_width(0x2a8),_0x2b700c(0x1c7)],'title':'查看圖片:','shade':0.6,'shadeClose':!![],'anim':0x0,'content':_0x2b700c(0x1bc)+_0x587083+_0x2b700c(0x1e2)});}),window['dow_zip']=function(){const _0xa3d0ce=_0x45408e;let _0x5da1d7=new Array();$(_0xa3d0ce(0x1e1))[_0xa3d0ce(0x1f8)](function(){const _0x17ece0=_0xa3d0ce;_0x5da1d7[_0x17ece0(0x1bb)]($(this)[_0x17ece0(0x1d4)](_0x17ece0(0x1b2)));});var _0x16e97e=new JSZip(),_0x5a3ba7=0x0;_0x5da1d7[_0xa3d0ce(0x1c4)](function(_0x4715d0,_0x32cd3b){const _0x2763f5=_0xa3d0ce;fetch(_0x4715d0)[_0x2763f5(0x1da)](function(_0x1d9873){return _0x1d9873['blob']();})[_0x2763f5(0x1da)](function(_0x50e560){const _0x278a59=_0x2763f5;_0x16e97e[_0x278a59(0x1fa)](_0x278a59(0x1e0)+_0x32cd3b+_0x278a59(0x1e5),_0x50e560),_0x5a3ba7++,_0x5a3ba7===_0x5da1d7[_0x278a59(0x1f1)]&&_0x16e97e[_0x278a59(0x1d5)]({'type':_0x278a59(0x1f9)})[_0x278a59(0x1da)](function(_0x58d5fa){const _0x989ebb=_0x278a59;var _0x30a777=URL[_0x989ebb(0x1c5)](_0x58d5fa);saveAs(_0x30a777,_0x989ebb(0x1fe)),URL[_0x989ebb(0x1e7)](_0x30a777);});})['catch'](function(_0x366ee7){const _0x46855d=_0x2763f5;console['error']('Error\x20fetching\x20blob:',_0x366ee7),layer[_0x46855d(0x1de)](_0x46855d(0x1f2));});});};function convertGrayscale1BPP(_0xe08373,_0x1cf5d7,_0x17b4f3){const _0x1e01a8=_0x45408e,_0x33c9a3=_0x1cf5d7*_0x17b4f3,_0xfba4b9=new Uint8ClampedArray(_0x33c9a3*0x4);let _0x23735e=0x0;for(let _0xec98bd=0x0;_0xec98bd<_0xe08373[_0x1e01a8(0x1f1)];_0xec98bd++){const _0x558998=_0xe08373[_0xec98bd];for(let _0x2c2b5b=0x7;_0x2c2b5b>=0x0;_0x2c2b5b--){if(_0x23735e>=_0x33c9a3)break;const _0x4a49e8=_0x558998>>_0x2c2b5b&0x1,_0x5be411=_0x4a49e8*0xff,_0x59ef44=_0x23735e*0x4;_0xfba4b9[_0x59ef44]=_0x5be411,_0xfba4b9[_0x59ef44+0x1]=_0x5be411,_0xfba4b9[_0x59ef44+0x2]=_0x5be411,_0xfba4b9[_0x59ef44+0x3]=0xff,_0x23735e++;}}return _0xfba4b9;}function convertRGB24BPP(_0x43c3d4){const _0xa594fe=_0x45408e,_0x54570c=new Uint8ClampedArray(_0x43c3d4[_0xa594fe(0x1f1)]/0x3*0x4);let _0x2abb0b=0x0;for(let _0x264c3a=0x0;_0x264c3a<_0x43c3d4['length'];_0x264c3a+=0x3){_0x54570c[_0x2abb0b++]=_0x43c3d4[_0x264c3a],_0x54570c[_0x2abb0b++]=_0x43c3d4[_0x264c3a+0x1],_0x54570c[_0x2abb0b++]=_0x43c3d4[_0x264c3a+0x2],_0x54570c[_0x2abb0b++]=0xff;}return _0x54570c;}async function imageDataToBlobUrl(_0x3c53e9){const _0x5bfad5=_0x45408e,{width:_0x155f23,height:_0x437095,kind:_0x53f014,data:_0x753168}=_0x3c53e9;let _0x25cd59;switch(_0x53f014){case 0x1:_0x25cd59=convertGrayscale1BPP(_0x753168,_0x155f23,_0x437095);break;case 0x2:_0x25cd59=convertRGB24BPP(_0x753168);break;case 0x3:_0x25cd59=_0x753168;break;default:throw new Error(_0x5bfad5(0x1c0)+_0x53f014);}const _0x20354c=_0x155f23*_0x437095*0x4;if(_0x25cd59['length']!==_0x20354c)throw new Error(_0x5bfad5(0x1d7)+_0x53f014+_0x5bfad5(0x204)+_0x20354c+_0x5bfad5(0x1f0)+_0x25cd59['length']);const _0x1eac17=document[_0x5bfad5(0x1e9)](_0x5bfad5(0x1ba));_0x1eac17[_0x5bfad5(0x1d3)]=_0x155f23,_0x1eac17['height']=_0x437095;const _0xd16a3b=_0x1eac17[_0x5bfad5(0x1d6)]('2d'),_0x4822f8=new ImageData(_0x25cd59,_0x155f23,_0x437095);return _0xd16a3b[_0x5bfad5(0x1ea)](_0x4822f8,0x0,0x0),new Promise(_0x2bc3b6=>{const _0x26a068=_0x5bfad5;_0x1eac17[_0x26a068(0x1c6)](_0x5f082a=>{const _0x2f4a63=_0x26a068,_0x3641e4=URL[_0x2f4a63(0x1c5)](_0x5f082a);_0x2bc3b6(_0x3641e4);},_0x26a068(0x200));});}