chunk-GGGVIS2U.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {
  2. s3 as s
  3. } from "./chunk-E5O6P5I2.js";
  4. // node_modules/@arcgis/core/core/Version.js
  5. var r = class {
  6. constructor(t, r2, o = "") {
  7. this.major = t, this.minor = r2, this._context = o;
  8. }
  9. lessThan(t, r2) {
  10. return this.major < t || t === this.major && this.minor < r2;
  11. }
  12. since(t, r2) {
  13. return !this.lessThan(t, r2);
  14. }
  15. validate(r2) {
  16. if (this.major !== r2.major) {
  17. const o = this._context && this._context + ":", s2 = this._context && this._context + " ";
  18. throw new s(o + "unsupported-version", `Required major ${s2}version is '${this.major}', but got '\${version.major}.\${version.minor}'`, { version: r2 });
  19. }
  20. }
  21. clone() {
  22. return new r(this.major, this.minor, this._context);
  23. }
  24. static parse(o, s2 = "") {
  25. const [e, i] = o.split("."), n = /^\s*\d+\s*$/;
  26. if (!e || !e.match || !e.match(n)) {
  27. throw new s((s2 && s2 + ":") + "invalid-version", "Expected major version to be a number, but got '${version}'", { version: o });
  28. }
  29. if (!i || !i.match || !i.match(n)) {
  30. throw new s((s2 && s2 + ":") + "invalid-version", "Expected minor version to be a number, but got '${version}'", { version: o });
  31. }
  32. const a = parseInt(e, 10), h = parseInt(i, 10);
  33. return new r(a, h, s2);
  34. }
  35. };
  36. export {
  37. r
  38. };
  39. //# sourceMappingURL=chunk-GGGVIS2U.js.map