qa-regulatory-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/base64.js

2 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2023-11-07 10:04:37 +08:00
define(["exports"],(function(r){"use strict";var e=[],t=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,n=!1;function a(){n=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=r.length;o<a;++o)e[o]=r[o],t[r.charCodeAt(o)]=o;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63}function h(r,t,o){for(var n,a,h=[],c=t;c<o;c+=3)n=(r[c]<<16)+(r[c+1]<<8)+r[c+2],h.push(e[(a=n)>>18&63]+e[a>>12&63]+e[a>>6&63]+e[63&a]);return h.join("")}r.fromByteArray=function(r){var t;n||a();for(var o=r.length,c=o%3,d="",i=[],u=16383,A=0,f=o-c;A<f;A+=u)i.push(h(r,A,A+u>f?f:A+u));return 1===c?(t=r[o-1],d+=e[t>>2],d+=e[t<<4&63],d+="=="):2===c&&(t=(r[o-2]<<8)+r[o-1],d+=e[t>>10],d+=e[t>>4&63],d+=e[t<<2&63],d+="="),i.push(d),i.join("")},r.toByteArray=function(r){var e,h,c,d,i,u;n||a();var A=r.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===r[A-2]?2:"="===r[A-1]?1:0,u=new o(3*A/4-i),c=i>0?A-4:A;var f=0;for(e=0,h=0;e<c;e+=4,h+=3)d=t[r.charCodeAt(e)]<<18|t[r.charCodeAt(e+1)]<<12|t[r.charCodeAt(e+2)]<<6|t[r.charCodeAt(e+3)],u[f++]=d>>16&255,u[f++]=d>>8&255,u[f++]=255&d;return 2===i?(d=t[r.charCodeAt(e)]<<2|t[r.charCodeAt(e+1)]>>4,u[f++]=255&d):1===i&&(d=t[r.charCodeAt(e)]<<10|t[r.charCodeAt(e+1)]<<4|t[r.charCodeAt(e+2)]>>2,u[f++]=d>>8&255,u[f++]=255&d),u},Object.defineProperty(r,"__esModule",{value:!0})}));