{"version":3,"sources":["node_modules/@arcgis/core/core/mathUtils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nconst t = new Float32Array(1);\nfunction n(t) {\n --t;\n for (let n = 1; n < 32; n <<= 1) t |= t >> n;\n return t + 1;\n}\nfunction r(t, n, r) {\n return Math.min(Math.max(t, n), r);\n}\nfunction e(t, n) {\n return 0 === n ? 0 : Math.round(t / n) * n;\n}\nfunction u(t) {\n return !(t & t - 1);\n}\nfunction i(t) {\n return t--, t |= t >> 1, t |= t >> 2, t |= t >> 4, t |= t >> 8, t |= t >> 16, ++t;\n}\nfunction a(t) {\n return 10 ** Math.ceil(Math.LOG10E * Math.log(t));\n}\nfunction o(t, n, r) {\n return t + (n - t) * r;\n}\nfunction f(t, n) {\n const r = -t * t / (2 * n);\n return 1 / Math.sqrt(2 * Math.PI * n) * Math.exp(r);\n}\nfunction c(t, n, r, e, u) {\n return o(e, u, (t - n) / (r - n));\n}\nfunction s(t) {\n return t * Math.PI / 180;\n}\nfunction M(t) {\n return 180 * t / Math.PI;\n}\nfunction h(t, n = 1e-6) {\n return (t < 0 ? -1 : 1) / Math.max(Math.abs(t), n);\n}\nfunction b(t) {\n return Math.acos(r(t, -1, 1));\n}\nfunction l(t) {\n return Math.asin(r(t, -1, 1));\n}\nfunction m(t, n, r = 1e-6) {\n if (t === n) return !0;\n if (!Number.isFinite(t) || !Number.isFinite(n)) return !1;\n return (t > n ? t - n : n - t) <= r;\n}\nconst N = new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));\nfunction F(t) {\n return N.setFloat64(0, t), N.getBigInt64(0);\n}\nfunction g(t) {\n return N.setBigInt64(0, t), N.getFloat64(0);\n}\nconst E = BigInt(\"1000000\"),\n I = p(1);\nfunction p(t) {\n const n = F(t = Math.abs(t)),\n r = g(n <= E ? E : n - E);\n return Math.abs(t - r);\n}\nfunction x(t, n, r = I) {\n if (t === n) return !0;\n if (!Number.isFinite(t) || !Number.isFinite(n)) return !1;\n if (null != r) {\n if (p(Math.min(Math.abs(t), Math.abs(n))) < r) return Math.abs(t - n) <= r;\n }\n const e = F(t),\n u = F(n);\n if (e < 0 != u < 0) return !1;\n return !((e < u ? u - e : e - u) > E);\n}\nfunction B(t, n, r = 1e-6) {\n if (t === n) return !0;\n if (!Number.isFinite(t) || !Number.isFinite(n)) return !1;\n const e = Math.abs(t - n),\n u = Math.abs(t),\n i = Math.abs(n);\n if (0 === t || 0 === n || u < 1e-12 && i < 1e-12) {\n if (e > .01 * r) return !1;\n } else if (e / (u + i) > r) return !1;\n return !0;\n}\nfunction w(t) {\n return y(Math.max(-d, Math.min(t, d)));\n}\nfunction y(n) {\n return t[0] = n, t[0];\n}\nfunction P(t, n, e) {\n const u = r((e - t) / (n - t), 0, 1);\n return u * u * (3 - 2 * u);\n}\nfunction A(t) {\n const n = t[0] * t[0] + t[1] * t[1] + t[2] * t[2],\n r = t[3] * t[3] + t[4] * t[4] + t[5] * t[5],\n e = t[6] * t[6] + t[7] * t[7] + t[8] * t[8];\n return !(m(n, 1) && m(r, 1) && m(e, 1));\n}\nfunction S(t, n) {\n return (t % n + n) % n;\n}\nconst d = y(34028234663852886e22);\nfunction L(t, n, r) {\n if (void 0 === r || 0 == +r) return Math[t](n);\n if (n = +n, r = +r, isNaN(n) || \"number\" != typeof r || r % 1 != 0) return NaN;\n let e = n.toString().split(\"e\");\n return e = (n = Math[t](+(e[0] + \"e\" + (e[1] ? +e[1] - r : -r)))).toString().split(\"e\"), +(e[0] + \"e\" + (e[1] ? +e[1] + r : r));\n}\nexport { b as acosClamped, l as asinClamped, r as clamp, w as clampFloat32, L as decimalAdjust, s as deg2rad, m as floatEqualAbsolute, B as floatEqualRelative, x as floatEqualUlp, f as gauss, A as hasScaling, u as isPowerOfTwo, o as lerp, S as moduloPositive, a as nextHighestPowerOfTen, n as nextHighestPowerOfTwo, i as nextPowerOfTwo, d as numberMaxFloat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EAAE,CAAC,EAC9CC,EAAID,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAC1CE,EAAIF,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAC5C,MAAO,EAAEG,EAAE,EAAG,CAAC,GAAKA,EAAEF,EAAG,CAAC,GAAKE,EAAED,EAAG,CAAC,EACvC,CAIA,IAAME,EAAIC,EAAE,oBAAoB,EAChC,SAASC,EAAEC,EAAG,EAAGC,EAAG,CAClB,GAAeA,IAAX,QAAqB,CAACA,GAAN,EAAS,OAAO,KAAKD,CAAC,EAAE,CAAC,EAC7C,GAAI,EAAI,CAAC,EAAGC,EAAI,CAACA,EAAG,MAAM,CAAC,GAAiB,OAAOA,GAAnB,UAAwBA,EAAI,GAAK,EAAG,MAAO,KAC3E,IAAIC,EAAI,EAAE,SAAS,EAAE,MAAM,GAAG,EAC9B,OAAOA,GAAK,EAAI,KAAKF,CAAC,EAAE,EAAEE,EAAE,CAAC,EAAI,KAAOA,EAAE,CAAC,EAAI,CAACA,EAAE,CAAC,EAAID,EAAI,CAACA,GAAG,GAAG,SAAS,EAAE,MAAM,GAAG,EAAG,EAAEC,EAAE,CAAC,EAAI,KAAOA,EAAE,CAAC,EAAI,CAACA,EAAE,CAAC,EAAID,EAAIA,GAC9H","names":["t","n","r","i","t","o","t","r","c","t","r","e","u","o","s","M","b","t","r","l","m","N","F","g","E","I","p","x","e","u","w","t","y","d","n","A","t","r","e","m","d","y","L","t","r","e"],"x_google_ignoreList":[0]}