var style = document.createElement('style'); var str_css= " @import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Source+Sans+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap');"; str_css+=""; str_css+=" .akt_account_style_sheet{}"; str_css+=" .akt_account_div_signin_visible {visibility: visible; top:0px; xopacity: 1; transition: opacity 2s linear,top 1s;z-index:9999;}"; str_css+=" .akt_account_div_signin_hidden {visibility: hidden; xopacity: 0;top:-150px; transition: visibility 0s 1s, opacity 1s linear,top 0.5s;z-index:9999;}"; str_css+=""; str_css+=" .akt_account_td_lable{width:130px;height:20px;padding-top:30px;padding-left:20px;padding-right:10px;font-family: 'Source Sans Pro', sans-serif;font-size:14px;font-weight:bold;color:#9D9DA7; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }"; str_css+=" .akt_account_td_or{width:20px;height:20px;padding-left:20px;padding-right:10px;font-family: 'Source Sans Pro', sans-serif;font-size:14px;font-weight:bold;font-style:italic;}"; str_css+=" .akt_account_td_txt{width:130px;height:25px;padding-left:20px;padding-right:10px;}"; str_css+=" .akt_account_txt{width:130px;height:20px;padding-left:3px;padding-right:3px;background-color:black;border:none;border-bottom:solid 1px #454550;color:white;font-family: 'Source Sans Pro', sans-serif;font-size:14px;}"; str_css+=" .akt_account_txt:hover{border-bottom:solid 1px #ffffff;}"; str_css+=" .akt_account_txt:focus{border-bottom:solid 1px #ffffff;}"; str_css+=""; str_css+=" .akt_account_td_otp{width:16px;height:20px;padding-right:5px;}"; str_css+=" .akt_account_otp{width:11px;height:20px;padding-left:4px;padding-right:4px;background-color:black;border:none;border-bottom:solid 1px #454550;color:white;font-family: 'Source Sans Pro', sans-serif;font-size:14px;text-align:center;}"; str_css+=" .akt_account_td_img{padding-left:20px;padding-right:20px;padding-top:35px;vertical-align:top;}"; str_css+=" .akt_account_btn_signin{display:inline-block;width:100px;height:20px;color:white;font-family: 'Source Sans Pro', sans-serif;font-size:14px;xfont-weight:bold;background-color:#454550;border-radius:3px;text-align:center;text-decoration:none;border:none;outline:none;}"; str_css+=" .akt_account_btn_signin:hover{background-color:#c02c45;}"; str_css+=" .akt_account_btn_signin:focus{background-color:#c02c45;}"; str_css+=" .akt_account_div_signin{width:100px;height:20px;color:white;font-family: 'Source Sans Pro', sans-serif;font-size:14px;xfont-weight:bold;background-color:#454550;border-radius:3px;text-align:center;text-decoration:none;border:none;outline:none;}"; str_css+=""; str_css+=" .akt_account_td_puzzle_q{width:220px;height:20px;padding-right:00px;font-family: 'Source Sans Pro', sans-serif;font-size:14px;}"; str_css+=" .akt_account_td_puzzle_a{width:30px;height:20px;padding-right:10px;}"; str_css+=" .akt_account_puzzle_a{display:block;width:25px;height:20px;border:none;color:white;font-family: 'Source Sans Pro', sans-serif;font-size:14px;text-align:center;font-weight:bold;border:solid 1px #454550;text-decoration:none;outline:none;border-radius:5px;}"; str_css+=" .akt_account_puzzle_a:hover{background-color:#454550;border:solid 1px white;}"; str_css+=" .akt_account_puzzle_a:focus{background-color:#454550;border:solid 1px white;}"; str_css+=" .akt_account_puzzle_a_selected{display:block;width:25px;height:20px;color:white;font-family: 'Source Sans Pro', sans-serif;font-size:14px;text-align:center;font-weight:bold;text-decoration:none;border:none;outline:none;background-color:#c02c45;border:solid 1px white;border-radius:5px;}"; str_css+=" .akt_account_chk_box{margin-left:5px;width:20px;height:20px;padding-left:3px;padding-right:3px;background-color:#9D9DA7;border:none;color:black;font-family: 'Source Sans Pro', sans-serif;font-size:10px;text-align:center;font-weight:bold;text-decoration:none;border:none;outline:none;}"; str_css+=""; str_css+=" .akt_account_td_top_row{padding-top:00px;padding-bottom:2px;height:20px;background-color:#454550;text-align:center;}"; str_css+=" .akt_account_td_top_atag{font-family: 'Source Sans Pro', sans-serif;font-size:14px;font-style:italic;text-decoration:none;border:none;outline:none;color:white; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor:pointer;}"; str_css+=" .akt_account_td_top_atag:hover{text-decoration:underline;color:white;}"; str_css+=""; str_css+=" .akt_account_td_bottom_row{text-align:right;padding-right:15px;padding-top:0px;vertical-align:top;}"; str_css+=" .akt_account_td_bottom_atag{font-family: 'Source Sans Pro', sans-serif;font-size:12px;font-style:italic;color:#7f7f86;text-decoration:none;border:none;outline:none; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }"; str_css+=" .akt_account_td_bottom_atag:hover{text-decoration:underline;color:white;cursor:pointer;}"; str_css+=""; str_css+=" .akt_account_td_error{height:20px;font-family: 'Source Sans Pro', sans-serif;font-size:14px;font-weight:bold;background-color:#c02c45;color:#ffffff;text-align:center; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }"; str_css+=""; str_css+=" .akt_account_link{font-family: 'Source Sans Pro', sans-serif;font-size:14px;color:#9d9da7;-webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; text-decoration:none;border:none;outline:none;}"; str_css+=""; str_css+=" .akt_account_div_body_margin_top_visible{height:150px;transition: height 1s;}"; str_css+=" .akt_account_div_body_margin_top_hidden{height:0px;transition: height 0.5s;}"; str_css+=" .akt_account_div_btn_visible{xtop:150px;transition: top 1s;z-index:9999;}"; str_css+=" .akt_account_div_btn_hidden{top:0px;transition: top 0.5s;z-index:9999;}"; str_css+=""; str_css+=""; str_css+=" .auth_rgb_td{width:20px;height:20px;border:solid 1px #454550;border-radius:5px;fill:white;font-family: 'Share Tech Mono', monospace;text-align:center;font-size:15px;}"; str_css+=" .auth_rgb_td_sep{width:5px;}"; str_css+=""; str_css+=".iti {"; str_css+=" position: relative;"; str_css+=" display: inline-block; }"; str_css+=" .iti * {"; str_css+=" font-family: 'Source Sans Pro', sans-serif;"; str_css+=" font-size:14px;"; str_css+=" box-sizing: border-box;"; str_css+=" -moz-box-sizing: border-box; }"; str_css+=" .iti__hide {"; str_css+=" display: none; }"; str_css+=" .iti__v-hide {"; str_css+=" visibility: hidden; }"; str_css+=" .iti input, .iti input[type=text], .iti input[type=tel] {"; str_css+=" font-family: 'Source Sans Pro', sans-serif;"; str_css+=" font-size:14px;"; str_css+=" position: relative;"; str_css+=" z-index: 0;"; str_css+=" margin-top: 0 !important;"; str_css+=" margin-bottom: 0 !important;"; str_css+=" padding-right: 36px;"; str_css+=" margin-right: 0; }"; str_css+=" .iti__flag-container {"; str_css+=" position: absolute;"; str_css+=" top: 0;"; str_css+=" bottom: 0;"; str_css+=" right: 0;"; str_css+=" padding: 1px; }"; str_css+=" .iti__selected-flag {"; str_css+=" z-index: 1;"; str_css+=" position: relative;"; str_css+=" display: flex;"; str_css+=" align-items: center;"; str_css+=" height: 100%;"; str_css+=" padding: 0 6px 0 8px; }"; str_css+=" .iti__arrow {"; str_css+=" margin-left: 6px;"; str_css+=" width: 0;"; str_css+=" height: 0;"; str_css+=" border-left: 3px solid transparent;"; str_css+=" border-right: 3px solid transparent;"; str_css+=" border-top: 4px solid #555; }"; str_css+=" .iti__arrow--up {"; str_css+=" border-top: none;"; str_css+=" border-bottom: 4px solid #555; }"; str_css+=" .iti__country-list {"; str_css+=" position: absolute;"; str_css+=" z-index: 2;"; str_css+=" list-style: none;"; str_css+=" text-align: left;"; str_css+=" padding: 0;"; str_css+=" margin: 0 0 0 -1px;"; str_css+=" box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);"; str_css+=" background-color: black; "; str_css+=" color:#9797a6;"; str_css+=" font-family: 'Source Sans Pro', sans-serif;"; str_css+=" font-size:14px;"; str_css+=" border: none;"; str_css+=" white-space: nowrap;"; str_css+=" max-height: 200px;"; str_css+=" overflow-y: scroll;"; str_css+=" -webkit-overflow-scrolling: touch; }"; str_css+=" .iti__country-list--dropup {"; str_css+=" bottom: 100%;"; str_css+=" margin-bottom: -1px; }"; str_css+=" @media (max-width: 500px) {"; str_css+=" .iti__country-list {"; str_css+=" white-space: normal; } }"; str_css+=" .iti__flag-box {"; str_css+=" display: inline-block;"; str_css+=" width: 20px; }"; str_css+=" .iti__divider {"; str_css+=" padding-bottom: 5px;"; str_css+=" margin-bottom: 5px;"; str_css+=" border-bottom: 1px solid #CCC; }"; str_css+=" .iti__country {"; str_css+=" padding: 5px 10px;"; str_css+=" outline: none; }"; str_css+=" .iti__dial-code {"; str_css+=" color: white; }"; str_css+=" .iti__country.iti__highlight {"; str_css+=" background-color: #1a1a20; }"; str_css+=" .iti__flag-box, .iti__country-name, .iti__dial-code {"; str_css+=" vertical-align: middle; }"; str_css+=" .iti__flag-box, .iti__country-name {"; str_css+=" margin-right: 6px; }"; str_css+=" .iti--allow-dropdown input, .iti--allow-dropdown input[type=text], .iti--allow-dropdown input[type=tel], .iti--separate-dial-code input, .iti--separate-dial-code input[type=text], .iti--separate-dial-code input[type=tel] {"; str_css+=" padding-right: 6px;"; str_css+=" padding-left: 52px;"; str_css+=" margin-left: 0; }"; str_css+=" .iti--allow-dropdown .iti__flag-container, .iti--separate-dial-code .iti__flag-container {"; str_css+=" right: auto;"; str_css+=" left: 0; }"; str_css+=" .iti--allow-dropdown .iti__flag-container:hover {"; str_css+=" cursor: pointer; }"; str_css+=" .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {"; str_css+=" background-color: rgba(0, 0, 0, 0.05); }"; str_css+=" .iti--allow-dropdown input[disabled] + .iti__flag-container:hover,"; str_css+=" .iti--allow-dropdown input[readonly] + .iti__flag-container:hover {"; str_css+=" cursor: default; }"; str_css+=" .iti--allow-dropdown input[disabled] + .iti__flag-container:hover .iti__selected-flag,"; str_css+=" .iti--allow-dropdown input[readonly] + .iti__flag-container:hover .iti__selected-flag {"; str_css+=" background-color: transparent; }"; str_css+=" .iti--separate-dial-code .iti__selected-flag {"; str_css+=" background-color: rgba(0, 0, 0, 0.05); }"; str_css+=" .iti--separate-dial-code .iti__selected-dial-code {"; str_css+=" margin-left: 6px; }"; str_css+=" .iti--container {"; str_css+=" position: absolute;"; str_css+=" top: -1000px;"; str_css+=" left: -1000px;"; str_css+=" z-index: 1060;"; str_css+=" padding: 1px; }"; str_css+=" .iti--container:hover {"; str_css+=" cursor: pointer; }"; str_css+=""; str_css+=".iti-mobile .iti--container {"; str_css+=" top: 30px;"; str_css+=" bottom: 30px;"; str_css+=" left: 30px;"; str_css+=" right: 30px;"; str_css+=" position: fixed; }"; str_css+=""; str_css+=".iti-mobile .iti__country-list {"; str_css+=" max-height: 100%;"; str_css+=" width: 100%; }"; str_css+=""; str_css+=".iti-mobile .iti__country {"; str_css+=" padding: 10px 10px;"; str_css+=" line-height: 1.5em; }"; str_css+=""; str_css+=".iti__flag {"; str_css+=" width: 20px; }"; str_css+=" .iti__flag.iti__be {"; str_css+=" width: 18px; }"; str_css+=" .iti__flag.iti__ch {"; str_css+=" width: 15px; }"; str_css+=" .iti__flag.iti__mc {"; str_css+=" width: 19px; }"; str_css+=" .iti__flag.iti__ne {"; str_css+=" width: 18px; }"; str_css+=" .iti__flag.iti__np {"; str_css+=" width: 13px; }"; str_css+=" .iti__flag.iti__va {"; str_css+=" width: 15px; }"; str_css+=" @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {"; str_css+=" .iti__flag {"; str_css+=" background-size: 5652px 15px; } }"; str_css+=" .iti__flag.iti__ac {"; str_css+=" height: 10px;"; str_css+=" background-position: 0px 0px; }"; str_css+=" .iti__flag.iti__ad {"; str_css+=" height: 14px;"; str_css+=" background-position: -22px 0px; }"; str_css+=" .iti__flag.iti__ae {"; str_css+=" height: 10px;"; str_css+=" background-position: -44px 0px; }"; str_css+=" .iti__flag.iti__af {"; str_css+=" height: 14px;"; str_css+=" background-position: -66px 0px; }"; str_css+=" .iti__flag.iti__ag {"; str_css+=" height: 14px;"; str_css+=" background-position: -88px 0px; }"; str_css+=" .iti__flag.iti__ai {"; str_css+=" height: 10px;"; str_css+=" background-position: -110px 0px; }"; str_css+=" .iti__flag.iti__al {"; str_css+=" height: 15px;"; str_css+=" background-position: -132px 0px; }"; str_css+=" .iti__flag.iti__am {"; str_css+=" height: 10px;"; str_css+=" background-position: -154px 0px; }"; str_css+=" .iti__flag.iti__ao {"; str_css+=" height: 14px;"; str_css+=" background-position: -176px 0px; }"; str_css+=" .iti__flag.iti__aq {"; str_css+=" height: 14px;"; str_css+=" background-position: -198px 0px; }"; str_css+=" .iti__flag.iti__ar {"; str_css+=" height: 13px;"; str_css+=" background-position: -220px 0px; }"; str_css+=" .iti__flag.iti__as {"; str_css+=" height: 10px;"; str_css+=" background-position: -242px 0px; }"; str_css+=" .iti__flag.iti__at {"; str_css+=" height: 14px;"; str_css+=" background-position: -264px 0px; }"; str_css+=" .iti__flag.iti__au {"; str_css+=" height: 10px;"; str_css+=" background-position: -286px 0px; }"; str_css+=" .iti__flag.iti__aw {"; str_css+=" height: 14px;"; str_css+=" background-position: -308px 0px; }"; str_css+=" .iti__flag.iti__ax {"; str_css+=" height: 13px;"; str_css+=" background-position: -330px 0px; }"; str_css+=" .iti__flag.iti__az {"; str_css+=" height: 10px;"; str_css+=" background-position: -352px 0px; }"; str_css+=" .iti__flag.iti__ba {"; str_css+=" height: 10px;"; str_css+=" background-position: -374px 0px; }"; str_css+=" .iti__flag.iti__bb {"; str_css+=" height: 14px;"; str_css+=" background-position: -396px 0px; }"; str_css+=" .iti__flag.iti__bd {"; str_css+=" height: 12px;"; str_css+=" background-position: -418px 0px; }"; str_css+=" .iti__flag.iti__be {"; str_css+=" height: 15px;"; str_css+=" background-position: -440px 0px; }"; str_css+=" .iti__flag.iti__bf {"; str_css+=" height: 14px;"; str_css+=" background-position: -460px 0px; }"; str_css+=" .iti__flag.iti__bg {"; str_css+=" height: 12px;"; str_css+=" background-position: -482px 0px; }"; str_css+=" .iti__flag.iti__bh {"; str_css+=" height: 12px;"; str_css+=" background-position: -504px 0px; }"; str_css+=" .iti__flag.iti__bi {"; str_css+=" height: 12px;"; str_css+=" background-position: -526px 0px; }"; str_css+=" .iti__flag.iti__bj {"; str_css+=" height: 14px;"; str_css+=" background-position: -548px 0px; }"; str_css+=" .iti__flag.iti__bl {"; str_css+=" height: 14px;"; str_css+=" background-position: -570px 0px; }"; str_css+=" .iti__flag.iti__bm {"; str_css+=" height: 10px;"; str_css+=" background-position: -592px 0px; }"; str_css+=" .iti__flag.iti__bn {"; str_css+=" height: 10px;"; str_css+=" background-position: -614px 0px; }"; str_css+=" .iti__flag.iti__bo {"; str_css+=" height: 14px;"; str_css+=" background-position: -636px 0px; }"; str_css+=" .iti__flag.iti__bq {"; str_css+=" height: 14px;"; str_css+=" background-position: -658px 0px; }"; str_css+=" .iti__flag.iti__br {"; str_css+=" height: 14px;"; str_css+=" background-position: -680px 0px; }"; str_css+=" .iti__flag.iti__bs {"; str_css+=" height: 10px;"; str_css+=" background-position: -702px 0px; }"; str_css+=" .iti__flag.iti__bt {"; str_css+=" height: 14px;"; str_css+=" background-position: -724px 0px; }"; str_css+=" .iti__flag.iti__bv {"; str_css+=" height: 15px;"; str_css+=" background-position: -746px 0px; }"; str_css+=" .iti__flag.iti__bw {"; str_css+=" height: 14px;"; str_css+=" background-position: -768px 0px; }"; str_css+=" .iti__flag.iti__by {"; str_css+=" height: 10px;"; str_css+=" background-position: -790px 0px; }"; str_css+=" .iti__flag.iti__bz {"; str_css+=" height: 14px;"; str_css+=" background-position: -812px 0px; }"; str_css+=" .iti__flag.iti__ca {"; str_css+=" height: 10px;"; str_css+=" background-position: -834px 0px; }"; str_css+=" .iti__flag.iti__cc {"; str_css+=" height: 10px;"; str_css+=" background-position: -856px 0px; }"; str_css+=" .iti__flag.iti__cd {"; str_css+=" height: 15px;"; str_css+=" background-position: -878px 0px; }"; str_css+=" .iti__flag.iti__cf {"; str_css+=" height: 14px;"; str_css+=" background-position: -900px 0px; }"; str_css+=" .iti__flag.iti__cg {"; str_css+=" height: 14px;"; str_css+=" background-position: -922px 0px; }"; str_css+=" .iti__flag.iti__ch {"; str_css+=" height: 15px;"; str_css+=" background-position: -944px 0px; }"; str_css+=" .iti__flag.iti__ci {"; str_css+=" height: 14px;"; str_css+=" background-position: -961px 0px; }"; str_css+=" .iti__flag.iti__ck {"; str_css+=" height: 10px;"; str_css+=" background-position: -983px 0px; }"; str_css+=" .iti__flag.iti__cl {"; str_css+=" height: 14px;"; str_css+=" background-position: -1005px 0px; }"; str_css+=" .iti__flag.iti__cm {"; str_css+=" height: 14px;"; str_css+=" background-position: -1027px 0px; }"; str_css+=" .iti__flag.iti__cn {"; str_css+=" height: 14px;"; str_css+=" background-position: -1049px 0px; }"; str_css+=" .iti__flag.iti__co {"; str_css+=" height: 14px;"; str_css+=" background-position: -1071px 0px; }"; str_css+=" .iti__flag.iti__cp {"; str_css+=" height: 14px;"; str_css+=" background-position: -1093px 0px; }"; str_css+=" .iti__flag.iti__cr {"; str_css+=" height: 12px;"; str_css+=" background-position: -1115px 0px; }"; str_css+=" .iti__flag.iti__cu {"; str_css+=" height: 10px;"; str_css+=" background-position: -1137px 0px; }"; str_css+=" .iti__flag.iti__cv {"; str_css+=" height: 12px;"; str_css+=" background-position: -1159px 0px; }"; str_css+=" .iti__flag.iti__cw {"; str_css+=" height: 14px;"; str_css+=" background-position: -1181px 0px; }"; str_css+=" .iti__flag.iti__cx {"; str_css+=" height: 10px;"; str_css+=" background-position: -1203px 0px; }"; str_css+=" .iti__flag.iti__cy {"; str_css+=" height: 14px;"; str_css+=" background-position: -1225px 0px; }"; str_css+=" .iti__flag.iti__cz {"; str_css+=" height: 14px;"; str_css+=" background-position: -1247px 0px; }"; str_css+=" .iti__flag.iti__de {"; str_css+=" height: 12px;"; str_css+=" background-position: -1269px 0px; }"; str_css+=" .iti__flag.iti__dg {"; str_css+=" height: 10px;"; str_css+=" background-position: -1291px 0px; }"; str_css+=" .iti__flag.iti__dj {"; str_css+=" height: 14px;"; str_css+=" background-position: -1313px 0px; }"; str_css+=" .iti__flag.iti__dk {"; str_css+=" height: 15px;"; str_css+=" background-position: -1335px 0px; }"; str_css+=" .iti__flag.iti__dm {"; str_css+=" height: 10px;"; str_css+=" background-position: -1357px 0px; }"; str_css+=" .iti__flag.iti__do {"; str_css+=" height: 14px;"; str_css+=" background-position: -1379px 0px; }"; str_css+=" .iti__flag.iti__dz {"; str_css+=" height: 14px;"; str_css+=" background-position: -1401px 0px; }"; str_css+=" .iti__flag.iti__ea {"; str_css+=" height: 14px;"; str_css+=" background-position: -1423px 0px; }"; str_css+=" .iti__flag.iti__ec {"; str_css+=" height: 14px;"; str_css+=" background-position: -1445px 0px; }"; str_css+=" .iti__flag.iti__ee {"; str_css+=" height: 13px;"; str_css+=" background-position: -1467px 0px; }"; str_css+=" .iti__flag.iti__eg {"; str_css+=" height: 14px;"; str_css+=" background-position: -1489px 0px; }"; str_css+=" .iti__flag.iti__eh {"; str_css+=" height: 10px;"; str_css+=" background-position: -1511px 0px; }"; str_css+=" .iti__flag.iti__er {"; str_css+=" height: 10px;"; str_css+=" background-position: -1533px 0px; }"; str_css+=" .iti__flag.iti__es {"; str_css+=" height: 14px;"; str_css+=" background-position: -1555px 0px; }"; str_css+=" .iti__flag.iti__et {"; str_css+=" height: 10px;"; str_css+=" background-position: -1577px 0px; }"; str_css+=" .iti__flag.iti__eu {"; str_css+=" height: 14px;"; str_css+=" background-position: -1599px 0px; }"; str_css+=" .iti__flag.iti__fi {"; str_css+=" height: 12px;"; str_css+=" background-position: -1621px 0px; }"; str_css+=" .iti__flag.iti__fj {"; str_css+=" height: 10px;"; str_css+=" background-position: -1643px 0px; }"; str_css+=" .iti__flag.iti__fk {"; str_css+=" height: 10px;"; str_css+=" background-position: -1665px 0px; }"; str_css+=" .iti__flag.iti__fm {"; str_css+=" height: 11px;"; str_css+=" background-position: -1687px 0px; }"; str_css+=" .iti__flag.iti__fo {"; str_css+=" height: 15px;"; str_css+=" background-position: -1709px 0px; }"; str_css+=" .iti__flag.iti__fr {"; str_css+=" height: 14px;"; str_css+=" background-position: -1731px 0px; }"; str_css+=" .iti__flag.iti__ga {"; str_css+=" height: 15px;"; str_css+=" background-position: -1753px 0px; }"; str_css+=" .iti__flag.iti__gb {"; str_css+=" height: 10px;"; str_css+=" background-position: -1775px 0px; }"; str_css+=" .iti__flag.iti__gd {"; str_css+=" height: 12px;"; str_css+=" background-position: -1797px 0px; }"; str_css+=" .iti__flag.iti__ge {"; str_css+=" height: 14px;"; str_css+=" background-position: -1819px 0px; }"; str_css+=" .iti__flag.iti__gf {"; str_css+=" height: 14px;"; str_css+=" background-position: -1841px 0px; }"; str_css+=" .iti__flag.iti__gg {"; str_css+=" height: 14px;"; str_css+=" background-position: -1863px 0px; }"; str_css+=" .iti__flag.iti__gh {"; str_css+=" height: 14px;"; str_css+=" background-position: -1885px 0px; }"; str_css+=" .iti__flag.iti__gi {"; str_css+=" height: 10px;"; str_css+=" background-position: -1907px 0px; }"; str_css+=" .iti__flag.iti__gl {"; str_css+=" height: 14px;"; str_css+=" background-position: -1929px 0px; }"; str_css+=" .iti__flag.iti__gm {"; str_css+=" height: 14px;"; str_css+=" background-position: -1951px 0px; }"; str_css+=" .iti__flag.iti__gn {"; str_css+=" height: 14px;"; str_css+=" background-position: -1973px 0px; }"; str_css+=" .iti__flag.iti__gp {"; str_css+=" height: 14px;"; str_css+=" background-position: -1995px 0px; }"; str_css+=" .iti__flag.iti__gq {"; str_css+=" height: 14px;"; str_css+=" background-position: -2017px 0px; }"; str_css+=" .iti__flag.iti__gr {"; str_css+=" height: 14px;"; str_css+=" background-position: -2039px 0px; }"; str_css+=" .iti__flag.iti__gs {"; str_css+=" height: 10px;"; str_css+=" background-position: -2061px 0px; }"; str_css+=" .iti__flag.iti__gt {"; str_css+=" height: 13px;"; str_css+=" background-position: -2083px 0px; }"; str_css+=" .iti__flag.iti__gu {"; str_css+=" height: 11px;"; str_css+=" background-position: -2105px 0px; }"; str_css+=" .iti__flag.iti__gw {"; str_css+=" height: 10px;"; str_css+=" background-position: -2127px 0px; }"; str_css+=" .iti__flag.iti__gy {"; str_css+=" height: 12px;"; str_css+=" background-position: -2149px 0px; }"; str_css+=" .iti__flag.iti__hk {"; str_css+=" height: 14px;"; str_css+=" background-position: -2171px 0px; }"; str_css+=" .iti__flag.iti__hm {"; str_css+=" height: 10px;"; str_css+=" background-position: -2193px 0px; }"; str_css+=" .iti__flag.iti__hn {"; str_css+=" height: 10px;"; str_css+=" background-position: -2215px 0px; }"; str_css+=" .iti__flag.iti__hr {"; str_css+=" height: 10px;"; str_css+=" background-position: -2237px 0px; }"; str_css+=" .iti__flag.iti__ht {"; str_css+=" height: 12px;"; str_css+=" background-position: -2259px 0px; }"; str_css+=" .iti__flag.iti__hu {"; str_css+=" height: 10px;"; str_css+=" background-position: -2281px 0px; }"; str_css+=" .iti__flag.iti__ic {"; str_css+=" height: 14px;"; str_css+=" background-position: -2303px 0px; }"; str_css+=" .iti__flag.iti__id {"; str_css+=" height: 14px;"; str_css+=" background-position: -2325px 0px; }"; str_css+=" .iti__flag.iti__ie {"; str_css+=" height: 10px;"; str_css+=" background-position: -2347px 0px; }"; str_css+=" .iti__flag.iti__il {"; str_css+=" height: 15px;"; str_css+=" background-position: -2369px 0px; }"; str_css+=" .iti__flag.iti__im {"; str_css+=" height: 10px;"; str_css+=" background-position: -2391px 0px; }"; str_css+=" .iti__flag.iti__in {"; str_css+=" height: 14px;"; str_css+=" background-position: -2413px 0px; }"; str_css+=" .iti__flag.iti__io {"; str_css+=" height: 10px;"; str_css+=" background-position: -2435px 0px; }"; str_css+=" .iti__flag.iti__iq {"; str_css+=" height: 14px;"; str_css+=" background-position: -2457px 0px; }"; str_css+=" .iti__flag.iti__ir {"; str_css+=" height: 12px;"; str_css+=" background-position: -2479px 0px; }"; str_css+=" .iti__flag.iti__is {"; str_css+=" height: 15px;"; str_css+=" background-position: -2501px 0px; }"; str_css+=" .iti__flag.iti__it {"; str_css+=" height: 14px;"; str_css+=" background-position: -2523px 0px; }"; str_css+=" .iti__flag.iti__je {"; str_css+=" height: 12px;"; str_css+=" background-position: -2545px 0px; }"; str_css+=" .iti__flag.iti__jm {"; str_css+=" height: 10px;"; str_css+=" background-position: -2567px 0px; }"; str_css+=" .iti__flag.iti__jo {"; str_css+=" height: 10px;"; str_css+=" background-position: -2589px 0px; }"; str_css+=" .iti__flag.iti__jp {"; str_css+=" height: 14px;"; str_css+=" background-position: -2611px 0px; }"; str_css+=" .iti__flag.iti__ke {"; str_css+=" height: 14px;"; str_css+=" background-position: -2633px 0px; }"; str_css+=" .iti__flag.iti__kg {"; str_css+=" height: 12px;"; str_css+=" background-position: -2655px 0px; }"; str_css+=" .iti__flag.iti__kh {"; str_css+=" height: 13px;"; str_css+=" background-position: -2677px 0px; }"; str_css+=" .iti__flag.iti__ki {"; str_css+=" height: 10px;"; str_css+=" background-position: -2699px 0px; }"; str_css+=" .iti__flag.iti__km {"; str_css+=" height: 12px;"; str_css+=" background-position: -2721px 0px; }"; str_css+=" .iti__flag.iti__kn {"; str_css+=" height: 14px;"; str_css+=" background-position: -2743px 0px; }"; str_css+=" .iti__flag.iti__kp {"; str_css+=" height: 10px;"; str_css+=" background-position: -2765px 0px; }"; str_css+=" .iti__flag.iti__kr {"; str_css+=" height: 14px;"; str_css+=" background-position: -2787px 0px; }"; str_css+=" .iti__flag.iti__kw {"; str_css+=" height: 10px;"; str_css+=" background-position: -2809px 0px; }"; str_css+=" .iti__flag.iti__ky {"; str_css+=" height: 10px;"; str_css+=" background-position: -2831px 0px; }"; str_css+=" .iti__flag.iti__kz {"; str_css+=" height: 10px;"; str_css+=" background-position: -2853px 0px; }"; str_css+=" .iti__flag.iti__la {"; str_css+=" height: 14px;"; str_css+=" background-position: -2875px 0px; }"; str_css+=" .iti__flag.iti__lb {"; str_css+=" height: 14px;"; str_css+=" background-position: -2897px 0px; }"; str_css+=" .iti__flag.iti__lc {"; str_css+=" height: 10px;"; str_css+=" background-position: -2919px 0px; }"; str_css+=" .iti__flag.iti__li {"; str_css+=" height: 12px;"; str_css+=" background-position: -2941px 0px; }"; str_css+=" .iti__flag.iti__lk {"; str_css+=" height: 10px;"; str_css+=" background-position: -2963px 0px; }"; str_css+=" .iti__flag.iti__lr {"; str_css+=" height: 11px;"; str_css+=" background-position: -2985px 0px; }"; str_css+=" .iti__flag.iti__ls {"; str_css+=" height: 14px;"; str_css+=" background-position: -3007px 0px; }"; str_css+=" .iti__flag.iti__lt {"; str_css+=" height: 12px;"; str_css+=" background-position: -3029px 0px; }"; str_css+=" .iti__flag.iti__lu {"; str_css+=" height: 12px;"; str_css+=" background-position: -3051px 0px; }"; str_css+=" .iti__flag.iti__lv {"; str_css+=" height: 10px;"; str_css+=" background-position: -3073px 0px; }"; str_css+=" .iti__flag.iti__ly {"; str_css+=" height: 10px;"; str_css+=" background-position: -3095px 0px; }"; str_css+=" .iti__flag.iti__ma {"; str_css+=" height: 14px;"; str_css+=" background-position: -3117px 0px; }"; str_css+=" .iti__flag.iti__mc {"; str_css+=" height: 15px;"; str_css+=" background-position: -3139px 0px; }"; str_css+=" .iti__flag.iti__md {"; str_css+=" height: 10px;"; str_css+=" background-position: -3160px 0px; }"; str_css+=" .iti__flag.iti__me {"; str_css+=" height: 10px;"; str_css+=" background-position: -3182px 0px; }"; str_css+=" .iti__flag.iti__mf {"; str_css+=" height: 14px;"; str_css+=" background-position: -3204px 0px; }"; str_css+=" .iti__flag.iti__mg {"; str_css+=" height: 14px;"; str_css+=" background-position: -3226px 0px; }"; str_css+=" .iti__flag.iti__mh {"; str_css+=" height: 11px;"; str_css+=" background-position: -3248px 0px; }"; str_css+=" .iti__flag.iti__mk {"; str_css+=" height: 10px;"; str_css+=" background-position: -3270px 0px; }"; str_css+=" .iti__flag.iti__ml {"; str_css+=" height: 14px;"; str_css+=" background-position: -3292px 0px; }"; str_css+=" .iti__flag.iti__mm {"; str_css+=" height: 14px;"; str_css+=" background-position: -3314px 0px; }"; str_css+=" .iti__flag.iti__mn {"; str_css+=" height: 10px;"; str_css+=" background-position: -3336px 0px; }"; str_css+=" .iti__flag.iti__mo {"; str_css+=" height: 14px;"; str_css+=" background-position: -3358px 0px; }"; str_css+=" .iti__flag.iti__mp {"; str_css+=" height: 10px;"; str_css+=" background-position: -3380px 0px; }"; str_css+=" .iti__flag.iti__mq {"; str_css+=" height: 14px;"; str_css+=" background-position: -3402px 0px; }"; str_css+=" .iti__flag.iti__mr {"; str_css+=" height: 14px;"; str_css+=" background-position: -3424px 0px; }"; str_css+=" .iti__flag.iti__ms {"; str_css+=" height: 10px;"; str_css+=" background-position: -3446px 0px; }"; str_css+=" .iti__flag.iti__mt {"; str_css+=" height: 14px;"; str_css+=" background-position: -3468px 0px; }"; str_css+=" .iti__flag.iti__mu {"; str_css+=" height: 14px;"; str_css+=" background-position: -3490px 0px; }"; str_css+=" .iti__flag.iti__mv {"; str_css+=" height: 14px;"; str_css+=" background-position: -3512px 0px; }"; str_css+=" .iti__flag.iti__mw {"; str_css+=" height: 14px;"; str_css+=" background-position: -3534px 0px; }"; str_css+=" .iti__flag.iti__mx {"; str_css+=" height: 12px;"; str_css+=" background-position: -3556px 0px; }"; str_css+=" .iti__flag.iti__my {"; str_css+=" height: 10px;"; str_css+=" background-position: -3578px 0px; }"; str_css+=" .iti__flag.iti__mz {"; str_css+=" height: 14px;"; str_css+=" background-position: -3600px 0px; }"; str_css+=" .iti__flag.iti__na {"; str_css+=" height: 14px;"; str_css+=" background-position: -3622px 0px; }"; str_css+=" .iti__flag.iti__nc {"; str_css+=" height: 10px;"; str_css+=" background-position: -3644px 0px; }"; str_css+=" .iti__flag.iti__ne {"; str_css+=" height: 15px;"; str_css+=" background-position: -3666px 0px; }"; str_css+=" .iti__flag.iti__nf {"; str_css+=" height: 10px;"; str_css+=" background-position: -3686px 0px; }"; str_css+=" .iti__flag.iti__ng {"; str_css+=" height: 10px;"; str_css+=" background-position: -3708px 0px; }"; str_css+=" .iti__flag.iti__ni {"; str_css+=" height: 12px;"; str_css+=" background-position: -3730px 0px; }"; str_css+=" .iti__flag.iti__nl {"; str_css+=" height: 14px;"; str_css+=" background-position: -3752px 0px; }"; str_css+=" .iti__flag.iti__no {"; str_css+=" height: 15px;"; str_css+=" background-position: -3774px 0px; }"; str_css+=" .iti__flag.iti__np {"; str_css+=" height: 15px;"; str_css+=" background-position: -3796px 0px; }"; str_css+=" .iti__flag.iti__nr {"; str_css+=" height: 10px;"; str_css+=" background-position: -3811px 0px; }"; str_css+=" .iti__flag.iti__nu {"; str_css+=" height: 10px;"; str_css+=" background-position: -3833px 0px; }"; str_css+=" .iti__flag.iti__nz {"; str_css+=" height: 10px;"; str_css+=" background-position: -3855px 0px; }"; str_css+=" .iti__flag.iti__om {"; str_css+=" height: 10px;"; str_css+=" background-position: -3877px 0px; }"; str_css+=" .iti__flag.iti__pa {"; str_css+=" height: 14px;"; str_css+=" background-position: -3899px 0px; }"; str_css+=" .iti__flag.iti__pe {"; str_css+=" height: 14px;"; str_css+=" background-position: -3921px 0px; }"; str_css+=" .iti__flag.iti__pf {"; str_css+=" height: 14px;"; str_css+=" background-position: -3943px 0px; }"; str_css+=" .iti__flag.iti__pg {"; str_css+=" height: 15px;"; str_css+=" background-position: -3965px 0px; }"; str_css+=" .iti__flag.iti__ph {"; str_css+=" height: 10px;"; str_css+=" background-position: -3987px 0px; }"; str_css+=" .iti__flag.iti__pk {"; str_css+=" height: 14px;"; str_css+=" background-position: -4009px 0px; }"; str_css+=" .iti__flag.iti__pl {"; str_css+=" height: 13px;"; str_css+=" background-position: -4031px 0px; }"; str_css+=" .iti__flag.iti__pm {"; str_css+=" height: 14px;"; str_css+=" background-position: -4053px 0px; }"; str_css+=" .iti__flag.iti__pn {"; str_css+=" height: 10px;"; str_css+=" background-position: -4075px 0px; }"; str_css+=" .iti__flag.iti__pr {"; str_css+=" height: 14px;"; str_css+=" background-position: -4097px 0px; }"; str_css+=" .iti__flag.iti__ps {"; str_css+=" height: 10px;"; str_css+=" background-position: -4119px 0px; }"; str_css+=" .iti__flag.iti__pt {"; str_css+=" height: 14px;"; str_css+=" background-position: -4141px 0px; }"; str_css+=" .iti__flag.iti__pw {"; str_css+=" height: 13px;"; str_css+=" background-position: -4163px 0px; }"; str_css+=" .iti__flag.iti__py {"; str_css+=" height: 11px;"; str_css+=" background-position: -4185px 0px; }"; str_css+=" .iti__flag.iti__qa {"; str_css+=" height: 8px;"; str_css+=" background-position: -4207px 0px; }"; str_css+=" .iti__flag.iti__re {"; str_css+=" height: 14px;"; str_css+=" background-position: -4229px 0px; }"; str_css+=" .iti__flag.iti__ro {"; str_css+=" height: 14px;"; str_css+=" background-position: -4251px 0px; }"; str_css+=" .iti__flag.iti__rs {"; str_css+=" height: 14px;"; str_css+=" background-position: -4273px 0px; }"; str_css+=" .iti__flag.iti__ru {"; str_css+=" height: 14px;"; str_css+=" background-position: -4295px 0px; }"; str_css+=" .iti__flag.iti__rw {"; str_css+=" height: 14px;"; str_css+=" background-position: -4317px 0px; }"; str_css+=" .iti__flag.iti__sa {"; str_css+=" height: 14px;"; str_css+=" background-position: -4339px 0px; }"; str_css+=" .iti__flag.iti__sb {"; str_css+=" height: 10px;"; str_css+=" background-position: -4361px 0px; }"; str_css+=" .iti__flag.iti__sc {"; str_css+=" height: 10px;"; str_css+=" background-position: -4383px 0px; }"; str_css+=" .iti__flag.iti__sd {"; str_css+=" height: 10px;"; str_css+=" background-position: -4405px 0px; }"; str_css+=" .iti__flag.iti__se {"; str_css+=" height: 13px;"; str_css+=" background-position: -4427px 0px; }"; str_css+=" .iti__flag.iti__sg {"; str_css+=" height: 14px;"; str_css+=" background-position: -4449px 0px; }"; str_css+=" .iti__flag.iti__sh {"; str_css+=" height: 10px;"; str_css+=" background-position: -4471px 0px; }"; str_css+=" .iti__flag.iti__si {"; str_css+=" height: 10px;"; str_css+=" background-position: -4493px 0px; }"; str_css+=" .iti__flag.iti__sj {"; str_css+=" height: 15px;"; str_css+=" background-position: -4515px 0px; }"; str_css+=" .iti__flag.iti__sk {"; str_css+=" height: 14px;"; str_css+=" background-position: -4537px 0px; }"; str_css+=" .iti__flag.iti__sl {"; str_css+=" height: 14px;"; str_css+=" background-position: -4559px 0px; }"; str_css+=" .iti__flag.iti__sm {"; str_css+=" height: 15px;"; str_css+=" background-position: -4581px 0px; }"; str_css+=" .iti__flag.iti__sn {"; str_css+=" height: 14px;"; str_css+=" background-position: -4603px 0px; }"; str_css+=" .iti__flag.iti__so {"; str_css+=" height: 14px;"; str_css+=" background-position: -4625px 0px; }"; str_css+=" .iti__flag.iti__sr {"; str_css+=" height: 14px;"; str_css+=" background-position: -4647px 0px; }"; str_css+=" .iti__flag.iti__ss {"; str_css+=" height: 10px;"; str_css+=" background-position: -4669px 0px; }"; str_css+=" .iti__flag.iti__st {"; str_css+=" height: 10px;"; str_css+=" background-position: -4691px 0px; }"; str_css+=" .iti__flag.iti__sv {"; str_css+=" height: 12px;"; str_css+=" background-position: -4713px 0px; }"; str_css+=" .iti__flag.iti__sx {"; str_css+=" height: 14px;"; str_css+=" background-position: -4735px 0px; }"; str_css+=" .iti__flag.iti__sy {"; str_css+=" height: 14px;"; str_css+=" background-position: -4757px 0px; }"; str_css+=" .iti__flag.iti__sz {"; str_css+=" height: 14px;"; str_css+=" background-position: -4779px 0px; }"; str_css+=" .iti__flag.iti__ta {"; str_css+=" height: 10px;"; str_css+=" background-position: -4801px 0px; }"; str_css+=" .iti__flag.iti__tc {"; str_css+=" height: 10px;"; str_css+=" background-position: -4823px 0px; }"; str_css+=" .iti__flag.iti__td {"; str_css+=" height: 14px;"; str_css+=" background-position: -4845px 0px; }"; str_css+=" .iti__flag.iti__tf {"; str_css+=" height: 14px;"; str_css+=" background-position: -4867px 0px; }"; str_css+=" .iti__flag.iti__tg {"; str_css+=" height: 13px;"; str_css+=" background-position: -4889px 0px; }"; str_css+=" .iti__flag.iti__th {"; str_css+=" height: 14px;"; str_css+=" background-position: -4911px 0px; }"; str_css+=" .iti__flag.iti__tj {"; str_css+=" height: 10px;"; str_css+=" background-position: -4933px 0px; }"; str_css+=" .iti__flag.iti__tk {"; str_css+=" height: 10px;"; str_css+=" background-position: -4955px 0px; }"; str_css+=" .iti__flag.iti__tl {"; str_css+=" height: 10px;"; str_css+=" background-position: -4977px 0px; }"; str_css+=" .iti__flag.iti__tm {"; str_css+=" height: 14px;"; str_css+=" background-position: -4999px 0px; }"; str_css+=" .iti__flag.iti__tn {"; str_css+=" height: 14px;"; str_css+=" background-position: -5021px 0px; }"; str_css+=" .iti__flag.iti__to {"; str_css+=" height: 10px;"; str_css+=" background-position: -5043px 0px; }"; str_css+=" .iti__flag.iti__tr {"; str_css+=" height: 14px;"; str_css+=" background-position: -5065px 0px; }"; str_css+=" .iti__flag.iti__tt {"; str_css+=" height: 12px;"; str_css+=" background-position: -5087px 0px; }"; str_css+=" .iti__flag.iti__tv {"; str_css+=" height: 10px;"; str_css+=" background-position: -5109px 0px; }"; str_css+=" .iti__flag.iti__tw {"; str_css+=" height: 14px;"; str_css+=" background-position: -5131px 0px; }"; str_css+=" .iti__flag.iti__tz {"; str_css+=" height: 14px;"; str_css+=" background-position: -5153px 0px; }"; str_css+=" .iti__flag.iti__ua {"; str_css+=" height: 14px;"; str_css+=" background-position: -5175px 0px; }"; str_css+=" .iti__flag.iti__ug {"; str_css+=" height: 14px;"; str_css+=" background-position: -5197px 0px; }"; str_css+=" .iti__flag.iti__um {"; str_css+=" height: 11px;"; str_css+=" background-position: -5219px 0px; }"; str_css+=" .iti__flag.iti__un {"; str_css+=" height: 14px;"; str_css+=" background-position: -5241px 0px; }"; str_css+=" .iti__flag.iti__us {"; str_css+=" height: 11px;"; str_css+=" background-position: -5263px 0px; }"; str_css+=" .iti__flag.iti__uy {"; str_css+=" height: 14px;"; str_css+=" background-position: -5285px 0px; }"; str_css+=" .iti__flag.iti__uz {"; str_css+=" height: 10px;"; str_css+=" background-position: -5307px 0px; }"; str_css+=" .iti__flag.iti__va {"; str_css+=" height: 15px;"; str_css+=" background-position: -5329px 0px; }"; str_css+=" .iti__flag.iti__vc {"; str_css+=" height: 14px;"; str_css+=" background-position: -5346px 0px; }"; str_css+=" .iti__flag.iti__ve {"; str_css+=" height: 14px;"; str_css+=" background-position: -5368px 0px; }"; str_css+=" .iti__flag.iti__vg {"; str_css+=" height: 10px;"; str_css+=" background-position: -5390px 0px; }"; str_css+=" .iti__flag.iti__vi {"; str_css+=" height: 14px;"; str_css+=" background-position: -5412px 0px; }"; str_css+=" .iti__flag.iti__vn {"; str_css+=" height: 14px;"; str_css+=" background-position: -5434px 0px; }"; str_css+=" .iti__flag.iti__vu {"; str_css+=" height: 12px;"; str_css+=" background-position: -5456px 0px; }"; str_css+=" .iti__flag.iti__wf {"; str_css+=" height: 14px;"; str_css+=" background-position: -5478px 0px; }"; str_css+=" .iti__flag.iti__ws {"; str_css+=" height: 10px;"; str_css+=" background-position: -5500px 0px; }"; str_css+=" .iti__flag.iti__xk {"; str_css+=" height: 15px;"; str_css+=" background-position: -5522px 0px; }"; str_css+=" .iti__flag.iti__ye {"; str_css+=" height: 14px;"; str_css+=" background-position: -5544px 0px; }"; str_css+=" .iti__flag.iti__yt {"; str_css+=" height: 14px;"; str_css+=" background-position: -5566px 0px; }"; str_css+=" .iti__flag.iti__za {"; str_css+=" height: 14px;"; str_css+=" background-position: -5588px 0px; }"; str_css+=" .iti__flag.iti__zm {"; str_css+=" height: 14px;"; str_css+=" background-position: -5610px 0px; }"; str_css+=" .iti__flag.iti__zw {"; str_css+=" height: 10px;"; str_css+=" background-position: -5632px 0px; }"; str_css+=""; str_css+=".iti__flag {"; str_css+=" height: 15px;"; str_css+=" box-shadow: 0px 0px 1px 0px #888;"; str_css+=" background-image: url('https://www.aktaccount.com/resources/images/flags.png');"; str_css+=" background-repeat: no-repeat;"; str_css+=" background-color: #DBDBDB;"; str_css+=" background-position: 20px 0; }"; str_css+=" @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {"; str_css+=" .iti__flag {"; str_css+=" background-image: url('flags@2x.png'); } }"; str_css+=""; str_css+=".iti__flag.iti__np {"; str_css+=" background-color: transparent; }"; str_css+=""; str_css+=""; style.innerHTML = str_css; var ref = document.querySelector('script'); ref.parentNode.insertBefore(style, ref); //alert('akt ac js 1.3'); function func_akt_account_left(str, len) { return str.substr(0, len);} function func_akt_account_right(str, len) { return str.substr(str.length - len, len); } function func_akt_account_mid(str, start, len) { return func_akt_account_left(func_akt_account_right(str, start), len); } var txt_mobile_instance_h; var txt_mobile_instance_v; var txt_mobile_errorMap; var akt_account_signin_otp; var akt_account_signin_otp_e; var akt_account_signin_otp_m; if (window.addEventListener) { window.addEventListener("message", func_akt_account_handleMessage); } else { window.attachEvent("onmessage", func_akt_account_handleMessage); } function func_akt_account_handleMessage(event) { if (event.origin=='https://aktapi.com'){ var v = event.data.split('-'); if (v[0]=='signin1'){ if (v[1].split(':')[0]=='exists'){ akt_account_signin_otp=v[1].split(':')[2]; func_akt_account_show_steps('signin2'); } else if (v[1].split(':')[0]=='new'){ func_akt_account_show_steps('signup1'); } else { func_akt_account_raise_error(v[1]); } } else if (v[0]=='signin2'){ if (v[1]=='done'){ func_akt_account_raise_error(v[2]); if (v[2].split('Ü')[2]==''){ func_akt_account_raise_error('You do not have permissions to access this project.'); } else { func_akt_account_show_signout(v[2]); try {akt_account_login_status_changed();} catch (err) { } } } else { func_akt_account_raise_error(v[1]); } } else if (v[0]=='signup1'){ if (func_akt_account_left(v[1], 8) == 'OTP Sent') { //otp_e = document.getElementById('txt_email').value.toLowerCase(); //otp_m = document.getElementById('txt_mobile').value; //otp_isd = txt_mobile_instance.getSelectedCountryData().dialCode; func_akt_account_show_steps('signup2'); akt_account_signin_otp_m_kc = v[1].split(':')[1]; akt_account_signin_otp_e_kc = v[1].split(':')[2]; //m_allow_bg_check = true; //if (otp_e == '') { // func_show_error('', 'MOTP sent, to resend click bottom links.'); //} else { // func_show_error('', 'MOTP & EOTP sent, to resend click bottom links.'); //} //clearTimeout(timer_func_check_otp_bg); timer_func_check_otp_bg = setTimeout(func_check_otp_bg, 1000*1); } else if (func_akt_account_left(v[1], 11) == 'EOTP resent') { //func_show_error('', v[1].split(';')[0]); } else if (func_akt_account_left(v[1], 11) == 'MOTP resent' && func_right(v[1], 8) == 'via SMS;') { //func_show_error('', v[1].split(';')[0]); } else if (func_akt_account_left(v[1], 11) == 'MOTP resent' && func_right(v[1], 15) == 'via Voice Call;') { //func_show_error('', v[1].split(';')[0]); } else if (func_akt_account_left(v[1], 14) == 'OTP incorrect;') { func_akt_account_raise_error('OTP incorrect'); } else if (func_akt_account_left(v[1], 20) == 'OTP valid, go ahead;') { //func_show_section(3); } else { func_akt_account_raise_error(v[1]); } } else if (v[0]=='signupf'){ func_akt_account_raise_error(v[1]); } } } function func_akt_account_show_signout(data) { var data=data.split('Ü'); func_akt_account_ss_add(data[0],data[1],data[1]); // document.getElementById('akt_account_hdn_aktid').innerHTML=data[0]; // document.getElementById('akt_account_hdn_name').innerHTML=data[1]; // document.getElementById('akt_account_hdn_para').innerHTML=data[2]; // document.getElementById('akt_account_td_signin').style.display='none'; // document.getElementById('akt_account_td_fullname').innerHTML=data[1]; // document.getElementById('akt_account_td_signout').style.display=''; func_akt_account_hide_signin(); } function func_akt_account_signout() { // document.getElementById('akt_account_hdn_aktid').innerHTML=''; // document.getElementById('akt_account_hdn_name').innerHTML=''; // document.getElementById('akt_account_hdn_para').innerHTML=''; func_akt_account_ss_clear(); document.getElementById('akt_account_td_signin').style.display=''; document.getElementById('akt_account_td_signout').style.display='none'; try {akt_account_login_status_changed();} catch (err) { } } function func_akt_account_show_signin() { if (document.getElementById('akt_account_div_signin').className=='akt_account_div_signin_hidden'){ document.getElementById('ifrm_auth_bg').src="https://aktapi.com/11011011~c+na~q+signin_rgb_new"; //document.body.className='body_akt_account_open'; func_akt_account_reset_puzzle(); //document.body.animate({marginTop: "150px"},"slow"); //document.body.style.marginTop='150px'; //document.getElementById('akt_account_div_body_margin_top').className='akt_account_div_body_margin_top_visible'; document.getElementById('akt_account_div_btn').className='akt_account_div_btn_visible'; document.getElementById('akt_account_div_signin').className='akt_account_div_signin_visible'; try {func_resize();} catch (err) { } // func_akt_account_show_sign_in_pwd(); func_akt_account_show_steps('auth'); document.getElementById('akt_account_txt_userid_h').value=''; document.getElementById('akt_account_txt_pwd_h').value=''; document.getElementById('akt_account_txt_otp_1_h').value=''; document.getElementById('akt_account_txt_otp_2_h').value=''; document.getElementById('akt_account_txt_otp_3_h').value=''; document.getElementById('akt_account_txt_otp_4_h').value=''; document.getElementById('akt_account_txt_otp_5_h').value=''; document.getElementById('akt_account_txt_otp_6_h').value=''; document.getElementById('akt_account_txt_userid_v').value=''; document.getElementById('akt_account_txt_pwd_v').value=''; document.getElementById('akt_account_txt_otp_1_v').value=''; document.getElementById('akt_account_txt_otp_2_v').value=''; document.getElementById('akt_account_txt_otp_3_v').value=''; document.getElementById('akt_account_txt_otp_4_v').value=''; document.getElementById('akt_account_txt_otp_5_v').value=''; document.getElementById('akt_account_txt_otp_6_v').value=''; func_akt_account_signin(); } else { func_akt_account_hide_signin(); } } function func_akt_account_show_steps(id){ func_akt_account_show_steps_(id,'h'); func_akt_account_show_steps_(id,'v'); } function func_akt_account_show_steps_(id,ty){ document.getElementById('akt_account_section_auth_'+ty).style.display='none'; document.getElementById('akt_account_section_signin1a_'+ty).style.display='none'; document.getElementById('akt_account_section_signin1b_'+ty).style.display='none'; document.getElementById('akt_account_section_signin2a_'+ty).style.display='none'; document.getElementById('akt_account_section_signin2b_'+ty).style.display='none'; document.getElementById('akt_account_section_signup1a_'+ty).style.display='none'; document.getElementById('akt_account_section_signup1b_'+ty).style.display='none'; document.getElementById('akt_account_section_signup2a_'+ty).style.display='none'; document.getElementById('akt_account_section_signup2b_'+ty).style.display='none'; document.getElementById('akt_account_section_btn_auth_'+ty).style.display='none'; document.getElementById('akt_account_section_btn_signin1_'+ty).style.display='none'; document.getElementById('akt_account_section_btn_signin2_'+ty).style.display='none'; document.getElementById('akt_account_section_btn_signup1_'+ty).style.display='none'; document.getElementById('akt_account_section_btn_signup2_'+ty).style.display='none'; if(id!='auth'){ clearInterval(func_akt_account_auth_tick_time_interval); document.getElementById('div_w_outer_h').style.display = 'none'; document.getElementById('div_w_outer_v').style.display = 'none'; func_akt_account_auth_ct -= 1; document.getElementById('ifrm_auth_bg').src=""; } if(id=='auth'){ document.getElementById('akt_account_section_auth_'+ty).style.display=''; document.getElementById('akt_account_section_btn_auth_'+ty).style.display=''; } else if(id=='signin1'){ document.getElementById('akt_account_section_signin1a_'+ty).style.display=''; document.getElementById('akt_account_section_signin1b_'+ty).style.display=''; document.getElementById('akt_account_section_btn_signin1_'+ty).style.display=''; } else if(id=='signin2'){ document.getElementById('akt_account_section_signin2a_'+ty).style.display=''; document.getElementById('akt_account_section_signin2b_'+ty).style.display=''; document.getElementById('akt_account_section_btn_signin2_'+ty).style.display=''; } else if(id=='signup1'){ document.getElementById('akt_account_section_signup1a_'+ty).style.display=''; document.getElementById('akt_account_section_signup1b_'+ty).style.display=''; document.getElementById('akt_account_section_btn_signup1_'+ty).style.display=''; } else if(id=='signup2'){ document.getElementById('akt_account_section_signup2a_'+ty).style.display=''; document.getElementById('akt_account_section_signup2b_'+ty).style.display=''; document.getElementById('akt_account_section_btn_signup2_'+ty).style.display=''; } } function func_akt_account_hide_signin() { document.getElementById('akt_account_div_body_margin_top').className='akt_account_div_body_margin_top_hidden'; document.getElementById('akt_account_div_btn').className='akt_account_div_btn_hidden'; document.getElementById('akt_account_div_signin').className='akt_account_div_signin_hidden'; } function func_akt_account_resend_otp() { if (document.getElementById('akt_account_txt_userid').value==''){func_akt_account_raise_error('Enter AKT Username / Mobile / Email');return;} if (document.getElementById('akt_account_txt_userid').value.length<5){func_akt_account_raise_error('Enter valid AKT Username / Mobile / Email');return;} var u=document.getElementById('akt_account_txt_userid').value; var t='mobile'; document.getElementById('akt_account_ifrm').src='https://aktapi.com/11011011~c+56545679~q+signin_resend_otp~p1+'+t+','+u; func_akt_account_raise_error(''); } function func_akt_account_show_sign_in_otp() { if (document.getElementById('akt_account_txt_userid').value==''){func_akt_account_raise_error('Enter AKT Username / Mobile / Email');return;} if (document.getElementById('akt_account_txt_userid').value.length<5){func_akt_account_raise_error('Enter valid AKT Username / Mobile / Email');return;} var u=document.getElementById('akt_account_txt_userid').value; var t='mobile'; document.getElementById('akt_account_ifrm').src='https://aktapi.com/11011011~c+56545679~q+signin_send_otp~p1+'+t+','+u; document.getElementById('akt_account_txt_otp_1').value=''; document.getElementById('akt_account_txt_otp_2').value=''; document.getElementById('akt_account_txt_otp_3').value=''; document.getElementById('akt_account_txt_otp_4').value=''; document.getElementById('akt_account_txt_otp_5').value=''; document.getElementById('akt_account_txt_otp_6').value=''; func_akt_account_raise_error(''); document.getElementById('akt_account_td_pwd').style.display='none'; document.getElementById('akt_account_td_otp').style.display=''; document.getElementById('akt_account_btn_signin_with_otp').style.display='none'; document.getElementById('akt_account_btn_signin_with_pwd').style.display=''; } function func_akt_account_show_signin1_sreen() { document.getElementById('akt_account_td_pwd').style.display='none'; document.getElementById('akt_account_td_otp').style.display='none'; document.getElementById('akt_account_btn_signin_with_otp').style.display='none'; document.getElementById('akt_account_btn_signin_with_pwd').style.display='none'; } function func_akt_account_show_signin2_sreen() { } function func_akt_account_show_signup1_sreen() { } function func_akt_account_show_signup2_sreen() { } function func_akt_account_show_sign_in_pwd() { func_akt_account_raise_error(''); document.getElementById('akt_account_td_pwd').style.display=''; document.getElementById('akt_account_td_otp').style.display='none'; document.getElementById('akt_account_btn_signin_with_otp').style.display=''; document.getElementById('akt_account_btn_signin_with_pwd').style.display='none'; } function func_akt_account_reset_puzzle(){ func_akt_account_raise_error(''); var q1 = func_akt_account_puzzle_get_rand(2,57,'','',''); var q2 = func_akt_account_puzzle_get_rand(1,57,'','',''); var q3 = func_akt_account_puzzle_get_rand(1,57,q2,'',''); var ca_col=func_akt_account_puzzle_get_rand(1,52,'','',''); var wa1_col=func_akt_account_puzzle_get_rand(1,52,ca_col,'',''); var wa2_col=func_akt_account_puzzle_get_rand(1,52,ca_col,wa1_col,''); var wa3_col=func_akt_account_puzzle_get_rand(1,52,ca_col,wa1_col,wa2_col); var ca = parseInt(q1)+parseInt(q2)-parseInt(q3); var wa1 = parseInt(q1)-parseInt(q2)+parseInt(q3); var wa2 = parseInt(wa1)+5; var wa3 = parseInt(ca)-4; if (ca>85 || ca<15 || ca == wa1 || ca == wa2 || ca == wa3 || wa1 == wa2 || wa1 == wa3 || wa2 == wa3 || wa1<1 || wa2<1 || wa3<1 || wa1>99 || wa2>99 || wa3>99 ) { func_akt_account_reset_puzzle(); return false; } document.getElementById('akt_account_span_puzzle_q_h').innerHTML = q1 + '+' + q2 + '-' + q3; document.getElementById('akt_account_span_puzzle_q_v').innerHTML = q1 + '+' + q2 + '-' + q3; document.getElementById('akt_account_atag_puzzle_a1_h').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a2_h').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a3_h').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a4_h').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a1_v').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a2_v').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a3_v').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a4_v').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a1_h').innerHTML = ''; document.getElementById('akt_account_atag_puzzle_a2_h').innerHTML = ''; document.getElementById('akt_account_atag_puzzle_a3_h').innerHTML = ''; document.getElementById('akt_account_atag_puzzle_a4_h').innerHTML = ''; document.getElementById('akt_account_atag_puzzle_a1_v').innerHTML = ''; document.getElementById('akt_account_atag_puzzle_a2_v').innerHTML = ''; document.getElementById('akt_account_atag_puzzle_a3_v').innerHTML = ''; document.getElementById('akt_account_atag_puzzle_a4_v').innerHTML = ''; document.getElementById('akt_account_atag_puzzle_a'+ca_col+'_h').innerHTML = ca; document.getElementById('akt_account_atag_puzzle_a'+wa1_col+'_h').innerHTML = wa1; document.getElementById('akt_account_atag_puzzle_a'+wa2_col+'_h').innerHTML = wa2; document.getElementById('akt_account_atag_puzzle_a'+wa3_col+'_h').innerHTML = wa3; document.getElementById('akt_account_atag_puzzle_a'+ca_col+'_v').innerHTML = ca; document.getElementById('akt_account_atag_puzzle_a'+wa1_col+'_v').innerHTML = wa1; document.getElementById('akt_account_atag_puzzle_a'+wa2_col+'_v').innerHTML = wa2; document.getElementById('akt_account_atag_puzzle_a'+wa3_col+'_v').innerHTML = wa3; document.getElementById('akt_account_hdn_puzzle_ca').innerHTML = ca; //func_akt_account_puzzle_select_(ca_col); } function func_akt_account_puzzle_get_rand(len, max_asc, norepeat1, norepeat2, norepeat3) { var a = ''; do { var newguid = akt_account_puzzle_createguid(); for(cc=1;cc=49 && c.charCodeAt(0)<=max_asc && norepeat1!=c && norepeat2!=c && norepeat3!=c){ a+=c; if (a.length==len){return a;} } } } while (a.length < len); return a; } function func_akt_account_toggle_remember() { if (document.getElementById('akt_account_span_remember').innerHTML=='YES'){ document.getElementById('akt_account_span_remember').innerHTML='NO'; } else { document.getElementById('akt_account_span_remember').innerHTML='YES'; } } function func_akt_account_mid(str, start, len) { return func_akt_account_right(func_akt_account_left(str, start), len); } function func_akt_account_left(str, len) { return str.substr(0, len); } function func_akt_account_right(str, len) { return str.substr(str.length - len, len); } function akt_account_puzzle_createguid() { function _p8(s) { var p = (Math.random().toString(16)+"000000000").substr(2,8); return s ? "-" + p.substr(0,4) + "-" + p.substr(4,4) : p ; } return _p8() + _p8(true) + _p8(true) + _p8(); } function func_akt_account_puzzle_select_(id){ func_akt_account_raise_error(''); document.getElementById('akt_account_atag_puzzle_a1_h').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a2_h').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a3_h').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a4_h').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a1_v').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a2_v').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a3_v').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a4_v').className='akt_account_puzzle_a'; document.getElementById('akt_account_atag_puzzle_a'+id+'_h').className='akt_account_puzzle_a_selected'; document.getElementById('akt_account_atag_puzzle_a'+id+'_v').className='akt_account_puzzle_a_selected'; document.getElementById('akt_account_btn_signin_'+akt_account_dm).focus(); } function func_akt_account_signin1(){ var ty=akt_account_dm; var m=document.getElementById('akt_account_txt_mobile_'+ty).value; var isd_code; func_akt_account_raise_error(''); var selected_ans =''; if (m==''){func_akt_account_raise_error('Enter Mobile Number');return;} // if (m.length<5){func_akt_account_raise_error('Enter valid Mobile Number');return;} if (ty=='v'){ isd_code = txt_mobile_instance_v.getSelectedCountryData().dialCode; if (txt_mobile_instance_v.isValidNumber() == false) {func_akt_account_raise_error(txt_mobile_errorMap[txt_mobile_instance_v.getValidationError()]);return;} } else { isd_code = txt_mobile_instance_h.getSelectedCountryData().dialCode; if (txt_mobile_instance_h.isValidNumber() == false) {func_akt_account_raise_error(txt_mobile_errorMap[txt_mobile_instance_h.getValidationError()]);return;} } if (document.getElementById('akt_account_atag_puzzle_a1_'+ty).className=='akt_account_puzzle_a_selected'){selected_ans=document.getElementById('akt_account_atag_puzzle_a1_'+ty).innerHTML;} if (document.getElementById('akt_account_atag_puzzle_a2_'+ty).className=='akt_account_puzzle_a_selected'){selected_ans=document.getElementById('akt_account_atag_puzzle_a2_'+ty).innerHTML;} if (document.getElementById('akt_account_atag_puzzle_a3_'+ty).className=='akt_account_puzzle_a_selected'){selected_ans=document.getElementById('akt_account_atag_puzzle_a3_'+ty).innerHTML;} if (document.getElementById('akt_account_atag_puzzle_a4_'+ty).className=='akt_account_puzzle_a_selected'){selected_ans=document.getElementById('akt_account_atag_puzzle_a4_'+ty).innerHTML;} if (selected_ans==''){func_akt_account_raise_error('Select Solution to Puzzle'); return;} if (selected_ans!=document.getElementById('akt_account_hdn_puzzle_ca').innerHTML){func_akt_account_reset_puzzle(); func_akt_account_raise_error('Incorrect Solution to Puzzle'); return;} document.getElementById('akt_account_ifrm').src='https://aktapi.com/11011011~q+signin1~p1+'+isd_code+','+m; } //func_akt_account_signin1 function func_akt_account_signin2(){ var ty=akt_account_dm; var m=document.getElementById('akt_account_txt_mobile_'+ty).value; var p=document.getElementById('akt_account_txt_pwd_'+ty).value; var isd_code; func_akt_account_raise_error(''); if (ty=='v'){ isd_code = txt_mobile_instance_v.getSelectedCountryData().dialCode; } else { isd_code = txt_mobile_instance_h.getSelectedCountryData().dialCode; } if (document.getElementById('akt_account_txt_otp_1_'+ty).value==''){ if (document.getElementById('akt_account_txt_pwd_'+ty).value==''){func_akt_account_raise_error('Enter Password');return;} if (document.getElementById('akt_account_txt_pwd_'+ty).value.length<5){func_akt_account_raise_error('Password length should be minimum 5 digits.');return;} } else { if (document.getElementById('akt_account_txt_otp_1_'+ty).value==''){func_akt_account_raise_error('Enter OTP');return;} if (document.getElementById('akt_account_txt_otp_2_'+ty).value==''){func_akt_account_raise_error('Enter OTP');return;} if (document.getElementById('akt_account_txt_otp_3_'+ty).value==''){func_akt_account_raise_error('Enter OTP');return;} if (document.getElementById('akt_account_txt_otp_4_'+ty).value==''){func_akt_account_raise_error('Enter OTP');return;} if (document.getElementById('akt_account_txt_otp_5_'+ty).value==''){func_akt_account_raise_error('Enter OTP');return;} if (document.getElementById('akt_account_txt_otp_6_'+ty).value==''){func_akt_account_raise_error('Enter OTP');return;} p='otp-'; p+=document.getElementById('akt_account_txt_otp_1_'+ty).value; p+=document.getElementById('akt_account_txt_otp_2_'+ty).value; p+=document.getElementById('akt_account_txt_otp_3_'+ty).value; p+=document.getElementById('akt_account_txt_otp_4_'+ty).value; p+=document.getElementById('akt_account_txt_otp_5_'+ty).value; p+=document.getElementById('akt_account_txt_otp_6_'+ty).value; p+='-'+akt_account_signin_otp; } document.getElementById('akt_account_ifrm').src='https://aktapi.com/11011011~c+56545679~q+signin2~p1+'+isd_code+','+m+','+p; }//func_akt_account_signin2 function func_akt_account_signup1(){ var ty=akt_account_dm; var n=document.getElementById('akt_account_txt_name_'+ty).value; var e=document.getElementById('akt_account_txt_email_'+ty).value.toLowerCase(); var m=document.getElementById('akt_account_txt_mobile_'+ty).value; var isd_code,isd_iso,isd_name; if (ty=='v'){ isd_code = txt_mobile_instance_v.getSelectedCountryData().dialCode; isd_iso = txt_mobile_instance_v.getSelectedCountryData().iso2.toUpperCase() isd_name = txt_mobile_instance_v.getSelectedCountryData().name.split(' (')[0]; } else { isd_code = txt_mobile_instance_h.getSelectedCountryData().dialCode; isd_iso = txt_mobile_instance_h.getSelectedCountryData().iso2.toUpperCase() isd_name = txt_mobile_instance_h.getSelectedCountryData().name.split(' (')[0]; } func_akt_account_raise_error(''); var err=''; if (n.trim() == "") { err = "Enter Full Name to continue."; } else if (n.length < 5) { err = "Minimum length of Name should be 5."; } else if (n.length > 50) { err = "Maximum length of Name can be 50."; } else if (func_akt_account_txt_validate(n, 'alpha_space') != '') { err = "Enter valid Name to continue."; } else if (e.trim() == "") { //err = "Enter Email to continue."; } else if (e.length < 5) { err = "Minimum length of Email should be 5."; } else if (e.length > 50) { err = "Maximum length of Email can be 50."; } else if (func_akt_account_txt_validate(e, 'email') != '') { err = "Invalid Email Format"; } func_akt_account_raise_error(err); if (err==''){ document.getElementById('akt_account_ifrm').src='https://aktapi.com/11011011~c+na~q+signup_send_otp~p1+' + isd_iso + ',' + isd_name + ',' + isd_code + ',' + m + ',' + e + ',' + n; } } //func_akt_account_signup1 function func_akt_account_signup2(){ var ty=akt_account_dm; var n=document.getElementById('akt_account_txt_name_'+ty).value; func_akt_account_raise_error(''); var err=''; if (document.getElementById('akt_account_txt_motp_1_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_motp_2_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_motp_3_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_motp_4_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_motp_5_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_motp_6_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_eotp_1_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_eotp_2_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_eotp_3_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_eotp_4_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_eotp_5_'+ty).value==''){err='Enter OTP';} if (document.getElementById('akt_account_txt_eotp_6_'+ty).value==''){err='Enter OTP';} func_akt_account_raise_error(err); if (err==''){ var u = ''; u += 'https://aktapi.com/11011011~c+na~q+signup_final~p1+'; u += n + ','; u += akt_account_signin_otp_e_kc + ','; u += akt_account_signin_otp_m_kc + ','; //if (document.getElementById('tr_ver_motp').style.display == 'none') { //u += document.getElementById('akt_account_txt_motp_1_'+ty).value; u += document.getElementById('akt_account_txt_motp_2_'+ty).value; u += document.getElementById('akt_account_txt_motp_3_'+ty).value; u += document.getElementById('akt_account_txt_motp_4_'+ty).value; u += document.getElementById('akt_account_txt_motp_5_'+ty).value; u += document.getElementById('akt_account_txt_motp_6_'+ty).value; u += ','; //} else { // u += 'self_verified,'; //} //if (document.getElementById('tr_ver_eotp').style.display == 'none') { //u += document.getElementById('akt_account_txt_eotp_1_'+ty).value; u += document.getElementById('akt_account_txt_eotp_2_'+ty).value; u += document.getElementById('akt_account_txt_eotp_3_'+ty).value; u += document.getElementById('akt_account_txt_eotp_4_'+ty).value; u += document.getElementById('akt_account_txt_eotp_5_'+ty).value; u += document.getElementById('akt_account_txt_eotp_6_'+ty).value; u += ','; //} else { // u += 'self_verified'; //} //alert(u); document.getElementById('akt_account_ifrm').src = u; } } //func_akt_account_signup2 function func_akt_account_result(result){ // alert(1); //var ans=func_akt_account_get_iframe_content('akt_account_ifrm'); // alert(result); if (result!='') {alert(result);} } function func_akt_account_raise_error(err) { var ty=akt_account_dm; if (err=='') { document.getElementById('akt_account_tr_header1_h').style.display=''; document.getElementById('akt_account_tr_header1_v').style.display=''; document.getElementById('akt_account_tr_header2_h').style.display='none'; document.getElementById('akt_account_tr_header2_v').style.display='none'; } else { document.getElementById('akt_account_tr_header1_h').style.display='none'; document.getElementById('akt_account_tr_header1_v').style.display='none'; document.getElementById('akt_account_tr_header2_h').style.display=''; document.getElementById('akt_account_tr_header2_v').style.display=''; } document.getElementById('akt_account_td_error_h').innerHTML=err; document.getElementById('akt_account_td_error_v').innerHTML=err; } function func_akt_account_hide_error(){func_akt_account_raise_error('');} function func_akt_account_website(id){ window.open('https://www.aktaccount.com?pc=56545679&ty='+id); } function func_akt_account_website_cn(){window.open('https://akt.ac/create');} function func_akt_account_website_fa(){func_akt_account_website('fa');} function func_akt_account_website_rp(){func_akt_account_website('rp');} function func_akt_account_onkeypress_userid(){ func_akt_account_hide_error(); if (window.event.keyCode==13 && document.getElementById('akt_account_txt_userid').value.length>=5){ if (document.getElementById('akt_account_td_pwd').style.display==''){ document.getElementById('akt_account_txt_pwd').focus(); } else { document.getElementById('akt_account_txt_otp_1').focus(); } return false; } else { if (window.event.keyCode==13 && document.getElementById('akt_account_txt_userid').value==''){func_akt_account_raise_error('Enter AKT Username / Mobile / Email');return false;} if (window.event.keyCode==13 && document.getElementById('akt_account_txt_userid').value.length<5){func_akt_account_raise_error('Enter valid AKT Username / Mobile / Email');return false;} var ans =func_akt_account_txt_onkeypress(window.event.keyCode,'userid'); if (ans==false){window.event.keyCode=ans;return false;} } return true; } function func_akt_account_onkeypress_pwd(){ func_akt_account_hide_error(); if (window.event.keyCode==13 && document.getElementById('akt_account_txt_pwd').value.length>=5){ document.getElementById('akt_account_atag_puzzle_a1').focus(); return false; } else { if (window.event.keyCode==13 && document.getElementById('akt_account_txt_pwd').value==''){func_akt_account_raise_error('Enter Password');return false;} if (window.event.keyCode==13 && document.getElementById('akt_account_txt_pwd').value.length<5){func_akt_account_raise_error('Password length should be minimum 5 digits.');return false;} var ans =func_akt_account_txt_onkeypress(window.event.keyCode,'password'); if (ans==false){window.event.keyCode=ans;return false;} } return true; } function func_akt_account_onpaste_userid(e){ var ans =func_akt_account_txt_onpaste(e,'userid'); if (ans==false){window.event.returnValue = false;return false;} } function func_akt_account_onpaste_pwd(e){ var ans =func_akt_account_txt_onpaste(e,'pwd'); if (ans==false){window.event.returnValue = false;return false;} } function func_akt_account_onpaste_otp(e){ var ans =func_akt_account_txt_onpaste(e,'numeric'); if (ans==true){ var data=e.clipboardData.getData('text/plain'); if (data.length==6){ document.getElementById('akt_account_txt_otp_1').value=func_akt_account_mid(data,1,1); document.getElementById('akt_account_txt_otp_2').value=func_akt_account_mid(data,2,1); document.getElementById('akt_account_txt_otp_3').value=func_akt_account_mid(data,3,1); document.getElementById('akt_account_txt_otp_4').value=func_akt_account_mid(data,4,1); document.getElementById('akt_account_txt_otp_5').value=func_akt_account_mid(data,5,1); document.getElementById('akt_account_txt_otp_6').value=func_akt_account_mid(data,6,1); } ans=false; } if (ans==false){window.event.returnValue = false;return false;} } function func_akt_account_onkeypress_otp(id){ func_akt_account_hide_error(); if (window.event.keyCode==13 && document.getElementById('akt_account_txt_otp_'+id).value!=''){ if (id!=6){ document.getElementById('akt_account_txt_otp_'+(parseInt(id)+1)).focus(); } else { document.getElementById('akt_account_atag_puzzle_a1').focus(); } return false; } else { if (window.event.keyCode==13){func_akt_account_raise_error('Enter OTP');return false;} var ans =func_akt_account_txt_onkeypress(window.event.keyCode,'numeric'); if (ans==false){window.event.keyCode=ans;return false;} } document.getElementById('akt_account_txt_otp_'+(parseInt(id))).value=String.fromCharCode(window.event.keyCode); if (id!=6){ document.getElementById('akt_account_txt_otp_'+(parseInt(id)+1)).focus(); return false; } else { document.getElementById('akt_account_atag_puzzle_a1').focus(); return false; } return true; } var akt_account_dm=''; var akt_account_sz; function func_akt_account_create_signin(m_width){ var w=window.innerWidth; var tr_disp_h=''; var tr_disp_v='none'; akt_account_sz=parseInt(m_width/250); //alert(w); //alert(m_width); if (m_width==w){akt_account_dm='v';tr_disp_h='none';tr_disp_v='';} else {akt_account_dm='h';} //alert(akt_account_dm); var t = ''; t+=''; t+=''; t+=''; t+=''; t+=''; t+=''; t+=''; t+=''; t+=''; t+=''; t+=''; t+=''; t+='
'+func_akt_account_create_signin_panel('h',1)+'
'; t+='
'; t+='
'+func_akt_account_create_signin_panel('v',akt_account_sz)+'
'; t+='
'; t+='
'; var div1 = document.createElement("DIV"); div1.innerHTML=t; div1.id='akt_account_div_signin'; div1.name='akt_account_div_signin'; div1.className='akt_account_div_signin_hidden'; div1.style.paddingTop='10px'; div1.style.background='black'; div1.style.position='fixed'; div1.style.height='140px'; div1.style.width='100%'; div1.style.color='white'; document.body.appendChild(div1); // document.getElementById('akt_account_atag_puzzle_a1').onkeyup = function(){if(window.event.keyCode==32){func_akt_account_puzzle_select_(1);}if(window.event.keyCode==37){if (document.getElementById('akt_account_td_pwd').style.display==''){document.getElementById('akt_account_txt_pwd').focus();} else {document.getElementById('akt_account_txt_otp_6').focus();}}if(window.event.keyCode==39){document.getElementById('akt_account_atag_puzzle_a2').focus();}}; // document.getElementById('akt_account_atag_puzzle_a2').onkeyup = function(){if(window.event.keyCode==32){func_akt_account_puzzle_select_(2);}if(window.event.keyCode==37){document.getElementById('akt_account_atag_puzzle_a1').focus();}if(window.event.keyCode==39){document.getElementById('akt_account_atag_puzzle_a3').focus();}}; // document.getElementById('akt_account_atag_puzzle_a3').onkeyup = function(){if(window.event.keyCode==32){func_akt_account_puzzle_select_(3);}if(window.event.keyCode==37){document.getElementById('akt_account_atag_puzzle_a2').focus();}if(window.event.keyCode==39){document.getElementById('akt_account_atag_puzzle_a4').focus();}}; // document.getElementById('akt_account_atag_puzzle_a4').onkeyup = function(){if(window.event.keyCode==32){func_akt_account_puzzle_select_(4);}if(window.event.keyCode==37){document.getElementById('akt_account_atag_puzzle_a3').focus();}if(window.event.keyCode==39){document.getElementById('akt_account_btn_signin').focus();}}; document.getElementById('akt_account_btn_signin').onkeyup = function(){if(window.event.keyCode==32){func_akt_account_signin();}if(window.event.keyCode==37){document.getElementById('akt_account_atag_puzzle_a4').focus();}}; var ifrm = document.createElement("IFRAME"); ifrm.id='akt_account_ifrm'; ifrm.name='akt_account_ifrm'; // ifrm.innerHTML=''; // ifrm.onload= function() { // return function() { func_akt_account_signin_loaded(); } // }(); ifrm.style.position='fixed'; ifrm.style.display='none'; ifrm.style.top='600px'; ifrm.style.left='0px'; ifrm.style.width='600px'; ifrm.style.height='250px'; ifrm.style.backgroundColor='#cccccc'; document.body.appendChild(ifrm); var div2 = document.createElement("DIV"); var div2_=''; div2_+='
'; div2_+=''; div2_+=''; div2_+=''; div2_+=''; div2_+=''; div2_+=''; div2_+='
|'; div2_+=''; div2_+='
'; div2_+='
'; div2.innerHTML=div2_; div2.id='akt_account_div_btn'; div2.name='akt_account_div_btn'; div2.className='akt_account_div_btn_hidden'; div2.style.position='fixed'; div2.style.right='20px'; document.body.appendChild(div2); var div3 = document.createElement("DIV"); div3.innerHTML=''; div3.id='akt_account_div_body_margin_top'; div3.name='akt_account_div_body_margin_top'; div3.className='akt_account_div_body_margin_top_hidden'; div3.style.background='black'; div3.style.width='100%'; document.body.prepend(div3); func_akt_account_resize(); var txt_mobile_input_h = document.querySelector("#akt_account_txt_mobile_h"); var txt_mobile_input_v = document.querySelector("#akt_account_txt_mobile_v"); txt_mobile_errorMap = ["Invalid mobile number", "Invalid country code", "Mobile number too short", "Mobile number too long", "Invalid mobile number", "Invalid mobile number", "Invalid mobile number"]; txt_mobile_instance_h = window.intlTelInput(txt_mobile_input_h, { utilsScript: "https://www.aktaccount.com/resources/js/utils.js" }); txt_mobile_instance_v = window.intlTelInput(txt_mobile_input_v, { utilsScript: "https://www.aktaccount.com/resources/js/utils.js" }); func_akt_account_ss_load_all(); } //func_akt_account_create_signin function func_akt_account_create_signin_panel(ty,sz){ var sep=''; var tb_style=''; if (ty=='v'){sep='';tb_style='width:100%;';} var t = ''; t+=''; t+=''; t+=''; t+=sep; if (ty=='v') { t+=''; t+=sep; } t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=sep; t+=''; t+=''; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+=' '; t+='
'; t+='
'; return t; //func_akt_account_show_signin(); } function func_akt_account_txt_onkeypress(window_event_keyCode, validationtype) { if (window_event_keyCode == 13) { return true; } if (validationtype == 'userid') { return func_akt_account_txt_chk_char_userid(window_event_keyCode); } else if (validationtype == 'alpha') { return func_akt_account_txt_chk_char_Alpha(window_event_keyCode); } else if (validationtype == 'numeric') { return func_akt_account_txt_chk_char_NosOnly(window_event_keyCode); } else if (validationtype == 'password') { return func_akt_account_txt_chk_char_password(window_event_keyCode); } return true; } function func_akt_account_txt_onpaste(e,validationtype) { var ans = func_akt_account_txt_validate(e.clipboardData.getData('text/plain'), validationtype); if (ans != '') { return false; } else { return true; } } function func_akt_account_txt_validate(txt, validationtype) { var regex1 = /^[a-zA-Z0-9_\s]*$/; if (validationtype == 'userid') { regex1 = /^[a-zA-Z0-9._\s]*$/; } else if (validationtype == 'alpha') { regex1 = /^[a-zA-Z][a-zA-Z]+$/; } else if (validationtype == 'numeric') { regex1 = /^(?!(0(\.0{0,2})?|(\.0{0,2}))$)[`]{0,1}?[0-9]{1,20}?(\.[0-9]{1,2})?$/; } else if (validationtype == 'pwd') { regex1 = /^[a-zA-Z0-9`~!@#$%^&*-=()_+|\[\]{}:,.\/<>?\s]*$/; } if (regex1.test(txt) == false) { return 'Error'; } else { return ''; } } function func_akt_account_txt_chk_char_userid(chr) { if (func_akt_account_txt_chk_char_Alpha(chr) || func_akt_account_txt_chk_char_NosOnly(chr) || parseInt(chr) == 46 || parseInt(chr) == 64 || parseInt(chr) == 95 ) { //42= * //46= . //64= @ //95= _ //35=# //36= $ //38= & //37= % return true; } else { return false; } } function func_akt_account_txt_chk_char_Alpha(chr, obj) { if ((parseInt(chr) >= 65 && parseInt(chr) <= 90) || (parseInt(chr) >= 97 && parseInt(chr) <= 122)) { return true; } else { return false; } } function func_akt_account_txt_chk_char_NosOnly(chr, obj) { if (parseInt(chr) >= 48 && parseInt(chr) <= 57) { return true; } else { return false; } } function func_akt_account_txt_chk_char_password(chr, obj) { if (func_akt_account_txt_chk_char_Alpha(chr, obj) || func_akt_account_txt_chk_char_NosOnly(chr, obj) || parseInt(chr) == 33 || parseInt(chr) == 35 || parseInt(chr) == 36 || parseInt(chr) == 37 || parseInt(chr) == 42 || parseInt(chr) == 46 || parseInt(chr) == 64 || parseInt(chr) == 95 || parseInt(chr) == 126 ) { return true; } else { return false; } } function func_akt_account_get_iframe_content(id) { try { var iframeEl = document.getElementById(id); var iFrameBody=''; var y=(iframeEl.contentWindow || iframeEl.contentDocument); if (y.document)y=y.document; return y.body.innerHTML.replace('
','').replace('
',''); } catch(err) { return err; return ''; } } if (window.addEventListener) { window.addEventListener("message", func_akt_account_auth_ifrm_handleMessage); } else { window.attachEvent("onmessage", func_akt_account_auth_ifrm_handleMessage); } var func_akt_account_auth_tick_time_interval; function func_akt_account_auth_ifrm_handleMessage() { if (event.origin == 'https://aktapi.com') { var v=event.data.split('-'); if (v[0] == 'signin_rgb_gen') { if(v.length==3){ var o=v[1]; var rgb='r'; func_akt_account_auth_ct = 1; odoo.default({ el:'.auth_rgb_'+rgb+'1_h', from: 'X', to: func_akt_account_mid(o,1,1), animationDelay: 1500 }); odoo.default({ el:'.auth_rgb_'+rgb+'2_h', from: 'X', to: func_akt_account_mid(o,2,1), animationDelay: 1800 }); odoo.default({ el:'.auth_rgb_'+rgb+'3_h', from: 'X', to: func_akt_account_mid(o,3,1), animationDelay: 2100 }); odoo.default({ el:'.auth_rgb_'+rgb+'4_h', from: 'X', to: func_akt_account_mid(o,4,1), animationDelay: 2400 }); odoo.default({ el:'.auth_rgb_'+rgb+'5_h', from: 'X', to: func_akt_account_mid(o,5,1), animationDelay: 2700 }); odoo.default({ el:'.auth_rgb_'+rgb+'6_h', from: 'X', to: func_akt_account_mid(o,6,1), animationDelay: 3000 }); odoo.default({ el:'.auth_rgb_'+rgb+'1_v', from: 'X', to: func_akt_account_mid(o,1,1), animationDelay: 1500 }); odoo.default({ el:'.auth_rgb_'+rgb+'2_v', from: 'X', to: func_akt_account_mid(o,2,1), animationDelay: 1800 }); odoo.default({ el:'.auth_rgb_'+rgb+'3_v', from: 'X', to: func_akt_account_mid(o,3,1), animationDelay: 2100 }); odoo.default({ el:'.auth_rgb_'+rgb+'4_v', from: 'X', to: func_akt_account_mid(o,4,1), animationDelay: 2400 }); odoo.default({ el:'.auth_rgb_'+rgb+'5_v', from: 'X', to: func_akt_account_mid(o,5,1), animationDelay: 2700 }); odoo.default({ el:'.auth_rgb_'+rgb+'6_v', from: 'X', to: func_akt_account_mid(o,6,1), animationDelay: 3000 }); func_akt_account_auth_tick_time_interval = setTimeout(func_akt_account_auth_tick_time, 6000); } } } } var func_akt_account_auth_ct = 1; function func_akt_account_auth_tick_time() { func_akt_account_auth_ct += 1; document.getElementById('div_w_outer_h').style.display = ''; document.getElementById('div_w_outer_v').style.display = ''; document.getElementById('div_w_active_h').style.background='linear-gradient(165deg, #C165DD, #5C27FE)'; document.getElementById('div_w_active_v').style.background='linear-gradient(165deg, #C165DD, #5C27FE)'; document.getElementById('div_w_active_h').style.width = (func_akt_account_auth_ct/3) + '%'; document.getElementById('div_w_active_v').style.width = (func_akt_account_auth_ct/3) + '%'; document.getElementById('div_w_pointer_h').style.left = (func_akt_account_auth_ct/3) + '%'; document.getElementById('div_w_pointer_v').style.left = (func_akt_account_auth_ct/3) + '%'; if (func_akt_account_auth_ct > 298) { clearInterval(func_akt_account_auth_tick_time_interval); document.getElementById('div_w_outer_h').style.display = 'none'; document.getElementById('div_w_outer_v').style.display = 'none'; func_akt_account_auth_ct -= 1; document.getElementById('ifrm_auth_bg').src="https://aktapi.com/11011011~c+na~q+signin_rgb_new"; } else { func_akt_account_auth_tick_time_interval = setTimeout(func_akt_account_auth_tick_time, 1000); } } function func_akt_account_txt_validate(txt, validationtype) { //if (validationtype == 'email' && txt== '') { return '';} var regex1 = /^[a-zA-Z0-9_\s]*$/; if (validationtype == 'userid') { regex1 = /^[a-zA-Z0-9._\s]*$/; } else if (validationtype == 'alpha') { regex1 = /^[a-zA-Z][a-zA-Z]+$/; } else if (validationtype == 'alpha_space') { regex1 = /^[a-zA-Z][a-zA-Z ]+$/; } else if (validationtype == 'aktid') { regex1 = /^[a-zA-Z0-9._]*$/; } else if (validationtype == 'numeric') { regex1 = /^(?!(0(\.0{0,2})?|(\.0{0,2}))$)[`]{0,1}?[0-9]{1,20}?(\.[0-9]{1,2})?$/; } else if (validationtype == 'pwd') { regex1 = /^[a-zA-Z0-9`~!@#$%^&*-=()_+|\[\]{}:,.\/<>?\s]*$/; } else if (validationtype == 'email') { regex1 = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; } if (regex1.test(txt) == false) { return 'Error'; } else { return ''; } } function func_akt_account_change_css(n,f,v){ var ssl = document.styleSheets; for(s=0;s3){ if (ssl[s].cssRules[1].selectorText=='.akt_account_style_sheet'){ isAKTacCSS=true; } } } catch (err) { } if (isAKTacCSS==true){ for(cc=0;cc2) { curr_ac_name=a[cc].split('~')[2]; } } document.getElementById('akt_account_td_signin').style.display='none'; document.getElementById('akt_account_td_fullname').innerHTML=curr_ac_name; document.getElementById('akt_account_td_signout').style.display=''; }//func_akt_account_ss_set function func_akt_account_ss_load_cookie(){ var a = document.cookie.split(';'); for (cc = 0; cc < a.length; cc++) { if(a[cc].split('=')[0].trim()=='akt_ac_sl'){ return a[cc].split('=')[1]; } } return ''; }//func_akt_account_ss_load_cookie //slot for auth - start !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.odoo=e():t.odoo=e()}(this,function(){return function(t){function e(a){if(r[a])return r[a].exports;var n=r[a]={exports:{},id:a,loaded:!1};return t[a].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="/",e(0)}([function(t,e,r){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=r(2);Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a(n)["default"]}})},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t){var e=void 0,r=function a(r){e=requestAnimationFrame(a),t(r)};return r(0),function(){return cancelAnimationFrame(e)}}},function(t,e,r){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),l=a(n),o=r(5),i=r(10),c=a(i),u="0123456789ABCDEFGHIJKLMNOPRSTUVWXYZabcdefghijklmnoprstuvwxyz".split(""),f=u.length-1,d=2,s=function(t,e,r,a){var n,l=(n=(n=o.append.call(t,"g"),o.attr).call(n,"id","digit-"+a),o.style).call(n,"filter","url(#motionFilter-"+a+")");return u.forEach(function(t,a){var n;(n=(n=o.append.call(l,"text"),o.attr).call(n,"y",-a*e*r),o.text).call(n,t)}),l},p=function(t,e){var r;return(r=(r=(r=(r=(r=(r=(r=o.append.call(t,"filter"),o.attr).call(r,"id","motionFilter-"+e),o.attr).call(r,"width","300%"),o.attr).call(r,"x","-100%"),o.append).call(r,"feGaussianBlur"),o.attr).call(r,"class","blurValues"),o.attr).call(r,"in","SourceGraphic"),o.attr).call(r,"stdDeviation","0 0")},v=function(t){var e;return(e=(e=(e=(e=(e=o.append.call(t,"filter"),o.attr).call(e,"id","createShadowFailFilter"),o.attr).call(e,"width","300%"),o.attr).call(e,"x","-100%"),o.append).call(e,"feGaussianBlur"),o.attr).call(e,"stdDeviation","0 0")},y=function(t,e){var r;return(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=o.append.call(t,"linearGradient"),o.attr).call(r,"id","gradient-"+e),o.attr).call(r,"x1","0%"),o.attr).call(r,"y1","0%"),o.attr).call(r,"x2","0%"),o.attr).call(r,"y2","100%"),o.append).call(r,"stop"),o.attr).call(r,"offset","0"),o.attr).call(r,"stop-color","white"),o.attr).call(r,"stop-opacity","0"),o.select).call(r,"#gradient-"+e),o.append).call(r,"stop"),o.attr).call(r,"offset","0.2"),o.attr).call(r,"stop-color","white"),o.attr).call(r,"stop-opacity","1"),o.select).call(r,"#gradient-"+e),o.append).call(r,"stop"),o.attr).call(r,"offset","0.8"),o.attr).call(r,"stop-color","white"),o.attr).call(r,"stop-opacity","1"),o.select).call(r,"#gradient-"+e),o.append).call(r,"stop"),o.attr).call(r,"offset","1"),o.attr).call(r,"stop-color","white"),o.attr).call(r,"stop-opacity","0")},h=function(t,e){var r;return(r=(r=(r=(r=(r=(r=(r=o.append.call(t,"mask"),o.attr).call(r,"id","mask-"+e),o.append).call(r,"rect"),o.attr).call(r,"x",0),o.attr).call(r,"y",0),o.attr).call(r,"width","100%"),o.attr).call(r,"height","100%"),o.attr).call(r,"fill","url(#gradient-"+e+")")},m=function(t,e,r){var a;return(a=(a=(a=o.attr.call(t,"width",e),o.attr).call(a,"height",r),o.attr).call(a,"viewBox","0 0 "+e+" "+r),o.style).call(a,"overflow","hidden")};e["default"]=function(t){var e,r=t.el,a=t.from,n=t.to,i=t.lineHeight,g=void 0===i?1.35:i,b=t.letterSpacing,_=void 0===b?1:b,x=t.animationDelay,j=void 0===x?100:x,M=t.letterAnimationDelay,w=void 0===M?100:M,O=(0,o.select)(r),P=window.getComputedStyle(O),S=parseInt(P.fontSize,10),D=(S*g-S)/2+S/10,E=S*g-D,F=Date.now(),B=0,k=S*g+D;O.innerHTML="";var A=o.append.call(O,"svg"),G=(e=o.append.call(A,"svg"),o.attr).call(e,"mask","url(#mask-"+F+")"),C=o.append.call(A,"defs");y(C,F),h(C,F),v(C);var H=String(a).replace(/ /g," ").split(""),q=String(n).replace(/ /g," ").split(""),z=q.map(function(t,e){var r=e+"-"+F;return{id:r,node:s(G,S,g,r),filter:p(C,r),from:u.indexOf(H[e]),value:u.indexOf(t),offset:{x:0,y:E}}}),I=[];z.forEach(function(t,e){var r=t.from*(S*g),a=(d*f+t.value)*(S*g),n=(0,c["default"])({from:r,to:a,delay:(z.length-1-e)*w+j,step:function(e){var n;t.offset.y=E+e%(S*g*f),(n=t.node,o.attr).call(n,"transform","translate("+t.offset.x+", "+t.offset.y+")");var l=(a-r)/2,i=Math.abs(Math.abs(e-r-l)-l)/100;(n=t.filter,o.attr).call(n,"stdDeviation","0 "+i)},end:0===e?function(){return N()}:function(t){return t}});I.push(n)});var L=function(t){B=0,z.forEach(function(t){var e=t.node.getBBox(),r=e.width;t.offset.x=B,B+=r+_}),z.forEach(function(t){var e;(e=t.node,o.attr).call(e,"transform","translate("+t.offset.x+", "+t.offset.y+")")}),m(A,B,k),I.forEach(function(e){return e.update(t)})},N=(0,l["default"])(L);return N}},function(t,e,r){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t){var e=document.createElementNS(l["default"].svg,t);return this.appendChild(e),e};var n=r(6),l=a(n)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e){return this.setAttribute(t,e),this}},function(t,e,r){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=r(7);Object.defineProperty(e,"select",{enumerable:!0,get:function(){return a(n)["default"]}});var l=r(3);Object.defineProperty(e,"append",{enumerable:!0,get:function(){return a(l)["default"]}});var o=r(4);Object.defineProperty(e,"attr",{enumerable:!0,get:function(){return a(o)["default"]}});var i=r(8);Object.defineProperty(e,"style",{enumerable:!0,get:function(){return a(i)["default"]}});var c=r(9);Object.defineProperty(e,"text",{enumerable:!0,get:function(){return a(c)["default"]}})},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={svg:"http://www.w3.org/2000/svg"}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t){return t===String(t)?document.querySelector(t):t}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"":arguments[2];return this.style.setProperty(t,e,r),this}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t){return this.textContent=t,this}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2};e["default"]=function(t){var e=t.from,a=t.to,n=t.duration,l=void 0===n?3e3:n,o=t.delay,i=void 0===o?0:o,c=t.easing,u=void 0===c?r:c,f=t.start,d=void 0===f?function(t){return t}:f,s=t.step,p=void 0===s?function(t){return t}:s,v=t.end,y=void 0===v?function(t){return t}:v,h=e,m=0,g=!1,b=function(t){if(!g){m||(m=t,d(h));var r=Math.min(Math.max(t-m-i,0),l)/l;h=u(r)*(a-e)+e,p(h),1===r&&(g=!0,y(h))}};return{update:b}}}])}); //slot for auth - end /* * International Telephone Input v17.0.3 * http://github.com/jackocnr/intl-tel-input.git * Licensed under the MIT license */ // wrap in UMD (function(factory) { if (typeof module === "object" && module.exports) module.exports = factory(); else window.intlTelInput = factory(); })(function(undefined) { "use strict"; return function() { var allCountries = [ [ "Afghanistan (‫افغانستان‬‎)", "af", "93" ], [ "Albania (Shqipëri)", "al", "355" ], [ "Algeria (‫الجزائر‬‎)", "dz", "213" ], [ "American Samoa", "as", "1", 5, [ "684" ] ], [ "Andorra", "ad", "376" ], [ "Angola", "ao", "244" ], [ "Anguilla", "ai", "1", 6, [ "264" ] ], [ "Antigua and Barbuda", "ag", "1", 7, [ "268" ] ], [ "Argentina", "ar", "54" ], [ "Armenia (Հայաստան)", "am", "374" ], [ "Aruba", "aw", "297" ], [ "Australia", "au", "61", 0 ], [ "Austria (Österreich)", "at", "43" ], [ "Azerbaijan (Azərbaycan)", "az", "994" ], [ "Bahamas", "bs", "1", 8, [ "242" ] ], [ "Bahrain (‫البحرين‬‎)", "bh", "973" ], [ "Bangladesh (বাংলাদেশ)", "bd", "880" ], [ "Barbados", "bb", "1", 9, [ "246" ] ], [ "Belarus (Беларусь)", "by", "375" ], [ "Belgium (België)", "be", "32" ], [ "Belize", "bz", "501" ], [ "Benin (Bénin)", "bj", "229" ], [ "Bermuda", "bm", "1", 10, [ "441" ] ], [ "Bhutan (འབྲུག)", "bt", "975" ], [ "Bolivia", "bo", "591" ], [ "Bosnia and Herzegovina (Босна и Херцеговина)", "ba", "387" ], [ "Botswana", "bw", "267" ], [ "Brazil (Brasil)", "br", "55" ], [ "British Indian Ocean Territory", "io", "246" ], [ "British Virgin Islands", "vg", "1", 11, [ "284" ] ], [ "Brunei", "bn", "673" ], [ "Bulgaria (България)", "bg", "359" ], [ "Burkina Faso", "bf", "226" ], [ "Burundi (Uburundi)", "bi", "257" ], [ "Cambodia (កម្ពុជា)", "kh", "855" ], [ "Cameroon (Cameroun)", "cm", "237" ], [ "Canada", "ca", "1", 1, [ "204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905" ] ], [ "Cape Verde (Kabu Verdi)", "cv", "238" ], [ "Caribbean Netherlands", "bq", "599", 1, [ "3", "4", "7" ] ], [ "Cayman Islands", "ky", "1", 12, [ "345" ] ], [ "Central African Republic (République centrafricaine)", "cf", "236" ], [ "Chad (Tchad)", "td", "235" ], [ "Chile", "cl", "56" ], [ "China (中国)", "cn", "86" ], [ "Christmas Island", "cx", "61", 2, [ "89164" ] ], [ "Cocos (Keeling) Islands", "cc", "61", 1, [ "89162" ] ], [ "Colombia", "co", "57" ], [ "Comoros (‫جزر القمر‬‎)", "km", "269" ], [ "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243" ], [ "Congo (Republic) (Congo-Brazzaville)", "cg", "242" ], [ "Cook Islands", "ck", "682" ], [ "Costa Rica", "cr", "506" ], [ "Côte d’Ivoire", "ci", "225" ], [ "Croatia (Hrvatska)", "hr", "385" ], [ "Cuba", "cu", "53" ], [ "Curaçao", "cw", "599", 0 ], [ "Cyprus (Κύπρος)", "cy", "357" ], [ "Czech Republic (Česká republika)", "cz", "420" ], [ "Denmark (Danmark)", "dk", "45" ], [ "Djibouti", "dj", "253" ], [ "Dominica", "dm", "1", 13, [ "767" ] ], [ "Dominican Republic (República Dominicana)", "do", "1", 2, [ "809", "829", "849" ] ], [ "Ecuador", "ec", "593" ], [ "Egypt (‫مصر‬‎)", "eg", "20" ], [ "El Salvador", "sv", "503" ], [ "Equatorial Guinea (Guinea Ecuatorial)", "gq", "240" ], [ "Eritrea", "er", "291" ], [ "Estonia (Eesti)", "ee", "372" ], [ "Ethiopia", "et", "251" ], [ "Falkland Islands (Islas Malvinas)", "fk", "500" ], [ "Faroe Islands (Føroyar)", "fo", "298" ], [ "Fiji", "fj", "679" ], [ "Finland (Suomi)", "fi", "358", 0 ], [ "France", "fr", "33" ], [ "French Guiana (Guyane française)", "gf", "594" ], [ "French Polynesia (Polynésie française)", "pf", "689" ], [ "Gabon", "ga", "241" ], [ "Gambia", "gm", "220" ], [ "Georgia (საქართველო)", "ge", "995" ], [ "Germany (Deutschland)", "de", "49" ], [ "Ghana (Gaana)", "gh", "233" ], [ "Gibraltar", "gi", "350" ], [ "Greece (Ελλάδα)", "gr", "30" ], [ "Greenland (Kalaallit Nunaat)", "gl", "299" ], [ "Grenada", "gd", "1", 14, [ "473" ] ], [ "Guadeloupe", "gp", "590", 0 ], [ "Guam", "gu", "1", 15, [ "671" ] ], [ "Guatemala", "gt", "502" ], [ "Guernsey", "gg", "44", 1, [ "1481", "7781", "7839", "7911" ] ], [ "Guinea (Guinée)", "gn", "224" ], [ "Guinea-Bissau (Guiné Bissau)", "gw", "245" ], [ "Guyana", "gy", "592" ], [ "Haiti", "ht", "509" ], [ "Honduras", "hn", "504" ], [ "Hong Kong (香港)", "hk", "852" ], [ "Hungary (Magyarország)", "hu", "36" ], [ "Iceland (Ísland)", "is", "354" ], [ "India (भारत)", "in", "91" ], [ "Indonesia", "id", "62" ], [ "Iran (‫ایران‬‎)", "ir", "98" ], [ "Iraq (‫العراق‬‎)", "iq", "964" ], [ "Ireland", "ie", "353" ], [ "Isle of Man", "im", "44", 2, [ "1624", "74576", "7524", "7924", "7624" ] ], [ "Israel (‫ישראל‬‎)", "il", "972" ], [ "Italy (Italia)", "it", "39", 0 ], [ "Jamaica", "jm", "1", 4, [ "876", "658" ] ], [ "Japan (日本)", "jp", "81" ], [ "Jersey", "je", "44", 3, [ "1534", "7509", "7700", "7797", "7829", "7937" ] ], [ "Jordan (‫الأردن‬‎)", "jo", "962" ], [ "Kazakhstan (Казахстан)", "kz", "7", 1, [ "33", "7" ] ], [ "Kenya", "ke", "254" ], [ "Kiribati", "ki", "686" ], [ "Kosovo", "xk", "383" ], [ "Kuwait (‫الكويت‬‎)", "kw", "965" ], [ "Kyrgyzstan (Кыргызстан)", "kg", "996" ], [ "Laos (ລາວ)", "la", "856" ], [ "Latvia (Latvija)", "lv", "371" ], [ "Lebanon (‫لبنان‬‎)", "lb", "961" ], [ "Lesotho", "ls", "266" ], [ "Liberia", "lr", "231" ], [ "Libya (‫ليبيا‬‎)", "ly", "218" ], [ "Liechtenstein", "li", "423" ], [ "Lithuania (Lietuva)", "lt", "370" ], [ "Luxembourg", "lu", "352" ], [ "Macau (澳門)", "mo", "853" ], [ "Macedonia (FYROM) (Македонија)", "mk", "389" ], [ "Madagascar (Madagasikara)", "mg", "261" ], [ "Malawi", "mw", "265" ], [ "Malaysia", "my", "60" ], [ "Maldives", "mv", "960" ], [ "Mali", "ml", "223" ], [ "Malta", "mt", "356" ], [ "Marshall Islands", "mh", "692" ], [ "Martinique", "mq", "596" ], [ "Mauritania (‫موريتانيا‬‎)", "mr", "222" ], [ "Mauritius (Moris)", "mu", "230" ], [ "Mayotte", "yt", "262", 1, [ "269", "639" ] ], [ "Mexico (México)", "mx", "52" ], [ "Micronesia", "fm", "691" ], [ "Moldova (Republica Moldova)", "md", "373" ], [ "Monaco", "mc", "377" ], [ "Mongolia (Монгол)", "mn", "976" ], [ "Montenegro (Crna Gora)", "me", "382" ], [ "Montserrat", "ms", "1", 16, [ "664" ] ], [ "Morocco (‫المغرب‬‎)", "ma", "212", 0 ], [ "Mozambique (Moçambique)", "mz", "258" ], [ "Myanmar (Burma) (မြန်မာ)", "mm", "95" ], [ "Namibia (Namibië)", "na", "264" ], [ "Nauru", "nr", "674" ], [ "Nepal (नेपाल)", "np", "977" ], [ "Netherlands (Nederland)", "nl", "31" ], [ "New Caledonia (Nouvelle-Calédonie)", "nc", "687" ], [ "New Zealand", "nz", "64" ], [ "Nicaragua", "ni", "505" ], [ "Niger (Nijar)", "ne", "227" ], [ "Nigeria", "ng", "234" ], [ "Niue", "nu", "683" ], [ "Norfolk Island", "nf", "672" ], [ "North Korea (조선 민주주의 인민 공화국)", "kp", "850" ], [ "Northern Mariana Islands", "mp", "1", 17, [ "670" ] ], [ "Norway (Norge)", "no", "47", 0 ], [ "Oman (‫عُمان‬‎)", "om", "968" ], [ "Pakistan (‫پاکستان‬‎)", "pk", "92" ], [ "Palau", "pw", "680" ], [ "Palestine (‫فلسطين‬‎)", "ps", "970" ], [ "Panama (Panamá)", "pa", "507" ], [ "Papua New Guinea", "pg", "675" ], [ "Paraguay", "py", "595" ], [ "Peru (Perú)", "pe", "51" ], [ "Philippines", "ph", "63" ], [ "Poland (Polska)", "pl", "48" ], [ "Portugal", "pt", "351" ], [ "Puerto Rico", "pr", "1", 3, [ "787", "939" ] ], [ "Qatar (‫قطر‬‎)", "qa", "974" ], [ "Réunion (La Réunion)", "re", "262", 0 ], [ "Romania (România)", "ro", "40" ], [ "Russia (Россия)", "ru", "7", 0 ], [ "Rwanda", "rw", "250" ], [ "Saint Barthélemy", "bl", "590", 1 ], [ "Saint Helena", "sh", "290" ], [ "Saint Kitts and Nevis", "kn", "1", 18, [ "869" ] ], [ "Saint Lucia", "lc", "1", 19, [ "758" ] ], [ "Saint Martin (Saint-Martin (partie française))", "mf", "590", 2 ], [ "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)", "pm", "508" ], [ "Saint Vincent and the Grenadines", "vc", "1", 20, [ "784" ] ], [ "Samoa", "ws", "685" ], [ "San Marino", "sm", "378" ], [ "São Tomé and Príncipe (São Tomé e Príncipe)", "st", "239" ], [ "Saudi Arabia (‫المملكة العربية السعودية‬‎)", "sa", "966" ], [ "Senegal (Sénégal)", "sn", "221" ], [ "Serbia (Србија)", "rs", "381" ], [ "Seychelles", "sc", "248" ], [ "Sierra Leone", "sl", "232" ], [ "Singapore", "sg", "65" ], [ "Sint Maarten", "sx", "1", 21, [ "721" ] ], [ "Slovakia (Slovensko)", "sk", "421" ], [ "Slovenia (Slovenija)", "si", "386" ], [ "Solomon Islands", "sb", "677" ], [ "Somalia (Soomaaliya)", "so", "252" ], [ "South Africa", "za", "27" ], [ "South Korea (대한민국)", "kr", "82" ], [ "South Sudan (‫جنوب السودان‬‎)", "ss", "211" ], [ "Spain (España)", "es", "34" ], [ "Sri Lanka (ශ්‍රී ලංකාව)", "lk", "94" ], [ "Sudan (‫السودان‬‎)", "sd", "249" ], [ "Suriname", "sr", "597" ], [ "Svalbard and Jan Mayen", "sj", "47", 1, [ "79" ] ], [ "Swaziland", "sz", "268" ], [ "Sweden (Sverige)", "se", "46" ], [ "Switzerland (Schweiz)", "ch", "41" ], [ "Syria (‫سوريا‬‎)", "sy", "963" ], [ "Taiwan (台灣)", "tw", "886" ], [ "Tajikistan", "tj", "992" ], [ "Tanzania", "tz", "255" ], [ "Thailand (ไทย)", "th", "66" ], [ "Timor-Leste", "tl", "670" ], [ "Togo", "tg", "228" ], [ "Tokelau", "tk", "690" ], [ "Tonga", "to", "676" ], [ "Trinidad and Tobago", "tt", "1", 22, [ "868" ] ], [ "Tunisia (‫تونس‬‎)", "tn", "216" ], [ "Turkey (Türkiye)", "tr", "90" ], [ "Turkmenistan", "tm", "993" ], [ "Turks and Caicos Islands", "tc", "1", 23, [ "649" ] ], [ "Tuvalu", "tv", "688" ], [ "U.S. Virgin Islands", "vi", "1", 24, [ "340" ] ], [ "Uganda", "ug", "256" ], [ "Ukraine (Україна)", "ua", "380" ], [ "United Arab Emirates (‫الإمارات العربية المتحدة‬‎)", "ae", "971" ], [ "United Kingdom", "gb", "44", 0 ], [ "United States", "us", "1", 0 ], [ "Uruguay", "uy", "598" ], [ "Uzbekistan (Oʻzbekiston)", "uz", "998" ], [ "Vanuatu", "vu", "678" ], [ "Vatican City (Città del Vaticano)", "va", "39", 1, [ "06698" ] ], [ "Venezuela", "ve", "58" ], [ "Vietnam (Việt Nam)", "vn", "84" ], [ "Wallis and Futuna (Wallis-et-Futuna)", "wf", "681" ], [ "Western Sahara (‫الصحراء الغربية‬‎)", "eh", "212", 1, [ "5288", "5289" ] ], [ "Yemen (‫اليمن‬‎)", "ye", "967" ], [ "Zambia", "zm", "260" ], [ "Zimbabwe", "zw", "263" ], [ "Åland Islands", "ax", "358", 1, [ "18" ] ] ]; // loop over all of the countries above, restructuring the data to be objects with named keys for (var i = 0; i < allCountries.length; i++) { var c = allCountries[i]; allCountries[i] = { name: c[0], iso2: c[1], dialCode: c[2], priority: c[3] || 0, areaCodes: c[4] || null }; } "use strict"; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var intlTelInputGlobals = { getInstance: function getInstance(input) { var id = input.getAttribute("data-intl-tel-input-id"); return window.intlTelInputGlobals.instances[id]; }, instances: {} }; if (typeof window === "object") window.intlTelInputGlobals = intlTelInputGlobals; // these vars persist through all instances of the plugin var id = 0; var defaults = { // whether or not to allow the dropdown allowDropdown: true, // if there is just a dial code in the input: remove it on blur autoHideDialCode: true, // add a placeholder in the input with an example number for the selected country autoPlaceholder: false, // modify the parentClass customContainer: "", // modify the auto placeholder customPlaceholder: null, // append menu to specified element dropdownContainer: null, // don't display these countries excludeCountries: [], // format the input value during initialisation and on setNumber formatOnDisplay: true, // geoIp lookup function geoIpLookup: null, // inject a hidden input with this name, and on submit, populate it with the result of getNumber hiddenInput: "", // initial country initialCountry: "in", // localized country names e.g. { 'de': 'Deutschland' } localizedCountries: null, // don't insert international dial codes nationalMode: true, // display only these countries onlyCountries: [], // number type to use for placeholders placeholderNumberType: "MOBILE", // the countries at the top of the list. defaults to united states and united kingdom preferredCountries: [], // display the country dial code next to the selected flag so it's not part of the typed number separateDialCode: true, // specify the path to the libphonenumber script to enable validation/formatting utilsScript: "" }; // http://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes#Non-geographic_area_codes var regionlessNanpNumbers = [ "800", "822", "833", "844", "855", "866", "877", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889" ]; if (typeof window === "object") { // keep track of if the window.load event has fired as impossible to check after the fact window.addEventListener("load", function() { // UPDATE: use a public static field so we can fudge it in the tests window.intlTelInputGlobals.windowLoaded = true; }); } // utility function to iterate over an object. can't use Object.entries or native forEach because // of IE11 var forEachProp = function forEachProp(obj, callback) { var keys = Object.keys(obj); for (var i = 0; i < keys.length; i++) { callback(keys[i], obj[keys[i]]); } }; // run a method on each instance of the plugin var forEachInstance = function forEachInstance(method) { forEachProp(window.intlTelInputGlobals.instances, function(key) { window.intlTelInputGlobals.instances[key][method](); }); }; // this is our plugin class that we will create an instance of // eslint-disable-next-line no-unused-vars var Iti = /*#__PURE__*/ function() { function Iti(input, options) { var _this = this; _classCallCheck(this, Iti); this.id = id++; this.telInput = input; this.activeItem = null; this.highlightedItem = null; // process specified options / defaults // alternative to Object.assign, which isn't supported by IE11 var customOptions = options || {}; this.options = {}; forEachProp(defaults, function(key, value) { _this.options[key] = customOptions.hasOwnProperty(key) ? customOptions[key] : value; }); this.hadInitialPlaceholder = Boolean(input.getAttribute("placeholder")); } _createClass(Iti, [ { key: "_init", value: function _init() { var _this2 = this; // if in nationalMode, disable options relating to dial codes if (this.options.nationalMode) this.options.autoHideDialCode = false; // if separateDialCode then doesn't make sense to A) insert dial code into input // (autoHideDialCode), and B) display national numbers (because we're displaying the country // dial code next to them) if (this.options.separateDialCode) { this.options.autoHideDialCode = this.options.nationalMode = false; } // we cannot just test screen size as some smartphones/website meta tags will report desktop // resolutions // Note: for some reason jasmine breaks if you put this in the main Plugin function with the // rest of these declarations // Note: to target Android Mobiles (and not Tablets), we must find 'Android' and 'Mobile' this.isMobile = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); if (this.isMobile) { // trigger the mobile dropdown css document.body.classList.add("iti-mobile"); // on mobile, we want a full screen dropdown, so we must append it to the body if (!this.options.dropdownContainer) this.options.dropdownContainer = document.body; } // these promises get resolved when their individual requests complete // this way the dev can do something like iti.promise.then(...) to know when all requests are // complete if (typeof Promise !== "undefined") { var autoCountryPromise = new Promise(function(resolve, reject) { _this2.resolveAutoCountryPromise = resolve; _this2.rejectAutoCountryPromise = reject; }); var utilsScriptPromise = new Promise(function(resolve, reject) { _this2.resolveUtilsScriptPromise = resolve; _this2.rejectUtilsScriptPromise = reject; }); this.promise = Promise.all([ autoCountryPromise, utilsScriptPromise ]); } else { // prevent errors when Promise doesn't exist this.resolveAutoCountryPromise = this.rejectAutoCountryPromise = function() {}; this.resolveUtilsScriptPromise = this.rejectUtilsScriptPromise = function() {}; } // in various situations there could be no country selected initially, but we need to be able // to assume this variable exists this.selectedCountryData = {}; // process all the data: onlyCountries, excludeCountries, preferredCountries etc this._processCountryData(); // generate the markup this._generateMarkup(); // set the initial state of the input value and the selected flag this._setInitialState(); // start all of the event listeners: autoHideDialCode, input keydown, selectedFlag click this._initListeners(); // utils script, and auto country this._initRequests(); } }, { key: "_processCountryData", value: function _processCountryData() { // process onlyCountries or excludeCountries array if present this._processAllCountries(); // process the countryCodes map this._processCountryCodes(); // process the preferredCountries this._processPreferredCountries(); // translate countries according to localizedCountries option if (this.options.localizedCountries) this._translateCountriesByLocale(); // sort countries by name if (this.options.onlyCountries.length || this.options.localizedCountries) { this.countries.sort(this._countryNameSort); } } }, { key: "_addCountryCode", value: function _addCountryCode(iso2, countryCode, priority) { if (countryCode.length > this.countryCodeMaxLen) { this.countryCodeMaxLen = countryCode.length; } if (!this.countryCodes.hasOwnProperty(countryCode)) { this.countryCodes[countryCode] = []; } // bail if we already have this country for this countryCode for (var i = 0; i < this.countryCodes[countryCode].length; i++) { if (this.countryCodes[countryCode][i] === iso2) return; } // check for undefined as 0 is falsy var index = priority !== undefined ? priority : this.countryCodes[countryCode].length; this.countryCodes[countryCode][index] = iso2; } }, { key: "_processAllCountries", value: function _processAllCountries() { if (this.options.onlyCountries.length) { var lowerCaseOnlyCountries = this.options.onlyCountries.map(function(country) { return country.toLowerCase(); }); this.countries = allCountries.filter(function(country) { return lowerCaseOnlyCountries.indexOf(country.iso2) > -1; }); } else if (this.options.excludeCountries.length) { var lowerCaseExcludeCountries = this.options.excludeCountries.map(function(country) { return country.toLowerCase(); }); this.countries = allCountries.filter(function(country) { return lowerCaseExcludeCountries.indexOf(country.iso2) === -1; }); } else { this.countries = allCountries; } } }, { key: "_translateCountriesByLocale", value: function _translateCountriesByLocale() { for (var i = 0; i < this.countries.length; i++) { var iso = this.countries[i].iso2.toLowerCase(); if (this.options.localizedCountries.hasOwnProperty(iso)) { this.countries[i].name = this.options.localizedCountries[iso]; } } } }, { key: "_countryNameSort", value: function _countryNameSort(a, b) { return a.name.localeCompare(b.name); } }, { key: "_processCountryCodes", value: function _processCountryCodes() { this.countryCodeMaxLen = 0; // here we store just dial codes this.dialCodes = {}; // here we store "country codes" (both dial codes and their area codes) this.countryCodes = {}; // first: add dial codes for (var i = 0; i < this.countries.length; i++) { var c = this.countries[i]; if (!this.dialCodes[c.dialCode]) this.dialCodes[c.dialCode] = true; this._addCountryCode(c.iso2, c.dialCode, c.priority); } // next: add area codes // this is a second loop over countries, to make sure we have all of the "root" countries // already in the map, so that we can access them, as each time we add an area code substring // to the map, we also need to include the "root" country's code, as that also matches for (var _i = 0; _i < this.countries.length; _i++) { var _c = this.countries[_i]; // area codes if (_c.areaCodes) { var rootCountryCode = this.countryCodes[_c.dialCode][0]; // for each area code for (var j = 0; j < _c.areaCodes.length; j++) { var areaCode = _c.areaCodes[j]; // for each digit in the area code to add all partial matches as well for (var k = 1; k < areaCode.length; k++) { var partialDialCode = _c.dialCode + areaCode.substr(0, k); // start with the root country, as that also matches this dial code this._addCountryCode(rootCountryCode, partialDialCode); this._addCountryCode(_c.iso2, partialDialCode); } // add the full area code this._addCountryCode(_c.iso2, _c.dialCode + areaCode); } } } } }, { key: "_processPreferredCountries", value: function _processPreferredCountries() { this.preferredCountries = []; for (var i = 0; i < this.options.preferredCountries.length; i++) { var countryCode = this.options.preferredCountries[i].toLowerCase(); var countryData = this._getCountryData(countryCode, false, true); if (countryData) this.preferredCountries.push(countryData); } } }, { key: "_createEl", value: function _createEl(name, attrs, container) { var el = document.createElement(name); if (attrs) forEachProp(attrs, function(key, value) { return el.setAttribute(key, value); }); if (container) container.appendChild(el); return el; } }, { key: "_generateMarkup", value: function _generateMarkup() { // if autocomplete does not exist on the element and its form, then // prevent autocomplete as there's no safe, cross-browser event we can react to, so it can // easily put the plugin in an inconsistent state e.g. the wrong flag selected for the // autocompleted number, which on submit could mean wrong number is saved (esp in nationalMode) if (!this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete"))) { this.telInput.setAttribute("autocomplete", "off"); } // containers (mostly for positioning) var parentClass = "iti"; if (this.options.allowDropdown) parentClass += " iti--allow-dropdown"; if (this.options.separateDialCode) parentClass += " iti--separate-dial-code"; if (this.options.customContainer) { parentClass += " "; parentClass += this.options.customContainer; } var wrapper = this._createEl("div", { "class": parentClass }); this.telInput.parentNode.insertBefore(wrapper, this.telInput); this.flagsContainer = this._createEl("div", { "class": "iti__flag-container" }, wrapper); wrapper.appendChild(this.telInput); // selected flag (displayed to left of input) this.selectedFlag = this._createEl("div", { "class": "iti__selected-flag", role: "combobox", "aria-owns": "iti-".concat(this.id, "__country-listbox"), "aria-expanded": "false" }, this.flagsContainer); this.selectedFlagInner = this._createEl("div", { "class": "iti__flag" }, this.selectedFlag); if (this.options.separateDialCode) { this.selectedDialCode = this._createEl("div", { "class": "iti__selected-dial-code" }, this.selectedFlag); } if (this.options.allowDropdown) { // make element focusable and tab navigable this.selectedFlag.setAttribute("tabindex", "0"); this.dropdownArrow = this._createEl("div", { "class": "iti__arrow" }, this.selectedFlag); // country dropdown: preferred countries, then divider, then all countries this.countryList = this._createEl("ul", { "class": "iti__country-list iti__hide", id: "iti-".concat(this.id, "__country-listbox"), role: "listbox" }); if (this.preferredCountries.length) { this._appendListItems(this.preferredCountries, "iti__preferred", true); this._createEl("li", { "class": "iti__divider", role: "separator", "aria-disabled": "true" }, this.countryList); } this._appendListItems(this.countries, "iti__standard"); // create dropdownContainer markup if (this.options.dropdownContainer) { this.dropdown = this._createEl("div", { "class": "iti iti--container" }); this.dropdown.appendChild(this.countryList); } else { this.flagsContainer.appendChild(this.countryList); } } if (this.options.hiddenInput) { var hiddenInputName = this.options.hiddenInput; var name = this.telInput.getAttribute("name"); if (name) { var i = name.lastIndexOf("["); // if input name contains square brackets, then give the hidden input the same name, // replacing the contents of the last set of brackets with the given hiddenInput name if (i !== -1) hiddenInputName = "".concat(name.substr(0, i), "[").concat(hiddenInputName, "]"); } this.hiddenInput = this._createEl("input", { type: "hidden", name: hiddenInputName }); wrapper.appendChild(this.hiddenInput); } } }, { key: "_appendListItems", value: function _appendListItems(countries, className, preferred) { // we create so many DOM elements, it is faster to build a temp string // and then add everything to the DOM in one go at the end var tmp = ""; // for each country for (var i = 0; i < countries.length; i++) { var c = countries[i]; var idSuffix = preferred ? "-preferred" : ""; // open the list item tmp += "
  • "); // add the flag tmp += "
    "); // and the country name and dial code tmp += "".concat(c.name, ""); tmp += "+".concat(c.dialCode, ""); // close the list item tmp += "
  • "; } this.countryList.insertAdjacentHTML("beforeend", tmp); } }, { key: "_setInitialState", value: function _setInitialState() { var val = this.telInput.value; var dialCode = this._getDialCode(val); var isRegionlessNanp = this._isRegionlessNanp(val); var _this$options = this.options, initialCountry = _this$options.initialCountry, nationalMode = _this$options.nationalMode, autoHideDialCode = _this$options.autoHideDialCode, separateDialCode = _this$options.separateDialCode; // if we already have a dial code, and it's not a regionlessNanp, we can go ahead and set the // flag, else fall back to the default country if (dialCode && !isRegionlessNanp) { this._updateFlagFromNumber(val); } else if (initialCountry !== "auto") { // see if we should select a flag if (initialCountry) { this._setFlag(initialCountry.toLowerCase()); } else { if (dialCode && isRegionlessNanp) { // has intl dial code, is regionless nanp, and no initialCountry, so default to US this._setFlag("in"); } else { // no dial code and no initialCountry, so default to first in list this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2; if (!val) { this._setFlag(this.defaultCountry); } } } // if empty and no nationalMode and no autoHideDialCode then insert the default dial code if (!val && !nationalMode && !autoHideDialCode && !separateDialCode) { this.telInput.value = "+".concat(this.selectedCountryData.dialCode); } } // NOTE: if initialCountry is set to auto, that will be handled separately // format - note this wont be run after _updateDialCode as that's only called if no val if (val) this._updateValFromNumber(val); } }, { key: "_initListeners", value: function _initListeners() { this._initKeyListeners(); if (this.options.autoHideDialCode) this._initBlurListeners(); if (this.options.allowDropdown) this._initDropdownListeners(); if (this.hiddenInput) this._initHiddenInputListener(); } }, { key: "_initHiddenInputListener", value: function _initHiddenInputListener() { var _this3 = this; this._handleHiddenInputSubmit = function() { _this3.hiddenInput.value = _this3.getNumber(); }; if (this.telInput.form) this.telInput.form.addEventListener("submit", this._handleHiddenInputSubmit); } }, { key: "_getClosestLabel", value: function _getClosestLabel() { var el = this.telInput; while (el && el.tagName !== "LABEL") { el = el.parentNode; } return el; } }, { key: "_initDropdownListeners", value: function _initDropdownListeners() { var _this4 = this; // hack for input nested inside label (which is valid markup): clicking the selected-flag to // open the dropdown would then automatically trigger a 2nd click on the input which would // close it again this._handleLabelClick = function(e) { // if the dropdown is closed, then focus the input, else ignore the click if (_this4.countryList.classList.contains("iti__hide")) _this4.telInput.focus(); else e.preventDefault(); }; var label = this._getClosestLabel(); if (label) label.addEventListener("click", this._handleLabelClick); // toggle country dropdown on click this._handleClickSelectedFlag = function() { // only intercept this event if we're opening the dropdown // else let it bubble up to the top ("click-off-to-close" listener) // we cannot just stopPropagation as it may be needed to close another instance if (_this4.countryList.classList.contains("iti__hide") && !_this4.telInput.disabled && !_this4.telInput.readOnly) { _this4._showDropdown(); } }; this.selectedFlag.addEventListener("click", this._handleClickSelectedFlag); // open dropdown list if currently focused this._handleFlagsContainerKeydown = function(e) { var isDropdownHidden = _this4.countryList.classList.contains("iti__hide"); if (isDropdownHidden && [ "ArrowUp", "Up", "ArrowDown", "Down", " ", "Enter" ].indexOf(e.key) !== -1) { // prevent form from being submitted if "ENTER" was pressed e.preventDefault(); // prevent event from being handled again by document e.stopPropagation(); _this4._showDropdown(); } // allow navigation from dropdown to input on TAB if (e.key === "Tab") _this4._closeDropdown(); }; this.flagsContainer.addEventListener("keydown", this._handleFlagsContainerKeydown); } }, { key: "_initRequests", value: function _initRequests() { var _this5 = this; // if the user has specified the path to the utils script, fetch it on window.load, else resolve if (this.options.utilsScript && !window.intlTelInputUtils) { // if the plugin is being initialised after the window.load event has already been fired if (window.intlTelInputGlobals.windowLoaded) { window.intlTelInputGlobals.loadUtils(this.options.utilsScript); } else { // wait until the load event so we don't block any other requests e.g. the flags image window.addEventListener("load", function() { window.intlTelInputGlobals.loadUtils(_this5.options.utilsScript); }); } } else this.resolveUtilsScriptPromise(); if (this.options.initialCountry === "auto") this._loadAutoCountry(); else this.resolveAutoCountryPromise(); } }, { key: "_loadAutoCountry", value: function _loadAutoCountry() { // 3 options: // 1) already loaded (we're done) // 2) not already started loading (start) // 3) already started loading (do nothing - just wait for loading callback to fire) if (window.intlTelInputGlobals.autoCountry) { this.handleAutoCountry(); } else if (!window.intlTelInputGlobals.startedLoadingAutoCountry) { // don't do this twice! window.intlTelInputGlobals.startedLoadingAutoCountry = true; if (typeof this.options.geoIpLookup === "function") { this.options.geoIpLookup(function(countryCode) { window.intlTelInputGlobals.autoCountry = countryCode.toLowerCase(); // tell all instances the auto country is ready // TODO: this should just be the current instances // UPDATE: use setTimeout in case their geoIpLookup function calls this callback straight // away (e.g. if they have already done the geo ip lookup somewhere else). Using // setTimeout means that the current thread of execution will finish before executing // this, which allows the plugin to finish initialising. setTimeout(function() { return forEachInstance("handleAutoCountry"); }); }, function() { return forEachInstance("rejectAutoCountryPromise"); }); } } } }, { key: "_initKeyListeners", value: function _initKeyListeners() { var _this6 = this; // update flag on keyup this._handleKeyupEvent = function() { if (_this6._updateFlagFromNumber(_this6.telInput.value)) { _this6._triggerCountryChange(); } }; this.telInput.addEventListener("keyup", this._handleKeyupEvent); // update flag on cut/paste events (now supported in all major browsers) this._handleClipboardEvent = function() { // hack because "paste" event is fired before input is updated setTimeout(_this6._handleKeyupEvent); }; this.telInput.addEventListener("cut", this._handleClipboardEvent); this.telInput.addEventListener("paste", this._handleClipboardEvent); } }, { key: "_cap", value: function _cap(number) { var max = this.telInput.getAttribute("maxlength"); return max && number.length > max ? number.substr(0, max) : number; } }, { key: "_initBlurListeners", value: function _initBlurListeners() { var _this7 = this; // on blur or form submit: if just a dial code then remove it this._handleSubmitOrBlurEvent = function() { _this7._removeEmptyDialCode(); }; if (this.telInput.form) this.telInput.form.addEventListener("submit", this._handleSubmitOrBlurEvent); this.telInput.addEventListener("blur", this._handleSubmitOrBlurEvent); } }, { key: "_removeEmptyDialCode", value: function _removeEmptyDialCode() { if (this.telInput.value.charAt(0) === "+") { var numeric = this._getNumeric(this.telInput.value); // if just a plus, or if just a dial code if (!numeric || this.selectedCountryData.dialCode === numeric) { this.telInput.value = ""; } } } }, { key: "_getNumeric", value: function _getNumeric(s) { return s.replace(/\D/g, ""); } }, { key: "_trigger", value: function _trigger(name) { // have to use old school document.createEvent as IE11 doesn't support `new Event()` syntax var e = document.createEvent("Event"); e.initEvent(name, true, true); // can bubble, and is cancellable this.telInput.dispatchEvent(e); } }, { key: "_showDropdown", value: function _showDropdown() { this.countryList.classList.remove("iti__hide"); this.selectedFlag.setAttribute("aria-expanded", "true"); this._setDropdownPosition(); // update highlighting and scroll to active list item if (this.activeItem) { this._highlightListItem(this.activeItem, false); this._scrollTo(this.activeItem, true); } // bind all the dropdown-related listeners: mouseover, click, click-off, keydown this._bindDropdownListeners(); // update the arrow this.dropdownArrow.classList.add("iti__arrow--up"); this._trigger("open:countrydropdown"); } }, { key: "_toggleClass", value: function _toggleClass(el, className, shouldHaveClass) { if (shouldHaveClass && !el.classList.contains(className)) el.classList.add(className); else if (!shouldHaveClass && el.classList.contains(className)) el.classList.remove(className); } }, { key: "_setDropdownPosition", value: function _setDropdownPosition() { var _this8 = this; if (this.options.dropdownContainer) { this.options.dropdownContainer.appendChild(this.dropdown); } if (!this.isMobile) { var pos = this.telInput.getBoundingClientRect(); // windowTop from http://stackoverflow.com/a/14384091/217866 var windowTop = window.pageYOffset || document.documentElement.scrollTop; var inputTop = pos.top + windowTop; var dropdownHeight = this.countryList.offsetHeight; // dropdownFitsBelow = (dropdownBottom < windowBottom) var dropdownFitsBelow = inputTop + this.telInput.offsetHeight + dropdownHeight < windowTop + window.innerHeight; var dropdownFitsAbove = inputTop - dropdownHeight > windowTop; // by default, the dropdown will be below the input. If we want to position it above the // input, we add the dropup class. this._toggleClass(this.countryList, "iti__country-list--dropup", !dropdownFitsBelow && dropdownFitsAbove); // if dropdownContainer is enabled, calculate postion if (this.options.dropdownContainer) { // by default the dropdown will be directly over the input because it's not in the flow. // If we want to position it below, we need to add some extra top value. var extraTop = !dropdownFitsBelow && dropdownFitsAbove ? 0 : this.telInput.offsetHeight; // calculate placement this.dropdown.style.top = "".concat(inputTop + extraTop, "px"); this.dropdown.style.left = "".concat(pos.left + document.body.scrollLeft, "px"); // close menu on window scroll this._handleWindowScroll = function() { return _this8._closeDropdown(); }; window.addEventListener("scroll", this._handleWindowScroll); } } } }, { key: "_getClosestListItem", value: function _getClosestListItem(target) { var el = target; while (el && el !== this.countryList && !el.classList.contains("iti__country")) { el = el.parentNode; } // if we reached the countryList element, then return null return el === this.countryList ? null : el; } }, { key: "_bindDropdownListeners", value: function _bindDropdownListeners() { var _this9 = this; // when mouse over a list item, just highlight that one // we add the class "highlight", so if they hit "enter" we know which one to select this._handleMouseoverCountryList = function(e) { // handle event delegation, as we're listening for this event on the countryList var listItem = _this9._getClosestListItem(e.target); if (listItem) _this9._highlightListItem(listItem, false); }; this.countryList.addEventListener("mouseover", this._handleMouseoverCountryList); // listen for country selection this._handleClickCountryList = function(e) { var listItem = _this9._getClosestListItem(e.target); if (listItem) _this9._selectListItem(listItem); }; this.countryList.addEventListener("click", this._handleClickCountryList); // click off to close // (except when this initial opening click is bubbling up) // we cannot just stopPropagation as it may be needed to close another instance var isOpening = true; this._handleClickOffToClose = function() { if (!isOpening) _this9._closeDropdown(); isOpening = false; }; document.documentElement.addEventListener("click", this._handleClickOffToClose); // listen for up/down scrolling, enter to select, or letters to jump to country name. // use keydown as keypress doesn't fire for non-char keys and we want to catch if they // just hit down and hold it to scroll down (no keyup event). // listen on the document because that's where key events are triggered if no input has focus var query = ""; var queryTimer = null; this._handleKeydownOnDropdown = function(e) { // prevent down key from scrolling the whole page, // and enter key from submitting a form etc e.preventDefault(); // up and down to navigate if (e.key === "ArrowUp" || e.key === "Up" || e.key === "ArrowDown" || e.key === "Down") _this9._handleUpDownKey(e.key); else if (e.key === "Enter") _this9._handleEnterKey(); else if (e.key === "Escape") _this9._closeDropdown(); else if (/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)) { // jump to countries that start with the query string if (queryTimer) clearTimeout(queryTimer); query += e.key.toLowerCase(); _this9._searchForCountry(query); // if the timer hits 1 second, reset the query queryTimer = setTimeout(function() { query = ""; }, 1e3); } }; document.addEventListener("keydown", this._handleKeydownOnDropdown); } }, { key: "_handleUpDownKey", value: function _handleUpDownKey(key) { var next = key === "ArrowUp" || key === "Up" ? this.highlightedItem.previousElementSibling : this.highlightedItem.nextElementSibling; if (next) { // skip the divider if (next.classList.contains("iti__divider")) { next = key === "ArrowUp" || key === "Up" ? next.previousElementSibling : next.nextElementSibling; } this._highlightListItem(next, true); } } }, { key: "_handleEnterKey", value: function _handleEnterKey() { if (this.highlightedItem) this._selectListItem(this.highlightedItem); } }, { key: "_searchForCountry", value: function _searchForCountry(query) { for (var i = 0; i < this.countries.length; i++) { if (this._startsWith(this.countries[i].name, query)) { var listItem = this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(this.countries[i].iso2)); // update highlighting and scroll this._highlightListItem(listItem, false); this._scrollTo(listItem, true); break; } } } }, { key: "_startsWith", value: function _startsWith(a, b) { return a.substr(0, b.length).toLowerCase() === b; } }, { key: "_updateValFromNumber", value: function _updateValFromNumber(originalNumber) { var number = originalNumber; if (this.options.formatOnDisplay && window.intlTelInputUtils && this.selectedCountryData) { var useNational = !this.options.separateDialCode && (this.options.nationalMode || number.charAt(0) !== "+"); var _intlTelInputUtils$nu = intlTelInputUtils.numberFormat, NATIONAL = _intlTelInputUtils$nu.NATIONAL, INTERNATIONAL = _intlTelInputUtils$nu.INTERNATIONAL; var format = useNational ? NATIONAL : INTERNATIONAL; number = intlTelInputUtils.formatNumber(number, this.selectedCountryData.iso2, format); } number = this._beforeSetNumber(number); this.telInput.value = number; } }, { key: "_updateFlagFromNumber", value: function _updateFlagFromNumber(originalNumber) { // if we're in nationalMode and we already have US/Canada selected, make sure the number starts // with a +1 so _getDialCode will be able to extract the area code // update: if we dont yet have selectedCountryData, but we're here (trying to update the flag // from the number), that means we're initialising the plugin with a number that already has a // dial code, so fine to ignore this bit var number = originalNumber; var selectedDialCode = this.selectedCountryData.dialCode; var isNanp = selectedDialCode === "1"; if (number && this.options.nationalMode && isNanp && number.charAt(0) !== "+") { if (number.charAt(0) !== "1") number = "1".concat(number); number = "+".concat(number); } // update flag if user types area code for another country if (this.options.separateDialCode && selectedDialCode && number.charAt(0) !== "+") { number = "+".concat(selectedDialCode).concat(number); } // try and extract valid dial code from input var dialCode = this._getDialCode(number, true); var numeric = this._getNumeric(number); var countryCode = null; if (dialCode) { var countryCodes = this.countryCodes[this._getNumeric(dialCode)]; // check if the right country is already selected. this should be false if the number is // longer than the matched dial code because in this case we need to make sure that if // there are multiple country matches, that the first one is selected (note: we could // just check that here, but it requires the same loop that we already have later) var alreadySelected = countryCodes.indexOf(this.selectedCountryData.iso2) !== -1 && numeric.length <= dialCode.length - 1; var isRegionlessNanpNumber = selectedDialCode === "1" && this._isRegionlessNanp(numeric); // only update the flag if: // A) NOT (we currently have a NANP flag selected, and the number is a regionlessNanp) // AND // B) the right country is not already selected if (!isRegionlessNanpNumber && !alreadySelected) { // if using onlyCountries option, countryCodes[0] may be empty, so we must find the first // non-empty index for (var j = 0; j < countryCodes.length; j++) { if (countryCodes[j]) { countryCode = countryCodes[j]; break; } } } } else if (number.charAt(0) === "+" && numeric.length) { // invalid dial code, so empty // Note: use getNumeric here because the number has not been formatted yet, so could contain // bad chars countryCode = ""; } else if (!number || number === "+") { // empty, or just a plus, so default countryCode = this.defaultCountry; } if (countryCode !== null) { return this._setFlag(countryCode); } return false; } }, { key: "_isRegionlessNanp", value: function _isRegionlessNanp(number) { var numeric = this._getNumeric(number); if (numeric.charAt(0) === "1") { var areaCode = numeric.substr(1, 3); return regionlessNanpNumbers.indexOf(areaCode) !== -1; } return false; } }, { key: "_highlightListItem", value: function _highlightListItem(listItem, shouldFocus) { var prevItem = this.highlightedItem; if (prevItem) prevItem.classList.remove("iti__highlight"); this.highlightedItem = listItem; this.highlightedItem.classList.add("iti__highlight"); if (shouldFocus) this.highlightedItem.focus(); } }, { key: "_getCountryData", value: function _getCountryData(countryCode, ignoreOnlyCountriesOption, allowFail) { var countryList = ignoreOnlyCountriesOption ? allCountries : this.countries; for (var i = 0; i < countryList.length; i++) { if (countryList[i].iso2 === countryCode) { return countryList[i]; } } if (allowFail) { return null; } throw new Error("No country data for '".concat(countryCode, "'")); } }, { key: "_setFlag", value: function _setFlag(countryCode) { var prevCountry = this.selectedCountryData.iso2 ? this.selectedCountryData : {}; // do this first as it will throw an error and stop if countryCode is invalid this.selectedCountryData = countryCode ? this._getCountryData(countryCode, false, false) : {}; // update the defaultCountry - we only need the iso2 from now on, so just store that if (this.selectedCountryData.iso2) { this.defaultCountry = this.selectedCountryData.iso2; } this.selectedFlagInner.setAttribute("class", "iti__flag iti__".concat(countryCode)); // update the selected country's title attribute var title = countryCode ? "".concat(this.selectedCountryData.name, ": +").concat(this.selectedCountryData.dialCode) : "Unknown"; this.selectedFlag.setAttribute("title", title); if (this.options.separateDialCode) { var dialCode = this.selectedCountryData.dialCode ? "+".concat(this.selectedCountryData.dialCode) : ""; this.selectedDialCode.innerHTML = dialCode; // offsetWidth is zero if input is in a hidden container during initialisation var selectedFlagWidth = this.selectedFlag.offsetWidth || this._getHiddenSelectedFlagWidth(); // add 6px of padding after the grey selected-dial-code box, as this is what we use in the css this.telInput.style.paddingLeft = "".concat(selectedFlagWidth + 6, "px"); } // and the input's placeholder this._updatePlaceholder(); // update the active list item if (this.options.allowDropdown) { var prevItem = this.activeItem; if (prevItem) { prevItem.classList.remove("iti__active"); prevItem.setAttribute("aria-selected", "false"); } if (countryCode) { // check if there is a preferred item first, else fall back to standard var nextItem = this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(countryCode, "-preferred")) || this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(countryCode)); nextItem.setAttribute("aria-selected", "true"); nextItem.classList.add("iti__active"); this.activeItem = nextItem; this.selectedFlag.setAttribute("aria-activedescendant", nextItem.getAttribute("id")); } } // return if the flag has changed or not return prevCountry.iso2 !== countryCode; } }, { key: "_getHiddenSelectedFlagWidth", value: function _getHiddenSelectedFlagWidth() { // to get the right styling to apply, all we need is a shallow clone of the container, // and then to inject a deep clone of the selectedFlag element var containerClone = this.telInput.parentNode.cloneNode(); containerClone.style.visibility = "hidden"; document.body.appendChild(containerClone); var flagsContainerClone = this.flagsContainer.cloneNode(); containerClone.appendChild(flagsContainerClone); var selectedFlagClone = this.selectedFlag.cloneNode(true); flagsContainerClone.appendChild(selectedFlagClone); var width = selectedFlagClone.offsetWidth; containerClone.parentNode.removeChild(containerClone); return width; } }, { key: "_updatePlaceholder", value: function _updatePlaceholder() { var shouldSetPlaceholder = this.options.autoPlaceholder === "aggressive" || !this.hadInitialPlaceholder && this.options.autoPlaceholder === "polite"; if (window.intlTelInputUtils && shouldSetPlaceholder) { var numberType = intlTelInputUtils.numberType[this.options.placeholderNumberType]; var placeholder = this.selectedCountryData.iso2 ? intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2, this.options.nationalMode, numberType) : ""; placeholder = this._beforeSetNumber(placeholder); if (typeof this.options.customPlaceholder === "function") { placeholder = this.options.customPlaceholder(placeholder, this.selectedCountryData); } this.telInput.setAttribute("placeholder", placeholder); } } }, { key: "_selectListItem", value: function _selectListItem(listItem) { // update selected flag and active list item var flagChanged = this._setFlag(listItem.getAttribute("data-country-code")); this._closeDropdown(); this._updateDialCode(listItem.getAttribute("data-dial-code"), true); // focus the input this.telInput.focus(); // put cursor at end - this fix is required for FF and IE11 (with nationalMode=false i.e. auto // inserting dial code), who try to put the cursor at the beginning the first time var len = this.telInput.value.length; this.telInput.setSelectionRange(len, len); if (flagChanged) { this._triggerCountryChange(); } } }, { key: "_closeDropdown", value: function _closeDropdown() { this.countryList.classList.add("iti__hide"); this.selectedFlag.setAttribute("aria-expanded", "false"); // update the arrow this.dropdownArrow.classList.remove("iti__arrow--up"); // unbind key events document.removeEventListener("keydown", this._handleKeydownOnDropdown); document.documentElement.removeEventListener("click", this._handleClickOffToClose); this.countryList.removeEventListener("mouseover", this._handleMouseoverCountryList); this.countryList.removeEventListener("click", this._handleClickCountryList); // remove menu from container if (this.options.dropdownContainer) { if (!this.isMobile) window.removeEventListener("scroll", this._handleWindowScroll); if (this.dropdown.parentNode) this.dropdown.parentNode.removeChild(this.dropdown); } this._trigger("close:countrydropdown"); } }, { key: "_scrollTo", value: function _scrollTo(element, middle) { var container = this.countryList; // windowTop from http://stackoverflow.com/a/14384091/217866 var windowTop = window.pageYOffset || document.documentElement.scrollTop; var containerHeight = container.offsetHeight; var containerTop = container.getBoundingClientRect().top + windowTop; var containerBottom = containerTop + containerHeight; var elementHeight = element.offsetHeight; var elementTop = element.getBoundingClientRect().top + windowTop; var elementBottom = elementTop + elementHeight; var newScrollTop = elementTop - containerTop + container.scrollTop; var middleOffset = containerHeight / 2 - elementHeight / 2; if (elementTop < containerTop) { // scroll up if (middle) newScrollTop -= middleOffset; container.scrollTop = newScrollTop; } else if (elementBottom > containerBottom) { // scroll down if (middle) newScrollTop += middleOffset; var heightDifference = containerHeight - elementHeight; container.scrollTop = newScrollTop - heightDifference; } } }, { key: "_updateDialCode", value: function _updateDialCode(newDialCodeBare, hasSelectedListItem) { var inputVal = this.telInput.value; // save having to pass this every time var newDialCode = "+".concat(newDialCodeBare); var newNumber; if (inputVal.charAt(0) === "+") { // there's a plus so we're dealing with a replacement (doesn't matter if nationalMode or not) var prevDialCode = this._getDialCode(inputVal); if (prevDialCode) { // current number contains a valid dial code, so replace it newNumber = inputVal.replace(prevDialCode, newDialCode); } else { // current number contains an invalid dial code, so ditch it // (no way to determine where the invalid dial code ends and the rest of the number begins) newNumber = newDialCode; } } else if (this.options.nationalMode || this.options.separateDialCode) { // don't do anything return; } else { // nationalMode is disabled if (inputVal) { // there is an existing value with no dial code: prefix the new dial code newNumber = newDialCode + inputVal; } else if (hasSelectedListItem || !this.options.autoHideDialCode) { // no existing value and either they've just selected a list item, or autoHideDialCode is // disabled: insert new dial code newNumber = newDialCode; } else { return; } } this.telInput.value = newNumber; } }, { key: "_getDialCode", value: function _getDialCode(number, includeAreaCode) { var dialCode = ""; // only interested in international numbers (starting with a plus) if (number.charAt(0) === "+") { var numericChars = ""; // iterate over chars for (var i = 0; i < number.length; i++) { var c = number.charAt(i); // if char is number (http://stackoverflow.com/a/8935649/217866) if (!isNaN(parseInt(c, 10))) { numericChars += c; // if current numericChars make a valid dial code if (includeAreaCode) { if (this.countryCodes[numericChars]) { // store the actual raw string (useful for matching later) dialCode = number.substr(0, i + 1); } } else { if (this.dialCodes[numericChars]) { dialCode = number.substr(0, i + 1); // if we're just looking for a dial code, we can break as soon as we find one break; } } // stop searching as soon as we can - in this case when we hit max len if (numericChars.length === this.countryCodeMaxLen) { break; } } } } return dialCode; } }, { key: "_getFullNumber", value: function _getFullNumber() { var val = this.telInput.value.trim(); var dialCode = this.selectedCountryData.dialCode; var prefix; var numericVal = this._getNumeric(val); if (this.options.separateDialCode && val.charAt(0) !== "+" && dialCode && numericVal) { // when using separateDialCode, it is visible so is effectively part of the typed number prefix = "+".concat(dialCode); } else { prefix = ""; } return prefix + val; } }, { key: "_beforeSetNumber", value: function _beforeSetNumber(originalNumber) { var number = originalNumber; if (this.options.separateDialCode) { var dialCode = this._getDialCode(number); // if there is a valid dial code if (dialCode) { // in case _getDialCode returned an area code as well dialCode = "+".concat(this.selectedCountryData.dialCode); // a lot of numbers will have a space separating the dial code and the main number, and // some NANP numbers will have a hyphen e.g. +1 684-733-1234 - in both cases we want to get // rid of it // NOTE: don't just trim all non-numerics as may want to preserve an open parenthesis etc var start = number[dialCode.length] === " " || number[dialCode.length] === "-" ? dialCode.length + 1 : dialCode.length; number = number.substr(start); } } return this._cap(number); } }, { key: "_triggerCountryChange", value: function _triggerCountryChange() { this._trigger("countrychange"); } }, { key: "handleAutoCountry", value: function handleAutoCountry() { if (this.options.initialCountry === "auto") { // we must set this even if there is an initial val in the input: in case the initial val is // invalid and they delete it - they should see their auto country this.defaultCountry = window.intlTelInputGlobals.autoCountry; // if there's no initial value in the input, then update the flag if (!this.telInput.value) { this.setCountry(this.defaultCountry); } this.resolveAutoCountryPromise(); } } }, { key: "handleUtils", value: function handleUtils() { // if the request was successful if (window.intlTelInputUtils) { // if there's an initial value in the input, then format it if (this.telInput.value) { this._updateValFromNumber(this.telInput.value); } this._updatePlaceholder(); } this.resolveUtilsScriptPromise(); } }, { key: "destroy", value: function destroy() { var form = this.telInput.form; if (this.options.allowDropdown) { // make sure the dropdown is closed (and unbind listeners) this._closeDropdown(); this.selectedFlag.removeEventListener("click", this._handleClickSelectedFlag); this.flagsContainer.removeEventListener("keydown", this._handleFlagsContainerKeydown); // label click hack var label = this._getClosestLabel(); if (label) label.removeEventListener("click", this._handleLabelClick); } // unbind hiddenInput listeners if (this.hiddenInput && form) form.removeEventListener("submit", this._handleHiddenInputSubmit); // unbind autoHideDialCode listeners if (this.options.autoHideDialCode) { if (form) form.removeEventListener("submit", this._handleSubmitOrBlurEvent); this.telInput.removeEventListener("blur", this._handleSubmitOrBlurEvent); } // unbind key events, and cut/paste events this.telInput.removeEventListener("keyup", this._handleKeyupEvent); this.telInput.removeEventListener("cut", this._handleClipboardEvent); this.telInput.removeEventListener("paste", this._handleClipboardEvent); // remove attribute of id instance: data-intl-tel-input-id this.telInput.removeAttribute("data-intl-tel-input-id"); // remove markup (but leave the original input) var wrapper = this.telInput.parentNode; wrapper.parentNode.insertBefore(this.telInput, wrapper); wrapper.parentNode.removeChild(wrapper); delete window.intlTelInputGlobals.instances[this.id]; } }, { key: "getExtension", value: function getExtension() { if (window.intlTelInputUtils) { return intlTelInputUtils.getExtension(this._getFullNumber(), this.selectedCountryData.iso2); } return ""; } }, { key: "getNumber", value: function getNumber(format) { if (window.intlTelInputUtils) { var iso2 = this.selectedCountryData.iso2; return intlTelInputUtils.formatNumber(this._getFullNumber(), iso2, format); } return ""; } }, { key: "getNumberType", value: function getNumberType() { if (window.intlTelInputUtils) { return intlTelInputUtils.getNumberType(this._getFullNumber(), this.selectedCountryData.iso2); } return -99; } }, { key: "getSelectedCountryData", value: function getSelectedCountryData() { return this.selectedCountryData; } }, { key: "getValidationError", value: function getValidationError() { if (window.intlTelInputUtils) { var iso2 = this.selectedCountryData.iso2; return intlTelInputUtils.getValidationError(this._getFullNumber(), iso2); } return -99; } }, { key: "isValidNumber", value: function isValidNumber() { var val = this._getFullNumber().trim(); var countryCode = this.options.nationalMode ? this.selectedCountryData.iso2 : ""; return window.intlTelInputUtils ? intlTelInputUtils.isValidNumber(val, countryCode) : null; } }, { key: "setCountry", value: function setCountry(originalCountryCode) { var countryCode = originalCountryCode.toLowerCase(); // check if already selected if (!this.selectedFlagInner.classList.contains("iti__".concat(countryCode))) { this._setFlag(countryCode); this._updateDialCode(this.selectedCountryData.dialCode, false); this._triggerCountryChange(); } } }, { key: "setNumber", value: function setNumber(number) { // we must update the flag first, which updates this.selectedCountryData, which is used for // formatting the number before displaying it var flagChanged = this._updateFlagFromNumber(number); this._updateValFromNumber(number); if (flagChanged) { this._triggerCountryChange(); } } }, { key: "setPlaceholderNumberType", value: function setPlaceholderNumberType(type) { this.options.placeholderNumberType = type; this._updatePlaceholder(); } } ]); return Iti; }(); /******************** * STATIC METHODS ********************/ // get the country data object intlTelInputGlobals.getCountryData = function() { return allCountries; }; // inject a