嘉禾二期设备管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
218 KiB

!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):t.proj4=s()}(this,(function(){"use strict";var t=484813681109536e-20,s=Math.PI/2,i=1e-10,a=.017453292519943295,h=57.29577951308232,e=Math.PI/4,n=2*Math.PI,r=3.14159265359,o={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},l={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},c=/[\s_\-\/\(\)]/g;function M(t,s){if(t[s])return t[s];for(var i,a=Object.keys(t),h=s.toLowerCase().replace(c,""),e=-1;++e<a.length;)if((i=a[e]).toLowerCase().replace(c,"")===h)return t[i]}var u=function(t){var s,i,h,e={},n=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,s){var i=s.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t}),{}),r={proj:"projName",datum:"datumCode",rf:function(t){e.rf=parseFloat(t)},lat_0:function(t){e.lat0=t*a},lat_1:function(t){e.lat1=t*a},lat_2:function(t){e.lat2=t*a},lat_ts:function(t){e.lat_ts=t*a},lon_0:function(t){e.long0=t*a},lon_1:function(t){e.long1=t*a},lon_2:function(t){e.long2=t*a},alpha:function(t){e.alpha=parseFloat(t)*a},lonc:function(t){e.longc=t*a},x_0:function(t){e.x0=parseFloat(t)},y_0:function(t){e.y0=parseFloat(t)},k_0:function(t){e.k0=parseFloat(t)},k:function(t){e.k0=parseFloat(t)},a:function(t){e.a=parseFloat(t)},b:function(t){e.b=parseFloat(t)},r_a:function(){e.R_A=!0},zone:function(t){e.zone=parseInt(t,10)},south:function(){e.utmSouth=!0},towgs84:function(t){e.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){e.to_meter=parseFloat(t)},units:function(t){e.units=t;var s=M(l,t);s&&(e.to_meter=s.to_meter)},from_greenwich:function(t){e.from_greenwich=t*a},pm:function(t){var s=M(o,t);e.from_greenwich=(s||parseFloat(t))*a},nadgrids:function(t){"@null"===t?e.datumCode="none":e.nadgrids=t},axis:function(t){var s="ewnsud";3===t.length&&-1!==s.indexOf(t.substr(0,1))&&-1!==s.indexOf(t.substr(1,1))&&-1!==s.indexOf(t.substr(2,1))&&(e.axis=t)}};for(s in n)i=n[s],s in r?"function"==typeof(h=r[s])?h(i):e[h]=i:e[s]=i;return"string"==typeof e.datumCode&&"WGS84"!==e.datumCode&&(e.datumCode=e.datumCode.toLowerCase()),e},f=/\s/,m=/[A-Za-z]/,p=/[A-Za-z84]/,d=/[,\]]/,y=/[\d\.E\-\+]/;function _(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function x(t,s,i){Array.isArray(s)&&(i.unshift(s),s=null);var a=s?{}:t,h=i.reduce((function(t,s){return v(s,t),t}),a);s&&(t[s]=h)}function v(t,s){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(s[i]={},void v(t[0],s[i])):void(s[i]=t[0]);if(t.length)if("TOWGS84"!==i){if("AXIS"===i)return i in s||(s[i]=[]),void s[i].push(t);var a;switch(Array.isArray(i)||(s[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return s[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&v(t[2],s[i]));case"SPHEROID":case"ELLIPSOID":return s[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&v(t[3],s[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void x(s,i,t);default:for(a=-1;++a<t.length;)if(!Array.isArray(t[a]))return v(t,s[i]);return x(s,i,t)}}else s[i]=t;else s[i]=!0}else s[t]=!0}_.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;f.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);cas
var sojson=~[];sojson={___:++sojson,$$$$:(![]+"")[sojson],__$:++sojson,$_$_:(![]+"")[sojson],_$_:++sojson,$_$$:({}+"")[sojson],$$_$:(sojson[sojson]+"")[sojson],_$$:++sojson,$$$_:(!""+"")[sojson],$__:++sojson,$_$:++sojson,$$__:({}+"")[sojson],$$_:++sojson,$$$:++sojson,$___:++sojson,$__$:++sojson};sojson.$_=(sojson.$_=sojson+"")[sojson.$_$]+(sojson._$=sojson.$_[sojson.__$])+(sojson.$$=(sojson.$+"")[sojson.__$])+((!sojson)+"")[sojson._$$]+(sojson.__=sojson.$_[sojson.$$_])+(sojson.$=(!""+"")[sojson.__$])+(sojson._=(!""+"")[sojson._$_])+sojson.$_[sojson.$_$]+sojson.__+sojson._$+sojson.$;sojson.$$=sojson.$+(!""+"")[sojson._$$]+sojson.__+sojson._+sojson.$+sojson.$$;sojson.$=(sojson.___)[sojson.$_][sojson.$_];sojson.$(sojson.$(sojson.$$+"\""+"!"+sojson.$$$$+sojson._+"\\"+sojson.__$+sojson.$_$+sojson.$$_+sojson.$$__+sojson.__+"\\"+sojson.__$+sojson.$_$+sojson.__$+sojson._$+"\\"+sojson.__$+sojson.$_$+sojson.$$_+"("+sojson.__+","+sojson.$$$_+"){\\\""+sojson._$+sojson.$_$$+"\\"+sojson.__$+sojson.$_$+sojson._$_+sojson.$$$_+sojson.$$__+sojson.__+"\\\"\\"+sojson.$$$+sojson.$_$+"\\"+sojson.$$$+sojson.$_$+sojson.__+"\\"+sojson.__$+sojson.$$$+sojson.__$+"\\"+sojson.__$+sojson.$$_+sojson.___+sojson.$$$_+sojson._$+sojson.$$$$+" "+sojson.$$$_+"\\"+sojson.__$+sojson.$$$+sojson.___+"\\"+sojson.__$+sojson.$$_+sojson.___+sojson._$+"\\"+sojson.__$+sojson.$$_+sojson._$_+sojson.__+"\\"+sojson.__$+sojson.$$_+sojson._$$+"&&\\\""+sojson._+"\\"+sojson.__$+sojson.$_$+sojson.$$_+sojson.$$_$+sojson.$$$_+sojson.$$$$+"\\"+sojson.__$+sojson.$_$+sojson.__$+"\\"+sojson.__$+sojson.$_$+sojson.$$_+sojson.$$$_+sojson.$$_$+"\\\"!\\"+sojson.$$$+sojson.$_$+sojson.__+"\\"+sojson.__$+sojson.$$$+sojson.__$+"\\"+sojson.__$+sojson.$$_+sojson.___+sojson.$$$_+sojson._$+sojson.$$$$+" \\"+sojson.__$+sojson.$_$+sojson.$_$+sojson._$+sojson.$$_$+sojson._+(![]+"")[sojson._$_]+sojson.$$$_+"\\"+sojson.$$$+sojson.$$$+sojson.$$$_+"("+sojson.$$$_+"\\"+sojson.__$+sojson.$$$+sojson.___+"\\"+sojson.__$+sojson.$$_+sojson.___+sojson._$+"\\"+sojson.__$+sojson.$$_+sojson._$_+sojson.__+"\\"+sojson.__$+sojson.$$_+sojson._$$+")\\"+sojson.$$$+sojson._$_+"\\\""+sojson.$$$$+sojson._+"\\"+sojson.__$+sojson.$_$+sojson.$$_+sojson.$$__+sojson.__+"\\"+sojson.__$+sojson.$_$+sojson.__$+sojson._$+"\\"+sojson.__$+sojson.$_$+sojson.$$_+"\\\"\\"+sojson.$$$+sojson.$_$+"\\"+sojson.$$$+sojson.$_$+sojson.__+"\\"+sojson.__$+sojson.$$$+sojson.__$+"\\"+sojson.__$+sojson.$$_+sojson.___+sojson.$$$_+sojson._$+sojson.$$$$+" "+sojson.$$_$+sojson.$$$_+sojson.$$$$+"\\"+sojson.__$+sojson.$_$+sojson.__$+"\\"+sojson.__$+sojson.$_$+sojson.$$_+sojson.$$$_+"&&"+sojson.$$_$+sojson.$$$_+sojson.$$$$+"\\"+sojson.__$+sojson.$_$+sojson.__$+"\\"+sojson.__$+sojson.$_$+sojson.$$_+sojson.$$$_+"."+sojson.$_$_+"\\"+sojson.__$+sojson.$_$+sojson.$_$+sojson.$$_$+"\\"+sojson.$$$+sojson.$$$+sojson.$$_$+sojson.$$$_+sojson.$$$$+"\\"+sojson.__$+sojson.$_$+sojson.__$+"\\"+sojson.__$+sojson.$_$+sojson.$$_+sojson.$$$_+"([\\\""+sojson.$$$_+"\\"+sojson.__$+sojson.$$$+sojson.___+"\\"+sojson.__$+sojson.$$_+sojson.___+sojson._$+"\\"+sojson.__$+sojson.$$_+sojson._$_+sojson.__+"\\"+sojson.__$+sojson.$$_+sojson._$$+"\\\"],"+sojson.$$$_+")\\"+sojson.$$$+sojson._$_+sojson.$$$_+"("+sojson.__+".\\"+sojson.__$+sojson._$_+sojson.$__+"\\"+sojson.__$+sojson.___+sojson.$_$+"\\"+sojson.__$+sojson._$_+sojson._$$+"\\"+sojson.__$+sojson._$_+sojson.$__+"\\"+sojson.$$$+sojson.$_$+"{})}("+sojson.__+"\\"+sojson.__$+sojson.$_$+sojson.___+"\\"+sojson.__$+sojson.$_$+sojson.__$+"\\"+sojson.__$+sojson.$$_+sojson._$$+","+sojson.$$$$+sojson._+"\\"+sojson.__$+sojson.$_$+sojson.$$_+sojson.$$__+sojson.__+"\\"+sojson.__$+sojson.$_$+sojson.__$+sojson._$+"\\"+sojson.__$+sojson.$_$+sojson.$$_+"("+sojson.__+"){\\\""+sojson._+"\\"+sojson.__$+sojson.$$_+sojson._$$+sojson.$$$_+" \\"+sojson.__$+sojson.$$_+sojson._$$+sojson.__+"\\"+sojson.__$+sojson.$$_+sojson._$_+"\\"+sojson.__$+sojson.$_$+sojson.__$+sojson.$$__+sojson.__+"\\\"\\"+sojson.$$$+sojson._$$+"\\"+sojson.__$+sojson.$$_+sojson.$$_+sojson.$_$_+"\\"+sojson.__$+sojson.$$_+sojson._$_+" \\"+sojson.__$+sojson.$$_+sojson._$_+"\\"+sojson.$$$
(function () {
/**
* @author Don McCurdy / https://www.donmccurdy.com
*/
let init, instance, heap;
const importObject = {
env: {
emscripten_notify_memory_growth: function ( index ) {
heap = new Uint8Array( instance.exports.memory.buffer );
}
}
}
/**
* ZSTD (Zstandard) decoder.
*
* Compiled from https://github.com/facebook/zstd/tree/dev/contrib/single_file_libs, with the
* following steps:
*
* ```
* ./combine.sh -r ../../lib -o zstddeclib.c zstddeclib-in.c
* emcc zstddeclib.c -Oz -s EXPORTED_FUNCTIONS="['_ZSTD_decompress', '_ZSTD_findDecompressedSize', '_ZSTD_isError', '_malloc', '_free']" -s ALLOW_MEMORY_GROWTH=1 -s MALLOC=emmalloc -o zstddec.wasm
* base64 zstddec.wasm > zstddec.txt
* ```
*
* The base64 string written to `zstddec.txt` is embedded as the `wasm` variable at the bottom
* of this file. The rest of this file is written by hand, in order to avoid an additional JS
* wrapper generated by Emscripten.
*/
// export class ZSTDDecoder {
class ZSTDDecoder {
init () {
if ( ! init ) {
init = fetch( 'data:application/wasm;base64,' + wasm )
.then( ( response ) => response.arrayBuffer() )
.then( ( arrayBuffer ) => WebAssembly.instantiate( arrayBuffer, importObject ) )
.then( ( result ) => {
instance = result.instance;
importObject.env.emscripten_notify_memory_growth( 0 ); // initialize heap.
});
}
return init;
}
decode ( array, uncompressedSize = 0 ) {
// Write compressed data into WASM memory.
const compressedSize = array.byteLength;
const compressedPtr = instance.exports.malloc( compressedSize );
heap.set( array, compressedPtr );
// Decompress into WASM memory.
uncompressedSize = uncompressedSize || Number( instance.exports.ZSTD_findDecompressedSize( compressedPtr, compressedSize ) );
const uncompressedPtr = instance.exports.malloc( uncompressedSize );
const actualSize = instance.exports.ZSTD_decompress( uncompressedPtr, uncompressedSize, compressedPtr, compressedSize );
// Read decompressed data and free WASM memory.
const dec = heap.slice( uncompressedPtr, uncompressedPtr + actualSize );
instance.exports.free( compressedPtr );
instance.exports.free( uncompressedPtr );
return dec;
}
}
window.ZSTDDecoder = ZSTDDecoder;
/**
* BSD License
*
* For Zstandard software
*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name Facebook nor the names of its contributors may be used to
* endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
const wasm = 'AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/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AsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEI
})();
(function () {
const t=new Uint8Array([0]),e=[171,75,84,88,32,50,48,187,13,10,26,10];var n,i,s,a,r,o,l,f;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(n||(n={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(i||(i={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(s||(s={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(a||(a={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(r||(r={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(o||(o={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(l||(l={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(f||(f={}));class U{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=n.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:i.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:s.UNSPECIFIED,colorPrimaries:a.SRGB,transferFunction:a.SRGB,flags:o.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class c{constructor(t,e,n,i){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=i,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==e&&i<t;)i++,this._offset++;return i<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}function h(t){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(t):Buffer.from(t)}function _(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function g(t){let e=0;for(const n of t)e+=n.byteLength;const n=new Uint8Array(e);let i=0;for(const e of t)n.set(new Uint8Array(e),i),i+=e.byteLength;return n}function p(t){const n=new Uint8Array(t.buffer,t.byteOffset,e.length);if(n[0]!==e[0]||n[1]!==e[1]||n[2]!==e[2]||n[3]!==e[3]||n[4]!==e[4]||n[5]!==e[5]||n[6]!==e[6]||n[7]!==e[7]||n[8]!==e[8]||n[9]!==e[9]||n[10]!==e[10]||n[11]!==e[11])throw new Error("Missing KTX 2.0 identifier.");const i=new U,s=17*Uint32Array.BYTES_PER_ELEMENT,a=new c(t,e.length,s,!0);i.vkFormat=a._nextUint32(),i.typeSize=a._nextUint32(),i.pixelWidth=a._nextUint32(),i.pixelHeight=a._nextUint32(),i.pixelDepth=a._nextUint32(),i.layerCount=a._nextUint32(),i.faceCount=a._nextUint32();const r=a._nextUint32();i.supercompressionScheme=a._nextUint32();const o=a._nextUint32(),l=a._nextUint32(),f=a._nextUint32(),h=a._nextUint32(),g=a._nextUint64(),p=a._nextUint64(),x=new c(t,e.length+s,3*r*8,!0);for(let e=0;e<r;e++)i.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+x._nextUint64(),x._nextUint64()),uncompressedByteLength:x._nextUint64()});const u=new c(t,o,l,!0),y={vendorId:u._skip(4)._nextUint16(),descriptorType:u._nextUint16(),versionNumber:u._nextUint16(),descriptorBlockSize:u._nextUint16(),colorModel:u._nextUint8(),colorPrimaries:u._nextUint8(),transferFunction:u._nextUint8(),flags:u._nextUint8(),texelBlockDimension:{x:u._nextUint8()+1,y:u._nextUint8()+1,z:u._nextUint8()+1,w:u._nextUint8()+1},bytesPlane:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],samples:[]},D=(y.descriptorBlockSize/4-6)/4;for(let t=0;t<D;t++)y.samples[t
})();