mirror of
https://github.com/exogen/t2-model-skinner.git
synced 2026-01-19 19:24:44 +00:00
1 line
3 KiB
JavaScript
1 line
3 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78631,(e,t,n)=>{!function(t,n){if("function"==typeof define&&define.amd){let t;void 0!==(t=n())&&e.v(t)}else n()}(e.e,function(){"use strict";function n(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){s(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:e.g.global===e.g?e.g:void 0,r=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(e,t,r){var s=i.URL||i.webkitURL,c=document.createElement("a");c.download=t=t||e.name||"download",c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?a(c):o(c.href)?n(e,t,r):a(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(c.href)},4e4),setTimeout(function(){a(c)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download","string"!=typeof e){var r;navigator.msSaveOrOpenBlob((void 0===(r=i)?r={autoBom:!1}:"object"!=typeof r&&(console.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e),t)}else if(o(e))n(e,t,i);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout(function(){a(s)})}}:function(e,t,o,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,o);var s="application/octet-stream"===e.type,c=/constructor/i.test(i.HTMLElement)||i.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&c||r)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},u.readAsDataURL(e)}else{var f=i.URL||i.webkitURL,d=f.createObjectURL(e);a?a.location=d:location.href=d,a=null,setTimeout(function(){f.revokeObjectURL(d)},4e4)}});i.saveAs=s.saveAs=s,t.exports=s})},69642,e=>{"use strict";e.s(["createZipFile",()=>o,"savePngFile",()=>i,"saveZipFile",()=>a]);var t=e.i(71315),n=e.i(78631);function o(e){let n=new t.default;for(let t of e)n.file("textures/skins/".concat(t.name),t.data);return n}async function a(e,t){let o=await e.generateAsync({type:"blob"});(0,n.saveAs)(o,t)}function i(e,t){(0,n.saveAs)(e,t)}}]); |