UNPKG

@wqxf/base-components

Version:

卫勤先锋基础组件库

896 lines (895 loc) 31.3 kB
import { reactive, ref as ref$1, defineComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass } from "vue"; import "ant-design-vue"; import "axios"; const initialState = { info: { startTime: 0, endTime: 0, endTimeDate: 0, assessmentTime: "00:00:00", inspectInjury: void 0, escort: void 0, escortMode: void 0, userName: "", age: "" }, isAssessment: false, isEndAssessmentState: false }; reactive({ ...initialState }); const storageTheme = localStorage.getItem("THEME"); const storageThemeParse = JSON.parse(storageTheme || "{}"); const themeTypeRef = storageTheme ? storageThemeParse.themeType : "dark"; ref$1(themeTypeRef); const FeatureKeys = { CASE_CREATE: "case_create", CASE_EDIT: "case_edit", CASE_DELETE: "case_delete", CASE_VIEW: "case_view", LEFT_EYELID: "leftEyelid", RIGHT_EYELID: "rightEyelid", LEFT_EYE_COVERAGE: "lefteyeCoverage", RIGHT_EYE_COVERAGE: "righteyeCoverage", LEFT_PUPIL_OPENING: "leftpupil_opening", RIGHT_PUPIL_OPENING: "rightpupil_opening", LEFTPUPIL_DEVIATION: "leftpupil_deviation", RIGHTPUPIL_DEVIATION: "rightpupil_deviation", LEFT_EYE_STATE: "lefteye_state", RIGHT_EYE_STATE: "righteye_state", LEFT_EYE_LUMEN: "lefteye_lumen", RIGHT_EYE_LUMEN: "righteye_lumen", LEFT_EYE_FREQUENCY: "lefteye_frequency", RIGHT_EYE_FREQUENCY: "righteye_frequency", LEFT_EYE_SPEED: "lefteye_speed", RIGHT_EYE_SPEED: "righteye_speed", OBJECT_ORIENTATION: "object_orientation", EYE_ORIENTATION: "eye_orientation", LA_CONVULSION: "la_convulsion", RA_CONVULSION: "ra_convulsion", ORAL_CAVITY_CTRL: "oral_cavity_ctrl", GLOSSOPTOSIS: "glossoptosis", TRISMUS: "trismus", LARYNGEAL_EDEMA: "laryngeal_edema", STIFF_NECK: "stiff_neck", SIM_SIGNAL: "sim_signal", ESOPHAGEAL_INTUBATION: "esophageal_intubation", AIRWAY_INTUBATION: "airway_intubation", MANDIBULAR_ANGLE: "mandibular_angle", LTV: "ltv", LTV_FREQUENCY: "ltv_frequency", VENTILATION_FEEDBACK: "ventilation_feedback", LUNG_CTRL: "lung_ctrl", RESP_CTRL: "resp_ctrl", BREATH_DEPTH: "depth", BREATH_RESP: "resp", BREATH_IE_RATIO: "ie_ratio", SOUND_MUTE: "sound_mute", SOUND_TYPE: "sound_type", LEFT_PTX: "left_ptx", RIGHT_PTX: "right_ptx", LEFT_PTX_PUNCTURE: "left_ptx_puncture", RIGHT_PTX_PUNCTURE: "right_ptx_puncture", LEFT_HTX_PUNCTURE: "left_htx_puncture", RIGHT_HTX_PUNCTURE: "right_htx_puncture", HEART_RHYTHM: "state", OPEN_SOUND_MUTE: "open_sound_mute", HEART_RATE: "hr", PFRE: "pfre", BLOOD_PRESSURE: "blood_pressure", SBP: "sbp", DBP: "dbp", POWER: "power", PULSE_CONFIG: "pulse_config", SPO2: "spo2", LIP_CYANOSIS: "lip_cyanosis", EAR_CYANOSIS: "ear_cyanosis", FINGER_CYANOSIS: "finger_cyanosis", BOWELSOUND: "bowelsound", BOWELSOUND_TYPE: "bowelsound_type", ABDU_PALPATION: "abdu_palpation", BLADDER_PUNCTURE: "bladder_puncture", URC: "urc", TEMPERATURE: "temperature", SWEAT: "sweat", TEAR: "tear", NOSE_CEREBROSPINAL_FLUID: "nose_cerebrospinal_fluid", DROOL: "drool", FOAMING: "foaming", LOPS: "lops", ROPS: "rops", LSPS: "lsps", RSPS: "rsps", LF_PRESSURE: "lf_pressure", RF_PRESSURE: "rf_pressure", LH_RETRACT: "lh_retract", LH_GESTURE: "lh_gesture", RH_GESTURE: "rh_gesture", LEFTCHEEK_TRAUMA: "leftcheek_trauma", RIGHTCHEEK_TRAUMA: "rightcheek_trauma", HEADTOP_TRAUMA: "headtop_trauma", RIGHTMOUTH_TRAUMA: "rightmouth_trauma", NOSE_TRAUMA: "nose_trauma", LEFTNECK_TRAUMA: "leftneck_trauma", LEFTEAR_BLEEDING: "leftear_bleeding", RIGHTEAR_BLEEDING: "rightear_bleeding", RUA_TRAUMA: "rua_trauma", RFA_TRAUMA: "rfa_trauma", LFA_TRAUMA: "lfa_trauma", LF_HBC_BP: "lf_hbc_bp", LUA_TRAUMA: "lua_trauma", RT_TRAUMA: "rt_trauma", RC_TRAUMA: "rc_trauma", LT_TRAUMA: "lt_trauma", LC_TRAUMA: "lc_trauma", LC_HBC_BP: "lc_hbc_bp", ABDL_TRAUMA: "abdl_trauma", ABDL_GROIN_TRAUMA: "abdl_groin_trauma", ABDR_TRAUMA: "abdr_trauma", LR_TRAUMA: "lr_trauma", RR_TRAUMA: "rr_trauma", LH_TRAUMA: "lh_trauma", LFI_TRAUMA: "lfi_trauma", PRESSED_DEPTH: "pressed_depth", CHEST_PC: "pc", CHEST_PL: "pl", CHEST_PR: "pr", CHEST_PU: "pu", CHEST_PD: "pd", PRES_STA: "pres_sta", DRES: "dres", KEYS: "keys", CPLD: "cpld", EXID: "exid", GZER: "gzer", HTDL: "htdl", LH_POD: "lh_pod", RH_POD: "rh_pod", INJECTION_STATE: "injection_state", D_TYPE: "d_type", DW_TYPE: "dw_type", ET_STATE: "et_state", D_ENERGY: "d_energy" }; var RoleEnum = /* @__PURE__ */ ((RoleEnum2) => { RoleEnum2["SYSTEM_ADMIN"] = "system_admin"; RoleEnum2["WEARABLE"] = "wearable"; return RoleEnum2; })(RoleEnum || {}); ({ ORAL_CAVITY_CTRL: FeatureKeys.ORAL_CAVITY_CTRL, VENTILATION_FEEDBACK: FeatureKeys.VENTILATION_FEEDBACK, AIRWAY_INTUBATION: FeatureKeys.AIRWAY_INTUBATION, LTV: FeatureKeys.LTV, LTV_FREQUENCY: FeatureKeys.LTV_FREQUENCY, BLADDER_PUNCTURE: FeatureKeys.BLADDER_PUNCTURE, URC: FeatureKeys.URC }); const ROLE_FEATURES = { [RoleEnum.SYSTEM_ADMIN]: Object.values(FeatureKeys), [RoleEnum.WEARABLE]: [] }; (() => { const result = {}; Object.values(FeatureKeys).forEach((feature) => { result[feature] = Object.entries(ROLE_FEATURES).filter(([, features]) => features.includes(feature)).map(([role]) => role); }); return result; })(); function getAugmentedNamespace(n) { if (n.__esModule) return n; var a = Object.defineProperty({}, "__esModule", { value: true }); Object.keys(n).forEach(function(k) { var d = Object.getOwnPropertyDescriptor(n, k); Object.defineProperty(a, k, d.get ? d : { enumerable: true, get: function() { return n[k]; } }); }); return a; } var type = TypeError; var __viteBrowserExternal = {}; var __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, "default": __viteBrowserExternal }, Symbol.toStringTag, { value: "Module" })); var require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1); var hasMap = typeof Map === "function" && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; var hasSet = typeof Set === "function" && Set.prototype; var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; hasWeakRef ? WeakRef.prototype.deref : null; var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null; var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object"; var utilInspect = require$$0; var inspectCustom = utilInspect.custom; isSymbol(inspectCustom) ? inspectCustom : null; function isSymbol(obj) { if (hasShammedSymbols) { return obj && typeof obj === "object" && obj instanceof Symbol; } if (typeof obj === "symbol") { return true; } if (!obj || typeof obj !== "object" || !symToString) { return false; } try { symToString.call(obj); return true; } catch (e) { } return false; } var esObjectAtoms = Object; var esErrors = Error; var _eval = EvalError; var range = RangeError; var ref = ReferenceError; var syntax = SyntaxError; var uri = URIError; var abs$1 = Math.abs; var floor$1 = Math.floor; var max$2 = Math.max; var min$1 = Math.min; var pow$1 = Math.pow; var round$1 = Math.round; var _isNaN = Number.isNaN || function isNaN2(a) { return a !== a; }; var $isNaN = _isNaN; var sign$1 = function sign(number) { if ($isNaN(number) || number === 0) { return number; } return number < 0 ? -1 : 1; }; var gOPD$1 = Object.getOwnPropertyDescriptor; var $gOPD$1 = gOPD$1; if ($gOPD$1) { try { $gOPD$1([], "length"); } catch (e) { $gOPD$1 = null; } } var gopd = $gOPD$1; var $defineProperty$1 = Object.defineProperty || false; if ($defineProperty$1) { try { $defineProperty$1({}, "a", { value: 1 }); } catch (e) { $defineProperty$1 = false; } } var esDefineProperty = $defineProperty$1; var shams = function hasSymbols() { if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { return false; } if (typeof Symbol.iterator === "symbol") { return true; } var obj = {}; var sym = Symbol("test"); var symObj = Object(sym); if (typeof sym === "string") { return false; } if (Object.prototype.toString.call(sym) !== "[object Symbol]") { return false; } if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { return false; } var symVal = 42; obj[sym] = symVal; for (var _ in obj) { return false; } if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { return false; } var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) { return false; } if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === "function") { var descriptor = Object.getOwnPropertyDescriptor(obj, sym); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } return true; }; var origSymbol = typeof Symbol !== "undefined" && Symbol; var hasSymbolSham = shams; var hasSymbols$1 = function hasNativeSymbols() { if (typeof origSymbol !== "function") { return false; } if (typeof Symbol !== "function") { return false; } if (typeof origSymbol("foo") !== "symbol") { return false; } if (typeof Symbol("bar") !== "symbol") { return false; } return hasSymbolSham(); }; var Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; var $Object$2 = esObjectAtoms; var Object_getPrototypeOf = $Object$2.getPrototypeOf || null; var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; var toStr = Object.prototype.toString; var max$1 = Math.max; var funcType = "[object Function]"; var concatty = function concatty2(a, b) { var arr = []; for (var i = 0; i < a.length; i += 1) { arr[i] = a[i]; } for (var j = 0; j < b.length; j += 1) { arr[j + a.length] = b[j]; } return arr; }; var slicy = function slicy2(arrLike, offset) { var arr = []; for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { arr[j] = arrLike[i]; } return arr; }; var joiny = function(arr, joiner) { var str = ""; for (var i = 0; i < arr.length; i += 1) { str += arr[i]; if (i + 1 < arr.length) { str += joiner; } } return str; }; var implementation$1 = function bind(that) { var target = this; if (typeof target !== "function" || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } var args = slicy(arguments, 1); var bound; var binder = function() { if (this instanceof bound) { var result = target.apply( this, concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; } return target.apply( that, concatty(args, arguments) ); }; var boundLength = max$1(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { boundArgs[i] = "$" + i; } bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); if (target.prototype) { var Empty = function Empty2() { }; Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; var implementation = implementation$1; var functionBind = Function.prototype.bind || implementation; var functionCall = Function.prototype.call; var functionApply = Function.prototype.apply; var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply; var bind$3 = functionBind; var $apply$1 = functionApply; var $call$2 = functionCall; var $reflectApply = reflectApply; var actualApply = $reflectApply || bind$3.call($call$2, $apply$1); var bind$2 = functionBind; var $TypeError$4 = type; var $call$1 = functionCall; var $actualApply = actualApply; var callBindApplyHelpers = function callBindBasic(args) { if (args.length < 1 || typeof args[0] !== "function") { throw new $TypeError$4("a function is required"); } return $actualApply(bind$2, $call$1, args); }; var callBind = callBindApplyHelpers; var gOPD = gopd; var hasProtoAccessor; try { hasProtoAccessor = [].__proto__ === Array.prototype; } catch (e) { if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") { throw e; } } var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, "__proto__"); var $Object$1 = Object; var $getPrototypeOf = $Object$1.getPrototypeOf; var get = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? function getDunder(value) { return $getPrototypeOf(value == null ? value : $Object$1(value)); } : false; var reflectGetProto = Reflect_getPrototypeOf; var originalGetProto = Object_getPrototypeOf; var getDunderProto = get; var getProto$1 = reflectGetProto ? function getProto(O) { return reflectGetProto(O); } : originalGetProto ? function getProto2(O) { if (!O || typeof O !== "object" && typeof O !== "function") { throw new TypeError("getProto: not an object"); } return originalGetProto(O); } : getDunderProto ? function getProto3(O) { return getDunderProto(O); } : null; var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; var bind$1 = functionBind; var hasown = bind$1.call(call, $hasOwn); var undefined$1; var $Object = esObjectAtoms; var $Error = esErrors; var $EvalError = _eval; var $RangeError = range; var $ReferenceError = ref; var $SyntaxError = syntax; var $TypeError$3 = type; var $URIError = uri; var abs = abs$1; var floor = floor$1; var max = max$2; var min = min$1; var pow = pow$1; var round = round$1; var sign2 = sign$1; var $Function = Function; var getEvalledConstructor = function(expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); } catch (e) { } }; var $gOPD = gopd; var $defineProperty = esDefineProperty; var throwTypeError = function() { throw new $TypeError$3(); }; var ThrowTypeError = $gOPD ? function() { try { arguments.callee; return throwTypeError; } catch (calleeThrows) { try { return $gOPD(arguments, "callee").get; } catch (gOPDthrows) { return throwTypeError; } } }() : throwTypeError; var hasSymbols2 = hasSymbols$1(); var getProto4 = getProto$1; var $ObjectGPO = Object_getPrototypeOf; var $ReflectGPO = Reflect_getPrototypeOf; var $apply = functionApply; var $call = functionCall; var needsEval = {}; var TypedArray = typeof Uint8Array === "undefined" || !getProto4 ? undefined$1 : getProto4(Uint8Array); var INTRINSICS = { __proto__: null, "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer, "%ArrayIteratorPrototype%": hasSymbols2 && getProto4 ? getProto4([][Symbol.iterator]()) : undefined$1, "%AsyncFromSyncIteratorPrototype%": undefined$1, "%AsyncFunction%": needsEval, "%AsyncGenerator%": needsEval, "%AsyncGeneratorFunction%": needsEval, "%AsyncIteratorPrototype%": needsEval, "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics, "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt, "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": $Error, "%eval%": eval, "%EvalError%": $EvalError, "%Float16Array%": typeof Float16Array === "undefined" ? undefined$1 : Float16Array, "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry, "%Function%": $Function, "%GeneratorFunction%": needsEval, "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": hasSymbols2 && getProto4 ? getProto4(getProto4([][Symbol.iterator]())) : undefined$1, "%JSON%": typeof JSON === "object" ? JSON : undefined$1, "%Map%": typeof Map === "undefined" ? undefined$1 : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto4 ? undefined$1 : getProto4((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": $Object, "%Object.getOwnPropertyDescriptor%": $gOPD, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise, "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy, "%RangeError%": $RangeError, "%ReferenceError%": $ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? undefined$1 : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto4 ? undefined$1 : getProto4((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": hasSymbols2 && getProto4 ? getProto4(""[Symbol.iterator]()) : undefined$1, "%Symbol%": hasSymbols2 ? Symbol : undefined$1, "%SyntaxError%": $SyntaxError, "%ThrowTypeError%": ThrowTypeError, "%TypedArray%": TypedArray, "%TypeError%": $TypeError$3, "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array, "%URIError%": $URIError, "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet, "%Function.prototype.call%": $call, "%Function.prototype.apply%": $apply, "%Object.defineProperty%": $defineProperty, "%Object.getPrototypeOf%": $ObjectGPO, "%Math.abs%": abs, "%Math.floor%": floor, "%Math.max%": max, "%Math.min%": min, "%Math.pow%": pow, "%Math.round%": round, "%Math.sign%": sign2, "%Reflect.getPrototypeOf%": $ReflectGPO }; if (getProto4) { try { null.error; } catch (e) { var errorProto = getProto4(getProto4(e)); INTRINSICS["%Error.prototype%"] = errorProto; } } var doEval = function doEval2(name) { var value; if (name === "%AsyncFunction%") { value = getEvalledConstructor("async function () {}"); } else if (name === "%GeneratorFunction%") { value = getEvalledConstructor("function* () {}"); } else if (name === "%AsyncGeneratorFunction%") { value = getEvalledConstructor("async function* () {}"); } else if (name === "%AsyncGenerator%") { var fn = doEval2("%AsyncGeneratorFunction%"); if (fn) { value = fn.prototype; } } else if (name === "%AsyncIteratorPrototype%") { var gen = doEval2("%AsyncGenerator%"); if (gen && getProto4) { value = getProto4(gen.prototype); } } INTRINSICS[name] = value; return value; }; var LEGACY_ALIASES = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }; var bind2 = functionBind; var hasOwn = hasown; var $concat = bind2.call($call, Array.prototype.concat); var $spliceApply = bind2.call($apply, Array.prototype.splice); var $replace = bind2.call($call, String.prototype.replace); var $strSlice = bind2.call($call, String.prototype.slice); var $exec = bind2.call($call, RegExp.prototype.exec); var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; var stringToPath = function stringToPath2(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); if (first === "%" && last !== "%") { throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); } else if (last === "%" && first !== "%") { throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); } var result = []; $replace(string, rePropName, function(match, number, quote2, subString) { result[result.length] = quote2 ? $replace(subString, reEscapeChar, "$1") : number || match; }); return result; }; var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { var intrinsicName = name; var alias; if (hasOwn(LEGACY_ALIASES, intrinsicName)) { alias = LEGACY_ALIASES[intrinsicName]; intrinsicName = "%" + alias[0] + "%"; } if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; if (value === needsEval) { value = doEval(intrinsicName); } if (typeof value === "undefined" && !allowMissing) { throw new $TypeError$3("intrinsic " + name + " exists, but is not available. Please file an issue!"); } return { alias, name: intrinsicName, value }; } throw new $SyntaxError("intrinsic " + name + " does not exist!"); }; var getIntrinsic = function GetIntrinsic(name, allowMissing) { if (typeof name !== "string" || name.length === 0) { throw new $TypeError$3("intrinsic name must be a non-empty string"); } if (arguments.length > 1 && typeof allowMissing !== "boolean") { throw new $TypeError$3('"allowMissing" argument must be a boolean'); } if ($exec(/^%?[^%]*%?$/, name) === null) { throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); } var parts = stringToPath(name); var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); var intrinsicRealName = intrinsic.name; var value = intrinsic.value; var skipFurtherCaching = false; var alias = intrinsic.alias; if (alias) { intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { throw new $SyntaxError("property names with quotes must have matching quotes"); } if (part === "constructor" || !isOwn) { skipFurtherCaching = true; } intrinsicBaseName += "." + part; intrinsicRealName = "%" + intrinsicBaseName + "%"; if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { if (!(part in value)) { if (!allowMissing) { throw new $TypeError$3("base intrinsic for " + name + " exists, but the property is not available."); } return void 0; } if ($gOPD && i + 1 >= parts.length) { var desc2 = $gOPD(value, part); isOwn = !!desc2; if (isOwn && "get" in desc2 && !("originalValue" in desc2.get)) { value = desc2.get; } else { value = value[part]; } } else { isOwn = hasOwn(value, part); value = value[part]; } if (isOwn && !skipFurtherCaching) { INTRINSICS[intrinsicRealName] = value; } } } return value; }; var GetIntrinsic$2 = getIntrinsic; var callBindBasic2 = callBindApplyHelpers; var $indexOf = callBindBasic2([GetIntrinsic$2("%String.prototype.indexOf%")]); var callBound$2 = function callBoundIntrinsic(name, allowMissing) { var intrinsic = GetIntrinsic$2(name, !!allowMissing); if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { return callBindBasic2([intrinsic]); } return intrinsic; }; var GetIntrinsic$1 = getIntrinsic; var callBound$1 = callBound$2; GetIntrinsic$1("%Map%", true); callBound$1("Map.prototype.get", true); callBound$1("Map.prototype.set", true); callBound$1("Map.prototype.has", true); callBound$1("Map.prototype.delete", true); callBound$1("Map.prototype.size", true); var GetIntrinsic2 = getIntrinsic; var callBound = callBound$2; GetIntrinsic2("%WeakMap%", true); callBound("WeakMap.prototype.get", true); callBound("WeakMap.prototype.set", true); callBound("WeakMap.prototype.has", true); callBound("WeakMap.prototype.delete", true); (function() { var array = []; for (var i = 0; i < 256; ++i) { array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()); } return array; })(); const withInstall = (component, alias) => { component.install = (app) => { const compName = component.name || component.displayName; if (!compName) return; app.component(compName, component); if (alias) { app.config.globalProperties[alias] = component; } }; return component; }; const basicProps = { theme: String, modeList: { type: Array, required: true, default: () => [] }, active: { type: Number }, onClick: { type: Function, default: null } }; var SimTrainingMode_vue_vue_type_style_index_0_lang = ""; const _hoisted_1 = { class: "sim-training-mode" }; const _hoisted_2 = { class: "center" }; const _hoisted_3 = ["onClick"]; const _hoisted_4 = ["src"]; const __default__ = { name: "SimTrainingMode" }; const _sfc_main = defineComponent({ ...__default__, props: basicProps, emits: ["change"], setup(__props, { emit: __emit }) { var _a; const props = __props; const emit = __emit; const cursorUrl = "@/assets/images/home/cursor.png"; const activeUrl = "@/assets/images/home/active.png"; const selectedMode = ref$1(props.active || ((_a = props.modeList[0]) == null ? void 0 : _a.id) || 0); const handleMode = (item) => { var _a2; selectedMode.value = item.id; (_a2 = props == null ? void 0 : props.onClick) == null ? void 0 : _a2.call(props, item); emit("change", item); }; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1, [ createElementVNode("div", _hoisted_2, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modeList, (mode) => { return openBlock(), createElementBlock("div", { key: mode.id, class: normalizeClass(["card", { active: selectedMode.value === mode.id }]), onClick: ($event) => handleMode(mode) }, [ createElementVNode("img", { class: "cursor", src: cursorUrl, alt: "Cursor indicator" }), createElementVNode("img", { src: mode.imgUrl, class: normalizeClass({ normalIcon: mode.id === 4 }), alt: "Card content" }, null, 10, _hoisted_4), createElementVNode("img", { src: activeUrl, class: "active", alt: "Active indicator" }) ], 10, _hoisted_3); }), 128)) ]) ]); }; } }); const SimTrainingMode = withInstall(_sfc_main); export { SimTrainingMode };