// DANE DO WALIDACJI NUMERU TELEFONU
const countryPhoneData = [
{
alpha2: "AT",
alpha3: "AUT",
country_code: "43",
country_name: "Austria",
mobile_begin_with: ["6"],
phone_number_lengths: [10, 11, 12, 13, 14],
},
{
alpha2: "BE",
alpha3: "BEL",
country_code: "32",
country_name: "Belgium",
mobile_begin_with: ["4", "3"],
phone_number_lengths: [9, 8],
},
{
alpha2: "BG",
alpha3: "BGR",
country_code: "359",
country_name: "Bulgaria",
mobile_begin_with: ["87", "88", "89", "98", "99", "43"],
phone_number_lengths: [8, 9],
},
{
alpha2: "BY",
alpha3: "BLR",
country_code: "375",
country_name: "Belarus",
mobile_begin_with: ["25", "29", "33", "44"],
phone_number_lengths: [9],
},
{
alpha2: "CH",
alpha3: "CHE",
country_code: "41",
country_name: "Switzerland",
mobile_begin_with: ["74", "75", "76", "77", "78", "79"],
phone_number_lengths: [9],
},
{
alpha2: "CY",
alpha3: "CYP",
country_code: "357",
country_name: "Cyprus",
mobile_begin_with: ["9"],
phone_number_lengths: [8],
},
{
alpha2: "CZ",
alpha3: "CZE",
country_code: "420",
country_name: "Czech Republic",
mobile_begin_with: ["6", "7"],
phone_number_lengths: [9],
},
{
alpha2: "DE",
alpha3: "DEU",
country_code: "49",
country_name: "Germany",
mobile_begin_with: ["15", "16", "17"],
phone_number_lengths: [10, 11],
},
{
alpha2: "DK",
alpha3: "DNK",
country_code: "45",
country_name: "Denmark",
mobile_begin_with: [
"2",
"30",
"31",
"40",
"41",
"42",
"50",
"51",
"52",
"53",
"60",
"61",
"71",
"81",
"91",
"92",
"93",
"342",
"344",
"345",
"346",
"347",
"348",
"349",
"356",
"357",
"359",
"362",
"365",
"366",
"389",
"398",
"431",
"441",
"462",
"466",
"468",
"472",
"474",
"476",
"478",
"485",
"486",
"488",
"489",
"493",
"494",
"495",
"496",
"498",
"499",
"542",
"543",
"545",
"551",
"552",
"556",
"571",
"572",
"573",
"574",
"577",
"579",
"584",
"586",
"587",
"589",
"597",
"598",
"627",
"629",
"641",
"649",
"658",
"662",
"663",
"664",
"665",
"667",
"692",
"693",
"694",
"697",
"771",
"772",
"782",
"783",
"785",
"786",
"788",
"789",
"826",
"827",
"829",
],
phone_number_lengths: [8],
},
{
alpha2: "ES",
alpha3: "ESP",
country_code: "34",
country_name: "Spain",
mobile_begin_with: ["6", "7"],
phone_number_lengths: [9],
},
{
alpha2: "EE",
alpha3: "EST",
country_code: "372",
country_name: "Estonia",
mobile_begin_with: ["5", "81", "82", "83"],
phone_number_lengths: [7, 8],
},
{
alpha2: "FI",
alpha3: "FIN",
country_code: "358",
country_name: "Finland",
mobile_begin_with: ["4", "5"],
phone_number_lengths: [9, 10],
},
{
alpha2: "FR",
alpha3: "FRA",
country_code: "33",
country_name: "France",
mobile_begin_with: ["6", "7"],
phone_number_lengths: [9],
},
{
alpha2: "GB",
alpha3: "GBR",
country_code: "44",
country_name: "United Kingdom",
mobile_begin_with: ["7"],
phone_number_lengths: [10],
},
{
alpha2: "GE",
alpha3: "GEO",
country_code: "995",
country_name: "Georgia",
mobile_begin_with: ["5", "7"],
phone_number_lengths: [9],
},
{
alpha2: "GI",
alpha3: "GIB",
country_code: "350",
country_name: "Gibraltar",
mobile_begin_with: ["5"],
phone_number_lengths: [8],
},
{
alpha2: "GR",
alpha3: "GRC",
country_code: "30",
country_name: "Greece",
mobile_begin_with: ["6"],
phone_number_lengths: [10],
},
{
alpha2: "HR",
alpha3: "HRV",
country_code: "385",
country_name: "Croatia",
mobile_begin_with: ["9"],
phone_number_lengths: [8, 9],
},
{
alpha2: "IE",
alpha3: "IRL",
country_code: "353",
country_name: "Ireland",
mobile_begin_with: ["82", "83", "84", "85", "86", "87", "88", "89"],
phone_number_lengths: [9],
},
{
alpha2: "IS",
alpha3: "ISL",
country_code: "354",
country_name: "Iceland",
mobile_begin_with: ["6", "7", "8"],
phone_number_lengths: [7],
},
{
alpha2: "IT",
alpha3: "ITA",
country_code: "39",
country_name: "Italy",
mobile_begin_with: ["3"],
phone_number_lengths: [9, 10],
},
{
alpha2: "LI",
alpha3: "LIE",
country_code: "423",
country_name: "Liechtenstein",
mobile_begin_with: ["7"],
phone_number_lengths: [7],
},
{
alpha2: "LT",
alpha3: "LTU",
country_code: "370",
country_name: "Lithuania",
mobile_begin_with: ["6"],
phone_number_lengths: [8],
},
{
alpha2: "LU",
alpha3: "LUX",
country_code: "352",
country_name: "Luxembourg",
mobile_begin_with: ["6"],
phone_number_lengths: [9],
},
{
alpha2: "LV",
alpha3: "LVA",
country_code: "371",
country_name: "Latvia",
mobile_begin_with: ["2"],
phone_number_lengths: [8],
},
{
alpha2: "MC",
alpha3: "MCO",
country_code: "377",
country_name: "Monaco",
mobile_begin_with: ["4", "6"],
phone_number_lengths: [8, 9],
},
{
alpha2: "MD",
alpha3: "MDA",
country_code: "373",
country_name: "Moldova, Republic of",
mobile_begin_with: ["6", "7"],
phone_number_lengths: [8],
},
{
alpha2: "MK",
alpha3: "MKD",
country_code: "389",
country_name: "Macedonia, the Former Yugoslav Republic Of",
mobile_begin_with: ["7"],
phone_number_lengths: [8],
},
{
alpha2: "ME",
alpha3: "MNE",
country_code: "382",
country_name: "Montenegro",
mobile_begin_with: ["6"],
phone_number_lengths: [8],
},
{
alpha2: "NL",
alpha3: "NLD",
country_code: "31",
country_name: "Netherlands",
mobile_begin_with: ["6"],
phone_number_lengths: [9],
},
{
alpha2: "NO",
alpha3: "NOR",
country_code: "47",
country_name: "Norway",
mobile_begin_with: ["4", "9"],
phone_number_lengths: [8],
},
{
alpha2: "PL",
alpha3: "POL",
country_code: "48",
country_name: "Poland",
mobile_begin_with: ["4", "5", "6", "7", "8"],
phone_number_lengths: [9],
},
{
alpha2: "PT",
alpha3: "PRT",
country_code: "351",
country_name: "Portugal",
mobile_begin_with: ["9"],
phone_number_lengths: [9],
},
{
alpha2: "RO",
alpha3: "ROU",
country_code: "40",
country_name: "Romania",
mobile_begin_with: ["7"],
phone_number_lengths: [9],
},
{
alpha2: "RU",
alpha3: "RUS",
country_code: "7",
country_name: "Russian Federation",
mobile_begin_with: ["9", "495", "498", "499", "835"],
phone_number_lengths: [10],
},
{
alpha2: "RS",
alpha3: "SRB",
country_code: "381",
country_name: "Serbia",
mobile_begin_with: ["6"],
phone_number_lengths: [8, 9],
},
{
alpha2: "SK",
alpha3: "SVK",
country_code: "421",
country_name: "Slovakia",
mobile_begin_with: ["9"],
phone_number_lengths: [9],
},
{
alpha2: "SI",
alpha3: "SVN",
country_code: "386",
country_name: "Slovenia",
mobile_begin_with: ["3", "4", "5", "6", "7"],
phone_number_lengths: [8],
},
{
alpha2: "SE",
alpha3: "SWE",
country_code: "46",
country_name: "Sweden",
mobile_begin_with: ["7"],
phone_number_lengths: [9],
},
{
alpha2: "TR",
alpha3: "TUR",
country_code: "90",
country_name: "Turkey",
mobile_begin_with: ["5"],
phone_number_lengths: [10],
},
{
alpha2: "UA",
alpha3: "UKR",
country_code: "380",
country_name: "Ukraine",
mobile_begin_with: ["39", "50", "63", "66", "67", "68", "73", "9"],
phone_number_lengths: [9],
},
];
// LEAFLET MAP
var stocks_list_more_txt=;var stocks_list_choose=;var pickupl_nopoints=;var mapTooltipLink_class="btn-small";var autocompleteData=[];var ajaxGetPickupNoMap=function(){$(".mapContainer_pickup, .pickupl_submit").show();var options={courierId:pickup_sites.courierId,isCod:pickup_sites.isCod};$.ajax({type:"GET",url:"/ajax/getPickups.php",data:options,dataType:"json",success:function(json){if(!json.pickupPoints.length){Alertek.show_alert(pickupl_nopoints);$(".loadingMap").hide();return false}setPickupPointsNoMap(json)},error:function(){orderdetails_payments.ajaxLoadSite(0);$(".no_google_api_key div.asideContainer_pickup").show();Alertek.show_alert(pickupl_error)}})};var setPickupPointsNoMap=function(json){var pickup_clone_tmp=$("#pickup_copy").clone();var pickups="";for(i in json.pickupPoints){var pickup=json.pickupPoints[i];var pickup_street=pickup.address.buildingAndHouseNumber!=""?pickup.address.street+" "+pickup.address.buildingAndHouseNumber:pickup.address.street;pickup_clone=pickup_clone_tmp.clone();pickup_clone.find("input[name=pickup_point], input[name=stock]").attr("id","pickup_point_"+pickup.id).val(pickup.id);pickup_clone.find("label").attr({id:"pp_"+pickup.id,"data-latitude":pickup.coordinates.latitude,"data-longitude":pickup.coordinates.longitude,"data-id":pickup.id,"data-requires_client_number":pickup.requiresClientNumber,for:"pickup_point_"+pickup.id});if(pickup.coordinates.longitude){pickup_clone.find("label .map_dir").attr("href","https://www.google.com/maps/dir/?api=1&destination="+pickup.coordinates.latitude+","+pickup.coordinates.longitude)}else{pickup_clone.find("label .map_dir").attr("href","https://maps.google.com?saddr=Current+Location&daddr="+pickup.address.street+"+"+pickup.address.postcode+"+"+pickup.address.city)}pickup_clone.find("b.headerText").text(pickup.name);pickup_clone.find("span.streetText").text(pickup_street);pickup_clone.find("span.zipcodePickup").html(pickup.address.postcode+' '+pickup.address.city+"");pickup_clone.find("div.moreText").text(pickup.location);pickup_clone.find("a.moreLink").attr("href",pickup.link);if(!pickup.requiresClientNumber){pickup_clone.find("input[name=client_courier_number]").remove()}pickups+=pickup_clone.html();autocompleteData.push({label:pickup.address.city+", "+pickup.address.street+" "+pickup.address.buildingAndHouseNumber+" "+pickup.address.postcode+" "+pickup.id,value:pickup.address.city+", "+pickup.address.street+" "+pickup.address.buildingAndHouseNumber+", "+pickup.id,description:pickup.location,id:pickup.id})}$("#pickup_site .asideContainer_pickup").html(pickups);var accentMap={"ł":"l","ó":"o","ź":"z","ś":"s",",":""," ":" "};var normalize=function(term){var ret="";var term=term.toLowerCase();for(var i=0;i