fastnoiselite-builder 0.1.0

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/dist/index.js ADDED
@@ -0,0 +1,3631 @@
1
+ function N(t, n, a) {
2
+ return t + a * (n - t);
3
+ }
4
+ function o0(t) {
5
+ return t * t * (3 - 2 * t);
6
+ }
7
+ function m0(t) {
8
+ return t * t * t * (t * (t * 6 - 15) + 10);
9
+ }
10
+ function V(t, n, a, i, e) {
11
+ const r = i - a - (t - n);
12
+ return e * e * e * r + e * e * (t - n - r) + e * (a - t) + n;
13
+ }
14
+ function G0(t) {
15
+ return t -= Math.trunc(t * 0.5) * 2, t < 1 ? t : 2 - t;
16
+ }
17
+ function P0(t, n) {
18
+ return (a, i) => {
19
+ let e = n.seed, r = 0, c = n.fractalBounding;
20
+ a *= n.frequency, i *= n.frequency;
21
+ for (let l = 0; l < n.octaves; l++) {
22
+ const y = t(e++)(a, i);
23
+ r += y * c, c *= N(1, Math.min(y + 1, 2) * 0.5, n.weightedStrength), a *= n.lacunarity, i *= n.lacunarity, c *= n.gain;
24
+ }
25
+ return r;
26
+ };
27
+ }
28
+ function W0(t, n, a) {
29
+ return (i, e, r) => {
30
+ let c = a.seed, l = 0, D = a.fractalBounding;
31
+ i *= a.frequency, e *= a.frequency, r *= a.frequency;
32
+ const y = n(i, e, r);
33
+ i = y.x, e = y.y, r = y.z;
34
+ for (let u = 0; u < a.octaves; u++) {
35
+ const o = t(c++)(i, e, r);
36
+ l += o * D, D *= N(1, Math.min(o + 1, 2) * 0.5, a.weightedStrength), i *= a.lacunarity, e *= a.lacunarity, r *= a.lacunarity, D *= a.gain;
37
+ }
38
+ return l;
39
+ };
40
+ }
41
+ function L0(t, n) {
42
+ return (a, i) => {
43
+ let e = n.seed, r = 0, c = n.fractalBounding;
44
+ a *= n.frequency, i *= n.frequency;
45
+ for (let l = 0; l < n.octaves; l++) {
46
+ let y = t(e++)(a, i);
47
+ y = Math.abs(y), r += (y * -2 + 1) * c, c *= N(1, 1 - y, n.weightedStrength), a *= n.lacunarity, i *= n.lacunarity, c *= n.gain;
48
+ }
49
+ return r;
50
+ };
51
+ }
52
+ function X0(t, n, a) {
53
+ return (i, e, r) => {
54
+ let c = a.seed, l = 0, D = a.fractalBounding;
55
+ i *= a.frequency, e *= a.frequency, r *= a.frequency;
56
+ const y = n(i, e, r);
57
+ i = y.x, e = y.y, r = y.z;
58
+ for (let u = 0; u < a.octaves; u++) {
59
+ let o = t(c++)(i, e, r);
60
+ o = Math.abs(o), l += (o * -2 + 1) * D, D *= N(1, 1 - o, a.weightedStrength), i *= a.lacunarity, e *= a.lacunarity, r *= a.lacunarity, D *= a.gain;
61
+ }
62
+ return l;
63
+ };
64
+ }
65
+ function Q0(t, n) {
66
+ return (a, i) => {
67
+ let e = n.seed, r = 0, c = n.fractalBounding;
68
+ a *= n.frequency, i *= n.frequency;
69
+ for (let l = 0; l < n.octaves; l++) {
70
+ const D = t(e++), y = G0((D(a, i) + 1) * n.pingPongStrength);
71
+ r += (y - 0.5) * 2 * c, c *= N(1, y, n.weightedStrength), a *= n.lacunarity, i *= n.lacunarity, c *= n.gain;
72
+ }
73
+ return r;
74
+ };
75
+ }
76
+ function j0(t, n, a) {
77
+ return (i, e, r) => {
78
+ let c = a.seed, l = 0, D = a.fractalBounding;
79
+ i *= a.frequency, e *= a.frequency, r *= a.frequency;
80
+ const y = n(i, e, r);
81
+ i = y.x, e = y.y, r = y.z;
82
+ for (let u = 0; u < a.octaves; u++) {
83
+ const f = t(c++), o = G0((f(i, e, r) + 1) * a.pingPongStrength);
84
+ l += (o - 0.5) * 2 * D, D *= N(1, o, a.weightedStrength), i *= a.lacunarity, e *= a.lacunarity, r *= a.lacunarity, D *= a.gain;
85
+ }
86
+ return l;
87
+ };
88
+ }
89
+ function Z(t, n, a) {
90
+ let i = t ^ n ^ a;
91
+ return i = Math.imul(i, 668265261), i;
92
+ }
93
+ function $(t, n, a, i) {
94
+ let e = t ^ n ^ a ^ i;
95
+ return e = Math.imul(e, 668265261), e;
96
+ }
97
+ function X(t, n, a, i, e) {
98
+ let r = Z(t, n, a);
99
+ r ^= r >> 15, r &= 254;
100
+ const c = c0[r], l = c0[r | 1];
101
+ return i * c + e * l;
102
+ }
103
+ function G(t, n, a, i, e, r, c) {
104
+ let l = $(t, n, a, i);
105
+ l ^= l >> 15, l &= 252;
106
+ const D = i0[l], y = i0[l | 1], u = i0[l | 2];
107
+ return e * D + r * y + c * u;
108
+ }
109
+ const c0 = new Float64Array([
110
+ 0.130526192220052,
111
+ 0.99144486137381,
112
+ 0.38268343236509,
113
+ 0.923879532511287,
114
+ 0.608761429008721,
115
+ 0.793353340291235,
116
+ 0.793353340291235,
117
+ 0.608761429008721,
118
+ 0.923879532511287,
119
+ 0.38268343236509,
120
+ 0.99144486137381,
121
+ 0.130526192220051,
122
+ 0.99144486137381,
123
+ -0.130526192220051,
124
+ 0.923879532511287,
125
+ -0.38268343236509,
126
+ 0.793353340291235,
127
+ -0.60876142900872,
128
+ 0.608761429008721,
129
+ -0.793353340291235,
130
+ 0.38268343236509,
131
+ -0.923879532511287,
132
+ 0.130526192220052,
133
+ -0.99144486137381,
134
+ -0.130526192220052,
135
+ -0.99144486137381,
136
+ -0.38268343236509,
137
+ -0.923879532511287,
138
+ -0.608761429008721,
139
+ -0.793353340291235,
140
+ -0.793353340291235,
141
+ -0.608761429008721,
142
+ -0.923879532511287,
143
+ -0.38268343236509,
144
+ -0.99144486137381,
145
+ -0.130526192220052,
146
+ -0.99144486137381,
147
+ 0.130526192220051,
148
+ -0.923879532511287,
149
+ 0.38268343236509,
150
+ -0.793353340291235,
151
+ 0.608761429008721,
152
+ -0.608761429008721,
153
+ 0.793353340291235,
154
+ -0.38268343236509,
155
+ 0.923879532511287,
156
+ -0.130526192220052,
157
+ 0.99144486137381,
158
+ 0.130526192220052,
159
+ 0.99144486137381,
160
+ 0.38268343236509,
161
+ 0.923879532511287,
162
+ 0.608761429008721,
163
+ 0.793353340291235,
164
+ 0.793353340291235,
165
+ 0.608761429008721,
166
+ 0.923879532511287,
167
+ 0.38268343236509,
168
+ 0.99144486137381,
169
+ 0.130526192220051,
170
+ 0.99144486137381,
171
+ -0.130526192220051,
172
+ 0.923879532511287,
173
+ -0.38268343236509,
174
+ 0.793353340291235,
175
+ -0.60876142900872,
176
+ 0.608761429008721,
177
+ -0.793353340291235,
178
+ 0.38268343236509,
179
+ -0.923879532511287,
180
+ 0.130526192220052,
181
+ -0.99144486137381,
182
+ -0.130526192220052,
183
+ -0.99144486137381,
184
+ -0.38268343236509,
185
+ -0.923879532511287,
186
+ -0.608761429008721,
187
+ -0.793353340291235,
188
+ -0.793353340291235,
189
+ -0.608761429008721,
190
+ -0.923879532511287,
191
+ -0.38268343236509,
192
+ -0.99144486137381,
193
+ -0.130526192220052,
194
+ -0.99144486137381,
195
+ 0.130526192220051,
196
+ -0.923879532511287,
197
+ 0.38268343236509,
198
+ -0.793353340291235,
199
+ 0.608761429008721,
200
+ -0.608761429008721,
201
+ 0.793353340291235,
202
+ -0.38268343236509,
203
+ 0.923879532511287,
204
+ -0.130526192220052,
205
+ 0.99144486137381,
206
+ 0.130526192220052,
207
+ 0.99144486137381,
208
+ 0.38268343236509,
209
+ 0.923879532511287,
210
+ 0.608761429008721,
211
+ 0.793353340291235,
212
+ 0.793353340291235,
213
+ 0.608761429008721,
214
+ 0.923879532511287,
215
+ 0.38268343236509,
216
+ 0.99144486137381,
217
+ 0.130526192220051,
218
+ 0.99144486137381,
219
+ -0.130526192220051,
220
+ 0.923879532511287,
221
+ -0.38268343236509,
222
+ 0.793353340291235,
223
+ -0.60876142900872,
224
+ 0.608761429008721,
225
+ -0.793353340291235,
226
+ 0.38268343236509,
227
+ -0.923879532511287,
228
+ 0.130526192220052,
229
+ -0.99144486137381,
230
+ -0.130526192220052,
231
+ -0.99144486137381,
232
+ -0.38268343236509,
233
+ -0.923879532511287,
234
+ -0.608761429008721,
235
+ -0.793353340291235,
236
+ -0.793353340291235,
237
+ -0.608761429008721,
238
+ -0.923879532511287,
239
+ -0.38268343236509,
240
+ -0.99144486137381,
241
+ -0.130526192220052,
242
+ -0.99144486137381,
243
+ 0.130526192220051,
244
+ -0.923879532511287,
245
+ 0.38268343236509,
246
+ -0.793353340291235,
247
+ 0.608761429008721,
248
+ -0.608761429008721,
249
+ 0.793353340291235,
250
+ -0.38268343236509,
251
+ 0.923879532511287,
252
+ -0.130526192220052,
253
+ 0.99144486137381,
254
+ 0.130526192220052,
255
+ 0.99144486137381,
256
+ 0.38268343236509,
257
+ 0.923879532511287,
258
+ 0.608761429008721,
259
+ 0.793353340291235,
260
+ 0.793353340291235,
261
+ 0.608761429008721,
262
+ 0.923879532511287,
263
+ 0.38268343236509,
264
+ 0.99144486137381,
265
+ 0.130526192220051,
266
+ 0.99144486137381,
267
+ -0.130526192220051,
268
+ 0.923879532511287,
269
+ -0.38268343236509,
270
+ 0.793353340291235,
271
+ -0.60876142900872,
272
+ 0.608761429008721,
273
+ -0.793353340291235,
274
+ 0.38268343236509,
275
+ -0.923879532511287,
276
+ 0.130526192220052,
277
+ -0.99144486137381,
278
+ -0.130526192220052,
279
+ -0.99144486137381,
280
+ -0.38268343236509,
281
+ -0.923879532511287,
282
+ -0.608761429008721,
283
+ -0.793353340291235,
284
+ -0.793353340291235,
285
+ -0.608761429008721,
286
+ -0.923879532511287,
287
+ -0.38268343236509,
288
+ -0.99144486137381,
289
+ -0.130526192220052,
290
+ -0.99144486137381,
291
+ 0.130526192220051,
292
+ -0.923879532511287,
293
+ 0.38268343236509,
294
+ -0.793353340291235,
295
+ 0.608761429008721,
296
+ -0.608761429008721,
297
+ 0.793353340291235,
298
+ -0.38268343236509,
299
+ 0.923879532511287,
300
+ -0.130526192220052,
301
+ 0.99144486137381,
302
+ 0.130526192220052,
303
+ 0.99144486137381,
304
+ 0.38268343236509,
305
+ 0.923879532511287,
306
+ 0.608761429008721,
307
+ 0.793353340291235,
308
+ 0.793353340291235,
309
+ 0.608761429008721,
310
+ 0.923879532511287,
311
+ 0.38268343236509,
312
+ 0.99144486137381,
313
+ 0.130526192220051,
314
+ 0.99144486137381,
315
+ -0.130526192220051,
316
+ 0.923879532511287,
317
+ -0.38268343236509,
318
+ 0.793353340291235,
319
+ -0.60876142900872,
320
+ 0.608761429008721,
321
+ -0.793353340291235,
322
+ 0.38268343236509,
323
+ -0.923879532511287,
324
+ 0.130526192220052,
325
+ -0.99144486137381,
326
+ -0.130526192220052,
327
+ -0.99144486137381,
328
+ -0.38268343236509,
329
+ -0.923879532511287,
330
+ -0.608761429008721,
331
+ -0.793353340291235,
332
+ -0.793353340291235,
333
+ -0.608761429008721,
334
+ -0.923879532511287,
335
+ -0.38268343236509,
336
+ -0.99144486137381,
337
+ -0.130526192220052,
338
+ -0.99144486137381,
339
+ 0.130526192220051,
340
+ -0.923879532511287,
341
+ 0.38268343236509,
342
+ -0.793353340291235,
343
+ 0.608761429008721,
344
+ -0.608761429008721,
345
+ 0.793353340291235,
346
+ -0.38268343236509,
347
+ 0.923879532511287,
348
+ -0.130526192220052,
349
+ 0.99144486137381,
350
+ 0.38268343236509,
351
+ 0.923879532511287,
352
+ 0.923879532511287,
353
+ 0.38268343236509,
354
+ 0.923879532511287,
355
+ -0.38268343236509,
356
+ 0.38268343236509,
357
+ -0.923879532511287,
358
+ -0.38268343236509,
359
+ -0.923879532511287,
360
+ -0.923879532511287,
361
+ -0.38268343236509,
362
+ -0.923879532511287,
363
+ 0.38268343236509,
364
+ -0.38268343236509,
365
+ 0.923879532511287
366
+ ]), _ = new Float64Array([
367
+ -0.2700222198,
368
+ -0.9628540911,
369
+ 0.3863092627,
370
+ -0.9223693152,
371
+ 0.04444859006,
372
+ -0.999011673,
373
+ -0.5992523158,
374
+ -0.8005602176,
375
+ -0.7819280288,
376
+ 0.6233687174,
377
+ 0.9464672271,
378
+ 0.3227999196,
379
+ -0.6514146797,
380
+ -0.7587218957,
381
+ 0.9378472289,
382
+ 0.347048376,
383
+ -0.8497875957,
384
+ -0.5271252623,
385
+ -0.879042592,
386
+ 0.4767432447,
387
+ -0.892300288,
388
+ -0.4514423508,
389
+ -0.379844434,
390
+ -0.9250503802,
391
+ -0.9951650832,
392
+ 0.0982163789,
393
+ 0.7724397808,
394
+ -0.6350880136,
395
+ 0.7573283322,
396
+ -0.6530343002,
397
+ -0.9928004525,
398
+ -0.119780055,
399
+ -0.0532665713,
400
+ 0.9985803285,
401
+ 0.9754253726,
402
+ -0.2203300762,
403
+ -0.7665018163,
404
+ 0.6422421394,
405
+ 0.991636706,
406
+ 0.1290606184,
407
+ -0.994696838,
408
+ 0.1028503788,
409
+ -0.5379205513,
410
+ -0.84299554,
411
+ 0.5022815471,
412
+ -0.8647041387,
413
+ 0.4559821461,
414
+ -0.8899889226,
415
+ -0.8659131224,
416
+ -0.5001944266,
417
+ 0.0879458407,
418
+ -0.9961252577,
419
+ -0.5051684983,
420
+ 0.8630207346,
421
+ 0.7753185226,
422
+ -0.6315704146,
423
+ -0.6921944612,
424
+ 0.7217110418,
425
+ -0.5191659449,
426
+ -0.8546734591,
427
+ 0.8978622882,
428
+ -0.4402764035,
429
+ -0.1706774107,
430
+ 0.9853269617,
431
+ -0.9353430106,
432
+ -0.3537420705,
433
+ -0.9992404798,
434
+ 0.03896746794,
435
+ -0.2882064021,
436
+ -0.9575683108,
437
+ -0.9663811329,
438
+ 0.2571137995,
439
+ -0.8759714238,
440
+ -0.4823630009,
441
+ -0.8303123018,
442
+ -0.5572983775,
443
+ 0.05110133755,
444
+ -0.9986934731,
445
+ -0.8558373281,
446
+ -0.5172450752,
447
+ 0.09887025282,
448
+ 0.9951003332,
449
+ 0.9189016087,
450
+ 0.3944867976,
451
+ -0.2439375892,
452
+ -0.9697909324,
453
+ -0.8121409387,
454
+ -0.5834613061,
455
+ -0.9910431363,
456
+ 0.1335421355,
457
+ 0.8492423985,
458
+ -0.5280031709,
459
+ -0.9717838994,
460
+ -0.2358729591,
461
+ 0.9949457207,
462
+ 0.1004142068,
463
+ 0.6241065508,
464
+ -0.7813392434,
465
+ 0.662910307,
466
+ 0.7486988212,
467
+ -0.7197418176,
468
+ 0.6942418282,
469
+ -0.8143370775,
470
+ -0.5803922158,
471
+ 0.104521054,
472
+ -0.9945226741,
473
+ -0.1065926113,
474
+ -0.9943027784,
475
+ 0.445799684,
476
+ -0.8951327509,
477
+ 0.105547406,
478
+ 0.9944142724,
479
+ -0.992790267,
480
+ 0.1198644477,
481
+ -0.8334366408,
482
+ 0.552615025,
483
+ 0.9115561563,
484
+ -0.4111755999,
485
+ 0.8285544909,
486
+ -0.5599084351,
487
+ 0.7217097654,
488
+ -0.6921957921,
489
+ 0.4940492677,
490
+ -0.8694339084,
491
+ -0.3652321272,
492
+ -0.9309164803,
493
+ -0.9696606758,
494
+ 0.2444548501,
495
+ 0.08925509731,
496
+ -0.996008799,
497
+ 0.5354071276,
498
+ -0.8445941083,
499
+ -0.1053576186,
500
+ 0.9944343981,
501
+ -0.9890284586,
502
+ 0.1477251101,
503
+ 0.004856104961,
504
+ 0.9999882091,
505
+ 0.9885598478,
506
+ 0.1508291331,
507
+ 0.9286129562,
508
+ -0.3710498316,
509
+ -0.5832393863,
510
+ -0.8123003252,
511
+ 0.3015207509,
512
+ 0.9534596146,
513
+ -0.9575110528,
514
+ 0.2883965738,
515
+ 0.9715802154,
516
+ -0.2367105511,
517
+ 0.229981792,
518
+ 0.9731949318,
519
+ 0.955763816,
520
+ -0.2941352207,
521
+ 0.740956116,
522
+ 0.6715534485,
523
+ -0.9971513787,
524
+ -0.07542630764,
525
+ 0.6905710663,
526
+ -0.7232645452,
527
+ -0.290713703,
528
+ -0.9568100872,
529
+ 0.5912777791,
530
+ -0.8064679708,
531
+ -0.9454592212,
532
+ -0.325740481,
533
+ 0.6664455681,
534
+ 0.74555369,
535
+ 0.6236134912,
536
+ 0.7817328275,
537
+ 0.9126993851,
538
+ -0.4086316587,
539
+ -0.8191762011,
540
+ 0.5735419353,
541
+ -0.8812745759,
542
+ -0.4726046147,
543
+ 0.9953313627,
544
+ 0.09651672651,
545
+ 0.9855650846,
546
+ -0.1692969699,
547
+ -0.8495980887,
548
+ 0.5274306472,
549
+ 0.6174853946,
550
+ -0.7865823463,
551
+ 0.8508156371,
552
+ 0.52546432,
553
+ 0.9985032451,
554
+ -0.05469249926,
555
+ 0.1971371563,
556
+ -0.9803759185,
557
+ 0.6607855748,
558
+ -0.7505747292,
559
+ -0.03097494063,
560
+ 0.9995201614,
561
+ -0.6731660801,
562
+ 0.739491331,
563
+ -0.7195018362,
564
+ -0.6944905383,
565
+ 0.9727511689,
566
+ 0.2318515979,
567
+ 0.9997059088,
568
+ -0.0242506907,
569
+ 0.4421787429,
570
+ -0.8969269532,
571
+ 0.9981350961,
572
+ -0.061043673,
573
+ -0.9173660799,
574
+ -0.3980445648,
575
+ -0.8150056635,
576
+ -0.5794529907,
577
+ -0.8789331304,
578
+ 0.4769450202,
579
+ 0.0158605829,
580
+ 0.999874213,
581
+ -0.8095464474,
582
+ 0.5870558317,
583
+ -0.9165898907,
584
+ -0.3998286786,
585
+ -0.8023542565,
586
+ 0.5968480938,
587
+ -0.5176737917,
588
+ 0.8555780767,
589
+ -0.8154407307,
590
+ -0.5788405779,
591
+ 0.4022010347,
592
+ -0.9155513791,
593
+ -0.9052556868,
594
+ -0.4248672045,
595
+ 0.7317445619,
596
+ 0.6815789728,
597
+ -0.5647632201,
598
+ -0.8252529947,
599
+ -0.8403276335,
600
+ -0.5420788397,
601
+ -0.9314281527,
602
+ 0.363925262,
603
+ 0.5238198472,
604
+ 0.8518290719,
605
+ 0.7432803869,
606
+ -0.6689800195,
607
+ -0.985371561,
608
+ -0.1704197369,
609
+ 0.4601468731,
610
+ 0.88784281,
611
+ 0.825855404,
612
+ 0.5638819483,
613
+ 0.6182366099,
614
+ 0.7859920446,
615
+ 0.8331502863,
616
+ -0.553046653,
617
+ 0.1500307506,
618
+ 0.9886813308,
619
+ -0.662330369,
620
+ -0.7492119075,
621
+ -0.668598664,
622
+ 0.743623444,
623
+ 0.7025606278,
624
+ 0.7116238924,
625
+ -0.5419389763,
626
+ -0.8404178401,
627
+ -0.3388616456,
628
+ 0.9408362159,
629
+ 0.8331530315,
630
+ 0.5530425174,
631
+ -0.2989720662,
632
+ -0.9542618632,
633
+ 0.2638522993,
634
+ 0.9645630949,
635
+ 0.124108739,
636
+ -0.9922686234,
637
+ -0.7282649308,
638
+ -0.6852956957,
639
+ 0.6962500149,
640
+ 0.7177993569,
641
+ -0.9183535368,
642
+ 0.3957610156,
643
+ -0.6326102274,
644
+ -0.7744703352,
645
+ -0.9331891859,
646
+ -0.359385508,
647
+ -0.1153779357,
648
+ -0.9933216659,
649
+ 0.9514974788,
650
+ -0.3076565421,
651
+ -0.08987977445,
652
+ -0.9959526224,
653
+ 0.6678496916,
654
+ 0.7442961705,
655
+ 0.7952400393,
656
+ -0.6062947138,
657
+ -0.6462007402,
658
+ -0.7631674805,
659
+ -0.2733598753,
660
+ 0.9619118351,
661
+ 0.9669590226,
662
+ -0.254931851,
663
+ -0.9792894595,
664
+ 0.2024651934,
665
+ -0.5369502995,
666
+ -0.8436138784,
667
+ -0.270036471,
668
+ -0.9628500944,
669
+ -0.6400277131,
670
+ 0.7683518247,
671
+ -0.7854537493,
672
+ -0.6189203566,
673
+ 0.06005905383,
674
+ -0.9981948257,
675
+ -0.02455770378,
676
+ 0.9996984141,
677
+ -0.65983623,
678
+ 0.751409442,
679
+ -0.6253894466,
680
+ -0.7803127835,
681
+ -0.6210408851,
682
+ -0.7837781695,
683
+ 0.8348888491,
684
+ 0.5504185768,
685
+ -0.1592275245,
686
+ 0.9872419133,
687
+ 0.8367622488,
688
+ 0.5475663786,
689
+ -0.8675753916,
690
+ -0.4973056806,
691
+ -0.2022662628,
692
+ -0.9793305667,
693
+ 0.9399189937,
694
+ 0.3413975472,
695
+ 0.9877404807,
696
+ -0.1561049093,
697
+ -0.9034455656,
698
+ 0.4287028224,
699
+ 0.1269804218,
700
+ -0.9919052235,
701
+ -0.3819600854,
702
+ 0.924178821,
703
+ 0.9754625894,
704
+ 0.2201652486,
705
+ -0.3204015856,
706
+ -0.9472818081,
707
+ -0.9874760884,
708
+ 0.1577687387,
709
+ 0.02535348474,
710
+ -0.9996785487,
711
+ 0.4835130794,
712
+ -0.8753371362,
713
+ -0.2850799925,
714
+ -0.9585037287,
715
+ -0.06805516006,
716
+ -0.99768156,
717
+ -0.7885244045,
718
+ -0.6150034663,
719
+ 0.3185392127,
720
+ -0.9479096845,
721
+ 0.8880043089,
722
+ 0.4598351306,
723
+ 0.6476921488,
724
+ -0.7619021462,
725
+ 0.9820241299,
726
+ 0.1887554194,
727
+ 0.9357275128,
728
+ -0.3527237187,
729
+ -0.8894895414,
730
+ 0.4569555293,
731
+ 0.7922791302,
732
+ 0.6101588153,
733
+ 0.7483818261,
734
+ 0.6632681526,
735
+ -0.7288929755,
736
+ -0.6846276581,
737
+ 0.8729032783,
738
+ -0.4878932944,
739
+ 0.8288345784,
740
+ 0.5594937369,
741
+ 0.08074567077,
742
+ 0.9967347374,
743
+ 0.9799148216,
744
+ -0.1994165048,
745
+ -0.580730673,
746
+ -0.8140957471,
747
+ -0.4700049791,
748
+ -0.8826637636,
749
+ 0.2409492979,
750
+ 0.9705377045,
751
+ 0.9437816757,
752
+ -0.3305694308,
753
+ -0.8927998638,
754
+ -0.4504535528,
755
+ -0.8069622304,
756
+ 0.5906030467,
757
+ 0.06258973166,
758
+ 0.9980393407,
759
+ -0.9312597469,
760
+ 0.3643559849,
761
+ 0.5777449785,
762
+ 0.8162173362,
763
+ -0.3360095855,
764
+ -0.941858566,
765
+ 0.697932075,
766
+ -0.7161639607,
767
+ -0.002008157227,
768
+ -0.9999979837,
769
+ -0.1827294312,
770
+ -0.9831632392,
771
+ -0.6523911722,
772
+ 0.7578824173,
773
+ -0.4302626911,
774
+ -0.9027037258,
775
+ -0.9985126289,
776
+ -0.05452091251,
777
+ -0.01028102172,
778
+ -0.9999471489,
779
+ -0.4946071129,
780
+ 0.8691166802,
781
+ -0.2999350194,
782
+ 0.9539596344,
783
+ 0.8165471961,
784
+ 0.5772786819,
785
+ 0.2697460475,
786
+ 0.962931498,
787
+ -0.7306287391,
788
+ -0.6827749597,
789
+ -0.7590952064,
790
+ -0.6509796216,
791
+ -0.907053853,
792
+ 0.4210146171,
793
+ -0.5104861064,
794
+ -0.8598860013,
795
+ 0.8613350597,
796
+ 0.5080373165,
797
+ 0.5007881595,
798
+ -0.8655698812,
799
+ -0.654158152,
800
+ 0.7563577938,
801
+ -0.8382755311,
802
+ -0.545246856,
803
+ 0.6940070834,
804
+ 0.7199681717,
805
+ 0.06950936031,
806
+ 0.9975812994,
807
+ 0.1702942185,
808
+ -0.9853932612,
809
+ 0.2695973274,
810
+ 0.9629731466,
811
+ 0.5519612192,
812
+ -0.8338697815,
813
+ 0.225657487,
814
+ -0.9742067022,
815
+ 0.4215262855,
816
+ -0.9068161835,
817
+ 0.4881873305,
818
+ -0.8727388672,
819
+ -0.3683854996,
820
+ -0.9296731273,
821
+ -0.9825390578,
822
+ 0.1860564427,
823
+ 0.81256471,
824
+ 0.5828709909,
825
+ 0.3196460933,
826
+ -0.9475370046,
827
+ 0.9570913859,
828
+ 0.2897862643,
829
+ -0.6876655497,
830
+ -0.7260276109,
831
+ -0.9988770922,
832
+ -0.047376731,
833
+ -0.1250179027,
834
+ 0.992154486,
835
+ -0.8280133617,
836
+ 0.560708367,
837
+ 0.9324863769,
838
+ -0.3612051451,
839
+ 0.6394653183,
840
+ 0.7688199442,
841
+ -0.01623847064,
842
+ -0.9998681473,
843
+ -0.9955014666,
844
+ -0.09474613458,
845
+ -0.81453315,
846
+ 0.580117012,
847
+ 0.4037327978,
848
+ -0.9148769469,
849
+ 0.9944263371,
850
+ 0.1054336766,
851
+ -0.1624711654,
852
+ 0.9867132919,
853
+ -0.9949487814,
854
+ -0.100383875,
855
+ -0.6995302564,
856
+ 0.7146029809,
857
+ 0.5263414922,
858
+ -0.85027327,
859
+ -0.5395221479,
860
+ 0.841971408,
861
+ 0.6579370318,
862
+ 0.7530729462,
863
+ 0.01426758847,
864
+ -0.9998982128,
865
+ -0.6734383991,
866
+ 0.7392433447,
867
+ 0.639412098,
868
+ -0.7688642071,
869
+ 0.9211571421,
870
+ 0.3891908523,
871
+ -0.146637214,
872
+ -0.9891903394,
873
+ -0.782318098,
874
+ 0.6228791163,
875
+ -0.5039610839,
876
+ -0.8637263605,
877
+ -0.7743120191,
878
+ -0.6328039957
879
+ ]), i0 = new Float64Array([
880
+ 0,
881
+ 1,
882
+ 1,
883
+ 0,
884
+ 0,
885
+ -1,
886
+ 1,
887
+ 0,
888
+ 0,
889
+ 1,
890
+ -1,
891
+ 0,
892
+ 0,
893
+ -1,
894
+ -1,
895
+ 0,
896
+ 1,
897
+ 0,
898
+ 1,
899
+ 0,
900
+ -1,
901
+ 0,
902
+ 1,
903
+ 0,
904
+ 1,
905
+ 0,
906
+ -1,
907
+ 0,
908
+ -1,
909
+ 0,
910
+ -1,
911
+ 0,
912
+ 1,
913
+ 1,
914
+ 0,
915
+ 0,
916
+ -1,
917
+ 1,
918
+ 0,
919
+ 0,
920
+ 1,
921
+ -1,
922
+ 0,
923
+ 0,
924
+ -1,
925
+ -1,
926
+ 0,
927
+ 0,
928
+ 0,
929
+ 1,
930
+ 1,
931
+ 0,
932
+ 0,
933
+ -1,
934
+ 1,
935
+ 0,
936
+ 0,
937
+ 1,
938
+ -1,
939
+ 0,
940
+ 0,
941
+ -1,
942
+ -1,
943
+ 0,
944
+ 1,
945
+ 0,
946
+ 1,
947
+ 0,
948
+ -1,
949
+ 0,
950
+ 1,
951
+ 0,
952
+ 1,
953
+ 0,
954
+ -1,
955
+ 0,
956
+ -1,
957
+ 0,
958
+ -1,
959
+ 0,
960
+ 1,
961
+ 1,
962
+ 0,
963
+ 0,
964
+ -1,
965
+ 1,
966
+ 0,
967
+ 0,
968
+ 1,
969
+ -1,
970
+ 0,
971
+ 0,
972
+ -1,
973
+ -1,
974
+ 0,
975
+ 0,
976
+ 0,
977
+ 1,
978
+ 1,
979
+ 0,
980
+ 0,
981
+ -1,
982
+ 1,
983
+ 0,
984
+ 0,
985
+ 1,
986
+ -1,
987
+ 0,
988
+ 0,
989
+ -1,
990
+ -1,
991
+ 0,
992
+ 1,
993
+ 0,
994
+ 1,
995
+ 0,
996
+ -1,
997
+ 0,
998
+ 1,
999
+ 0,
1000
+ 1,
1001
+ 0,
1002
+ -1,
1003
+ 0,
1004
+ -1,
1005
+ 0,
1006
+ -1,
1007
+ 0,
1008
+ 1,
1009
+ 1,
1010
+ 0,
1011
+ 0,
1012
+ -1,
1013
+ 1,
1014
+ 0,
1015
+ 0,
1016
+ 1,
1017
+ -1,
1018
+ 0,
1019
+ 0,
1020
+ -1,
1021
+ -1,
1022
+ 0,
1023
+ 0,
1024
+ 0,
1025
+ 1,
1026
+ 1,
1027
+ 0,
1028
+ 0,
1029
+ -1,
1030
+ 1,
1031
+ 0,
1032
+ 0,
1033
+ 1,
1034
+ -1,
1035
+ 0,
1036
+ 0,
1037
+ -1,
1038
+ -1,
1039
+ 0,
1040
+ 1,
1041
+ 0,
1042
+ 1,
1043
+ 0,
1044
+ -1,
1045
+ 0,
1046
+ 1,
1047
+ 0,
1048
+ 1,
1049
+ 0,
1050
+ -1,
1051
+ 0,
1052
+ -1,
1053
+ 0,
1054
+ -1,
1055
+ 0,
1056
+ 1,
1057
+ 1,
1058
+ 0,
1059
+ 0,
1060
+ -1,
1061
+ 1,
1062
+ 0,
1063
+ 0,
1064
+ 1,
1065
+ -1,
1066
+ 0,
1067
+ 0,
1068
+ -1,
1069
+ -1,
1070
+ 0,
1071
+ 0,
1072
+ 0,
1073
+ 1,
1074
+ 1,
1075
+ 0,
1076
+ 0,
1077
+ -1,
1078
+ 1,
1079
+ 0,
1080
+ 0,
1081
+ 1,
1082
+ -1,
1083
+ 0,
1084
+ 0,
1085
+ -1,
1086
+ -1,
1087
+ 0,
1088
+ 1,
1089
+ 0,
1090
+ 1,
1091
+ 0,
1092
+ -1,
1093
+ 0,
1094
+ 1,
1095
+ 0,
1096
+ 1,
1097
+ 0,
1098
+ -1,
1099
+ 0,
1100
+ -1,
1101
+ 0,
1102
+ -1,
1103
+ 0,
1104
+ 1,
1105
+ 1,
1106
+ 0,
1107
+ 0,
1108
+ -1,
1109
+ 1,
1110
+ 0,
1111
+ 0,
1112
+ 1,
1113
+ -1,
1114
+ 0,
1115
+ 0,
1116
+ -1,
1117
+ -1,
1118
+ 0,
1119
+ 0,
1120
+ 1,
1121
+ 1,
1122
+ 0,
1123
+ 0,
1124
+ 0,
1125
+ -1,
1126
+ 1,
1127
+ 0,
1128
+ -1,
1129
+ 1,
1130
+ 0,
1131
+ 0,
1132
+ 0,
1133
+ -1,
1134
+ -1,
1135
+ 0
1136
+ ]), w = new Float64Array([
1137
+ -0.7292736885,
1138
+ -0.6618439697,
1139
+ 0.1735581948,
1140
+ 0,
1141
+ 0.790292081,
1142
+ -0.5480887466,
1143
+ -0.2739291014,
1144
+ 0,
1145
+ 0.7217578935,
1146
+ 0.6226212466,
1147
+ -0.3023380997,
1148
+ 0,
1149
+ 0.565683137,
1150
+ -0.8208298145,
1151
+ -0.0790000257,
1152
+ 0,
1153
+ 0.760049034,
1154
+ -0.5555979497,
1155
+ -0.3370999617,
1156
+ 0,
1157
+ 0.3713945616,
1158
+ 0.5011264475,
1159
+ 0.7816254623,
1160
+ 0,
1161
+ -0.1277062463,
1162
+ -0.4254438999,
1163
+ -0.8959289049,
1164
+ 0,
1165
+ -0.2881560924,
1166
+ -0.5815838982,
1167
+ 0.7607405838,
1168
+ 0,
1169
+ 0.5849561111,
1170
+ -0.662820239,
1171
+ -0.4674352136,
1172
+ 0,
1173
+ 0.3307171178,
1174
+ 0.0391653737,
1175
+ 0.94291689,
1176
+ 0,
1177
+ 0.8712121778,
1178
+ -0.4113374369,
1179
+ -0.2679381538,
1180
+ 0,
1181
+ 0.580981015,
1182
+ 0.7021915846,
1183
+ 0.4115677815,
1184
+ 0,
1185
+ 0.503756873,
1186
+ 0.6330056931,
1187
+ -0.5878203852,
1188
+ 0,
1189
+ 0.4493712205,
1190
+ 0.601390195,
1191
+ 0.6606022552,
1192
+ 0,
1193
+ -0.6878403724,
1194
+ 0.09018890807,
1195
+ -0.7202371714,
1196
+ 0,
1197
+ -0.5958956522,
1198
+ -0.6469350577,
1199
+ 0.475797649,
1200
+ 0,
1201
+ -0.5127052122,
1202
+ 0.1946921978,
1203
+ -0.8361987284,
1204
+ 0,
1205
+ -0.9911507142,
1206
+ -0.05410276466,
1207
+ -0.1212153153,
1208
+ 0,
1209
+ -0.2149721042,
1210
+ 0.9720882117,
1211
+ -0.09397607749,
1212
+ 0,
1213
+ -0.7518650936,
1214
+ -0.5428057603,
1215
+ 0.3742469607,
1216
+ 0,
1217
+ 0.5237068895,
1218
+ 0.8516377189,
1219
+ -0.02107817834,
1220
+ 0,
1221
+ 0.6333504779,
1222
+ 0.1926167129,
1223
+ -0.7495104896,
1224
+ 0,
1225
+ -0.06788241606,
1226
+ 0.3998305789,
1227
+ 0.9140719259,
1228
+ 0,
1229
+ -0.5538628599,
1230
+ -0.4729896695,
1231
+ -0.6852128902,
1232
+ 0,
1233
+ -0.7261455366,
1234
+ -0.5911990757,
1235
+ 0.3509933228,
1236
+ 0,
1237
+ -0.9229274737,
1238
+ -0.1782808786,
1239
+ 0.3412049336,
1240
+ 0,
1241
+ -0.6968815002,
1242
+ 0.6511274338,
1243
+ 0.3006480328,
1244
+ 0,
1245
+ 0.9608044783,
1246
+ -0.2098363234,
1247
+ -0.1811724921,
1248
+ 0,
1249
+ 0.06817146062,
1250
+ -0.9743405129,
1251
+ 0.2145069156,
1252
+ 0,
1253
+ -0.3577285196,
1254
+ -0.6697087264,
1255
+ -0.6507845481,
1256
+ 0,
1257
+ -0.1868621131,
1258
+ 0.7648617052,
1259
+ -0.6164974636,
1260
+ 0,
1261
+ -0.6541697588,
1262
+ 0.3967914832,
1263
+ 0.6439087246,
1264
+ 0,
1265
+ 0.6993340405,
1266
+ -0.6164538506,
1267
+ 0.3618239211,
1268
+ 0,
1269
+ -0.1546665739,
1270
+ 0.6291283928,
1271
+ 0.7617583057,
1272
+ 0,
1273
+ -0.6841612949,
1274
+ -0.2580482182,
1275
+ -0.6821542638,
1276
+ 0,
1277
+ 0.5383980957,
1278
+ 0.4258654885,
1279
+ 0.7271630328,
1280
+ 0,
1281
+ -0.5026987823,
1282
+ -0.7939832935,
1283
+ -0.3418836993,
1284
+ 0,
1285
+ 0.3202971715,
1286
+ 0.2834415347,
1287
+ 0.9039195862,
1288
+ 0,
1289
+ 0.8683227101,
1290
+ -3762656404e-13,
1291
+ -0.4959995258,
1292
+ 0,
1293
+ 0.791120031,
1294
+ -0.08511045745,
1295
+ 0.6057105799,
1296
+ 0,
1297
+ -0.04011016052,
1298
+ -0.4397248749,
1299
+ 0.8972364289,
1300
+ 0,
1301
+ 0.9145119872,
1302
+ 0.3579346169,
1303
+ -0.1885487608,
1304
+ 0,
1305
+ -0.9612039066,
1306
+ -0.2756484276,
1307
+ 0.01024666929,
1308
+ 0,
1309
+ 0.6510361721,
1310
+ -0.2877799159,
1311
+ -0.7023778346,
1312
+ 0,
1313
+ -0.2041786351,
1314
+ 0.7365237271,
1315
+ 0.644859585,
1316
+ 0,
1317
+ -0.7718263711,
1318
+ 0.3790626912,
1319
+ 0.5104855816,
1320
+ 0,
1321
+ -0.3060082741,
1322
+ -0.7692987727,
1323
+ 0.5608371729,
1324
+ 0,
1325
+ 0.454007341,
1326
+ -0.5024843065,
1327
+ 0.7357899537,
1328
+ 0,
1329
+ 0.4816795475,
1330
+ 0.6021208291,
1331
+ -0.6367380315,
1332
+ 0,
1333
+ 0.6961980369,
1334
+ -0.3222197429,
1335
+ 0.641469197,
1336
+ 0,
1337
+ -0.6532160499,
1338
+ -0.6781148932,
1339
+ 0.3368515753,
1340
+ 0,
1341
+ 0.5089301236,
1342
+ -0.6154662304,
1343
+ -0.6018234363,
1344
+ 0,
1345
+ -0.1635919754,
1346
+ -0.9133604627,
1347
+ -0.372840892,
1348
+ 0,
1349
+ 0.52408019,
1350
+ -0.8437664109,
1351
+ 0.1157505864,
1352
+ 0,
1353
+ 0.5902587356,
1354
+ 0.4983817807,
1355
+ -0.6349883666,
1356
+ 0,
1357
+ 0.5863227872,
1358
+ 0.494764745,
1359
+ 0.6414307729,
1360
+ 0,
1361
+ 0.6779335087,
1362
+ 0.2341345225,
1363
+ 0.6968408593,
1364
+ 0,
1365
+ 0.7177054546,
1366
+ -0.6858979348,
1367
+ 0.120178631,
1368
+ 0,
1369
+ -0.5328819713,
1370
+ -0.5205125012,
1371
+ 0.6671608058,
1372
+ 0,
1373
+ -0.8654874251,
1374
+ -0.0700727088,
1375
+ -0.4960053754,
1376
+ 0,
1377
+ -0.2861810166,
1378
+ 0.7952089234,
1379
+ 0.5345495242,
1380
+ 0,
1381
+ -0.04849529634,
1382
+ 0.9810836427,
1383
+ -0.1874115585,
1384
+ 0,
1385
+ -0.6358521667,
1386
+ 0.6058348682,
1387
+ 0.4781800233,
1388
+ 0,
1389
+ 0.6254794696,
1390
+ -0.2861619734,
1391
+ 0.7258696564,
1392
+ 0,
1393
+ -0.2585259868,
1394
+ 0.5061949264,
1395
+ -0.8227581726,
1396
+ 0,
1397
+ 0.02136306781,
1398
+ 0.5064016808,
1399
+ -0.8620330371,
1400
+ 0,
1401
+ 0.200111773,
1402
+ 0.8599263484,
1403
+ 0.4695550591,
1404
+ 0,
1405
+ 0.4743561372,
1406
+ 0.6014985084,
1407
+ -0.6427953014,
1408
+ 0,
1409
+ 0.6622993731,
1410
+ -0.5202474575,
1411
+ -0.5391679918,
1412
+ 0,
1413
+ 0.08084972818,
1414
+ -0.6532720452,
1415
+ 0.7527940996,
1416
+ 0,
1417
+ -0.6893687501,
1418
+ 0.0592860349,
1419
+ 0.7219805347,
1420
+ 0,
1421
+ -0.1121887082,
1422
+ -0.9673185067,
1423
+ 0.2273952515,
1424
+ 0,
1425
+ 0.7344116094,
1426
+ 0.5979668656,
1427
+ -0.3210532909,
1428
+ 0,
1429
+ 0.5789393465,
1430
+ -0.2488849713,
1431
+ 0.7764570201,
1432
+ 0,
1433
+ 0.6988182827,
1434
+ 0.3557169806,
1435
+ -0.6205791146,
1436
+ 0,
1437
+ -0.8636845529,
1438
+ -0.2748771249,
1439
+ -0.4224826141,
1440
+ 0,
1441
+ -0.4247027957,
1442
+ -0.4640880967,
1443
+ 0.777335046,
1444
+ 0,
1445
+ 0.5257722489,
1446
+ -0.8427017621,
1447
+ 0.1158329937,
1448
+ 0,
1449
+ 0.9343830603,
1450
+ 0.316302472,
1451
+ -0.1639543925,
1452
+ 0,
1453
+ -0.1016836419,
1454
+ -0.8057303073,
1455
+ -0.5834887393,
1456
+ 0,
1457
+ -0.6529238969,
1458
+ 0.50602126,
1459
+ -0.5635892736,
1460
+ 0,
1461
+ -0.2465286165,
1462
+ -0.9668205684,
1463
+ -0.06694497494,
1464
+ 0,
1465
+ -0.9776897119,
1466
+ -0.2099250524,
1467
+ -0.007368825344,
1468
+ 0,
1469
+ 0.7736893337,
1470
+ 0.5734244712,
1471
+ 0.2694238123,
1472
+ 0,
1473
+ -0.6095087895,
1474
+ 0.4995678998,
1475
+ 0.6155736747,
1476
+ 0,
1477
+ 0.5794535482,
1478
+ 0.7434546771,
1479
+ 0.3339292269,
1480
+ 0,
1481
+ -0.8226211154,
1482
+ 0.08142581855,
1483
+ 0.5627293636,
1484
+ 0,
1485
+ -0.510385483,
1486
+ 0.4703667658,
1487
+ 0.7199039967,
1488
+ 0,
1489
+ -0.5764971849,
1490
+ -0.07231656274,
1491
+ -0.8138926898,
1492
+ 0,
1493
+ 0.7250628871,
1494
+ 0.3949971505,
1495
+ -0.5641463116,
1496
+ 0,
1497
+ -0.1525424005,
1498
+ 0.4860840828,
1499
+ -0.8604958341,
1500
+ 0,
1501
+ -0.5550976208,
1502
+ -0.4957820792,
1503
+ 0.667882296,
1504
+ 0,
1505
+ -0.1883614327,
1506
+ 0.9145869398,
1507
+ 0.357841725,
1508
+ 0,
1509
+ 0.7625556724,
1510
+ -0.5414408243,
1511
+ -0.3540489801,
1512
+ 0,
1513
+ -0.5870231946,
1514
+ -0.3226498013,
1515
+ -0.7424963803,
1516
+ 0,
1517
+ 0.3051124198,
1518
+ 0.2262544068,
1519
+ -0.9250488391,
1520
+ 0,
1521
+ 0.6379576059,
1522
+ 0.577242424,
1523
+ -0.5097070502,
1524
+ 0,
1525
+ -0.5966775796,
1526
+ 0.1454852398,
1527
+ -0.7891830656,
1528
+ 0,
1529
+ -0.658330573,
1530
+ 0.6555487542,
1531
+ -0.3699414651,
1532
+ 0,
1533
+ 0.7434892426,
1534
+ 0.2351084581,
1535
+ 0.6260573129,
1536
+ 0,
1537
+ 0.5562114096,
1538
+ 0.8264360377,
1539
+ -0.0873632843,
1540
+ 0,
1541
+ -0.3028940016,
1542
+ -0.8251527185,
1543
+ 0.4768419182,
1544
+ 0,
1545
+ 0.1129343818,
1546
+ -0.985888439,
1547
+ -0.1235710781,
1548
+ 0,
1549
+ 0.5937652891,
1550
+ -0.5896813806,
1551
+ 0.5474656618,
1552
+ 0,
1553
+ 0.6757964092,
1554
+ -0.5835758614,
1555
+ -0.4502648413,
1556
+ 0,
1557
+ 0.7242302609,
1558
+ -0.1152719764,
1559
+ 0.6798550586,
1560
+ 0,
1561
+ -0.9511914166,
1562
+ 0.0753623979,
1563
+ -0.2992580792,
1564
+ 0,
1565
+ 0.2539470961,
1566
+ -0.1886339355,
1567
+ 0.9486454084,
1568
+ 0,
1569
+ 0.571433621,
1570
+ -0.1679450851,
1571
+ -0.8032795685,
1572
+ 0,
1573
+ -0.06778234979,
1574
+ 0.3978269256,
1575
+ 0.9149531629,
1576
+ 0,
1577
+ 0.6074972649,
1578
+ 0.733060024,
1579
+ -0.3058922593,
1580
+ 0,
1581
+ -0.5435478392,
1582
+ 0.1675822484,
1583
+ 0.8224791405,
1584
+ 0,
1585
+ -0.5876678086,
1586
+ -0.3380045064,
1587
+ -0.7351186982,
1588
+ 0,
1589
+ -0.7967562402,
1590
+ 0.04097822706,
1591
+ -0.6029098428,
1592
+ 0,
1593
+ -0.1996350917,
1594
+ 0.8706294745,
1595
+ 0.4496111079,
1596
+ 0,
1597
+ -0.02787660336,
1598
+ -0.9106232682,
1599
+ -0.4122962022,
1600
+ 0,
1601
+ -0.7797625996,
1602
+ -0.6257634692,
1603
+ 0.01975775581,
1604
+ 0,
1605
+ -0.5211232846,
1606
+ 0.7401644346,
1607
+ -0.4249554471,
1608
+ 0,
1609
+ 0.8575424857,
1610
+ 0.4053272873,
1611
+ -0.3167501783,
1612
+ 0,
1613
+ 0.1045223322,
1614
+ 0.8390195772,
1615
+ -0.5339674439,
1616
+ 0,
1617
+ 0.3501822831,
1618
+ 0.9242524096,
1619
+ -0.1520850155,
1620
+ 0,
1621
+ 0.1987849858,
1622
+ 0.07647613266,
1623
+ 0.9770547224,
1624
+ 0,
1625
+ 0.7845996363,
1626
+ 0.6066256811,
1627
+ -0.1280964233,
1628
+ 0,
1629
+ 0.09006737436,
1630
+ -0.9750989929,
1631
+ -0.2026569073,
1632
+ 0,
1633
+ -0.8274343547,
1634
+ -0.542299559,
1635
+ 0.1458203587,
1636
+ 0,
1637
+ -0.3485797732,
1638
+ -0.415802277,
1639
+ 0.840000362,
1640
+ 0,
1641
+ -0.2471778936,
1642
+ -0.7304819962,
1643
+ -0.6366310879,
1644
+ 0,
1645
+ -0.3700154943,
1646
+ 0.8577948156,
1647
+ 0.3567584454,
1648
+ 0,
1649
+ 0.5913394901,
1650
+ -0.548311967,
1651
+ -0.5913303597,
1652
+ 0,
1653
+ 0.1204873514,
1654
+ -0.7626472379,
1655
+ -0.6354935001,
1656
+ 0,
1657
+ 0.616959265,
1658
+ 0.03079647928,
1659
+ 0.7863922953,
1660
+ 0,
1661
+ 0.1258156836,
1662
+ -0.6640829889,
1663
+ -0.7369967419,
1664
+ 0,
1665
+ -0.6477565124,
1666
+ -0.1740147258,
1667
+ -0.7417077429,
1668
+ 0,
1669
+ 0.6217889313,
1670
+ -0.7804430448,
1671
+ -0.06547655076,
1672
+ 0,
1673
+ 0.6589943422,
1674
+ -0.6096987708,
1675
+ 0.4404473475,
1676
+ 0,
1677
+ -0.2689837504,
1678
+ -0.6732403169,
1679
+ -0.6887635427,
1680
+ 0,
1681
+ -0.3849775103,
1682
+ 0.5676542638,
1683
+ 0.7277093879,
1684
+ 0,
1685
+ 0.5754444408,
1686
+ 0.8110471154,
1687
+ -0.1051963504,
1688
+ 0,
1689
+ 0.9141593684,
1690
+ 0.3832947817,
1691
+ 0.131900567,
1692
+ 0,
1693
+ -0.107925319,
1694
+ 0.9245493968,
1695
+ 0.3654593525,
1696
+ 0,
1697
+ 0.377977089,
1698
+ 0.3043148782,
1699
+ 0.8743716458,
1700
+ 0,
1701
+ -0.2142885215,
1702
+ -0.8259286236,
1703
+ 0.5214617324,
1704
+ 0,
1705
+ 0.5802544474,
1706
+ 0.4148098596,
1707
+ -0.7008834116,
1708
+ 0,
1709
+ -0.1982660881,
1710
+ 0.8567161266,
1711
+ -0.4761596756,
1712
+ 0,
1713
+ -0.03381553704,
1714
+ 0.3773180787,
1715
+ -0.9254661404,
1716
+ 0,
1717
+ -0.6867922841,
1718
+ -0.6656597827,
1719
+ 0.2919133642,
1720
+ 0,
1721
+ 0.7731742607,
1722
+ -0.2875793547,
1723
+ -0.5652430251,
1724
+ 0,
1725
+ -0.09655941928,
1726
+ 0.9193708367,
1727
+ -0.3813575004,
1728
+ 0,
1729
+ 0.2715702457,
1730
+ -0.9577909544,
1731
+ -0.09426605581,
1732
+ 0,
1733
+ 0.2451015704,
1734
+ -0.6917998565,
1735
+ -0.6792188003,
1736
+ 0,
1737
+ 0.977700782,
1738
+ -0.1753855374,
1739
+ 0.1155036542,
1740
+ 0,
1741
+ -0.5224739938,
1742
+ 0.8521606816,
1743
+ 0.02903615945,
1744
+ 0,
1745
+ -0.7734880599,
1746
+ -0.5261292347,
1747
+ 0.3534179531,
1748
+ 0,
1749
+ -0.7134492443,
1750
+ -0.269547243,
1751
+ 0.6467878011,
1752
+ 0,
1753
+ 0.1644037271,
1754
+ 0.5105846203,
1755
+ -0.8439637196,
1756
+ 0,
1757
+ 0.6494635788,
1758
+ 0.05585611296,
1759
+ 0.7583384168,
1760
+ 0,
1761
+ -0.4711970882,
1762
+ 0.5017280509,
1763
+ -0.7254255765,
1764
+ 0,
1765
+ -0.6335764307,
1766
+ -0.2381686273,
1767
+ -0.7361091029,
1768
+ 0,
1769
+ -0.9021533097,
1770
+ -0.270947803,
1771
+ -0.3357181763,
1772
+ 0,
1773
+ -0.3793711033,
1774
+ 0.872258117,
1775
+ 0.3086152025,
1776
+ 0,
1777
+ -0.6855598966,
1778
+ -0.3250143309,
1779
+ 0.6514394162,
1780
+ 0,
1781
+ 0.2900942212,
1782
+ -0.7799057743,
1783
+ -0.5546100667,
1784
+ 0,
1785
+ -0.2098319339,
1786
+ 0.85037073,
1787
+ 0.4825351604,
1788
+ 0,
1789
+ -0.4592603758,
1790
+ 0.6598504336,
1791
+ -0.5947077538,
1792
+ 0,
1793
+ 0.8715945488,
1794
+ 0.09616365406,
1795
+ -0.4807031248,
1796
+ 0,
1797
+ -0.6776666319,
1798
+ 0.7118504878,
1799
+ -0.1844907016,
1800
+ 0,
1801
+ 0.7044377633,
1802
+ 0.312427597,
1803
+ 0.637304036,
1804
+ 0,
1805
+ -0.7052318886,
1806
+ -0.2401093292,
1807
+ -0.6670798253,
1808
+ 0,
1809
+ 0.081921007,
1810
+ -0.7207336136,
1811
+ -0.6883545647,
1812
+ 0,
1813
+ -0.6993680906,
1814
+ -0.5875763221,
1815
+ -0.4069869034,
1816
+ 0,
1817
+ -0.1281454481,
1818
+ 0.6419895885,
1819
+ 0.7559286424,
1820
+ 0,
1821
+ -0.6337388239,
1822
+ -0.6785471501,
1823
+ -0.3714146849,
1824
+ 0,
1825
+ 0.5565051903,
1826
+ -0.2168887573,
1827
+ -0.8020356851,
1828
+ 0,
1829
+ -0.5791554484,
1830
+ 0.7244372011,
1831
+ -0.3738578718,
1832
+ 0,
1833
+ 0.1175779076,
1834
+ -0.7096451073,
1835
+ 0.6946792478,
1836
+ 0,
1837
+ -0.6134619607,
1838
+ 0.1323631078,
1839
+ 0.7785527795,
1840
+ 0,
1841
+ 0.6984635305,
1842
+ -0.02980516237,
1843
+ -0.715024719,
1844
+ 0,
1845
+ 0.8318082963,
1846
+ -0.3930171956,
1847
+ 0.3919597455,
1848
+ 0,
1849
+ 0.1469576422,
1850
+ 0.05541651717,
1851
+ -0.9875892167,
1852
+ 0,
1853
+ 0.708868575,
1854
+ -0.2690503865,
1855
+ 0.6520101478,
1856
+ 0,
1857
+ 0.2726053183,
1858
+ 0.67369766,
1859
+ -0.68688995,
1860
+ 0,
1861
+ -0.6591295371,
1862
+ 0.3035458599,
1863
+ -0.6880466294,
1864
+ 0,
1865
+ 0.4815131379,
1866
+ -0.7528270071,
1867
+ 0.4487723203,
1868
+ 0,
1869
+ 0.9430009463,
1870
+ 0.1675647412,
1871
+ -0.2875261255,
1872
+ 0,
1873
+ 0.434802957,
1874
+ 0.7695304522,
1875
+ -0.4677277752,
1876
+ 0,
1877
+ 0.3931996188,
1878
+ 0.594473625,
1879
+ 0.7014236729,
1880
+ 0,
1881
+ 0.7254336655,
1882
+ -0.603925654,
1883
+ 0.3301814672,
1884
+ 0,
1885
+ 0.7590235227,
1886
+ -0.6506083235,
1887
+ 0.02433313207,
1888
+ 0,
1889
+ -0.8552768592,
1890
+ -0.3430042733,
1891
+ 0.3883935666,
1892
+ 0,
1893
+ -0.6139746835,
1894
+ 0.6981725247,
1895
+ 0.3682257648,
1896
+ 0,
1897
+ -0.7465905486,
1898
+ -0.5752009504,
1899
+ 0.3342849376,
1900
+ 0,
1901
+ 0.5730065677,
1902
+ 0.810555537,
1903
+ -0.1210916791,
1904
+ 0,
1905
+ -0.9225877367,
1906
+ -0.3475211012,
1907
+ -0.167514036,
1908
+ 0,
1909
+ -0.7105816789,
1910
+ -0.4719692027,
1911
+ -0.5218416899,
1912
+ 0,
1913
+ -0.08564609717,
1914
+ 0.3583001386,
1915
+ 0.929669703,
1916
+ 0,
1917
+ -0.8279697606,
1918
+ -0.2043157126,
1919
+ 0.5222271202,
1920
+ 0,
1921
+ 0.427944023,
1922
+ 0.278165994,
1923
+ 0.8599346446,
1924
+ 0,
1925
+ 0.5399079671,
1926
+ -0.7857120652,
1927
+ -0.3019204161,
1928
+ 0,
1929
+ 0.5678404253,
1930
+ -0.5495413974,
1931
+ -0.6128307303,
1932
+ 0,
1933
+ -0.9896071041,
1934
+ 0.1365639107,
1935
+ -0.04503418428,
1936
+ 0,
1937
+ -0.6154342638,
1938
+ -0.6440875597,
1939
+ 0.4543037336,
1940
+ 0,
1941
+ 0.1074204368,
1942
+ -0.7946340692,
1943
+ 0.5975094525,
1944
+ 0,
1945
+ -0.3595449969,
1946
+ -0.8885529948,
1947
+ 0.28495784,
1948
+ 0,
1949
+ -0.2180405296,
1950
+ 0.1529888965,
1951
+ 0.9638738118,
1952
+ 0,
1953
+ -0.7277432317,
1954
+ -0.6164050508,
1955
+ -0.3007234646,
1956
+ 0,
1957
+ 0.7249729114,
1958
+ -0.00669719484,
1959
+ 0.6887448187,
1960
+ 0,
1961
+ -0.5553659455,
1962
+ -0.5336586252,
1963
+ 0.6377908264,
1964
+ 0,
1965
+ 0.5137558015,
1966
+ 0.7976208196,
1967
+ -0.3160000073,
1968
+ 0,
1969
+ -0.3794024848,
1970
+ 0.9245608561,
1971
+ -0.03522751494,
1972
+ 0,
1973
+ 0.8229248658,
1974
+ 0.2745365933,
1975
+ -0.4974176556,
1976
+ 0,
1977
+ -0.5404114394,
1978
+ 0.6091141441,
1979
+ 0.5804613989,
1980
+ 0,
1981
+ 0.8036581901,
1982
+ -0.2703029469,
1983
+ 0.5301601931,
1984
+ 0,
1985
+ 0.6044318879,
1986
+ 0.6832968393,
1987
+ 0.4095943388,
1988
+ 0,
1989
+ 0.06389988817,
1990
+ 0.9658208605,
1991
+ -0.2512108074,
1992
+ 0,
1993
+ 0.1087113286,
1994
+ 0.7402471173,
1995
+ -0.6634877936,
1996
+ 0,
1997
+ -0.713427712,
1998
+ -0.6926784018,
1999
+ 0.1059128479,
2000
+ 0,
2001
+ 0.6458897819,
2002
+ -0.5724548511,
2003
+ -0.5050958653,
2004
+ 0,
2005
+ -0.6553931414,
2006
+ 0.7381471625,
2007
+ 0.159995615,
2008
+ 0,
2009
+ 0.3910961323,
2010
+ 0.9188871375,
2011
+ -0.05186755998,
2012
+ 0,
2013
+ -0.4879022471,
2014
+ -0.5904376907,
2015
+ 0.6429111375,
2016
+ 0,
2017
+ 0.6014790094,
2018
+ 0.7707441366,
2019
+ -0.2101820095,
2020
+ 0,
2021
+ -0.5677173047,
2022
+ 0.7511360995,
2023
+ 0.3368851762,
2024
+ 0,
2025
+ 0.7858573506,
2026
+ 0.226674665,
2027
+ 0.5753666838,
2028
+ 0,
2029
+ -0.4520345543,
2030
+ -0.604222686,
2031
+ -0.6561857263,
2032
+ 0,
2033
+ 0.002272116345,
2034
+ 0.4132844051,
2035
+ -0.9105991643,
2036
+ 0,
2037
+ -0.5815751419,
2038
+ -0.5162925989,
2039
+ 0.6286591339,
2040
+ 0,
2041
+ -0.03703704785,
2042
+ 0.8273785755,
2043
+ 0.5604221175,
2044
+ 0,
2045
+ -0.5119692504,
2046
+ 0.7953543429,
2047
+ -0.3244980058,
2048
+ 0,
2049
+ -0.2682417366,
2050
+ -0.9572290247,
2051
+ -0.1084387619,
2052
+ 0,
2053
+ -0.2322482736,
2054
+ -0.9679131102,
2055
+ -0.09594243324,
2056
+ 0,
2057
+ 0.3554328906,
2058
+ -0.8881505545,
2059
+ 0.2913006227,
2060
+ 0,
2061
+ 0.7346520519,
2062
+ -0.4371373164,
2063
+ 0.5188422971,
2064
+ 0,
2065
+ 0.9985120116,
2066
+ 0.04659011161,
2067
+ -0.02833944577,
2068
+ 0,
2069
+ -0.3727687496,
2070
+ -0.9082481361,
2071
+ 0.1900757285,
2072
+ 0,
2073
+ 0.91737377,
2074
+ -0.3483642108,
2075
+ 0.1925298489,
2076
+ 0,
2077
+ 0.2714911074,
2078
+ 0.4147529736,
2079
+ -0.8684886582,
2080
+ 0,
2081
+ 0.5131763485,
2082
+ -0.7116334161,
2083
+ 0.4798207128,
2084
+ 0,
2085
+ -0.8737353606,
2086
+ 0.18886992,
2087
+ -0.4482350644,
2088
+ 0,
2089
+ 0.8460043821,
2090
+ -0.3725217914,
2091
+ 0.3814499973,
2092
+ 0,
2093
+ 0.8978727456,
2094
+ -0.1780209141,
2095
+ -0.4026575304,
2096
+ 0,
2097
+ 0.2178065647,
2098
+ -0.9698322841,
2099
+ -0.1094789531,
2100
+ 0,
2101
+ -0.1518031304,
2102
+ -0.7788918132,
2103
+ -0.6085091231,
2104
+ 0,
2105
+ -0.2600384876,
2106
+ -0.4755398075,
2107
+ -0.8403819825,
2108
+ 0,
2109
+ 0.572313509,
2110
+ -0.7474340931,
2111
+ -0.3373418503,
2112
+ 0,
2113
+ -0.7174141009,
2114
+ 0.1699017182,
2115
+ -0.6756111411,
2116
+ 0,
2117
+ -0.684180784,
2118
+ 0.02145707593,
2119
+ -0.7289967412,
2120
+ 0,
2121
+ -0.2007447902,
2122
+ 0.06555605789,
2123
+ -0.9774476623,
2124
+ 0,
2125
+ -0.1148803697,
2126
+ -0.8044887315,
2127
+ 0.5827524187,
2128
+ 0,
2129
+ -0.7870349638,
2130
+ 0.03447489231,
2131
+ 0.6159443543,
2132
+ 0,
2133
+ -0.2015596421,
2134
+ 0.6859872284,
2135
+ 0.6991389226,
2136
+ 0,
2137
+ -0.08581082512,
2138
+ -0.10920836,
2139
+ -0.9903080513,
2140
+ 0,
2141
+ 0.5532693395,
2142
+ 0.7325250401,
2143
+ -0.396610771,
2144
+ 0,
2145
+ -0.1842489331,
2146
+ -0.9777375055,
2147
+ -0.1004076743,
2148
+ 0,
2149
+ 0.0775473789,
2150
+ -0.9111505856,
2151
+ 0.4047110257,
2152
+ 0,
2153
+ 0.1399838409,
2154
+ 0.7601631212,
2155
+ -0.6344734459,
2156
+ 0,
2157
+ 0.4484419361,
2158
+ -0.845289248,
2159
+ 0.2904925424,
2160
+ 0
2161
+ ]), P = 501125321, W = 1136930381, B = 1720413743;
2162
+ function p0(t) {
2163
+ const a = (3 - 1.7320508075688772) / 6;
2164
+ return (i, e) => {
2165
+ let r = Math.floor(i), c = Math.floor(e);
2166
+ const l = i - r, D = e - c, y = (l + D) * a, u = l - y, f = D - y;
2167
+ r = Math.imul(r, P), c = Math.imul(c, W);
2168
+ let o, s, h;
2169
+ const p = 0.5 - u * u - f * f;
2170
+ p <= 0 ? o = 0 : o = p * p * (p * p) * X(t, r, c, u, f);
2171
+ const m = 2 * (1 - 2 * a) * (1 / a - 2) * y + (-2 * (1 - 2 * a) * (1 - 2 * a) + p);
2172
+ if (m <= 0)
2173
+ h = 0;
2174
+ else {
2175
+ const x = u + (2 * a - 1), d = f + (2 * a - 1);
2176
+ h = m * m * (m * m) * X(t, r + P, c + W, x, d);
2177
+ }
2178
+ if (f > u) {
2179
+ const x = u + a, d = f + (a - 1), T = 0.5 - x * x - d * d;
2180
+ T <= 0 ? s = 0 : s = T * T * (T * T) * X(t, r, c + W, x, d);
2181
+ } else {
2182
+ const x = u + (a - 1), d = f + a, T = 0.5 - x * x - d * d;
2183
+ T <= 0 ? s = 0 : s = T * T * (T * T) * X(t, r + P, c, x, d);
2184
+ }
2185
+ return (o + s + h) * 99.83685446303647;
2186
+ };
2187
+ }
2188
+ function g0(t) {
2189
+ return (n, a, i) => {
2190
+ let e = t, r = Math.round(n), c = Math.round(a), l = Math.round(i), D = n - r, y = a - c, u = i - l, f = Math.trunc(-1 - D | 1), o = Math.trunc(-1 - y | 1), s = Math.trunc(-1 - u | 1), h = f * -D, p = o * -y, m = s * -u;
2191
+ r = Math.imul(r, P), c = Math.imul(c, W), l = Math.imul(l, B);
2192
+ let x = 0, d = 0.6 - D * D - (y * y + u * u);
2193
+ for (let T = 0; ; T++) {
2194
+ if (d > 0 && (x += d * d * (d * d) * G(e, r, c, l, D, y, u)), h >= p && h >= m) {
2195
+ let M = d + h + h;
2196
+ M > 1 && (M -= 1, x += M * M * (M * M) * G(e, r - f * P, c, l, D + f, y, u));
2197
+ } else if (p > h && p >= m) {
2198
+ let M = d + p + p;
2199
+ M > 1 && (M -= 1, x += M * M * (M * M) * G(e, r, c - o * W, l, D, y + o, u));
2200
+ } else {
2201
+ let M = d + m + m;
2202
+ M > 1 && (M -= 1, x += M * M * (M * M) * G(e, r, c, l - s * B, D, y, u + s));
2203
+ }
2204
+ if (T === 1)
2205
+ break;
2206
+ h = 0.5 - h, p = 0.5 - p, m = 0.5 - m, D = f * h, y = o * p, u = s * m, d += 0.75 - h - (p + m), r += f >> 1 & P, c += o >> 1 & W, l += s >> 1 & B, f = -f, o = -o, s = -s, e = ~e;
2207
+ }
2208
+ return x * 32.69428253173828;
2209
+ };
2210
+ }
2211
+ function F0(t) {
2212
+ const a = (3 - 1.7320508075688772) / 6;
2213
+ return (i, e) => {
2214
+ let r = t, c = Math.floor(i), l = Math.floor(e);
2215
+ const D = i - c, y = e - l;
2216
+ c = Math.imul(c, P), l = Math.imul(l, W);
2217
+ const u = c + P, f = l + W, o = (D + y) * a, s = D - o, h = y - o, p = 2 / 3 - s * s - h * h;
2218
+ let m = p * p * (p * p) * X(r, c, l, s, h);
2219
+ const x = 2 * (1 - 2 * a) * (1 / a - 2) * o + (-2 * (1 - 2 * a) * (1 - 2 * a) + p), d = s - (1 - 2 * a), T = h - (1 - 2 * a);
2220
+ m += x * x * (x * x) * X(r, u, f, d, T);
2221
+ const M = D - y;
2222
+ if (o > a) {
2223
+ if (D + M > 1) {
2224
+ const g = s + (3 * a - 2), S = h + (3 * a - 1), b = 2 / 3 - g * g - S * S;
2225
+ b > 0 && (m += b * b * (b * b) * X(r, c + (P << 1), l + W, g, S));
2226
+ } else {
2227
+ const g = s + a, S = h + (a - 1), b = 2 / 3 - g * g - S * S;
2228
+ b > 0 && (m += b * b * (b * b) * X(r, c, l + W, g, S));
2229
+ }
2230
+ if (y - M > 1) {
2231
+ const g = s + (3 * a - 1), S = h + (3 * a - 2), b = 2 / 3 - g * g - S * S;
2232
+ b > 0 && (m += b * b * (b * b) * X(r, c + P, l + (W << 1), g, S));
2233
+ } else {
2234
+ const g = s + (a - 1), S = h + a, b = 2 / 3 - g * g - S * S;
2235
+ b > 0 && (m += b * b * (b * b) * X(r, c + P, l, g, S));
2236
+ }
2237
+ } else {
2238
+ if (D + M < 0) {
2239
+ const g = s + (1 - a), S = h - a, b = 2 / 3 - g * g - S * S;
2240
+ b > 0 && (m += b * b * (b * b) * X(r, c - P, l, g, S));
2241
+ } else {
2242
+ const g = s + (a - 1), S = h + a, b = 2 / 3 - g * g - S * S;
2243
+ b > 0 && (m += b * b * (b * b) * X(r, c + P, l, g, S));
2244
+ }
2245
+ if (y < M) {
2246
+ const g = s - a, S = h - (a - 1), b = 2 / 3 - g * g - S * S;
2247
+ b > 0 && (m += b * b * (b * b) * X(r, c, l - W, g, S));
2248
+ } else {
2249
+ const g = s + a, S = h + (a - 1), b = 2 / 3 - g * g - S * S;
2250
+ b > 0 && (m += b * b * (b * b) * X(r, c, l + W, g, S));
2251
+ }
2252
+ }
2253
+ return m * 18.24196194486065;
2254
+ };
2255
+ }
2256
+ function N0(t) {
2257
+ return (n, a, i) => {
2258
+ let e = Math.floor(n), r = Math.floor(a), c = Math.floor(i), l = n - e, D = a - r, y = i - c;
2259
+ e = Math.imul(e, P), r = Math.imul(r, W), c = Math.imul(c, B);
2260
+ let u = t + 1293373, f = Math.trunc(-0.5 - l), o = Math.trunc(-0.5 - D), s = Math.trunc(-0.5 - y), h = l + f, p = D + o, m = y + s, x = 0.75 - h * h - p * p - m * m, d = x * x * (x * x) * G(
2261
+ t,
2262
+ e + (f & P),
2263
+ r + (o & W),
2264
+ c + (s & B),
2265
+ h,
2266
+ p,
2267
+ m
2268
+ ), T = l - 0.5, M = D - 0.5, g = y - 0.5, S = 0.75 - T * T - M * M - g * g;
2269
+ d += S * S * (S * S) * G(u, e + P, r + W, c + B, T, M, g);
2270
+ let b = ((f | 1) << 1) * T, R = ((o | 1) << 1) * M, v = ((s | 1) << 1) * g, q = (-2 - (f << 2)) * T - 1, k = (-2 - (o << 2)) * M - 1, I = (-2 - (s << 2)) * g - 1, H = !1, L = b + x;
2271
+ if (L > 0) {
2272
+ let O = h - (f | 1);
2273
+ d += L * L * (L * L) * G(
2274
+ t,
2275
+ e + (~f & P),
2276
+ r + (o & W),
2277
+ c + (s & B),
2278
+ O,
2279
+ p,
2280
+ m
2281
+ );
2282
+ } else {
2283
+ let O = R + v + x;
2284
+ if (O > 0) {
2285
+ let z = h, E = p - (o | 1), t0 = m - (s | 1);
2286
+ d += O * O * (O * O) * G(
2287
+ t,
2288
+ e + (f & P),
2289
+ r + (~o & W),
2290
+ c + (~s & B),
2291
+ z,
2292
+ E,
2293
+ t0
2294
+ );
2295
+ }
2296
+ let C = q + S;
2297
+ if (C > 0) {
2298
+ let z = (f | 1) + T;
2299
+ d += C * C * (C * C) * G(
2300
+ u,
2301
+ e + (f & P * 2),
2302
+ r + W,
2303
+ c + B,
2304
+ z,
2305
+ M,
2306
+ g
2307
+ ), H = !0;
2308
+ }
2309
+ }
2310
+ let K = !1, J = R + x;
2311
+ if (J > 0) {
2312
+ let O = h, C = p - (o | 1);
2313
+ d += J * J * (J * J) * G(
2314
+ t,
2315
+ e + (f & P),
2316
+ r + (~o & W),
2317
+ c + (s & B),
2318
+ O,
2319
+ C,
2320
+ m
2321
+ );
2322
+ } else {
2323
+ let O = b + v + x;
2324
+ if (O > 0) {
2325
+ let z = h - (f | 1), E = p, t0 = m - (s | 1);
2326
+ d += O * O * (O * O) * G(
2327
+ t,
2328
+ e + (~f & P),
2329
+ r + (o & W),
2330
+ c + (~s & B),
2331
+ z,
2332
+ E,
2333
+ t0
2334
+ );
2335
+ }
2336
+ let C = k + S;
2337
+ if (C > 0) {
2338
+ let z = T, E = (o | 1) + M;
2339
+ d += C * C * (C * C) * G(
2340
+ u,
2341
+ e + P,
2342
+ r + (o & W << 1),
2343
+ c + B,
2344
+ z,
2345
+ E,
2346
+ g
2347
+ ), K = !0;
2348
+ }
2349
+ }
2350
+ let a0 = !1, Q = v + x;
2351
+ if (Q > 0) {
2352
+ let O = h, C = p, z = m - (s | 1);
2353
+ d += Q * Q * (Q * Q) * G(
2354
+ t,
2355
+ e + (f & P),
2356
+ r + (o & W),
2357
+ c + (~s & B),
2358
+ O,
2359
+ C,
2360
+ z
2361
+ );
2362
+ } else {
2363
+ let O = b + R + x;
2364
+ if (O > 0) {
2365
+ let z = h - (f | 1), E = p - (o | 1);
2366
+ d += O * O * (O * O) * G(
2367
+ t,
2368
+ e + (~f & P),
2369
+ r + (~o & W),
2370
+ c + (s & B),
2371
+ z,
2372
+ E,
2373
+ m
2374
+ );
2375
+ }
2376
+ let C = I + S;
2377
+ if (C > 0) {
2378
+ let z = T, E = M, t0 = (s | 1) + g;
2379
+ d += C * C * (C * C) * G(
2380
+ u,
2381
+ e + P,
2382
+ r + W,
2383
+ c + (s & B << 1),
2384
+ z,
2385
+ E,
2386
+ t0
2387
+ ), a0 = !0;
2388
+ }
2389
+ }
2390
+ if (!H) {
2391
+ let O = k + I + S;
2392
+ if (O > 0) {
2393
+ let C = T, z = (o | 1) + M, E = (s | 1) + g;
2394
+ d += O * O * (O * O) * G(
2395
+ u,
2396
+ e + P,
2397
+ r + (o & W << 1),
2398
+ c + (s & B << 1),
2399
+ C,
2400
+ z,
2401
+ E
2402
+ );
2403
+ }
2404
+ }
2405
+ if (!K) {
2406
+ let O = q + I + S;
2407
+ if (O > 0) {
2408
+ let C = (f | 1) + T, z = M, E = (s | 1) + g;
2409
+ d += O * O * (O * O) * G(
2410
+ u,
2411
+ e + (f & P * 2),
2412
+ r + W,
2413
+ c + (s & B << 1),
2414
+ C,
2415
+ z,
2416
+ E
2417
+ );
2418
+ }
2419
+ }
2420
+ if (!a0) {
2421
+ let O = q + k + S;
2422
+ if (O > 0) {
2423
+ let C = (f | 1) + T, z = (o | 1) + M;
2424
+ d += O * O * (O * O) * G(
2425
+ u,
2426
+ e + (f & P << 1),
2427
+ r + (o & W << 1),
2428
+ c + B,
2429
+ C,
2430
+ z,
2431
+ g
2432
+ );
2433
+ }
2434
+ }
2435
+ return d * 9.046026385208288;
2436
+ };
2437
+ }
2438
+ function O0(t) {
2439
+ return (n, a) => {
2440
+ let i = Math.floor(n), e = Math.floor(a);
2441
+ const r = n - i, c = a - e, l = r - 1, D = c - 1, y = m0(r), u = m0(c);
2442
+ i = Math.imul(i, P), e = Math.imul(e, W);
2443
+ const f = i + P, o = e + W, s = N(
2444
+ X(t, i, e, r, c),
2445
+ X(t, f, e, l, c),
2446
+ y
2447
+ ), h = N(
2448
+ X(t, i, o, r, D),
2449
+ X(t, f, o, l, D),
2450
+ y
2451
+ );
2452
+ return N(s, h, u) * 1.4247691104677813;
2453
+ };
2454
+ }
2455
+ function R0(t) {
2456
+ return (n, a, i) => {
2457
+ let e = Math.floor(n), r = Math.floor(a), c = Math.floor(i);
2458
+ const l = n - e, D = a - r, y = i - c, u = l - 1, f = D - 1, o = y - 1, s = m0(l), h = m0(D), p = m0(y);
2459
+ e = Math.imul(e, P), r = Math.imul(r, W), c = Math.imul(c, B);
2460
+ const m = e + P, x = r + W, d = c + B, T = N(
2461
+ G(t, e, r, c, l, D, y),
2462
+ G(t, m, r, c, u, D, y),
2463
+ s
2464
+ ), M = N(
2465
+ G(t, e, x, c, l, f, y),
2466
+ G(t, m, x, c, u, f, y),
2467
+ s
2468
+ ), g = N(
2469
+ G(t, e, r, d, l, D, o),
2470
+ G(t, m, r, d, u, D, o),
2471
+ s
2472
+ ), S = N(
2473
+ G(t, e, x, d, l, f, o),
2474
+ G(t, m, x, d, u, f, o),
2475
+ s
2476
+ ), b = N(T, M, h), R = N(g, S, h);
2477
+ return N(b, R, p) * 0.9649214148521423;
2478
+ };
2479
+ }
2480
+ function y0(t, n, a) {
2481
+ let i = Z(t, n, a);
2482
+ return i = Math.imul(i, i), i ^= i << 19, i * (1 / 2147483648);
2483
+ }
2484
+ function l0(t, n, a, i) {
2485
+ let e = $(t, n, a, i);
2486
+ return e = Math.imul(e, e), e ^= e << 19, e * (1 / 2147483648);
2487
+ }
2488
+ function k0(t) {
2489
+ return (n, a) => {
2490
+ let i = Math.floor(n), e = Math.floor(a);
2491
+ const r = o0(n - i), c = o0(a - e);
2492
+ i = Math.imul(i, P), e = Math.imul(e, W);
2493
+ const l = i + P, D = e + W, y = N(
2494
+ y0(t, i, e),
2495
+ y0(t, l, e),
2496
+ r
2497
+ ), u = N(
2498
+ y0(t, i, D),
2499
+ y0(t, l, D),
2500
+ r
2501
+ );
2502
+ return N(y, u, c);
2503
+ };
2504
+ }
2505
+ function w0(t) {
2506
+ return (n, a, i) => {
2507
+ let e = Math.floor(n), r = Math.floor(a), c = Math.floor(i);
2508
+ const l = o0(n - e), D = o0(a - r), y = o0(i - c);
2509
+ e = Math.imul(e, P), r = Math.imul(r, W), c = Math.imul(c, B);
2510
+ const u = e + P, f = r + W, o = c + B, s = N(
2511
+ l0(t, e, r, c),
2512
+ l0(t, u, r, c),
2513
+ l
2514
+ ), h = N(
2515
+ l0(t, e, f, c),
2516
+ l0(t, u, f, c),
2517
+ l
2518
+ ), p = N(
2519
+ l0(t, e, r, o),
2520
+ l0(t, u, r, o),
2521
+ l
2522
+ ), m = N(
2523
+ l0(t, e, f, o),
2524
+ l0(t, u, f, o),
2525
+ l
2526
+ ), x = N(s, h, D), d = N(p, m, D);
2527
+ return N(x, d, y);
2528
+ };
2529
+ }
2530
+ function U(t, n, a) {
2531
+ let i = Z(t, n, a);
2532
+ return i = Math.imul(i, i), i ^= i << 19, i * (1 / 2147483648);
2533
+ }
2534
+ function F(t, n, a, i) {
2535
+ let e = $(t, n, a, i);
2536
+ return e = Math.imul(e, e), e ^= e << 19, e * (1 / 2147483648);
2537
+ }
2538
+ function v0(t) {
2539
+ return (n, a) => {
2540
+ let i = Math.floor(n), e = Math.floor(a);
2541
+ const r = n - i, c = a - e;
2542
+ i = Math.imul(i, P), e = Math.imul(e, W);
2543
+ const l = i - P, D = e - W, y = i + P, u = e + W, f = i + (P << 1), o = e + (W << 1);
2544
+ return V(
2545
+ V(
2546
+ U(t, l, D),
2547
+ U(t, i, D),
2548
+ U(t, y, D),
2549
+ U(t, f, D),
2550
+ r
2551
+ ),
2552
+ V(
2553
+ U(t, l, e),
2554
+ U(t, i, e),
2555
+ U(t, y, e),
2556
+ U(t, f, e),
2557
+ r
2558
+ ),
2559
+ V(
2560
+ U(t, l, u),
2561
+ U(t, i, u),
2562
+ U(t, y, u),
2563
+ U(t, f, u),
2564
+ r
2565
+ ),
2566
+ V(
2567
+ U(t, l, o),
2568
+ U(t, i, o),
2569
+ U(t, y, o),
2570
+ U(t, f, o),
2571
+ r
2572
+ ),
2573
+ c
2574
+ ) * (1 / (1.5 * 1.5));
2575
+ };
2576
+ }
2577
+ function C0(t) {
2578
+ return (n, a, i) => {
2579
+ let e = Math.floor(n), r = Math.floor(a), c = Math.floor(i);
2580
+ const l = n - e, D = a - r, y = i - c;
2581
+ e = Math.imul(e, P), r = Math.imul(r, W), c = Math.imul(c, B);
2582
+ const u = e - P, f = r - W, o = c - B, s = e + P, h = r + W, p = c + B, m = e + (P << 1), x = r + (W << 1), d = c + (B << 1);
2583
+ return V(
2584
+ V(
2585
+ V(
2586
+ F(t, u, f, o),
2587
+ F(t, e, f, o),
2588
+ F(t, s, f, o),
2589
+ F(t, m, f, o),
2590
+ l
2591
+ ),
2592
+ V(
2593
+ F(t, u, r, o),
2594
+ F(t, e, r, o),
2595
+ F(t, s, r, o),
2596
+ F(t, m, r, o),
2597
+ l
2598
+ ),
2599
+ V(
2600
+ F(t, u, h, o),
2601
+ F(t, e, h, o),
2602
+ F(t, s, h, o),
2603
+ F(t, m, h, o),
2604
+ l
2605
+ ),
2606
+ V(
2607
+ F(t, u, x, o),
2608
+ F(t, e, x, o),
2609
+ F(t, s, x, o),
2610
+ F(t, m, x, o),
2611
+ l
2612
+ ),
2613
+ D
2614
+ ),
2615
+ V(
2616
+ V(
2617
+ F(t, u, f, c),
2618
+ F(t, e, f, c),
2619
+ F(t, s, f, c),
2620
+ F(t, m, f, c),
2621
+ l
2622
+ ),
2623
+ V(
2624
+ F(t, u, r, c),
2625
+ F(t, e, r, c),
2626
+ F(t, s, r, c),
2627
+ F(t, m, r, c),
2628
+ l
2629
+ ),
2630
+ V(
2631
+ F(t, u, h, c),
2632
+ F(t, e, h, c),
2633
+ F(t, s, h, c),
2634
+ F(t, m, h, c),
2635
+ l
2636
+ ),
2637
+ V(
2638
+ F(t, u, x, c),
2639
+ F(t, e, x, c),
2640
+ F(t, s, x, c),
2641
+ F(t, m, x, c),
2642
+ l
2643
+ ),
2644
+ D
2645
+ ),
2646
+ V(
2647
+ V(
2648
+ F(t, u, f, p),
2649
+ F(t, e, f, p),
2650
+ F(t, s, f, p),
2651
+ F(t, m, f, p),
2652
+ l
2653
+ ),
2654
+ V(
2655
+ F(t, u, r, p),
2656
+ F(t, e, r, p),
2657
+ F(t, s, r, p),
2658
+ F(t, m, r, p),
2659
+ l
2660
+ ),
2661
+ V(
2662
+ F(t, u, h, p),
2663
+ F(t, e, h, p),
2664
+ F(t, s, h, p),
2665
+ F(t, m, h, p),
2666
+ l
2667
+ ),
2668
+ V(
2669
+ F(t, u, x, p),
2670
+ F(t, e, x, p),
2671
+ F(t, s, x, p),
2672
+ F(t, m, x, p),
2673
+ l
2674
+ ),
2675
+ D
2676
+ ),
2677
+ V(
2678
+ V(
2679
+ F(t, u, f, d),
2680
+ F(t, e, f, d),
2681
+ F(t, s, f, d),
2682
+ F(t, m, f, d),
2683
+ l
2684
+ ),
2685
+ V(
2686
+ F(t, u, r, d),
2687
+ F(t, e, r, d),
2688
+ F(t, s, r, d),
2689
+ F(t, m, r, d),
2690
+ l
2691
+ ),
2692
+ V(
2693
+ F(t, u, h, d),
2694
+ F(t, e, h, d),
2695
+ F(t, s, h, d),
2696
+ F(t, m, h, d),
2697
+ l
2698
+ ),
2699
+ V(
2700
+ F(t, u, x, d),
2701
+ F(t, e, x, d),
2702
+ F(t, s, x, d),
2703
+ F(t, m, x, d),
2704
+ l
2705
+ ),
2706
+ D
2707
+ ),
2708
+ y
2709
+ ) * (1 / (1.5 * 1.5 * 1.5));
2710
+ };
2711
+ }
2712
+ const A = {
2713
+ OpenSimplex2: "OpenSimplex2",
2714
+ OpenSimplex2S: "OpenSimplex2S",
2715
+ Perlin: "Perlin",
2716
+ Value: "Value",
2717
+ ValueCubic: "ValueCubic",
2718
+ Cellular: "Cellular"
2719
+ }, J0 = {
2720
+ None: "None",
2721
+ ImproveXYPlanes: "ImproveXYPlanes",
2722
+ ImproveXZPlanes: "ImproveXZPlanes"
2723
+ }, s0 = {
2724
+ None: "None",
2725
+ FBm: "FBm",
2726
+ Ridged: "Ridged",
2727
+ PingPong: "PingPong"
2728
+ }, n0 = {
2729
+ Euclidean: "Euclidean",
2730
+ EuclideanSq: "EuclideanSq",
2731
+ Manhattan: "Manhattan",
2732
+ Hybrid: "Hybrid"
2733
+ }, e0 = {
2734
+ CellValue: "CellValue",
2735
+ Distance: "Distance",
2736
+ Distance2: "Distance2",
2737
+ Distance2Add: "Distance2Add",
2738
+ Distance2Sub: "Distance2Sub",
2739
+ Distance2Mul: "Distance2Mul",
2740
+ Distance2Div: "Distance2Div"
2741
+ }, j = {
2742
+ None: "None",
2743
+ OpenSimplex2: "OpenSimplex2",
2744
+ OpenSimplex2Reduced: "OpenSimplex2Reduced",
2745
+ BasicGrid: "BasicGrid"
2746
+ }, h0 = {
2747
+ None: "None",
2748
+ Progressive: "Progressive",
2749
+ Independent: "Independent"
2750
+ }, Y = {
2751
+ None: "None",
2752
+ ImproveXYPlanes: "ImproveXYPlanes",
2753
+ ImproveXZPlanes: "ImproveXZPlanes",
2754
+ DefaultOpenSimplex2: "DefaultOpenSimplex2"
2755
+ }, U0 = (t, n) => t * t + n * n, Z0 = (t, n, a) => t * t + n * n + a * a, $0 = (t, n) => t * t + n * n, Y0 = (t, n, a) => t * t + n * n + a * a, K0 = (t, n) => Math.abs(t) + Math.abs(n), t1 = (t, n, a) => Math.abs(t) + Math.abs(n) + Math.abs(a), n1 = (t, n) => Math.abs(t) + Math.abs(n) + (t * t + n * n), e1 = (t, n, a) => Math.abs(t) + Math.abs(n) + Math.abs(a) + (t * t + n * n + a * a);
2756
+ function B0(t) {
2757
+ switch (t) {
2758
+ case n0.Euclidean:
2759
+ return $0;
2760
+ case n0.EuclideanSq:
2761
+ return U0;
2762
+ case n0.Manhattan:
2763
+ return K0;
2764
+ case n0.Hybrid:
2765
+ return n1;
2766
+ }
2767
+ }
2768
+ function A0(t) {
2769
+ switch (t) {
2770
+ case n0.Euclidean:
2771
+ return Y0;
2772
+ case n0.EuclideanSq:
2773
+ return Z0;
2774
+ case n0.Manhattan:
2775
+ return t1;
2776
+ case n0.Hybrid:
2777
+ return e1;
2778
+ }
2779
+ }
2780
+ const a1 = (t, n, a) => a * (1 / 2147483648), r1 = (t, n, a) => t - 1, c1 = (t, n, a) => n - 1, o1 = (t, n, a) => (n + t) * 0.5 - 1, i1 = (t, n, a) => n - t - 1, s1 = (t, n, a) => n * t * 0.5 - 1, l1 = (t, n, a) => t / n - 1;
2781
+ function d0(t) {
2782
+ switch (t) {
2783
+ case e0.CellValue:
2784
+ return a1;
2785
+ case e0.Distance:
2786
+ return r1;
2787
+ case e0.Distance2:
2788
+ return c1;
2789
+ case e0.Distance2Add:
2790
+ return o1;
2791
+ case e0.Distance2Sub:
2792
+ return i1;
2793
+ case e0.Distance2Mul:
2794
+ return s1;
2795
+ case e0.Distance2Div:
2796
+ return l1;
2797
+ }
2798
+ }
2799
+ const u1 = 0.43701595, f1 = 0.39614353;
2800
+ function q0(t, n, a, i = 1, e = !1) {
2801
+ const r = u1 * i;
2802
+ return (c, l) => {
2803
+ const D = Math.round(c), y = Math.round(l);
2804
+ let u = Number.MAX_VALUE, f = Number.MAX_VALUE, o = 0, s = (D - 1) * P;
2805
+ const h = (y - 1) * W;
2806
+ for (let p = D - 1; p <= D + 1; p++) {
2807
+ let m = h;
2808
+ for (let x = y - 1; x <= y + 1; x++) {
2809
+ const d = Z(t, s, m), T = d & 510, M = p - c + _[T] * r, g = x - l + _[T | 1] * r, S = n(M, g);
2810
+ f = Math.max(Math.min(f, S), u), S < u && (u = S, o = d), m += W;
2811
+ }
2812
+ s += P;
2813
+ }
2814
+ return e && (u = Math.sqrt(u), f = Math.sqrt(f)), a(u, f, o);
2815
+ };
2816
+ }
2817
+ function z0(t, n, a, i = 1, e = !1) {
2818
+ const r = f1 * i;
2819
+ return (c, l, D) => {
2820
+ const y = Math.round(c), u = Math.round(l), f = Math.round(D);
2821
+ let o = Number.MAX_VALUE, s = Number.MAX_VALUE, h = 0, p = (y - 1) * P;
2822
+ const m = (u - 1) * W, x = (f - 1) * B;
2823
+ for (let d = y - 1; d <= y + 1; d++) {
2824
+ let T = m;
2825
+ for (let M = u - 1; M <= u + 1; M++) {
2826
+ let g = x;
2827
+ for (let S = f - 1; S <= f + 1; S++) {
2828
+ const b = $(t, p, T, g), R = b & 1020, v = d - c + w[R] * r, q = M - l + w[R | 1] * r, k = S - D + w[R | 2] * r, I = n(v, q, k);
2829
+ s = Math.max(Math.min(s, I), o), I < o && (o = I, h = b), g += B;
2830
+ }
2831
+ T += W;
2832
+ }
2833
+ p += P;
2834
+ }
2835
+ return e && (o = Math.sqrt(o), s = Math.sqrt(s)), a(o, s, h);
2836
+ };
2837
+ }
2838
+ function h1(t, n, a) {
2839
+ return (i) => {
2840
+ const e = i.x * a, r = i.y * a;
2841
+ let c = Math.floor(e), l = Math.floor(r);
2842
+ const D = o0(e - c), y = o0(r - l);
2843
+ c = Math.imul(c, P), l = Math.imul(l, W);
2844
+ const u = c + P, f = l + W;
2845
+ let o = Z(t, c, l) & 510, s = Z(t, u, l) & 510;
2846
+ const h = N(_[o], _[s], D), p = N(_[o | 1], _[s | 1], D);
2847
+ o = Z(t, c, f) & 510, s = Z(t, u, f) & 510;
2848
+ const m = N(_[o], _[s], D), x = N(_[o | 1], _[s | 1], D);
2849
+ i.x += N(h, m, y) * n, i.y += N(p, x, y) * n;
2850
+ };
2851
+ }
2852
+ function p1(t, n, a) {
2853
+ return (i, e, r, c) => {
2854
+ let l = i;
2855
+ const D = e * a, y = r * a, u = c * a;
2856
+ let f = Math.floor(D), o = Math.floor(y), s = Math.floor(u);
2857
+ const h = o0(D - f), p = o0(y - o), m = o0(u - s);
2858
+ f = Math.imul(f, P), o = Math.imul(o, W), s = Math.imul(s, B);
2859
+ const x = f + P, d = o + W, T = s + B;
2860
+ let M = $(t, f, o, s) & 1020, g = $(t, x, o, s) & 1020, S = N(w[M], w[g], h), b = N(w[M | 1], w[g | 1], h), R = N(w[M | 2], w[g | 2], h);
2861
+ M = $(t, f, d, s) & 1020, g = $(t, x, d, s) & 1020;
2862
+ let v = N(w[M], w[g], h), q = N(w[M | 1], w[g | 1], h), k = N(w[M | 2], w[g | 2], h);
2863
+ const I = N(S, v, p), H = N(b, q, p), L = N(R, k, p);
2864
+ M = $(t, f, o, T) & 1020, g = $(t, x, o, T) & 1020, S = N(w[M], w[g], h), b = N(w[M | 1], w[g | 1], h), R = N(w[M | 2], w[g | 2], h), M = $(t, f, d, T) & 1020, g = $(t, x, d, T) & 1020, v = N(w[M], w[g], h), q = N(w[M | 1], w[g | 1], h), k = N(w[M | 2], w[g | 2], h), l.x += N(I, N(S, v, p), m) * n, l.y += N(H, N(b, q, p), m) * n, l.z += N(L, N(R, k, p), m) * n;
2865
+ };
2866
+ }
2867
+ const I0 = 1.7320508075688772, m1 = 0.5 * (I0 - 1), r0 = (3 - I0) / 6;
2868
+ function E0(t, n, a, i = !1) {
2869
+ return (e) => {
2870
+ const r = (e.x + e.y) * m1;
2871
+ let c = (e.x + r) * a, l = (e.y + r) * a;
2872
+ const D = Math.floor(c), y = Math.floor(l), u = c - D, f = l - y, o = (u + f) * r0, s = u - o, h = f - o, p = Math.imul(D, P), m = Math.imul(y, W);
2873
+ let x = 0, d = 0;
2874
+ const T = 0.5 - s * s - h * h;
2875
+ if (T > 0) {
2876
+ const g = T * T * (T * T);
2877
+ let S, b;
2878
+ if (i) {
2879
+ const R = Z(t, p, m) & 510;
2880
+ S = _[R], b = _[R | 1];
2881
+ } else {
2882
+ const R = Z(t, p, m), v = R & 254, q = R >> 7 & 510, k = c0[v], I = c0[v | 1], H = s * k + h * I, L = _[q], K = _[q | 1];
2883
+ S = H * L, b = H * K;
2884
+ }
2885
+ x += g * S, d += g * b;
2886
+ }
2887
+ const M = 2 * (1 - 2 * r0) * (1 / r0 - 2) * o + (-2 * (1 - 2 * r0) * (1 - 2 * r0) + T);
2888
+ if (M > 0) {
2889
+ const g = s + (2 * r0 - 1), S = h + (2 * r0 - 1), b = M * M * (M * M);
2890
+ let R, v;
2891
+ if (i) {
2892
+ const q = Z(t, p + P, m + W) & 510;
2893
+ R = _[q], v = _[q | 1];
2894
+ } else {
2895
+ const q = Z(t, p + P, m + W), k = q & 254, I = q >> 7 & 510, H = c0[k], L = c0[k | 1], K = g * H + S * L, J = _[I], a0 = _[I | 1];
2896
+ R = K * J, v = K * a0;
2897
+ }
2898
+ x += b * R, d += b * v;
2899
+ }
2900
+ if (h > s) {
2901
+ const g = s + r0, S = h + (r0 - 1), b = 0.5 - g * g - S * S;
2902
+ if (b > 0) {
2903
+ const R = b * b * (b * b);
2904
+ let v, q;
2905
+ if (i) {
2906
+ const k = Z(t, p, m + W) & 510;
2907
+ v = _[k], q = _[k | 1];
2908
+ } else {
2909
+ const k = Z(t, p, m + W), I = k & 254, H = k >> 7 & 510, L = c0[I], K = c0[I | 1], J = g * L + S * K, a0 = _[H], Q = _[H | 1];
2910
+ v = J * a0, q = J * Q;
2911
+ }
2912
+ x += R * v, d += R * q;
2913
+ }
2914
+ } else {
2915
+ const g = s + (r0 - 1), S = h + r0, b = 0.5 - g * g - S * S;
2916
+ if (b > 0) {
2917
+ const R = b * b * (b * b);
2918
+ let v, q;
2919
+ if (i) {
2920
+ const k = Z(t, p + P, m) & 510;
2921
+ v = _[k], q = _[k | 1];
2922
+ } else {
2923
+ const k = Z(t, p + P, m), I = k & 254, H = k >> 7 & 510, L = c0[I], K = c0[I | 1], J = g * L + S * K, a0 = _[H], Q = _[H | 1];
2924
+ v = J * a0, q = J * Q;
2925
+ }
2926
+ x += R * v, d += R * q;
2927
+ }
2928
+ }
2929
+ e.x += x * n, e.y += d * n;
2930
+ };
2931
+ }
2932
+ function V0(t, n, a, i = !1) {
2933
+ return (e, r, c, l) => {
2934
+ let D = t, y = e;
2935
+ r *= a, c *= a, l *= a;
2936
+ let u = Math.round(r), f = Math.round(c), o = Math.round(l), s = r - u, h = c - f, p = l - o, m = Math.trunc(-s - 1 | 1), x = Math.trunc(-h - 1 | 1), d = Math.trunc(-p - 1 | 1), T = m * -s, M = x * -h, g = d * -p;
2937
+ u = Math.imul(u, P), f = Math.imul(f, W), o = Math.imul(o, B);
2938
+ let S = 0, b = 0, R = 0, v = 0.6 - s * s - (h * h + p * p);
2939
+ for (let q = 0; ; q++) {
2940
+ if (v > 0) {
2941
+ const Q = v * v * (v * v);
2942
+ let O, C, z;
2943
+ if (i) {
2944
+ const E = $(D, u, f, o) & 1020;
2945
+ O = w[E], C = w[E | 1], z = w[E | 2];
2946
+ } else {
2947
+ const E = $(D, u, f, o), t0 = E & 252, u0 = E >> 6 & 1020, M0 = i0[t0], D0 = i0[t0 | 1], x0 = i0[t0 | 2], f0 = s * M0 + h * D0 + p * x0, S0 = w[u0], b0 = w[u0 | 1], T0 = w[u0 | 2];
2948
+ O = f0 * S0, C = f0 * b0, z = f0 * T0;
2949
+ }
2950
+ S += Q * O, b += Q * C, R += Q * z;
2951
+ }
2952
+ let k = v, I = u, H = f, L = o, K = s, J = h, a0 = p;
2953
+ if (T >= M && T >= g ? (K += m, k = k + T + T, I -= m * P) : M > T && M >= g ? (J += x, k = k + M + M, H -= x * W) : (a0 += d, k = k + g + g, L -= d * B), k > 1) {
2954
+ k -= 1;
2955
+ const Q = k * k * (k * k);
2956
+ let O, C, z;
2957
+ if (i) {
2958
+ const E = $(D, I, H, L) & 1020;
2959
+ O = w[E], C = w[E | 1], z = w[E | 2];
2960
+ } else {
2961
+ const E = $(D, I, H, L), t0 = E & 252, u0 = E >> 6 & 1020, M0 = i0[t0], D0 = i0[t0 | 1], x0 = i0[t0 | 2], f0 = K * M0 + J * D0 + a0 * x0, S0 = w[u0], b0 = w[u0 | 1], T0 = w[u0 | 2];
2962
+ O = f0 * S0, C = f0 * b0, z = f0 * T0;
2963
+ }
2964
+ S += Q * O, b += Q * C, R += Q * z;
2965
+ }
2966
+ if (q === 1) break;
2967
+ T = 0.5 - T, M = 0.5 - M, g = 0.5 - g, s = m * T, h = x * M, p = d * g, v += 0.75 - T - (M + g), u += m >> 1 & P, f += x >> 1 & W, o += d >> 1 & B, m = -m, x = -x, d = -d, D += 1293373;
2968
+ }
2969
+ y.x += S * n, y.y += b * n, y.z += R * n;
2970
+ };
2971
+ }
2972
+ class H0 {
2973
+ config = {
2974
+ seed: 1337,
2975
+ frequency: 0.01,
2976
+ noiseType: A.OpenSimplex2,
2977
+ fractalType: s0.None,
2978
+ fractalOctaves: 3,
2979
+ fractalLacunarity: 2,
2980
+ fractalGain: 0.5,
2981
+ fractalWeightedStrength: 0,
2982
+ fractalPingPongStrength: 2,
2983
+ cellularDistanceFunction: n0.EuclideanSq,
2984
+ cellularReturnType: e0.Distance,
2985
+ cellularJitter: 1,
2986
+ rotationType3D: J0.None,
2987
+ transformType3D: Y.DefaultOpenSimplex2,
2988
+ domainWarpType: j.None,
2989
+ warpTransformType3D: Y.None,
2990
+ domainWarpAmplitude: 30,
2991
+ domainWarpFrequency: 5e-3,
2992
+ domainWarpFractalType: h0.None,
2993
+ domainWarpFractalOctaves: 3,
2994
+ domainWarpFractalLacunarity: 2,
2995
+ domainWarpFractalGain: 0.5
2996
+ };
2997
+ /**
2998
+ * Set the seed for noise generation
2999
+ */
3000
+ seed(n) {
3001
+ return this.config.seed = n, this;
3002
+ }
3003
+ /**
3004
+ * Set the frequency for noise generation
3005
+ */
3006
+ frequency(n) {
3007
+ return this.config.frequency = n, this;
3008
+ }
3009
+ /**
3010
+ * Set the noise algorithm type
3011
+ */
3012
+ noiseType(n) {
3013
+ return n && (this.config.noiseType = n), this;
3014
+ }
3015
+ /**
3016
+ * Set the rotation type for 3D noise
3017
+ */
3018
+ rotationType3D(n) {
3019
+ return n && (this.config.rotationType3D = n), this;
3020
+ }
3021
+ /**
3022
+ * Set the fractal type
3023
+ */
3024
+ fractalType(n) {
3025
+ return n && (this.config.fractalType = n), this;
3026
+ }
3027
+ /**
3028
+ * Set the number of octaves for fractal noise
3029
+ */
3030
+ fractalOctaves(n) {
3031
+ return this.config.fractalOctaves = n, this;
3032
+ }
3033
+ /**
3034
+ * Set the lacunarity for fractal noise
3035
+ */
3036
+ fractalLacunarity(n) {
3037
+ return this.config.fractalLacunarity = n, this;
3038
+ }
3039
+ /**
3040
+ * Set the gain for fractal noise
3041
+ */
3042
+ fractalGain(n) {
3043
+ return this.config.fractalGain = n, this;
3044
+ }
3045
+ /**
3046
+ * Set the weighted strength for fractal noise
3047
+ */
3048
+ fractalWeightedStrength(n) {
3049
+ return this.config.fractalWeightedStrength = n, this;
3050
+ }
3051
+ /**
3052
+ * Set the ping pong strength for ping pong fractal
3053
+ */
3054
+ fractalPingPongStrength(n) {
3055
+ return this.config.fractalPingPongStrength = n, this;
3056
+ }
3057
+ /**
3058
+ * Set the transform type for 3D noise
3059
+ */
3060
+ transformType3D(n) {
3061
+ return n && (this.config.transformType3D = n), this;
3062
+ }
3063
+ /**
3064
+ * Set the distance function for cellular noise
3065
+ */
3066
+ cellularDistanceFunction(n) {
3067
+ return n && (this.config.cellularDistanceFunction = n), this;
3068
+ }
3069
+ /**
3070
+ * Set the return type for cellular noise
3071
+ */
3072
+ cellularReturnType(n) {
3073
+ return n && (this.config.cellularReturnType = n), this;
3074
+ }
3075
+ /**
3076
+ * Set the jitter modifier for cellular noise (0-1)
3077
+ */
3078
+ cellularJitter(n) {
3079
+ return this.config.cellularJitter = n, this;
3080
+ }
3081
+ /**
3082
+ * Set the domain warp type
3083
+ */
3084
+ domainWarpType(n) {
3085
+ return n && (this.config.domainWarpType = n), this;
3086
+ }
3087
+ /**
3088
+ * Set the domain warp amplitude
3089
+ */
3090
+ domainWarpAmplitude(n) {
3091
+ return this.config.domainWarpAmplitude = n, this;
3092
+ }
3093
+ /**
3094
+ * Set the domain warp frequency
3095
+ */
3096
+ domainWarpFrequency(n) {
3097
+ return this.config.domainWarpFrequency = n, this;
3098
+ }
3099
+ /**
3100
+ * Set the domain warp fractal type (Progressive or Independent)
3101
+ */
3102
+ domainWarpFractalType(n) {
3103
+ return n && (this.config.domainWarpFractalType = n), this;
3104
+ }
3105
+ /**
3106
+ * Set the number of octaves for domain warp fractal
3107
+ */
3108
+ domainWarpFractalOctaves(n) {
3109
+ return this.config.domainWarpFractalOctaves = n, this;
3110
+ }
3111
+ /**
3112
+ * Set the lacunarity for domain warp fractal
3113
+ */
3114
+ domainWarpFractalLacunarity(n) {
3115
+ return this.config.domainWarpFractalLacunarity = n, this;
3116
+ }
3117
+ /**
3118
+ * Set the gain for domain warp fractal
3119
+ */
3120
+ domainWarpFractalGain(n) {
3121
+ return this.config.domainWarpFractalGain = n, this;
3122
+ }
3123
+ /**
3124
+ * Calculate fractal bounding value
3125
+ */
3126
+ calculateFractalBounding() {
3127
+ let n = this.config.fractalGain, a = 1;
3128
+ for (let i = 1; i < this.config.fractalOctaves; i++)
3129
+ a += n, n *= this.config.fractalGain;
3130
+ return 1 / a;
3131
+ }
3132
+ /**
3133
+ * Calculate fractal bounding for domain warp amplitude scaling
3134
+ */
3135
+ calculateWarpFractalBounding() {
3136
+ if (this.config.domainWarpFractalType === h0.None)
3137
+ return 1 / 1.75;
3138
+ const n = Math.abs(this.config.domainWarpFractalGain);
3139
+ let a = n, i = 1;
3140
+ for (let e = 1; e < this.config.domainWarpFractalOctaves; e++)
3141
+ i += a, a *= n;
3142
+ return 1 / i;
3143
+ }
3144
+ /**
3145
+ * Get type-specific amplitude multiplier for domain warp
3146
+ */
3147
+ getWarpAmplitudeMultiplier() {
3148
+ const { domainWarpType: n } = this.config;
3149
+ switch (n) {
3150
+ case j.OpenSimplex2:
3151
+ return 38.283687591552734;
3152
+ case j.OpenSimplex2Reduced:
3153
+ return 16;
3154
+ case j.BasicGrid:
3155
+ default:
3156
+ return 1;
3157
+ }
3158
+ }
3159
+ }
3160
+ class g1 extends H0 {
3161
+ /**
3162
+ * Build a 2D noise function
3163
+ * Returns an optimized function with zero runtime dispatch overhead
3164
+ */
3165
+ build2D() {
3166
+ const { seed: n, noiseType: a, fractalType: i } = this.config;
3167
+ let e;
3168
+ switch (a) {
3169
+ case A.OpenSimplex2:
3170
+ e = p0(n);
3171
+ break;
3172
+ case A.OpenSimplex2S:
3173
+ e = F0(n);
3174
+ break;
3175
+ case A.Perlin:
3176
+ e = O0(n);
3177
+ break;
3178
+ case A.Value:
3179
+ e = k0(n);
3180
+ break;
3181
+ case A.ValueCubic:
3182
+ e = v0(n);
3183
+ break;
3184
+ case A.Cellular: {
3185
+ const u = B0(
3186
+ this.config.cellularDistanceFunction
3187
+ ), f = d0(this.config.cellularReturnType), o = this.config.cellularDistanceFunction === n0.Euclidean && this.config.cellularReturnType !== e0.CellValue;
3188
+ e = q0(
3189
+ n,
3190
+ u,
3191
+ f,
3192
+ this.config.cellularJitter,
3193
+ o
3194
+ );
3195
+ break;
3196
+ }
3197
+ default:
3198
+ e = p0(n);
3199
+ }
3200
+ const r = this.buildDomainWarp2D();
3201
+ if (i === s0.None) {
3202
+ const u = this.config.frequency;
3203
+ if (a === A.OpenSimplex2 || a === A.OpenSimplex2S) {
3204
+ const o = 0.5 * (1.7320508075688772 - 1);
3205
+ return r ? (s, h) => {
3206
+ const p = r(s, h), m = p.x * u, x = p.y * u, d = (m + x) * o;
3207
+ return e(m + d, x + d);
3208
+ } : (s, h) => {
3209
+ s *= u, h *= u;
3210
+ const p = (s + h) * o;
3211
+ return e(s + p, h + p);
3212
+ };
3213
+ }
3214
+ return r ? (f, o) => {
3215
+ const s = r(f, o);
3216
+ return e(s.x * u, s.y * u);
3217
+ } : (f, o) => e(f * u, o * u);
3218
+ }
3219
+ const c = {
3220
+ seed: n,
3221
+ frequency: this.config.frequency,
3222
+ octaves: this.config.fractalOctaves,
3223
+ lacunarity: this.config.fractalLacunarity,
3224
+ gain: this.config.fractalGain,
3225
+ weightedStrength: this.config.fractalWeightedStrength,
3226
+ fractalBounding: this.calculateFractalBounding()
3227
+ };
3228
+ let l;
3229
+ const D = a === A.OpenSimplex2 || a === A.OpenSimplex2S;
3230
+ switch (a) {
3231
+ case A.OpenSimplex2:
3232
+ if (D) {
3233
+ const f = 0.5 * (1.7320508075688772 - 1);
3234
+ l = (o) => {
3235
+ const s = p0(o);
3236
+ return (h, p) => {
3237
+ const m = (h + p) * f;
3238
+ return s(h + m, p + m);
3239
+ };
3240
+ };
3241
+ } else
3242
+ l = p0;
3243
+ break;
3244
+ case A.OpenSimplex2S:
3245
+ if (D) {
3246
+ const f = 0.5 * (1.7320508075688772 - 1);
3247
+ l = (o) => {
3248
+ const s = F0(o);
3249
+ return (h, p) => {
3250
+ const m = (h + p) * f;
3251
+ return s(h + m, p + m);
3252
+ };
3253
+ };
3254
+ } else
3255
+ l = F0;
3256
+ break;
3257
+ case A.Perlin:
3258
+ l = O0;
3259
+ break;
3260
+ case A.Value:
3261
+ l = k0;
3262
+ break;
3263
+ case A.ValueCubic:
3264
+ l = v0;
3265
+ break;
3266
+ case A.Cellular: {
3267
+ const u = B0(
3268
+ this.config.cellularDistanceFunction
3269
+ ), f = d0(this.config.cellularReturnType), o = this.config.cellularDistanceFunction === n0.Euclidean && this.config.cellularReturnType !== e0.CellValue, s = this.config.cellularJitter;
3270
+ l = (h) => q0(
3271
+ h,
3272
+ u,
3273
+ f,
3274
+ s,
3275
+ o
3276
+ );
3277
+ break;
3278
+ }
3279
+ default:
3280
+ l = p0;
3281
+ }
3282
+ let y;
3283
+ switch (i) {
3284
+ case s0.FBm:
3285
+ y = P0(l, c);
3286
+ break;
3287
+ case s0.Ridged:
3288
+ y = L0(l, c);
3289
+ break;
3290
+ case s0.PingPong:
3291
+ const u = {
3292
+ ...c,
3293
+ pingPongStrength: this.config.fractalPingPongStrength
3294
+ };
3295
+ y = Q0(l, u);
3296
+ break;
3297
+ default:
3298
+ y = P0(l, c);
3299
+ }
3300
+ return r ? (u, f) => {
3301
+ const o = r(u, f);
3302
+ return y(o.x, o.y);
3303
+ } : y;
3304
+ }
3305
+ /**
3306
+ * Build domain warp function for 2D (if enabled)
3307
+ * Returns null if domain warp is disabled
3308
+ */
3309
+ buildDomainWarp2D() {
3310
+ if (this.config.domainWarpType === j.None)
3311
+ return null;
3312
+ const { seed: n, domainWarpType: a, domainWarpAmplitude: i, domainWarpFrequency: e } = this.config, r = this.calculateWarpFractalBounding(), c = i * r, l = this.getWarpAmplitudeMultiplier(), D = c * l, y = (d, T, M) => {
3313
+ switch (a) {
3314
+ case j.BasicGrid:
3315
+ return h1(d, T, M);
3316
+ case j.OpenSimplex2:
3317
+ return E0(d, T, M, !1);
3318
+ case j.OpenSimplex2Reduced:
3319
+ return E0(d, T, M, !0);
3320
+ default:
3321
+ throw new Error(`Unknown domain warp type: ${a}`);
3322
+ }
3323
+ }, {
3324
+ domainWarpFractalType: u,
3325
+ domainWarpFractalOctaves: f,
3326
+ domainWarpFractalLacunarity: o,
3327
+ domainWarpFractalGain: s
3328
+ } = this.config;
3329
+ if (u === h0.None) {
3330
+ const d = y(n, D, e);
3331
+ return (T, M) => {
3332
+ const g = { x: T, y: M };
3333
+ return d(g), g;
3334
+ };
3335
+ }
3336
+ const h = u === h0.Progressive, p = [];
3337
+ let m = c, x = e;
3338
+ for (let d = 0; d < f; d++) {
3339
+ const T = n + d, M = m * l;
3340
+ p.push(y(T, M, x)), m *= s, x *= o;
3341
+ }
3342
+ return h ? (d, T) => {
3343
+ const M = { x: d, y: T };
3344
+ for (const g of p)
3345
+ g(M);
3346
+ return M;
3347
+ } : (d, T) => {
3348
+ const M = { x: d, y: T };
3349
+ for (const g of p) {
3350
+ const S = { x: d, y: T };
3351
+ g(S), M.x += S.x - d, M.y += S.y - T;
3352
+ }
3353
+ return M;
3354
+ };
3355
+ }
3356
+ }
3357
+ function _0(t) {
3358
+ switch (t) {
3359
+ case Y.ImproveXYPlanes:
3360
+ return (a, i, e) => {
3361
+ let r = a + i, c = r * -0.211324865405187;
3362
+ return e *= 0.577350269189626, a += c - e, i += c - e, e += r * 0.577350269189626, { x: a, y: i, z: e };
3363
+ };
3364
+ case Y.ImproveXZPlanes:
3365
+ return (a, i, e) => {
3366
+ let r = a + e, c = r * -0.211324865405187;
3367
+ return i *= 0.577350269189626, a += c - i, e += c - i, i += r * 0.577350269189626, { x: a, y: i, z: e };
3368
+ };
3369
+ case Y.DefaultOpenSimplex2:
3370
+ const n = 2 / 3;
3371
+ return (a, i, e) => {
3372
+ let r = (a + i + e) * n;
3373
+ return {
3374
+ x: r - a,
3375
+ y: r - i,
3376
+ z: r - e
3377
+ };
3378
+ };
3379
+ default:
3380
+ return (a, i, e) => ({ x: a, y: i, z: e });
3381
+ }
3382
+ }
3383
+ class y1 extends H0 {
3384
+ /**
3385
+ * Build a 3D noise function
3386
+ * Returns an optimized function with zero runtime dispatch overhead
3387
+ */
3388
+ build3D() {
3389
+ const { seed: n, noiseType: a, fractalType: i, rotationType3D: e, domainWarpType: r } = this.config;
3390
+ switch (e) {
3391
+ case Y.ImproveXYPlanes:
3392
+ this.config.transformType3D = Y.ImproveXYPlanes, this.config.warpTransformType3D = Y.ImproveXYPlanes;
3393
+ break;
3394
+ case Y.ImproveXZPlanes:
3395
+ this.config.transformType3D = Y.ImproveXZPlanes, this.config.warpTransformType3D = Y.ImproveXZPlanes;
3396
+ break;
3397
+ default:
3398
+ switch (a) {
3399
+ case A.OpenSimplex2:
3400
+ case A.OpenSimplex2S:
3401
+ this.config.transformType3D = Y.DefaultOpenSimplex2;
3402
+ break;
3403
+ default:
3404
+ this.config.transformType3D = Y.None;
3405
+ }
3406
+ switch (r) {
3407
+ case j.OpenSimplex2:
3408
+ case j.OpenSimplex2Reduced:
3409
+ this.config.warpTransformType3D = Y.DefaultOpenSimplex2;
3410
+ break;
3411
+ default:
3412
+ this.config.warpTransformType3D = Y.None;
3413
+ }
3414
+ }
3415
+ let c;
3416
+ switch (a) {
3417
+ case A.OpenSimplex2:
3418
+ c = g0(n);
3419
+ break;
3420
+ case A.OpenSimplex2S:
3421
+ c = N0(n);
3422
+ break;
3423
+ case A.Perlin:
3424
+ c = R0(n);
3425
+ break;
3426
+ case A.Value:
3427
+ c = w0(n);
3428
+ break;
3429
+ case A.ValueCubic:
3430
+ c = C0(n);
3431
+ break;
3432
+ case A.Cellular: {
3433
+ const o = A0(
3434
+ this.config.cellularDistanceFunction
3435
+ ), s = d0(this.config.cellularReturnType), h = this.config.cellularDistanceFunction === n0.Euclidean && this.config.cellularReturnType !== e0.CellValue;
3436
+ c = z0(
3437
+ n,
3438
+ o,
3439
+ s,
3440
+ this.config.cellularJitter,
3441
+ h
3442
+ );
3443
+ break;
3444
+ }
3445
+ default:
3446
+ c = g0(n);
3447
+ }
3448
+ const l = this.buildDomainWarp3D(), D = _0(
3449
+ this.config.transformType3D
3450
+ );
3451
+ if (i === s0.None) {
3452
+ const o = this.config.frequency;
3453
+ return l ? (s, h, p) => {
3454
+ const m = l(s, h, p);
3455
+ m.x *= o, m.y *= o, m.z *= o;
3456
+ const x = D(m.x, m.y, m.z);
3457
+ return s = x.x, h = x.y, p = x.z, c(s, h, p);
3458
+ } : (s, h, p) => {
3459
+ s *= o, h *= o, p *= o;
3460
+ const m = D(s, h, p);
3461
+ return s = m.x, h = m.y, p = m.z, c(s, h, p);
3462
+ };
3463
+ }
3464
+ const y = {
3465
+ seed: n,
3466
+ frequency: this.config.frequency,
3467
+ octaves: this.config.fractalOctaves,
3468
+ lacunarity: this.config.fractalLacunarity,
3469
+ gain: this.config.fractalGain,
3470
+ weightedStrength: this.config.fractalWeightedStrength,
3471
+ fractalBounding: this.calculateFractalBounding()
3472
+ };
3473
+ let u;
3474
+ switch (a) {
3475
+ case A.OpenSimplex2:
3476
+ u = g0;
3477
+ break;
3478
+ case A.OpenSimplex2S:
3479
+ u = N0;
3480
+ break;
3481
+ case A.Perlin:
3482
+ u = R0;
3483
+ break;
3484
+ case A.Value:
3485
+ u = w0;
3486
+ break;
3487
+ case A.ValueCubic:
3488
+ u = C0;
3489
+ break;
3490
+ case A.Cellular: {
3491
+ const o = A0(
3492
+ this.config.cellularDistanceFunction
3493
+ ), s = d0(this.config.cellularReturnType), h = this.config.cellularDistanceFunction === n0.Euclidean && this.config.cellularReturnType !== e0.CellValue, p = this.config.cellularJitter;
3494
+ u = (m) => z0(
3495
+ m,
3496
+ o,
3497
+ s,
3498
+ p,
3499
+ h
3500
+ );
3501
+ break;
3502
+ }
3503
+ default:
3504
+ u = g0;
3505
+ }
3506
+ let f;
3507
+ switch (i) {
3508
+ case s0.FBm:
3509
+ f = W0(
3510
+ u,
3511
+ D,
3512
+ y
3513
+ );
3514
+ break;
3515
+ case s0.Ridged:
3516
+ f = X0(
3517
+ u,
3518
+ D,
3519
+ y
3520
+ );
3521
+ break;
3522
+ case s0.PingPong:
3523
+ const o = {
3524
+ ...y,
3525
+ pingPongStrength: this.config.fractalPingPongStrength
3526
+ };
3527
+ f = j0(
3528
+ u,
3529
+ D,
3530
+ o
3531
+ );
3532
+ break;
3533
+ default:
3534
+ f = W0(
3535
+ u,
3536
+ D,
3537
+ y
3538
+ );
3539
+ }
3540
+ return l ? (o, s, h) => {
3541
+ const p = l(o, s, h);
3542
+ return f(p.x, p.y, p.z);
3543
+ } : f;
3544
+ }
3545
+ /**
3546
+ * Build domain warp function for 3D (if enabled)
3547
+ * Returns null if domain warp is disabled
3548
+ */
3549
+ buildDomainWarp3D() {
3550
+ if (this.config.domainWarpType === j.None)
3551
+ return null;
3552
+ const { seed: n, domainWarpType: a, domainWarpAmplitude: i, domainWarpFrequency: e } = this.config, r = this.calculateWarpFractalBounding(), c = i * r, l = this.getWarpAmplitudeMultiplier3D(), D = c * l, y = _0(
3553
+ this.config.warpTransformType3D
3554
+ ), u = (T, M, g) => {
3555
+ switch (a) {
3556
+ case j.BasicGrid:
3557
+ return p1(T, M, g);
3558
+ case j.OpenSimplex2:
3559
+ return V0(T, M, g, !1);
3560
+ case j.OpenSimplex2Reduced:
3561
+ return V0(T, M, g, !0);
3562
+ default:
3563
+ throw new Error(`Unknown domain warp type: ${a}`);
3564
+ }
3565
+ }, {
3566
+ domainWarpFractalType: f,
3567
+ domainWarpFractalOctaves: o,
3568
+ domainWarpFractalLacunarity: s,
3569
+ domainWarpFractalGain: h
3570
+ } = this.config;
3571
+ if (f === h0.None) {
3572
+ const T = u(n, D, e);
3573
+ return (M, g, S) => {
3574
+ const b = y(M, g, S), R = { x: M, y: g, z: S };
3575
+ return T(R, b.x, b.y, b.z), R;
3576
+ };
3577
+ }
3578
+ const p = f === h0.Progressive, m = [];
3579
+ let x = c, d = e;
3580
+ for (let T = 0; T < o; T++) {
3581
+ const M = n + T, g = x * l;
3582
+ m.push(u(M, g, d)), x *= h, d *= s;
3583
+ }
3584
+ return p ? (T, M, g) => {
3585
+ const S = { x: T, y: M, z: g };
3586
+ for (const b of m) {
3587
+ const R = y(
3588
+ S.x,
3589
+ S.y,
3590
+ S.z
3591
+ );
3592
+ b(S, R.x, R.y, R.z);
3593
+ }
3594
+ return S;
3595
+ } : (T, M, g) => {
3596
+ const S = { x: T, y: M, z: g };
3597
+ for (const b of m) {
3598
+ const R = y(T, M, g), v = { x: T, y: M, z: g };
3599
+ b(v, R.x, R.y, R.z), S.x += v.x - T, S.y += v.y - M, S.z += v.z - g;
3600
+ }
3601
+ return S;
3602
+ };
3603
+ }
3604
+ /**
3605
+ * Get type-specific amplitude multiplier for domain warp
3606
+ */
3607
+ getWarpAmplitudeMultiplier3D() {
3608
+ const { domainWarpType: n } = this.config;
3609
+ switch (n) {
3610
+ case j.OpenSimplex2:
3611
+ return 32.69428253173828;
3612
+ case j.OpenSimplex2Reduced:
3613
+ return 7.71604938271605;
3614
+ case j.BasicGrid:
3615
+ default:
3616
+ return 1;
3617
+ }
3618
+ }
3619
+ }
3620
+ export {
3621
+ n0 as CellularDistanceFunction,
3622
+ e0 as CellularReturnType,
3623
+ h0 as DomainWarpFractalType,
3624
+ j as DomainWarpType,
3625
+ s0 as FractalType,
3626
+ g1 as NoiseBuilder2D,
3627
+ y1 as NoiseBuilder3D,
3628
+ A as NoiseType,
3629
+ J0 as RotationType3D,
3630
+ Y as TransformType3D
3631
+ };