sales-frontend-components 0.0.138 → 0.0.140

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.d.ts CHANGED
@@ -78,6 +78,7 @@ interface cameraOptions {
78
78
  type: cameraItemType;
79
79
  onChange: (file: File) => void;
80
80
  onDelete: (id: string) => void;
81
+ useNativeCamera?: boolean;
81
82
  cameraOnly: boolean;
82
83
  buttonText?: string;
83
84
  resize: {
@@ -89,7 +90,46 @@ interface cameraOptions {
89
90
  }
90
91
  type cameraItemType = 'single' | 'multiple' | 'linear';
91
92
 
92
- declare function useCamera({ onChange, resize: resizeOption, cameraOnly, onDelete, show, type, buttonText, initData }?: Partial<cameraOptions>): {
93
+ /**
94
+ * @param options Partial<cameraOptions>
95
+ * initData
96
+ * 화면최초 로딩시 초기값
97
+ *
98
+ * show
99
+ * boolean
100
+ * 화면진입시, Attachment 컴포넌트 노출여부, 별도의 버튼을 통해 호출할 경우 false.
101
+ *
102
+ * type
103
+ * 'single' | 'multiple' | 'linear' Attachment 컴포넌트 타입
104
+ *
105
+ * onChange
106
+ * (file: File) => void;
107
+ *
108
+ * onDelete
109
+ * (id: string) => void;
110
+ *
111
+ * useNativeCamera
112
+ * boolean
113
+ * 앱환경에서, 네이티브의 카메라를 호출할경우 사용
114
+ *
115
+ * cameraOnly
116
+ * boolean
117
+ * useNativeCamera가 false인 경우에만 사용
118
+ *
119
+ * buttonText
120
+ * string
121
+ * Attachment 컴포넌트에 버튼을 표시할 경우에만 사용
122
+ *
123
+ * resize
124
+ * 이미지가 입력된후 리사이즈를 할경우에만 사용
125
+ * resize: {
126
+ * width?: number;
127
+ * height?: number;
128
+ * filesize?: number;
129
+ * ext?: string;
130
+ * };
131
+ */
132
+ declare function useCamera({ onChange, resize: resizeOption, cameraOnly, onDelete, show, type, buttonText, initData, useNativeCamera }?: Partial<cameraOptions>): {
93
133
  onClick: () => void;
94
134
  getImage: (imageId: string) => AttachedPhoto | undefined;
95
135
  deleteImage: (imageId: string) => void;
@@ -427,6 +467,7 @@ declare function useJobSearchModal(): {
427
467
 
428
468
  declare function useJobVehicleSearchModal(): {
429
469
  selectedJob: sales_frontend_api_method.OccupationResponseDto | null;
470
+ selectedJobDetail: any;
430
471
  selectedVehicle: sales_frontend_api_method.VehicleTypeResponseDto | undefined;
431
472
  riskGrade: string;
432
473
  hospitalizationGrade: string;
package/dist/index.esm.js CHANGED
@@ -17,6 +17,7 @@ import styles$8 from './modal/pre-standard/job-vehicle-search-modal/job-vehicle-
17
17
  import styles$9 from './modal/pre-standard/vehicle-search-modal/vehicle-search-modal.module.scss';
18
18
  import styles$a from './modal/pre-standard/organization-search-modal/organization-search-modal.module.scss';
19
19
  import styles$b from './step-indicator/step-indicator.module.scss';
20
+ import { Bridge } from 'sales-frontend-bridge';
20
21
  import styles$c from './camera/camera.module.scss';
21
22
 
22
23
  const FormCheckboxButton = ({
@@ -1516,6 +1517,16 @@ function downloadBlob(blob, filename) {
1516
1517
  document.body.removeChild(link);
1517
1518
  URL.revokeObjectURL(url);
1518
1519
  }
1520
+ async function imageUrlToFile(imageUrl) {
1521
+ const headers = new Headers();
1522
+ headers.append("cache-control", "no-cache");
1523
+ const resImage = await fetch(imageUrl, { headers });
1524
+ const blob = await resImage.blob();
1525
+ const { type } = blob;
1526
+ const name = type.split("/").join(".");
1527
+ const file = new File([blob], name, { type });
1528
+ return file;
1529
+ }
1519
1530
  var astx2_min_default = "/* eslint-disable */\n/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 32070 $ */\nvar $ASTX2_CONST = {\n ERROR_SUCCESS: 0,\n ERROR_FAILED: 101,\n ERROR_NOINIT: 102,\n ERROR_NOTINST: 103,\n ERROR_NOTSUPPORTED: 104,\n ERROR_NOCONNECT: 105,\n ERROR_NCK: 106,\n ERROR_ERR: 107,\n ERROR_NSP: 108,\n ERROR_PARAM: 109,\n ERROR_EXCESS: 110,\n ERROR_NEEDUPDATE: 111,\n OPTION_NONE2E: 1,\n OPTION_AUTOFOCUS: 2,\n OPTION_AUTOSETTEXT: 4,\n OPTION_E2EFORM: 8,\n OPTION_E2EFORM_NOENC: 16,\n OPTION_E2EFORM_ALLTRIP: 32,\n OPTION_E2EFORM_ONLY: 64,\n OPTION_E2EFORM_TAGSET: 128,\n OPTION_NONE2E_ALG: 256,\n OPTION_NOSPTDUMMY: 512,\n OPTION_FIXEDTYPE: 1024,\n PROTECT_AK: 1,\n PROTECT_FW: 2,\n PROTECT_PB: 4,\n PROTECT_PCS: 8,\n SERVICE_AK: 1,\n REQUEST_JSONP: 1,\n REQUEST_AJAX: 2,\n DEBUG_NOALIVE: 1,\n INTERVAL_ALIVE: 5e3,\n E2ETYPE_EXCLUDE: -1,\n E2ETYPE_NONE: 0,\n E2ETYPE_CERT1: 1,\n E2ETYPE_CERT2: 2,\n E2ETYPE_SDK: 11,\n E2ETYPE_PLAIN1: 21,\n E2ETYPE_PLAIN2: 22,\n E2ETYPE_WIZVERA: 31,\n PAGEID: '',\n BROWSER_TYPE: '',\n BROWSER_VER: '',\n E2EFORM_TAIL: !0,\n E2EFORM_INIT: '_e2e_forminit',\n E2EFORM_TAG1: '_e2e_1__',\n E2EFORM_TAG2: '_e2e_2__',\n E2EFORM_TAG1_PWD: '_e2e_1_pwd__',\n E2EFORM_TAG2_PWD: '_e2e_2_pwd__',\n getErrno: function (a) {\n return 'NCK' == a ? this.ERROR_NCK : 'ERR' == a ? this.ERROR_ERR : 'NSP' == a ? this.ERROR_NSP : this.ERROR_FAILED;\n },\n _get_browser_version: function (a) {\n var b = 0;\n if (0 <= a.indexOf('Edge/') && ((b = parseInt(a.split('Edge/')[1])), 0 < b)) return 'EG' + b;\n if (0 <= a.indexOf('MSIE')) {\n if (((b = parseInt(a.split('MSIE')[1])), 0 < b)) return 'IE' + b;\n } else if (\n 0 <= a.indexOf('Trident') &&\n (0 <= a.indexOf('rv:')\n ? (b = parseInt(a.split('rv:')[1]))\n : 0 <= a.indexOf('IE') && (b = parseInt(a.split('IE')[1])),\n 0 < b)\n )\n return 'IE' + b;\n return 0 <= a.indexOf('OPR/') && ((b = parseInt(a.split('OPR/')[1])), 0 < b)\n ? 'OP' + b\n : 0 <= a.indexOf('Firefox/') && ((b = parseInt(a.split('Firefox/')[1])), 0 < b)\n ? 'FF' + b\n : 0 <= a.indexOf('Chrome/') && ((b = parseInt(a.split('Chrome/')[1])), 0 < b)\n ? 'CR' + b\n : 0 <= a.indexOf('AppleWebKit') &&\n 0 <= a.indexOf('Version/') &&\n ((b = parseInt(a.split('Version/')[1])), 0 < b)\n ? 'SF' + b\n : 'OT0';\n },\n init: function () {\n this.PAGEID = new Date().getTime();\n this.PAGEID -= Math.floor(100 * Math.random());\n this.BROWSER_VER = this._get_browser_version(navigator.userAgent);\n this.BROWSER_TYPE = this.BROWSER_VER.substring(0, 2);\n }\n};\n$ASTX2_CONST.init();\nvar $ASTX2_COMM = {\n mLocalServerURL: '',\n mClientPublicKey: '',\n mErrorAbortFlag: !1,\n mDegugFlags: 0,\n setDegugFlags: function (a) {\n this.mDegugFlags |= a;\n },\n getDegugFlags: function () {\n return this.mDegugFlags;\n },\n isEnable: function () {\n return 0 < this.mLocalServerURL.length ? !0 : !1;\n },\n uninit: function () {\n this.mLocalServerURL = '';\n },\n errorAbort: function (a) {\n 1 != this.mErrorAbortFlag && ((this.mErrorAbortFlag = !0), $ASTX2_CUST.errorAbort(a));\n }\n },\n $_astxu = {\n mJsonpSequence: 0,\n jsonQstr: function (a) {\n var b = [],\n c;\n for (c in a) a.hasOwnProperty(c) && b.push(encodeURIComponent(c) + '=' + encodeURIComponent(a[c]));\n return b.join('&');\n },\n jsonParse: function (a) {\n var b = a.indexOf('{'),\n c = a.indexOf('}');\n if (-1 == b || -1 == c) return {};\n a = a.substring(b, c + 1);\n return 'object' == typeof window.JSON && 'function' == typeof window.JSON.parse\n ? window.JSON.parse(a)\n : 'function' == typeof jQuery && 'function' == typeof jQuery.parseJSON\n ? jQuery.parseJSON(a)\n : eval('(' + a + ')');\n },\n _send_jsonp_jquery: function (a) {\n try {\n jQuery.ajax({\n url: a.src,\n timeout: a.timeout,\n cache: !1,\n crossDomain: !0,\n dataType: 'jsonp',\n contentType: 'application/javascript',\n success: function (b, d, e) {\n a.onSuccess(b);\n },\n error: function (b, d, e) {\n if (200 == b.status && 1 == a.nocallback) a.onSuccess();\n else a.onFailure();\n },\n complete: function (a, b) {}\n });\n } catch (b) {\n a.onFailure();\n }\n },\n _send_jsonp_dom: function (a) {\n var b = document.createElement('script');\n b.type = 'text/javascript';\n b.id = a.callback;\n b.async = a.async;\n b.src = a.src;\n var c = document.getElementsByTagName('body')[0];\n if (null == c && ((c = document.getElementsByTagName('head')[0]), null == c)) {\n a.onFailure();\n return;\n }\n var d = window.setTimeout(function () {\n window[a.callback] = function () {};\n try {\n var b = document.getElementById(a.callback);\n b && ((b.onerror = function () {}), c.removeChild(b));\n } catch (d) {}\n a.onFailure();\n }, a.timeout);\n 0 == a.nocallback\n ? (window[a.callback] = function (b) {\n window.clearTimeout(d);\n try {\n var f = document.getElementById(a.callback);\n f && c.removeChild(f);\n } catch (g) {}\n a.onSuccess(b);\n })\n : (b.onload = function () {\n window.clearTimeout(d);\n try {\n var b = document.getElementById(a.callback);\n b && c.removeChild(b);\n } catch (f) {}\n a.onSuccess();\n });\n b.onerror = function () {\n window.clearTimeout(d);\n window[a.callback] = function () {};\n try {\n var b = document.getElementById(a.callback);\n b && c.removeChild(b);\n } catch (f) {}\n a.onFailure();\n };\n c.appendChild(b);\n },\n sendJsonp: function (a) {\n null == a.data && (a.data = {});\n null == a.callback && (a.callback = 'jsonpCallback' + $_astxu.rnd());\n null == a.nocallback && (a.nocallback = !1);\n null == a.timeout && (a.timeout = 5e3);\n null == a.async && (a.async = !0);\n null == a.seq && (a.seq = !1);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function () {});\n a.src = 1 == $ASTX2.mUseJQuery ? a.url + '?v=3' : a.url + '?v=2&callback=' + a.callback;\n if (1 == a.seq) {\n var b = ++this.mJsonpSequence;\n a.src += '&seq=' + b;\n 2147483647 <= this.mJsonpSequence && (this.mJsonpSequence = 0);\n }\n b = this.jsonQstr(a.data);\n 0 < b.length && (a.src += '&' + b);\n 1 == $ASTX2.mUseJQuery ? this._send_jsonp_jquery(a) : this._send_jsonp_dom(a);\n },\n _get_xhr_object: function () {\n if ('undefined' !== typeof XMLHttpRequest)\n try {\n return new XMLHttpRequest();\n } catch (a) {}\n try {\n return new ActiveXObject('Microsoft.XMLHTTP');\n } catch (b) {}\n return null;\n },\n sendAjax: function (a) {\n var b = this._get_xhr_object();\n if (null == b) $_astxu.msg('[sendAjax] _get_xhr_object failed');\n else {\n null == a.data && (a.data = {});\n null == a.type && (a.type = 'POST');\n null == a.async && (a.async = !0);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function (a, b) {});\n var c = this.jsonQstr(a.data);\n b.open(a.type, 'GET' == a.type ? a.url + '&' + c : a.url, a.async);\n b.onreadystatechange = function () {\n if (4 == b.readyState)\n if (200 == b.status) a.onSuccess(b.responseText);\n else a.onFailure(b.status);\n };\n null != a.timeout && (b.timeout = a.timeout);\n b.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n b.send(c);\n }\n },\n sendAuthAjax: function (a) {\n var b = this._get_xhr_object();\n const stored = JSON.parse(sessionStorage.getItem('cust-mgmt-auth') || '{}');\n if (null == b) $_astxu.msg('[sendAjax] _get_xhr_object failed');\n else {\n null == a.data && (a.data = {});\n null == a.type && (a.type = 'POST');\n null == a.async && (a.async = !0);\n null == a.onSuccess && (a.onSuccess = function (a) {});\n null == a.onFailure && (a.onFailure = function (a, b) {});\n var c = this.jsonQstr(a.data);\n b.open(a.type, 'GET' == a.type ? a.url + '&' + c : a.url, a.async);\n b.onreadystatechange = function () {\n if (4 == b.readyState)\n if (200 == b.status) a.onSuccess(b.responseText);\n else a.onFailure(b.status);\n };\n null != a.timeout && (b.timeout = a.timeout);\n b.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n b.setRequestHeader('Authorization', stored.key);\n b.withCredentials = true;\n b.send(c);\n }\n },\n isACK: function (a) {\n return a && 'ACK' == a ? !0 : !1;\n },\n isWinOS: function () {\n return -1 != navigator.platform.indexOf('Win32') || -1 != navigator.platform.indexOf('Win64') ? !0 : !1;\n },\n isMacOS: function () {\n return -1 != navigator.platform.indexOf('Mac') ? !0 : !1;\n },\n isLinuxOS: function () {\n return -1 != navigator.platform.indexOf('Linux') ? !0 : !1;\n },\n isMacLinuxOS: function () {\n return 1 == this.isMacOS() || 1 == this.isLinuxOS() ? !0 : !1;\n },\n hasFocused: function () {\n var a = !1;\n try {\n a = document.hasFocus();\n } catch (b) {}\n return a;\n },\n addEvent: function (a, b, c) {\n a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent('on' + b, c);\n },\n removeEvent: function (a, b, c) {\n a.removeEventListener ? a.removeEventListener(b, c) : a.detachEvent('on' + b, c);\n },\n getCreatedFormValue: function (a, b, c) {\n null == c && (c = !1);\n c = 1 == c ? document.getElementsByTagName('input') : a.getElementsByTagName('input');\n for (var d = 0; d < c.length; d++) {\n var e = c[d];\n if (e && this.getnc(e.name) == b) return e;\n }\n c = document.createElement('input');\n c.name = b;\n c.type = 'hidden';\n if ('function' === typeof $ASTX2_CUST.onCreatedFormValue) $ASTX2_CUST.onCreatedFormValue(c, b);\n a.appendChild(c);\n return c;\n },\n getHostPath: function () {\n var a = window.location.protocol + '//' + window.location.hostname;\n return (a += window.location.port ? ':' + window.location.port : '');\n },\n getnc: function (a, b) {\n null == b && (b = '');\n return null == a ? b : a;\n },\n getint: function (a, b) {\n null == b && (b = 0);\n return parseInt(a) || b;\n },\n rnd: function () {\n var a = new Date().getTime();\n return (a += new String(Math.floor(100 * Math.random())));\n },\n getKeyCode: function (a) {\n var b = null;\n a && (b = a.keyCode ? a.keyCode : a.which);\n return b;\n },\n xorEncode: function (a, b) {\n for (var c = '', d = new String(a), e = 0; e < d.length; e++) c += String.fromCharCode(b ^ d.charCodeAt(e));\n return c;\n },\n xorDecode: function (a, b) {\n for (var c = '', d = new String(a), e = 0; e < d.length; e++) c += String.fromCharCode(b ^ d.charCodeAt(e));\n return c;\n },\n ltrim: function (a, b) {\n for (b = this.getnc(b, ' '); a.substring(0, 1) == b; ) a = a.substring(1, a.length);\n return a;\n },\n rtrim: function (a, b) {\n for (b = this.getnc(b, ' '); a.substring(a.length - 1, a.length) == b; ) a = a.substring(0, a.length - 1);\n return a;\n },\n alltrim: function (a, b) {\n return this.ltrim(this.rtrim(a, b), b);\n },\n setInputFocus: function () {\n try {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n if (c && 'hidden' != c.type) {\n c.focus();\n break;\n }\n }\n } catch (d) {}\n },\n log: function (a) {\n 'object' === typeof debuger && 'function' === typeof debuger.write\n ? debuger.write(a)\n : 'object' === typeof window.console && 'function' === typeof console.log && console.log(a);\n },\n msg: function (a) {\n this.log(a);\n }\n },\n $ASTX2_E2E = (function () {\n var a = null,\n b = function (a) {\n function b(a) {\n var c = a.target;\n null == c && (c = a.srcElement);\n return c;\n }\n function e(a) {\n if (null == a) return null;\n var b = a.getAttribute('e2e_inputid');\n if (null == b || 0 >= b) return null;\n var c = a.getAttribute('e2e_type');\n if (null == c || 0 >= c) return null;\n var d = a.getAttribute('e2e_inputtype');\n if (null == d || 0 >= d) d = '';\n var e = a.getAttribute('wizvera_key');\n null == e && (e = '');\n var f = {};\n f.e2e_inputid = b;\n f.e2e_type = c;\n f.e2e_inputtype = d;\n f.name = $_astxu.getnc(a.name);\n f.form = a.form ? $_astxu.getnc(a.form.name) : '';\n f.wizvera_key = e;\n return f;\n }\n function f(a) {\n var b = e(a);\n if (null == b) return null;\n b.type = $_astxu.getnc(a.type);\n b.maxlength = $_astxu.getnc(a.getAttribute('maxlength'));\n b.txtmsk = $_astxu.getnc(a.getAttribute('e2e_txtmsk'));\n return b;\n }\n function g(a, b) {\n a.getAttribute('e2e_type') != $ASTX2_CONST.E2ETYPE_PLAIN1 && (a.readOnly = b);\n }\n function h(a, b, c, d, e) {\n 1 == n && q(a, b, c, d, e);\n }\n function q(b, s, d, e, f) {\n var g = {};\n g.pageid = $ASTX2_CONST.PAGEID;\n if (null != s) for (var h in s) s.hasOwnProperty(h) && (g[h] = s[h]);\n a.send_e2e_cmd(b, g, d, e, f);\n }\n function l(a, b) {\n var c = '';\n return (c = 0 == $ASTX2_CONST.E2EFORM_TAIL ? b + a : a + b);\n }\n function m(a, b) {\n var c = '';\n return (c =\n 'password' == a.type\n ? b == $ASTX2_CONST.E2ETYPE_CERT2\n ? l(a.name, $ASTX2_CONST.E2EFORM_TAG2_PWD)\n : l(a.name, $ASTX2_CONST.E2EFORM_TAG1_PWD)\n : b == $ASTX2_CONST.E2ETYPE_CERT2\n ? l(a.name, $ASTX2_CONST.E2EFORM_TAG2)\n : l(a.name, $ASTX2_CONST.E2EFORM_TAG1));\n }\n function C() {\n if (0 != D)\n for (var a = document.getElementsByTagName('form'), b = 0; b < a.length; b++) {\n var c = a[b];\n if (null != c) {\n var d = !1;\n if (k & $ASTX2_CONST.OPTION_E2EFORM_TAGSET) {\n var e = c.getAttribute(E.e2eform_tagset);\n if (null == e || 0 >= e) d = !0;\n } else if (k & $ASTX2_CONST.OPTION_E2EFORM_ONLY) {\n if (null == c) e = !1;\n else\n for (var e = !1, f = c.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h && ((h = h.getAttribute('e2e_type')), null != h && 0 < h)) {\n e = !0;\n break;\n }\n }\n 0 == e && (d = !0);\n }\n if (1 != d) {\n if ((d = $_astxu.getCreatedFormValue(c, l($ASTX2_CONST.E2EFORM_INIT, $ASTX2_CONST.E2EFORM_TAG1))))\n d.value = F;\n if ((d = $_astxu.getCreatedFormValue(c, l($ASTX2_CONST.E2EFORM_INIT, $ASTX2_CONST.E2EFORM_TAG2))))\n d.value = G;\n }\n }\n }\n }\n function V(a) {\n var b = 0;\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (b = 1);\n a = {\n ver: $_astxu.getint(a.ver),\n alg: $_astxu.getint(a.alg),\n svr: $_astxu.getnc(a.svr),\n norsa: $_astxu.getint(a.norsa),\n uniq: $_astxu.getnc(a.uniq),\n utime: $_astxu.getint(a.utime),\n ncert: $_astxu.getnc(a.ncert),\n pageid: $ASTX2_CONST.PAGEID,\n noenc: b\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/e2e_forminit',\n data: a,\n onSuccess: function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n 0 == $_astxu.isACK(b)\n ? $_astxu.msg('[e2e_forminit] result=' + b)\n : ((D = !0), (F = $_astxu.getnc(a.e2e_form1)), (G = $_astxu.getnc(a.e2e_form2)), C());\n },\n onFailure: function () {\n $_astxu.msg('[e2e_forminit] failure.');\n }\n });\n }\n function W() {\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n onSuccess: function (a) {\n var b = $_astxu.jsonParse(a);\n a = $_astxu.getnc(b ? b.result : '');\n 0 == $_astxu.isACK(a)\n ? $_astxu.msg('[_init_e2eform] result=' + a)\n : $ASTX2.set_cert(\n function () {\n V(b);\n },\n function () {\n $_astxu.msg('[_init_e2eform] set_cert() failure');\n },\n b\n );\n },\n onFailure: function (a) {\n $_astxu.msg('[_init_e2eform] failure');\n }\n });\n }\n function H(a) {\n var b = $_astxu.getHostPath() + $_astxu.getnc(window.location.pathname),\n c = 0;\n k & $ASTX2_CONST.OPTION_NOSPTDUMMY && (c = 1);\n q(\n 'e2e_start',\n { browser: $ASTX2_CONST.BROWSER_VER, ver: a.ver, svr: a.svr, valg: a.valg, url: b, custcode: w, nospt: c },\n 5e3,\n function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n if ($_astxu.isACK(b)) {\n n = 1;\n I = $_astxu.getint(a.call_settext);\n t = $_astxu.getint(a.call_gettext);\n J = $_astxu.getint(a.vm_env);\n K = $_astxu.getint(a.ak_drv);\n try {\n var c = document.activeElement;\n c && x(c, !1);\n } catch (aa) {}\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n (3 > $_astxu.getint(a.stsvr) ? $ASTX2_COMM.errorAbort($ASTX2_CONST.ERROR_NEEDUPDATE) : W());\n if (k & $ASTX2_CONST.OPTION_AUTOSETTEXT)\n for (var d in u) (a = u[d]), null != a && (0 >= $_astxu.getnc(a.value).length || y(a));\n } else n = 2;\n },\n function () {\n n = 2;\n }\n );\n }\n function L(a) {\n if (0 == $_astxu.hasFocused()) return !1;\n if (0 == n) return !0;\n if (1 == n) {\n if (!1 === a) return;\n try {\n var b = document.activeElement;\n b && x(b, !1);\n } catch (c) {}\n return !0;\n }\n n = 0;\n k & $ASTX2_CONST.OPTION_NONE2E\n ? ((a = 0),\n k & $ASTX2_CONST.OPTION_NONE2E_ALG && (a = $ASTX2.mOptionStrings.none2e_alg),\n H({ ver: 1, svr: '_none2e', valg: a }))\n : $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_INIT),\n onSuccess: function (a) {\n a = $_astxu.jsonParse(a);\n var b = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(b) ? H(a) : (n = -1);\n },\n onFailure: function (a) {\n n = -1;\n }\n });\n return !0;\n }\n function r(a) {\n if (null != a && (a.getAttribute('e2e_type') != $ASTX2_CONST.E2ETYPE_PLAIN1 || 0 != t)) {\n try {\n if (a != document.activeElement) return;\n } catch (b) {}\n 'number' == typeof a.selectionStart\n ? (a.selectionStart = a.selectionEnd = a.value.length)\n : 'undefined' != typeof a.createTextRange && ((a = a.createTextRange()), a.collapse(!1), a.select());\n }\n }\n function x(a, b) {\n v = !1;\n if (k & $ASTX2_CONST.OPTION_FIXEDTYPE && a) {\n var c = a.getAttribute('e2e_inputid');\n null != c && 0 < c && z[c] != a.type && (a.type = z[c]);\n }\n c = f(a);\n null != c &&\n (!0 === b && L(!1),\n h(\n 'e2e_focus',\n c,\n null,\n function (b) {\n g(a, !1);\n window.setTimeout(function () {\n r(a);\n }, 1);\n },\n function () {}\n ));\n }\n function M(a) {\n var c = b(a);\n if (null != c) {\n if ('function' === typeof $ASTX2_CUST.onHandlerPreFocus) $ASTX2_CUST.onHandlerPreFocus(c, a);\n x(c, !0);\n }\n }\n function N(a) {\n a = b(a);\n if (null != a) {\n var c = e(a);\n if (null != c) {\n try {\n if (document.hasFocus() && a === document.activeElement) return;\n } catch (f) {}\n g(a, !0);\n h('e2e_blur', c);\n }\n }\n }\n function O(a) {\n var c = b(a);\n null != c &&\n window.setTimeout(function () {\n r(c);\n }, 1);\n }\n function y(a, b) {\n var c = f(a);\n if (null != c) {\n var d = $_astxu.getnc(a.value);\n c.text = d;\n k & $ASTX2_CONST.OPTION_E2EFORM && (c.e2eform = 1);\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (c.noenc = 1);\n h(\n 'e2e_settext',\n c,\n null,\n function (d) {\n var e = $_astxu.getnc(d ? d.result : '');\n if (0 == $_astxu.isACK(e)) b && b($ASTX2_CONST.ERROR_NCK);\n else {\n if (k & $ASTX2_CONST.OPTION_E2EFORM) {\n var e = m(a, c.e2e_type),\n f = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (f = !0);\n if ((e = $_astxu.getCreatedFormValue(a.form, e, f))) e.value = $_astxu.getnc(d.e2e_data);\n }\n b && b($ASTX2_CONST.ERROR_SUCCESS);\n }\n },\n function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n );\n }\n }\n function A(a) {\n 'function' === typeof a.stopPropagation && a.stopPropagation();\n 'function' === typeof a.preventDefault ? a.preventDefault() : (a.returnValue = !1);\n }\n function X(a, b, c) {\n h(\n 'e2e_gettext',\n b,\n null,\n function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d)\n ? ((b = $_astxu.getnc(b.text)), (a.value = b), c && c($ASTX2_CONST.ERROR_SUCCESS))\n : c && c($ASTX2_CONST.ERROR_NCK);\n },\n function () {\n c && c($ASTX2_CONST.ERROR_FAILED);\n }\n );\n }\n function Y(a, b) {\n k & $ASTX2_CONST.OPTION_E2EFORM_NOENC && (b.noenc = 1);\n h(\n 'e2e_formget',\n b,\n null,\n function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n if (0 == $_astxu.isACK(d)) $_astxu.msg('[e2e_formget] ' + b.name + ',result=' + d);\n else if (((d = a.form), null != d)) {\n var e = m(a, b.e2e_type),\n f = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (f = !0);\n if ((d = $_astxu.getCreatedFormValue(d, e, f))) d.value = $_astxu.getnc(c.e2e_data);\n }\n },\n function () {}\n );\n }\n function P(a) {\n var c = b(a);\n if (null != c) {\n var e = f(c);\n if (null != e) {\n r(c);\n var p = $_astxu.getKeyCode(a);\n 17 == p && (v = !0);\n if (1 == v)\n return (\n 86 == p &&\n h(\n 'e2e_clear',\n e,\n null,\n function (a) {\n c.value = '';\n },\n function () {}\n ),\n A(a),\n !1\n );\n if (1 == (16 == p || 17 == p || 18 == p ? !0 : !1)) return !0;\n var g = !0;\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n ((e.e2e_type != $ASTX2_CONST.E2ETYPE_CERT1 && e.e2e_type != $ASTX2_CONST.E2ETYPE_CERT2) || Y(c, e));\n 'function' === typeof $ASTX2_CUST.onHandlerKeyDown &&\n 0 == $ASTX2_CUST.onHandlerKeyDown(c, a) &&\n (A(a), (g = !1));\n 1 != t ||\n ('password' == c.type && e.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN1) ||\n 0 != J ||\n (1 == g &&\n X(c, e, function () {\n 'password' != c.type &&\n 'dynamic' == c.getAttribute('e2e_txtmsk') &&\n (c.value = c.value.replace(/[^*]/g, '*').substring(0, c.value.length - 1) + c.value.slice(-1));\n }),\n 0 == (8 == p || 9 == p || 13 == p || 20 == p ? !0 : !1) && (A(a), (g = !1)));\n return g;\n }\n }\n }\n function Q(a) {\n var c = b(a);\n null != c &&\n (17 == $_astxu.getKeyCode(a) && (v = !1),\n 1 == I\n ? y(c)\n : 0 == t &&\n 'password' != c.type &&\n 'dynamic' == c.getAttribute('e2e_txtmsk') &&\n (c.value = c.value.replace(/[^*]/g, '*').substring(0, c.value.length - 1) + c.value.slice(-1)),\n window.setTimeout(function () {\n r(c);\n }, 1));\n }\n function R(a) {\n var c = b(a);\n null != c &&\n window.setTimeout(function () {\n r(c);\n }, 1);\n }\n function S(a) {\n if ('IE' == $ASTX2_CONST.BROWSER_TYPE || 'EG' == $ASTX2_CONST.BROWSER_TYPE) {\n var c = b(a);\n null != c &&\n '' != c.value &&\n setTimeout(function () {\n if ('' == c.value) {\n var a = e(c);\n null != a && h('e2e_clear', a);\n }\n }, 1);\n }\n }\n function T(a) {\n var c = b(a);\n null != c &&\n ('number' == typeof c.selectionStart\n ? (c.selectionStart < c.value.length || c.selectionEnd < c.value.length) &&\n window.setTimeout(function () {\n r(c);\n }, 1)\n : 'undefined' != typeof c.createTextRange &&\n document.selection &&\n ((a = document.selection.createRange()),\n a.moveStart('character', -c.value.length),\n a.text.length <= c.value.length &&\n window.setTimeout(function () {\n r(c);\n }, 1)));\n }\n function Z(a) {}\n function U(a) {\n h('e2e_unload');\n }\n var k = 0,\n E = [],\n $ = 0,\n B = !1,\n w = 0,\n n = -1,\n I = 0,\n t = 0,\n J = 0,\n K = 1,\n v = !1,\n u = [],\n z = [],\n D = !1,\n F = '',\n G = '';\n this.setOption = function (a) {\n k |= a;\n };\n this.setOptionStrings = function (a) {\n E = a;\n };\n this.attach = function (a, b) {\n null != a && (w = a);\n k & $ASTX2_CONST.OPTION_AUTOSETTEXT && (u = []);\n k & $ASTX2_CONST.OPTION_E2EFORM && C();\n for (var c = document.getElementsByTagName('input'), d = 0; d < c.length; d++) {\n var e = c[d];\n null != e && this.addObject(e);\n }\n q(\n 'e2e_init',\n null,\n null,\n function (a) {\n L();\n $_astxu.addEvent(window, 'blur', Z);\n $_astxu.addEvent(window, 'unload', U);\n $_astxu.addEvent(window, 'beforeunload', U);\n b && b(!0);\n },\n function () {\n b && b(!1);\n }\n );\n B = !0;\n };\n this.addObject = function (a) {\n if (null != a) {\n var b = a.getAttribute('e2e_inputid');\n if (!(null != b && 0 < b)) {\n var c = a.getAttribute('e2e_type');\n if (null == c || 0 >= c)\n if (((c = a.getAttribute('e2e')), 'true' == c || 'on' == c))\n (c = $ASTX2_CONST.E2ETYPE_CERT1), a.setAttribute('e2e_type', c);\n else {\n c = $ASTX2_CONST.E2ETYPE_NONE;\n try {\n if (\n ('function' === typeof $ASTX2_CUST.isE2EObject &&\n 1 == $ASTX2_CUST.isE2EObject(a) &&\n ((c = $ASTX2_CONST.E2ETYPE_CERT1), a.setAttribute('e2e_type', c)),\n 'function' === typeof $ASTX2_CUST.getE2Etype)\n ) {\n var d = $ASTX2_CUST.getE2Etype(a);\n d && ((c = d), a.setAttribute('e2e_type', c));\n }\n } catch (e) {}\n if (c == $ASTX2_CONST.E2ETYPE_NONE) return;\n }\n b = ++$;\n a.setAttribute('e2e_inputid', b);\n d = !0;\n k & $ASTX2_CONST.OPTION_AUTOSETTEXT && 0 < a.value.length && ((d = !1), u.push(a));\n 1 == d && (a.value = '');\n a.setAttribute('autocomplete', 'off');\n g(a, !0);\n z[b] = a.type;\n $_astxu.addEvent(a, 'focus', M);\n $_astxu.addEvent(a, 'blur', N);\n $_astxu.addEvent(a, 'click', O);\n $_astxu.addEvent(a, 'keyup', Q);\n $_astxu.addEvent(a, 'keydown', P);\n $_astxu.addEvent(a, 'select', T);\n $_astxu.addEvent(a, 'mouseup', S);\n $_astxu.addEvent(a, 'mousedown', R);\n k & $ASTX2_CONST.OPTION_E2EFORM &&\n (c == $ASTX2_CONST.E2ETYPE_CERT1 || c == $ASTX2_CONST.E2ETYPE_CERT2) &&\n ((b = a.form),\n null != b &&\n ((a = m(a, c)),\n (c = !1),\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (c = !0),\n $_astxu.getCreatedFormValue(b, a, c)));\n }\n }\n };\n this.subObject = function (a) {\n var b = e(a);\n if (null != b) {\n $_astxu.removeEvent(a, 'focus', M);\n $_astxu.removeEvent(a, 'blur', N);\n $_astxu.removeEvent(a, 'click', O);\n $_astxu.removeEvent(a, 'keyup', Q);\n $_astxu.removeEvent(a, 'keydown', P);\n $_astxu.removeEvent(a, 'select', T);\n $_astxu.removeEvent(a, 'mouseup', S);\n $_astxu.removeEvent(a, 'mousedown', R);\n try {\n a == document.activeElement && h('e2e_blur', b);\n } catch (c) {}\n a.value = '';\n a.setAttribute('e2e_inputid', -1);\n a.setAttribute('e2e_type', -1);\n g(a, !1);\n }\n };\n this.getE2EHash = function (a, b) {\n var c = e(a);\n null == c\n ? b(null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'e2e_gethash',\n c,\n null,\n function (a) {\n var c = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(c)\n ? b($_astxu.getnc(a.hash), $ASTX2_CONST.ERROR_SUCCESS)\n : b(null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n b(null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.getEncText = function (a, b, c) {\n var d = e(a);\n d.customcode = w;\n d.random = b;\n null == d\n ? c(null, null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'sdk_getenctext',\n d,\n null,\n function (a) {\n var b = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(b)\n ? c(d.name, $_astxu.getnc(a.getenctext), $ASTX2_CONST.ERROR_SUCCESS)\n : c(null, null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n c(null, null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.getE2EText = function (a, b) {\n var c = e(a);\n null == c\n ? b(null, null, $ASTX2_CONST.ERROR_PARAM)\n : c.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN2 && c.e2e_type != $ASTX2_CONST.E2ETYPE_WIZVERA\n ? b(null, null, $ASTX2_CONST.ERROR_PARAM)\n : h(\n 'e2e_gettext',\n c,\n null,\n function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d)\n ? b(c.name, $_astxu.getnc(a.text), $ASTX2_CONST.ERROR_SUCCESS)\n : b(null, null, $ASTX2_CONST.ERROR_NCK);\n },\n function () {\n b(null, null, $ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.setE2EText = function (a, b) {\n y(a, b);\n };\n this.clearE2EText = function (a, b) {\n var c = e(a);\n null != c &&\n h(\n 'e2e_clear',\n c,\n null,\n function (d) {\n d = $_astxu.getnc(d ? d.result : '');\n if (0 == $_astxu.isACK(d)) b && b($ASTX2_CONST.ERROR_NCK);\n else {\n a.value = '';\n if (k & $ASTX2_CONST.OPTION_E2EFORM) {\n d = m(a, c.e2e_type);\n var e = !1;\n k & $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP && (e = !0);\n if ((d = $_astxu.getCreatedFormValue(a.form, d, e))) d.value = '';\n }\n b && b($ASTX2_CONST.ERROR_SUCCESS);\n }\n },\n function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n );\n };\n this.dettach = function () {\n h('e2e_uninit');\n B = !1;\n };\n this.isAttached = function () {\n return B;\n };\n this.isStarted = function () {\n return 1 == n ? !0 : !1;\n };\n this.checkService = function (a) {\n var b = {};\n b.service = $ASTX2_CONST.SERVICE_AK;\n b.result = $ASTX2_CONST.ERROR_SUCCESS;\n if (0 >= n) {\n var c = this;\n window.setTimeout(function () {\n c.checkService(a);\n }, 300);\n } else\n 1 == n && 0 == K\n ? (b.result = $ASTX2_CONST.ERROR_FAILED)\n : 2 == n && (b.result = $ASTX2_CONST.ERROR_FAILED),\n a(b);\n };\n this.getE2EelmsForm = function (a, b, c, d) {\n for (var f = document.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h && ((h = e(h)), null != h && h.e2e_type == d)) {\n var k = !1;\n null == a ? (k = !0) : $_astxu.getnc(a.name) == h.form && (k = !0);\n 0 != k && (b.push(h.e2e_inputid), c.push(h.name));\n }\n }\n };\n this.getE2EelmsID = function (a, b, c, d) {\n for (var f = document.getElementsByTagName('input'), g = 0; g < f.length; g++) {\n var h = f[g];\n if (null != h) {\n var k = e(h);\n if (null != k && k.e2e_type == d) {\n for (var l = !1, h = $_astxu.getnc(h.id).toLowerCase(), m = 0; m < a.length; m++)\n if (a[m].toLowerCase() == h) {\n l = !0;\n break;\n }\n 0 != l && (b.push(k.e2e_inputid), c.push(k.name));\n }\n }\n }\n };\n this.resetE2Evalues = function (a, b) {\n for (var c = document.getElementsByTagName('input'), d = 0; d < c.length; d++) {\n var f = c[d];\n if (null != f) {\n var g = e(f);\n null != g &&\n g.form == a &&\n g.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN1 &&\n g.e2e_type != $ASTX2_CONST.E2ETYPE_PLAIN2 &&\n (f.value = b);\n }\n }\n };\n this.getE2Eattribute = function (a) {\n return e(a);\n };\n };\n return {\n getInstance: function (c) {\n null === a && (a = new b(c));\n return a;\n }\n };\n })(),\n $ASTX2 = {\n mUseJQuery: !0,\n mUseAjaxHello: !1,\n mUseAutoStart: !0,\n mOption: 0,\n mOptionStrings: [],\n mE2EInst: null,\n mLastError: $ASTX2_CONST.ERROR_SUCCESS,\n send_e2e_cmd: function (a, b, c, d, e, f) {\n if ('object' == typeof $ASTX2_COMM && 0 != $ASTX2_COMM.isEnable()) {\n var g = this;\n null == f && (f = 1);\n var h = !1;\n if ('e2e_focus' == a || 'e2e_blur' == a || 'e2e_gettext' == a || 'e2e_settext' == a) h = !0;\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/' + a,\n data: b,\n timeout: c || 5e3,\n async: !1,\n seq: h,\n onSuccess: function (a) {\n d && d(a);\n },\n onFailure: function () {\n 3 > f ? g.send_e2e_cmd(a, b, c, d, e, f + 1) : e && e();\n }\n });\n }\n },\n _send_alive: function () {\n var a = { pageid: $ASTX2_CONST.PAGEID, focus: $_astxu.hasFocused() ? 1 : 0 };\n $_astxu.sendJsonp({ url: $ASTX2_COMM.mLocalServerURL + '/alive', data: a });\n },\n send_alive_run: function () {\n if (!($ASTX2_COMM.getDegugFlags() & $ASTX2_CONST.DEBUG_NOALIVE)) {\n var a = this;\n setInterval(function () {\n a._send_alive();\n }, $ASTX2_CONST.INTERVAL_ALIVE);\n }\n },\n _hello_local_server: function (a, b, c, d, e) {\n var f = this;\n if (d >= c.length)\n f.setLastError($ASTX2_CONST.ERROR_NOTINST),\n 1 == $_astxu.isWinOS() &&\n 1 == f.mUseAutoStart &&\n ((f.mUseAutoStart = !1),\n 'IE' != $ASTX2_CONST.BROWSER_TYPE &&\n 'EG' != $ASTX2_CONST.BROWSER_TYPE &&\n (window.location.href = 'astx://start')),\n b();\n else {\n var g = e[d],\n h = c[d],\n q = 'https://' + (1 == $_astxu.isMacOS() ? 'lx.astxsvc.com' : '127.0.0.1') + ':' + h + '/ASTX2',\n h = '',\n l = document.getElementsByTagName('script');\n if (l) for (var m = 0; m < l.length; m++) l[m].src && 0 <= l[m].src.indexOf('astx2.min.js') && (h = l[m].src);\n l = '$Revision: 32070 $';\n l = l.substr(11, l.length - 13);\n m = !1;\n 0 == $ASTX2.mUseAjaxHello && 1 == d % 2 && (m = !0);\n 'IE' == $ASTX2_CONST.BROWSER_TYPE &&\n 'IE10' != $ASTX2_CONST.BROWSER_VER &&\n 'IE11' != $ASTX2_CONST.BROWSER_VER &&\n ((m = !0), 2e3 < g && (g = 2e3));\n d++;\n 1 == m\n ? $_astxu.sendJsonp({\n url: q + '/hello',\n data: { url: h, version: l },\n timeout: g,\n onSuccess: function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n c = $_astxu.getnc(c ? c.client_public_key : '');\n $_astxu.isACK(d)\n ? (($ASTX2_COMM.mLocalServerURL = q), ($ASTX2_COMM.mClientPublicKey = c), a())\n : (f.setLastError($ASTX2_CONST.ERROR_NOTINST), b());\n },\n onFailure: function () {\n f._hello_local_server(a, b, c, d, e);\n }\n })\n : $_astxu.sendAjax({\n url: q + '/hello?',\n type: 'POST',\n data: { url: h, version: l },\n timeout: g,\n onSuccess: function (c) {\n var d = $_astxu.jsonParse(c);\n c = $_astxu.getnc(d ? d.result : '');\n d = $_astxu.getnc(d ? d.client_public_key : '');\n $_astxu.isACK(c)\n ? (($ASTX2_COMM.mLocalServerURL = q), ($ASTX2_COMM.mClientPublicKey = d), a())\n : (f.setLastError($ASTX2_CONST.ERROR_NOTINST), b());\n },\n onFailure: function () {\n f._hello_local_server(a, b, c, d, e);\n }\n });\n }\n },\n setOption: function (a) {\n if (null != a) {\n !0 === a.autofocus && (this.mOption |= $ASTX2_CONST.OPTION_AUTOFOCUS);\n !0 === a.e2eform && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM);\n !1 === a.e2eform_enc && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_NOENC);\n !0 === a.e2eform_alltrip && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_ALLTRIP);\n !0 === a.e2eform_only && (this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_ONLY);\n !0 === a.autosettext && (this.mOption |= $ASTX2_CONST.OPTION_AUTOSETTEXT);\n !0 === a.nospt && (this.mOption |= $ASTX2_CONST.OPTION_NOSPTDUMMY);\n !0 === a.fixedtype && (this.mOption |= $ASTX2_CONST.OPTION_FIXEDTYPE);\n var b = $_astxu.getnc(a.e2eform_tagset);\n 0 < b.length &&\n ((this.mOption |= $ASTX2_CONST.OPTION_E2EFORM_TAGSET), (this.mOptionStrings.e2eform_tagset = b));\n b = $_astxu.getint(a.none2e_alg);\n 0 < b && ((this.mOption |= $ASTX2_CONST.OPTION_NONE2E_ALG), (this.mOptionStrings.none2e_alg = b));\n }\n },\n _get_custom_value: function () {\n 'undefined' !== typeof $ASTX2_CUST.mUseJQuery && ($ASTX2.mUseJQuery = $ASTX2_CUST.mUseJQuery);\n 'undefined' !== typeof $ASTX2_CUST.mUseAjaxHello && ($ASTX2.mUseAjaxHello = $ASTX2_CUST.mUseAjaxHello);\n 'undefined' !== typeof $ASTX2_CUST.mUseAutoStart &&\n ($ASTX2.mUseAutoStart = 1 == $ASTX2.mUseAutoStart ? $ASTX2_CUST.mUseAutoStart : !1);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAIL && ($ASTX2_CONST.E2EFORM_TAIL = $ASTX2_CUST.E2EFORM_TAIL);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_INIT && ($ASTX2_CONST.E2EFORM_INIT = $ASTX2_CUST.E2EFORM_INIT);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG1 && ($ASTX2_CONST.E2EFORM_TAG1 = $ASTX2_CUST.E2EFORM_TAG1);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG2 && ($ASTX2_CONST.E2EFORM_TAG2 = $ASTX2_CUST.E2EFORM_TAG2);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG1_PWD &&\n ($ASTX2_CONST.E2EFORM_TAG1_PWD = $ASTX2_CUST.E2EFORM_TAG1_PWD);\n 'undefined' !== typeof $ASTX2_CUST.E2EFORM_TAG2_PWD &&\n ($ASTX2_CONST.E2EFORM_TAG2_PWD = $ASTX2_CUST.E2EFORM_TAG2_PWD);\n },\n init: function (a, b, c, d) {\n function e() {\n a();\n if (1 == $_astxu.isMacLinuxOS()) {\n f.send_alive_run();\n try {\n $ASTX2_MLi.init();\n } catch (b) {}\n }\n }\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (1 == $ASTX2_COMM.isEnable()) a();\n else {\n this._get_custom_value();\n null != d && ($ASTX2.mUseAutoStart = 1 == d ? $ASTX2.mUseAutoStart : !1);\n 1 == $ASTX2.mUseJQuery && 'undefined' === typeof jQuery && ($ASTX2.mUseJQuery = !1);\n var f = this;\n this.mE2EInst = $ASTX2_E2E.getInstance(this);\n this.mE2EInst.setOption(this.mOption);\n this.mE2EInst.setOptionStrings(this.mOptionStrings);\n var g = [],\n h = [];\n null != c\n ? ((g = [55920, 55920, 55921, 55922]), (h = [c, c, c, c]))\n : ((g = [55920, 55920, 55921, 55922]), (h = [1e4, 1500, 750, 250]));\n setTimeout(function () {\n f._hello_local_server(e, b, g, 0, h);\n }, 200);\n }\n },\n _check_local_server_chk_stamp: function (a, b, c, d) {\n var e = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_CHK_STAMP),\n data: d,\n onSuccess: function (c) {\n c = $_astxu.jsonParse(c);\n c = $_astxu.getnc(c ? c.result : '');\n $_astxu.isACK(c) ? a() : (e.setLastError($ASTX2_CONST.ERROR_NCK), b());\n },\n onFailure: function (a) {\n b();\n }\n });\n },\n _check_local_server: function (a, b, c, d) {\n var e = this;\n null == d && (d = 1);\n 3 < d\n ? (e.setLastError($ASTX2_CONST.ERROR_NOCONNECT), b())\n : $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/check',\n data: { method: c, url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_STAMP), rnd: $_astxu.rnd() },\n onSuccess: function (f) {\n var g = $_astxu.getnc(f ? f.result : '');\n $_astxu.isACK(g)\n ? ((f.rnd = $_astxu.rnd()), e._check_local_server_chk_stamp(a, b, c, f))\n : e._check_local_server(a, b, c, d + 1);\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n e._check_local_server(a, b, c, d + 1);\n }\n });\n },\n checkServer: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n 0 == $ASTX2_COMM.isEnable()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), b())\n : (0 == $_astxu.isWinOS() ? (c = 1) : null == c && (c = 1), this._check_local_server(a, b, c));\n },\n _e2e_enable: function () {\n return 0 == $_astxu.isWinOS()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOTSUPPORTED), !1)\n : 0 == $ASTX2_COMM.isEnable()\n ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), !1)\n : !0;\n },\n resetE2E: function (a, b) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) return !1;\n var c = this;\n window.setTimeout(function () {\n c.mE2EInst.attach(a, b);\n }, 100);\n return !0;\n },\n initE2E: function (a, b) {\n this.mOption & $ASTX2_CONST.OPTION_AUTOFOCUS && $_astxu.setInputFocus();\n return this.resetE2E(a, b);\n },\n resetNonE2E: function (a, b) {\n return this.initNonE2E(a, b);\n },\n initNonE2E: function (a, b) {\n this.mE2EInst.setOption($ASTX2_CONST.OPTION_NONE2E);\n this.mOption & $ASTX2_CONST.OPTION_AUTOFOCUS && $_astxu.setInputFocus();\n return this.resetE2E(a, b);\n },\n uninitE2E: function () {\n 1 == $_astxu.isWinOS() && 1 == $ASTX2_COMM.isEnable() && this.mE2EInst.dettach();\n },\n uninitNonE2E: function () {\n this.uninitE2E();\n },\n set_cert: function (a, b, c, d) {\n null == d && (d = 1);\n var e = new String($_astxu.getnc(c['cert' + d]));\n if (0 == e.length) 0 < d ? a() : b();\n else {\n var f = this;\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/set_cert',\n data: { step: d, cert: e, pageid: $ASTX2_CONST.PAGEID },\n onSuccess: function (e) {\n setTimeout(function () {\n f.set_cert(a, b, c, d + 1);\n }, 250);\n },\n onFailure: function () {\n b();\n }\n });\n }\n },\n _e2edata_get: function (a, b, c, d) {\n var e = this;\n a = {\n ver: $_astxu.getint(d.ver),\n alg: $_astxu.getint(d.alg),\n svr: $_astxu.getnc(d.svr),\n norsa: $_astxu.getint(d.norsa),\n uniq: $_astxu.getnc(d.uniq),\n utime: $_astxu.getint(d.utime),\n ncert: $_astxu.getnc(d.ncert),\n pageid: $ASTX2_CONST.PAGEID,\n ids1: a.ids1,\n names1: a.names1,\n ids2: a.ids2,\n names2: a.names2\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/get_data',\n data: a,\n timeout: 1e4,\n onSuccess: function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d) ? b(a) : (e.setLastError($ASTX2_CONST.ERROR_NCK), c());\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n c();\n }\n });\n },\n _e2edata: function (a, b, c) {\n var d = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n onSuccess: function (e) {\n var f = $_astxu.jsonParse(e);\n e = $_astxu.getnc(f ? f.result : '');\n 0 == $_astxu.isACK(e)\n ? (d.setLastError($ASTX2_CONST.ERROR_NCK), c())\n : d.set_cert(\n function () {\n d._e2edata_get(a, b, c, f);\n },\n function () {\n d.setLastError($ASTX2_CONST.ERROR_NOCONNECT);\n c();\n },\n f\n );\n },\n onFailure: function (a) {\n d.setLastError($ASTX2_CONST.ERROR_FAILED);\n c();\n }\n });\n },\n getE2EData: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) c();\n else {\n var d = [],\n e = [],\n f = [],\n g = [];\n this.mE2EInst.getE2EelmsForm(a, d, e, 1);\n this.mE2EInst.getE2EelmsForm(a, f, g, 2);\n a = { ids1: d.join(','), names1: e.join(','), ids2: f.join(','), names2: g.join(',') };\n this._e2edata(a, b, c);\n }\n },\n getE2EDataRetry: function (a, b, c, d, e) {\n null == d && (d = 3);\n null == e && (e = 1e3);\n if (0 >= d) this.setLastError($ASTX2_CONST.ERROR_EXCESS), c();\n else {\n var f = this;\n this.getE2EData(\n a,\n function (a) {\n b(a);\n },\n function () {\n f.getLastError() == $ASTX2_CONST.ERROR_NOINIT\n ? window.setTimeout(function () {\n f.getE2EDataRetry(a, b, c, d - 1, e);\n }, e)\n : c();\n }\n );\n }\n },\n getE2EDataIDs: function (a, b, c) {\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n if (0 == this._e2e_enable()) c();\n else {\n null == a && (that.setLastError($ASTX2_CONST.ERROR_PARAM), c());\n var d = [],\n e = [],\n f = [],\n g = [];\n this.mE2EInst.getE2EelmsID(a, d, e, 1);\n this.mE2EInst.getE2EelmsID(a, f, g, 2);\n a = { ids1: d.join(','), names1: e.join(','), ids2: f.join(','), names2: g.join(',') };\n this._e2edata(a, b, c);\n }\n },\n setE2EData: function (a, b, c, d) {\n null == c && (c = !0);\n null == d && (d = '');\n var e = $_astxu.getnc(b.e2e_data1);\n 0 < e.length && ($_astxu.getCreatedFormValue(a, 'e2e_data1').value = e);\n b = $_astxu.getnc(b.e2e_data2);\n 0 < b.length && ($_astxu.getCreatedFormValue(a, 'e2e_data2').value = b);\n 1 == c && this.mE2EInst.resetE2Evalues($_astxu.getnc(a.name), d);\n },\n getE2EPageID: function () {\n return $ASTX2_CONST.PAGEID;\n },\n getE2EInputID: function (a) {\n a = this.mE2EInst.getE2Eattribute(a);\n return null == a ? null : a.e2e_inputid;\n },\n getE2EHash: function (a, b) {\n this.mE2EInst.getE2EHash(a, function (a, d) {\n b(a, d);\n });\n },\n getEncText: function (a, b, c) {\n this.mE2EInst.getEncText(a, b, function (a, b, f) {\n c(b, f);\n });\n },\n getE2EText: function (a, b) {\n this.mE2EInst.getE2EText(a, function (a, d, e) {\n b(d, e);\n });\n },\n getE2ETextS: function (a, b) {\n for (var c = 0, d = 0, e = [], f = 0; f < a.length; f++) {\n var g = a[f];\n null != g && ((g = g.getAttribute('e2e_type')), null != g && g == $ASTX2_CONST.E2ETYPE_PLAIN2 && c++);\n }\n if (0 == c || c != a.length) b(e, $ASTX2_CONST.ERROR_PARAM);\n else\n for (f = 0; f < a.length; f++)\n this.mE2EInst.getE2EText(a[f], function (a, f, g) {\n d >= c || (0 == g ? (e[a] = f) : (d = c), ++d >= c && b(e, g));\n });\n },\n setE2EText: function (a, b) {\n this.mE2EInst.setE2EText(a, b);\n },\n clearE2EText: function (a, b) {\n this.mE2EInst.clearE2EText(a, b);\n },\n clearE2EForm: function (a) {\n for (var b = document.getElementsByTagName('input'), c = 0; c < b.length; c++) {\n var d = b[c];\n null != d &&\n d.form.name == a &&\n 0 != ('text' == d.type || 'password' == d.type) &&\n null != d.getAttribute('e2e_type') &&\n this.mE2EInst.clearE2EText(d);\n }\n },\n addE2EObject: function (a, b) {\n null == b && (b = $ASTX2_CONST.E2ETYPE_CERT1);\n !a || ('text' != a.type && 'password' != a.type) || (a.setAttribute('e2e_type', b), this.mE2EInst.addObject(a));\n },\n subE2EObject: function (a) {\n a && this.mE2EInst.subObject(a);\n },\n setE2EAllExceptInputs: function () {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n null != c &&\n 0 != ('text' == c.type || 'password' == c.type) &&\n null == c.getAttribute('e2e_type') &&\n c.setAttribute('e2e_type', $ASTX2_CONST.E2ETYPE_NONE);\n }\n },\n killFocusE2EAllInputs: function () {\n for (var a = document.getElementsByTagName('input'), b = 0; b < a.length; b++) {\n var c = a[b];\n null != c && 0 != ('text' == c.type || 'password' == c.type) && 0 < c.getAttribute('e2e_type') && c.blur();\n }\n },\n _pclogdata_get: function (a, b, c, d) {\n var e = this;\n c = {\n ver: $_astxu.getint(c.ver),\n alg: $_astxu.getint(c.alg),\n svr: $_astxu.getnc(c.svr),\n norsa: $_astxu.getint(c.norsa),\n uniq: $_astxu.getnc(c.uniq),\n utime: $_astxu.getint(c.utime),\n nlog: $_astxu.getnc(c.nlog),\n ipaddr: $_astxu.getnc(c.ipaddr),\n s2c_alg: $_astxu.getnc(c.s2c_alg),\n s2c_key: $_astxu.getnc(c.s2c_key),\n s2c_salt: $_astxu.getnc(c.s2c_salt),\n browser: $ASTX2_CONST.BROWSER_VER,\n pageid: $ASTX2_CONST.PAGEID,\n opt: d\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/get_pclog',\n data: c,\n timeout: 1e4,\n onSuccess: function (c) {\n var d = $_astxu.getnc(c ? c.result : '');\n $_astxu.isACK(d) ? a(c) : (e.setLastError($ASTX2_CONST.ERROR_NCK), b());\n },\n onFailure: function () {\n e.setLastError($ASTX2_CONST.ERROR_FAILED);\n b();\n }\n });\n },\n _pclogdata: function (a, b, c) {\n var d = this;\n $_astxu.sendAuthAjax({\n url: $ASTX2_CUST.getURL($ASTX2_CUST.URL_GET_CERT),\n data: { pclog: 1, client_public_key: $ASTX2_COMM.mClientPublicKey },\n onSuccess: function (e) {\n var f = $_astxu.jsonParse(e);\n e = $_astxu.getnc(f ? f.result : '');\n 0 == $_astxu.isACK(e)\n ? (d.setLastError($ASTX2_CONST.ERROR_NCK), b())\n : d.set_cert(\n function () {\n d._pclogdata_get(a, b, f, c);\n },\n function () {\n d.setLastError($ASTX2_CONST.ERROR_NOCONNECT);\n b();\n },\n f\n );\n },\n onFailure: function (a) {\n d.setLastError($ASTX2_CONST.ERROR_FAILED);\n b();\n }\n });\n },\n getPCLOGData: function (a, b, c, d) {\n null == d && (d = '');\n this.setLastError($ASTX2_CONST.ERROR_SUCCESS);\n 0 == $ASTX2_COMM.isEnable() ? (this.setLastError($ASTX2_CONST.ERROR_NOINIT), c()) : this._pclogdata(b, c, d);\n },\n getPCLOGDataRetry: function (a, b, c, d, e) {\n null == d && (d = 3);\n null == e && (e = 1e3);\n if (0 >= d) this.setLastError($ASTX2_CONST.ERROR_EXCESS), c();\n else {\n var f = this;\n this.getPCLOGData(\n a,\n function (a) {\n b(a);\n },\n function () {\n f.getLastError() == $ASTX2_CONST.ERROR_NOINIT\n ? window.setTimeout(function () {\n f.getPCLOGDataRetry(a, b, c, d - 1, e);\n }, e)\n : c();\n }\n );\n }\n },\n setPCLOGData: function (a, b) {\n var c = $_astxu.getnc(b.pclog_data);\n 0 < c.length && ($_astxu.getCreatedFormValue(a, 'pclog_data').value = c);\n },\n isVmEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_vm_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.vm_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n isRemoteEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_remote_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.remote_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n isVmRemoteEnv: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? a(null, $ASTX2_CONST.ERROR_NOINIT)\n : (null == b && (b = ''),\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_vm_remote_env',\n data: { opts: b },\n onSuccess: function (b) {\n var d = $_astxu.getnc(b ? b.result : '');\n $_astxu.isACK(d) ? a(b.vm_remote_env, $ASTX2_CONST.ERROR_SUCCESS) : a(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n a(null, $ASTX2_CONST.ERROR_FAILED);\n }\n }));\n },\n checkService: function (a, b) {\n a == $ASTX2_CONST.SERVICE_AK && this.mE2EInst.checkService(b);\n },\n setProtect: function (a, b) {\n if (0 == $ASTX2_COMM.isEnable()) b && b($ASTX2_CONST.ERROR_NOINIT);\n else {\n var c = {\n customerid: $_astxu.getnc($ASTX2_CUST.mCustomerID),\n ak: a & $ASTX2_CONST.PROTECT_AK ? 1 : -1,\n fw: a & $ASTX2_CONST.PROTECT_FW ? 1 : -1,\n pb: a & $ASTX2_CONST.PROTECT_PB ? 1 : -1,\n pcs: a & $ASTX2_CONST.PROTECT_PCS ? 1 : -1\n };\n $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/set_protect',\n data: c,\n onSuccess: function (a) {\n a = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(a) ? b && b($ASTX2_CONST.ERROR_SUCCESS) : b && b($ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n b && b($ASTX2_CONST.ERROR_FAILED);\n }\n });\n }\n },\n isNotSupportOS: function (a, b) {\n 0 == $ASTX2_COMM.isEnable()\n ? b && b(null, $ASTX2_CONST.ERROR_NOINIT)\n : $_astxu.sendJsonp({\n url: $ASTX2_COMM.mLocalServerURL + '/is_not_support_os',\n data: {\n ak: a & $ASTX2_CONST.PROTECT_AK ? 1 : 0,\n fw: a & $ASTX2_CONST.PROTECT_FW ? 1 : 0,\n pb: a & $ASTX2_CONST.PROTECT_PB ? 1 : 0,\n pcs: a & $ASTX2_CONST.PROTECT_PCS ? 1 : 0\n },\n onSuccess: function (a) {\n var d = $_astxu.getnc(a ? a.result : '');\n $_astxu.isACK(d) ? b && b(a, $ASTX2_CONST.ERROR_SUCCESS) : b && b(null, $ASTX2_CONST.ERROR_NCK);\n },\n onFailure: function () {\n b && b(null, $ASTX2_CONST.ERROR_FAILED);\n }\n });\n },\n isAccessible: function (a, b, c, d, e) {\n null == e && (e = 750);\n if (a == $ASTX2_CONST.REQUEST_JSONP)\n $_astxu.sendJsonp({\n url: b,\n nocallback: !0,\n timeout: e,\n onSuccess: function () {\n c && c(b);\n },\n onFailure: function () {\n d && d(b);\n }\n });\n else {\n if (\n 0 != b.indexOf(window.location.protocol + '//' + window.location.host) &&\n 'IE' == $ASTX2_CONST.BROWSER_TYPE\n ) {\n if ('IE10' != $ASTX2_CONST.BROWSER_VER && 'IE11' != $ASTX2_CONST.BROWSER_VER) {\n d && d(b, 'CORS, not allowed browser');\n return;\n }\n if (0 != b.indexOf('http:') && 0 != b.indexOf('https:')) {\n d && d(b, 'CORS, not allowed protocol');\n return;\n }\n }\n $_astxu.sendAjax({\n url: b,\n type: 'GET',\n timeout: e,\n onSuccess: function (a) {\n c && c(b);\n },\n onFailure: function (a) {\n d && d(b, a);\n }\n });\n }\n },\n uninit: function () {\n this.uninitE2E();\n $ASTX2_COMM.uninit();\n },\n setLastError: function (a) {\n this.mLastError = a;\n },\n getLastError: function () {\n return this.mLastError;\n }\n };\n$ASTX2_MLi = {\n init: function () {\n setTimeout(function () {\n var a = { pageid: $ASTX2_CONST.PAGEID, focus: $_astxu.hasFocused() ? 1 : 0 };\n $_astxu.sendJsonp({ url: $ASTX2_COMM.mLocalServerURL + '/initForML', timeout: 1e3, data: a });\n }, 200);\n }\n};\n\nwindow.$ASTX2 = {\n ...$ASTX2,\n $ASTX2_COMM,\n $_astxu,\n $ASTX2_E2E,\n $ASTX2_MLi\n};\n\n/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 30833 $ */\nconst getSubdomain = (hostname) => {\n if (!hostname || hostname === 'localhost' || hostname === '127.0.0.1') {\n return '';\n }\n\n const parts = hostname.split('.');\n\n // \uCD5C\uC18C 3\uAC1C \uBD80\uBD84\uC774 \uC788\uC5B4\uC57C \uC11C\uBE0C\uB3C4\uBA54\uC778 \uC874\uC7AC (subdomain.domain.com)\n if (parts.length < 3) {\n return '';\n }\n\n // \uCCAB \uBC88\uC9F8 \uBD80\uBD84\uC774 \uC11C\uBE0C\uB3C4\uBA54\uC778\n return parts[0] ?? '';\n};\n\n/**\n * \uD638\uC2A4\uD2B8\uBA85\uC744 \uAE30\uBC18\uC73C\uB85C \uD658\uACBD\uC744 \uD310\uB2E8\uD569\uB2C8\uB2E4.\n * @param hostname \uD638\uC2A4\uD2B8\uBA85\n * @returns \uD658\uACBD \uAD6C\uBD84 \uBB38\uC790\uC5F4 ('local' | 'dev' | 'stg' | 'prd')\n */\nconst getEnvironmentFromHostname = (hostname) => {\n const subDomain = getSubdomain(hostname);\n\n // localhost \uD310\uB2E8\n if (hostname === 'localhost' || hostname === '127.0.0.1' || hostname.startsWith('localhost:')) {\n return 'local';\n }\n\n // dev \uD658\uACBD \uD310\uB2E8\n if (subDomain.includes(`dev`)) {\n return 'dev';\n }\n\n // stg \uD658\uACBD \uD310\uB2E8\n if (subDomain.includes('stg')) {\n return 'stg';\n }\n\n // \uAE30\uBCF8 \uC6B4\uC601\n return 'prd';\n};\n\nconst getServiceCode = () => {\n if (typeof window.isStorybookEnv === 'boolean') {\n return '';\n } else {\n return `/${location.pathname.split('/')[1]}`;\n }\n};\n";
1520
1531
  var astx2_custom_default = "/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision: 30833 $ */\r\n/* eslint-disable */\r\n\r\nlet $ASTX2_CUST = {\r\n // Customer option\r\n /*\r\n mUseJQuery: false, // Whether to use JQuery. \r\n mUseAjaxHello: false,\r\n mUseAutoStart: false, \r\n E2EFORM_TAIL: true,\r\n E2EFORM_INIT: '_e2e_forminit',\r\n E2EFORM_TAG1: '_e2e_1__',\r\n E2EFORM_TAG2: '_e2e_2__',\r\n E2EFORM_TAG1_PWD: '_e2e_1_pwd__',\r\n E2EFORM_TAG2_PWD: '_e2e_2_pwd__',\r\n */\r\n\r\n mCustomerID: null, // Customer ID for setProtect.\r\n\r\n // ASTX2_CUST defined values\r\n URL_GET_INIT: 101,\r\n URL_GET_CERT: 102,\r\n URL_GET_STAMP: 103,\r\n URL_CHK_STAMP: 104,\r\n\r\n setCustomerID(customerID) {\r\n if (customerID !== null && customerID !== 'undefined') {\r\n this.mCustomerID = customerID;\r\n }\r\n },\r\n\r\n getURL(type) {\r\n let result = '';\r\n const timestamp = new Date().getTime();\r\n\r\n switch (type) {\r\n case this.URL_GET_INIT:\r\n result = `${getServiceCode()}/api/dea/sltn/astx2/init/get`;\r\n break;\r\n case this.URL_GET_CERT:\r\n result = `${getServiceCode()}/api/dea/sltn/astx2/cert/get?v=${timestamp}`; // WAF \uCC28\uB2E8 \uBC29\uC9C0 (post \uC694\uCCAD \uC2DC \uAC12\uC774 \uC5C6\uB294 \uACBD\uC6B0 \uCC28\uB2E8)\r\n break;\r\n case this.URL_GET_STAMP:\r\n result = `${getServiceCode()}/api/dea/sltn/astx2/stamp/get`;\r\n break;\r\n case this.URL_CHK_STAMP:\r\n result = `${getServiceCode()}/api/dea/sltn/astx2/stamp-chk/post`;\r\n break;\r\n } // end of switch\r\n\r\n return result;\r\n },\r\n\r\n isE2EObject(obj) {\r\n return false;\r\n },\r\n\r\n getE2Etype(obj) {\r\n return null;\r\n },\r\n\r\n onCreatedFormValue(obj, obj_name) {},\r\n\r\n onHandlerPreFocus(obj, event) {},\r\n\r\n onHandlerKeyDown(obj, event) {\r\n return true;\r\n },\r\n\r\n getErrorMessage(errno) {\r\n let message = '[ASTx] ';\r\n\r\n switch (errno) {\r\n case $ASTX2_CONST.ERROR_FAILED:\r\n message += '\uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD558\uC600\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOINIT:\r\n message += '\uCD08\uAE30\uD654\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOTINST:\r\n message += '\uC124\uCE58\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOTSUPPORTED:\r\n message += '\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 OS\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NOCONNECT:\r\n message += '\uC11C\uBC84(Web) \uD1B5\uC2E0 \uC2E4\uD328\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NCK:\r\n message += '\uC11C\uBC84(Local) \uC751\uB2F5 \uC2E4\uD328\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_ERR:\r\n message += '\uC11C\uBC84(Local) \uB0B4\uBD80 \uC624\uB958\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NSP:\r\n message += '\uC9C0\uC6D0\uD558\uC9C0 \uB418\uC9C0 \uC54A\uB294 \uD658\uACBD\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_PARAM:\r\n message += '\uC798\uBABB\uB41C \uC778\uC790\uC785\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_EXCESS:\r\n message += '\uC7AC\uC2DC\uB3C4 \uD68C\uC218\uB97C \uCD08\uACFC \uD558\uC600\uC2B5\uB2C8\uB2E4.';\r\n break;\r\n case $ASTX2_CONST.ERROR_NEEDUPDATE:\r\n message += '\uC81C\uD488 \uC5C5\uB370\uC774\uD2B8\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.';\r\n break;\r\n default:\r\n message += `errno=${errno}`;\r\n break;\r\n } // end of switch\r\n\r\n return message;\r\n },\r\n\r\n errorAbort(errno) {\r\n alert(this.getErrorMessage(errno));\r\n }\r\n};\r\n";
1521
1532
  function addE2EObject(el, e2e_type) {
@@ -3083,6 +3094,7 @@ const useJobVehicleSearch = () => {
3083
3094
  rightPanelView,
3084
3095
  setRightPanelView,
3085
3096
  selectedJob,
3097
+ selectedJobDetail,
3086
3098
  JobSearch: JobSearchComponent,
3087
3099
  VehicleSearch: VehicleSearchComponent,
3088
3100
  riskGrade,
@@ -3102,7 +3114,8 @@ function useJobVehicleSearchModal() {
3102
3114
  VehicleSearch,
3103
3115
  riskGrade,
3104
3116
  hospitalizationGrade,
3105
- resetJobVehicleSearch
3117
+ resetJobVehicleSearch,
3118
+ selectedJobDetail
3106
3119
  } = useJobVehicleSearch();
3107
3120
  const { isOpen, openModal, closeModal } = useModalState();
3108
3121
  const validate = () => {
@@ -3133,6 +3146,7 @@ function useJobVehicleSearchModal() {
3133
3146
  };
3134
3147
  return {
3135
3148
  selectedJob,
3149
+ selectedJobDetail,
3136
3150
  selectedVehicle,
3137
3151
  riskGrade,
3138
3152
  hospitalizationGrade,
@@ -3744,45 +3758,55 @@ function useCamera({
3744
3758
  show,
3745
3759
  type = "multiple",
3746
3760
  buttonText,
3747
- initData
3761
+ initData,
3762
+ useNativeCamera = false
3748
3763
  } = {}) {
3749
3764
  const convertedInitData = initData?.map((data, index) => ({ ...data, id: String(index + 1) }));
3750
3765
  const [attachedPhotos, setAttachedPhotos] = useState(convertedInitData || []);
3751
3766
  const findImage = (imageId) => {
3752
3767
  return attachedPhotos.find((image) => image.id === imageId);
3753
3768
  };
3754
- const onClick = () => {
3755
- const input = document.createElement("input");
3756
- input.type = "file";
3757
- input.accept = "image/*";
3758
- if (cameraOnly) {
3759
- input.capture = "camera";
3769
+ const imageHandler = async (file) => {
3770
+ const newPhoto = {
3771
+ id: genImageId(),
3772
+ src: URL.createObjectURL(resizeOption ? await resize(file, resizeOption) : file),
3773
+ name: `\uC11C\uB958\uC0AC\uC9C4_${attachedPhotos.length + 1}`
3774
+ };
3775
+ if (type === "single") {
3776
+ setAttachedPhotos([newPhoto]);
3777
+ } else {
3778
+ setAttachedPhotos([...attachedPhotos, newPhoto]);
3760
3779
  }
3761
- input.addEventListener("change", async (event) => {
3762
- const target = event.target;
3763
- const { files } = target;
3764
- if (files && files.length > 0) {
3765
- const file = files[0];
3766
- if (file) {
3767
- const resizedFile = await resize(file, resizeOption);
3768
- const newPhoto = {
3769
- id: genImageId(),
3770
- src: URL.createObjectURL(resizedFile),
3771
- name: `\uC11C\uB958\uC0AC\uC9C4_${attachedPhotos.length + 1}`
3772
- };
3773
- if (type === "single") {
3774
- setAttachedPhotos([newPhoto]);
3775
- } else {
3776
- setAttachedPhotos([...attachedPhotos, newPhoto]);
3780
+ onChange && onChange(file);
3781
+ };
3782
+ const onClick = () => {
3783
+ if (useNativeCamera) {
3784
+ Bridge.native.documentCapture().then(async ({ uri }) => {
3785
+ const file = await imageUrlToFile(uri);
3786
+ await imageHandler(file);
3787
+ });
3788
+ } else {
3789
+ const input = document.createElement("input");
3790
+ input.type = "file";
3791
+ input.accept = "image/*";
3792
+ if (cameraOnly) {
3793
+ input.capture = "camera";
3794
+ }
3795
+ input.addEventListener("change", async (event) => {
3796
+ const target = event.target;
3797
+ const { files } = target;
3798
+ if (files && files.length > 0) {
3799
+ const file = files[0];
3800
+ if (file) {
3801
+ await imageHandler(file);
3777
3802
  }
3778
- onChange && onChange(file);
3779
3803
  }
3780
- }
3781
- document.body.removeChild(input);
3782
- });
3783
- input.style.display = "none";
3784
- document.body.appendChild(input);
3785
- input.click();
3804
+ document.body.removeChild(input);
3805
+ });
3806
+ input.style.display = "none";
3807
+ document.body.appendChild(input);
3808
+ input.click();
3809
+ }
3786
3810
  };
3787
3811
  const deleteImage = (imageId) => {
3788
3812
  const imageIndex = attachedPhotos.findIndex((image) => image.id === imageId);