pipwave-ekyc-uikit 1.2.0 → 1.3.0

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/pw-bundle.js CHANGED
@@ -3385,7 +3385,7 @@ eval("/*!\n * Pikaday\n *\n * Copyright © 2014 David Bushell | BSD & MIT licens
3385
3385
  \*********************************************************/
3386
3386
  /***/ ((module) => {
3387
3387
 
3388
- eval("!function(e,t){ true?module.exports=t():0}(self,(()=>(()=>{\"use strict\";var e={245:(e,t,n)=>{function r(e){this.message=e}n.r(t),n.d(t,{InvalidTokenError:()=>s,default:()=>a}),r.prototype=new Error,r.prototype.name=\"InvalidCharacterError\";var o=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,\"\");if(t.length%4==1)throw new r(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,i=0,s=0,a=\"\";o=t.charAt(s++);~o&&(n=i%4?64*n+o:o,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return a};function i(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=\"0\"+n),\"%\"+n})))}(t)}catch(e){return o(t)}}function s(e){this.message=e}s.prototype=new Error,s.prototype.name=\"InvalidTokenError\";const a=function(e,t){if(\"string\"!=typeof e)throw new s(\"Invalid token specified\");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(i(e.split(\".\")[n]))}catch(e){throw new s(\"Invalid token specified: \"+e.message)}}},607:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWSDK=void 0;const o=r(n(245)),i=r(n(207)),s=n(284),a=n(860),c=n(882);class u{constructor(){this._countries=[],this._issuingCountries=[],this.init=s.PWAUTHSDK.prototype.init,this.fetchStates=a.PWCOMMONSDK.prototype.fetchStates,this.viewIpCountry=a.PWCOMMONSDK.prototype.viewIpCountry,this.fetchCountries=a.PWCOMMONSDK.prototype.fetchCountries,this.fetchIssuingCountries=a.PWCOMMONSDK.prototype.fetchIssuingCountries,this.viewDefaultCountry=a.PWCOMMONSDK.prototype.viewDefaultCountry,this.uploadDoc=c.PWPROOFSDK.prototype.uploadDoc,this.uploadSelfie=c.PWPROOFSDK.prototype.uploadSelfie,this.viewResult=c.PWPROOFSDK.prototype.viewResult,this.updateForm=c.PWPROOFSDK.prototype.updateForm}get ipCountry(){return this._ipCountry}get countries(){return this._countries}get issuingCountries(){return this._issuingCountries}get defaultCountry(){return this._defaultCountry}get merchantDetail(){return this._merchantDetail}get tokenDetails(){const e=i.default.getAccessToken();return e?(0,o.default)(e):{}}get sessionId(){return this.tokenDetails.sessionId||\"\"}get verificationTypes(){return this.tokenDetails.verificationTypes||[]}}t.PWSDK=u,t.default={PWSDK:u}},207:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.instance=void 0;const i=o(n(218)),s=n(249);t.instance={};let a=\"\",c=Object.freeze(new class{getAccessToken(){return a}create(e,n){if(a=n,!t.instance||Object.keys(t.instance).length)return t.instance.defaults.headers.common.Authorization=n;t.instance=i.default.create({baseURL:e||\"https://staging-open-api.pipwave.com\",headers:{common:{Authorization:n}}}),t.instance.interceptors.request.use((function(e){return e}),this.onResponseError),t.instance.interceptors.response.use(void 0,this.onResponseError)}onResponseError(e){return r(this,void 0,void 0,(function*(){const t=(0,s.constructAxiosError)(e);return Promise.reject(t)}))}});t.default=c},599:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ERROR_TYPE=t.ERROR_MESSAGE=t.INVALID_ARGUMENT_FORMAT=t.INVALID_ARGUMENT_LENGTH=t.INVALID_ARGUMENTS=t.ATTEMPT_EXCEEDED=t.CODE_BAD_REQ=t.CODE_LIMIT_EXCEED=t.CODE_ACCESS_DENIED=t.CODE_VALIDATION_ERROR=t.CODE_MISSING_PARAM=t.CODE_IMG_EXPOSED_3=t.CODE_IMG_EXPOSED_2=t.CODE_IMG_EXPOSED_1=t.CODE_DOC_NOT_POSITIONED=t.CODE_DOC_IMG_UNSIMILAR=t.CODE_DOC_BLUR=t.CODE_DOC_EMPTY=t.CODE_DOC_UNPAIR=t.CODE_DOC_TYPE_INVALID=t.CODE_MAX_SESSION_ATTEMPT=t.CODE_MAX_DOC_ATTEMPT=t.CODE_MAX_SELFIE_ATTEMPT=t.CODE_ISSUING_COUNTRY_INVALID=t.CODE_VERIFICATION_TYPE_INVALID=t.CODE_SESSION_EXPIRED=t.API_MODULE=t.REQUEST_ERROR_NAME=t.ERROR_NAME=void 0,t.ERROR_NAME=\"PwError\",t.REQUEST_ERROR_NAME=\"PwReqError\",t.API_MODULE=\"openApi\",t.CODE_SESSION_EXPIRED=14003,t.CODE_VERIFICATION_TYPE_INVALID=14002,t.CODE_ISSUING_COUNTRY_INVALID=12015,t.CODE_MAX_SELFIE_ATTEMPT=14019,t.CODE_MAX_DOC_ATTEMPT=14020,t.CODE_MAX_SESSION_ATTEMPT=14021,t.CODE_DOC_TYPE_INVALID=12002,t.CODE_DOC_UNPAIR=12006,t.CODE_DOC_EMPTY=12014,t.CODE_DOC_BLUR=12010,t.CODE_DOC_IMG_UNSIMILAR=12013,t.CODE_DOC_NOT_POSITIONED=12009,t.CODE_IMG_EXPOSED_1=11008,t.CODE_IMG_EXPOSED_2=11010,t.CODE_IMG_EXPOSED_3=12012,t.CODE_MISSING_PARAM=4001,t.CODE_VALIDATION_ERROR=4002,t.CODE_ACCESS_DENIED=4031,t.CODE_LIMIT_EXCEED=4291,t.CODE_BAD_REQ=4003,t.ATTEMPT_EXCEEDED=\"ATTEMPT_EXCEEDED\",t.INVALID_ARGUMENTS=\"INVALID_ARGUMENTS\",t.INVALID_ARGUMENT_LENGTH=\"INVALID_ARGUMENT_LENGTH\",t.INVALID_ARGUMENT_FORMAT=\"INVALID_ARGUMENT_FORMAT\",t.ERROR_MESSAGE={[t.ATTEMPT_EXCEEDED]:\"Maximum attempt exceeded\",[t.INVALID_ARGUMENTS]:\"Invalid arguments\",[t.INVALID_ARGUMENT_LENGTH]:\"Invalid length for argument\",[t.INVALID_ARGUMENT_FORMAT]:\"Invalid format for argument\",[t.CODE_SESSION_EXPIRED]:\"Token expired\"},t.ERROR_TYPE={[t.ATTEMPT_EXCEEDED]:\"attempt-exceeded\",[t.INVALID_ARGUMENTS]:\"invalid-arguments\",[t.INVALID_ARGUMENT_LENGTH]:\"invalid-argument-length\",[t.INVALID_ARGUMENT_FORMAT]:\"invalid-argument-format\",[t.CODE_SESSION_EXPIRED]:\"session-id-expired\",[t.CODE_VERIFICATION_TYPE_INVALID]:\"verification-type-invalid\",[t.CODE_ISSUING_COUNTRY_INVALID]:\"issuing-country-invalid\",[t.CODE_MAX_SELFIE_ATTEMPT]:\"max-selfie-attempt\",[t.CODE_MAX_DOC_ATTEMPT]:\"max-doc-attempt\",[t.CODE_MAX_SESSION_ATTEMPT]:\"max-session-attempt\",[t.CODE_DOC_TYPE_INVALID]:\"doc-type-invalid\",[t.CODE_DOC_UNPAIR]:\"doc-unpair\",[t.CODE_DOC_EMPTY]:\"doc-empty\",[t.CODE_DOC_BLUR]:\"doc-blur\",[t.CODE_DOC_IMG_UNSIMILAR]:\"doc-front-back-img-unsimilar\",[t.CODE_DOC_NOT_POSITIONED]:\"doc-not-positioned-proper\",[t.CODE_IMG_EXPOSED_1]:\"img-exposed\",[t.CODE_IMG_EXPOSED_2]:\"img-exposed\",[t.CODE_IMG_EXPOSED_3]:\"img-exposed\",[t.CODE_MISSING_PARAM]:\"missing-param\",[t.CODE_VALIDATION_ERROR]:\"validation-error\",[t.CODE_ACCESS_DENIED]:\"access-denied\",[t.CODE_LIMIT_EXCEED]:\"limit-exceed\",[t.CODE_BAD_REQ]:\"bad-request\"}},249:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.validateList=t.validateRegex=t.validateLength=t.validateParam=t.validateParams=t.constructAxiosError=void 0;const r=n(145),o=n(599);t.constructAxiosError=e=>{let t=new r.PwReqError;const{code:n,message:i,config:s,request:a,response:c}=e;if(t.status=null==c?void 0:c.status,t.statusText=n,t.message=i,t.config=s,t.request=a,t.response=c,null==c?void 0:c.data){const{code:e,messages:n=[],Message:r=\"\"}=c.data;if(r&&(t.message=r),n.length){const{code:r,text:i}=n[0];t.code=r||e||void 0,i&&(t.message=i);const s=t.code&&o.ERROR_TYPE[t.code];t.type=s?`${o.API_MODULE}/${s}`:\"unknown\"}}return t},t.validateParams=function(e,n,r){const o=Object.keys(n);for(const i of o){const o=!!r&&r.includes(i);(0,t.validateParam)(i,e[i],n[i],o)}return!0},t.validateParam=(e,t,n,i)=>{const s=null!==t&&(\"array\"===n?Array.isArray(t):typeof t===n&&!Array.isArray(t));if(!i&&(void 0===t||s))return!0;if(s&&\"object\"===n&&Object.keys(t).length>0)return!0;if(s&&\"array\"===n&&t.length>0)return!0;if(s&&\"string\"===n&&t)return!0;const a=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENTS]}: ${e}`);throw a.type=o.ERROR_TYPE[o.INVALID_ARGUMENTS],a},t.validateLength=(e,t,n,i,s)=>{if(void 0===t)return!0;const a=\"string\"==typeof t?t.length:t.toString().length,c=new r.PwError;if(c.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_LENGTH],c.message=`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_LENGTH]}: ${e} `,n&&a!==n)throw c.message+=`must have exactly length ${n}`,c;if(i&&s&&(a<i||a>s))throw c.message+=`must be between ${i} and ${s} characters in length`,c;if(i&&a<i)throw c.message+=`must be at least ${i} characters in length`,c;if(s&&a>s)throw c.message+=`must not exceed ${s} characters in length`,c;return!0},t.validateRegex=(e,t,n,i)=>{if(i.test(t))return!0;const s=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_FORMAT]}: ${e} ${n} `);throw s.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_FORMAT],s},t.validateList=(e,t,n)=>{if(n.includes(t))return;const i=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_FORMAT]}: ${e} ${n} `);throw i.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_FORMAT],i}},145:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.PwReqError=t.PwError=void 0;const r=n(599);class o extends Error{constructor(e){super(e),this.name=r.ERROR_NAME}}t.PwError=o,t.PwReqError=class extends o{constructor(e){super(e),this.name=r.REQUEST_ERROR_NAME}}},531:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.VIEW_MERCHANT=t.CREATE_SESSION=void 0;const r=n(207);t.CREATE_SESSION=(e,t)=>r.instance.post(\"ekyc/session\",e,{headers:t}),t.VIEW_MERCHANT=e=>r.instance.get(`merchant/${e}`)},219:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.isExpired=void 0,t.isExpired=e=>!e||e<Math.floor(Date.now()/1e3)},284:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWAUTHSDK=void 0;const i=o(n(245)),s=o(n(207)),a=n(249),c=n(599),u=n(145),l=n(531),d=n(219);t.PWAUTHSDK=class{constructor(){this.fetchCountries=()=>r(this,void 0,void 0,(function*(){return[]})),this.fetchIssuingCountries=()=>r(this,void 0,void 0,(function*(){return[]})),this.viewDefaultCountry=()=>r(this,void 0,void 0,(function*(){return{}}))}get tokenDetails(){return{}}get sessionId(){return\"\"}init(e){return r(this,void 0,void 0,(function*(){(0,a.validateParam)(\"accessToken\",e,\"string\",!0);const{verificationTypes:t,sessionId:n,exp:r,sub:o,aud:E,merchantId:f}=(0,i.default)(e);if((0,d.isExpired)(r)){const e=new u.PwError(c.ERROR_MESSAGE[c.CODE_SESSION_EXPIRED]);throw e.type=c.ERROR_TYPE[c.CODE_SESSION_EXPIRED],e}s.default.create(E,e);const A=yield(0,l.VIEW_MERCHANT)(f),{payload:_}=A.data;return this._merchantDetail=_,yield this.fetchCountries(),yield this.fetchIssuingCountries(),yield this.viewDefaultCountry(),{verification_types:t,session_id:n,expired_at:r,user_id:o}}))}}},99:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.FETCH_STATES=t.FETCH_COUNTRIES=t.VIEW_IP_COUNTRY=void 0;const r=n(207);t.VIEW_IP_COUNTRY=()=>r.instance.get(\"locale/ip_info\"),t.FETCH_COUNTRIES=()=>r.instance.get(\"locale/country\"),t.FETCH_STATES=e=>r.instance.get(\"locale/states\",{params:e})},909:(e,t)=>{var n,r,o;Object.defineProperty(t,\"__esModule\",{value:!0}),t.GENDER=t.COUNTRY_ISO=t.LANGUAGE=void 0,function(e){e.EN=\"en\",e.ID=\"id\",e.CN=\"zh-CN\"}(n||(t.LANGUAGE=n={})),function(e){e.AFGHANISTAN=\"AF\",e[\"ÅLAND_ISLANDS\"]=\"AX\",e.ALBANIA=\"AL\",e.ALGERIA=\"DZ\",e.AMERICAN_SAMOA=\"AS\",e.ANDORRA=\"AD\",e.ANGOLA=\"AO\",e.ANGUILLA=\"AI\",e.ANTARCTICA=\"AQ\",e.ANTIGUA_AND_BARBUDA=\"AG\",e.ARGENTINA=\"AR\",e.ARMENIA=\"AM\",e.ARUBA=\"AW\",e.AUSTRALIA=\"AU\",e.AUSTRIA=\"AT\",e.AZERBAIJAN=\"AZ\",e.BAHAMAS=\"BS\",e.BAHRAIN=\"BH\",e.BANGLADESH=\"BD\",e.BARBADOS=\"BB\",e.BELARUS=\"BY\",e.BELGIUM=\"BE\",e.BELIZE=\"BZ\",e.BENIN=\"BJ\",e.BERMUDA=\"BM\",e.BHUTAN=\"BT\",e.BOLIVIA=\"BO\",e.BONAIRE_SINT_EUSTATIUS_AND_SABA=\"BQ\",e.BOSNIA_AND_HERZEGOVINA=\"BA\",e.BOTSWANA=\"BW\",e.BOUVET_ISLAND=\"BV\",e.BRAZIL=\"BR\",e.BRITISH_INDIAN_OCEAN_TERRITORY=\"IO\",e.BRUNEI_DARUSSALAM=\"BN\",e.BULGARIA=\"BG\",e.BURKINA_FASO=\"BF\",e.BURUNDI=\"BI\",e.CABO_VERDE=\"CV\",e.CAMBODIA=\"KH\",e.CAMEROON=\"CM\",e.CANADA=\"CA\",e.CAYMAN_ISLANDS=\"KY\",e.CENTRAL_AFRICAN_REPUBLIC=\"CF\",e.CHAD=\"TD\",e.CHILE=\"CL\",e.CHINA=\"CN\",e.CHRISTMAS_ISLAND=\"CX\",e.COCOS_KEELING_ISLANDS=\"CC\",e.COLOMBIA=\"CO\",e.COMOROS=\"KM\",e.CONGO=\"CG\",e.COOK_ISLANDS=\"CK\",e.COSTA_RICA=\"CR\",e[\"CÔTE_D_IVOIRE\"]=\"CI\",e.CROATIA=\"HR\",e[\"CURAÇAO\"]=\"CW\",e.CYPRUS=\"CY\",e.CZECHIA=\"CZ\",e.DENMARK=\"DK\",e.DJIBOUTI=\"DJ\",e.DOMINICA=\"DM\",e.DOMINICAN_REPUBLIC=\"DO\",e.ECUADOR=\"EC\",e.EGYPT=\"EG\",e.EL_SALVADOR=\"SV\",e.EQUATORIAL_GUINEA=\"GQ\",e.ERITREA=\"ER\",e.ESTONIA=\"EE\",e.ESWATINI=\"SZ\",e.ETHIOPIA=\"ET\",e.FALKLAND_ISLANDS_MALVINAS=\"FK\",e.FAROE_ISLANDS=\"FO\",e.FIJI=\"FJ\",e.FINLAND=\"FI\",e.FRANCE=\"FR\",e.FRENCH_GUIANA=\"GF\",e.FRENCH_POLYNESIA=\"PF\",e.FRENCH_SOUTHERN_TERRITORIES=\"TF\",e.GABON=\"GA\",e.GAMBIA=\"GM\",e.GEORGIA=\"GE\",e.GERMANY=\"DE\",e.GHANA=\"GH\",e.GIBRALTAR=\"GI\",e.GREECE=\"GR\",e.GREENLAND=\"GL\",e.GRENADA=\"GD\",e.GUADELOUPE=\"GP\",e.GUAM=\"GU\",e.GUATEMALA=\"GT\",e.GUERNSEY=\"GG\",e.GUINEA=\"GN\",e.GUINEA_BISSAU=\"GW\",e.GUYANA=\"GY\",e.HAITI=\"HT\",e.HEARD_ISLAND_AND_MCDONALD_ISLANDS=\"HM\",e.HOLY_SEE=\"VA\",e.HONDURAS=\"HN\",e.HONG_KONG=\"HK\",e.HUNGARY=\"HU\",e.ICELAND=\"IS\",e.INDIA=\"IN\",e.INDONESIA=\"ID\",e.IRAQ=\"IQ\",e.IRELAND=\"IE\",e.ISLE_OF_MAN=\"IM\",e.ISRAEL=\"IL\",e.ITALY=\"IT\",e.JAMAICA=\"JM\",e.JAPAN=\"JP\",e.JERSEY=\"JE\",e.JORDAN=\"JO\",e.KAZAKHSTAN=\"KZ\",e.KENYA=\"KE\",e.KIRIBATI=\"KI\",e.KOREA_REPUBLIC_OF=\"KR\",e.KUWAIT=\"KW\",e.KYRGYZSTAN=\"KG\",e.LAO_PEOPLE_S_DEMOCRATIC_REPUBLIC=\"LA\",e.LATVIA=\"LV\",e.LEBANON=\"LB\",e.LESOTHO=\"LS\",e.LIBERIA=\"LR\",e.LIECHTENSTEIN=\"LI\",e.LITHUANIA=\"LT\",e.LUXEMBOURG=\"LU\",e.MACAO=\"MO\",e.MADAGASCAR=\"MG\",e.MALAWI=\"MW\",e.MALAYSIA=\"MY\",e.MALDIVES=\"MV\",e.MALI=\"ML\",e.MALTA=\"MT\",e.MARSHALL_ISLANDS=\"MH\",e.MARTINIQUE=\"MQ\",e.MAURITANIA=\"MR\",e.MAURITIUS=\"MU\",e.MAYOTTE=\"YT\",e.MEXICO=\"MX\",e.MICRONESIA_FEDERATED_STATES_OF=\"FM\",e.FRANCE_METROPOLITAN=\"FX\",e.MOLDOVA_REPUBLIC_OF=\"MD\",e.MONACO=\"MC\",e.MONGOLIA=\"MN\",e.MONTENEGRO=\"ME\",e.MONTSERRAT=\"MS\",e.MOROCCO=\"MA\",e.MOZAMBIQUE=\"MZ\",e.MYANMAR=\"MM\",e.NAMIBIA=\"NA\",e.NAURU=\"NR\",e.NEPAL=\"NP\",e.NETHERLANDS=\"NL\",e.NEW_CALEDONIA=\"NC\",e.NEW_ZEALAND=\"NZ\",e.NICARAGUA=\"NI\",e.NIGER=\"NE\",e.NIGERIA=\"NG\",e.NIUE=\"NU\",e.NORFOLK_ISLAND=\"NF\",e.NORTH_MACEDONIA=\"MK\",e.NORTHERN_MARIANA_ISLANDS=\"MP\",e.NORWAY=\"NO\",e.OMAN=\"OM\",e.PAKISTAN=\"PK\",e.PALAU=\"PW\",e.PALESTINE_STATE_OF=\"PS\",e.PANAMA=\"PA\",e.PAPUA_NEW_GUINEA=\"PG\",e.PARAGUAY=\"PY\",e.PERU=\"PE\",e.PHILIPPINES=\"PH\",e.PITCAIRN=\"PN\",e.POLAND=\"PL\",e.PORTUGAL=\"PT\",e.PUERTO_RICO=\"PR\",e.QATAR=\"QA\",e[\"RÉUNION\"]=\"RE\",e.ROMANIA=\"RO\",e.RUSSIAN_FEDERATION=\"RU\",e.RWANDA=\"RW\",e[\"SAINT_BARTHÉLEMY\"]=\"BL\",e.SAINT_HELENA_ASCENSION_AND_TRISTAN_DA_CUNHA=\"SH\",e.SAINT_KITTS_AND_NEVIS=\"KN\",e.SAINT_LUCIA=\"LC\",e.SAINT_MARTIN_FRENCH_PART=\"MF\",e.SAINT_PIERRE_AND_MIQUELON=\"PM\",e.SAINT_VINCENT_AND_THE_GRENADINES=\"VC\",e.SAMOA=\"WS\",e.SAN_MARINO=\"SM\",e.SAO_TOME_AND_PRINCIPE=\"ST\",e.SAUDI_ARABIA=\"SA\",e.SENEGAL=\"SN\",e.SERBIA=\"RS\",e.SEYCHELLES=\"SC\",e.SIERRA_LEONE=\"SL\",e.SINGAPORE=\"SG\",e.SINT_MAARTEN_DUTCH_PART=\"SX\",e.SLOVAKIA=\"SK\",e.SLOVENIA=\"SI\",e.SOLOMON_ISLANDS=\"SB\",e.SOUTH_AFRICA=\"ZA\",e.SOUTH_GEORGIA_AND_THE_SOUTH_SANDWICH_ISLANDS=\"GS\",e.SPAIN=\"ES\",e.SRI_LANKA=\"LK\",e.SURINAME=\"SR\",e.SVALBARD_AND_JAN_MAYEN=\"SJ\",e.SWEDEN=\"SE\",e.SWITZERLAND=\"CH\",e.TAIWAN_PROVINCE_OF_CHINA=\"TW\",e.TAJIKISTAN=\"TJ\",e.TANZANIA_UNITED_REPUBLIC_OF=\"TZ\",e.THAILAND=\"TH\",e.TIMOR_LESTE=\"TL\",e.TOGO=\"TG\",e.TOKELAU=\"TK\",e.TONGA=\"TO\",e.TRINIDAD_AND_TOBAGO=\"TT\",e.TUNISIA=\"TN\",e.TURKEY=\"TR\",e.TURKMENISTAN=\"TM\",e.TURKS_AND_CAICOS_ISLANDS=\"TC\",e.TUVALU=\"TV\",e.UGANDA=\"UG\",e.UKRAINE=\"UA\",e.UNITED_ARAB_EMIRATES=\"AE\",e.UNITED_KINGDOM_OF_GREAT_BRITAIN_AND_NORTHERN_IRELAND=\"GB\",e.UNITED_STATES_OF_AMERICA=\"US\",e.UNITED_STATES_MINOR_OUTLYING_ISLANDS=\"UM\",e.URUGUAY=\"UY\",e.UZBEKISTAN=\"UZ\",e.VANUATU=\"VU\",e.VENEZUELA_BOLIVARIAN_REPUBLIC_OF=\"VE\",e.VIET_NAM=\"VN\",e.VIRGIN_ISLANDS_BRITISH=\"VG\",e.VIRGIN_ISLANDS_U_S=\"VI\",e.WALLIS_AND_FUTUNA=\"WF\",e.WESTERN_SAHARA=\"EH\",e.REPUBLIC_OF_KOSOVO=\"XK\",e.ZAMBIA=\"ZM\",e.ZIMBABWE=\"ZW\"}(r||(t.COUNTRY_ISO=r={})),function(e){e.F=\"FEMALE\",e.M=\"MALE\"}(o||(t.GENDER=o={}))},860:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWCOMMONSDK=void 0;const o=n(249),i=n(99);t.PWCOMMONSDK=class{constructor(){this._countries=[],this._issuingCountries=[]}get tokenDetails(){return{}}viewIpCountry(){return r(this,void 0,void 0,(function*(){if(this._ipCountry)return this._ipCountry;const e=yield(0,i.VIEW_IP_COUNTRY)(),{payload:t}=e.data;return this._ipCountry=t,t}))}fetchStates(e){return r(this,void 0,void 0,(function*(){(0,o.validateParam)(\"country\",e,\"string\",!0);const t=yield(0,i.FETCH_STATES)({country:e}),{payload:n}=t.data,{results:r}=n;return Object.entries(r).map((([e,t])=>({iso_code:e,name:t})))}))}fetchCountries(){return r(this,void 0,void 0,(function*(){if(this._countries.length)return this._countries;const e=yield(0,i.FETCH_COUNTRIES)(),{payload:t}=e.data;return this._countries=t.results.map((e=>({iso_code:e.country.toUpperCase(),name:e.country_name}))),this._countries}))}fetchIssuingCountries(){return r(this,void 0,void 0,(function*(){let e=yield this.fetchCountries();const t=e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.iso_code]:t})),{}),{supportedCountries:n=[],excludedCountries:r=[]}=this.tokenDetails;if(n&&n.length)e=n.map((e=>t[e]));else if(r&&r.length){const t=r.map((e=>e));e=e.filter((e=>!t.includes(e.iso_code)))}return this._issuingCountries=e,this._issuingCountries}))}viewDefaultCountry(){return r(this,void 0,void 0,(function*(){const e=yield this.viewIpCountry(),t=yield this.fetchIssuingCountries();let{country:n}=this.tokenDetails,r=null;if(n){const e=t.find((e=>e.iso_code===n));e&&(r=e)}if(!r&&(null==e?void 0:e.country)){const n=t.find((t=>t.iso_code===(null==e?void 0:e.country)));n&&(r=n)}return!r&&t.length>0&&(r=t[0]),this._defaultCountry=r||{},this._defaultCountry}))}}},639:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.VIEW_RESULT=t.UPDATE_FORM=t.UPLOAD_SELFIE=t.UPLOAD_DOC=void 0;const r=n(207);t.UPLOAD_DOC=(e,t)=>r.instance.post(`/ekyc/session/${e}/doc`,t),t.UPLOAD_SELFIE=(e,t)=>r.instance.post(`/ekyc/session/${e}/selfie`,t),t.UPDATE_FORM=(e,t)=>r.instance.put(`/ekyc/session/${e}/feedback`,t),t.VIEW_RESULT=e=>r.instance.get(`/ekyc/session/${e}/check`)},746:(e,t)=>{var n,r,o;Object.defineProperty(t,\"__esModule\",{value:!0}),t.VERIFICATION_STATUS=t.AI_DOC_TYPE=t.DOC_TYPE=void 0,function(e){e.PASSPORT=\"passport\",e.NATIONAL_ID=\"national_identity_document\",e.LICENSE=\"driving_license\"}(n||(t.DOC_TYPE=n={})),function(e){e.PASSPORT=\"passport\",e.ID=\"identity_document\",e.LICENSE=\"driving_license\"}(r||(t.AI_DOC_TYPE=r={})),function(e){e.PENDING=\"pending\",e.APPROVED=\"approved\",e.REJECTED=\"rejected\",e.REVIEW=\"review\"}(o||(t.VERIFICATION_STATUS=o={}))},602:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.viewResult=void 0;const o=n(145),i=n(599),s=n(639),a=n(746);t.viewResult=(e,n=1)=>r(void 0,void 0,void 0,(function*(){const r=yield(0,s.VIEW_RESULT)(e),{payload:c}=r.data,{status:u=\"\"}=c;if(u===a.VERIFICATION_STATUS.PENDING){if(n<5)return yield new Promise((e=>setTimeout(e,3e3))),yield(0,t.viewResult)(e,n+1);const r=new o.PwReqError;return r.type=`${i.API_MODULE}/${i.ERROR_TYPE[i.ATTEMPT_EXCEEDED]}`,r.message=`${i.ERROR_MESSAGE[i.ATTEMPT_EXCEEDED]}: 5\"}`,Promise.reject(r)}{const{status:e,is_retriable:t,identity_document:n,selfie:r}=c,o={status:e,is_retriable:t,id_status:null==n?void 0:n.system_status,selfie_status:null==r?void 0:r.system_status},i=null==n?void 0:n.system_result;if(!i)return o;const{name:s,id_result:u,doc_type:l,filepaths:d}=i;if(!u)return o;const E=l===a.AI_DOC_TYPE.ID?a.DOC_TYPE.NATIONAL_ID:l,{full_name:f,given_name:A,surname:_}=s,{nationality:h=\"\",id_number:p=\"\",date_of_birth:O=\"\",gender:I=\"\",address:R}=u;let N={nationality:h,id_number:p,date_of_birth:O};f?N.full_name=f||\"\":A||_?(N.given_name=A||\"\",N.surname=_||\"\"):N.full_name=f||\"\",N.gender=I&&\"N/A\"!==I?I:\"\";const S={state_iso:\"\",state_name:\"\",country_iso2:\"\",country_name:\"\",city:\"\",line1:\"\",zip:\"\"};if(R){for(const[e,t]of Object.entries(S))S[e]=R[e]||t;N=Object.assign(Object.assign({},N),S)}return Object.assign(Object.assign({},o),{result:N,id_type:E,filepaths:d})}}))},882:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWPROOFSDK=void 0;const o=n(249),i=n(602),s=n(639),a=n(909);t.PWPROOFSDK=class{get sessionId(){return\"\"}uploadDoc(e){return r(this,void 0,void 0,(function*(){const t=e.front_doc_uri?\"front_doc_uri\":\"front_doc_base64\";(0,o.validateParams)(e,{front_doc_uri:\"string\",front_doc_uri_full:\"string\",back_doc_uri:\"string\",back_doc_uri_full:\"string\",front_doc_base64:\"string\",front_doc_base64_full:\"string\",back_doc_base64:\"string\",back_doc_base64_full:\"string\",doc_type:\"string\",issuing_country:\"string\"},[t,\"doc_type\",\"issuing_country\"]);const n=yield(0,s.UPLOAD_DOC)(this.sessionId,e),{payload:r}=n.data;return r}))}uploadSelfie(e){return r(this,void 0,void 0,(function*(){const t=e.selfie_uri?\"selfie_uri\":\"selfie_base64\";(0,o.validateParams)(e,{selfie_uri:\"string\",selfie_uri_full:\"string\",selfie_base64:\"string\",selfie_base64_full:\"string\",liveness_score:\"number\"},[t]);const{liveness_score:n}=e,r=Object.assign(Object.assign({},e),n&&{metadata:{facial_liveness_score:n.toString()}}),i=yield(0,s.UPLOAD_SELFIE)(this.sessionId,r),{payload:a}=i.data;return a}))}viewResult(){return r(this,void 0,void 0,(function*(){return yield(0,i.viewResult)(this.sessionId)}))}updateForm(e){return r(this,void 0,void 0,(function*(){let t=[\"id_number\",\"date_of_birth\",\"line1\",\"city\",\"zip\",\"state_iso\",\"country_iso2\"];if(e.given_name||e.surname?(t.push(\"surname\"),t.push(\"given_name\")):t.push(\"full_name\"),(0,o.validateParams)(e,{full_name:\"string\",given_name:\"string\",surname:\"string\",id_number:\"string\",date_of_birth:\"string\",gender:\"string\",line1:\"string\",city:\"string\",zip:\"string\",state_iso:\"string\",country_iso2:\"string\"},t),(0,o.validateLength)(\"full_name\",e.full_name,0,1,160),(0,o.validateLength)(\"given_name\",e.given_name,0,1,70),(0,o.validateLength)(\"surname\",e.surname,0,1,70),(0,o.validateLength)(\"id_number\",e.id_number,0,1,40),(0,o.validateLength)(\"date_of_birth\",e.date_of_birth,0,1,10),(0,o.validateLength)(\"line1\",e.line1,0,1,350),(0,o.validateLength)(\"city\",e.city,0,1,70),(0,o.validateLength)(\"state_iso\",e.state_iso,0,1,9),(0,o.validateLength)(\"address\",e.zip,0,1,40),(0,o.validateLength)(\"country_iso2\",e.country_iso2,2),e.date_of_birth){const t=/^\\d{4}-\\d{2}-\\d{2}$/;(0,o.validateRegex)(\"date_of_birth\",e.date_of_birth,\"YYYY-MM-DD\",t)}if(e.gender){const t=Object.values(a.GENDER);(0,o.validateList)(\"gender\",e.gender,t)}const n=yield(0,s.UPDATE_FORM)(this.sessionId,{feedback_params:e}),{payload:r}=n.data;return r}))}}},218:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,d=u(\"undefined\"),E=c(\"ArrayBuffer\"),f=u(\"string\"),A=u(\"function\"),_=u(\"number\"),h=e=>null!==e&&\"object\"==typeof e,p=e=>{if(\"object\"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},O=c(\"Date\"),I=c(\"File\"),R=c(\"Blob\"),N=c(\"FileList\"),S=c(\"URLSearchParams\");function T(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if(\"object\"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function D(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const m=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:n.g,C=e=>!d(e)&&e!==m,y=(g=\"undefined\"!=typeof Uint8Array&&i(Uint8Array),e=>g&&e instanceof g);var g;const P=c(\"HTMLFormElement\"),L=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M=c(\"RegExp\"),v=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};T(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},b=\"abcdefghijklmnopqrstuvwxyz\",U=\"0123456789\",w={DIGIT:U,ALPHA:b,ALPHA_DIGIT:b+b.toUpperCase()+U},G=c(\"AsyncFunction\");var B={isArray:l,isArrayBuffer:E,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&(\"function\"==typeof FormData&&e instanceof FormData||A(e.append)&&(\"formdata\"===(t=s(e))||\"object\"===t&&A(e.toString)&&\"[object FormData]\"===e.toString()))},isArrayBufferView:function(e){let t;return t=\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&E(e.buffer),t},isString:f,isNumber:_,isBoolean:e=>!0===e||!1===e,isObject:h,isPlainObject:p,isUndefined:d,isDate:O,isFile:I,isBlob:R,isRegExp:M,isFunction:A,isStream:e=>h(e)&&A(e.pipe),isURLSearchParams:S,isTypedArray:y,isFileList:N,forEach:T,merge:function e(){const{caseless:t}=C(this)&&this||{},n={},r=(r,o)=>{const i=t&&D(n,o)||o;p(n[i])&&p(r)?n[i]=e(n[i],r):p(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&T(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(T(t,((t,o)=>{n&&A(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\"\"),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,\"super\",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:P,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:v,freezeMethods:e=>{v(e,((t,n)=>{if(A(e)&&-1!==[\"arguments\",\"caller\",\"callee\"].indexOf(n))return!1;const r=e[n];A(r)&&(t.enumerable=!1,\"writable\"in t?t.writable=!1:t.set||(t.set=()=>{throw Error(\"Can not rewrite read-only method '\"+n+\"'\")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:D,global:m,isContextDefined:C,ALPHABET:w,generateString:(e=16,t=w.ALPHA_DIGIT)=>{let n=\"\";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&A(e.append)&&\"FormData\"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(h(e)){if(t.indexOf(e)>=0)return;if(!(\"toJSON\"in e)){t[r]=e;const o=l(e)?[]:{};return T(e,((e,t)=>{const i=n(e,r+1);!d(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:G,isThenable:e=>e&&(h(e)||A(e))&&A(e.then)&&A(e.catch)};function F(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name=\"AxiosError\",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}B.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const x=F.prototype,j={};function H(e){return B.isPlainObject(e)||B.isArray(e)}function V(e){return B.endsWith(e,\"[]\")?e.slice(0,-2):e}function K(e,t,n){return e?e.concat(t).map((function(e,t){return e=V(e),!n&&t?\"[\"+e+\"]\":e})).join(n?\".\":\"\"):t}[\"ERR_BAD_OPTION_VALUE\",\"ERR_BAD_OPTION\",\"ECONNABORTED\",\"ETIMEDOUT\",\"ERR_NETWORK\",\"ERR_FR_TOO_MANY_REDIRECTS\",\"ERR_DEPRECATED\",\"ERR_BAD_RESPONSE\",\"ERR_BAD_REQUEST\",\"ERR_CANCELED\",\"ERR_NOT_SUPPORT\",\"ERR_INVALID_URL\"].forEach((e=>{j[e]={value:e}})),Object.defineProperties(F,j),Object.defineProperty(x,\"isAxiosError\",{value:!0}),F.from=(e,t,n,r,o,i)=>{const s=Object.create(x);return B.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>\"isAxiosError\"!==e)),F.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const k=B.toFlatObject(B,{},null,(function(e){return/^is[A-Z]/.test(e)}));function W(e,t,n){if(!B.isObject(e))throw new TypeError(\"target must be an object\");t=t||new FormData;const r=(n=B.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!B.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||\"undefined\"!=typeof Blob&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(o))throw new TypeError(\"visitor must be a function\");function c(e){if(null===e)return\"\";if(B.isDate(e))return e.toISOString();if(!a&&B.isBlob(e))throw new F(\"Blob is not supported. Use a Buffer instead.\");return B.isArrayBuffer(e)||B.isTypedArray(e)?a&&\"function\"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&\"object\"==typeof e)if(B.endsWith(n,\"{}\"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(B.isArray(e)&&function(e){return B.isArray(e)&&!e.some(H)}(e)||(B.isFileList(e)||B.endsWith(n,\"[]\"))&&(a=B.toArray(e)))return n=V(n),a.forEach((function(e,r){!B.isUndefined(e)&&null!==e&&t.append(!0===s?K([n],r,i):null===s?n:n+\"[]\",c(e))})),!1;return!!H(e)||(t.append(K(o,n,i),c(e)),!1)}const l=[],d=Object.assign(k,{defaultVisitor:u,convertValue:c,isVisitable:H});if(!B.isObject(e))throw new TypeError(\"data must be an object\");return function e(n,r){if(!B.isUndefined(n)){if(-1!==l.indexOf(n))throw Error(\"Circular reference detected in \"+r.join(\".\"));l.push(n),B.forEach(n,(function(n,i){!0===(!(B.isUndefined(n)||null===n)&&o.call(t,n,B.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function Y(e){const t={\"!\":\"%21\",\"'\":\"%27\",\"(\":\"%28\",\")\":\"%29\",\"~\":\"%7E\",\"%20\":\"+\",\"%00\":\"\\0\"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function X(e,t){this._pairs=[],e&&W(e,this,t)}const q=X.prototype;function J(e){return encodeURIComponent(e).replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,\"+\").replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\")}function z(e,t,n){if(!t)return e;const r=n&&n.encode||J,o=n&&n.serialize;let i;if(i=o?o(t,n):B.isURLSearchParams(t)?t.toString():new X(t,n).toString(r),i){const t=e.indexOf(\"#\");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf(\"?\")?\"?\":\"&\")+i}return e}q.append=function(e,t){this._pairs.push([e,t])},q.toString=function(e){const t=e?function(t){return e.call(this,t,Y)}:Y;return this._pairs.map((function(e){return t(e[0])+\"=\"+t(e[1])}),\"\").join(\"&\")};var $=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q={isBrowser:!0,classes:{URLSearchParams:\"undefined\"!=typeof URLSearchParams?URLSearchParams:X,FormData:\"undefined\"!=typeof FormData?FormData:null,Blob:\"undefined\"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return(\"undefined\"==typeof navigator||\"ReactNative\"!==(e=navigator.product)&&\"NativeScript\"!==e&&\"NS\"!==e)&&\"undefined\"!=typeof window&&\"undefined\"!=typeof document})(),isStandardBrowserWebWorkerEnv:\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&\"function\"==typeof self.importScripts,protocols:[\"http\",\"https\",\"file\",\"blob\",\"url\",\"data\"]};function ee(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&B.isArray(r)?r.length:i,a?(B.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&B.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&B.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(B.isFormData(e)&&B.isFunction(e.entries)){const n={};return B.forEachEntry(e,((e,r)=>{t(function(e){return B.matchAll(/\\w+|\\[(\\w*)]/g,e).map((e=>\"[]\"===e[0]?\"\":e[1]||e[0]))}(e),r,n,0)})),n}return null}const te={\"Content-Type\":void 0},ne={transitional:Z,adapter:[\"xhr\",\"http\"],transformRequest:[function(e,t){const n=t.getContentType()||\"\",r=n.indexOf(\"application/json\")>-1,o=B.isObject(e);if(o&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return r&&r?JSON.stringify(ee(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\",!1),e.toString();let i;if(o){if(n.indexOf(\"application/x-www-form-urlencoded\")>-1)return function(e,t){return W(e,new Q.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Q.isNode&&B.isBuffer(e)?(this.append(t,e.toString(\"base64\")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=B.isFileList(e))||n.indexOf(\"multipart/form-data\")>-1){const t=this.env&&this.env.FormData;return W(i?{\"files[]\":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType(\"application/json\",!1),function(e,t,n){if(B.isString(e))try{return(0,JSON.parse)(e),B.trim(e)}catch(e){if(\"SyntaxError\"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ne.transitional,n=t&&t.forcedJSONParsing,r=\"json\"===this.responseType;if(e&&B.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if(\"SyntaxError\"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:\"XSRF-TOKEN\",xsrfHeaderName:\"X-XSRF-TOKEN\",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:\"application/json, text/plain, */*\"}}};B.forEach([\"delete\",\"get\",\"head\"],(function(e){ne.headers[e]={}})),B.forEach([\"post\",\"put\",\"patch\"],(function(e){ne.headers[e]=B.merge(te)}));var re=ne;const oe=B.toObjectSet([\"age\",\"authorization\",\"content-length\",\"content-type\",\"etag\",\"expires\",\"from\",\"host\",\"if-modified-since\",\"if-unmodified-since\",\"last-modified\",\"location\",\"max-forwards\",\"proxy-authorization\",\"referer\",\"retry-after\",\"user-agent\"]),ie=Symbol(\"internals\");function se(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:B.isArray(e)?e.map(ae):String(e)}function ce(e,t,n,r,o){return B.isFunction(r)?r.call(this,t,n):(o&&(t=n),B.isString(t)?B.isString(r)?-1!==t.indexOf(r):B.isRegExp(r)?r.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=se(t);if(!o)throw new Error(\"header name must be a non-empty string\");const i=B.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=ae(e))}const i=(e,t)=>B.forEach(e,((e,n)=>o(e,n,t)));return B.isPlainObject(e)||e instanceof this.constructor?i(e,t):B.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split(\"\\n\").forEach((function(e){o=e.indexOf(\":\"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&oe[n]||(\"set-cookie\"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+\", \"+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=se(e)){const n=B.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(B.isFunction(t))return t.call(this,e,n);if(B.isRegExp(t))return t.exec(e);throw new TypeError(\"parser must be boolean|regexp|function\")}}}has(e,t){if(e=se(e)){const n=B.findKey(this,e);return!(!n||void 0===this[n]||t&&!ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=se(e)){const o=B.findKey(n,e);!o||t&&!ce(0,n[o],o,t)||(delete n[o],r=!0)}}return B.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return B.forEach(this,((r,o)=>{const i=B.findKey(n,o);if(i)return t[i]=ae(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=ae(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return B.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&B.isArray(n)?n.join(\", \"):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+\": \"+t)).join(\"\\n\")}get[Symbol.toStringTag](){return\"AxiosHeaders\"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ie]=this[ie]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=se(e);t[r]||(function(e,t){const n=B.toCamelCase(\" \"+t);[\"get\",\"set\",\"has\"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return B.isArray(e)?e.forEach(r):r(e),this}}ue.accessor([\"Content-Type\",\"Content-Length\",\"Accept\",\"Accept-Encoding\",\"User-Agent\",\"Authorization\"]),B.freezeMethods(ue.prototype),B.freezeMethods(ue);var le=ue;function de(e,t){const n=this||re,r=t||n,o=le.from(r.headers);let i=r.data;return B.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Ee(e){return!(!e||!e.__CANCEL__)}function fe(e,t,n){F.call(this,null==e?\"canceled\":e,F.ERR_CANCELED,t,n),this.name=\"CanceledError\"}B.inherits(fe,F,{__CANCEL__:!0});var Ae=Q.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const s=[];s.push(e+\"=\"+encodeURIComponent(t)),B.isNumber(n)&&s.push(\"expires=\"+new Date(n).toGMTString()),B.isString(r)&&s.push(\"path=\"+r),B.isString(o)&&s.push(\"domain=\"+o),!0===i&&s.push(\"secure\"),document.cookie=s.join(\"; \")},read:function(e){const t=document.cookie.match(new RegExp(\"(^|;\\\\s*)(\"+e+\")=([^;]*)\"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,\"\",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function _e(e,t){return e&&!/^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(t)?function(e,t){return t?e.replace(/\\/+$/,\"\")+\"/\"+t.replace(/^\\/+/,\"\"):e}(e,t):t}var he=Q.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement(\"a\");let n;function r(n){let r=n;return e&&(t.setAttribute(\"href\",r),r=t.href),t.setAttribute(\"href\",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,\"\"):\"\",host:t.host,search:t.search?t.search.replace(/^\\?/,\"\"):\"\",hash:t.hash?t.hash.replace(/^#/,\"\"):\"\",hostname:t.hostname,port:t.port,pathname:\"/\"===t.pathname.charAt(0)?t.pathname:\"/\"+t.pathname}}return n=r(window.location.href),function(e){const t=B.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function pe(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const E=u&&c-u;return E?Math.round(1e3*d/E):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?\"download\":\"upload\"]=!0,e(u)}}const Oe={http:null,xhr:\"undefined\"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=le.from(e.headers).normalize(),i=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener(\"abort\",s)}B.isFormData(r)&&(Q.isStandardBrowserEnv||Q.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType(\"multipart/form-data;\",!1));let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||\"\",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):\"\";o.set(\"Authorization\",\"Basic \"+btoa(t+\":\"+n))}const u=_e(e.baseURL,e.url);function l(){if(!c)return;const r=le.from(\"getAllResponseHeaders\"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new F(\"Request failed with status code \"+n.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:i&&\"text\"!==i&&\"json\"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),z(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,\"onloadend\"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf(\"file:\"))&&setTimeout(l)},c.onabort=function(){c&&(n(new F(\"Request aborted\",F.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new F(\"Network Error\",F.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?\"timeout of \"+e.timeout+\"ms exceeded\":\"timeout exceeded\";const r=e.transitional||Z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new F(t,r.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,c)),c=null},Q.isStandardBrowserEnv){const t=(e.withCredentials||he(u))&&e.xsrfCookieName&&Ae.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),\"setRequestHeader\"in c&&B.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),B.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&\"json\"!==i&&(c.responseType=e.responseType),\"function\"==typeof e.onDownloadProgress&&c.addEventListener(\"progress\",pe(e.onDownloadProgress,!0)),\"function\"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener(\"progress\",pe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(n(!t||t.type?new fe(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener(\"abort\",s)));const d=function(e){const t=/^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(e);return t&&t[1]||\"\"}(u);d&&-1===Q.protocols.indexOf(d)?n(new F(\"Unsupported protocol \"+d+\":\",F.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};B.forEach(Oe,((e,t)=>{if(e){try{Object.defineProperty(e,\"name\",{value:t})}catch(e){}Object.defineProperty(e,\"adapterName\",{value:t})}}));function Ie(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fe(null,e)}function Re(e){return Ie(e),e.headers=le.from(e.headers),e.data=de.call(e,e.transformRequest),-1!==[\"post\",\"put\",\"patch\"].indexOf(e.method)&&e.headers.setContentType(\"application/x-www-form-urlencoded\",!1),(e=>{e=B.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=B.isString(n)?Oe[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new F(`Adapter ${n} is not supported by the environment`,\"ERR_NOT_SUPPORT\");throw new Error(B.hasOwnProp(Oe,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!B.isFunction(r))throw new TypeError(\"adapter is not a function\");return r})(e.adapter||re.adapter)(e).then((function(t){return Ie(e),t.data=de.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t}),(function(t){return Ee(t)||(Ie(e),t&&t.response&&(t.response.data=de.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)}))}const Ne=e=>e instanceof le?e.toJSON():e;function Se(e,t){t=t||{};const n={};function r(e,t,n){return B.isPlainObject(e)&&B.isPlainObject(t)?B.merge.call({caseless:n},e,t):B.isPlainObject(t)?B.merge({},t):B.isArray(t)?t.slice():t}function o(e,t,n){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!B.isUndefined(t))return r(void 0,t)}function s(e,t){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Ne(e),Ne(t),!0)};return B.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);B.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Te={};[\"object\",\"boolean\",\"number\",\"function\",\"string\",\"symbol\"].forEach(((e,t)=>{Te[e]=function(n){return typeof n===e||\"a\"+(t<1?\"n \":\" \")+e}}));const De={};Te.transitional=function(e,t,n){function r(e,t){return\"[Axios v1.4.0] Transitional option '\"+e+\"'\"+t+(n?\". \"+n:\"\")}return(n,o,i)=>{if(!1===e)throw new F(r(o,\" has been removed\"+(t?\" in \"+t:\"\")),F.ERR_DEPRECATED);return t&&!De[o]&&(De[o]=!0,console.warn(r(o,\" has been deprecated since v\"+t+\" and will be removed in the near future\"))),!e||e(n,o,i)}};var me={assertOptions:function(e,t,n){if(\"object\"!=typeof e)throw new F(\"options must be an object\",F.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new F(\"option \"+i+\" must be \"+n,F.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new F(\"Unknown option \"+i,F.ERR_BAD_OPTION)}},validators:Te};const Ce=me.validators;class ye{constructor(e){this.defaults=e,this.interceptors={request:new $,response:new $}}request(e,t){\"string\"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&me.assertOptions(n,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),null!=r&&(B.isFunction(r)?t.paramsSerializer={serialize:r}:me.assertOptions(r,{encode:Ce.function,serialize:Ce.function},!0)),t.method=(t.method||this.defaults.method||\"get\").toLowerCase(),i=o&&B.merge(o.common,o[t.method]),i&&B.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\",\"common\"],(e=>{delete o[e]})),t.headers=le.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){\"function\"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!a){const e=[Re.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=s.length;let E=t;for(d=0;d<l;){const e=s[d++],t=s[d++];try{E=e(E)}catch(e){t.call(this,e);break}}try{u=Re.call(this,E)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return z(_e((e=Se(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}B.forEach([\"delete\",\"get\",\"head\",\"options\"],(function(e){ye.prototype[e]=function(t,n){return this.request(Se(n||{},{method:e,url:t,data:(n||{}).data}))}})),B.forEach([\"post\",\"put\",\"patch\"],(function(e){function t(t){return function(n,r,o){return this.request(Se(o||{},{method:e,headers:t?{\"Content-Type\":\"multipart/form-data\"}:{},url:n,data:r}))}}ye.prototype[e]=t(),ye.prototype[e+\"Form\"]=t(!0)}));var ge=ye;class Pe{constructor(e){if(\"function\"!=typeof e)throw new TypeError(\"executor must be a function.\");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new fe(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Pe((function(t){e=t})),cancel:e}}}var Le=Pe;const Me={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Me).forEach((([e,t])=>{Me[t]=e}));var ve=Me;const be=function e(t){const n=new ge(t),o=r(ge.prototype.request,n);return B.extend(o,ge.prototype,n,{allOwnKeys:!0}),B.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Se(t,n))},o}(re);be.Axios=ge,be.CanceledError=fe,be.CancelToken=Le,be.isCancel=Ee,be.VERSION=\"1.4.0\",be.toFormData=W,be.AxiosError=F,be.Cancel=be.CanceledError,be.all=function(e){return Promise.all(e)},be.spread=function(e){return function(t){return e.apply(null,t)}},be.isAxiosError=function(e){return B.isObject(e)&&!0===e.isAxiosError},be.mergeConfig=Se,be.AxiosHeaders=le,be.formToJSON=e=>ee(B.isHTMLForm(e)?new FormData(e):e),be.HttpStatusCode=ve,be.default=be,e.exports=be}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var r=n(607);return r.default})()));\n\n//# sourceURL=webpack://PWUISDK/./node_modules/pipwave-ekyc-sdk/dist/pw-bundle.js?");
3388
+ eval("!function(e,t){ true?module.exports=t():0}(self,(()=>(()=>{\"use strict\";var e={245:(e,t,n)=>{function r(e){this.message=e}n.r(t),n.d(t,{InvalidTokenError:()=>s,default:()=>a}),r.prototype=new Error,r.prototype.name=\"InvalidCharacterError\";var o=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,\"\");if(t.length%4==1)throw new r(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,i=0,s=0,a=\"\";o=t.charAt(s++);~o&&(n=i%4?64*n+o:o,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return a};function i(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=\"0\"+n),\"%\"+n})))}(t)}catch(e){return o(t)}}function s(e){this.message=e}s.prototype=new Error,s.prototype.name=\"InvalidTokenError\";const a=function(e,t){if(\"string\"!=typeof e)throw new s(\"Invalid token specified\");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(i(e.split(\".\")[n]))}catch(e){throw new s(\"Invalid token specified: \"+e.message)}}},607:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWSDK=void 0;const o=r(n(245)),i=r(n(207)),s=n(284),a=n(860),c=n(882);class u{constructor(){this._countries=[],this._issuingCountries=[],this.init=s.PWAUTHSDK.prototype.init,this.fetchStates=a.PWCOMMONSDK.prototype.fetchStates,this.viewIpCountry=a.PWCOMMONSDK.prototype.viewIpCountry,this.fetchCountries=a.PWCOMMONSDK.prototype.fetchCountries,this.fetchIssuingCountries=a.PWCOMMONSDK.prototype.fetchIssuingCountries,this.viewDefaultCountry=a.PWCOMMONSDK.prototype.viewDefaultCountry,this.uploadDoc=c.PWPROOFSDK.prototype.uploadDoc,this.uploadSelfie=c.PWPROOFSDK.prototype.uploadSelfie,this.viewResult=c.PWPROOFSDK.prototype.viewResult,this.updateForm=c.PWPROOFSDK.prototype.updateForm}get ipCountry(){return this._ipCountry}get countries(){return this._countries}get issuingCountries(){return this._issuingCountries}get defaultCountry(){return this._defaultCountry}get merchantDetail(){return this._merchantDetail}get tokenDetails(){const e=i.default.getAccessToken();return e?(0,o.default)(e):{}}get sessionId(){return this.tokenDetails.sessionId||\"\"}get verificationTypes(){return this.tokenDetails.verificationTypes||[]}}t.PWSDK=u,t.default={PWSDK:u}},207:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.instance=void 0;const i=o(n(218)),s=n(249);t.instance={};let a=\"\",c=Object.freeze(new class{getAccessToken(){return a}create(e,n){if(a=n,!t.instance||Object.keys(t.instance).length)return t.instance.defaults.headers.common.Authorization=n;t.instance=i.default.create({baseURL:e||\"https://staging-open-api.pipwave.com\",headers:{common:{Authorization:n}}}),t.instance.interceptors.request.use((function(e){return e}),this.onResponseError),t.instance.interceptors.response.use(void 0,this.onResponseError)}onResponseError(e){return r(this,void 0,void 0,(function*(){const t=(0,s.constructAxiosError)(e);return Promise.reject(t)}))}});t.default=c},599:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ERROR_TYPE=t.ERROR_MESSAGE=t.INVALID_ARGUMENT_FORMAT=t.INVALID_ARGUMENT_LENGTH=t.INVALID_ARGUMENTS=t.ATTEMPT_EXCEEDED=t.CODE_BAD_REQ=t.CODE_LIMIT_EXCEED=t.CODE_ACCESS_DENIED=t.CODE_VALIDATION_ERROR=t.CODE_MISSING_PARAM=t.CODE_IMG_EXPOSED_3=t.CODE_IMG_EXPOSED_2=t.CODE_IMG_EXPOSED_1=t.CODE_DOC_NOT_POSITIONED=t.CODE_DOC_IMG_UNSIMILAR=t.CODE_DOC_BLUR=t.CODE_DOC_EMPTY=t.CODE_DOC_UNPAIR=t.CODE_DOC_TYPE_INVALID=t.CODE_MAX_SESSION_ATTEMPT=t.CODE_MAX_DOC_ATTEMPT=t.CODE_MAX_SELFIE_ATTEMPT=t.CODE_ISSUING_COUNTRY_INVALID=t.CODE_VERIFICATION_TYPE_INVALID=t.CODE_SESSION_EXPIRED=t.API_MODULE=t.REQUEST_ERROR_NAME=t.ERROR_NAME=void 0,t.ERROR_NAME=\"PwError\",t.REQUEST_ERROR_NAME=\"PwReqError\",t.API_MODULE=\"openApi\",t.CODE_SESSION_EXPIRED=14003,t.CODE_VERIFICATION_TYPE_INVALID=14002,t.CODE_ISSUING_COUNTRY_INVALID=12015,t.CODE_MAX_SELFIE_ATTEMPT=14019,t.CODE_MAX_DOC_ATTEMPT=14020,t.CODE_MAX_SESSION_ATTEMPT=14021,t.CODE_DOC_TYPE_INVALID=12002,t.CODE_DOC_UNPAIR=12006,t.CODE_DOC_EMPTY=12014,t.CODE_DOC_BLUR=12010,t.CODE_DOC_IMG_UNSIMILAR=12013,t.CODE_DOC_NOT_POSITIONED=12009,t.CODE_IMG_EXPOSED_1=11008,t.CODE_IMG_EXPOSED_2=11010,t.CODE_IMG_EXPOSED_3=12012,t.CODE_MISSING_PARAM=4001,t.CODE_VALIDATION_ERROR=4002,t.CODE_ACCESS_DENIED=4031,t.CODE_LIMIT_EXCEED=4291,t.CODE_BAD_REQ=4003,t.ATTEMPT_EXCEEDED=\"ATTEMPT_EXCEEDED\",t.INVALID_ARGUMENTS=\"INVALID_ARGUMENTS\",t.INVALID_ARGUMENT_LENGTH=\"INVALID_ARGUMENT_LENGTH\",t.INVALID_ARGUMENT_FORMAT=\"INVALID_ARGUMENT_FORMAT\",t.ERROR_MESSAGE={[t.ATTEMPT_EXCEEDED]:\"Maximum attempt exceeded\",[t.INVALID_ARGUMENTS]:\"Invalid arguments\",[t.INVALID_ARGUMENT_LENGTH]:\"Invalid length for argument\",[t.INVALID_ARGUMENT_FORMAT]:\"Invalid format for argument\",[t.CODE_SESSION_EXPIRED]:\"Token expired\"},t.ERROR_TYPE={[t.ATTEMPT_EXCEEDED]:\"attempt-exceeded\",[t.INVALID_ARGUMENTS]:\"invalid-arguments\",[t.INVALID_ARGUMENT_LENGTH]:\"invalid-argument-length\",[t.INVALID_ARGUMENT_FORMAT]:\"invalid-argument-format\",[t.CODE_SESSION_EXPIRED]:\"session-id-expired\",[t.CODE_VERIFICATION_TYPE_INVALID]:\"verification-type-invalid\",[t.CODE_ISSUING_COUNTRY_INVALID]:\"issuing-country-invalid\",[t.CODE_MAX_SELFIE_ATTEMPT]:\"max-selfie-attempt\",[t.CODE_MAX_DOC_ATTEMPT]:\"max-doc-attempt\",[t.CODE_MAX_SESSION_ATTEMPT]:\"max-session-attempt\",[t.CODE_DOC_TYPE_INVALID]:\"doc-type-invalid\",[t.CODE_DOC_UNPAIR]:\"doc-unpair\",[t.CODE_DOC_EMPTY]:\"doc-empty\",[t.CODE_DOC_BLUR]:\"doc-blur\",[t.CODE_DOC_IMG_UNSIMILAR]:\"doc-front-back-img-unsimilar\",[t.CODE_DOC_NOT_POSITIONED]:\"doc-not-positioned-proper\",[t.CODE_IMG_EXPOSED_1]:\"img-exposed\",[t.CODE_IMG_EXPOSED_2]:\"img-exposed\",[t.CODE_IMG_EXPOSED_3]:\"img-exposed\",[t.CODE_MISSING_PARAM]:\"missing-param\",[t.CODE_VALIDATION_ERROR]:\"validation-error\",[t.CODE_ACCESS_DENIED]:\"access-denied\",[t.CODE_LIMIT_EXCEED]:\"limit-exceed\",[t.CODE_BAD_REQ]:\"bad-request\"}},249:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.validateList=t.validateRegex=t.validateLength=t.validateParam=t.validateParams=t.constructAxiosError=void 0;const r=n(145),o=n(599);t.constructAxiosError=e=>{let t=new r.PwReqError;const{code:n,message:i,config:s,request:a,response:c}=e;if(t.status=null==c?void 0:c.status,t.statusText=n,t.message=i,t.config=s,t.request=a,t.response=c,null==c?void 0:c.data){const{code:e,messages:n=[],Message:r=\"\"}=c.data;if(r&&(t.message=r),n.length){const{code:r,text:i}=n[0];t.code=r||e||void 0,i&&(t.message=i);const s=t.code&&o.ERROR_TYPE[t.code];t.type=s?`${o.API_MODULE}/${s}`:\"unknown\"}}return t},t.validateParams=function(e,n,r){const o=Object.keys(n);for(const i of o){const o=!!r&&r.includes(i);(0,t.validateParam)(i,e[i],n[i],o)}return!0},t.validateParam=(e,t,n,i)=>{const s=null!==t&&(\"array\"===n?Array.isArray(t):typeof t===n&&!Array.isArray(t));if(!i&&(void 0===t||s))return!0;if(s&&\"object\"===n&&Object.keys(t).length>0)return!0;if(s&&\"array\"===n&&t.length>0)return!0;if(s&&\"string\"===n&&t)return!0;const a=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENTS]}: ${e}`);throw a.type=o.ERROR_TYPE[o.INVALID_ARGUMENTS],a},t.validateLength=(e,t,n,i,s)=>{if(void 0===t)return!0;const a=\"string\"==typeof t?t.length:t.toString().length,c=new r.PwError;if(c.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_LENGTH],c.message=`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_LENGTH]}: ${e} `,n&&a!==n)throw c.message+=`must have exactly length ${n}`,c;if(i&&s&&(a<i||a>s))throw c.message+=`must be between ${i} and ${s} characters in length`,c;if(i&&a<i)throw c.message+=`must be at least ${i} characters in length`,c;if(s&&a>s)throw c.message+=`must not exceed ${s} characters in length`,c;return!0},t.validateRegex=(e,t,n,i)=>{if(i.test(t))return!0;const s=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_FORMAT]}: ${e} ${n} `);throw s.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_FORMAT],s},t.validateList=(e,t,n)=>{if(n.includes(t))return;const i=new r.PwError(`${o.ERROR_MESSAGE[o.INVALID_ARGUMENT_FORMAT]}: ${e} ${n} `);throw i.type=o.ERROR_TYPE[o.INVALID_ARGUMENT_FORMAT],i}},145:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.PwReqError=t.PwError=void 0;const r=n(599);class o extends Error{constructor(e){super(e),this.name=r.ERROR_NAME}}t.PwError=o,t.PwReqError=class extends o{constructor(e){super(e),this.name=r.REQUEST_ERROR_NAME}}},531:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.VIEW_MERCHANT=t.CREATE_SESSION=void 0;const r=n(207);t.CREATE_SESSION=(e,t)=>r.instance.post(\"ekyc/session\",e,{headers:t}),t.VIEW_MERCHANT=e=>r.instance.get(`merchant/${e}`)},219:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.isExpired=void 0,t.isExpired=e=>!e||e<Math.floor(Date.now()/1e3)},284:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWAUTHSDK=void 0;const i=o(n(245)),s=o(n(207)),a=n(249),c=n(599),u=n(145),l=n(531),d=n(219);t.PWAUTHSDK=class{constructor(){this.fetchCountries=()=>r(this,void 0,void 0,(function*(){return[]})),this.fetchIssuingCountries=()=>r(this,void 0,void 0,(function*(){return[]})),this.viewDefaultCountry=()=>r(this,void 0,void 0,(function*(){return{}}))}get tokenDetails(){return{}}get sessionId(){return\"\"}init(e){return r(this,void 0,void 0,(function*(){(0,a.validateParam)(\"accessToken\",e,\"string\",!0);const{sessionId:t,exp:n,sub:r,aud:o,merchantId:E,verificationTypes:f=[],excludedDocTypes:A=[]}=(0,i.default)(e);if((0,d.isExpired)(n)){const e=new u.PwError(c.ERROR_MESSAGE[c.CODE_SESSION_EXPIRED]);throw e.type=c.ERROR_TYPE[c.CODE_SESSION_EXPIRED],e}s.default.create(o,e);const _=yield(0,l.VIEW_MERCHANT)(E),{payload:p}=_.data;return this._merchantDetail=p,yield this.fetchCountries(),yield this.fetchIssuingCountries(),yield this.viewDefaultCountry(),{verification_types:f,session_id:t,expired_at:n,user_id:r,excluded_doc_types:A}}))}}},99:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.FETCH_STATES=t.FETCH_COUNTRIES=t.VIEW_IP_COUNTRY=void 0;const r=n(207);t.VIEW_IP_COUNTRY=()=>r.instance.get(\"locale/ip_info\"),t.FETCH_COUNTRIES=()=>r.instance.get(\"locale/country\"),t.FETCH_STATES=e=>r.instance.get(\"locale/states\",{params:e})},909:(e,t)=>{var n,r,o;Object.defineProperty(t,\"__esModule\",{value:!0}),t.GENDER=t.COUNTRY_ISO=t.LANGUAGE=void 0,function(e){e.EN=\"en\",e.ID=\"id\",e.CN=\"zh-CN\"}(n||(t.LANGUAGE=n={})),function(e){e.AFGHANISTAN=\"AF\",e[\"ÅLAND_ISLANDS\"]=\"AX\",e.ALBANIA=\"AL\",e.ALGERIA=\"DZ\",e.AMERICAN_SAMOA=\"AS\",e.ANDORRA=\"AD\",e.ANGOLA=\"AO\",e.ANGUILLA=\"AI\",e.ANTARCTICA=\"AQ\",e.ANTIGUA_AND_BARBUDA=\"AG\",e.ARGENTINA=\"AR\",e.ARMENIA=\"AM\",e.ARUBA=\"AW\",e.AUSTRALIA=\"AU\",e.AUSTRIA=\"AT\",e.AZERBAIJAN=\"AZ\",e.BAHAMAS=\"BS\",e.BAHRAIN=\"BH\",e.BANGLADESH=\"BD\",e.BARBADOS=\"BB\",e.BELARUS=\"BY\",e.BELGIUM=\"BE\",e.BELIZE=\"BZ\",e.BENIN=\"BJ\",e.BERMUDA=\"BM\",e.BHUTAN=\"BT\",e.BOLIVIA=\"BO\",e.BONAIRE_SINT_EUSTATIUS_AND_SABA=\"BQ\",e.BOSNIA_AND_HERZEGOVINA=\"BA\",e.BOTSWANA=\"BW\",e.BOUVET_ISLAND=\"BV\",e.BRAZIL=\"BR\",e.BRITISH_INDIAN_OCEAN_TERRITORY=\"IO\",e.BRUNEI_DARUSSALAM=\"BN\",e.BULGARIA=\"BG\",e.BURKINA_FASO=\"BF\",e.BURUNDI=\"BI\",e.CABO_VERDE=\"CV\",e.CAMBODIA=\"KH\",e.CAMEROON=\"CM\",e.CANADA=\"CA\",e.CAYMAN_ISLANDS=\"KY\",e.CENTRAL_AFRICAN_REPUBLIC=\"CF\",e.CHAD=\"TD\",e.CHILE=\"CL\",e.CHINA=\"CN\",e.CHRISTMAS_ISLAND=\"CX\",e.COCOS_KEELING_ISLANDS=\"CC\",e.COLOMBIA=\"CO\",e.COMOROS=\"KM\",e.CONGO=\"CG\",e.COOK_ISLANDS=\"CK\",e.COSTA_RICA=\"CR\",e[\"CÔTE_D_IVOIRE\"]=\"CI\",e.CROATIA=\"HR\",e[\"CURAÇAO\"]=\"CW\",e.CYPRUS=\"CY\",e.CZECHIA=\"CZ\",e.DENMARK=\"DK\",e.DJIBOUTI=\"DJ\",e.DOMINICA=\"DM\",e.DOMINICAN_REPUBLIC=\"DO\",e.ECUADOR=\"EC\",e.EGYPT=\"EG\",e.EL_SALVADOR=\"SV\",e.EQUATORIAL_GUINEA=\"GQ\",e.ERITREA=\"ER\",e.ESTONIA=\"EE\",e.ESWATINI=\"SZ\",e.ETHIOPIA=\"ET\",e.FALKLAND_ISLANDS_MALVINAS=\"FK\",e.FAROE_ISLANDS=\"FO\",e.FIJI=\"FJ\",e.FINLAND=\"FI\",e.FRANCE=\"FR\",e.FRENCH_GUIANA=\"GF\",e.FRENCH_POLYNESIA=\"PF\",e.FRENCH_SOUTHERN_TERRITORIES=\"TF\",e.GABON=\"GA\",e.GAMBIA=\"GM\",e.GEORGIA=\"GE\",e.GERMANY=\"DE\",e.GHANA=\"GH\",e.GIBRALTAR=\"GI\",e.GREECE=\"GR\",e.GREENLAND=\"GL\",e.GRENADA=\"GD\",e.GUADELOUPE=\"GP\",e.GUAM=\"GU\",e.GUATEMALA=\"GT\",e.GUERNSEY=\"GG\",e.GUINEA=\"GN\",e.GUINEA_BISSAU=\"GW\",e.GUYANA=\"GY\",e.HAITI=\"HT\",e.HEARD_ISLAND_AND_MCDONALD_ISLANDS=\"HM\",e.HOLY_SEE=\"VA\",e.HONDURAS=\"HN\",e.HONG_KONG=\"HK\",e.HUNGARY=\"HU\",e.ICELAND=\"IS\",e.INDIA=\"IN\",e.INDONESIA=\"ID\",e.IRAQ=\"IQ\",e.IRELAND=\"IE\",e.ISLE_OF_MAN=\"IM\",e.ISRAEL=\"IL\",e.ITALY=\"IT\",e.JAMAICA=\"JM\",e.JAPAN=\"JP\",e.JERSEY=\"JE\",e.JORDAN=\"JO\",e.KAZAKHSTAN=\"KZ\",e.KENYA=\"KE\",e.KIRIBATI=\"KI\",e.KOREA_REPUBLIC_OF=\"KR\",e.KUWAIT=\"KW\",e.KYRGYZSTAN=\"KG\",e.LAO_PEOPLE_S_DEMOCRATIC_REPUBLIC=\"LA\",e.LATVIA=\"LV\",e.LEBANON=\"LB\",e.LESOTHO=\"LS\",e.LIBERIA=\"LR\",e.LIECHTENSTEIN=\"LI\",e.LITHUANIA=\"LT\",e.LUXEMBOURG=\"LU\",e.MACAO=\"MO\",e.MADAGASCAR=\"MG\",e.MALAWI=\"MW\",e.MALAYSIA=\"MY\",e.MALDIVES=\"MV\",e.MALI=\"ML\",e.MALTA=\"MT\",e.MARSHALL_ISLANDS=\"MH\",e.MARTINIQUE=\"MQ\",e.MAURITANIA=\"MR\",e.MAURITIUS=\"MU\",e.MAYOTTE=\"YT\",e.MEXICO=\"MX\",e.MICRONESIA_FEDERATED_STATES_OF=\"FM\",e.FRANCE_METROPOLITAN=\"FX\",e.MOLDOVA_REPUBLIC_OF=\"MD\",e.MONACO=\"MC\",e.MONGOLIA=\"MN\",e.MONTENEGRO=\"ME\",e.MONTSERRAT=\"MS\",e.MOROCCO=\"MA\",e.MOZAMBIQUE=\"MZ\",e.MYANMAR=\"MM\",e.NAMIBIA=\"NA\",e.NAURU=\"NR\",e.NEPAL=\"NP\",e.NETHERLANDS=\"NL\",e.NEW_CALEDONIA=\"NC\",e.NEW_ZEALAND=\"NZ\",e.NICARAGUA=\"NI\",e.NIGER=\"NE\",e.NIGERIA=\"NG\",e.NIUE=\"NU\",e.NORFOLK_ISLAND=\"NF\",e.NORTH_MACEDONIA=\"MK\",e.NORTHERN_MARIANA_ISLANDS=\"MP\",e.NORWAY=\"NO\",e.OMAN=\"OM\",e.PAKISTAN=\"PK\",e.PALAU=\"PW\",e.PALESTINE_STATE_OF=\"PS\",e.PANAMA=\"PA\",e.PAPUA_NEW_GUINEA=\"PG\",e.PARAGUAY=\"PY\",e.PERU=\"PE\",e.PHILIPPINES=\"PH\",e.PITCAIRN=\"PN\",e.POLAND=\"PL\",e.PORTUGAL=\"PT\",e.PUERTO_RICO=\"PR\",e.QATAR=\"QA\",e[\"RÉUNION\"]=\"RE\",e.ROMANIA=\"RO\",e.RUSSIAN_FEDERATION=\"RU\",e.RWANDA=\"RW\",e[\"SAINT_BARTHÉLEMY\"]=\"BL\",e.SAINT_HELENA_ASCENSION_AND_TRISTAN_DA_CUNHA=\"SH\",e.SAINT_KITTS_AND_NEVIS=\"KN\",e.SAINT_LUCIA=\"LC\",e.SAINT_MARTIN_FRENCH_PART=\"MF\",e.SAINT_PIERRE_AND_MIQUELON=\"PM\",e.SAINT_VINCENT_AND_THE_GRENADINES=\"VC\",e.SAMOA=\"WS\",e.SAN_MARINO=\"SM\",e.SAO_TOME_AND_PRINCIPE=\"ST\",e.SAUDI_ARABIA=\"SA\",e.SENEGAL=\"SN\",e.SERBIA=\"RS\",e.SEYCHELLES=\"SC\",e.SIERRA_LEONE=\"SL\",e.SINGAPORE=\"SG\",e.SINT_MAARTEN_DUTCH_PART=\"SX\",e.SLOVAKIA=\"SK\",e.SLOVENIA=\"SI\",e.SOLOMON_ISLANDS=\"SB\",e.SOUTH_AFRICA=\"ZA\",e.SOUTH_GEORGIA_AND_THE_SOUTH_SANDWICH_ISLANDS=\"GS\",e.SPAIN=\"ES\",e.SRI_LANKA=\"LK\",e.SURINAME=\"SR\",e.SVALBARD_AND_JAN_MAYEN=\"SJ\",e.SWEDEN=\"SE\",e.SWITZERLAND=\"CH\",e.TAIWAN_PROVINCE_OF_CHINA=\"TW\",e.TAJIKISTAN=\"TJ\",e.TANZANIA_UNITED_REPUBLIC_OF=\"TZ\",e.THAILAND=\"TH\",e.TIMOR_LESTE=\"TL\",e.TOGO=\"TG\",e.TOKELAU=\"TK\",e.TONGA=\"TO\",e.TRINIDAD_AND_TOBAGO=\"TT\",e.TUNISIA=\"TN\",e.TURKEY=\"TR\",e.TURKMENISTAN=\"TM\",e.TURKS_AND_CAICOS_ISLANDS=\"TC\",e.TUVALU=\"TV\",e.UGANDA=\"UG\",e.UKRAINE=\"UA\",e.UNITED_ARAB_EMIRATES=\"AE\",e.UNITED_KINGDOM_OF_GREAT_BRITAIN_AND_NORTHERN_IRELAND=\"GB\",e.UNITED_STATES_OF_AMERICA=\"US\",e.UNITED_STATES_MINOR_OUTLYING_ISLANDS=\"UM\",e.URUGUAY=\"UY\",e.UZBEKISTAN=\"UZ\",e.VANUATU=\"VU\",e.VENEZUELA_BOLIVARIAN_REPUBLIC_OF=\"VE\",e.VIET_NAM=\"VN\",e.VIRGIN_ISLANDS_BRITISH=\"VG\",e.VIRGIN_ISLANDS_U_S=\"VI\",e.WALLIS_AND_FUTUNA=\"WF\",e.WESTERN_SAHARA=\"EH\",e.REPUBLIC_OF_KOSOVO=\"XK\",e.ZAMBIA=\"ZM\",e.ZIMBABWE=\"ZW\"}(r||(t.COUNTRY_ISO=r={})),function(e){e.F=\"FEMALE\",e.M=\"MALE\"}(o||(t.GENDER=o={}))},860:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWCOMMONSDK=void 0;const o=n(249),i=n(99);t.PWCOMMONSDK=class{constructor(){this._countries=[],this._issuingCountries=[]}get tokenDetails(){return{}}viewIpCountry(){return r(this,void 0,void 0,(function*(){if(this._ipCountry)return this._ipCountry;const e=yield(0,i.VIEW_IP_COUNTRY)(),{payload:t}=e.data;return this._ipCountry=t,t}))}fetchStates(e){return r(this,void 0,void 0,(function*(){(0,o.validateParam)(\"country\",e,\"string\",!0);const t=yield(0,i.FETCH_STATES)({country:e}),{payload:n}=t.data,{results:r}=n;return Object.entries(r).map((([e,t])=>({iso_code:e,name:t})))}))}fetchCountries(){return r(this,void 0,void 0,(function*(){if(this._countries.length)return this._countries;const e=yield(0,i.FETCH_COUNTRIES)(),{payload:t}=e.data;return this._countries=t.results.map((e=>({iso_code:e.country.toUpperCase(),name:e.country_name}))),this._countries}))}fetchIssuingCountries(){return r(this,void 0,void 0,(function*(){let e=yield this.fetchCountries();const t=e.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.iso_code]:t})),{}),{supportedCountries:n=[],excludedCountries:r=[]}=this.tokenDetails;if(n&&n.length)e=n.map((e=>t[e]));else if(r&&r.length){const t=r.map((e=>e));e=e.filter((e=>!t.includes(e.iso_code)))}return this._issuingCountries=e,this._issuingCountries}))}viewDefaultCountry(){return r(this,void 0,void 0,(function*(){const e=yield this.viewIpCountry(),t=yield this.fetchIssuingCountries();let{country:n}=this.tokenDetails,r=null;if(n){const e=t.find((e=>e.iso_code===n));e&&(r=e)}if(!r&&(null==e?void 0:e.country)){const n=t.find((t=>t.iso_code===(null==e?void 0:e.country)));n&&(r=n)}return!r&&t.length>0&&(r=t[0]),this._defaultCountry=r||{},this._defaultCountry}))}}},639:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.VIEW_RESULT=t.UPDATE_FORM=t.UPLOAD_SELFIE=t.UPLOAD_DOC=void 0;const r=n(207);t.UPLOAD_DOC=(e,t)=>r.instance.post(`/ekyc/session/${e}/doc`,t),t.UPLOAD_SELFIE=(e,t)=>r.instance.post(`/ekyc/session/${e}/selfie`,t),t.UPDATE_FORM=(e,t)=>r.instance.put(`/ekyc/session/${e}/feedback`,t),t.VIEW_RESULT=e=>r.instance.get(`/ekyc/session/${e}/check`)},746:(e,t)=>{var n,r,o;Object.defineProperty(t,\"__esModule\",{value:!0}),t.VERIFICATION_STATUS=t.AI_DOC_TYPE=t.DOC_TYPE=void 0,function(e){e.PASSPORT=\"passport\",e.NATIONAL_ID=\"national_identity_document\",e.LICENSE=\"driving_license\"}(n||(t.DOC_TYPE=n={})),function(e){e.PASSPORT=\"passport\",e.ID=\"identity_document\",e.LICENSE=\"driving_license\"}(r||(t.AI_DOC_TYPE=r={})),function(e){e.PENDING=\"pending\",e.APPROVED=\"approved\",e.REJECTED=\"rejected\",e.REVIEW=\"review\"}(o||(t.VERIFICATION_STATUS=o={}))},602:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.viewResult=void 0;const o=n(145),i=n(599),s=n(639),a=n(746);t.viewResult=(e,n=1)=>r(void 0,void 0,void 0,(function*(){const r=yield(0,s.VIEW_RESULT)(e),{payload:c}=r.data,{status:u=\"\"}=c;if(u===a.VERIFICATION_STATUS.PENDING){if(n<5)return yield new Promise((e=>setTimeout(e,3e3))),yield(0,t.viewResult)(e,n+1);const r=new o.PwReqError;return r.type=`${i.API_MODULE}/${i.ERROR_TYPE[i.ATTEMPT_EXCEEDED]}`,r.message=`${i.ERROR_MESSAGE[i.ATTEMPT_EXCEEDED]}: 5\"}`,Promise.reject(r)}{const{status:e,is_retriable:t,identity_document:n,selfie:r}=c,o={status:e,is_retriable:t,id_status:null==n?void 0:n.system_status,selfie_status:null==r?void 0:r.system_status},i=null==n?void 0:n.system_result;if(!i)return o;const{name:s,id_result:u,doc_type:l,filepaths:d}=i;if(!u)return o;const E=l===a.AI_DOC_TYPE.ID?a.DOC_TYPE.NATIONAL_ID:l,{full_name:f,given_name:A,surname:_}=s,{nationality:p=\"\",id_number:h=\"\",date_of_birth:O=\"\",gender:I=\"\",address:R}=u;let N={nationality:p,id_number:h,date_of_birth:O};f?N.full_name=f||\"\":A||_?(N.given_name=A||\"\",N.surname=_||\"\"):N.full_name=f||\"\",N.gender=I&&\"N/A\"!==I?I:\"\";const S={state_iso:\"\",state_name:\"\",country_iso2:\"\",country_name:\"\",city:\"\",line1:\"\",zip:\"\"};if(R){for(const[e,t]of Object.entries(S))S[e]=R[e]||t;N=Object.assign(Object.assign({},N),S)}return Object.assign(Object.assign({},o),{result:N,id_type:E,filepaths:d})}}))},882:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,\"__esModule\",{value:!0}),t.PWPROOFSDK=void 0;const o=n(249),i=n(602),s=n(639),a=n(909);t.PWPROOFSDK=class{get sessionId(){return\"\"}uploadDoc(e){return r(this,void 0,void 0,(function*(){const t=e.front_doc_uri?\"front_doc_uri\":\"front_doc_base64\";(0,o.validateParams)(e,{front_doc_uri:\"string\",front_doc_uri_full:\"string\",back_doc_uri:\"string\",back_doc_uri_full:\"string\",front_doc_base64:\"string\",front_doc_base64_full:\"string\",back_doc_base64:\"string\",back_doc_base64_full:\"string\",doc_type:\"string\",issuing_country:\"string\"},[t,\"doc_type\",\"issuing_country\"]);const n=yield(0,s.UPLOAD_DOC)(this.sessionId,e),{payload:r}=n.data;return r}))}uploadSelfie(e){return r(this,void 0,void 0,(function*(){const t=e.selfie_uri?\"selfie_uri\":\"selfie_base64\";(0,o.validateParams)(e,{selfie_uri:\"string\",selfie_uri_full:\"string\",selfie_base64:\"string\",selfie_base64_full:\"string\",liveness_score:\"number\"},[t]);const{liveness_score:n}=e,r=Object.assign(Object.assign({},e),n&&{metadata:{facial_liveness_score:n.toString()}}),i=yield(0,s.UPLOAD_SELFIE)(this.sessionId,r),{payload:a}=i.data;return a}))}viewResult(){return r(this,void 0,void 0,(function*(){return yield(0,i.viewResult)(this.sessionId)}))}updateForm(e){return r(this,void 0,void 0,(function*(){let t=[\"id_number\",\"date_of_birth\",\"line1\",\"city\",\"zip\",\"state_iso\",\"country_iso2\"];if(e.given_name||e.surname?(t.push(\"surname\"),t.push(\"given_name\")):t.push(\"full_name\"),(0,o.validateParams)(e,{full_name:\"string\",given_name:\"string\",surname:\"string\",id_number:\"string\",date_of_birth:\"string\",gender:\"string\",line1:\"string\",city:\"string\",zip:\"string\",state_iso:\"string\",country_iso2:\"string\"},t),(0,o.validateLength)(\"full_name\",e.full_name,0,1,160),(0,o.validateLength)(\"given_name\",e.given_name,0,1,70),(0,o.validateLength)(\"surname\",e.surname,0,1,70),(0,o.validateLength)(\"id_number\",e.id_number,0,1,40),(0,o.validateLength)(\"date_of_birth\",e.date_of_birth,0,1,10),(0,o.validateLength)(\"line1\",e.line1,0,1,350),(0,o.validateLength)(\"city\",e.city,0,1,70),(0,o.validateLength)(\"state_iso\",e.state_iso,0,1,9),(0,o.validateLength)(\"address\",e.zip,0,1,40),(0,o.validateLength)(\"country_iso2\",e.country_iso2,2),e.date_of_birth){const t=/^\\d{4}-\\d{2}-\\d{2}$/;(0,o.validateRegex)(\"date_of_birth\",e.date_of_birth,\"YYYY-MM-DD\",t)}if(e.gender){const t=Object.values(a.GENDER);(0,o.validateList)(\"gender\",e.gender,t)}const n=yield(0,s.UPDATE_FORM)(this.sessionId,{feedback_params:e}),{payload:r}=n.data;return r}))}}},218:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,d=u(\"undefined\"),E=c(\"ArrayBuffer\"),f=u(\"string\"),A=u(\"function\"),_=u(\"number\"),p=e=>null!==e&&\"object\"==typeof e,h=e=>{if(\"object\"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},O=c(\"Date\"),I=c(\"File\"),R=c(\"Blob\"),N=c(\"FileList\"),S=c(\"URLSearchParams\");function T(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if(\"object\"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function D(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const m=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:n.g,C=e=>!d(e)&&e!==m,y=(g=\"undefined\"!=typeof Uint8Array&&i(Uint8Array),e=>g&&e instanceof g);var g;const P=c(\"HTMLFormElement\"),L=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M=c(\"RegExp\"),v=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};T(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},b=\"abcdefghijklmnopqrstuvwxyz\",U=\"0123456789\",w={DIGIT:U,ALPHA:b,ALPHA_DIGIT:b+b.toUpperCase()+U},G=c(\"AsyncFunction\");var B={isArray:l,isArrayBuffer:E,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&(\"function\"==typeof FormData&&e instanceof FormData||A(e.append)&&(\"formdata\"===(t=s(e))||\"object\"===t&&A(e.toString)&&\"[object FormData]\"===e.toString()))},isArrayBufferView:function(e){let t;return t=\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&E(e.buffer),t},isString:f,isNumber:_,isBoolean:e=>!0===e||!1===e,isObject:p,isPlainObject:h,isUndefined:d,isDate:O,isFile:I,isBlob:R,isRegExp:M,isFunction:A,isStream:e=>p(e)&&A(e.pipe),isURLSearchParams:S,isTypedArray:y,isFileList:N,forEach:T,merge:function e(){const{caseless:t}=C(this)&&this||{},n={},r=(r,o)=>{const i=t&&D(n,o)||o;h(n[i])&&h(r)?n[i]=e(n[i],r):h(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&T(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(T(t,((t,o)=>{n&&A(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\"\"),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,\"super\",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:P,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:v,freezeMethods:e=>{v(e,((t,n)=>{if(A(e)&&-1!==[\"arguments\",\"caller\",\"callee\"].indexOf(n))return!1;const r=e[n];A(r)&&(t.enumerable=!1,\"writable\"in t?t.writable=!1:t.set||(t.set=()=>{throw Error(\"Can not rewrite read-only method '\"+n+\"'\")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:D,global:m,isContextDefined:C,ALPHABET:w,generateString:(e=16,t=w.ALPHA_DIGIT)=>{let n=\"\";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&A(e.append)&&\"FormData\"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(p(e)){if(t.indexOf(e)>=0)return;if(!(\"toJSON\"in e)){t[r]=e;const o=l(e)?[]:{};return T(e,((e,t)=>{const i=n(e,r+1);!d(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:G,isThenable:e=>e&&(p(e)||A(e))&&A(e.then)&&A(e.catch)};function F(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name=\"AxiosError\",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}B.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const x=F.prototype,j={};function H(e){return B.isPlainObject(e)||B.isArray(e)}function V(e){return B.endsWith(e,\"[]\")?e.slice(0,-2):e}function K(e,t,n){return e?e.concat(t).map((function(e,t){return e=V(e),!n&&t?\"[\"+e+\"]\":e})).join(n?\".\":\"\"):t}[\"ERR_BAD_OPTION_VALUE\",\"ERR_BAD_OPTION\",\"ECONNABORTED\",\"ETIMEDOUT\",\"ERR_NETWORK\",\"ERR_FR_TOO_MANY_REDIRECTS\",\"ERR_DEPRECATED\",\"ERR_BAD_RESPONSE\",\"ERR_BAD_REQUEST\",\"ERR_CANCELED\",\"ERR_NOT_SUPPORT\",\"ERR_INVALID_URL\"].forEach((e=>{j[e]={value:e}})),Object.defineProperties(F,j),Object.defineProperty(x,\"isAxiosError\",{value:!0}),F.from=(e,t,n,r,o,i)=>{const s=Object.create(x);return B.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>\"isAxiosError\"!==e)),F.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const k=B.toFlatObject(B,{},null,(function(e){return/^is[A-Z]/.test(e)}));function W(e,t,n){if(!B.isObject(e))throw new TypeError(\"target must be an object\");t=t||new FormData;const r=(n=B.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!B.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||\"undefined\"!=typeof Blob&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(o))throw new TypeError(\"visitor must be a function\");function c(e){if(null===e)return\"\";if(B.isDate(e))return e.toISOString();if(!a&&B.isBlob(e))throw new F(\"Blob is not supported. Use a Buffer instead.\");return B.isArrayBuffer(e)||B.isTypedArray(e)?a&&\"function\"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&\"object\"==typeof e)if(B.endsWith(n,\"{}\"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(B.isArray(e)&&function(e){return B.isArray(e)&&!e.some(H)}(e)||(B.isFileList(e)||B.endsWith(n,\"[]\"))&&(a=B.toArray(e)))return n=V(n),a.forEach((function(e,r){!B.isUndefined(e)&&null!==e&&t.append(!0===s?K([n],r,i):null===s?n:n+\"[]\",c(e))})),!1;return!!H(e)||(t.append(K(o,n,i),c(e)),!1)}const l=[],d=Object.assign(k,{defaultVisitor:u,convertValue:c,isVisitable:H});if(!B.isObject(e))throw new TypeError(\"data must be an object\");return function e(n,r){if(!B.isUndefined(n)){if(-1!==l.indexOf(n))throw Error(\"Circular reference detected in \"+r.join(\".\"));l.push(n),B.forEach(n,(function(n,i){!0===(!(B.isUndefined(n)||null===n)&&o.call(t,n,B.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function Y(e){const t={\"!\":\"%21\",\"'\":\"%27\",\"(\":\"%28\",\")\":\"%29\",\"~\":\"%7E\",\"%20\":\"+\",\"%00\":\"\\0\"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function X(e,t){this._pairs=[],e&&W(e,this,t)}const q=X.prototype;function J(e){return encodeURIComponent(e).replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,\"+\").replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\")}function z(e,t,n){if(!t)return e;const r=n&&n.encode||J,o=n&&n.serialize;let i;if(i=o?o(t,n):B.isURLSearchParams(t)?t.toString():new X(t,n).toString(r),i){const t=e.indexOf(\"#\");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf(\"?\")?\"?\":\"&\")+i}return e}q.append=function(e,t){this._pairs.push([e,t])},q.toString=function(e){const t=e?function(t){return e.call(this,t,Y)}:Y;return this._pairs.map((function(e){return t(e[0])+\"=\"+t(e[1])}),\"\").join(\"&\")};var $=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q={isBrowser:!0,classes:{URLSearchParams:\"undefined\"!=typeof URLSearchParams?URLSearchParams:X,FormData:\"undefined\"!=typeof FormData?FormData:null,Blob:\"undefined\"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return(\"undefined\"==typeof navigator||\"ReactNative\"!==(e=navigator.product)&&\"NativeScript\"!==e&&\"NS\"!==e)&&\"undefined\"!=typeof window&&\"undefined\"!=typeof document})(),isStandardBrowserWebWorkerEnv:\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&\"function\"==typeof self.importScripts,protocols:[\"http\",\"https\",\"file\",\"blob\",\"url\",\"data\"]};function ee(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&B.isArray(r)?r.length:i,a?(B.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&B.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&B.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(B.isFormData(e)&&B.isFunction(e.entries)){const n={};return B.forEachEntry(e,((e,r)=>{t(function(e){return B.matchAll(/\\w+|\\[(\\w*)]/g,e).map((e=>\"[]\"===e[0]?\"\":e[1]||e[0]))}(e),r,n,0)})),n}return null}const te={\"Content-Type\":void 0},ne={transitional:Z,adapter:[\"xhr\",\"http\"],transformRequest:[function(e,t){const n=t.getContentType()||\"\",r=n.indexOf(\"application/json\")>-1,o=B.isObject(e);if(o&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return r&&r?JSON.stringify(ee(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\",!1),e.toString();let i;if(o){if(n.indexOf(\"application/x-www-form-urlencoded\")>-1)return function(e,t){return W(e,new Q.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Q.isNode&&B.isBuffer(e)?(this.append(t,e.toString(\"base64\")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=B.isFileList(e))||n.indexOf(\"multipart/form-data\")>-1){const t=this.env&&this.env.FormData;return W(i?{\"files[]\":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType(\"application/json\",!1),function(e,t,n){if(B.isString(e))try{return(0,JSON.parse)(e),B.trim(e)}catch(e){if(\"SyntaxError\"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ne.transitional,n=t&&t.forcedJSONParsing,r=\"json\"===this.responseType;if(e&&B.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if(\"SyntaxError\"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:\"XSRF-TOKEN\",xsrfHeaderName:\"X-XSRF-TOKEN\",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:\"application/json, text/plain, */*\"}}};B.forEach([\"delete\",\"get\",\"head\"],(function(e){ne.headers[e]={}})),B.forEach([\"post\",\"put\",\"patch\"],(function(e){ne.headers[e]=B.merge(te)}));var re=ne;const oe=B.toObjectSet([\"age\",\"authorization\",\"content-length\",\"content-type\",\"etag\",\"expires\",\"from\",\"host\",\"if-modified-since\",\"if-unmodified-since\",\"last-modified\",\"location\",\"max-forwards\",\"proxy-authorization\",\"referer\",\"retry-after\",\"user-agent\"]),ie=Symbol(\"internals\");function se(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:B.isArray(e)?e.map(ae):String(e)}function ce(e,t,n,r,o){return B.isFunction(r)?r.call(this,t,n):(o&&(t=n),B.isString(t)?B.isString(r)?-1!==t.indexOf(r):B.isRegExp(r)?r.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=se(t);if(!o)throw new Error(\"header name must be a non-empty string\");const i=B.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=ae(e))}const i=(e,t)=>B.forEach(e,((e,n)=>o(e,n,t)));return B.isPlainObject(e)||e instanceof this.constructor?i(e,t):B.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split(\"\\n\").forEach((function(e){o=e.indexOf(\":\"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&oe[n]||(\"set-cookie\"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+\", \"+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=se(e)){const n=B.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(B.isFunction(t))return t.call(this,e,n);if(B.isRegExp(t))return t.exec(e);throw new TypeError(\"parser must be boolean|regexp|function\")}}}has(e,t){if(e=se(e)){const n=B.findKey(this,e);return!(!n||void 0===this[n]||t&&!ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=se(e)){const o=B.findKey(n,e);!o||t&&!ce(0,n[o],o,t)||(delete n[o],r=!0)}}return B.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return B.forEach(this,((r,o)=>{const i=B.findKey(n,o);if(i)return t[i]=ae(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=ae(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return B.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&B.isArray(n)?n.join(\", \"):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+\": \"+t)).join(\"\\n\")}get[Symbol.toStringTag](){return\"AxiosHeaders\"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ie]=this[ie]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=se(e);t[r]||(function(e,t){const n=B.toCamelCase(\" \"+t);[\"get\",\"set\",\"has\"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return B.isArray(e)?e.forEach(r):r(e),this}}ue.accessor([\"Content-Type\",\"Content-Length\",\"Accept\",\"Accept-Encoding\",\"User-Agent\",\"Authorization\"]),B.freezeMethods(ue.prototype),B.freezeMethods(ue);var le=ue;function de(e,t){const n=this||re,r=t||n,o=le.from(r.headers);let i=r.data;return B.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Ee(e){return!(!e||!e.__CANCEL__)}function fe(e,t,n){F.call(this,null==e?\"canceled\":e,F.ERR_CANCELED,t,n),this.name=\"CanceledError\"}B.inherits(fe,F,{__CANCEL__:!0});var Ae=Q.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const s=[];s.push(e+\"=\"+encodeURIComponent(t)),B.isNumber(n)&&s.push(\"expires=\"+new Date(n).toGMTString()),B.isString(r)&&s.push(\"path=\"+r),B.isString(o)&&s.push(\"domain=\"+o),!0===i&&s.push(\"secure\"),document.cookie=s.join(\"; \")},read:function(e){const t=document.cookie.match(new RegExp(\"(^|;\\\\s*)(\"+e+\")=([^;]*)\"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,\"\",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function _e(e,t){return e&&!/^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(t)?function(e,t){return t?e.replace(/\\/+$/,\"\")+\"/\"+t.replace(/^\\/+/,\"\"):e}(e,t):t}var pe=Q.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement(\"a\");let n;function r(n){let r=n;return e&&(t.setAttribute(\"href\",r),r=t.href),t.setAttribute(\"href\",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,\"\"):\"\",host:t.host,search:t.search?t.search.replace(/^\\?/,\"\"):\"\",hash:t.hash?t.hash.replace(/^#/,\"\"):\"\",hostname:t.hostname,port:t.port,pathname:\"/\"===t.pathname.charAt(0)?t.pathname:\"/\"+t.pathname}}return n=r(window.location.href),function(e){const t=B.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function he(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const E=u&&c-u;return E?Math.round(1e3*d/E):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?\"download\":\"upload\"]=!0,e(u)}}const Oe={http:null,xhr:\"undefined\"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=le.from(e.headers).normalize(),i=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener(\"abort\",s)}B.isFormData(r)&&(Q.isStandardBrowserEnv||Q.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType(\"multipart/form-data;\",!1));let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||\"\",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):\"\";o.set(\"Authorization\",\"Basic \"+btoa(t+\":\"+n))}const u=_e(e.baseURL,e.url);function l(){if(!c)return;const r=le.from(\"getAllResponseHeaders\"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new F(\"Request failed with status code \"+n.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:i&&\"text\"!==i&&\"json\"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),z(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,\"onloadend\"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf(\"file:\"))&&setTimeout(l)},c.onabort=function(){c&&(n(new F(\"Request aborted\",F.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new F(\"Network Error\",F.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?\"timeout of \"+e.timeout+\"ms exceeded\":\"timeout exceeded\";const r=e.transitional||Z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new F(t,r.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,c)),c=null},Q.isStandardBrowserEnv){const t=(e.withCredentials||pe(u))&&e.xsrfCookieName&&Ae.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),\"setRequestHeader\"in c&&B.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),B.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&\"json\"!==i&&(c.responseType=e.responseType),\"function\"==typeof e.onDownloadProgress&&c.addEventListener(\"progress\",he(e.onDownloadProgress,!0)),\"function\"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener(\"progress\",he(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(n(!t||t.type?new fe(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener(\"abort\",s)));const d=function(e){const t=/^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(e);return t&&t[1]||\"\"}(u);d&&-1===Q.protocols.indexOf(d)?n(new F(\"Unsupported protocol \"+d+\":\",F.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};B.forEach(Oe,((e,t)=>{if(e){try{Object.defineProperty(e,\"name\",{value:t})}catch(e){}Object.defineProperty(e,\"adapterName\",{value:t})}}));function Ie(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fe(null,e)}function Re(e){return Ie(e),e.headers=le.from(e.headers),e.data=de.call(e,e.transformRequest),-1!==[\"post\",\"put\",\"patch\"].indexOf(e.method)&&e.headers.setContentType(\"application/x-www-form-urlencoded\",!1),(e=>{e=B.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=B.isString(n)?Oe[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new F(`Adapter ${n} is not supported by the environment`,\"ERR_NOT_SUPPORT\");throw new Error(B.hasOwnProp(Oe,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!B.isFunction(r))throw new TypeError(\"adapter is not a function\");return r})(e.adapter||re.adapter)(e).then((function(t){return Ie(e),t.data=de.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t}),(function(t){return Ee(t)||(Ie(e),t&&t.response&&(t.response.data=de.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)}))}const Ne=e=>e instanceof le?e.toJSON():e;function Se(e,t){t=t||{};const n={};function r(e,t,n){return B.isPlainObject(e)&&B.isPlainObject(t)?B.merge.call({caseless:n},e,t):B.isPlainObject(t)?B.merge({},t):B.isArray(t)?t.slice():t}function o(e,t,n){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!B.isUndefined(t))return r(void 0,t)}function s(e,t){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Ne(e),Ne(t),!0)};return B.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);B.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Te={};[\"object\",\"boolean\",\"number\",\"function\",\"string\",\"symbol\"].forEach(((e,t)=>{Te[e]=function(n){return typeof n===e||\"a\"+(t<1?\"n \":\" \")+e}}));const De={};Te.transitional=function(e,t,n){function r(e,t){return\"[Axios v1.4.0] Transitional option '\"+e+\"'\"+t+(n?\". \"+n:\"\")}return(n,o,i)=>{if(!1===e)throw new F(r(o,\" has been removed\"+(t?\" in \"+t:\"\")),F.ERR_DEPRECATED);return t&&!De[o]&&(De[o]=!0,console.warn(r(o,\" has been deprecated since v\"+t+\" and will be removed in the near future\"))),!e||e(n,o,i)}};var me={assertOptions:function(e,t,n){if(\"object\"!=typeof e)throw new F(\"options must be an object\",F.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new F(\"option \"+i+\" must be \"+n,F.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new F(\"Unknown option \"+i,F.ERR_BAD_OPTION)}},validators:Te};const Ce=me.validators;class ye{constructor(e){this.defaults=e,this.interceptors={request:new $,response:new $}}request(e,t){\"string\"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&me.assertOptions(n,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),null!=r&&(B.isFunction(r)?t.paramsSerializer={serialize:r}:me.assertOptions(r,{encode:Ce.function,serialize:Ce.function},!0)),t.method=(t.method||this.defaults.method||\"get\").toLowerCase(),i=o&&B.merge(o.common,o[t.method]),i&&B.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\",\"common\"],(e=>{delete o[e]})),t.headers=le.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){\"function\"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!a){const e=[Re.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=s.length;let E=t;for(d=0;d<l;){const e=s[d++],t=s[d++];try{E=e(E)}catch(e){t.call(this,e);break}}try{u=Re.call(this,E)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return z(_e((e=Se(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}B.forEach([\"delete\",\"get\",\"head\",\"options\"],(function(e){ye.prototype[e]=function(t,n){return this.request(Se(n||{},{method:e,url:t,data:(n||{}).data}))}})),B.forEach([\"post\",\"put\",\"patch\"],(function(e){function t(t){return function(n,r,o){return this.request(Se(o||{},{method:e,headers:t?{\"Content-Type\":\"multipart/form-data\"}:{},url:n,data:r}))}}ye.prototype[e]=t(),ye.prototype[e+\"Form\"]=t(!0)}));var ge=ye;class Pe{constructor(e){if(\"function\"!=typeof e)throw new TypeError(\"executor must be a function.\");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new fe(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Pe((function(t){e=t})),cancel:e}}}var Le=Pe;const Me={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Me).forEach((([e,t])=>{Me[t]=e}));var ve=Me;const be=function e(t){const n=new ge(t),o=r(ge.prototype.request,n);return B.extend(o,ge.prototype,n,{allOwnKeys:!0}),B.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Se(t,n))},o}(re);be.Axios=ge,be.CanceledError=fe,be.CancelToken=Le,be.isCancel=Ee,be.VERSION=\"1.4.0\",be.toFormData=W,be.AxiosError=F,be.Cancel=be.CanceledError,be.all=function(e){return Promise.all(e)},be.spread=function(e){return function(t){return e.apply(null,t)}},be.isAxiosError=function(e){return B.isObject(e)&&!0===e.isAxiosError},be.mergeConfig=Se,be.AxiosHeaders=le,be.formToJSON=e=>ee(B.isHTMLForm(e)?new FormData(e):e),be.HttpStatusCode=ve,be.default=be,e.exports=be}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var r=n(607);return r.default})()));\n\n//# sourceURL=webpack://PWUISDK/./node_modules/pipwave-ekyc-sdk/dist/pw-bundle.js?");
3389
3389
 
3390
3390
  /***/ }),
3391
3391
 
@@ -3770,7 +3770,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
3770
3770
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3771
3771
 
3772
3772
  "use strict";
3773
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst uisdk_1 = __webpack_require__(/*! ../uisdk */ \"./src/uisdk.ts\");\n// plugins\nconst card_camera_1 = __importDefault(__webpack_require__(/*! ../plugins/card-camera */ \"./src/plugins/card-camera.ts\"));\n// components\nconst components_1 = __webpack_require__(/*! ../components/components */ \"./src/components/components.ts\");\nconst stepper_1 = __importDefault(__webpack_require__(/*! ../components/stepper */ \"./src/components/stepper.ts\"));\nconst dropdownButton_1 = __importDefault(__webpack_require__(/*! ../components/dropdownButton */ \"./src/components/dropdownButton.ts\"));\n// assets\nconst icon_id_card_png_1 = __importDefault(__webpack_require__(/*! ../assets/img/icon-id-card.png */ \"./src/assets/img/icon-id-card.png\"));\nconst icon_passport_png_1 = __importDefault(__webpack_require__(/*! ../assets/img/icon-passport.png */ \"./src/assets/img/icon-passport.png\"));\n// pages\nconst MainPage_1 = __importDefault(__webpack_require__(/*! ../classes/MainPage */ \"./src/classes/MainPage.ts\"));\nconst ConfirmDoc_1 = __importDefault(__webpack_require__(/*! ./ConfirmDoc */ \"./src/pageClass/ConfirmDoc.ts\"));\nconst getGoogleIcon_1 = __webpack_require__(/*! ../helper/getGoogleIcon */ \"./src/helper/getGoogleIcon.ts\");\nconst imagesHelper_1 = __webpack_require__(/*! ../helper/imagesHelper */ \"./src/helper/imagesHelper.ts\");\nconst doc_1 = __webpack_require__(/*! ../constant/doc */ \"./src/constant/doc.ts\");\nclass VerifyId extends MainPage_1.default {\n constructor(mainScreenId, displayMode) {\n super(mainScreenId, displayMode);\n this.cameraId = \"pw-camera-container\";\n }\n render() {\n this.renderContent(this.createPage());\n }\n createPage() {\n var _a;\n const verifyIdDiv = document.createElement(\"div\");\n const navigationDiv = document.createElement(\"div\");\n navigationDiv.classList.add(\"pw-relative\", \"pw-text-center\", \"pw-mb-6\");\n const stepper = new stepper_1.default();\n const stepperElement = stepper.render(2, 5);\n navigationDiv.classList.add(\"pw-pt-3\");\n navigationDiv.appendChild(stepperElement);\n const closeButton = document.createElement(\"div\");\n closeButton.classList.add(\"pw-absolute\", \"pw-right-0\", \"pw-top-0\");\n const closeIcon = (0, getGoogleIcon_1.getGoogleIcon)(\"close\");\n closeButton.addEventListener(\"click\", () => this.closeMainPage());\n closeButton.appendChild(closeIcon);\n navigationDiv.appendChild(closeButton);\n verifyIdDiv.appendChild(navigationDiv);\n const titleDiv = document.createElement(\"div\");\n titleDiv.classList.add(\"pw-text-3xl\", \"pw-font-medium\", \"pw-mb-6\");\n titleDiv.innerHTML = \"Verify your ID\";\n verifyIdDiv.appendChild(titleDiv);\n // issuing country/region\n const countries = uisdk_1.pwInstance.issuingCountries;\n this.defaultCountry = ((_a = uisdk_1.pwInstance.defaultCountry) === null || _a === void 0 ? void 0 : _a.iso_code) || \"\";\n const fieldName = \"Issuing country/region\";\n // - dropdown button label\n const country = document.createElement(\"div\");\n country.classList.add(\"pw-mb-3\");\n country.innerHTML = fieldName;\n verifyIdDiv.appendChild(country);\n // - dropdown button instance\n const countryDropdown = new dropdownButton_1.default(\"issuing-country\", fieldName, countries.map((country) => {\n return { value: country.iso_code, label: country.name };\n }), this.defaultCountry);\n // - dropdown button event listener\n countryDropdown.onUpdateValue = (value) => {\n this.defaultCountry = value;\n };\n // - dropdown button render\n const countryDropdownDiv = countryDropdown.render();\n countryDropdownDiv.classList.add(\"pw-mb-6\");\n verifyIdDiv.appendChild(countryDropdownDiv);\n // ID card\n const documentTypeDiv = document.createElement(\"div\");\n documentTypeDiv.classList.add(\"pw-mb-3\");\n documentTypeDiv.innerHTML = \"Document type\";\n verifyIdDiv.appendChild(documentTypeDiv);\n const idButton = (0, components_1.createOutlineButton)(\"ID Card\", icon_id_card_png_1.default);\n idButton.classList.add(\"pw-mb-3\");\n // ID card button click event\n idButton.addEventListener(\"click\", () => {\n this.createCameraDiv();\n this.onClickDoc(\"national_identity_document\");\n });\n verifyIdDiv.appendChild(idButton);\n // License button click event\n const driverLicense = (0, components_1.createOutlineButton)(\"Driver's License\", icon_id_card_png_1.default);\n driverLicense.classList.add(\"pw-mb-3\");\n driverLicense.addEventListener(\"click\", () => {\n this.createCameraDiv();\n this.onClickDoc(\"driving_license\");\n });\n verifyIdDiv.appendChild(driverLicense);\n // Passport button click event\n const passport = (0, components_1.createOutlineButton)(\"Passport\", icon_passport_png_1.default);\n passport.classList.add(\"pw-mb-3\");\n passport.addEventListener(\"click\", () => {\n this.createCameraDiv();\n this.onClickDoc(\"passport\");\n });\n verifyIdDiv.appendChild(passport);\n return verifyIdDiv;\n }\n createCameraDiv() {\n const screen = document.getElementById(this.mainScreenId);\n const cameraDiv = document.createElement(\"div\");\n cameraDiv.setAttribute(\"id\", this.cameraId);\n screen === null || screen === void 0 ? void 0 : screen.appendChild(cameraDiv);\n }\n onClickDoc(docType) {\n const typeMapping = doc_1.cardTypeMapping[docType];\n const idCam = new card_camera_1.default(this.cameraId, typeMapping.front, this.mainScreenId);\n idCam.init();\n idCam.listenToCardCapture((payload) => {\n const { type, image } = payload.detail;\n // only need front img\n if (type === typeMapping.front && !typeMapping.back) {\n (0, imagesHelper_1.setFrontImg)(image);\n idCam.stopVideoStream();\n this.onRedirectDocConfirmPg(docType);\n }\n // need both front and back img\n else if (type === typeMapping.front) {\n (0, imagesHelper_1.setFrontImg)(image);\n this.renderLoadingScreen();\n setTimeout(() => {\n this.updateOverlayContent(this.swapSideDisplay());\n // idCam.flipOverlayContainer();\n // this.flipCard();\n }, 200);\n setTimeout(() => {\n this.removeOverlayElement();\n idCam.updateType(typeMapping.back);\n }, 2000);\n }\n else if (type === typeMapping.back) {\n (0, imagesHelper_1.setBackImg)(image);\n idCam.stopVideoStream();\n this.onRedirectDocConfirmPg(docType);\n }\n });\n }\n onRedirectDocConfirmPg(docType) {\n const confirmDoc = new ConfirmDoc_1.default(this.mainScreenId, this.displayMode, this.defaultCountry || \"\", docType);\n this.clearScreen();\n confirmDoc.render();\n }\n swapSideDisplay() {\n const swapSide = document.createElement(\"div\");\n swapSide.classList.add(\"pw-absolute\", \"pw-left-1/2\", \"-pw-translate-x-1/2\", \"pw-top-1/3\");\n const cardDescription = document.createElement(\"div\");\n cardDescription.classList.add(\"pw-text-center\", \"pw-mb-5\", \"pw-text-2xl\", \"pw-text-white\");\n cardDescription.innerHTML = \"Flip the other side\";\n swapSide.appendChild(cardDescription);\n const cardContainer = document.createElement(\"div\");\n cardContainer.classList.add(\"pw-text-center\");\n const card = (0, getGoogleIcon_1.getGoogleIcon)(\"credit_card\");\n card.classList.add(\"pw-text-white\", \"pw-text-center\", \"pw-animate-camera\");\n card.style.fontSize = \"77px\";\n cardContainer.appendChild(card);\n swapSide.appendChild(cardContainer);\n return swapSide;\n }\n}\nexports[\"default\"] = VerifyId;\n\n\n//# sourceURL=webpack://PWUISDK/./src/pageClass/VerifyId.ts?");
3773
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst uisdk_1 = __webpack_require__(/*! ../uisdk */ \"./src/uisdk.ts\");\n// plugins\nconst card_camera_1 = __importDefault(__webpack_require__(/*! ../plugins/card-camera */ \"./src/plugins/card-camera.ts\"));\n// components\nconst components_1 = __webpack_require__(/*! ../components/components */ \"./src/components/components.ts\");\nconst stepper_1 = __importDefault(__webpack_require__(/*! ../components/stepper */ \"./src/components/stepper.ts\"));\nconst dropdownButton_1 = __importDefault(__webpack_require__(/*! ../components/dropdownButton */ \"./src/components/dropdownButton.ts\"));\n// assets\nconst icon_id_card_png_1 = __importDefault(__webpack_require__(/*! ../assets/img/icon-id-card.png */ \"./src/assets/img/icon-id-card.png\"));\nconst icon_passport_png_1 = __importDefault(__webpack_require__(/*! ../assets/img/icon-passport.png */ \"./src/assets/img/icon-passport.png\"));\n// pages\nconst MainPage_1 = __importDefault(__webpack_require__(/*! ../classes/MainPage */ \"./src/classes/MainPage.ts\"));\nconst ConfirmDoc_1 = __importDefault(__webpack_require__(/*! ./ConfirmDoc */ \"./src/pageClass/ConfirmDoc.ts\"));\nconst getGoogleIcon_1 = __webpack_require__(/*! ../helper/getGoogleIcon */ \"./src/helper/getGoogleIcon.ts\");\nconst imagesHelper_1 = __webpack_require__(/*! ../helper/imagesHelper */ \"./src/helper/imagesHelper.ts\");\nconst doc_1 = __webpack_require__(/*! ../constant/doc */ \"./src/constant/doc.ts\");\nclass VerifyId extends MainPage_1.default {\n constructor(mainScreenId, displayMode) {\n super(mainScreenId, displayMode);\n this.cameraId = \"pw-camera-container\";\n }\n render() {\n this.renderContent(this.createPage());\n }\n createPage() {\n var _a;\n const verifyIdDiv = document.createElement(\"div\");\n const navigationDiv = document.createElement(\"div\");\n navigationDiv.classList.add(\"pw-relative\", \"pw-text-center\", \"pw-mb-6\");\n const stepper = new stepper_1.default();\n const stepperElement = stepper.render(2, 5);\n navigationDiv.classList.add(\"pw-pt-3\");\n navigationDiv.appendChild(stepperElement);\n const closeButton = document.createElement(\"div\");\n closeButton.classList.add(\"pw-absolute\", \"pw-right-0\", \"pw-top-0\");\n const closeIcon = (0, getGoogleIcon_1.getGoogleIcon)(\"close\");\n closeButton.addEventListener(\"click\", () => this.closeMainPage());\n closeButton.appendChild(closeIcon);\n navigationDiv.appendChild(closeButton);\n verifyIdDiv.appendChild(navigationDiv);\n const titleDiv = document.createElement(\"div\");\n titleDiv.classList.add(\"pw-text-3xl\", \"pw-font-medium\", \"pw-mb-6\");\n titleDiv.innerHTML = \"Verify your ID\";\n verifyIdDiv.appendChild(titleDiv);\n // issuing country/region\n const countries = uisdk_1.pwInstance.issuingCountries;\n this.defaultCountry = ((_a = uisdk_1.pwInstance.defaultCountry) === null || _a === void 0 ? void 0 : _a.iso_code) || \"\";\n const fieldName = \"Issuing country/region\";\n // - dropdown button label\n const country = document.createElement(\"div\");\n country.classList.add(\"pw-mb-3\");\n country.innerHTML = fieldName;\n verifyIdDiv.appendChild(country);\n // - dropdown button instance\n const countryDropdown = new dropdownButton_1.default(\"issuing-country\", fieldName, countries.map((country) => {\n return { value: country.iso_code, label: country.name };\n }), this.defaultCountry);\n // - dropdown button event listener\n countryDropdown.onUpdateValue = (value) => {\n this.defaultCountry = value;\n };\n // - dropdown button render\n const countryDropdownDiv = countryDropdown.render();\n countryDropdownDiv.classList.add(\"pw-mb-6\");\n verifyIdDiv.appendChild(countryDropdownDiv);\n // verification type\n const { excludedDocTypes = [] } = uisdk_1.pwInstance.tokenDetails;\n const supportedDocTypes = [\n doc_1.DOC_TYPE.NATIONAL_ID,\n doc_1.DOC_TYPE.LICENSE,\n doc_1.DOC_TYPE.PASSPORT,\n ];\n const isAllDocTypeExcluded = supportedDocTypes.every((docType) => excludedDocTypes.includes(docType));\n if (isAllDocTypeExcluded) {\n return this.openErrorPage(\"Something went wrong\", \"We could not locate a suitable verification type for you. Please contact customer support for assistance.\");\n }\n else {\n // ID card\n if (!excludedDocTypes.includes(doc_1.DOC_TYPE.NATIONAL_ID)) {\n const documentTypeDiv = document.createElement(\"div\");\n documentTypeDiv.classList.add(\"pw-mb-3\");\n documentTypeDiv.innerHTML = \"Document type\";\n verifyIdDiv.appendChild(documentTypeDiv);\n const idButton = (0, components_1.createOutlineButton)(\"ID Card\", icon_id_card_png_1.default);\n idButton.classList.add(\"pw-mb-3\");\n // ID card button click event\n idButton.addEventListener(\"click\", () => {\n this.createCameraDiv();\n this.onClickDoc(\"national_identity_document\");\n });\n verifyIdDiv.appendChild(idButton);\n }\n if (!excludedDocTypes.includes(doc_1.DOC_TYPE.LICENSE)) {\n // License button click event\n const driverLicense = (0, components_1.createOutlineButton)(\"Driver's License\", icon_id_card_png_1.default);\n driverLicense.classList.add(\"pw-mb-3\");\n driverLicense.addEventListener(\"click\", () => {\n this.createCameraDiv();\n this.onClickDoc(\"driving_license\");\n });\n verifyIdDiv.appendChild(driverLicense);\n }\n if (!excludedDocTypes.includes(doc_1.DOC_TYPE.PASSPORT)) {\n // Passport button click event\n const passport = (0, components_1.createOutlineButton)(\"Passport\", icon_passport_png_1.default);\n passport.classList.add(\"pw-mb-3\");\n passport.addEventListener(\"click\", () => {\n this.createCameraDiv();\n this.onClickDoc(\"passport\");\n });\n verifyIdDiv.appendChild(passport);\n }\n }\n return verifyIdDiv;\n }\n createCameraDiv() {\n const screen = document.getElementById(this.mainScreenId);\n const cameraDiv = document.createElement(\"div\");\n cameraDiv.setAttribute(\"id\", this.cameraId);\n screen === null || screen === void 0 ? void 0 : screen.appendChild(cameraDiv);\n }\n onClickDoc(docType) {\n const typeMapping = doc_1.cardTypeMapping[docType];\n const idCam = new card_camera_1.default(this.cameraId, typeMapping.front, this.mainScreenId);\n idCam.init();\n idCam.listenToCardCapture((payload) => {\n const { type, image } = payload.detail;\n // only need front img\n if (type === typeMapping.front && !typeMapping.back) {\n (0, imagesHelper_1.setFrontImg)(image);\n idCam.stopVideoStream();\n this.onRedirectDocConfirmPg(docType);\n }\n // need both front and back img\n else if (type === typeMapping.front) {\n (0, imagesHelper_1.setFrontImg)(image);\n this.renderLoadingScreen();\n setTimeout(() => {\n this.updateOverlayContent(this.swapSideDisplay());\n // idCam.flipOverlayContainer();\n // this.flipCard();\n }, 200);\n setTimeout(() => {\n this.removeOverlayElement();\n idCam.updateType(typeMapping.back);\n }, 2000);\n }\n else if (type === typeMapping.back) {\n (0, imagesHelper_1.setBackImg)(image);\n idCam.stopVideoStream();\n this.onRedirectDocConfirmPg(docType);\n }\n });\n }\n onRedirectDocConfirmPg(docType) {\n const confirmDoc = new ConfirmDoc_1.default(this.mainScreenId, this.displayMode, this.defaultCountry || \"\", docType);\n this.clearScreen();\n confirmDoc.render();\n }\n swapSideDisplay() {\n const swapSide = document.createElement(\"div\");\n swapSide.classList.add(\"pw-absolute\", \"pw-left-1/2\", \"-pw-translate-x-1/2\", \"pw-top-1/3\");\n const cardDescription = document.createElement(\"div\");\n cardDescription.classList.add(\"pw-text-center\", \"pw-mb-5\", \"pw-text-2xl\", \"pw-text-white\");\n cardDescription.innerHTML = \"Flip the other side\";\n swapSide.appendChild(cardDescription);\n const cardContainer = document.createElement(\"div\");\n cardContainer.classList.add(\"pw-text-center\");\n const card = (0, getGoogleIcon_1.getGoogleIcon)(\"credit_card\");\n card.classList.add(\"pw-text-white\", \"pw-text-center\", \"pw-animate-camera\");\n card.style.fontSize = \"77px\";\n cardContainer.appendChild(card);\n swapSide.appendChild(cardContainer);\n return swapSide;\n }\n}\nexports[\"default\"] = VerifyId;\n\n\n//# sourceURL=webpack://PWUISDK/./src/pageClass/VerifyId.ts?");
3774
3774
 
3775
3775
  /***/ }),
3776
3776
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipwave-ekyc-uikit",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "main": "dist/pw-bundle.js",
6
6
  "scripts": {
@@ -38,6 +38,6 @@
38
38
  "material-design-icons": "^3.0.1",
39
39
  "moment": "^2.29.4",
40
40
  "pikaday": "^1.8.2",
41
- "pipwave-ekyc-sdk": "^1.1.0"
41
+ "pipwave-ekyc-sdk": "^1.2.0"
42
42
  }
43
43
  }