@corpsmap/corpsmap 3.2.84 → 3.2.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/corpsmap.css +3 -4
- package/lib/dev.js +1262 -451
- package/lib/prod.js +1262 -451
- package/package.json +1 -1
- package/src/core-plugins/change-log/change-log-modal.js +197 -195
package/lib/dev.js
CHANGED
|
@@ -80167,6 +80167,8 @@ function globals (defs) {
|
|
|
80167
80167
|
defs('EPSG:' + (32600 + i), '+proj=utm +zone=' + i + ' +datum=WGS84 +units=m');
|
|
80168
80168
|
defs('EPSG:' + (32700 + i), '+proj=utm +zone=' + i + ' +south +datum=WGS84 +units=m');
|
|
80169
80169
|
}
|
|
80170
|
+
defs('EPSG:5041', '+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m');
|
|
80171
|
+
defs('EPSG:5042', '+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m');
|
|
80170
80172
|
|
|
80171
80173
|
defs.WGS84 = defs['EPSG:4326'];
|
|
80172
80174
|
defs['EPSG:3785'] = defs['EPSG:3857']; // maintain backward compat, official code is 3857
|
|
@@ -80384,6 +80386,9 @@ function projStr (defData) {
|
|
|
80384
80386
|
},
|
|
80385
80387
|
approx: function () {
|
|
80386
80388
|
self.approx = true;
|
|
80389
|
+
},
|
|
80390
|
+
over: function () {
|
|
80391
|
+
self.over = true;
|
|
80387
80392
|
}
|
|
80388
80393
|
};
|
|
80389
80394
|
for (paramName in paramObj) {
|
|
@@ -80402,6 +80407,7 @@ function projStr (defData) {
|
|
|
80402
80407
|
if (typeof self.datumCode === 'string' && self.datumCode !== 'WGS84') {
|
|
80403
80408
|
self.datumCode = self.datumCode.toLowerCase();
|
|
80404
80409
|
}
|
|
80410
|
+
self['projStr'] = defData;
|
|
80405
80411
|
return self;
|
|
80406
80412
|
}
|
|
80407
80413
|
|
|
@@ -80453,10 +80459,11 @@ class PROJJSONBuilderBase {
|
|
|
80453
80459
|
if (abbreviation === 'E') direction = 'east';
|
|
80454
80460
|
else if (abbreviation === 'N') direction = 'north';
|
|
80455
80461
|
else if (abbreviation === 'U') direction = 'up';
|
|
80462
|
+
else if (node[2]) direction = node[2];
|
|
80456
80463
|
else throw new Error(`Unknown axis abbreviation: ${abbreviation}`);
|
|
80457
80464
|
} else {
|
|
80458
80465
|
// Use the explicit direction provided in the AXIS node
|
|
80459
|
-
direction = node[2]
|
|
80466
|
+
direction = node[2] || 'unknown';
|
|
80460
80467
|
}
|
|
80461
80468
|
|
|
80462
80469
|
const orderNode = node.find((child) => Array.isArray(child) && child[0] === 'ORDER');
|
|
@@ -80516,7 +80523,8 @@ class PROJJSONBuilderBase {
|
|
|
80516
80523
|
|
|
80517
80524
|
case 'BASEGEOGCRS':
|
|
80518
80525
|
case 'GEOGCRS':
|
|
80519
|
-
|
|
80526
|
+
case 'GEODCRS':
|
|
80527
|
+
result.type = node[0] === 'GEODCRS' ? 'GeodeticCRS' : 'GeographicCRS';
|
|
80520
80528
|
result.name = node[1];
|
|
80521
80529
|
|
|
80522
80530
|
// Handle DATUM or ENSEMBLE
|
|
@@ -81140,8 +81148,8 @@ function applyProjectionDefaults(wkt) {
|
|
|
81140
81148
|
// Normalize projName for WKT2 compatibility
|
|
81141
81149
|
const normalizedProjName = (wkt.projName || '').toLowerCase().replace(/_/g, ' ');
|
|
81142
81150
|
|
|
81143
|
-
if (
|
|
81144
|
-
wkt.long0 = wkt.longc;
|
|
81151
|
+
if (wkt.long0 === undefined && wkt.longc !== undefined) {
|
|
81152
|
+
wkt.long0 = wkt.longc; // keep in the projection's native prime meridian frame
|
|
81145
81153
|
}
|
|
81146
81154
|
if (!wkt.lat_ts && wkt.lat1 && (normalizedProjName === 'stereographic south pole' || normalizedProjName === 'polar stereographic (variant b)')) {
|
|
81147
81155
|
wkt.lat0 = d2r(wkt.lat1 > 0 ? 90 : -90);
|
|
@@ -81237,6 +81245,12 @@ function transformPROJJSON(projjson, result = {}) {
|
|
|
81237
81245
|
case 'type':
|
|
81238
81246
|
if (value === 'GeographicCRS') {
|
|
81239
81247
|
result.projName = 'longlat';
|
|
81248
|
+
} else if (value === 'GeodeticCRS') {
|
|
81249
|
+
if (projjson.coordinate_system && projjson.coordinate_system.subtype === 'Cartesian') {
|
|
81250
|
+
result.projName = 'geocent';
|
|
81251
|
+
} else {
|
|
81252
|
+
result.projName = 'longlat';
|
|
81253
|
+
}
|
|
81240
81254
|
} else if (value === 'ProjectedCRS' && projjson.conversion && projjson.conversion.method) {
|
|
81241
81255
|
result.projName = projjson.conversion.method.name; // Retain original capitalization
|
|
81242
81256
|
}
|
|
@@ -81265,16 +81279,24 @@ function transformPROJJSON(projjson, result = {}) {
|
|
|
81265
81279
|
|
|
81266
81280
|
case 'coordinate_system':
|
|
81267
81281
|
if (value.axis) {
|
|
81268
|
-
|
|
81269
|
-
|
|
81270
|
-
|
|
81271
|
-
|
|
81272
|
-
|
|
81273
|
-
|
|
81274
|
-
|
|
81275
|
-
|
|
81276
|
-
|
|
81277
|
-
|
|
81282
|
+
const directionMap = {
|
|
81283
|
+
'east': 'e',
|
|
81284
|
+
'north': 'n',
|
|
81285
|
+
'west': 'w',
|
|
81286
|
+
'south': 's',
|
|
81287
|
+
'up': 'u',
|
|
81288
|
+
'down': 'd',
|
|
81289
|
+
'geocentricx': 'e',
|
|
81290
|
+
'geocentricy': 'n',
|
|
81291
|
+
'geocentricz': 'u',
|
|
81292
|
+
};
|
|
81293
|
+
const mapped = value.axis.map((axis) => directionMap[axis.direction.toLowerCase()]);
|
|
81294
|
+
if (mapped.every(Boolean)) {
|
|
81295
|
+
result.axis = mapped.join('');
|
|
81296
|
+
if (result.axis.length === 2) {
|
|
81297
|
+
result.axis += 'u';
|
|
81298
|
+
}
|
|
81299
|
+
}
|
|
81278
81300
|
|
|
81279
81301
|
if (value.unit) {
|
|
81280
81302
|
const { units, to_meter } = processUnit(value.unit);
|
|
@@ -81502,9 +81524,9 @@ function setPropertiesFromWkt(wkt) {
|
|
|
81502
81524
|
geogcs = wkt;
|
|
81503
81525
|
}
|
|
81504
81526
|
if (geogcs) {
|
|
81505
|
-
|
|
81506
|
-
|
|
81507
|
-
|
|
81527
|
+
if (geogcs.PRIMEM && geogcs.PRIMEM.convert) {
|
|
81528
|
+
wkt.from_greenwich = d2r(geogcs.PRIMEM.convert);
|
|
81529
|
+
}
|
|
81508
81530
|
if (geogcs.DATUM) {
|
|
81509
81531
|
wkt.datumCode = geogcs.DATUM.name.toLowerCase();
|
|
81510
81532
|
} else {
|
|
@@ -81532,7 +81554,7 @@ function setPropertiesFromWkt(wkt) {
|
|
|
81532
81554
|
}
|
|
81533
81555
|
|
|
81534
81556
|
wkt.a = geogcs.DATUM.SPHEROID.a;
|
|
81535
|
-
wkt.rf = parseFloat(geogcs.DATUM.SPHEROID.rf
|
|
81557
|
+
wkt.rf = parseFloat(geogcs.DATUM.SPHEROID.rf);
|
|
81536
81558
|
}
|
|
81537
81559
|
|
|
81538
81560
|
if (geogcs.DATUM && geogcs.DATUM.TOWGS84) {
|
|
@@ -81661,6 +81683,8 @@ function wkt(wkt) {
|
|
|
81661
81683
|
* @property {boolean} [sphere]
|
|
81662
81684
|
* @property {number} [rectified_grid_angle]
|
|
81663
81685
|
* @property {boolean} [approx]
|
|
81686
|
+
* @property {boolean} [over]
|
|
81687
|
+
* @property {string} [projStr]
|
|
81664
81688
|
* @property {<T extends import('./core').TemplateCoordinates>(coordinates: T, enforceAxis?: boolean) => T} inverse
|
|
81665
81689
|
* @property {<T extends import('./core').TemplateCoordinates>(coordinates: T, enforceAxis?: boolean) => T} forward
|
|
81666
81690
|
*/
|
|
@@ -81697,8 +81721,14 @@ function defs(name) {
|
|
|
81697
81721
|
} else {
|
|
81698
81722
|
defs[/** @type {string} */ (name)] = wkt(arguments[1]);
|
|
81699
81723
|
}
|
|
81724
|
+
} else if (def && typeof def === 'object' && !('projName' in def)) {
|
|
81725
|
+
// PROJJSON
|
|
81726
|
+
defs[/** @type {string} */ (name)] = wkt(arguments[1]);
|
|
81700
81727
|
} else {
|
|
81701
81728
|
defs[/** @type {string} */ (name)] = def;
|
|
81729
|
+
if (!def) {
|
|
81730
|
+
delete defs[/** @type {string} */ (name)];
|
|
81731
|
+
}
|
|
81702
81732
|
}
|
|
81703
81733
|
} else if (arguments.length === 1) {
|
|
81704
81734
|
if (Array.isArray(name)) {
|
|
@@ -81738,6 +81768,9 @@ function testWKT(code) {
|
|
|
81738
81768
|
}
|
|
81739
81769
|
var codes = ['3857', '900913', '3785', '102113'];
|
|
81740
81770
|
function checkMercator(item) {
|
|
81771
|
+
if (item.title) {
|
|
81772
|
+
return item.title.toLowerCase().indexOf('epsg:') === 0 && codes.indexOf(item.title.substr(5)) > -1;
|
|
81773
|
+
}
|
|
81741
81774
|
var auth = match(item, 'authority');
|
|
81742
81775
|
if (!auth) {
|
|
81743
81776
|
return;
|
|
@@ -81760,31 +81793,27 @@ function testProj(code) {
|
|
|
81760
81793
|
* @returns {import('./defs').ProjectionDefinition}
|
|
81761
81794
|
*/
|
|
81762
81795
|
function parse$3(code) {
|
|
81796
|
+
let out;
|
|
81763
81797
|
if (testObj(code)) {
|
|
81764
81798
|
// check to see if this is a WKT string
|
|
81765
81799
|
if (testDef(code)) {
|
|
81766
|
-
|
|
81767
|
-
}
|
|
81768
|
-
|
|
81769
|
-
var out = wkt(code);
|
|
81770
|
-
// test of spetial case, due to this being a very common and often malformed
|
|
81771
|
-
if (checkMercator(out)) {
|
|
81772
|
-
return defs['EPSG:3857'];
|
|
81773
|
-
}
|
|
81800
|
+
out = defs[code];
|
|
81801
|
+
} else if (testWKT(code)) {
|
|
81802
|
+
out = wkt(code);
|
|
81774
81803
|
var maybeProjStr = checkProjStr(out);
|
|
81775
81804
|
if (maybeProjStr) {
|
|
81776
|
-
|
|
81805
|
+
out = projStr(maybeProjStr);
|
|
81777
81806
|
}
|
|
81778
|
-
|
|
81779
|
-
|
|
81780
|
-
if (testProj(code)) {
|
|
81781
|
-
return projStr(code);
|
|
81807
|
+
} else if (testProj(code)) {
|
|
81808
|
+
out = projStr(code);
|
|
81782
81809
|
}
|
|
81783
81810
|
} else if (!('projName' in code)) {
|
|
81784
|
-
|
|
81811
|
+
out = wkt(code);
|
|
81785
81812
|
} else {
|
|
81786
|
-
|
|
81813
|
+
out = code;
|
|
81787
81814
|
}
|
|
81815
|
+
// test for special Web Mercator case, due to this being a very common and often malformed
|
|
81816
|
+
return out && checkMercator(out) ? defs['EPSG:3857'] : out;
|
|
81788
81817
|
}
|
|
81789
81818
|
|
|
81790
81819
|
function extend$4 (destination, source) {
|
|
@@ -81811,7 +81840,10 @@ function sign$1 (x) {
|
|
|
81811
81840
|
return x < 0 ? -1 : 1;
|
|
81812
81841
|
}
|
|
81813
81842
|
|
|
81814
|
-
function adjust_lon (x) {
|
|
81843
|
+
function adjust_lon (x, skipAdjust) {
|
|
81844
|
+
if (skipAdjust) {
|
|
81845
|
+
return x;
|
|
81846
|
+
}
|
|
81815
81847
|
return (Math.abs(x) <= SPI) ? x : (x - (sign$1(x) * TWO_PI));
|
|
81816
81848
|
}
|
|
81817
81849
|
|
|
@@ -81889,12 +81921,12 @@ function forward(p) {
|
|
|
81889
81921
|
return null;
|
|
81890
81922
|
} else {
|
|
81891
81923
|
if (this.sphere) {
|
|
81892
|
-
x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);
|
|
81924
|
+
x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0, this.over);
|
|
81893
81925
|
y = this.y0 + this.a * this.k0 * Math.log(Math.tan(FORTPI + 0.5 * lat));
|
|
81894
81926
|
} else {
|
|
81895
81927
|
var sinphi = Math.sin(lat);
|
|
81896
81928
|
var ts = tsfnz(this.e, lat, sinphi);
|
|
81897
|
-
x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);
|
|
81929
|
+
x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0, this.over);
|
|
81898
81930
|
y = this.y0 - this.a * this.k0 * Math.log(ts);
|
|
81899
81931
|
}
|
|
81900
81932
|
p.x = x;
|
|
@@ -81919,7 +81951,7 @@ function inverse(p) {
|
|
|
81919
81951
|
return null;
|
|
81920
81952
|
}
|
|
81921
81953
|
}
|
|
81922
|
-
lon = adjust_lon(this.long0 + x / (this.a * this.k0));
|
|
81954
|
+
lon = adjust_lon(this.long0 + x / (this.a * this.k0), this.over);
|
|
81923
81955
|
|
|
81924
81956
|
p.x = lon;
|
|
81925
81957
|
p.y = lat;
|
|
@@ -82405,7 +82437,7 @@ var datums = {
|
|
|
82405
82437
|
towgs84: '-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166'
|
|
82406
82438
|
},
|
|
82407
82439
|
EPSG_4231: {
|
|
82408
|
-
towgs84: '-83.11,-97.38,-117.22,0.
|
|
82440
|
+
towgs84: '-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218'
|
|
82409
82441
|
},
|
|
82410
82442
|
EPSG_4274: {
|
|
82411
82443
|
towgs84: '-230.994,102.591,25.199,0.633,-0.239,0.9,1.95'
|
|
@@ -82435,7 +82467,7 @@ var datums = {
|
|
|
82435
82467
|
towgs84: '8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926'
|
|
82436
82468
|
},
|
|
82437
82469
|
EPSG_4289: {
|
|
82438
|
-
towgs84: '565.7381,50.4018,465.2904,-
|
|
82470
|
+
towgs84: '565.7381,50.4018,465.2904,-0.395026,0.330772,-1.876073,4.07244'
|
|
82439
82471
|
},
|
|
82440
82472
|
EPSG_4230: {
|
|
82441
82473
|
towgs84: '-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4'
|
|
@@ -82465,7 +82497,7 @@ var datums = {
|
|
|
82465
82497
|
towgs84: '-45,417,-3.5'
|
|
82466
82498
|
},
|
|
82467
82499
|
EPSG_4611: {
|
|
82468
|
-
towgs84: '-162.619,-276.959,-161.764,0.067753,-2.
|
|
82500
|
+
towgs84: '-162.619,-276.959,-161.764,0.067753,-2.243648,-1.158828,-1.094246'
|
|
82469
82501
|
},
|
|
82470
82502
|
EPSG_4633: {
|
|
82471
82503
|
towgs84: '137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824'
|
|
@@ -82483,7 +82515,7 @@ var datums = {
|
|
|
82483
82515
|
towgs84: '482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15'
|
|
82484
82516
|
},
|
|
82485
82517
|
EPSG_4660: {
|
|
82486
|
-
towgs84: '982.6087,552.753,-540.873,
|
|
82518
|
+
towgs84: '982.6087,552.753,-540.873,6.681627,-31.611492,-19.848161,16.805'
|
|
82487
82519
|
},
|
|
82488
82520
|
EPSG_4662: {
|
|
82489
82521
|
towgs84: '97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259'
|
|
@@ -82513,7 +82545,7 @@ var datums = {
|
|
|
82513
82545
|
towgs84: '217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093'
|
|
82514
82546
|
},
|
|
82515
82547
|
EPSG_9333: {
|
|
82516
|
-
towgs84: '0,0,0,-
|
|
82548
|
+
towgs84: '0,0,0,-0.008393,0.000749,-0.010276,0'
|
|
82517
82549
|
},
|
|
82518
82550
|
EPSG_9059: {
|
|
82519
82551
|
towgs84: '0,0,0'
|
|
@@ -82669,7 +82701,7 @@ var datums = {
|
|
|
82669
82701
|
towgs84: '674.374,15.056,405.346'
|
|
82670
82702
|
},
|
|
82671
82703
|
EPSG_4617: {
|
|
82672
|
-
towgs84: '-0.991,1.9072,0.5129,
|
|
82704
|
+
towgs84: '-0.991,1.9072,0.5129,0.02579,0.00965,0.01166,0'
|
|
82673
82705
|
},
|
|
82674
82706
|
EPSG_4663: {
|
|
82675
82707
|
towgs84: '-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485'
|
|
@@ -82732,10 +82764,10 @@ var datums = {
|
|
|
82732
82764
|
towgs84: '275.57,676.78,229.6'
|
|
82733
82765
|
},
|
|
82734
82766
|
EPSG_4283: {
|
|
82735
|
-
towgs84: '
|
|
82767
|
+
towgs84: '0.06155,-0.01087,-0.04019,0.039492,0.032722,0.032898,-0.009994'
|
|
82736
82768
|
},
|
|
82737
82769
|
EPSG_4317: {
|
|
82738
|
-
towgs84: '2.3287,-147.0425,-92.0802,-0.
|
|
82770
|
+
towgs84: '2.3287,-147.0425,-92.0802,-0.309248,0.324822,0.497299,5.689063'
|
|
82739
82771
|
},
|
|
82740
82772
|
EPSG_4272: {
|
|
82741
82773
|
towgs84: '59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993'
|
|
@@ -82858,7 +82890,7 @@ var datums = {
|
|
|
82858
82890
|
towgs84: '-208.4058,-109.8777,-2.5764'
|
|
82859
82891
|
},
|
|
82860
82892
|
ESRI_104101: {
|
|
82861
|
-
towgs84: '
|
|
82893
|
+
towgs84: '372.87,149.23,585.29'
|
|
82862
82894
|
},
|
|
82863
82895
|
EPSG_4693: {
|
|
82864
82896
|
towgs84: '0,-0.15,0.68'
|
|
@@ -83543,6 +83575,87 @@ var datums = {
|
|
|
83543
83575
|
},
|
|
83544
83576
|
EPSG_4818: {
|
|
83545
83577
|
towgs84: '589,76,480'
|
|
83578
|
+
},
|
|
83579
|
+
EPSG_10328: {
|
|
83580
|
+
towgs84: '0,0,0'
|
|
83581
|
+
},
|
|
83582
|
+
EPSG_9782: {
|
|
83583
|
+
towgs84: '0,0,0'
|
|
83584
|
+
},
|
|
83585
|
+
EPSG_9777: {
|
|
83586
|
+
towgs84: '0,0,0'
|
|
83587
|
+
},
|
|
83588
|
+
EPSG_10690: {
|
|
83589
|
+
towgs84: '0,0,0'
|
|
83590
|
+
},
|
|
83591
|
+
EPSG_10639: {
|
|
83592
|
+
towgs84: '0,0,0'
|
|
83593
|
+
},
|
|
83594
|
+
EPSG_10739: {
|
|
83595
|
+
towgs84: '0,0,0'
|
|
83596
|
+
},
|
|
83597
|
+
EPSG_7686: {
|
|
83598
|
+
towgs84: '0,0,0'
|
|
83599
|
+
},
|
|
83600
|
+
EPSG_8900: {
|
|
83601
|
+
towgs84: '0,0,0'
|
|
83602
|
+
},
|
|
83603
|
+
EPSG_5886: {
|
|
83604
|
+
towgs84: '0,0,0'
|
|
83605
|
+
},
|
|
83606
|
+
EPSG_7683: {
|
|
83607
|
+
towgs84: '0,0,0'
|
|
83608
|
+
},
|
|
83609
|
+
EPSG_6668: {
|
|
83610
|
+
towgs84: '0,0,0'
|
|
83611
|
+
},
|
|
83612
|
+
EPSG_20046: {
|
|
83613
|
+
towgs84: '0,0,0'
|
|
83614
|
+
},
|
|
83615
|
+
EPSG_10299: {
|
|
83616
|
+
towgs84: '0,0,0'
|
|
83617
|
+
},
|
|
83618
|
+
EPSG_10310: {
|
|
83619
|
+
towgs84: '0,0,0'
|
|
83620
|
+
},
|
|
83621
|
+
EPSG_10475: {
|
|
83622
|
+
towgs84: '0,0,0'
|
|
83623
|
+
},
|
|
83624
|
+
EPSG_4742: {
|
|
83625
|
+
towgs84: '0,0,0'
|
|
83626
|
+
},
|
|
83627
|
+
EPSG_10671: {
|
|
83628
|
+
towgs84: '0,0,0'
|
|
83629
|
+
},
|
|
83630
|
+
EPSG_10762: {
|
|
83631
|
+
towgs84: '0,0,0'
|
|
83632
|
+
},
|
|
83633
|
+
EPSG_10725: {
|
|
83634
|
+
towgs84: '0,0,0'
|
|
83635
|
+
},
|
|
83636
|
+
EPSG_10791: {
|
|
83637
|
+
towgs84: '0,0,0'
|
|
83638
|
+
},
|
|
83639
|
+
EPSG_10800: {
|
|
83640
|
+
towgs84: '0,0,0'
|
|
83641
|
+
},
|
|
83642
|
+
EPSG_10305: {
|
|
83643
|
+
towgs84: '0,0,0'
|
|
83644
|
+
},
|
|
83645
|
+
EPSG_10941: {
|
|
83646
|
+
towgs84: '0,0,0'
|
|
83647
|
+
},
|
|
83648
|
+
EPSG_10968: {
|
|
83649
|
+
towgs84: '0,0,0'
|
|
83650
|
+
},
|
|
83651
|
+
EPSG_10875: {
|
|
83652
|
+
towgs84: '0,0,0'
|
|
83653
|
+
},
|
|
83654
|
+
EPSG_6318: {
|
|
83655
|
+
towgs84: '0,0,0'
|
|
83656
|
+
},
|
|
83657
|
+
EPSG_10910: {
|
|
83658
|
+
towgs84: '0,0,0'
|
|
83546
83659
|
}
|
|
83547
83660
|
};
|
|
83548
83661
|
|
|
@@ -84611,7 +84724,7 @@ function transform$1(source, dest, point, enforceAxis) {
|
|
|
84611
84724
|
return adjust_axis(dest, true, point);
|
|
84612
84725
|
}
|
|
84613
84726
|
|
|
84614
|
-
if (point && !hasZ) {
|
|
84727
|
+
if (point && !hasZ && dest.projName !== 'geocent') {
|
|
84615
84728
|
delete point.z;
|
|
84616
84729
|
}
|
|
84617
84730
|
return point;
|
|
@@ -85698,7 +85811,7 @@ function forward$2(p) {
|
|
|
85698
85811
|
var lon = p.x;
|
|
85699
85812
|
var lat = p.y;
|
|
85700
85813
|
|
|
85701
|
-
var delta_lon = adjust_lon(lon - this.long0);
|
|
85814
|
+
var delta_lon = adjust_lon(lon - this.long0, this.over);
|
|
85702
85815
|
var con;
|
|
85703
85816
|
var x, y;
|
|
85704
85817
|
var sin_phi = Math.sin(lat);
|
|
@@ -85786,7 +85899,7 @@ function inverse$2(p) {
|
|
|
85786
85899
|
if ((g === 0) && (h === 0)) {
|
|
85787
85900
|
lon = 0;
|
|
85788
85901
|
} else {
|
|
85789
|
-
lon = adjust_lon(Math.atan2(g, h) + this.long0);
|
|
85902
|
+
lon = adjust_lon(Math.atan2(g, h) + this.long0, this.over);
|
|
85790
85903
|
}
|
|
85791
85904
|
} else { // ellipsoidal form
|
|
85792
85905
|
con = this.ml0 + y / this.k0;
|
|
@@ -85813,7 +85926,7 @@ function inverse$2(p) {
|
|
|
85813
85926
|
lon = adjust_lon(this.long0 + (d * (1
|
|
85814
85927
|
- ds / 6 * (1 + 2 * t + c
|
|
85815
85928
|
- ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c
|
|
85816
|
-
- ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi));
|
|
85929
|
+
- ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi), this.over);
|
|
85817
85930
|
} else {
|
|
85818
85931
|
lat = HALF_PI * sign$1(y);
|
|
85819
85932
|
lon = 0;
|
|
@@ -86023,7 +86136,7 @@ function init$3() {
|
|
|
86023
86136
|
}
|
|
86024
86137
|
|
|
86025
86138
|
function forward$3(p) {
|
|
86026
|
-
var Ce = adjust_lon(p.x - this.long0);
|
|
86139
|
+
var Ce = adjust_lon(p.x - this.long0, this.over);
|
|
86027
86140
|
var Cn = p.y;
|
|
86028
86141
|
|
|
86029
86142
|
Cn = gatg(this.cbg, Cn);
|
|
@@ -86083,7 +86196,7 @@ function inverse$3(p) {
|
|
|
86083
86196
|
Cn = Math.atan2(sin_Cn * cos_Ce, hypot(sin_Ce, cos_Ce * cos_Cn));
|
|
86084
86197
|
Ce = Math.atan2(sin_Ce, cos_Ce * cos_Cn);
|
|
86085
86198
|
|
|
86086
|
-
lon = adjust_lon(Ce + this.long0);
|
|
86199
|
+
lon = adjust_lon(Ce + this.long0, this.over);
|
|
86087
86200
|
lat = gatg(this.cgb, Cn);
|
|
86088
86201
|
} else {
|
|
86089
86202
|
lon = Infinity;
|
|
@@ -86235,7 +86348,7 @@ function init$6() {
|
|
|
86235
86348
|
|
|
86236
86349
|
function forward$5(p) {
|
|
86237
86350
|
var sinc, cosc, cosl, k;
|
|
86238
|
-
p.x = adjust_lon(p.x - this.long0);
|
|
86351
|
+
p.x = adjust_lon(p.x - this.long0, this.over);
|
|
86239
86352
|
gauss.forward.apply(this, [p]);
|
|
86240
86353
|
sinc = Math.sin(p.y);
|
|
86241
86354
|
cosc = Math.cos(p.y);
|
|
@@ -86269,7 +86382,7 @@ function inverse$5(p) {
|
|
|
86269
86382
|
p.x = lon;
|
|
86270
86383
|
p.y = lat;
|
|
86271
86384
|
gauss.inverse.apply(this, [p]);
|
|
86272
|
-
p.x = adjust_lon(p.x + this.long0);
|
|
86385
|
+
p.x = adjust_lon(p.x + this.long0, this.over);
|
|
86273
86386
|
return p;
|
|
86274
86387
|
}
|
|
86275
86388
|
|
|
@@ -86345,7 +86458,7 @@ function forward$6(p) {
|
|
|
86345
86458
|
var sinlat = Math.sin(lat);
|
|
86346
86459
|
var coslat = Math.cos(lat);
|
|
86347
86460
|
var A, X, sinX, cosX, ts, rh;
|
|
86348
|
-
var dlon = adjust_lon(lon - this.long0);
|
|
86461
|
+
var dlon = adjust_lon(lon - this.long0, this.over);
|
|
86349
86462
|
|
|
86350
86463
|
if (Math.abs(Math.abs(lon - this.long0) - Math.PI) <= EPSLN && Math.abs(lat + this.lat0) <= EPSLN) {
|
|
86351
86464
|
// case of the origine point
|
|
@@ -86406,12 +86519,12 @@ function inverse$6(p) {
|
|
|
86406
86519
|
lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh);
|
|
86407
86520
|
if (Math.abs(this.coslat0) < EPSLN) {
|
|
86408
86521
|
if (this.lat0 > 0) {
|
|
86409
|
-
lon = adjust_lon(this.long0 + Math.atan2(p.x, -1 * p.y));
|
|
86522
|
+
lon = adjust_lon(this.long0 + Math.atan2(p.x, -1 * p.y), this.over);
|
|
86410
86523
|
} else {
|
|
86411
|
-
lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
|
|
86524
|
+
lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y), this.over);
|
|
86412
86525
|
}
|
|
86413
86526
|
} else {
|
|
86414
|
-
lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)));
|
|
86527
|
+
lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)), this.over);
|
|
86415
86528
|
}
|
|
86416
86529
|
p.x = lon;
|
|
86417
86530
|
p.y = lat;
|
|
@@ -86430,7 +86543,7 @@ function inverse$6(p) {
|
|
|
86430
86543
|
p.y *= this.con;
|
|
86431
86544
|
ts = rh * this.cons / (2 * this.a * this.k0);
|
|
86432
86545
|
lat = this.con * phi2z(this.e, ts);
|
|
86433
|
-
lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, -1 * p.y));
|
|
86546
|
+
lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, -1 * p.y), this.over);
|
|
86434
86547
|
} else {
|
|
86435
86548
|
ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1));
|
|
86436
86549
|
lon = this.long0;
|
|
@@ -86438,7 +86551,7 @@ function inverse$6(p) {
|
|
|
86438
86551
|
Chi = this.X0;
|
|
86439
86552
|
} else {
|
|
86440
86553
|
Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh);
|
|
86441
|
-
lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)));
|
|
86554
|
+
lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)), this.over);
|
|
86442
86555
|
}
|
|
86443
86556
|
lat = -1 * phi2z(this.e, Math.tan(0.5 * (HALF_PI + Chi)));
|
|
86444
86557
|
}
|
|
@@ -86690,8 +86803,8 @@ function init$9() {
|
|
|
86690
86803
|
lam2 += TWO_PI;
|
|
86691
86804
|
}
|
|
86692
86805
|
|
|
86693
|
-
this.lam0 = adjust_lon(0.5 * (lam1 + lam2) - Math.atan(J * Math.tan(0.5 * this.B * (lam1 - lam2)) / p) / this.B);
|
|
86694
|
-
gamma0 = Math.atan(2 * Math.sin(this.B * adjust_lon(lam1 - this.lam0)) / (F - 1 / F));
|
|
86806
|
+
this.lam0 = adjust_lon(0.5 * (lam1 + lam2) - Math.atan(J * Math.tan(0.5 * this.B * (lam1 - lam2)) / p) / this.B, this.over);
|
|
86807
|
+
gamma0 = Math.atan(2 * Math.sin(this.B * adjust_lon(lam1 - this.lam0, this.over)) / (F - 1 / F));
|
|
86695
86808
|
gamma = alpha_c = Math.asin(D * Math.sin(gamma0));
|
|
86696
86809
|
}
|
|
86697
86810
|
|
|
@@ -86905,7 +87018,7 @@ function forward$9(p) {
|
|
|
86905
87018
|
}
|
|
86906
87019
|
rh1 = 0;
|
|
86907
87020
|
}
|
|
86908
|
-
var theta = this.ns * adjust_lon(lon - this.long0);
|
|
87021
|
+
var theta = this.ns * adjust_lon(lon - this.long0, this.over);
|
|
86909
87022
|
p.x = this.k0 * (rh1 * Math.sin(theta)) + this.x0;
|
|
86910
87023
|
p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0;
|
|
86911
87024
|
|
|
@@ -86940,7 +87053,7 @@ function inverse$9(p) {
|
|
|
86940
87053
|
} else {
|
|
86941
87054
|
lat = -HALF_PI;
|
|
86942
87055
|
}
|
|
86943
|
-
lon = adjust_lon(theta / this.ns + this.long0);
|
|
87056
|
+
lon = adjust_lon(theta / this.ns + this.long0, this.over);
|
|
86944
87057
|
|
|
86945
87058
|
p.x = lon;
|
|
86946
87059
|
p.y = lat;
|
|
@@ -86972,7 +87085,7 @@ function init$b() {
|
|
|
86972
87085
|
this.lat0 = 0.863937979737193;
|
|
86973
87086
|
}
|
|
86974
87087
|
if (!this.long0) {
|
|
86975
|
-
this.long0 = 0.7417649320975901 - 0.308341501185665;
|
|
87088
|
+
this.long0 = 0.7417649320975901 - 0.308341501185665; // 42.5° from Ferro = 24.833° from Greenwich
|
|
86976
87089
|
}
|
|
86977
87090
|
/* if scale not set default to 0.9999 */
|
|
86978
87091
|
if (!this.k0) {
|
|
@@ -87003,7 +87116,7 @@ function forward$a(p) {
|
|
|
87003
87116
|
var gfi, u, deltav, s, d, eps, ro;
|
|
87004
87117
|
var lon = p.x;
|
|
87005
87118
|
var lat = p.y;
|
|
87006
|
-
var delta_lon = adjust_lon(lon - this.long0);
|
|
87119
|
+
var delta_lon = adjust_lon(lon - this.long0, this.over);
|
|
87007
87120
|
/* Transformation */
|
|
87008
87121
|
gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2));
|
|
87009
87122
|
u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45);
|
|
@@ -87061,7 +87174,7 @@ function inverse$a(p) {
|
|
|
87061
87174
|
return (p);
|
|
87062
87175
|
}
|
|
87063
87176
|
|
|
87064
|
-
var names$c = ['Krovak', 'krovak'];
|
|
87177
|
+
var names$c = ['Krovak', 'Krovak Modified', 'Krovak (North Orientated)', 'Krovak Modified (North Orientated)', 'krovak'];
|
|
87065
87178
|
var krovak = {
|
|
87066
87179
|
init: init$b,
|
|
87067
87180
|
forward: forward$a,
|
|
@@ -87144,7 +87257,7 @@ function forward$b(p) {
|
|
|
87144
87257
|
var x, y;
|
|
87145
87258
|
var lam = p.x;
|
|
87146
87259
|
var phi = p.y;
|
|
87147
|
-
lam = adjust_lon(lam - this.long0);
|
|
87260
|
+
lam = adjust_lon(lam - this.long0, this.over);
|
|
87148
87261
|
|
|
87149
87262
|
if (this.sphere) {
|
|
87150
87263
|
x = this.a * Math.asin(Math.cos(phi) * Math.sin(lam));
|
|
@@ -87204,7 +87317,7 @@ function inverse$b(p) {
|
|
|
87204
87317
|
lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1);
|
|
87205
87318
|
}
|
|
87206
87319
|
|
|
87207
|
-
p.x = adjust_lon(lam + this.long0);
|
|
87320
|
+
p.x = adjust_lon(lam + this.long0, this.over);
|
|
87208
87321
|
p.y = adjust_lat(phi);
|
|
87209
87322
|
return p;
|
|
87210
87323
|
}
|
|
@@ -87315,7 +87428,7 @@ function forward$c(p) {
|
|
|
87315
87428
|
var lam = p.x;
|
|
87316
87429
|
var phi = p.y;
|
|
87317
87430
|
|
|
87318
|
-
lam = adjust_lon(lam - this.long0);
|
|
87431
|
+
lam = adjust_lon(lam - this.long0, this.over);
|
|
87319
87432
|
if (this.sphere) {
|
|
87320
87433
|
sinphi = Math.sin(phi);
|
|
87321
87434
|
cosphi = Math.cos(phi);
|
|
@@ -87483,7 +87596,7 @@ function inverse$c(p) {
|
|
|
87483
87596
|
phi = authlat(Math.asin(ab), this.apa);
|
|
87484
87597
|
}
|
|
87485
87598
|
|
|
87486
|
-
p.x = adjust_lon(this.long0 + lam);
|
|
87599
|
+
p.x = adjust_lon(this.long0 + lam, this.over);
|
|
87487
87600
|
p.y = phi;
|
|
87488
87601
|
return p;
|
|
87489
87602
|
}
|
|
@@ -87606,7 +87719,7 @@ function forward$d(p) {
|
|
|
87606
87719
|
|
|
87607
87720
|
var qs = qsfnz(this.e3, this.sin_phi);
|
|
87608
87721
|
var rh1 = this.a * Math.sqrt(this.c - this.ns0 * qs) / this.ns0;
|
|
87609
|
-
var theta = this.ns0 * adjust_lon(lon - this.long0);
|
|
87722
|
+
var theta = this.ns0 * adjust_lon(lon - this.long0, this.over);
|
|
87610
87723
|
var x = rh1 * Math.sin(theta) + this.x0;
|
|
87611
87724
|
var y = this.rh - rh1 * Math.cos(theta) + this.y0;
|
|
87612
87725
|
|
|
@@ -87639,7 +87752,7 @@ function inverse$d(p) {
|
|
|
87639
87752
|
lat = this.phi1z(this.e3, qs);
|
|
87640
87753
|
}
|
|
87641
87754
|
|
|
87642
|
-
lon = adjust_lon(theta / this.ns0 + this.long0);
|
|
87755
|
+
lon = adjust_lon(theta / this.ns0 + this.long0, this.over);
|
|
87643
87756
|
p.x = lon;
|
|
87644
87757
|
p.y = lat;
|
|
87645
87758
|
return p;
|
|
@@ -87717,7 +87830,7 @@ function forward$e(p) {
|
|
|
87717
87830
|
var lat = p.y;
|
|
87718
87831
|
/* Forward equations
|
|
87719
87832
|
----------------- */
|
|
87720
|
-
dlon = adjust_lon(lon - this.long0);
|
|
87833
|
+
dlon = adjust_lon(lon - this.long0, this.over);
|
|
87721
87834
|
|
|
87722
87835
|
sinphi = Math.sin(lat);
|
|
87723
87836
|
cosphi = Math.cos(lat);
|
|
@@ -87765,7 +87878,7 @@ function inverse$e(p) {
|
|
|
87765
87878
|
|
|
87766
87879
|
lat = asinz(cosc * this.sin_p14 + (p.y * sinc * this.cos_p14) / rh);
|
|
87767
87880
|
lon = Math.atan2(p.x * sinc, rh * this.cos_p14 * cosc - p.y * this.sin_p14 * sinc);
|
|
87768
|
-
lon = adjust_lon(this.long0 + lon);
|
|
87881
|
+
lon = adjust_lon(this.long0 + lon, this.over);
|
|
87769
87882
|
} else {
|
|
87770
87883
|
lat = this.phic0;
|
|
87771
87884
|
lon = 0;
|
|
@@ -87841,7 +87954,7 @@ function forward$f(p) {
|
|
|
87841
87954
|
var x, y;
|
|
87842
87955
|
/* Forward equations
|
|
87843
87956
|
----------------- */
|
|
87844
|
-
var dlon = adjust_lon(lon - this.long0);
|
|
87957
|
+
var dlon = adjust_lon(lon - this.long0, this.over);
|
|
87845
87958
|
if (this.sphere) {
|
|
87846
87959
|
x = this.x0 + this.a * dlon * Math.cos(this.lat_ts);
|
|
87847
87960
|
y = this.y0 + this.a * Math.sin(lat) / Math.cos(this.lat_ts);
|
|
@@ -87864,11 +87977,11 @@ function inverse$f(p) {
|
|
|
87864
87977
|
var lon, lat;
|
|
87865
87978
|
|
|
87866
87979
|
if (this.sphere) {
|
|
87867
|
-
lon = adjust_lon(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts));
|
|
87980
|
+
lon = adjust_lon(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts), this.over);
|
|
87868
87981
|
lat = Math.asin((p.y / this.a) * Math.cos(this.lat_ts));
|
|
87869
87982
|
} else {
|
|
87870
87983
|
lat = iqsfnz(this.e, 2 * p.y * this.k0 / this.a);
|
|
87871
|
-
lon = adjust_lon(this.long0 + p.x / (this.a * this.k0));
|
|
87984
|
+
lon = adjust_lon(this.long0 + p.x / (this.a * this.k0), this.over);
|
|
87872
87985
|
}
|
|
87873
87986
|
|
|
87874
87987
|
p.x = lon;
|
|
@@ -87901,7 +88014,7 @@ function forward$g(p) {
|
|
|
87901
88014
|
var lon = p.x;
|
|
87902
88015
|
var lat = p.y;
|
|
87903
88016
|
|
|
87904
|
-
var dlon = adjust_lon(lon - this.long0);
|
|
88017
|
+
var dlon = adjust_lon(lon - this.long0, this.over);
|
|
87905
88018
|
var dlat = adjust_lat(lat - this.lat0);
|
|
87906
88019
|
p.x = this.x0 + (this.a * dlon * this.rc);
|
|
87907
88020
|
p.y = this.y0 + (this.a * dlat);
|
|
@@ -87914,7 +88027,7 @@ function inverse$g(p) {
|
|
|
87914
88027
|
var x = p.x;
|
|
87915
88028
|
var y = p.y;
|
|
87916
88029
|
|
|
87917
|
-
p.x = adjust_lon(this.long0 + ((x - this.x0) / (this.a * this.rc)));
|
|
88030
|
+
p.x = adjust_lon(this.long0 + ((x - this.x0) / (this.a * this.rc)), this.over);
|
|
87918
88031
|
p.y = adjust_lat(this.lat0 + ((y - this.y0) / (this.a)));
|
|
87919
88032
|
return p;
|
|
87920
88033
|
}
|
|
@@ -87961,7 +88074,7 @@ function forward$h(p) {
|
|
|
87961
88074
|
var lon = p.x;
|
|
87962
88075
|
var lat = p.y;
|
|
87963
88076
|
var x, y, el;
|
|
87964
|
-
var dlon = adjust_lon(lon - this.long0);
|
|
88077
|
+
var dlon = adjust_lon(lon - this.long0, this.over);
|
|
87965
88078
|
el = dlon * Math.sin(lat);
|
|
87966
88079
|
if (this.sphere) {
|
|
87967
88080
|
if (Math.abs(lat) <= EPSLN) {
|
|
@@ -87997,7 +88110,7 @@ function inverse$h(p) {
|
|
|
87997
88110
|
|
|
87998
88111
|
if (this.sphere) {
|
|
87999
88112
|
if (Math.abs(y + this.a * this.lat0) <= EPSLN) {
|
|
88000
|
-
lon = adjust_lon(x / this.a + this.long0);
|
|
88113
|
+
lon = adjust_lon(x / this.a + this.long0, this.over);
|
|
88001
88114
|
lat = 0;
|
|
88002
88115
|
} else {
|
|
88003
88116
|
al = this.lat0 + y / this.a;
|
|
@@ -88013,12 +88126,12 @@ function inverse$h(p) {
|
|
|
88013
88126
|
break;
|
|
88014
88127
|
}
|
|
88015
88128
|
}
|
|
88016
|
-
lon = adjust_lon(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat));
|
|
88129
|
+
lon = adjust_lon(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat), this.over);
|
|
88017
88130
|
}
|
|
88018
88131
|
} else {
|
|
88019
88132
|
if (Math.abs(y + this.ml0) <= EPSLN) {
|
|
88020
88133
|
lat = 0;
|
|
88021
|
-
lon = adjust_lon(this.long0 + x / this.a);
|
|
88134
|
+
lon = adjust_lon(this.long0 + x / this.a, this.over);
|
|
88022
88135
|
} else {
|
|
88023
88136
|
al = (this.ml0 + y) / this.a;
|
|
88024
88137
|
bl = x * x / this.a / this.a + al * al;
|
|
@@ -88041,7 +88154,7 @@ function inverse$h(p) {
|
|
|
88041
88154
|
|
|
88042
88155
|
// lat=phi4z(this.e,this.e0,this.e1,this.e2,this.e3,al,bl,0,0);
|
|
88043
88156
|
cl = Math.sqrt(1 - this.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat);
|
|
88044
|
-
lon = adjust_lon(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat));
|
|
88157
|
+
lon = adjust_lon(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat), this.over);
|
|
88045
88158
|
}
|
|
88046
88159
|
}
|
|
88047
88160
|
|
|
@@ -88286,7 +88399,7 @@ function forward$j(p) {
|
|
|
88286
88399
|
var lat = p.y;
|
|
88287
88400
|
/* Forward equations
|
|
88288
88401
|
----------------- */
|
|
88289
|
-
var dlon = adjust_lon(lon - this.long0);
|
|
88402
|
+
var dlon = adjust_lon(lon - this.long0, this.over);
|
|
88290
88403
|
var x = this.x0 + this.a * dlon;
|
|
88291
88404
|
var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25;
|
|
88292
88405
|
|
|
@@ -88301,7 +88414,7 @@ function inverse$j(p) {
|
|
|
88301
88414
|
p.x -= this.x0;
|
|
88302
88415
|
p.y -= this.y0;
|
|
88303
88416
|
|
|
88304
|
-
var lon = adjust_lon(this.long0 + p.x / this.a);
|
|
88417
|
+
var lon = adjust_lon(this.long0 + p.x / this.a, this.over);
|
|
88305
88418
|
var lat = 2.5 * (Math.atan(Math.exp(0.8 * p.y / this.a)) - Math.PI / 4);
|
|
88306
88419
|
|
|
88307
88420
|
p.x = lon;
|
|
@@ -88333,6 +88446,7 @@ var MAX_ITER$3 = 20;
|
|
|
88333
88446
|
function init$l() {
|
|
88334
88447
|
/* Place parameters in static storage for common use
|
|
88335
88448
|
------------------------------------------------- */
|
|
88449
|
+
this.long0 = this.long0 || 0;
|
|
88336
88450
|
|
|
88337
88451
|
if (!this.sphere) {
|
|
88338
88452
|
this.en = pj_enfn(this.es);
|
|
@@ -88353,7 +88467,7 @@ function forward$k(p) {
|
|
|
88353
88467
|
var lat = p.y;
|
|
88354
88468
|
/* Forward equations
|
|
88355
88469
|
----------------- */
|
|
88356
|
-
lon = adjust_lon(lon - this.long0);
|
|
88470
|
+
lon = adjust_lon(lon - this.long0, this.over);
|
|
88357
88471
|
|
|
88358
88472
|
if (this.sphere) {
|
|
88359
88473
|
if (!this.m) {
|
|
@@ -88398,7 +88512,7 @@ function inverse$k(p) {
|
|
|
88398
88512
|
} else if (this.n !== 1) {
|
|
88399
88513
|
lat = asinz(Math.sin(lat) / this.n);
|
|
88400
88514
|
}
|
|
88401
|
-
lon = adjust_lon(lon + this.long0);
|
|
88515
|
+
lon = adjust_lon(lon + this.long0, this.over);
|
|
88402
88516
|
lat = adjust_lat(lat);
|
|
88403
88517
|
} else {
|
|
88404
88518
|
lat = pj_inv_mlfn(p.y / this.a, this.es, this.en);
|
|
@@ -88407,7 +88521,7 @@ function inverse$k(p) {
|
|
|
88407
88521
|
s = Math.sin(lat);
|
|
88408
88522
|
temp = this.long0 + p.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(lat));
|
|
88409
88523
|
// temp = this.long0 + p.x / (this.a * Math.cos(lat));
|
|
88410
|
-
lon = adjust_lon(temp);
|
|
88524
|
+
lon = adjust_lon(temp, this.over);
|
|
88411
88525
|
} else if ((s - EPSLN) < HALF_PI) {
|
|
88412
88526
|
lon = this.long0;
|
|
88413
88527
|
}
|
|
@@ -88425,7 +88539,13 @@ var sinu = {
|
|
|
88425
88539
|
names: names$m
|
|
88426
88540
|
};
|
|
88427
88541
|
|
|
88428
|
-
|
|
88542
|
+
/** @this {import('../defs.js').ProjectionDefinition} */
|
|
88543
|
+
function init$m() {
|
|
88544
|
+
this.x0 = this.x0 !== undefined ? this.x0 : 0;
|
|
88545
|
+
this.y0 = this.y0 !== undefined ? this.y0 : 0;
|
|
88546
|
+
this.long0 = this.long0 !== undefined ? this.long0 : 0;
|
|
88547
|
+
}
|
|
88548
|
+
|
|
88429
88549
|
/* Mollweide forward equations--mapping lat,long to x,y
|
|
88430
88550
|
---------------------------------------------------- */
|
|
88431
88551
|
function forward$l(p) {
|
|
@@ -88434,7 +88554,7 @@ function forward$l(p) {
|
|
|
88434
88554
|
var lon = p.x;
|
|
88435
88555
|
var lat = p.y;
|
|
88436
88556
|
|
|
88437
|
-
var delta_lon = adjust_lon(lon - this.long0);
|
|
88557
|
+
var delta_lon = adjust_lon(lon - this.long0, this.over);
|
|
88438
88558
|
var theta = lat;
|
|
88439
88559
|
var con = Math.PI * Math.sin(lat);
|
|
88440
88560
|
|
|
@@ -88480,7 +88600,7 @@ function inverse$l(p) {
|
|
|
88480
88600
|
arg = 0.999999999999;
|
|
88481
88601
|
}
|
|
88482
88602
|
theta = Math.asin(arg);
|
|
88483
|
-
var lon = adjust_lon(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta))));
|
|
88603
|
+
var lon = adjust_lon(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta))), this.over);
|
|
88484
88604
|
if (lon < (-Math.PI)) {
|
|
88485
88605
|
lon = -Math.PI;
|
|
88486
88606
|
}
|
|
@@ -88579,7 +88699,7 @@ function forward$m(p) {
|
|
|
88579
88699
|
var ml = mlfn(this.e0, this.e1, this.e2, this.e3, lat);
|
|
88580
88700
|
rh1 = this.a * (this.g - ml);
|
|
88581
88701
|
}
|
|
88582
|
-
var theta = this.ns * adjust_lon(lon - this.long0);
|
|
88702
|
+
var theta = this.ns * adjust_lon(lon - this.long0, this.over);
|
|
88583
88703
|
var x = this.x0 + rh1 * Math.sin(theta);
|
|
88584
88704
|
var y = this.y0 + this.rh - rh1 * Math.cos(theta);
|
|
88585
88705
|
p.x = x;
|
|
@@ -88606,7 +88726,7 @@ function inverse$m(p) {
|
|
|
88606
88726
|
}
|
|
88607
88727
|
|
|
88608
88728
|
if (this.sphere) {
|
|
88609
|
-
lon = adjust_lon(this.long0 + theta / this.ns);
|
|
88729
|
+
lon = adjust_lon(this.long0 + theta / this.ns, this.over);
|
|
88610
88730
|
lat = adjust_lat(this.g - rh1 / this.a);
|
|
88611
88731
|
p.x = lon;
|
|
88612
88732
|
p.y = lat;
|
|
@@ -88614,7 +88734,7 @@ function inverse$m(p) {
|
|
|
88614
88734
|
} else {
|
|
88615
88735
|
var ml = this.g - rh1 / this.a;
|
|
88616
88736
|
lat = imlfn(ml, this.e0, this.e1, this.e2, this.e3);
|
|
88617
|
-
lon = adjust_lon(this.long0 + theta / this.ns);
|
|
88737
|
+
lon = adjust_lon(this.long0 + theta / this.ns, this.over);
|
|
88618
88738
|
p.x = lon;
|
|
88619
88739
|
p.y = lat;
|
|
88620
88740
|
return p;
|
|
@@ -88649,7 +88769,7 @@ function forward$n(p) {
|
|
|
88649
88769
|
|
|
88650
88770
|
/* Forward equations
|
|
88651
88771
|
----------------- */
|
|
88652
|
-
var dlon = adjust_lon(lon - this.long0);
|
|
88772
|
+
var dlon = adjust_lon(lon - this.long0, this.over);
|
|
88653
88773
|
var x, y;
|
|
88654
88774
|
|
|
88655
88775
|
if (Math.abs(lat) <= EPSLN) {
|
|
@@ -88738,7 +88858,7 @@ function inverse$n(p) {
|
|
|
88738
88858
|
if (Math.abs(xx) < EPSLN) {
|
|
88739
88859
|
lon = this.long0;
|
|
88740
88860
|
} else {
|
|
88741
|
-
lon = adjust_lon(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx);
|
|
88861
|
+
lon = adjust_lon(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx, this.over);
|
|
88742
88862
|
}
|
|
88743
88863
|
|
|
88744
88864
|
p.x = lon;
|
|
@@ -88900,7 +89020,7 @@ function forward$o(p) {
|
|
|
88900
89020
|
var lat = p.y;
|
|
88901
89021
|
var sinphi = Math.sin(p.y);
|
|
88902
89022
|
var cosphi = Math.cos(p.y);
|
|
88903
|
-
var dlon = adjust_lon(lon - this.long0);
|
|
89023
|
+
var dlon = adjust_lon(lon - this.long0, this.over);
|
|
88904
89024
|
var e0, e1, e2, e3, Mlp, Ml, c, kp, cos_c, vars, azi1;
|
|
88905
89025
|
if (this.sphere) {
|
|
88906
89026
|
if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
|
|
@@ -88978,12 +89098,12 @@ function inverse$o(p) {
|
|
|
88978
89098
|
con = Math.abs(this.lat0) - HALF_PI;
|
|
88979
89099
|
if (Math.abs(con) <= EPSLN) {
|
|
88980
89100
|
if (this.lat0 >= 0) {
|
|
88981
|
-
lon = adjust_lon(this.long0 + Math.atan2(p.x, -p.y));
|
|
89101
|
+
lon = adjust_lon(this.long0 + Math.atan2(p.x, -p.y), this.over);
|
|
88982
89102
|
} else {
|
|
88983
|
-
lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y));
|
|
89103
|
+
lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y), this.over);
|
|
88984
89104
|
}
|
|
88985
89105
|
} else {
|
|
88986
|
-
lon = adjust_lon(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz));
|
|
89106
|
+
lon = adjust_lon(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz), this.over);
|
|
88987
89107
|
}
|
|
88988
89108
|
}
|
|
88989
89109
|
|
|
@@ -89001,7 +89121,7 @@ function inverse$o(p) {
|
|
|
89001
89121
|
rh = Math.sqrt(p.x * p.x + p.y * p.y);
|
|
89002
89122
|
M = Mlp - rh;
|
|
89003
89123
|
lat = imlfn(M / this.a, e0, e1, e2, e3);
|
|
89004
|
-
lon = adjust_lon(this.long0 + Math.atan2(p.x, -1 * p.y));
|
|
89124
|
+
lon = adjust_lon(this.long0 + Math.atan2(p.x, -1 * p.y), this.over);
|
|
89005
89125
|
p.x = lon;
|
|
89006
89126
|
p.y = lat;
|
|
89007
89127
|
return p;
|
|
@@ -89012,7 +89132,7 @@ function inverse$o(p) {
|
|
|
89012
89132
|
M = rh - Mlp;
|
|
89013
89133
|
|
|
89014
89134
|
lat = imlfn(M / this.a, e0, e1, e2, e3);
|
|
89015
|
-
lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
|
|
89135
|
+
lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y), this.over);
|
|
89016
89136
|
p.x = lon;
|
|
89017
89137
|
p.y = lat;
|
|
89018
89138
|
return p;
|
|
@@ -89049,8 +89169,8 @@ function init$q() {
|
|
|
89049
89169
|
|
|
89050
89170
|
/* Place parameters in static storage for common use
|
|
89051
89171
|
------------------------------------------------- */
|
|
89052
|
-
this.sin_p14 = Math.sin(this.lat0);
|
|
89053
|
-
this.cos_p14 = Math.cos(this.lat0);
|
|
89172
|
+
this.sin_p14 = Math.sin(this.lat0 || 0);
|
|
89173
|
+
this.cos_p14 = Math.cos(this.lat0 || 0);
|
|
89054
89174
|
}
|
|
89055
89175
|
|
|
89056
89176
|
/* Orthographic forward equations--mapping lat,long to x,y
|
|
@@ -89065,7 +89185,7 @@ function forward$p(p) {
|
|
|
89065
89185
|
var lat = p.y;
|
|
89066
89186
|
/* Forward equations
|
|
89067
89187
|
----------------- */
|
|
89068
|
-
dlon = adjust_lon(lon - this.long0);
|
|
89188
|
+
dlon = adjust_lon(lon - (this.long0 || 0), this.over);
|
|
89069
89189
|
|
|
89070
89190
|
sinphi = Math.sin(lat);
|
|
89071
89191
|
cosphi = Math.cos(lat);
|
|
@@ -89075,7 +89195,7 @@ function forward$p(p) {
|
|
|
89075
89195
|
ksp = 1;
|
|
89076
89196
|
if ((g > 0) || (Math.abs(g) <= EPSLN)) {
|
|
89077
89197
|
x = this.a * ksp * cosphi * Math.sin(dlon);
|
|
89078
|
-
y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);
|
|
89198
|
+
y = (this.y0 || 0) + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);
|
|
89079
89199
|
}
|
|
89080
89200
|
p.x = x;
|
|
89081
89201
|
p.y = y;
|
|
@@ -89088,36 +89208,39 @@ function inverse$p(p) {
|
|
|
89088
89208
|
var sinz, cosz; /* sin of z and cos of z */
|
|
89089
89209
|
var con;
|
|
89090
89210
|
var lon, lat;
|
|
89211
|
+
var long0, lat0;
|
|
89091
89212
|
/* Inverse equations
|
|
89092
89213
|
----------------- */
|
|
89093
|
-
p.x -= this.x0;
|
|
89094
|
-
p.y -= this.y0;
|
|
89214
|
+
p.x -= this.x0 || 0;
|
|
89215
|
+
p.y -= this.y0 || 0;
|
|
89095
89216
|
rh = Math.sqrt(p.x * p.x + p.y * p.y);
|
|
89096
89217
|
z = asinz(rh / this.a);
|
|
89097
89218
|
|
|
89098
89219
|
sinz = Math.sin(z);
|
|
89099
89220
|
cosz = Math.cos(z);
|
|
89100
89221
|
|
|
89101
|
-
|
|
89222
|
+
long0 = this.long0 || 0;
|
|
89223
|
+
lat0 = this.lat0 || 0;
|
|
89224
|
+
lon = long0;
|
|
89102
89225
|
if (Math.abs(rh) <= EPSLN) {
|
|
89103
|
-
lat =
|
|
89226
|
+
lat = lat0;
|
|
89104
89227
|
p.x = lon;
|
|
89105
89228
|
p.y = lat;
|
|
89106
89229
|
return p;
|
|
89107
89230
|
}
|
|
89108
89231
|
lat = asinz(cosz * this.sin_p14 + (p.y * sinz * this.cos_p14) / rh);
|
|
89109
|
-
con = Math.abs(
|
|
89232
|
+
con = Math.abs(lat0) - HALF_PI;
|
|
89110
89233
|
if (Math.abs(con) <= EPSLN) {
|
|
89111
|
-
if (
|
|
89112
|
-
lon = adjust_lon(
|
|
89234
|
+
if (lat0 >= 0) {
|
|
89235
|
+
lon = adjust_lon(long0 + Math.atan2(p.x, -p.y), this.over);
|
|
89113
89236
|
} else {
|
|
89114
|
-
lon = adjust_lon(
|
|
89237
|
+
lon = adjust_lon(long0 - Math.atan2(-p.x, p.y), this.over);
|
|
89115
89238
|
}
|
|
89116
89239
|
p.x = lon;
|
|
89117
89240
|
p.y = lat;
|
|
89118
89241
|
return p;
|
|
89119
89242
|
}
|
|
89120
|
-
lon = adjust_lon(
|
|
89243
|
+
lon = adjust_lon(long0 + Math.atan2((p.x * sinz), rh * this.cos_p14 * cosz - p.y * this.sin_p14 * sinz), this.over);
|
|
89121
89244
|
p.x = lon;
|
|
89122
89245
|
p.y = lat;
|
|
89123
89246
|
return p;
|
|
@@ -89587,7 +89710,7 @@ function init$s() {
|
|
|
89587
89710
|
}
|
|
89588
89711
|
|
|
89589
89712
|
function forward$r(ll) {
|
|
89590
|
-
var lon = adjust_lon(ll.x - this.long0);
|
|
89713
|
+
var lon = adjust_lon(ll.x - this.long0, this.over);
|
|
89591
89714
|
|
|
89592
89715
|
var dphi = Math.abs(ll.y);
|
|
89593
89716
|
var i = Math.floor(dphi * C1);
|
|
@@ -89651,7 +89774,7 @@ function inverse$r(xy) {
|
|
|
89651
89774
|
}
|
|
89652
89775
|
}
|
|
89653
89776
|
|
|
89654
|
-
ll.x = adjust_lon(ll.x + this.long0);
|
|
89777
|
+
ll.x = adjust_lon(ll.x + this.long0, this.over);
|
|
89655
89778
|
return ll;
|
|
89656
89779
|
}
|
|
89657
89780
|
|
|
@@ -90083,10 +90206,12 @@ var A1 = 1.340264,
|
|
|
90083
90206
|
function init$w() {
|
|
90084
90207
|
this.es = 0;
|
|
90085
90208
|
this.long0 = this.long0 !== undefined ? this.long0 : 0;
|
|
90209
|
+
this.x0 = this.x0 !== undefined ? this.x0 : 0;
|
|
90210
|
+
this.y0 = this.y0 !== undefined ? this.y0 : 0;
|
|
90086
90211
|
}
|
|
90087
90212
|
|
|
90088
90213
|
function forward$v(p) {
|
|
90089
|
-
var lam = adjust_lon(p.x - this.long0);
|
|
90214
|
+
var lam = adjust_lon(p.x - this.long0, this.over);
|
|
90090
90215
|
var phi = p.y;
|
|
90091
90216
|
var paramLat = Math.asin(M * Math.sin(phi)),
|
|
90092
90217
|
paramLatSq = paramLat * paramLat,
|
|
@@ -90125,7 +90250,7 @@ function inverse$v(p) {
|
|
|
90125
90250
|
/ Math.cos(paramLat);
|
|
90126
90251
|
p.y = Math.asin(Math.sin(paramLat) / M);
|
|
90127
90252
|
|
|
90128
|
-
p.x = adjust_lon(p.x + this.long0);
|
|
90253
|
+
p.x = adjust_lon(p.x + this.long0, this.over);
|
|
90129
90254
|
return p;
|
|
90130
90255
|
}
|
|
90131
90256
|
|
|
@@ -90176,7 +90301,7 @@ function init$x() {
|
|
|
90176
90301
|
}
|
|
90177
90302
|
|
|
90178
90303
|
function e_fwd(p) {
|
|
90179
|
-
var lam = adjust_lon(p.x - (this.long0 || 0));
|
|
90304
|
+
var lam = adjust_lon(p.x - (this.long0 || 0), this.over);
|
|
90180
90305
|
var phi = p.y;
|
|
90181
90306
|
var rh, E, c;
|
|
90182
90307
|
rh = this.am1 + this.m1 - pj_mlfn(phi, E = Math.sin(phi), c = Math.cos(phi), this.en);
|
|
@@ -90204,13 +90329,13 @@ function e_inv(p) {
|
|
|
90204
90329
|
} else {
|
|
90205
90330
|
throw new Error();
|
|
90206
90331
|
}
|
|
90207
|
-
p.x = adjust_lon(lam + (this.long0 || 0));
|
|
90332
|
+
p.x = adjust_lon(lam + (this.long0 || 0), this.over);
|
|
90208
90333
|
p.y = adjust_lat(phi);
|
|
90209
90334
|
return p;
|
|
90210
90335
|
}
|
|
90211
90336
|
|
|
90212
90337
|
function s_fwd(p) {
|
|
90213
|
-
var lam = adjust_lon(p.x - (this.long0 || 0));
|
|
90338
|
+
var lam = adjust_lon(p.x - (this.long0 || 0), this.over);
|
|
90214
90339
|
var phi = p.y;
|
|
90215
90340
|
var E, rh;
|
|
90216
90341
|
rh = this.cphi1 + this.phi1 - phi;
|
|
@@ -90241,7 +90366,7 @@ function s_inv(p) {
|
|
|
90241
90366
|
} else {
|
|
90242
90367
|
lam = rh * Math.atan2(p.x, p.y) / Math.cos(phi);
|
|
90243
90368
|
}
|
|
90244
|
-
p.x = adjust_lon(lam + (this.long0 || 0));
|
|
90369
|
+
p.x = adjust_lon(lam + (this.long0 || 0), this.over);
|
|
90245
90370
|
p.y = adjust_lat(phi);
|
|
90246
90371
|
return p;
|
|
90247
90372
|
}
|
|
@@ -90252,6 +90377,373 @@ var bonne = {
|
|
|
90252
90377
|
names: names$y
|
|
90253
90378
|
};
|
|
90254
90379
|
|
|
90380
|
+
/**
|
|
90381
|
+
Original projection implementation:
|
|
90382
|
+
https://github.com/OSGeo/PROJ/blob/46c47e9adf6376ae06afabe5d24a0016a05ced82/src/projections/ob_tran.cpp
|
|
90383
|
+
|
|
90384
|
+
Documentation:
|
|
90385
|
+
https://proj.org/operations/projections/ob_tran.html
|
|
90386
|
+
|
|
90387
|
+
References/Formulas:
|
|
90388
|
+
https://pubs.usgs.gov/pp/1395/report.pdf
|
|
90389
|
+
|
|
90390
|
+
Examples:
|
|
90391
|
+
+proj=ob_tran +o_proj=moll +o_lat_p=45 +o_lon_p=-90
|
|
90392
|
+
+proj=ob_tran +o_proj=moll +o_lat_p=45 +o_lon_p=-90 +lon_0=60
|
|
90393
|
+
+proj=ob_tran +o_proj=moll +o_lat_p=45 +o_lon_p=-90 +lon_0=-90
|
|
90394
|
+
*/
|
|
90395
|
+
|
|
90396
|
+
const projectionType = {
|
|
90397
|
+
OBLIQUE: {
|
|
90398
|
+
forward: forwardOblique,
|
|
90399
|
+
inverse: inverseOblique
|
|
90400
|
+
},
|
|
90401
|
+
TRANSVERSE: {
|
|
90402
|
+
forward: forwardTransverse,
|
|
90403
|
+
inverse: inverseTransverse
|
|
90404
|
+
}
|
|
90405
|
+
};
|
|
90406
|
+
|
|
90407
|
+
/**
|
|
90408
|
+
* @typedef {Object} LocalThis
|
|
90409
|
+
* @property {number} lamp
|
|
90410
|
+
* @property {number} cphip
|
|
90411
|
+
* @property {number} sphip
|
|
90412
|
+
* @property {Object} projectionType
|
|
90413
|
+
* @property {string | undefined} o_proj
|
|
90414
|
+
* @property {string | undefined} o_lon_p
|
|
90415
|
+
* @property {string | undefined} o_lat_p
|
|
90416
|
+
* @property {string | undefined} o_alpha
|
|
90417
|
+
* @property {string | undefined} o_lon_c
|
|
90418
|
+
* @property {string | undefined} o_lat_c
|
|
90419
|
+
* @property {string | undefined} o_lon_1
|
|
90420
|
+
* @property {string | undefined} o_lat_1
|
|
90421
|
+
* @property {string | undefined} o_lon_2
|
|
90422
|
+
* @property {string | undefined} o_lat_2
|
|
90423
|
+
* @property {number | undefined} oLongP
|
|
90424
|
+
* @property {number | undefined} oLatP
|
|
90425
|
+
* @property {number | undefined} oAlpha
|
|
90426
|
+
* @property {number | undefined} oLongC
|
|
90427
|
+
* @property {number | undefined} oLatC
|
|
90428
|
+
* @property {number | undefined} oLong1
|
|
90429
|
+
* @property {number | undefined} oLat1
|
|
90430
|
+
* @property {number | undefined} oLong2
|
|
90431
|
+
* @property {number | undefined} oLat2
|
|
90432
|
+
* @property {boolean} isIdentity
|
|
90433
|
+
* @property {import('..').Converter} obliqueProjection
|
|
90434
|
+
*
|
|
90435
|
+
*/
|
|
90436
|
+
|
|
90437
|
+
/**
|
|
90438
|
+
* Parameters can be from the following sets:
|
|
90439
|
+
* New pole --> o_lat_p, o_lon_p
|
|
90440
|
+
* Rotate about point --> o_alpha, o_lon_c, o_lat_c
|
|
90441
|
+
* New equator points --> lon_1, lat_1, lon_2, lat_2
|
|
90442
|
+
*
|
|
90443
|
+
* Per the original source code, the parameter sets are
|
|
90444
|
+
* checked in the order of the object below.
|
|
90445
|
+
*/
|
|
90446
|
+
const paramSets = {
|
|
90447
|
+
ROTATE: {
|
|
90448
|
+
o_alpha: 'oAlpha',
|
|
90449
|
+
o_lon_c: 'oLongC',
|
|
90450
|
+
o_lat_c: 'oLatC'
|
|
90451
|
+
},
|
|
90452
|
+
NEW_POLE: {
|
|
90453
|
+
o_lat_p: 'oLatP',
|
|
90454
|
+
o_lon_p: 'oLongP'
|
|
90455
|
+
},
|
|
90456
|
+
NEW_EQUATOR: {
|
|
90457
|
+
o_lon_1: 'oLong1',
|
|
90458
|
+
o_lat_1: 'oLat1',
|
|
90459
|
+
o_lon_2: 'oLong2',
|
|
90460
|
+
o_lat_2: 'oLat2'
|
|
90461
|
+
}
|
|
90462
|
+
};
|
|
90463
|
+
|
|
90464
|
+
/** @this {import('../defs.js').ProjectionDefinition & LocalThis} */
|
|
90465
|
+
function init$y() {
|
|
90466
|
+
this.x0 = this.x0 || 0;
|
|
90467
|
+
this.y0 = this.y0 || 0;
|
|
90468
|
+
this.long0 = this.long0 || 0;
|
|
90469
|
+
this.title = this.title || 'General Oblique Transformation';
|
|
90470
|
+
this.isIdentity = names$1.includes(this.o_proj);
|
|
90471
|
+
|
|
90472
|
+
/** Verify required parameters exist */
|
|
90473
|
+
if (!this.o_proj) {
|
|
90474
|
+
throw new Error('Missing parameter: o_proj');
|
|
90475
|
+
}
|
|
90476
|
+
|
|
90477
|
+
if (this.o_proj === `ob_tran`) {
|
|
90478
|
+
throw new Error('Invalid value for o_proj: ' + this.o_proj);
|
|
90479
|
+
}
|
|
90480
|
+
|
|
90481
|
+
const newProjStr = this.projStr.replace('+proj=ob_tran', '').replace('+o_proj=', '+proj=').trim();
|
|
90482
|
+
|
|
90483
|
+
/** @type {import('../defs.js').ProjectionDefinition} */
|
|
90484
|
+
const oProj = Projection$1(newProjStr);
|
|
90485
|
+
if (!oProj) {
|
|
90486
|
+
throw new Error('Invalid parameter: o_proj. Unknown projection ' + this.o_proj);
|
|
90487
|
+
}
|
|
90488
|
+
oProj.long0 = 0; // we handle long0 before/after forward/inverse
|
|
90489
|
+
this.obliqueProjection = oProj;
|
|
90490
|
+
|
|
90491
|
+
let matchedSet;
|
|
90492
|
+
const paramSetsKeys = Object.keys(paramSets);
|
|
90493
|
+
|
|
90494
|
+
/**
|
|
90495
|
+
* parse strings, convert to radians, throw on NaN
|
|
90496
|
+
* @param {string} name
|
|
90497
|
+
* @returns {number | undefined}
|
|
90498
|
+
*/
|
|
90499
|
+
const parseParam = (name) => {
|
|
90500
|
+
if (typeof this[name] === `undefined`) {
|
|
90501
|
+
return undefined;
|
|
90502
|
+
}
|
|
90503
|
+
const val = parseFloat(this[name]) * D2R;
|
|
90504
|
+
if (isNaN(val)) {
|
|
90505
|
+
throw new Error('Invalid value for ' + name + ': ' + this[name]);
|
|
90506
|
+
}
|
|
90507
|
+
return val;
|
|
90508
|
+
};
|
|
90509
|
+
|
|
90510
|
+
for (let i = 0; i < paramSetsKeys.length; i++) {
|
|
90511
|
+
const setKey = paramSetsKeys[i];
|
|
90512
|
+
const set = paramSets[setKey];
|
|
90513
|
+
const params = Object.entries(set);
|
|
90514
|
+
const setHasParams = params.some(
|
|
90515
|
+
([p]) => typeof this[p] !== 'undefined'
|
|
90516
|
+
);
|
|
90517
|
+
if (!setHasParams) {
|
|
90518
|
+
continue;
|
|
90519
|
+
}
|
|
90520
|
+
matchedSet = set;
|
|
90521
|
+
for (let ii = 0; ii < params.length; ii++) {
|
|
90522
|
+
const [inputParam, param] = params[ii];
|
|
90523
|
+
const val = parseParam(inputParam);
|
|
90524
|
+
if (typeof val === 'undefined') {
|
|
90525
|
+
throw new Error('Missing parameter: ' + inputParam + '.');
|
|
90526
|
+
}
|
|
90527
|
+
this[param] = val;
|
|
90528
|
+
}
|
|
90529
|
+
break;
|
|
90530
|
+
}
|
|
90531
|
+
|
|
90532
|
+
if (!matchedSet) {
|
|
90533
|
+
throw new Error('No valid parameters provided for ob_tran projection.');
|
|
90534
|
+
}
|
|
90535
|
+
|
|
90536
|
+
const { lamp, phip } = createRotation(this, matchedSet);
|
|
90537
|
+
this.lamp = lamp;
|
|
90538
|
+
|
|
90539
|
+
if (Math.abs(phip) > EPSLN) {
|
|
90540
|
+
this.cphip = Math.cos(phip);
|
|
90541
|
+
this.sphip = Math.sin(phip);
|
|
90542
|
+
this.projectionType = projectionType.OBLIQUE;
|
|
90543
|
+
} else {
|
|
90544
|
+
this.projectionType = projectionType.TRANSVERSE;
|
|
90545
|
+
}
|
|
90546
|
+
}
|
|
90547
|
+
|
|
90548
|
+
// ob_tran forward equations--mapping (lat,long) to (x,y)
|
|
90549
|
+
// transverse (90 degrees from normal orientation) - forwardTransverse
|
|
90550
|
+
// or oblique (arbitrary angle) used based on parameters - forwardOblique
|
|
90551
|
+
// -----------------------------------------------------------------
|
|
90552
|
+
/** @this {import('../defs.js').ProjectionDefinition & LocalThis} */
|
|
90553
|
+
function forward$w(p) {
|
|
90554
|
+
return this.projectionType.forward(this, p);
|
|
90555
|
+
}
|
|
90556
|
+
|
|
90557
|
+
// inverse equations--mapping (x,y) to (lat,long)
|
|
90558
|
+
// transverse: inverseTransverse
|
|
90559
|
+
// oblique: inverseOblique
|
|
90560
|
+
// -----------------------------------------------------------------
|
|
90561
|
+
/** @this {import('../defs.js').ProjectionDefinition & LocalThis} */
|
|
90562
|
+
function inverse$w(p) {
|
|
90563
|
+
return this.projectionType.inverse(this, p);
|
|
90564
|
+
}
|
|
90565
|
+
|
|
90566
|
+
/**
|
|
90567
|
+
* @param {import('../defs.js').ProjectionDefinition & LocalThis} params - Initialized projection definition
|
|
90568
|
+
* @param {Object} how - Transformation method
|
|
90569
|
+
* @returns {{phip: number, lamp: number}}
|
|
90570
|
+
*/
|
|
90571
|
+
function createRotation(params, how) {
|
|
90572
|
+
let phip, lamp;
|
|
90573
|
+
if (how === paramSets.ROTATE) {
|
|
90574
|
+
let lamc = params.oLongC;
|
|
90575
|
+
let phic = params.oLatC;
|
|
90576
|
+
let alpha = params.oAlpha;
|
|
90577
|
+
if (Math.abs(Math.abs(phic) - HALF_PI) <= EPSLN) {
|
|
90578
|
+
throw new Error('Invalid value for o_lat_c: ' + params.o_lat_c + ' should be < 90°');
|
|
90579
|
+
}
|
|
90580
|
+
lamp = lamc + Math.atan2(-1 * Math.cos(alpha), -1 * Math.sin(alpha) * Math.sin(phic));
|
|
90581
|
+
phip = Math.asin(Math.cos(phic) * Math.sin(alpha));
|
|
90582
|
+
} else if (how === paramSets.NEW_POLE) {
|
|
90583
|
+
lamp = params.oLongP;
|
|
90584
|
+
phip = params.oLatP;
|
|
90585
|
+
} else {
|
|
90586
|
+
let lam1 = params.oLong1;
|
|
90587
|
+
let phi1 = params.oLat1;
|
|
90588
|
+
let lam2 = params.oLong2;
|
|
90589
|
+
let phi2 = params.oLat2;
|
|
90590
|
+
let con = Math.abs(phi1);
|
|
90591
|
+
|
|
90592
|
+
if (Math.abs(phi1) > HALF_PI - EPSLN) {
|
|
90593
|
+
throw new Error('Invalid value for o_lat_1: ' + params.o_lat_1 + ' should be < 90°');
|
|
90594
|
+
}
|
|
90595
|
+
|
|
90596
|
+
if (Math.abs(phi2) > HALF_PI - EPSLN) {
|
|
90597
|
+
throw new Error('Invalid value for o_lat_2: ' + params.o_lat_2 + ' should be < 90°');
|
|
90598
|
+
}
|
|
90599
|
+
|
|
90600
|
+
if (Math.abs(phi1 - phi2) < EPSLN) {
|
|
90601
|
+
throw new Error('Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2');
|
|
90602
|
+
}
|
|
90603
|
+
if (con < EPSLN) {
|
|
90604
|
+
throw new Error('Invalid value for o_lat_1: o_lat_1 should be different from zero');
|
|
90605
|
+
}
|
|
90606
|
+
|
|
90607
|
+
lamp = Math.atan2(
|
|
90608
|
+
(Math.cos(phi1) * Math.sin(phi2) * Math.cos(lam1))
|
|
90609
|
+
- (Math.sin(phi1) * Math.cos(phi2) * Math.cos(lam2)),
|
|
90610
|
+
(Math.sin(phi1) * Math.cos(phi2) * Math.sin(lam2))
|
|
90611
|
+
- (Math.cos(phi1) * Math.sin(phi2) * Math.sin(lam1))
|
|
90612
|
+
);
|
|
90613
|
+
|
|
90614
|
+
phip = Math.atan(-1 * Math.cos(lamp - lam1) / Math.tan(phi1));
|
|
90615
|
+
}
|
|
90616
|
+
|
|
90617
|
+
return { lamp, phip };
|
|
90618
|
+
}
|
|
90619
|
+
|
|
90620
|
+
/**
|
|
90621
|
+
* Forward (lng, lat) to (x, y) for oblique case
|
|
90622
|
+
* @param {import('../defs.js').ProjectionDefinition & LocalThis} self
|
|
90623
|
+
* @param {{x: number, y: number}} lp - lambda, phi
|
|
90624
|
+
*/
|
|
90625
|
+
function forwardOblique(self, lp) {
|
|
90626
|
+
let { x: lam, y: phi } = lp;
|
|
90627
|
+
lam += self.long0;
|
|
90628
|
+
const coslam = Math.cos(lam);
|
|
90629
|
+
const sinphi = Math.sin(phi);
|
|
90630
|
+
const cosphi = Math.cos(phi);
|
|
90631
|
+
|
|
90632
|
+
lp.x = adjust_lon(
|
|
90633
|
+
Math.atan2(
|
|
90634
|
+
cosphi * Math.sin(lam),
|
|
90635
|
+
(self.sphip * cosphi * coslam) + (self.cphip * sinphi)
|
|
90636
|
+
) + self.lamp
|
|
90637
|
+
);
|
|
90638
|
+
lp.y = Math.asin(
|
|
90639
|
+
(self.sphip * sinphi) - (self.cphip * cosphi * coslam)
|
|
90640
|
+
);
|
|
90641
|
+
|
|
90642
|
+
const result = self.obliqueProjection.forward(lp);
|
|
90643
|
+
if (self.isIdentity) {
|
|
90644
|
+
result.x *= R2D;
|
|
90645
|
+
result.y *= R2D;
|
|
90646
|
+
}
|
|
90647
|
+
return result;
|
|
90648
|
+
}
|
|
90649
|
+
|
|
90650
|
+
/**
|
|
90651
|
+
* Forward (lng, lat) to (x, y) for transverse case
|
|
90652
|
+
* @param {import('../defs.js').ProjectionDefinition & LocalThis} self
|
|
90653
|
+
* @param {{x: number, y: number}} lp - lambda, phi
|
|
90654
|
+
*/
|
|
90655
|
+
function forwardTransverse(self, lp) {
|
|
90656
|
+
let { x: lam, y: phi } = lp;
|
|
90657
|
+
lam += self.long0;
|
|
90658
|
+
const cosphi = Math.cos(phi);
|
|
90659
|
+
const coslam = Math.cos(lam);
|
|
90660
|
+
lp.x = adjust_lon(
|
|
90661
|
+
Math.atan2(
|
|
90662
|
+
cosphi * Math.sin(lam),
|
|
90663
|
+
Math.sin(phi)
|
|
90664
|
+
) + self.lamp
|
|
90665
|
+
);
|
|
90666
|
+
lp.y = Math.asin(-1 * cosphi * coslam);
|
|
90667
|
+
|
|
90668
|
+
const result = self.obliqueProjection.forward(lp);
|
|
90669
|
+
|
|
90670
|
+
if (self.isIdentity) {
|
|
90671
|
+
result.x *= R2D;
|
|
90672
|
+
result.y *= R2D;
|
|
90673
|
+
}
|
|
90674
|
+
return result;
|
|
90675
|
+
}
|
|
90676
|
+
|
|
90677
|
+
/**
|
|
90678
|
+
* Inverse (x, y) to (lng, lat) for oblique case
|
|
90679
|
+
* @param {import('../defs.js').ProjectionDefinition & LocalThis} self
|
|
90680
|
+
* @param {{x: number, y: number}} lp - lambda, phi
|
|
90681
|
+
*/
|
|
90682
|
+
function inverseOblique(self, lp) {
|
|
90683
|
+
if (self.isIdentity) {
|
|
90684
|
+
lp.x *= D2R;
|
|
90685
|
+
lp.y *= D2R;
|
|
90686
|
+
}
|
|
90687
|
+
|
|
90688
|
+
const innerLp = self.obliqueProjection.inverse(lp);
|
|
90689
|
+
let { x: lam, y: phi } = innerLp;
|
|
90690
|
+
|
|
90691
|
+
if (lam < Number.MAX_VALUE) {
|
|
90692
|
+
lam -= self.lamp;
|
|
90693
|
+
const coslam = Math.cos(lam);
|
|
90694
|
+
const sinphi = Math.sin(phi);
|
|
90695
|
+
const cosphi = Math.cos(phi);
|
|
90696
|
+
lp.x = Math.atan2(
|
|
90697
|
+
cosphi * Math.sin(lam),
|
|
90698
|
+
(self.sphip * cosphi * coslam) - (self.cphip * sinphi)
|
|
90699
|
+
);
|
|
90700
|
+
lp.y = Math.asin(
|
|
90701
|
+
(self.sphip * sinphi) + (self.cphip * cosphi * coslam)
|
|
90702
|
+
);
|
|
90703
|
+
}
|
|
90704
|
+
|
|
90705
|
+
lp.x = adjust_lon(lp.x + self.long0);
|
|
90706
|
+
return lp;
|
|
90707
|
+
}
|
|
90708
|
+
|
|
90709
|
+
/**
|
|
90710
|
+
* Inverse (x, y) to (lng, lat) for transverse case
|
|
90711
|
+
* @param {import('../defs.js').ProjectionDefinition & LocalThis} self
|
|
90712
|
+
* @param {{x: number, y: number}} lp - lambda, phi
|
|
90713
|
+
*/
|
|
90714
|
+
function inverseTransverse(self, lp) {
|
|
90715
|
+
if (self.isIdentity) {
|
|
90716
|
+
lp.x *= D2R;
|
|
90717
|
+
lp.y *= D2R;
|
|
90718
|
+
}
|
|
90719
|
+
|
|
90720
|
+
const innerLp = self.obliqueProjection.inverse(lp);
|
|
90721
|
+
let { x: lam, y: phi } = innerLp;
|
|
90722
|
+
|
|
90723
|
+
if (lam < Number.MAX_VALUE) {
|
|
90724
|
+
const cosphi = Math.cos(phi);
|
|
90725
|
+
lam -= self.lamp;
|
|
90726
|
+
lp.x = Math.atan2(
|
|
90727
|
+
cosphi * Math.sin(lam),
|
|
90728
|
+
-1 * Math.sin(phi)
|
|
90729
|
+
);
|
|
90730
|
+
lp.y = Math.asin(
|
|
90731
|
+
cosphi * Math.cos(lam)
|
|
90732
|
+
);
|
|
90733
|
+
}
|
|
90734
|
+
|
|
90735
|
+
lp.x = adjust_lon(lp.x + self.long0);
|
|
90736
|
+
return lp;
|
|
90737
|
+
}
|
|
90738
|
+
|
|
90739
|
+
var names$z = ['General Oblique Transformation', 'General_Oblique_Transformation', 'ob_tran'];
|
|
90740
|
+
var ob_tran = {
|
|
90741
|
+
init: init$y,
|
|
90742
|
+
forward: forward$w,
|
|
90743
|
+
inverse: inverse$w,
|
|
90744
|
+
names: names$z
|
|
90745
|
+
};
|
|
90746
|
+
|
|
90255
90747
|
function includedProjections (proj4) {
|
|
90256
90748
|
proj4.Proj.projections.add(tmerc);
|
|
90257
90749
|
proj4.Proj.projections.add(etmerc);
|
|
@@ -90284,6 +90776,7 @@ function includedProjections (proj4) {
|
|
|
90284
90776
|
proj4.Proj.projections.add(geos);
|
|
90285
90777
|
proj4.Proj.projections.add(eqearth);
|
|
90286
90778
|
proj4.Proj.projections.add(bonne);
|
|
90779
|
+
proj4.Proj.projections.add(ob_tran);
|
|
90287
90780
|
}
|
|
90288
90781
|
|
|
90289
90782
|
/**
|
|
@@ -90326,7 +90819,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
90326
90819
|
var undefined$1;
|
|
90327
90820
|
|
|
90328
90821
|
/** Used as the semantic version number. */
|
|
90329
|
-
var VERSION = '4.
|
|
90822
|
+
var VERSION = '4.18.1';
|
|
90330
90823
|
|
|
90331
90824
|
/** Used as the size to enable large array optimizations. */
|
|
90332
90825
|
var LARGE_ARRAY_SIZE = 200;
|
|
@@ -90334,7 +90827,8 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
90334
90827
|
/** Error message constants. */
|
|
90335
90828
|
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
|
90336
90829
|
FUNC_ERROR_TEXT = 'Expected a function',
|
|
90337
|
-
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'
|
|
90830
|
+
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',
|
|
90831
|
+
INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';
|
|
90338
90832
|
|
|
90339
90833
|
/** Used to stand-in for `undefined` hash values. */
|
|
90340
90834
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
@@ -92066,6 +92560,10 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
92066
92560
|
* embedded Ruby (ERB) as well as ES2015 template strings. Change the
|
|
92067
92561
|
* following template settings to use alternative delimiters.
|
|
92068
92562
|
*
|
|
92563
|
+
* **Security:** See
|
|
92564
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)
|
|
92565
|
+
* — `_.template` is insecure and will be removed in v5.
|
|
92566
|
+
*
|
|
92069
92567
|
* @static
|
|
92070
92568
|
* @memberOf _
|
|
92071
92569
|
* @type {Object}
|
|
@@ -92614,7 +93112,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
92614
93112
|
* @name has
|
|
92615
93113
|
* @memberOf SetCache
|
|
92616
93114
|
* @param {*} value The value to search for.
|
|
92617
|
-
* @returns {
|
|
93115
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
92618
93116
|
*/
|
|
92619
93117
|
function setCacheHas(value) {
|
|
92620
93118
|
return this.__data__.has(value);
|
|
@@ -94080,7 +94578,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
94080
94578
|
if (isArray(iteratee)) {
|
|
94081
94579
|
return function(value) {
|
|
94082
94580
|
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
94083
|
-
}
|
|
94581
|
+
};
|
|
94084
94582
|
}
|
|
94085
94583
|
return iteratee;
|
|
94086
94584
|
});
|
|
@@ -94684,8 +95182,34 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
94684
95182
|
*/
|
|
94685
95183
|
function baseUnset(object, path) {
|
|
94686
95184
|
path = castPath(path, object);
|
|
94687
|
-
|
|
94688
|
-
|
|
95185
|
+
|
|
95186
|
+
// Prevent prototype pollution:
|
|
95187
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
95188
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
|
|
95189
|
+
var index = -1,
|
|
95190
|
+
length = path.length;
|
|
95191
|
+
|
|
95192
|
+
if (!length) {
|
|
95193
|
+
return true;
|
|
95194
|
+
}
|
|
95195
|
+
|
|
95196
|
+
while (++index < length) {
|
|
95197
|
+
var key = toKey(path[index]);
|
|
95198
|
+
|
|
95199
|
+
// Always block "__proto__" anywhere in the path if it's not expected
|
|
95200
|
+
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
|
95201
|
+
return false;
|
|
95202
|
+
}
|
|
95203
|
+
|
|
95204
|
+
// Block constructor/prototype as non-terminal traversal keys to prevent
|
|
95205
|
+
// escaping the object graph into built-in constructors and prototypes.
|
|
95206
|
+
if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
|
|
95207
|
+
return false;
|
|
95208
|
+
}
|
|
95209
|
+
}
|
|
95210
|
+
|
|
95211
|
+
var obj = parent(object, path);
|
|
95212
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
94689
95213
|
}
|
|
94690
95214
|
|
|
94691
95215
|
/**
|
|
@@ -97236,7 +97760,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
97236
97760
|
|
|
97237
97761
|
/**
|
|
97238
97762
|
* Creates an array with all falsey values removed. The values `false`, `null`,
|
|
97239
|
-
* `0`, `""`, `undefined`, and `NaN` are
|
|
97763
|
+
* `0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.
|
|
97240
97764
|
*
|
|
97241
97765
|
* @static
|
|
97242
97766
|
* @memberOf _
|
|
@@ -97775,7 +98299,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
97775
98299
|
|
|
97776
98300
|
while (++index < length) {
|
|
97777
98301
|
var pair = pairs[index];
|
|
97778
|
-
result
|
|
98302
|
+
baseAssignValue(result, pair[0], pair[1]);
|
|
97779
98303
|
}
|
|
97780
98304
|
return result;
|
|
97781
98305
|
}
|
|
@@ -104435,6 +104959,8 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
104435
104959
|
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
104436
104960
|
* floating-point values which can produce unexpected results.
|
|
104437
104961
|
*
|
|
104962
|
+
* **Note:** If `lower` is greater than `upper`, the values are swapped.
|
|
104963
|
+
*
|
|
104438
104964
|
* @static
|
|
104439
104965
|
* @memberOf _
|
|
104440
104966
|
* @since 0.7.0
|
|
@@ -104448,9 +104974,16 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
104448
104974
|
* _.random(0, 5);
|
|
104449
104975
|
* // => an integer between 0 and 5
|
|
104450
104976
|
*
|
|
104977
|
+
* // when lower is greater than upper the values are swapped
|
|
104978
|
+
* _.random(5, 0);
|
|
104979
|
+
* // => an integer between 0 and 5
|
|
104980
|
+
*
|
|
104451
104981
|
* _.random(5);
|
|
104452
104982
|
* // => also an integer between 0 and 5
|
|
104453
104983
|
*
|
|
104984
|
+
* _.random(-5);
|
|
104985
|
+
* // => an integer between -5 and 0
|
|
104986
|
+
*
|
|
104454
104987
|
* _.random(5, true);
|
|
104455
104988
|
* // => a floating-point number between 0 and 5
|
|
104456
104989
|
*
|
|
@@ -105052,6 +105585,10 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
105052
105585
|
* properties may be accessed as free variables in the template. If a setting
|
|
105053
105586
|
* object is given, it takes precedence over `_.templateSettings` values.
|
|
105054
105587
|
*
|
|
105588
|
+
* **Security:** `_.template` is insecure and should not be used. It will be
|
|
105589
|
+
* removed in Lodash v5. Avoid untrusted input. See
|
|
105590
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).
|
|
105591
|
+
*
|
|
105055
105592
|
* **Note:** In the development build `_.template` utilizes
|
|
105056
105593
|
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
|
105057
105594
|
* for easier debugging.
|
|
@@ -105159,12 +105696,18 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
105159
105696
|
options = undefined$1;
|
|
105160
105697
|
}
|
|
105161
105698
|
string = toString(string);
|
|
105162
|
-
options =
|
|
105699
|
+
options = assignWith({}, options, settings, customDefaultsAssignIn);
|
|
105163
105700
|
|
|
105164
|
-
var imports =
|
|
105701
|
+
var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),
|
|
105165
105702
|
importsKeys = keys(imports),
|
|
105166
105703
|
importsValues = baseValues(imports, importsKeys);
|
|
105167
105704
|
|
|
105705
|
+
arrayEach(importsKeys, function(key) {
|
|
105706
|
+
if (reForbiddenIdentifierChars.test(key)) {
|
|
105707
|
+
throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);
|
|
105708
|
+
}
|
|
105709
|
+
});
|
|
105710
|
+
|
|
105168
105711
|
var isEscaping,
|
|
105169
105712
|
isEvaluating,
|
|
105170
105713
|
index = 0,
|
|
@@ -107810,7 +108353,7 @@ var mapViewBundle = {
|
|
|
107810
108353
|
var dispatch = _ref5.dispatch,
|
|
107811
108354
|
store = _ref5.store;
|
|
107812
108355
|
} // @TODO get the layer from the store and figure out where to zoom to
|
|
107813
|
-
|
|
108356
|
+
;
|
|
107814
108357
|
},
|
|
107815
108358
|
doZoomToLocation: function doZoomToLocation(center, zoom) {
|
|
107816
108359
|
return function (_ref6) {
|
|
@@ -109315,7 +109858,7 @@ var config = {
|
|
|
109315
109858
|
};
|
|
109316
109859
|
|
|
109317
109860
|
var name = "@corpsmap/corpsmap";
|
|
109318
|
-
var version$1 = "3.2.
|
|
109861
|
+
var version$1 = "3.2.93";
|
|
109319
109862
|
var description = "CorpsMap as React Components";
|
|
109320
109863
|
var main = "index.js";
|
|
109321
109864
|
var scripts = {
|
|
@@ -132998,9 +133541,10 @@ function NodeList() {
|
|
|
132998
133541
|
item: function(index) {
|
|
132999
133542
|
return index >= 0 && index < this.length ? this[index] : null;
|
|
133000
133543
|
},
|
|
133001
|
-
toString:function(isHTML,nodeFilter){
|
|
133544
|
+
toString:function(isHTML,nodeFilter,options){
|
|
133545
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
133002
133546
|
for(var buf = [], i = 0;i<this.length;i++){
|
|
133003
|
-
serializeToString(this[i],buf,isHTML,nodeFilter);
|
|
133547
|
+
serializeToString(this[i],buf,isHTML,nodeFilter,null,requireWellFormed);
|
|
133004
133548
|
}
|
|
133005
133549
|
return buf.join('');
|
|
133006
133550
|
},
|
|
@@ -133245,13 +133789,28 @@ DOMImplementation.prototype = {
|
|
|
133245
133789
|
/**
|
|
133246
133790
|
* Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
|
|
133247
133791
|
*
|
|
133248
|
-
* __This
|
|
133792
|
+
* __This implementation differs from the specification:__
|
|
133249
133793
|
* - this implementation is not validating names or qualified names
|
|
133250
133794
|
* (when parsing XML strings, the SAX parser takes care of that)
|
|
133251
133795
|
*
|
|
133796
|
+
* Note: `internalSubset` can only be introduced via a direct property write to `node.internalSubset` after creation.
|
|
133797
|
+
* Creation-time validation of `publicId`, `systemId` is not enforced.
|
|
133798
|
+
* The serializer-level check covers all mutation vectors, including direct property writes.
|
|
133799
|
+
* `internalSubset` is only serialized as `[ ... ]` when both `publicId` and `systemId` are
|
|
133800
|
+
* absent (empty or `'.'`) — if either external identifier is present, `internalSubset` is
|
|
133801
|
+
* silently omitted from the serialized output.
|
|
133802
|
+
*
|
|
133252
133803
|
* @param {string} qualifiedName
|
|
133253
133804
|
* @param {string} [publicId]
|
|
133805
|
+
* The external subset public identifier. Stored verbatim including surrounding quotes.
|
|
133806
|
+
* When serialized with `requireWellFormed: true` (via the 4th-parameter options object),
|
|
133807
|
+
* throws `DOMException` with code `INVALID_STATE_ERR` if the value is non-empty and does
|
|
133808
|
+
* not match the XML `PubidLiteral` production (W3C DOM Parsing §3.2.1.3; XML 1.0 [12]).
|
|
133254
133809
|
* @param {string} [systemId]
|
|
133810
|
+
* The external subset system identifier. Stored verbatim including surrounding quotes.
|
|
133811
|
+
* When serialized with `requireWellFormed: true`, throws `DOMException` with code
|
|
133812
|
+
* `INVALID_STATE_ERR` if the value is non-empty and does not match the XML `SystemLiteral`
|
|
133813
|
+
* production (W3C DOM Parsing §3.2.1.3; XML 1.0 [11]).
|
|
133255
133814
|
* @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
|
|
133256
133815
|
* or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
|
|
133257
133816
|
*
|
|
@@ -133317,18 +133876,44 @@ Node$1.prototype = {
|
|
|
133317
133876
|
return cloneNode(this.ownerDocument||this,this,deep);
|
|
133318
133877
|
},
|
|
133319
133878
|
// Modified in DOM Level 2:
|
|
133320
|
-
|
|
133321
|
-
|
|
133322
|
-
|
|
133323
|
-
|
|
133324
|
-
|
|
133325
|
-
|
|
133326
|
-
|
|
133327
|
-
|
|
133328
|
-
|
|
133329
|
-
|
|
133330
|
-
|
|
133331
|
-
|
|
133879
|
+
/**
|
|
133880
|
+
* Puts the specified node and all of its subtree into a "normalized" form. In a normalized
|
|
133881
|
+
* subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
|
|
133882
|
+
*
|
|
133883
|
+
* Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
|
|
133884
|
+
* is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
|
|
133885
|
+
* nodes.
|
|
133886
|
+
*
|
|
133887
|
+
* This method iteratively traverses all child nodes to normalize all descendant nodes within
|
|
133888
|
+
* the subtree.
|
|
133889
|
+
*
|
|
133890
|
+
* @throws {DOMException}
|
|
133891
|
+
* May throw a DOMException if operations within removeChild or appendData (which are
|
|
133892
|
+
* potentially invoked in this method) do not meet their specific constraints.
|
|
133893
|
+
* @see {@link Node.removeChild}
|
|
133894
|
+
* @see {@link CharacterData.appendData}
|
|
133895
|
+
* @see ../docs/walk-dom.md.
|
|
133896
|
+
*/
|
|
133897
|
+
normalize: function () {
|
|
133898
|
+
walkDOM(this, null, {
|
|
133899
|
+
enter: function (node) {
|
|
133900
|
+
// Merge adjacent text children of node before walkDOM schedules them.
|
|
133901
|
+
// walkDOM reads lastChild/previousSibling after enter returns, so the
|
|
133902
|
+
// surviving post-merge children are what it descends into.
|
|
133903
|
+
var child = node.firstChild;
|
|
133904
|
+
while (child) {
|
|
133905
|
+
var next = child.nextSibling;
|
|
133906
|
+
if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
|
|
133907
|
+
node.removeChild(next);
|
|
133908
|
+
child.appendData(next.data);
|
|
133909
|
+
// Do not advance child: re-check new nextSibling for another text run
|
|
133910
|
+
} else {
|
|
133911
|
+
child = next;
|
|
133912
|
+
}
|
|
133913
|
+
}
|
|
133914
|
+
return true; // descend into surviving children
|
|
133915
|
+
},
|
|
133916
|
+
});
|
|
133332
133917
|
},
|
|
133333
133918
|
// Introduced in DOM Level 2:
|
|
133334
133919
|
isSupported:function(feature, version){
|
|
@@ -133404,21 +133989,103 @@ copy(NodeType,Node$1);
|
|
|
133404
133989
|
copy(NodeType,Node$1.prototype);
|
|
133405
133990
|
|
|
133406
133991
|
/**
|
|
133407
|
-
* @param
|
|
133408
|
-
*
|
|
133992
|
+
* @param {Node} node
|
|
133993
|
+
* Root of the subtree to visit.
|
|
133994
|
+
* @param {function(Node): boolean} callback
|
|
133995
|
+
* Called for each node in depth-first pre-order. Return a truthy value to stop traversal early.
|
|
133996
|
+
* @return {boolean} `true` if traversal was aborted by the callback, `false` otherwise.
|
|
133409
133997
|
*/
|
|
133410
|
-
function _visitNode(node,callback){
|
|
133411
|
-
|
|
133412
|
-
return true;
|
|
133413
|
-
}
|
|
133414
|
-
if(node = node.firstChild){
|
|
133415
|
-
do{
|
|
133416
|
-
if(_visitNode(node,callback)){return true}
|
|
133417
|
-
}while(node=node.nextSibling)
|
|
133418
|
-
}
|
|
133998
|
+
function _visitNode(node, callback) {
|
|
133999
|
+
return walkDOM(node, null, { enter: function (n) { return callback(n) ? walkDOM.STOP : true; } }) === walkDOM.STOP;
|
|
133419
134000
|
}
|
|
133420
134001
|
|
|
134002
|
+
/**
|
|
134003
|
+
* Depth-first pre/post-order DOM tree walker.
|
|
134004
|
+
*
|
|
134005
|
+
* Visits every node in the subtree rooted at `node`. For each node:
|
|
134006
|
+
*
|
|
134007
|
+
* 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The
|
|
134008
|
+
* return value becomes the `context` passed to each child's `enter` call and to the matching
|
|
134009
|
+
* `exit` call.
|
|
134010
|
+
* 2. If `enter` returns `null` or `undefined`, the node's children are skipped;
|
|
134011
|
+
* sibling traversal continues normally.
|
|
134012
|
+
* 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no
|
|
134013
|
+
* further `enter` or `exit` calls are made.
|
|
134014
|
+
* 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may
|
|
134015
|
+
* safely modify the node's own child list before the walker descends. Modifying siblings of
|
|
134016
|
+
* the current node or any other part of the tree produces unpredictable results: nodes already
|
|
134017
|
+
* queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside
|
|
134018
|
+
* the current child list are never visited.
|
|
134019
|
+
* 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have
|
|
134020
|
+
* been visited, passing the same `context` that `enter`
|
|
134021
|
+
* returned for that node.
|
|
134022
|
+
*
|
|
134023
|
+
* This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily
|
|
134024
|
+
* deep trees.
|
|
134025
|
+
*
|
|
134026
|
+
* @param {Node} node
|
|
134027
|
+
* Root of the subtree to walk.
|
|
134028
|
+
* @param {*} context
|
|
134029
|
+
* Initial context value passed to the root node's `enter`.
|
|
134030
|
+
* @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks
|
|
134031
|
+
* @returns {void | walkDOM.STOP}
|
|
134032
|
+
* @see ../docs/walk-dom.md.
|
|
134033
|
+
*/
|
|
134034
|
+
function walkDOM(node, context, callbacks) {
|
|
134035
|
+
// Each stack frame is {node, context, phase}:
|
|
134036
|
+
// walkDOM.ENTER — call enter, then push children
|
|
134037
|
+
// walkDOM.EXIT — call exit
|
|
134038
|
+
var stack = [{ node: node, context: context, phase: walkDOM.ENTER }];
|
|
134039
|
+
while (stack.length > 0) {
|
|
134040
|
+
var frame = stack.pop();
|
|
134041
|
+
if (frame.phase === walkDOM.ENTER) {
|
|
134042
|
+
var childContext = callbacks.enter(frame.node, frame.context);
|
|
134043
|
+
if (childContext === walkDOM.STOP) {
|
|
134044
|
+
return walkDOM.STOP;
|
|
134045
|
+
}
|
|
134046
|
+
// Push exit frame before children so it fires after all children are processed (Last In First Out)
|
|
134047
|
+
stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT });
|
|
134048
|
+
if (childContext === null || childContext === undefined) {
|
|
134049
|
+
continue; // skip children
|
|
134050
|
+
}
|
|
134051
|
+
// lastChild is read after enter returns, so enter may modify the child list.
|
|
134052
|
+
var child = frame.node.lastChild;
|
|
134053
|
+
// Traverse from lastChild backwards so that pushing onto the stack
|
|
134054
|
+
// naturally yields firstChild on top (processed first).
|
|
134055
|
+
while (child) {
|
|
134056
|
+
stack.push({ node: child, context: childContext, phase: walkDOM.ENTER });
|
|
134057
|
+
child = child.previousSibling;
|
|
134058
|
+
}
|
|
134059
|
+
} else {
|
|
134060
|
+
// frame.phase === walkDOM.EXIT
|
|
134061
|
+
if (callbacks.exit) {
|
|
134062
|
+
callbacks.exit(frame.node, frame.context);
|
|
134063
|
+
}
|
|
134064
|
+
}
|
|
134065
|
+
}
|
|
134066
|
+
}
|
|
133421
134067
|
|
|
134068
|
+
/**
|
|
134069
|
+
* Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal
|
|
134070
|
+
* immediately.
|
|
134071
|
+
*
|
|
134072
|
+
* @type {symbol}
|
|
134073
|
+
*/
|
|
134074
|
+
walkDOM.STOP = Symbol('walkDOM.STOP');
|
|
134075
|
+
/**
|
|
134076
|
+
* Phase constant for a stack frame that has not yet been visited.
|
|
134077
|
+
* The `enter` callback is called and children are scheduled.
|
|
134078
|
+
*
|
|
134079
|
+
* @type {number}
|
|
134080
|
+
*/
|
|
134081
|
+
walkDOM.ENTER = 0;
|
|
134082
|
+
/**
|
|
134083
|
+
* Phase constant for a stack frame whose subtree has been fully visited.
|
|
134084
|
+
* The `exit` callback is called.
|
|
134085
|
+
*
|
|
134086
|
+
* @type {number}
|
|
134087
|
+
*/
|
|
134088
|
+
walkDOM.EXIT = 1;
|
|
133422
134089
|
|
|
133423
134090
|
function Document(){
|
|
133424
134091
|
this.ownerDocument = this;
|
|
@@ -134022,12 +134689,44 @@ Document.prototype = {
|
|
|
134022
134689
|
node.appendData(data);
|
|
134023
134690
|
return node;
|
|
134024
134691
|
},
|
|
134692
|
+
/**
|
|
134693
|
+
* Returns a new CDATASection node whose data is `data`.
|
|
134694
|
+
*
|
|
134695
|
+
* __This implementation differs from the specification:__
|
|
134696
|
+
* - calling this method on an HTML document does not throw `NotSupportedError`.
|
|
134697
|
+
*
|
|
134698
|
+
* @param {string} data
|
|
134699
|
+
* @returns {CDATASection}
|
|
134700
|
+
* @throws DOMException with code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`.
|
|
134701
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection
|
|
134702
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
|
|
134703
|
+
*/
|
|
134025
134704
|
createCDATASection : function(data){
|
|
134705
|
+
if (data.indexOf(']]>') !== -1) {
|
|
134706
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'data contains "]]>"');
|
|
134707
|
+
}
|
|
134026
134708
|
var node = new CDATASection();
|
|
134027
134709
|
node.ownerDocument = this;
|
|
134028
134710
|
node.appendData(data);
|
|
134029
134711
|
return node;
|
|
134030
134712
|
},
|
|
134713
|
+
/**
|
|
134714
|
+
* Returns a ProcessingInstruction node whose target is target and data is data.
|
|
134715
|
+
*
|
|
134716
|
+
* __This implementation differs from the specification:__
|
|
134717
|
+
* - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
|
|
134718
|
+
*
|
|
134719
|
+
* Note: When the resulting document is serialized with `requireWellFormed: true`, the
|
|
134720
|
+
* serializer throws with code `INVALID_STATE_ERR` if `.data` contains `?>` (W3C DOM Parsing
|
|
134721
|
+
* §3.2.1.7). Without that option the data is emitted verbatim.
|
|
134722
|
+
*
|
|
134723
|
+
* @param {string} target
|
|
134724
|
+
* @param {string} data
|
|
134725
|
+
* @returns {ProcessingInstruction}
|
|
134726
|
+
* @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction
|
|
134727
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
|
|
134728
|
+
* @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7
|
|
134729
|
+
*/
|
|
134031
134730
|
createProcessingInstruction : function(target,data){
|
|
134032
134731
|
var node = new ProcessingInstruction();
|
|
134033
134732
|
node.ownerDocument = this;
|
|
@@ -134253,6 +134952,19 @@ function CDATASection() {
|
|
|
134253
134952
|
_extends$1(CDATASection,CharacterData);
|
|
134254
134953
|
|
|
134255
134954
|
|
|
134955
|
+
/**
|
|
134956
|
+
* Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
|
|
134957
|
+
*
|
|
134958
|
+
* `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
134959
|
+
* xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
|
|
134960
|
+
* direct property writes succeed silently. Values are serialized verbatim when
|
|
134961
|
+
* `requireWellFormed` is false (the default). When the serializer is invoked with
|
|
134962
|
+
* `requireWellFormed: true` (via the 4th-parameter options object), it validates each
|
|
134963
|
+
* field and throws `DOMException` with code `INVALID_STATE_ERR` on invalid values.
|
|
134964
|
+
*
|
|
134965
|
+
* @class
|
|
134966
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/DocumentType MDN
|
|
134967
|
+
*/
|
|
134256
134968
|
function DocumentType() {
|
|
134257
134969
|
}DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
|
|
134258
134970
|
_extends$1(DocumentType,Node$1);
|
|
@@ -134280,11 +134992,48 @@ function ProcessingInstruction() {
|
|
|
134280
134992
|
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
|
|
134281
134993
|
_extends$1(ProcessingInstruction,Node$1);
|
|
134282
134994
|
function XMLSerializer$1(){}
|
|
134283
|
-
|
|
134284
|
-
|
|
134995
|
+
/**
|
|
134996
|
+
* Returns the result of serializing `node` to XML.
|
|
134997
|
+
*
|
|
134998
|
+
* When `options.requireWellFormed` is `true`, the serializer throws for content that would
|
|
134999
|
+
* produce ill-formed XML.
|
|
135000
|
+
*
|
|
135001
|
+
* __This implementation differs from the specification:__
|
|
135002
|
+
* - CDATASection nodes whose data contains `]]>` are serialized by splitting the section
|
|
135003
|
+
* at each `]]>` occurrence (following W3C DOM Level 3 Core `split-cdata-sections`
|
|
135004
|
+
* default behaviour) unless `requireWellFormed` is `true`.
|
|
135005
|
+
* - when `requireWellFormed` is `true`, `DOMException` with code `INVALID_STATE_ERR`
|
|
135006
|
+
* is only thrown to prevent injection vectors, not for all the spec mandated checks.
|
|
135007
|
+
*
|
|
135008
|
+
* @param {Node} node
|
|
135009
|
+
* @param {boolean} [isHtml]
|
|
135010
|
+
* @param {function} [nodeFilter]
|
|
135011
|
+
* @param {Object} [options]
|
|
135012
|
+
* @param {boolean} [options.requireWellFormed=false]
|
|
135013
|
+
* When `true`, throws for content that would produce ill-formed XML.
|
|
135014
|
+
* @returns {string}
|
|
135015
|
+
* @throws {DOMException}
|
|
135016
|
+
* With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
|
|
135017
|
+
* - a CDATASection node's data contains `"]]>"`,
|
|
135018
|
+
* - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
|
|
135019
|
+
* - a ProcessingInstruction's data contains `"?>"`,
|
|
135020
|
+
* - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
|
|
135021
|
+
* production,
|
|
135022
|
+
* - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
|
|
135023
|
+
* production, or
|
|
135024
|
+
* - a DocumentType's `internalSubset` contains `"]>"`.
|
|
135025
|
+
* Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
|
|
135026
|
+
* writes succeed and are covered by the serializer-level checks above.
|
|
135027
|
+
* @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
|
|
135028
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serialization
|
|
135029
|
+
* @see https://github.com/w3c/DOM-Parsing/issues/84
|
|
135030
|
+
*/
|
|
135031
|
+
XMLSerializer$1.prototype.serializeToString = function(node,isHtml,nodeFilter,options){
|
|
135032
|
+
return nodeSerializeToString.call(node,isHtml,nodeFilter,options);
|
|
134285
135033
|
};
|
|
134286
135034
|
Node$1.prototype.toString = nodeSerializeToString;
|
|
134287
|
-
function nodeSerializeToString(isHtml,nodeFilter){
|
|
135035
|
+
function nodeSerializeToString(isHtml,nodeFilter,options){
|
|
135036
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
134288
135037
|
var buf = [];
|
|
134289
135038
|
var refNode = this.nodeType == 9 && this.documentElement || this;
|
|
134290
135039
|
var prefix = refNode.prefix;
|
|
@@ -134301,7 +135050,7 @@ function nodeSerializeToString(isHtml,nodeFilter){
|
|
|
134301
135050
|
];
|
|
134302
135051
|
}
|
|
134303
135052
|
}
|
|
134304
|
-
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
|
|
135053
|
+
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces,requireWellFormed);
|
|
134305
135054
|
//console.log('###',this.nodeType,uri,prefix,buf.join(''))
|
|
134306
135055
|
return buf.join('');
|
|
134307
135056
|
}
|
|
@@ -134350,271 +135099,323 @@ function addSerializedAttribute(buf, qualifiedName, value) {
|
|
|
134350
135099
|
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
134351
135100
|
}
|
|
134352
135101
|
|
|
134353
|
-
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
135102
|
+
function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) {
|
|
134354
135103
|
if (!visibleNamespaces) {
|
|
134355
135104
|
visibleNamespaces = [];
|
|
134356
135105
|
}
|
|
134357
|
-
|
|
134358
|
-
|
|
134359
|
-
|
|
134360
|
-
|
|
134361
|
-
|
|
134362
|
-
|
|
134363
|
-
|
|
134364
|
-
|
|
134365
|
-
|
|
134366
|
-
|
|
134367
|
-
|
|
134368
|
-
//buf.sort.apply(attrs, attributeSorter);
|
|
134369
|
-
}
|
|
134370
|
-
|
|
134371
|
-
switch(node.nodeType){
|
|
134372
|
-
case ELEMENT_NODE:
|
|
134373
|
-
var attrs = node.attributes;
|
|
134374
|
-
var len = attrs.length;
|
|
134375
|
-
var child = node.firstChild;
|
|
134376
|
-
var nodeName = node.tagName;
|
|
134377
|
-
|
|
134378
|
-
isHTML = NAMESPACE$1.isHTML(node.namespaceURI) || isHTML;
|
|
134379
|
-
|
|
134380
|
-
var prefixedNodeName = nodeName;
|
|
134381
|
-
if (!isHTML && !node.prefix && node.namespaceURI) {
|
|
134382
|
-
var defaultNS;
|
|
134383
|
-
// lookup current default ns from `xmlns` attribute
|
|
134384
|
-
for (var ai = 0; ai < attrs.length; ai++) {
|
|
134385
|
-
if (attrs.item(ai).name === 'xmlns') {
|
|
134386
|
-
defaultNS = attrs.item(ai).value;
|
|
134387
|
-
break
|
|
134388
|
-
}
|
|
134389
|
-
}
|
|
134390
|
-
if (!defaultNS) {
|
|
134391
|
-
// lookup current default ns in visibleNamespaces
|
|
134392
|
-
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
|
|
134393
|
-
var namespace = visibleNamespaces[nsi];
|
|
134394
|
-
if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
|
|
134395
|
-
defaultNS = namespace.namespace;
|
|
134396
|
-
break
|
|
135106
|
+
walkDOM(node, { ns: visibleNamespaces, isHTML: isHTML }, {
|
|
135107
|
+
enter: function (n, ctx) {
|
|
135108
|
+
var ns = ctx.ns;
|
|
135109
|
+
var html = ctx.isHTML;
|
|
135110
|
+
|
|
135111
|
+
if (nodeFilter) {
|
|
135112
|
+
n = nodeFilter(n);
|
|
135113
|
+
if (n) {
|
|
135114
|
+
if (typeof n == 'string') {
|
|
135115
|
+
buf.push(n);
|
|
135116
|
+
return null;
|
|
134397
135117
|
}
|
|
135118
|
+
} else {
|
|
135119
|
+
return null;
|
|
134398
135120
|
}
|
|
134399
135121
|
}
|
|
134400
|
-
|
|
134401
|
-
|
|
134402
|
-
|
|
134403
|
-
|
|
134404
|
-
|
|
134405
|
-
|
|
135122
|
+
|
|
135123
|
+
switch (n.nodeType) {
|
|
135124
|
+
case ELEMENT_NODE:
|
|
135125
|
+
var attrs = n.attributes;
|
|
135126
|
+
var len = attrs.length;
|
|
135127
|
+
var nodeName = n.tagName;
|
|
135128
|
+
|
|
135129
|
+
html = NAMESPACE$1.isHTML(n.namespaceURI) || html;
|
|
135130
|
+
|
|
135131
|
+
var prefixedNodeName = nodeName;
|
|
135132
|
+
if (!html && !n.prefix && n.namespaceURI) {
|
|
135133
|
+
var defaultNS;
|
|
135134
|
+
// lookup current default ns from `xmlns` attribute
|
|
135135
|
+
for (var ai = 0; ai < attrs.length; ai++) {
|
|
135136
|
+
if (attrs.item(ai).name === 'xmlns') {
|
|
135137
|
+
defaultNS = attrs.item(ai).value;
|
|
135138
|
+
break;
|
|
135139
|
+
}
|
|
135140
|
+
}
|
|
135141
|
+
if (!defaultNS) {
|
|
135142
|
+
// lookup current default ns in visibleNamespaces
|
|
135143
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
135144
|
+
var nsEntry = ns[nsi];
|
|
135145
|
+
if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) {
|
|
135146
|
+
defaultNS = nsEntry.namespace;
|
|
135147
|
+
break;
|
|
135148
|
+
}
|
|
135149
|
+
}
|
|
135150
|
+
}
|
|
135151
|
+
if (defaultNS !== n.namespaceURI) {
|
|
135152
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
135153
|
+
var nsEntry = ns[nsi];
|
|
135154
|
+
if (nsEntry.namespace === n.namespaceURI) {
|
|
135155
|
+
if (nsEntry.prefix) {
|
|
135156
|
+
prefixedNodeName = nsEntry.prefix + ':' + nodeName;
|
|
135157
|
+
}
|
|
135158
|
+
break;
|
|
135159
|
+
}
|
|
135160
|
+
}
|
|
134406
135161
|
}
|
|
134407
|
-
break
|
|
134408
135162
|
}
|
|
134409
|
-
}
|
|
134410
|
-
}
|
|
134411
|
-
}
|
|
134412
135163
|
|
|
134413
|
-
|
|
135164
|
+
buf.push('<', prefixedNodeName);
|
|
135165
|
+
|
|
135166
|
+
// Build a fresh namespace snapshot for this element's children.
|
|
135167
|
+
// The slice prevents sibling elements from inheriting each other's declarations.
|
|
135168
|
+
var childNs = ns.slice();
|
|
135169
|
+
for (var i = 0; i < len; i++) {
|
|
135170
|
+
var attr = attrs.item(i);
|
|
135171
|
+
if (attr.prefix == 'xmlns') {
|
|
135172
|
+
childNs.push({ prefix: attr.localName, namespace: attr.value });
|
|
135173
|
+
} else if (attr.nodeName == 'xmlns') {
|
|
135174
|
+
childNs.push({ prefix: '', namespace: attr.value });
|
|
135175
|
+
}
|
|
135176
|
+
}
|
|
134414
135177
|
|
|
134415
|
-
|
|
134416
|
-
|
|
134417
|
-
|
|
134418
|
-
|
|
134419
|
-
|
|
134420
|
-
|
|
134421
|
-
|
|
134422
|
-
|
|
134423
|
-
|
|
135178
|
+
for (var i = 0; i < len; i++) {
|
|
135179
|
+
var attr = attrs.item(i);
|
|
135180
|
+
if (needNamespaceDefine(attr, html, childNs)) {
|
|
135181
|
+
var attrPrefix = attr.prefix || '';
|
|
135182
|
+
var uri = attr.namespaceURI;
|
|
135183
|
+
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
|
|
135184
|
+
childNs.push({ prefix: attrPrefix, namespace: uri });
|
|
135185
|
+
}
|
|
135186
|
+
// Apply nodeFilter and serialize the attribute.
|
|
135187
|
+
var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
|
|
135188
|
+
if (filteredAttr) {
|
|
135189
|
+
if (typeof filteredAttr === 'string') {
|
|
135190
|
+
buf.push(filteredAttr);
|
|
135191
|
+
} else {
|
|
135192
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
|
|
135193
|
+
}
|
|
135194
|
+
}
|
|
135195
|
+
}
|
|
134424
135196
|
|
|
134425
|
-
|
|
134426
|
-
|
|
134427
|
-
|
|
134428
|
-
|
|
134429
|
-
|
|
134430
|
-
|
|
134431
|
-
|
|
134432
|
-
}
|
|
134433
|
-
serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
|
|
134434
|
-
}
|
|
135197
|
+
// add namespace for current node
|
|
135198
|
+
if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
|
|
135199
|
+
var nodePrefix = n.prefix || '';
|
|
135200
|
+
var uri = n.namespaceURI;
|
|
135201
|
+
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
|
|
135202
|
+
childNs.push({ prefix: nodePrefix, namespace: uri });
|
|
135203
|
+
}
|
|
134435
135204
|
|
|
134436
|
-
|
|
134437
|
-
|
|
134438
|
-
|
|
134439
|
-
|
|
134440
|
-
|
|
134441
|
-
|
|
134442
|
-
|
|
135205
|
+
var child = n.firstChild;
|
|
135206
|
+
if (child || html && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {
|
|
135207
|
+
buf.push('>');
|
|
135208
|
+
if (html && /^script$/i.test(nodeName)) {
|
|
135209
|
+
// Inline serialization for <script> children; return null to skip walkDOM descent.
|
|
135210
|
+
while (child) {
|
|
135211
|
+
if (child.data) {
|
|
135212
|
+
buf.push(child.data);
|
|
135213
|
+
} else {
|
|
135214
|
+
serializeToString(child, buf, html, nodeFilter, childNs.slice(), requireWellFormed);
|
|
135215
|
+
}
|
|
135216
|
+
child = child.nextSibling;
|
|
135217
|
+
}
|
|
135218
|
+
buf.push('</', nodeName, '>');
|
|
135219
|
+
return null;
|
|
135220
|
+
}
|
|
135221
|
+
// Return child context; walkDOM descends and exit emits the closing tag.
|
|
135222
|
+
return { ns: childNs, isHTML: html, tag: prefixedNodeName };
|
|
135223
|
+
} else {
|
|
135224
|
+
buf.push('/>');
|
|
135225
|
+
return null;
|
|
135226
|
+
}
|
|
134443
135227
|
|
|
134444
|
-
|
|
134445
|
-
|
|
134446
|
-
|
|
134447
|
-
|
|
134448
|
-
|
|
134449
|
-
|
|
134450
|
-
|
|
134451
|
-
|
|
134452
|
-
|
|
135228
|
+
case DOCUMENT_NODE:
|
|
135229
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
135230
|
+
// Descend into children; exit is a no-op (tag is null).
|
|
135231
|
+
return { ns: ns.slice(), isHTML: html, tag: null };
|
|
135232
|
+
|
|
135233
|
+
case ATTRIBUTE_NODE:
|
|
135234
|
+
addSerializedAttribute(buf, n.name, n.value);
|
|
135235
|
+
return null;
|
|
135236
|
+
|
|
135237
|
+
case TEXT_NODE:
|
|
135238
|
+
/**
|
|
135239
|
+
* The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
|
|
135240
|
+
* except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
|
|
135241
|
+
* If they are needed elsewhere, they must be escaped using either numeric character references or the strings
|
|
135242
|
+
* `&` and `<` respectively.
|
|
135243
|
+
* The right angle bracket (>) may be represented using the string " > ", and must, for compatibility,
|
|
135244
|
+
* be escaped using either `>` or a character reference when it appears in the string `]]>` in content,
|
|
135245
|
+
* when that string is not marking the end of a CDATA section.
|
|
135246
|
+
*
|
|
135247
|
+
* In the content of elements, character data is any string of characters
|
|
135248
|
+
* which does not contain the start-delimiter of any markup
|
|
135249
|
+
* and does not include the CDATA-section-close delimiter, `]]>`.
|
|
135250
|
+
*
|
|
135251
|
+
* @see https://www.w3.org/TR/xml/#NT-CharData
|
|
135252
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
|
135253
|
+
*/
|
|
135254
|
+
buf.push(n.data.replace(/[<&>]/g, _xmlEncoder));
|
|
135255
|
+
return null;
|
|
135256
|
+
|
|
135257
|
+
case CDATA_SECTION_NODE:
|
|
135258
|
+
if (requireWellFormed && n.data.indexOf(']]>') !== -1) {
|
|
135259
|
+
throw new DOMException(INVALID_STATE_ERR, 'The CDATASection data contains "]]>"');
|
|
134453
135260
|
}
|
|
134454
|
-
|
|
134455
|
-
|
|
134456
|
-
|
|
134457
|
-
|
|
134458
|
-
|
|
134459
|
-
|
|
134460
|
-
|
|
134461
|
-
|
|
134462
|
-
|
|
134463
|
-
|
|
134464
|
-
|
|
134465
|
-
|
|
134466
|
-
|
|
134467
|
-
|
|
134468
|
-
|
|
134469
|
-
|
|
134470
|
-
|
|
134471
|
-
|
|
134472
|
-
|
|
134473
|
-
|
|
134474
|
-
|
|
134475
|
-
|
|
134476
|
-
|
|
134477
|
-
|
|
134478
|
-
|
|
134479
|
-
|
|
134480
|
-
|
|
134481
|
-
|
|
134482
|
-
|
|
134483
|
-
|
|
134484
|
-
|
|
134485
|
-
|
|
134486
|
-
|
|
134487
|
-
|
|
134488
|
-
|
|
134489
|
-
|
|
134490
|
-
|
|
134491
|
-
|
|
134492
|
-
|
|
134493
|
-
|
|
134494
|
-
|
|
134495
|
-
|
|
134496
|
-
|
|
134497
|
-
|
|
134498
|
-
|
|
134499
|
-
|
|
134500
|
-
|
|
134501
|
-
|
|
134502
|
-
|
|
134503
|
-
|
|
134504
|
-
|
|
134505
|
-
|
|
134506
|
-
|
|
134507
|
-
|
|
134508
|
-
|
|
134509
|
-
|
|
134510
|
-
|
|
134511
|
-
|
|
135261
|
+
buf.push('<![CDATA[', n.data.replace(/]]>/g, ']]]]><![CDATA[>'), ']]>');
|
|
135262
|
+
return null;
|
|
135263
|
+
|
|
135264
|
+
case COMMENT_NODE:
|
|
135265
|
+
if (requireWellFormed && n.data.indexOf('-->') !== -1) {
|
|
135266
|
+
throw new DOMException(INVALID_STATE_ERR, 'The comment node data contains "-->"');
|
|
135267
|
+
}
|
|
135268
|
+
buf.push('<!--', n.data, '-->');
|
|
135269
|
+
return null;
|
|
135270
|
+
|
|
135271
|
+
case DOCUMENT_TYPE_NODE:
|
|
135272
|
+
if (requireWellFormed) {
|
|
135273
|
+
if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
|
|
135274
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
|
|
135275
|
+
}
|
|
135276
|
+
if (n.systemId && !/^("[^"]*"|'[^']*')$/.test(n.systemId)) {
|
|
135277
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType systemId is not a valid SystemLiteral');
|
|
135278
|
+
}
|
|
135279
|
+
if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) {
|
|
135280
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType internalSubset contains "]>"');
|
|
135281
|
+
}
|
|
135282
|
+
}
|
|
135283
|
+
var pubid = n.publicId;
|
|
135284
|
+
var sysid = n.systemId;
|
|
135285
|
+
buf.push('<!DOCTYPE ', n.name);
|
|
135286
|
+
if (pubid) {
|
|
135287
|
+
buf.push(' PUBLIC ', pubid);
|
|
135288
|
+
if (sysid && sysid != '.') {
|
|
135289
|
+
buf.push(' ', sysid);
|
|
135290
|
+
}
|
|
135291
|
+
buf.push('>');
|
|
135292
|
+
} else if (sysid && sysid != '.') {
|
|
135293
|
+
buf.push(' SYSTEM ', sysid, '>');
|
|
135294
|
+
} else {
|
|
135295
|
+
var sub = n.internalSubset;
|
|
135296
|
+
if (sub) {
|
|
135297
|
+
buf.push(' [', sub, ']');
|
|
135298
|
+
}
|
|
135299
|
+
buf.push('>');
|
|
135300
|
+
}
|
|
135301
|
+
return null;
|
|
135302
|
+
|
|
135303
|
+
case PROCESSING_INSTRUCTION_NODE:
|
|
135304
|
+
if (requireWellFormed && n.data.indexOf('?>') !== -1) {
|
|
135305
|
+
throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
|
|
135306
|
+
}
|
|
135307
|
+
buf.push('<?', n.target, ' ', n.data, '?>');
|
|
135308
|
+
return null;
|
|
135309
|
+
|
|
135310
|
+
case ENTITY_REFERENCE_NODE:
|
|
135311
|
+
buf.push('&', n.nodeName, ';');
|
|
135312
|
+
return null;
|
|
135313
|
+
|
|
135314
|
+
//case ENTITY_NODE:
|
|
135315
|
+
//case NOTATION_NODE:
|
|
135316
|
+
default:
|
|
135317
|
+
buf.push('??', n.nodeName);
|
|
135318
|
+
return null;
|
|
134512
135319
|
}
|
|
134513
|
-
|
|
134514
|
-
|
|
134515
|
-
|
|
134516
|
-
|
|
134517
|
-
var sub = node.internalSubset;
|
|
134518
|
-
if(sub){
|
|
134519
|
-
buf.push(" [",sub,"]");
|
|
135320
|
+
},
|
|
135321
|
+
exit: function (n, childCtx) {
|
|
135322
|
+
if (childCtx && childCtx.tag) {
|
|
135323
|
+
buf.push('</', childCtx.tag, '>');
|
|
134520
135324
|
}
|
|
134521
|
-
|
|
134522
|
-
|
|
134523
|
-
return;
|
|
134524
|
-
case PROCESSING_INSTRUCTION_NODE:
|
|
134525
|
-
return buf.push( "<?",node.target," ",node.data,"?>");
|
|
134526
|
-
case ENTITY_REFERENCE_NODE:
|
|
134527
|
-
return buf.push( '&',node.nodeName,';');
|
|
134528
|
-
//case ENTITY_NODE:
|
|
134529
|
-
//case NOTATION_NODE:
|
|
134530
|
-
default:
|
|
134531
|
-
buf.push('??',node.nodeName);
|
|
134532
|
-
}
|
|
135325
|
+
},
|
|
135326
|
+
});
|
|
134533
135327
|
}
|
|
134534
|
-
|
|
134535
|
-
|
|
134536
|
-
|
|
134537
|
-
|
|
134538
|
-
|
|
134539
|
-
|
|
134540
|
-
|
|
134541
|
-
|
|
134542
|
-
|
|
134543
|
-
|
|
134544
|
-
|
|
134545
|
-
|
|
134546
|
-
|
|
134547
|
-
|
|
134548
|
-
|
|
134549
|
-
|
|
134550
|
-
|
|
134551
|
-
|
|
134552
|
-
|
|
134553
|
-
|
|
134554
|
-
|
|
134555
|
-
|
|
134556
|
-
|
|
134557
|
-
|
|
134558
|
-
|
|
134559
|
-
|
|
134560
|
-
|
|
134561
|
-
|
|
134562
|
-
|
|
134563
|
-
|
|
134564
|
-
|
|
134565
|
-
|
|
134566
|
-
|
|
134567
|
-
|
|
134568
|
-
|
|
134569
|
-
|
|
134570
|
-
|
|
134571
|
-
var child = node.firstChild;
|
|
134572
|
-
while(child){
|
|
134573
|
-
node2.appendChild(importNode(doc,child,deep));
|
|
134574
|
-
child = child.nextSibling;
|
|
134575
|
-
}
|
|
134576
|
-
}
|
|
134577
|
-
return node2;
|
|
135328
|
+
/**
|
|
135329
|
+
* Imports a node from a different document into `doc`, creating a new copy.
|
|
135330
|
+
* Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned,
|
|
135331
|
+
* stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`).
|
|
135332
|
+
* Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is
|
|
135333
|
+
* always forced to `true`
|
|
135334
|
+
* because an attribute's value lives in a child text node.
|
|
135335
|
+
*
|
|
135336
|
+
* @param {Document} doc
|
|
135337
|
+
* The document that will own the imported node.
|
|
135338
|
+
* @param {Node} node
|
|
135339
|
+
* The node to import.
|
|
135340
|
+
* @param {boolean} deep
|
|
135341
|
+
* If `true`, descendants are imported recursively.
|
|
135342
|
+
* @returns {Node}
|
|
135343
|
+
* The newly imported node, now owned by `doc`.
|
|
135344
|
+
*/
|
|
135345
|
+
function importNode(doc, node, deep) {
|
|
135346
|
+
var destRoot;
|
|
135347
|
+
walkDOM(node, null, {
|
|
135348
|
+
enter: function (srcNode, destParent) {
|
|
135349
|
+
// Shallow-clone the node and stamp it into the target document.
|
|
135350
|
+
var destNode = srcNode.cloneNode(false);
|
|
135351
|
+
destNode.ownerDocument = doc;
|
|
135352
|
+
destNode.parentNode = null;
|
|
135353
|
+
// capture as the root of the imported subtree or attach to parent.
|
|
135354
|
+
if (destParent === null) {
|
|
135355
|
+
destRoot = destNode;
|
|
135356
|
+
} else {
|
|
135357
|
+
destParent.appendChild(destNode);
|
|
135358
|
+
}
|
|
135359
|
+
// ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node.
|
|
135360
|
+
var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep;
|
|
135361
|
+
return shouldDeep ? destNode : null;
|
|
135362
|
+
},
|
|
135363
|
+
});
|
|
135364
|
+
return destRoot;
|
|
134578
135365
|
}
|
|
134579
135366
|
//
|
|
134580
135367
|
//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
|
|
134581
135368
|
// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
|
|
134582
|
-
function cloneNode(doc,node,deep){
|
|
134583
|
-
var
|
|
134584
|
-
|
|
134585
|
-
|
|
134586
|
-
|
|
134587
|
-
|
|
134588
|
-
|
|
134589
|
-
|
|
135369
|
+
function cloneNode(doc, node, deep) {
|
|
135370
|
+
var destRoot;
|
|
135371
|
+
walkDOM(node, null, {
|
|
135372
|
+
enter: function (srcNode, destParent) {
|
|
135373
|
+
// 1. Create a blank node of the same type and copy all scalar own properties.
|
|
135374
|
+
var destNode = new srcNode.constructor();
|
|
135375
|
+
for (var n in srcNode) {
|
|
135376
|
+
if (Object.prototype.hasOwnProperty.call(srcNode, n)) {
|
|
135377
|
+
var v = srcNode[n];
|
|
135378
|
+
if (typeof v != 'object') {
|
|
135379
|
+
if (v != destNode[n]) {
|
|
135380
|
+
destNode[n] = v;
|
|
135381
|
+
}
|
|
135382
|
+
}
|
|
134590
135383
|
}
|
|
134591
135384
|
}
|
|
134592
|
-
|
|
134593
|
-
|
|
134594
|
-
|
|
134595
|
-
|
|
134596
|
-
|
|
134597
|
-
|
|
134598
|
-
|
|
134599
|
-
|
|
134600
|
-
|
|
134601
|
-
|
|
134602
|
-
|
|
134603
|
-
|
|
134604
|
-
|
|
134605
|
-
|
|
134606
|
-
|
|
134607
|
-
|
|
134608
|
-
|
|
134609
|
-
|
|
134610
|
-
|
|
134611
|
-
|
|
134612
|
-
|
|
134613
|
-
|
|
134614
|
-
|
|
134615
|
-
|
|
134616
|
-
|
|
134617
|
-
|
|
135385
|
+
if (srcNode.childNodes) {
|
|
135386
|
+
destNode.childNodes = new NodeList();
|
|
135387
|
+
}
|
|
135388
|
+
destNode.ownerDocument = doc;
|
|
135389
|
+
// 2. Handle node-type-specific setup.
|
|
135390
|
+
// Attributes are not DOM children, so they are cloned inline here
|
|
135391
|
+
// rather than by walkDOM descent.
|
|
135392
|
+
// ATTRIBUTE_NODE forces deep=true so its own children are walked.
|
|
135393
|
+
var shouldDeep = deep;
|
|
135394
|
+
switch (destNode.nodeType) {
|
|
135395
|
+
case ELEMENT_NODE:
|
|
135396
|
+
var attrs = srcNode.attributes;
|
|
135397
|
+
var attrs2 = (destNode.attributes = new NamedNodeMap());
|
|
135398
|
+
var len = attrs.length;
|
|
135399
|
+
attrs2._ownerElement = destNode;
|
|
135400
|
+
for (var i = 0; i < len; i++) {
|
|
135401
|
+
destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true));
|
|
135402
|
+
}
|
|
135403
|
+
break;
|
|
135404
|
+
case ATTRIBUTE_NODE:
|
|
135405
|
+
shouldDeep = true;
|
|
135406
|
+
}
|
|
135407
|
+
// 3. Attach to parent, or capture as the root of the cloned subtree.
|
|
135408
|
+
if (destParent !== null) {
|
|
135409
|
+
destParent.appendChild(destNode);
|
|
135410
|
+
} else {
|
|
135411
|
+
destRoot = destNode;
|
|
135412
|
+
}
|
|
135413
|
+
// 4. Return destNode as the context for children (causes walkDOM to descend),
|
|
135414
|
+
// or null to skip children (shallow clone).
|
|
135415
|
+
return shouldDeep ? destNode : null;
|
|
135416
|
+
},
|
|
135417
|
+
});
|
|
135418
|
+
return destRoot;
|
|
134618
135419
|
}
|
|
134619
135420
|
|
|
134620
135421
|
function __set__(object,key,value){
|
|
@@ -134630,49 +135431,55 @@ try{
|
|
|
134630
135431
|
}
|
|
134631
135432
|
});
|
|
134632
135433
|
|
|
134633
|
-
|
|
134634
|
-
|
|
134635
|
-
|
|
135434
|
+
/**
|
|
135435
|
+
* The text content of this node and its descendants.
|
|
135436
|
+
*
|
|
135437
|
+
* Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
135438
|
+
* single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
135439
|
+
*
|
|
135440
|
+
* @type {string | null}
|
|
135441
|
+
* @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent}
|
|
135442
|
+
*/
|
|
135443
|
+
Object.defineProperty(Node$1.prototype, 'textContent', {
|
|
135444
|
+
get: function () {
|
|
135445
|
+
if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
135446
|
+
var buf = [];
|
|
135447
|
+
walkDOM(this, null, {
|
|
135448
|
+
enter: function (n) {
|
|
135449
|
+
if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
135450
|
+
return true; // enter children
|
|
135451
|
+
}
|
|
135452
|
+
if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) {
|
|
135453
|
+
return null; // excluded from text content
|
|
135454
|
+
}
|
|
135455
|
+
buf.push(n.nodeValue);
|
|
135456
|
+
},
|
|
135457
|
+
});
|
|
135458
|
+
return buf.join('');
|
|
135459
|
+
}
|
|
135460
|
+
return this.nodeValue;
|
|
134636
135461
|
},
|
|
134637
135462
|
|
|
134638
|
-
set:function(data){
|
|
134639
|
-
switch(this.nodeType){
|
|
134640
|
-
|
|
134641
|
-
|
|
134642
|
-
|
|
134643
|
-
|
|
134644
|
-
|
|
134645
|
-
|
|
134646
|
-
|
|
134647
|
-
|
|
134648
|
-
|
|
135463
|
+
set: function (data) {
|
|
135464
|
+
switch (this.nodeType) {
|
|
135465
|
+
case ELEMENT_NODE:
|
|
135466
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
135467
|
+
while (this.firstChild) {
|
|
135468
|
+
this.removeChild(this.firstChild);
|
|
135469
|
+
}
|
|
135470
|
+
if (data || String(data)) {
|
|
135471
|
+
this.appendChild(this.ownerDocument.createTextNode(data));
|
|
135472
|
+
}
|
|
135473
|
+
break;
|
|
134649
135474
|
|
|
134650
|
-
|
|
134651
|
-
|
|
134652
|
-
|
|
134653
|
-
|
|
135475
|
+
default:
|
|
135476
|
+
this.data = data;
|
|
135477
|
+
this.value = data;
|
|
135478
|
+
this.nodeValue = data;
|
|
134654
135479
|
}
|
|
134655
|
-
}
|
|
135480
|
+
},
|
|
134656
135481
|
});
|
|
134657
135482
|
|
|
134658
|
-
function getTextContent(node){
|
|
134659
|
-
switch(node.nodeType){
|
|
134660
|
-
case ELEMENT_NODE:
|
|
134661
|
-
case DOCUMENT_FRAGMENT_NODE:
|
|
134662
|
-
var buf = [];
|
|
134663
|
-
node = node.firstChild;
|
|
134664
|
-
while(node){
|
|
134665
|
-
if(node.nodeType!==7 && node.nodeType !==8){
|
|
134666
|
-
buf.push(getTextContent(node));
|
|
134667
|
-
}
|
|
134668
|
-
node = node.nextSibling;
|
|
134669
|
-
}
|
|
134670
|
-
return buf.join('');
|
|
134671
|
-
default:
|
|
134672
|
-
return node.nodeValue;
|
|
134673
|
-
}
|
|
134674
|
-
}
|
|
134675
|
-
|
|
134676
135483
|
__set__ = function(object,key,value){
|
|
134677
135484
|
//console.log(value)
|
|
134678
135485
|
object['$$'+key] = value;
|
|
@@ -134688,6 +135495,7 @@ try{
|
|
|
134688
135495
|
var Element_1 = Element$1;
|
|
134689
135496
|
var Node_1 = Node$1;
|
|
134690
135497
|
var NodeList_1 = NodeList;
|
|
135498
|
+
var walkDOM_1 = walkDOM;
|
|
134691
135499
|
var XMLSerializer_1 = XMLSerializer$1;
|
|
134692
135500
|
//}
|
|
134693
135501
|
|
|
@@ -134698,6 +135506,7 @@ var dom = {
|
|
|
134698
135506
|
Element: Element_1,
|
|
134699
135507
|
Node: Node_1,
|
|
134700
135508
|
NodeList: NodeList_1,
|
|
135509
|
+
walkDOM: walkDOM_1,
|
|
134701
135510
|
XMLSerializer: XMLSerializer_1
|
|
134702
135511
|
};
|
|
134703
135512
|
|
|
@@ -137471,7 +138280,7 @@ function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
|
|
|
137471
138280
|
function parseInstruction(source,start,domBuilder){
|
|
137472
138281
|
var end = source.indexOf('?>',start);
|
|
137473
138282
|
if(end){
|
|
137474
|
-
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)
|
|
138283
|
+
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
|
|
137475
138284
|
if(match){
|
|
137476
138285
|
var len = match[0].length;
|
|
137477
138286
|
domBuilder.processingInstruction(match[1], match[2]) ;
|
|
@@ -139573,12 +140382,14 @@ var ChangeLogModal = /*#__PURE__*/function (_React$Component) {
|
|
|
139573
140382
|
key: "formatDate",
|
|
139574
140383
|
value: function formatDate(oldDate) {
|
|
139575
140384
|
var newDate = new Date(oldDate);
|
|
139576
|
-
|
|
140385
|
+
var offset = newDate.getTimezoneOffset() * 60000;
|
|
140386
|
+
var newDate2 = new Date(newDate.getTime() + offset);
|
|
140387
|
+
newDate2 = newDate2.toLocaleDateString("default", {
|
|
139577
140388
|
month: "long",
|
|
139578
140389
|
day: "numeric",
|
|
139579
140390
|
year: "numeric"
|
|
139580
140391
|
});
|
|
139581
|
-
return
|
|
140392
|
+
return newDate2;
|
|
139582
140393
|
}
|
|
139583
140394
|
}, {
|
|
139584
140395
|
key: "render",
|
|
@@ -146792,7 +147603,7 @@ var _setCacheAdd = setCacheAdd;
|
|
|
146792
147603
|
* @name has
|
|
146793
147604
|
* @memberOf SetCache
|
|
146794
147605
|
* @param {*} value The value to search for.
|
|
146795
|
-
* @returns {
|
|
147606
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
146796
147607
|
*/
|
|
146797
147608
|
function setCacheHas(value) {
|
|
146798
147609
|
return this.__data__.has(value);
|
|
@@ -150260,7 +151071,7 @@ function baseOrderBy(collection, iteratees, orders) {
|
|
|
150260
151071
|
if (isArray_1(iteratee)) {
|
|
150261
151072
|
return function(value) {
|
|
150262
151073
|
return _baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
150263
|
-
}
|
|
151074
|
+
};
|
|
150264
151075
|
}
|
|
150265
151076
|
return iteratee;
|
|
150266
151077
|
});
|