1 Star 0 Fork 0

煜ccc/测试_部署资源

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
output.js 18.98 KB
一键复制 编辑 原始数据 按行查看 历史
煜ccc 提交于 2024-09-23 10:57 . 测试加密
/*! For license information please see index.js.LICENSE.txt */
!function () { var e = { "./node_modules/dayjs/dayjs.min.js": function (e) { e.exports = function () { "use strict"; var e = 6e4, t = 36e5, i = "millisecond", n = "second", s = "minute", r = "hour", o = "day", a = "week", u = "month", c = "quarter", h = "year", l = "date", d = "Invalid Date", m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, f = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function (e) { var t = ["th", "st", "nd", "rd"], i = e % 100; return "[" + e + (t[(i - 20) % 10] || t[i] || t[0]) + "]" } }, p = function (e, t, i) { var n = String(e); return !n || n.length >= t ? e : "" + Array(t + 1 - n.length).join(i) + e }, y = { s: p, z: function (e) { var t = -e.utcOffset(), i = Math.abs(t), n = Math.floor(i / 60), s = i % 60; return (t <= 0 ? "+" : "-") + p(n, 2, "0") + ":" + p(s, 2, "0") }, m: function e (t, i) { if (t.date() < i.date()) return -e(i, t); var n = 12 * (i.year() - t.year()) + (i.month() - t.month()), s = t.clone().add(n, u), r = i - s < 0, o = t.clone().add(n + (r ? -1 : 1), u); return +(-(n + (i - s) / (r ? s - o : o - s)) || 0) }, a: function (e) { return e < 0 ? Math.ceil(e) || 0 : Math.floor(e) }, p: function (e) { return { M: u, y: h, w: a, d: o, D: l, h: r, m: s, s: n, ms: i, Q: c }[e] || String(e || "").toLowerCase().replace(/s$/, "") }, u: function (e) { return void 0 === e } }, S = "en", v = {}; v[S] = g; var C = function (e) { return e instanceof $ }, M = function e (t, i, n) { var s; if (!t) return S; if ("string" == typeof t) { var r = t.toLowerCase(); v[r] && (s = r), i && (v[r] = i, s = r); var o = t.split("-"); if (!s && o.length > 1) return e(o[0]) } else { var a = t.name; v[a] = t, s = a } return !n && s && (S = s), s || !n && S }, w = function (e, t) { if (C(e)) return e.clone(); var i = "object" == typeof t ? t : {}; return i.date = e, i.args = arguments, new $(i) }, b = y; b.l = M, b.i = C, b.w = function (e, t) { return w(e, { locale: t.$L, utc: t.$u, x: t.$x, $offset: t.$offset }) }; var $ = function () { function g (e) { this.$L = M(e.locale, null, !0), this.parse(e) } var p = g.prototype; return p.parse = function (e) { this.$d = function (e) { var t = e.date, i = e.utc; if (null === t) return new Date(NaN); if (b.u(t)) return new Date; if (t instanceof Date) return new Date(t); if ("string" == typeof t && !/Z$/i.test(t)) { var n = t.match(m); if (n) { var s = n[2] - 1 || 0, r = (n[7] || "0").substring(0, 3); return i ? new Date(Date.UTC(n[1], s, n[3] || 1, n[4] || 0, n[5] || 0, n[6] || 0, r)) : new Date(n[1], s, n[3] || 1, n[4] || 0, n[5] || 0, n[6] || 0, r) } } return new Date(t) }(e), this.$x = e.x || {}, this.init() }, p.init = function () { var e = this.$d; this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds() }, p.$utils = function () { return b }, p.isValid = function () { return !(this.$d.toString() === d) }, p.isSame = function (e, t) { var i = w(e); return this.startOf(t) <= i && i <= this.endOf(t) }, p.isAfter = function (e, t) { return w(e) < this.startOf(t) }, p.isBefore = function (e, t) { return this.endOf(t) < w(e) }, p.$g = function (e, t, i) { return b.u(e) ? this[t] : this.set(i, e) }, p.unix = function () { return Math.floor(this.valueOf() / 1e3) }, p.valueOf = function () { return this.$d.getTime() }, p.startOf = function (e, t) { var i = this, c = !!b.u(t) || t, d = b.p(e), m = function (e, t) { var n = b.w(i.$u ? Date.UTC(i.$y, t, e) : new Date(i.$y, t, e), i); return c ? n : n.endOf(o) }, f = function (e, t) { return b.w(i.toDate()[e].apply(i.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(t)), i) }, g = this.$W, p = this.$M, y = this.$D, S = "set" + (this.$u ? "UTC" : ""); switch (d) { case h: return c ? m(1, 0) : m(31, 11); case u: return c ? m(1, p) : m(0, p + 1); case a: var v = this.$locale().weekStart || 0, C = (g < v ? g + 7 : g) - v; return m(c ? y - C : y + (6 - C), p); case o: case l: return f(S + "Hours", 0); case r: return f(S + "Minutes", 1); case s: return f(S + "Seconds", 2); case n: return f(S + "Milliseconds", 3); default: return this.clone() } }, p.endOf = function (e) { return this.startOf(e, !1) }, p.$set = function (e, t) { var a, c = b.p(e), d = "set" + (this.$u ? "UTC" : ""), m = (a = {}, a[o] = d + "Date", a[l] = d + "Date", a[u] = d + "Month", a[h] = d + "FullYear", a[r] = d + "Hours", a[s] = d + "Minutes", a[n] = d + "Seconds", a[i] = d + "Milliseconds", a)[c], f = c === o ? this.$D + (t - this.$W) : t; if (c === u || c === h) { var g = this.clone().set(l, 1); g.$d[m](f), g.init(), this.$d = g.set(l, Math.min(this.$D, g.daysInMonth())).$d } else m && this.$d[m](f); return this.init(), this }, p.set = function (e, t) { return this.clone().$set(e, t) }, p.get = function (e) { return this[b.p(e)]() }, p.add = function (i, c) { var l, d = this; i = Number(i); var m = b.p(c), f = function (e) { var t = w(d); return b.w(t.date(t.date() + Math.round(e * i)), d) }; if (m === u) return this.set(u, this.$M + i); if (m === h) return this.set(h, this.$y + i); if (m === o) return f(1); if (m === a) return f(7); var g = (l = {}, l[s] = e, l[r] = t, l[n] = 1e3, l)[m] || 1, p = this.$d.getTime() + i * g; return b.w(p, this) }, p.subtract = function (e, t) { return this.add(-1 * e, t) }, p.format = function (e) { var t = this, i = this.$locale(); if (!this.isValid()) return i.invalidDate || d; var n = e || "YYYY-MM-DDTHH:mm:ssZ", s = b.z(this), r = this.$H, o = this.$m, a = this.$M, u = i.weekdays, c = i.months, h = function (e, i, s, r) { return e && (e[i] || e(t, n)) || s[i].slice(0, r) }, l = function (e) { return b.s(r % 12 || 12, e, "0") }, m = i.meridiem || function (e, t, i) { var n = e < 12 ? "AM" : "PM"; return i ? n.toLowerCase() : n }, g = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a + 1, MM: b.s(a + 1, 2, "0"), MMM: h(i.monthsShort, a, c, 3), MMMM: h(c, a), D: this.$D, DD: b.s(this.$D, 2, "0"), d: String(this.$W), dd: h(i.weekdaysMin, this.$W, u, 2), ddd: h(i.weekdaysShort, this.$W, u, 3), dddd: u[this.$W], H: String(r), HH: b.s(r, 2, "0"), h: l(1), hh: l(2), a: m(r, o, !0), A: m(r, o, !1), m: String(o), mm: b.s(o, 2, "0"), s: String(this.$s), ss: b.s(this.$s, 2, "0"), SSS: b.s(this.$ms, 3, "0"), Z: s }; return n.replace(f, (function (e, t) { return t || g[e] || s.replace(":", "") })) }, p.utcOffset = function () { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15) }, p.diff = function (i, l, d) { var m, f = b.p(l), g = w(i), p = (g.utcOffset() - this.utcOffset()) * e, y = this - g, S = b.m(this, g); return S = (m = {}, m[h] = S / 12, m[u] = S, m[c] = S / 3, m[a] = (y - p) / 6048e5, m[o] = (y - p) / 864e5, m[r] = y / t, m[s] = y / e, m[n] = y / 1e3, m)[f] || y, d ? S : b.a(S) }, p.daysInMonth = function () { return this.endOf(u).$D }, p.$locale = function () { return v[this.$L] }, p.locale = function (e, t) { if (!e) return this.$L; var i = this.clone(), n = M(e, t, !0); return n && (i.$L = n), i }, p.clone = function () { return b.w(this.$d, this) }, p.toDate = function () { return new Date(this.valueOf()) }, p.toJSON = function () { return this.isValid() ? this.toISOString() : null }, p.toISOString = function () { return this.$d.toISOString() }, p.toString = function () { return this.$d.toUTCString() }, g }(), D = $.prototype; return w.prototype = D, [["$ms", i], ["$s", n], ["$m", s], ["$H", r], ["$W", o], ["$M", u], ["$y", h], ["$D", l]].forEach((function (e) { D[e[1]] = function (t) { return this.$g(t, e[0], e[1]) } })), w.extend = function (e, t) { return e.$i || (e(t, $, w), e.$i = !0), w }, w.locale = M, w.isDayjs = C, w.unix = function (e) { return w(1e3 * e) }, w.en = v[S], w.Ls = v, w.p = {}, w }() } }, t = {}; function i (n) { var s = t[n]; if (void 0 !== s) return s.exports; var r = t[n] = { exports: {} }; return e[n].call(r.exports, r, r.exports, i), r.exports } i.n = function (e) { var t = e && e.__esModule ? function () { return e.default } : function () { return e }; return i.d(t, { a: t }), t }, i.d = function (e, t) { for (var n in t) i.o(t, n) && !i.o(e, n) && Object.defineProperty(e, n, { enumerable: !0, get: t[n] }) }, i.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, i.r = function (e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }; var n = {}; !function () { "use strict"; i.r(n); var e = i("./node_modules/dayjs/dayjs.min.js"), t = i.n(e); window.CESIUM_BASE_URL = "/Cesium"; class s { #e = "/geoJson/"; #t; #i; #n = new Map; constructor(e, t, i = () => { }, n = []) { if (n.length > 0) { this.#t = e, this.#i = new Cesium.CustomDataSource(e); for (let e = 0; e < n.length; e++) { const t = Object.entries(n[e]).map((e => [e[0].toUpperCase(), e[1]])); this.#i.entities.add({ name: n[e].name, position: Cesium.Cartesian3.fromDegrees(n[e].x, n[e].y), billboard: {}, properties: Object.fromEntries(t) }) } const s = this.#i.entities.values; for (let e = 0; e < s.length; e++) { const t = s[e]._properties._propertyNames, i = {}; for (let n = 0; n < t.length; n++)i[t[n]] = s[e]._properties[t[n]].getValue(); this.#n.set(s[e].id, i) } i(this.#i), t.dataSources.add(this.#i) } else Cesium.GeoJsonDataSource.load(`${this.#e}${e}.json`).then((e => { this.#i = e; const n = e.entities.values; for (let e = 0; e < n.length; e++) { const t = n[e]._properties._propertyNames, i = {}; for (let s = 0; s < t.length; s++)i[t[s]] = n[e]._properties[t[s]].getValue(); this.#n.set(n[e].id, i) } i(e), t.dataSources.add(e) })) } get attributes () { return this.#n } get data () { return this.#i } set show (e) { this.#i.show = e } get show () { return this.#i.show } getAttributes (e) { return this.#n.get(e) } } t()("2024-11-28").unix() <= t()(new Date).unix() ? (console.clear(), console.log("-"), window.CesiumTool = null) : window.CesiumTool = class { home = { position: { x: -2917392.7665942605, y: 4786622.488840838, z: 3047995.9805967957 }, orientation: { heading: 6.275155332462779, pitch: -.4187083408549084, roll: 6.283185307179581 } }; home2 = { position: { x: -2937392.7665942605, y: 4786622.488840838, z: 3047995.9805967957 }, orientation2: { heading: 6.275155332462779, pitch: -.4187083408549084, roll: 6.283185307179581 } }; #s = "0d3ac848dabcc11bf47772c648cb1470"; #r; #o; #a; #u; #c; #h = new Map; #l = !1; #d; #m; #f; #g = !1; #p; #y; #S; #v = 0; #C = 1; #M = new Map; warningPoint = []; constructor(e, t = {}, i = !1, n = 3) { this.#o = n, t = { geocoder: !1, homeButton: !1, sceneModePicker: !1, baseLayerPicker: !1, navigationHelpButton: !1, animation: !1, timeline: !1, fullscreenButton: !1, vrButton: !1, selectionIndicator: !1, ...t }, this.#r = new Cesium.Viewer(e, t), this.#r.clock.currentTime = new Cesium.JulianDate.fromIso8601("2022-11-29"), this.#r.screenSpaceEventHandler.setInputAction((function () { }), Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK), this.#r.scene.globe.enableLighting = !1, this.#r.shadows = !1, this.#r.scene.globe.depthTestAgainstTerrain = !1, this.#r.scene.screenSpaceCameraController.enableCollisionDetection = !1, this.#r.scene.debugShowFramesPerSecond = i, this.#r.scene.requestRenderMode = !1, this.#r.scene.globe.baseColor = Cesium.Color.BLACK, this.loadTdtMap(), this.baseServer(), this.mapShader(), this.loadModel(), this.measureInit(), this.#l = !0 } get isLoad () { return this.#l } get viewer () { return this.#r } baseServer () { const e = this, t = this.#r.scene.open(window.LINEURLINFO.MODELURL); Cesium.when.all(t, (function (t) { const i = new Cesium.HypsometricSetting; var n = new Cesium.ColorTable; n.insert(0, new Cesium.Color(0, 39 / 255, 148 / 255)), n.insert(55, new Cesium.Color(149 / 255, 232 / 255, 249 / 255)), i.ColorTable = n, i.Opacity = .8, i.LineInterval = 10, t[0].hypsometricSetting = { hypsometricSetting: i, analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL }, t[0].visible = !1, e.#u = t[0] })) } loadModel () { const e = this, t = this.#r.scene.open(window.LINEURLINFO.LINEURL); window.module = t, Cesium.when(t, (function (t) { t.forEach((t => { t.visible = !1, e.#h.set(t.name, t) })), this.#r.scene.pickPositionSupported || alert("不支持深度纹理,无法拾取位置!") }), (function () { })) } showModel (e, t = !0, i = 5) { 0 != i && (i--, this.#h.has(e) ? this.#h.get(e).visible = t : setTimeout((() => { this.showModel(e, t, i) }), 4e3)) } getModelShow (e) { return this.#h.get(e).visible } showHouse (e = !0) { this.#u && (this.#u.visible = e) } show2dLayer (e = !0) { this.#c && (this.#c.show = e) } findNearScale (e) { let t, i = 3.3803271432053056e-9, n = 0; for (let s = 0; s < 20; s++) { const r = window.Math.abs(e - i); if (0 !== s) { if (!(t > r)) break; t = r, n = s, i *= 2 } else t = r, i *= 2 } return n } loadTdtMap () { const e = new Cesium.TiandituImageryProvider({ mapStyle: Cesium.TiandituMapsStyle.VEC_C, maximumLevel: 17, token: this.#s }), t = new Cesium.TiandituImageryProvider({ mapStyle: Cesium.TiandituMapsStyle.CIA_C, maximumLevel: 17, token: this.#s }), i = this.#r.imageryLayers.addImageryProvider(e); this.#r.imageryLayers.addImageryProvider(t), window.imgMap = i, 1 === Number(this.#o) && (i.brightness = .9, i.saturation = .2, i.gamma = .8) } mapShader () { let e = [125, 205, 185]; switch (Number(this.#o)) { case 1: e = [0, 255, 255]; break; case 2: e = [255, 255, 255] }const t = e, i = this.#r.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources; for (let e = 0; e < i.length; e++) { const n = "color = czm_saturation(color, textureSaturation);\n#endif\n"; let s = "color = czm_saturation(color, textureSaturation);\n#endif\n"; s += "\n color.r = 1.0 - color.r;\n color.g = 1.0 - color.g*0.95;\n color.b = 1.0 - color.b*0.85;\n ", t.length > 0 && (s += `\n color.r = color.r * ${t[0]}.0/255.0;\n color.g = color.g * ${t[1]}.0/255.0;\n color.b = color.b * ${t[2]}.0/255.0;\n `), i[e] = i[e].replace(n, s) } } measureInit () { const e = this; this.#d = new Cesium.HypsometricSetting, this.#d.DisplayMode = Cesium.HypsometricSettingEnum.DisplayMode.LINE; const t = new Cesium.ColorTable; this.#d._lineColor = Cesium.Color.fromCssColorString("#ff7d00"), this.#d.ColorTable = t, this.#d.Opacity = .6, this.#d.MaxVisibleValue = -100, this.#d.MinVisibleValue = -100, this.#a = this.#r.scene.layers.layerQueue, this.#r.scene.globe.HypsometricSetting = { hypsometricSetting: this.#d, analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL }, this.#p = new Cesium.MeasureHandler(this.#r, Cesium.MeasureMode.Distance, this.#v), this.#p.measureEvt.addEventListener((function (t) { let i = Number(t.distance); const n = e.#C, s = t.positions; 3 !== n && 4 !== n || (i = Number(e.calcClampDistance(s))); const r = i > 1e3 ? (i / 1e3).toFixed(2) + "km" : i.toFixed(2) + "m"; e.#p.disLabel.text = "距离:" + r })), this.#p.activeEvt.addEventListener((function (t) { 1 == t ? (e.#r.enableCursorStyle = !1, e.#r._element.style.cursor = "", e.#r.scene.pickPointEnabled = e.#g) : (e.#r.enableCursorStyle = !0, e.#r.scene.pickPointEnabled = !1) })), this.#y = new Cesium.MeasureHandler(this.#r, Cesium.MeasureMode.Area, this.#v), this.#y.measureEvt.addEventListener((function (t) { let i = Number(t.area); const n = e.#C, s = t.positions; 3 !== n && 4 !== n || (i = Number(e.calcClampValue(s))); const r = i > 1e6 ? (i / 1e6).toFixed(2) + "km²" : i.toFixed(2) + ""; e.#y.areaLabel.text = "面积:" + r })), this.#y.activeEvt.addEventListener((function (t) { 1 == t ? (e.#r.enableCursorStyle = !1, e.#r._element.style.cursor = "", e.#r.scene.pickPointEnabled = e.#g) : (e.#r.enableCursorStyle = !0, e.#r.scene.pickPointEnabled = !1) })) } setHypsometricSetting () { for (let e = 0; e < this.#a.length; e++)this.#a[e].hypsometricSetting = { hypsometricSetting: this.#d, analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL }; this.#f = !0 } calcClampDistance (e) { const t = []; let i = 0; for (let i = 0; i < e.length; i++) { const n = Cartographic.fromCartesian(e[i]), s = Cesium.Math.toDegrees(n.longitude), r = Cesium.Math.toDegrees(n.latitude); t.push(s, r) } const n = new PolylineGeometry({ positions: Cartesian3.fromDegreesArray(t) }), s = this.#C; return 3 == s ? i = globe.computeSurfaceDistance(n, Ellipsoid.CGCS2000) : 4 == s && (i = scene.globe.computeSurfaceDistance(n, Ellipsoid.XIAN80)), i } calcClampValue (e) { const t = []; let i = 0; for (let i = 0; i < e.length; i++) { const n = Cartographic.fromCartesian(e[i]), s = Cesium.Math.toDegrees(n.longitude), r = Cesium.Math.toDegrees(n.latitude); t.push(s, r) } const n = new PolygonGeometry.fromPositions({ positions: Cartesian3.fromDegreesArray(t) }), s = this.#C; return 3 == s ? i = this.#r.scene.globe.computeSurfaceArea(n, Ellipsoid.CGCS2000) : 4 == s && (i = this.#r.scene.globe.computeSurfaceArea(n, Ellipsoid.XIAN80)), i } measuringDistance () { this.deactiveAll(), this.#p && this.#p.activate() } measuringSurface () { this.deactiveAll(), this.#y && this.#y.activate() } deactiveAll () { this.#p && this.#p.deactivate(), this.#y && this.#y.deactivate(), this.#S && this.#S.deactivate(), this.#m = -1e4 } clearAll () { this.deactiveAll(), this.#p && this.#p.clear(), this.#y && this.#y.clear(), this.#S && this.#S.clear(), this.updateContourLine() } updateContourLine (e = -1e4) { if (this.#r.scene.globe.HypsometricSetting.hypsometricSetting.MaxVisibleValue = e, this.#r.scene.globe.HypsometricSetting.hypsometricSetting.MinVisibleValue = e, this.#f) for (let t = 0; t < this.#a.length; t++)this.#a[t].hypsometricSetting.hypsometricSetting ? (this.#a[t].hypsometricSetting.hypsometricSetting.MaxVisibleValue = e, this.#a[t].hypsometricSetting.hypsometricSetting.MinVisibleValue = e) : this.setHypsometricSetting() } flyToArr (e) { const t = e.pop(); t && this.#r.flyTo(t.data, { duration: t.time }).then((t => { t && this.flyToArr(e) })) } goHome (e = 1.5) { this.#r.camera.flyTo({ destination: this.home.position, orientation: this.home.orientation, duration: e }) } goHome2 (e = 1.5) { this.#r.camera.flyTo({ destination: this.home2.position, orientation: this.home2.orientation2, duration: e }) } getCameraStatus () { console.log(this.#r.camera) } zoom (e = 2) { const t = this.#r.camera.position, i = this.#r.scene.globe.ellipsoid.cartesianToCartographic(t).height / 20; e > 0 ? this.#r.camera.moveForward(i) : this.#r.camera.moveBackward(i) } canvasPoint (e) { return Cesium.Cartesian3.fromDegrees(e.longitude, e.latitude, e.height) } event (e, t = Cesium.ScreenSpaceEventType.LEFT_CLICK) { const i = new Cesium.ScreenSpaceEventHandler(this.#r.scene.canvas); return i.setInputAction(e, t), i } loadGeoEntity (e, t, i = () => { }, n = []) { this.#M.has(e) ? this.#M.get(e).show(t) : this.#M.set(e, new s(e, this.#r, (e => { e.show = t, i(e) }), n.length > 0 ? n : [])) } get entitys () { return this.#M } get tdtToekn () { return this.#s } } }() }(); export default CesiumTool;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yu-ccc/testing-deploying-resources.git
git@gitee.com:yu-ccc/testing-deploying-resources.git
yu-ccc
testing-deploying-resources
测试_部署资源
master

搜索帮助