{ "kind": "open-flow-workflow", "version": 1, "name": "Split Files from a ZIP Archive", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_28cd644a811e305b": { "name": "Run the example", "kind": "start", "inputDefs": [] }, "n_c7decb3d09db44fa": { "inputs": { "url": { "kind": "value", "value": "https://static.thomasmartens.eu/n8n/three_more_files.zip" } }, "name": "Download and split ZIP", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "outputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "files" } ], "name": "Download and split ZIP", "moduleId": "n_33f3cc970aacab2a", "capabilities": [ { "kind": "http", "hosts": [ "static.thomasmartens.eu" ] } ] } }, "n_2392485cfc2df6cd": { "name": "Extracted files", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "files" } ], "outputMappings": { "files": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_c7decb3d09db44fa", "output": "files" } ] } } } }, "edges": [ { "source": "n_28cd644a811e305b", "target": "n_c7decb3d09db44fa" }, { "source": "n_c7decb3d09db44fa", "target": "n_2392485cfc2df6cd" } ] } }, "modules": { "n_33f3cc970aacab2a": { "name": "Download and split ZIP", "imports": [], "source": "/* fflate 0.7.4 license:\nMIT License\n\nCopyright (c) 2020 Arjun Barrett\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nvar c=Uint8Array,D=Uint16Array,er=Uint32Array,ir=new c([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ar=new c([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yr=new c([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),or=function(r,n){for(var t=new D(31),e=0;e<31;++e)t[e]=n+=1<>>1|(o&21845)<<1,A=(A&52428)>>>2|(A&13107)<<2,A=(A&61680)>>>4|(A&3855)<<4,N[o]=((A&65280)>>>8|(A&255)<<8)>>>1;var A,o,Z=(function(r,n,t){for(var e=r.length,i=0,s=new D(n);i>>a]=f}else for(u=new D(e),i=0;i>>15-r[i]);return u}),k=new c(288);for(o=0;o<144;++o)k[o]=8;var o;for(o=144;o<256;++o)k[o]=9;var o;for(o=256;o<280;++o)k[o]=7;var o;for(o=280;o<288;++o)k[o]=8;var o,hr=new c(32);for(o=0;o<32;++o)hr[o]=5;var o;var xr=Z(k,9,1);var zr=Z(hr,5,1),q=function(r){for(var n=r[0],t=1;tn&&(n=r[t]);return n},w=function(r,n,t){var e=n/8|0;return(r[e]|r[e+1]<<8)>>(n&7)&t},H=function(r,n){var t=n/8|0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>(n&7)},Ar=function(r){return(r+7)/8|0},J=function(r,n,t){(n==null||n<0)&&(n=0),(t==null||t>r.length)&&(t=r.length);var e=new(r.BYTES_PER_ELEMENT==2?D:r.BYTES_PER_ELEMENT==4?er:c)(t-n);return e.set(r.subarray(n,t)),e};var Mr=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],m=function(r,n,t){var e=new Error(n||Mr[r]);if(e.code=r,Error.captureStackTrace&&Error.captureStackTrace(e,m),!t)throw e;return e},Tr=function(r,n,t){var e=r.length;if(!e||t&&t.f&&!t.l)return n||new c(0);var i=!n||t,s=!t||t.i;t||(t={}),n||(n=new c(e*3));var v=function(rr){var nr=n.length;if(rr>nr){var tr=new c(Math.max(nr*2,rr));tr.set(n),n=tr}},u=t.f||0,a=t.p||0,f=t.b||0,h=t.l,l=t.d,y=t.m,M=t.n,U=e*8;do{if(!h){u=w(r,a,1);var F=w(r,a+1,3);if(a+=3,F)if(F==1)h=xr,l=zr,y=9,M=5;else if(F==2){var L=w(r,a,31)+257,K=w(r,a+10,15)+4,Q=L+w(r,a+5,31)+1;a+=14;for(var B=new c(Q),P=new c(19),g=0;g>>4;if(p<16)B[g++]=p;else{var E=0,G=0;for(p==16?(G=3+w(r,a,3),a+=2,E=B[g-1]):p==17?(G=3+w(r,a,7),a+=3):p==18&&(G=11+w(r,a,127),a+=7);G--;)B[g++]=E}}var d=B.subarray(0,L),S=B.subarray(L);y=q(d),M=q(S),h=Z(d,y,1),l=Z(S,M,1)}else m(1);else{var p=Ar(a)+4,T=r[p-4]|r[p-3]<<8,O=p+T;if(O>e){s&&m(0);break}i&&v(f+T),n.set(r.subarray(p,O),f),t.b=f+=T,t.p=a=O*8,t.f=u;continue}if(a>U){s&&m(0);break}}i&&v(f+131072);for(var pr=(1<>>4;if(a+=E&15,a>U){s&&m(0);break}if(E||m(2),C<256)n[f++]=C;else if(C==256){$=a,h=null;break}else{var b=C-254;if(C>264){var g=C-257,I=ir[g];b=w(r,a,(1<>>4;R||m(3),a+=R&15;var S=mr[j];if(j>3){var I=ar[j];S+=H(r,a)&(1<U){s&&m(0);break}i&&v(f+131072);for(var _=f+b;f<_;f+=4)n[f]=n[f-S],n[f+1]=n[f+1-S],n[f+2]=n[f+2-S],n[f+3]=n[f+3-S];f=_}}t.l=h,t.p=$,t.b=f,t.f=u,h&&(u=1,t.m=y,t.d=l,t.n=M)}while(!u);return f==n.length?n:J(n,0,f)};var Sr=new c(0);var z=function(r,n){return r[n]|r[n+1]<<8},x=function(r,n){return(r[n]|r[n+1]<<8|r[n+2]<<16|r[n+3]<<24)>>>0},Y=function(r,n){return x(r,n)+x(r,n+4)*4294967296};function Ur(r,n){return Tr(r,n)}var W=typeof TextDecoder<\"u\"&&new TextDecoder,Dr=0;try{W.decode(Sr,{stream:!0}),Dr=1}catch{}var Er=function(r){for(var n=\"\",t=0;;){var e=r[t++],i=(e>127)+(e>223)+(e>239);if(t+i>r.length)return[n,J(r,t-1)];i?i==3?(e=((e&15)<<18|(r[t++]&63)<<12|(r[t++]&63)<<6|r[t++]&63)-65536,n+=String.fromCharCode(55296|e>>10,56320|e&1023)):i&1?n+=String.fromCharCode((e&31)<<6|r[t++]&63):n+=String.fromCharCode((e&15)<<12|(r[t++]&63)<<6|r[t++]&63):n+=String.fromCharCode(e)}};function Cr(r,n){if(n){for(var t=\"\",e=0;e65558)&&m(13);var i=z(r,e+8);if(!i)return{};var s=x(r,e+16),v=s==4294967295||i==65535;if(v){var u=x(r,e-12);v=x(r,u)==101075792,v&&(i=x(r,u+32),s=x(r,u+48))}for(var a=n&&n.filter,f=0;f!i.endsWith(\"/\")).map(([i,s])=>({fileName:i,data:{name:i,mimeType:/\\.jpe?g$/i.test(i)?\"image/jpeg\":\"application/octet-stream\",contentBase64:Zr.from(s).toString(\"base64\")}}))}}export{kr as default};\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }