icegl-three-vue-tres/dist/static/shadertoyMaterial-c7f0e973.js
hawk86104 cc7a5a656a Merge branch 'master' into online
# Conflicts:
#	.fes.js
2023-12-04 19:58:17 +08:00

2 lines
33 KiB
JavaScript

var Ge=Object.defineProperty;var ue=Object.getOwnPropertySymbols;var Ke=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var fe=(e,t,n)=>t in e?Ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$=(e,t)=>{for(var n in t||(t={}))Ke.call(t,n)&&fe(e,n,t[n]);if(ue)for(var n of ue(t))We.call(t,n)&&fe(e,n,t[n]);return e};import{bL as Xe,aE as Ae,Y as Ze,ae as Qe,Z as de,az as Ye,bK as et,b3 as tt,bM as G,bo as nt,bN as rt,b8 as st,a2 as ot,a4 as it,o as at,s as ct,B as lt,a5 as ut,I as D,a6 as ft,aP as dt,U as P,a as pt,a7 as ht,a8 as mt,a9 as yt}from"./vendor-76c85ed2.js";import{C as wt}from"./vanilla-307d3a93.esm-959fd761.js";import"./_commonjsHelpers-725317a4.js";class re{constructor(t,n){const r=re.replaceVariable(t),s=new wt({baseMaterial:Xe,vertexShader:" \n varying vec2 vUv;\n void main() {\n csm_Position = position * vec3(1.0);\n vUv = uv;\n } ",fragmentShader:r,side:Ae,uniforms:n.material.uniforms});this.material=s,console.log(this.material)}static replaceVariable(t){return t="varying vec2 vUv;\n"+t,/iTime|iTimeDelta/g.test(t)&&(t="varying vec2 vUv;\nuniform float utime;\n"+t.split("varying vec2 vUv;\n")[1],t=t.replace(/iTime|iTimeDelta/g,"utime")),/iResolution\.[a-zA-Z_]+/g.test(t)&&(t="varying vec2 vUv;\nuniform vec2 uresolution;\n"+t.split("varying vec2 vUv;\n")[1],t=t.replace(/iResolution\.[a-zA-Z_]+/g,"1."),t=t.replace(/iResolution/g,"1.")),/iChannel0|iChannel1|iChannel2|iChannel3/g.test(t)&&(t="varying vec2 vUv;\nuniform sampler2D utexture;\n"+t.split("varying vec2 vUv;\n")[1],t=t.replace(/iChannel0|iChannel1|iChannel2|iChannel3/g,"utexture")),t.replace(/iMouse/g,"umouse"),t.replace(/void mainImage\( out vec4 fragColor, in vec2 fragCoord \)/g,"void main()").replace(/fragColor/g,"csm_DiffuseColor").replace(/fragCoord/g,"vUv")}}function xe(e,t){return function(){return e.apply(t,arguments)}}const{toString:bt}=Object.prototype,{getPrototypeOf:se}=Object,M=(e=>t=>{const n=bt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),x=e=>(e=e.toLowerCase(),t=>M(t)===e),I=e=>t=>typeof t===e,{isArray:_}=Array,B=I("undefined");function Et(e){return e!==null&&!B(e)&&e.constructor!==null&&!B(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Te=x("ArrayBuffer");function gt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Te(e.buffer),t}const Rt=I("string"),O=I("function"),Ce=I("number"),q=e=>e!==null&&typeof e=="object",St=e=>e===!0||e===!1,L=e=>{if(M(e)!=="object")return!1;const t=se(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ot=x("Date"),At=x("File"),xt=x("Blob"),Tt=x("FileList"),Ct=e=>q(e)&&O(e.pipe),Pt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=M(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))},Nt=x("URLSearchParams"),_t=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function F(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),_(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function Pe(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Ne=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),_e=e=>!B(e)&&e!==Ne;function Q(){const{caseless:e}=_e(this)&&this||{},t={},n=(r,s)=>{const o=e&&Pe(t,s)||s;L(t[o])&&L(r)?t[o]=Q(t[o],r):L(r)?t[o]=Q({},r):_(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&F(arguments[r],n);return t}const vt=(e,t,n,{allOwnKeys:r}={})=>(F(t,(s,o)=>{n&&O(s)?e[o]=xe(s,n):e[o]=s},{allOwnKeys:r}),e),Bt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ft=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ut=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&se(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Dt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Lt=e=>{if(!e)return null;if(_(e))return e;let t=e.length;if(!Ce(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&se(Uint8Array)),kt=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Ht=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Mt=x("HTMLFormElement"),It=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),pe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qt=x("RegExp"),ve=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};F(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},zt=e=>{ve(e,(t,n)=>{if(O(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(O(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Jt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return _(e)?r(e):r(String(e).split(t)),n},Vt=()=>{},$t=(e,t)=>(e=+e,Number.isFinite(e)?e:t),K="abcdefghijklmnopqrstuvwxyz",he="0123456789",Be={DIGIT:he,ALPHA:K,ALPHA_DIGIT:K+K.toUpperCase()+he},Gt=(e=16,t=Be.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Kt(e){return!!(e&&O(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Wt=e=>{const t=new Array(10),n=(r,s)=>{if(q(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=_(r)?[]:{};return F(r,(i,c)=>{const d=n(i,s+1);!B(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},Xt=x("AsyncFunction"),Zt=e=>e&&(q(e)||O(e))&&O(e.then)&&O(e.catch),a={isArray:_,isArrayBuffer:Te,isBuffer:Et,isFormData:Pt,isArrayBufferView:gt,isString:Rt,isNumber:Ce,isBoolean:St,isObject:q,isPlainObject:L,isUndefined:B,isDate:Ot,isFile:At,isBlob:xt,isRegExp:qt,isFunction:O,isStream:Ct,isURLSearchParams:Nt,isTypedArray:jt,isFileList:Tt,forEach:F,merge:Q,extend:vt,trim:_t,stripBOM:Bt,inherits:Ft,toFlatObject:Ut,kindOf:M,kindOfTest:x,endsWith:Dt,toArray:Lt,forEachEntry:kt,matchAll:Ht,isHTMLForm:Mt,hasOwnProperty:pe,hasOwnProp:pe,reduceDescriptors:ve,freezeMethods:zt,toObjectSet:Jt,toCamelCase:It,noop:Vt,toFiniteNumber:$t,findKey:Pe,global:Ne,isContextDefined:_e,ALPHABET:Be,generateString:Gt,isSpecCompliantForm:Kt,toJSONObject:Wt,isAsyncFn:Xt,isThenable:Zt};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fe=m.prototype,Ue={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ue[e]={value:e}});Object.defineProperties(m,Ue);Object.defineProperty(Fe,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,o)=>{const i=Object.create(Fe);return a.toFlatObject(e,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Qt=null;function Y(e){return a.isPlainObject(e)||a.isArray(e)}function De(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function me(e,t,n){return e?e.concat(t).map(function(s,o){return s=De(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Yt(e){return a.isArray(e)&&!e.some(Y)}const en=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function z(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,E){return!a.isUndefined(E[p])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function h(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(!d&&a.isBlob(f))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?d&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,p,E){let y=f;if(f&&!E&&typeof f=="object"){if(a.endsWith(p,"{}"))p=r?p:p.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&Yt(f)||(a.isFileList(f)||a.endsWith(p,"[]"))&&(y=a.toArray(f)))return p=De(p),y.forEach(function(R,V){!(a.isUndefined(R)||R===null)&&t.append(i===!0?me([p],V,o):i===null?p:p+"[]",h(R))}),!1}return Y(f)?!0:(t.append(me(E,p,o),h(f)),!1)}const l=[],w=Object.assign(en,{defaultVisitor:u,convertValue:h,isVisitable:Y});function g(f,p){if(!a.isUndefined(f)){if(l.indexOf(f)!==-1)throw Error("Circular reference detected in "+p.join("."));l.push(f),a.forEach(f,function(y,S){(!(a.isUndefined(y)||y===null)&&s.call(t,y,a.isString(S)?S.trim():S,p,w))===!0&&g(y,p?p.concat(S):[S])}),l.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return g(e),t}function ye(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function oe(e,t){this._pairs=[],e&&z(e,this,t)}const Le=oe.prototype;Le.append=function(t,n){this._pairs.push([t,n])};Le.toString=function(t){const n=t?function(r){return t.call(this,r,ye)}:ye;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function tn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function je(e,t,n){if(!t)return e;const r=n&&n.encode||tn,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new oe(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class nn{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const we=nn,ke={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rn=typeof URLSearchParams<"u"?URLSearchParams:oe,sn=typeof FormData<"u"?FormData:null,on=typeof Blob<"u"?Blob:null,an={isBrowser:!0,classes:{URLSearchParams:rn,FormData:sn,Blob:on},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",cn=(e=>He&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),ln=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),un=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:cn,hasStandardBrowserWebWorkerEnv:ln},Symbol.toStringTag,{value:"Module"})),A=$($({},un),an);function fn(e,t){return z(e,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return A.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function dn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function pn(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Me(e){function t(n,r,s,o){let i=n[o++];const c=Number.isFinite(+i),d=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=pn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(dn(r),s,n,0)}),n}return null}function hn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ie={transitional:ke,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s&&s?JSON.stringify(Me(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return fn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return z(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),hn(t)):t}],transformResponse:[function(t){const n=this.transitional||ie.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{ie.headers[e]={}});const ae=ie,mn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yn=e=>{const t={};let n,r,s;return e&&e.split("\n").forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&mn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},be=Symbol("internals");function v(e){return e&&String(e).trim().toLowerCase()}function j(e){return e===!1||e==null?e:a.isArray(e)?e.map(j):String(e)}function wn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const bn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function W(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function En(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function gn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class J{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,d,h){const u=v(d);if(!u)throw new Error("header name must be a non-empty string");const l=a.findKey(s,u);(!l||s[l]===void 0||h===!0||h===void 0&&s[l]!==!1)&&(s[l||d]=j(c))}const i=(c,d)=>a.forEach(c,(h,u)=>o(h,u,d));return a.isPlainObject(t)||t instanceof this.constructor?i(t,n):a.isString(t)&&(t=t.trim())&&!bn(t)?i(yn(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=v(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return wn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=v(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||W(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=v(i),i){const c=a.findKey(r,i);c&&(!n||W(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||W(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=j(s),delete n[o];return}const c=t?En(o):String(o).trim();c!==o&&delete n[o],n[c]=j(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[be]=this[be]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=v(i);r[c]||(gn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}J.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(J.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(J);const T=J;function X(e,t){const n=this||ae,r=t||n,s=T.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ie(e){return!!(e&&e.__CANCEL__)}function U(e,t,n){m.call(this,e==null?"canceled":e,m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(U,m,{__CANCEL__:!0});function Rn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Sn=A.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function On(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function An(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function qe(e,t){return e&&!On(t)?An(e,t):t}const xn=A.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function Tn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),u=r[o];i||(i=h),n[s]=d,r[s]=h;let l=o,w=0;for(;l!==s;)w+=n[l++],l=l%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),h-i<t)return;const g=u&&h-u;return g?Math.round(w*1e3/g):void 0}}function Ee(e,t){let n=0;const r=Cn(50,250);return s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,c=o-n,d=r(c),h=o<=i;n=o;const u={loaded:o,total:i,progress:i?o/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&h?(i-o)/d:void 0,event:s};u[t?"download":"upload"]=!0,e(u)}}const Pn=typeof XMLHttpRequest<"u",Nn=Pn&&function(e){return new Promise(function(n,r){let s=e.data;const o=T.from(e.headers).normalize();let{responseType:i,withXSRFToken:c}=e,d;function h(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}let u;if(a.isFormData(s)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((u=o.getContentType())!==!1){const[p,...E]=u?u.split(";").map(y=>y.trim()).filter(Boolean):[];o.setContentType([p||"multipart/form-data",...E].join("; "))}}let l=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(p+":"+E))}const w=qe(e.baseURL,e.url);l.open(e.method.toUpperCase(),je(w,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function g(){if(!l)return;const p=T.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),y={data:!i||i==="text"||i==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:e,request:l};Rn(function(R){n(R),h()},function(R){r(R),h()},y),l=null}if("onloadend"in l?l.onloadend=g:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(g)},l.onabort=function(){l&&(r(new m("Request aborted",m.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let E=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||ke;e.timeoutErrorMessage&&(E=e.timeoutErrorMessage),r(new m(E,y.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,l)),l=null},A.hasStandardBrowserEnv&&(c&&a.isFunction(c)&&(c=c(e)),c||c!==!1&&xn(w))){const p=e.xsrfHeaderName&&e.xsrfCookieName&&Sn.read(e.xsrfCookieName);p&&o.set(e.xsrfHeaderName,p)}s===void 0&&o.setContentType(null),"setRequestHeader"in l&&a.forEach(o.toJSON(),function(E,y){l.setRequestHeader(y,E)}),a.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),i&&i!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",Ee(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",Ee(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=p=>{l&&(r(!p||p.type?new U(null,e,l):p),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d)));const f=Tn(w);if(f&&A.protocols.indexOf(f)===-1){r(new m("Unsupported protocol "+f+":",m.ERR_BAD_REQUEST,e));return}l.send(s||null)})},ee={http:Qt,xhr:Nn};a.forEach(ee,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const ge=e=>"- ".concat(e),_n=e=>a.isFunction(e)||e===null||e===!1,ze={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!_n(n)&&(r=ee[(i=String(n)).toLowerCase()],r===void 0))throw new m("Unknown adapter '".concat(i,"'"));if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,d])=>"adapter ".concat(c," ")+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?"since :\n"+o.map(ge).join("\n"):" "+ge(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:ee};function Z(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new U(null,e)}function Re(e){return Z(e),e.headers=T.from(e.headers),e.data=X.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ze.getAdapter(e.adapter||ae.adapter)(e).then(function(r){return Z(e),r.data=X.call(e,e.transformResponse,r),r.headers=T.from(r.headers),r},function(r){return Ie(r)||(Z(e),r&&r.response&&(r.response.data=X.call(e,e.transformResponse,r.response),r.response.headers=T.from(r.response.headers))),Promise.reject(r)})}const Se=e=>e instanceof T?e.toJSON():e;function N(e,t){t=t||{};const n={};function r(h,u,l){return a.isPlainObject(h)&&a.isPlainObject(u)?a.merge.call({caseless:l},h,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(h,u,l){if(a.isUndefined(u)){if(!a.isUndefined(h))return r(void 0,h,l)}else return r(h,u,l)}function o(h,u){if(!a.isUndefined(u))return r(void 0,u)}function i(h,u){if(a.isUndefined(u)){if(!a.isUndefined(h))return r(void 0,h)}else return r(void 0,u)}function c(h,u,l){if(l in t)return r(h,u);if(l in e)return r(void 0,h)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(h,u)=>s(Se(h),Se(u),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(u){const l=d[u]||s,w=l(e[u],t[u],u);a.isUndefined(w)&&l!==c||(n[u]=w)}),n}const Je="1.6.2",ce={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ce[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Oe={};ce.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Je+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new m(s(i," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!Oe[i]&&(Oe[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function vn(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],d=c===void 0||i(c,o,e);if(d!==!0)throw new m("option "+o+" must be "+d,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const te={assertOptions:vn,validators:ce},C=te.validators;class H{constructor(t){this.defaults=t,this.interceptors={request:new we,response:new we}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=N(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&te.assertOptions(r,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:te.assertOptions(s,{encode:C.function,serialize:C.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),n.headers=T.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(d=d&&p.synchronous,c.unshift(p.fulfilled,p.rejected))});const h=[];this.interceptors.response.forEach(function(p){h.push(p.fulfilled,p.rejected)});let u,l=0,w;if(!d){const f=[Re.bind(this),void 0];for(f.unshift.apply(f,c),f.push.apply(f,h),w=f.length,u=Promise.resolve(n);l<w;)u=u.then(f[l++],f[l++]);return u}w=c.length;let g=n;for(l=0;l<w;){const f=c[l++],p=c[l++];try{g=f(g)}catch(E){p.call(this,E);break}}try{u=Re.call(this,g)}catch(f){return Promise.reject(f)}for(l=0,w=h.length;l<w;)u=u.then(h[l++],h[l++]);return u}getUri(t){t=N(this.defaults,t);const n=qe(t.baseURL,t.url);return je(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){H.prototype[t]=function(n,r){return this.request(N(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(N(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}H.prototype[t]=n(),H.prototype[t+"Form"]=n(!0)});const k=H;class le{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new U(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new le(function(s){t=s}),cancel:t}}}const Bn=le;function Fn(e){return function(n){return e.apply(null,n)}}function Un(e){return a.isObject(e)&&e.isAxiosError===!0}const ne={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ne).forEach(([e,t])=>{ne[t]=e});const Dn=ne;function Ve(e){const t=new k(e),n=xe(k.prototype.request,t);return a.extend(n,k.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ve(N(e,s))},n}const b=Ve(ae);b.Axios=k;b.CanceledError=U;b.CancelToken=Bn;b.isCancel=Ie;b.VERSION=Je;b.toFormData=z;b.AxiosError=m;b.Cancel=b.CanceledError;b.all=function(t){return Promise.all(t)};b.spread=Fn;b.isAxiosError=Un;b.mergeConfig=N;b.AxiosHeaders=T;b.formToJSON=e=>Me(a.isHTMLForm(e)?new FormData(e):e);b.getAdapter=ze.getAdapter;b.HttpStatusCode=Dn;b.default=b;const Ln=b,jn={ref:"perspectiveCameraRef",position:[300,250,-122],fov:45,near:1,far:1e4},kn=P("TresAmbientLight",{color:"#ffffff"},null,-1),Hn=P("TresDirectionalLight",{position:[100,100,0],intensity:.5,color:"#ffffff"},null,-1),Mn=["object","side"],In=P("TresAxesHelper",{args:[1e3],position:[0,19,0]},null,-1),qn=P("TresGridHelper",{args:[6e3,100],position:[0,19,0]},null,-1),Gn=Ze({__name:"shadertoyMaterial",async setup(e){let t,n;const r={clearColor:"#000000",shadows:!0,alpha:!1,useLegacyLights:!0},s={autoRotate:!0,enableDamping:!0},o=new Qe({title:"参数"}),i=de({addres:"https://www.shadertoy.com/view/mtyGWy",shadervalue:""});let c=([t,n]=Ye(()=>dt(["./plugins/earthSample/image/earthA/moon_ring.png"])),t=await t,n(),t),d=new et,h=de({material:{uniforms:{utime:{value:0},uresolution:{value:new tt(40,40)},utexture:{value:c}}}}),u=new G(100,100,100);o.addBlade({view:"list",label:"shadertoy在线地址",parse:y=>String(y),options:[{text:"1",value:"https://www.shadertoy.com/view/mtyGWy"},{text:"2",value:"https://www.shadertoy.com/view/tlVGDt"},{text:"3",value:"https://www.shadertoy.com/view/ttKGDt"}],value:"https://www.shadertoy.com/view/mtyGWy"}).on("change",y=>{i.addres=y.value,f(u)});let l=new G(100,100,100),w=new nt(100,100),g=new rt(100,10,100,16);o.addBlade({view:"list",label:"几何体",options:[{text:"BOX",value:l},{text:"Plane",value:w},{text:"TorusKnot",value:g}],value:l}).on("change",y=>{u=y.value,f(u)});const f=y=>{let S="https://www.shadertoy.com/api/v1/shaders/"+i.addres.split("https://www.shadertoy.com/view/")[1]+"?key=BdHlhH";Ln.get(S).then(function(R){R.data.Error&&alert(R.data.Error),i.shadervalue=R.data.Shader.renderpass[0].code;let V=new re(i.shadervalue,h);d.clear();let $e=new st(y,V.material);d.add($e),p(d,y)}).catch(function(R){console.log(R)})},p=(y,S)=>{y.children[0].geometry.dispose(),y.children[0].geometry=S},{onLoop:E}=ot();return E(({delta:y})=>{h.material.uniforms.utime.value+=y}),it(()=>{let y=new G(100,100,100);f(y)}),(y,S)=>(at(),ct(D(ft),ut(r,{"window-size":""}),{default:lt(()=>[P("TresPerspectiveCamera",jn,null,512),pt(D(yt),ht(mt(s)),null,16),kn,Hn,P("primitive",{object:D(d),side:D(Ae)},null,8,Mn),In,qn]),_:1},16))}});export{Gn as default};