<?php
class Glue_add_on
{

  public static $icon_svg = '<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><path d="m90.42,85.64c-2.35-1.79-6.15-2.68-11.38-2.68-3.13,0-5.67-2.54-5.67-5.67v-5.66c0-2.97,2.29-5.43,5.25-5.65.83-.06,1.6-.13,2.15-.22,2.52-.38,4.83-.98,6.25-1.81,2.6-1.54,3.9-3.99,3.9-7.39v-.25c0-3.05-1.12-5.38-3.39-7-2.26-1.6-7.62-2.41-11.88-2.41h-.52c-10.68,0-19.34,8.66-19.34,19.34h0v16.72c0,11.12,9.01,20.13,20.13,20.13h3.78c4.44,0,7.91-.81,10.45-2.43,2.53-1.6,3.8-4.11,3.8-7.5v-.27c0-3.05-1.18-5.46-3.53-7.25Z" fill="#a7aaad" stroke-width="0"/><path d="m75,1.47C34.39,1.47,1.47,34.39,1.47,75s32.92,73.53,73.53,73.53,73.53-32.92,73.53-73.53S115.61,1.47,75,1.47Zm38.81,94.17c0,4.17-.81,7.85-2.41,10.97-1.62,3.14-3.93,5.75-6.92,7.85-3.01,2.1-6.63,3.66-10.84,4.69-4.22,1.06-8.89,1.58-14.02,1.58h-1.04c-23.41,0-42.39-18.98-42.39-42.39v-6.67c0-23.41,18.98-42.39,42.39-42.39h0c9.39,0,18.84,2.12,24.18,6.4,5.36,4.26,8.02,10.01,8.02,17.24v.27c0,2.6-.31,4.92-.98,6.92-.64,2.01-1.5,3.82-2.6,5.42-1.08,1.62-2.33,3.03-3.76,4.26-.12.1-.25.2-.4.3-2.17,1.45-2.15,4.55.07,5.91,2.4,1.47,4.44,3.17,6.14,5.09,3.03,3.43,4.55,8.2,4.55,14.29v.27Z" fill="#a7aaad" stroke-width="0"/></svg>';





  public static $view_image;
  public static $default_img;
  private static $text;
  public static $service_duration_select = array('minute' => 'Minute', 'hour' => 'Hour', 'day' => 'Day', 'week' => 'Week');
  public static $service_extra_select = array('extra-minute' => 'Extra Minute', 'extra-hour' => 'Extra Hour', 'extra-day' => 'Extra Day', 'extra-week' => 'Extra Week');
  public static $service_recurring_select = array('day' => "Daily", 'week' => "Weekly", 'month' => "Monthly");
  public static $booking_satutus_type_customer = array('reschedule', 'completed', 'cancelled', 'rejected');
  public static $booking_status_type = array('cancelled', 'rejected', 'approved', 'reschedule', 'pending', 'completed', 'confirmed');
  public static $payment_status_type = array('cancelled', 'rejected', 'success', 'pending', 'completed');
  public static $service_deposit = array('fixed-price', 'percentage');
  public static $email_type = array(
    'wp_mail' => 'WordPress Mail',
  );





  public static  function priceDecimal($number)
  {
    return number_format($number ?? 0, get_option('bookingor_currency_decimal_point'));
  }
  public static function weekly_time($data)
  {
    $weekly_time = date("H:i", strtotime($data));
    return  sprintf($weekly_time);
  }
  public static function convert_duration($minutes, $format = '%d %s')
  {
    $hours = floor($minutes / 60);
    $remainingMinutes = ($minutes % 60);
    if ($hours >= 24) {
      $days = floor($hours / 24);
      $remainingHours = $hours % 24;
      if ($days >= 7) {
        $weeks = floor($days / 7);
        $remainingDays = $days % 7;
        $timeString = sprintf($format, $weeks, 'Week ');
      } else {
        $timeString = sprintf($format, $days, 'Day ');
      }
    } elseif ($hours > 0 && $remainingMinutes > 0) {
      $timeString = sprintf($format, $hours, 'hr ' . $remainingMinutes . ' min');
    } elseif ($hours > 0) {
      $timeString = sprintf($format, $hours, 'hr');
    } else {
      $timeString = sprintf($format, $remainingMinutes, 'min');
    }
    return $timeString;
  }
  public static function convert_hour($time, $format = '%02d:%02d ')
  {
    $hours = floor($time / 60);
    $minutes = ($time % 60);
    return sprintf($format, $hours, $minutes);
  }
  public static function convert_duration_week_month($time)
  {
    $minutes = ($time % 60);
    $weeks = floor($time / 10080);
    $hours = floor($time / 60);
    $day = ($time / 1440);
    if ($time < 1) {
      return "00:00";
    }
    if ($time < 60) {
      return $minutes . ' Minutes';
    }
    if ($time > 60 && $time < 1440) {
      return $hours . ' Hour ' . $minutes . ' Minutes';
    }
    if ($time > 10080) {
      return $weeks . ' Weeks';
    }
    if ($time < 1380) {
      return $hours . ' Hour';
    }
    if ($time >= 1440) {
      return $day . ' Days';
    } else {
      return $minutes . ":" . $hours;
    }
    return ($time);
  }
  public static function convert_duration_to_twenty_four_hours($time)
  {
    $minutes = ($time % 60);
    $hours = floor($time / 60);
    if ($time < 1) {
      return "00:00";
    }
    if ($time < 60) {
      return $minutes . 'min';
    }
    if ($time > 60 && $time < 1440) {
      return $hours . ' hr ' . $minutes . 'min';
    }
    if ($time < 1380) {
      return $hours . ' Hour';
    }
    return ($time);
    if ($time >= 1440) {
      return $hours . ' Days';
    }
    return ($time);
  }
  public static function  convert12To24($time12)
  {
    return date("H:i", strtotime($time12));
  }
  public static function  convertTo12HourFormat($time24)
  {
    return date("g:i a", strtotime($time24));
  }
  public static function convert_day($day)
  {
    $days = floor($day / 1440);
    return sprintf($days);
  }
  public static function convert_week($week)
  {
    $weeks = floor($week / 10080);
    return sprintf($weeks);
  }
  public static function numToArray(int $num): array
  {
    // 1: number (or numeric string) starts with minus sign?
    $hasSign = str_starts_with($num, '-');
    $matches = [];
    // 2: use regex to match only numbers
    preg_match_all('/\d/', $num, $matches);
    // 3: add leading digit for sign to (converted) array of digits
    return [(int) $hasSign, ...array_map('intval', $matches[0])];
  }
  public static function buffer_select()
  {
    $integers = array();
    for ($i = 0; $i <= 480; $i += 5) {
      $integers[] = explode(',', $i);
    }
    return $integers;
  }
  public static function break_select()
  {
    $integers = array();
    for ($i = 0; $i <= 1440; $i += 5) {
      $integers[] = explode(',', $i);
    }
    return $integers;
  }
  public static function notice_select()
  {
    $integers = array();
    for ($i = 0; $i < 6; ++$i) {
      $integers[] = explode(',', 10 * $i);
    }
    for ($i = 1; $i < 13; ++$i) {
      $integers[] = explode(',', 60 * $i);
    }
    for ($i = 1; $i < 5; ++$i) {
      $integers[] = explode(',', 1440 * $i);
    }
    return $integers;
  }
  public static function slot_increment()
  {
    $integers = array();
    for ($i = 0; $i < 60; ++$i) {
      $integers[] = explode(',', get_option('bookingor_settings_default_time_slot') * $i);
    }
    for ($i = 61; $i < 1440; ++$i) {
      $integers[] = explode(',', get_option('bookingor_settings_default_time_slot') * $i);
    }
    for ($i = 1; $i < 5; ++$i) {
      $integers[] = explode(',', 1440 * $i);
    }
    return $integers;
  }
  public static function default_slot_increment_settings()
  {
    for ($i = 1; $i < 60; ++$i) {
      $integers[] = explode(',',  $i);
    }
    for ($i = 60; $i <= 1360; $i += 60) {
      $hour = $i / 60;
      $integers[] = explode(',',   $i);
    }
    return $integers;
  }
  public static function slot_24_hours()
  {
    $integers = array();
    $defaultTimeSlot = (int) get_option('bookingor_settings_default_time_slot');
    for ($i = 1; $i < 1440 / $defaultTimeSlot; ++$i) {
      $integers[] = explode(',', $defaultTimeSlot * $i);
    }
    return $integers;
  }
  public static function default_image()
  {
    self::$default_img =   plugin_dir_url(__DIR__) . 'admin/images/cate-serv.jpg';
  }
  public static function replace($all_string_variables, $finalArray, $text)
  {
    return str_replace($all_string_variables, $finalArray, $text);
  }
  public static function addExtra() {}
  public static function email_seeder_customer()
  {
    $dataArray = [
      [
        'id' => 1,
        'name_action' => 'customer_email_approved',
        'name' => 'Booking Approved',
        'subject' => '[#service_name] Booking Approved',
        'text' => '<p>Hello [#customer_first_name] [#customer_last_name],</p>
        <p>Your booking [#service_name] Booking appointment has been approved.</p><p>Thank you for choosing our service.</p><br><br>
        <p>Best regards,</p>
        <p>[#business_name]</p>',
        'send_to' => 'customer',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '1'
      ],
      [
        'id' => 2,
        'name_action' => 'customer_email_pending',
        'name' => 'Appointment Pending',
        'subject' => '[#service_name] Appointment Pending',
        'text' => '<p>Hello [#customer_first_name] [#customer_last_name], </p><p>Your appointment is pending approval.</p><p>We will notify you once it is confirmed.</p><br><br>
        <p>Best regards,</p>
        <p>[#business_name]</p>',
        'send_to' => 'customer',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '1'
      ],
      [
        'id' => 3,
        'name_action' => 'customer_email_rejected',
        'name' => 'Appointment Rejected',
        'subject' => '[#service_name] Appointment Rejected',
        'text' => '<p>Hello [#customer_first_name] [#customer_last_name], </p><p>We regret to inform you that your appointment has been rejected.</p><p>If you have any questions, please feel free to contact us.</p><br><br>
        <p>Best regards,</p>
        <p>[#business_name]</p>',
        'send_to' => 'customer',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '0'
      ],
      [
        'id' => 4,
        'name_action' => 'customer_email_canceled',
        'name' => 'Appointment Canceled',
        'subject' => '[#service_name] Appointment Canceled',
        'text' => '<p>Hello [#customer_first_name] [#customer_last_name], </p><p>We regret to inform you that your appointment has been canceled.</p><p>If you have any questions, please feel free to contact us.</p><br><br>
        <p>Best regards,</p>
        <p>[#business_name]</p>',
        'send_to' => 'customer',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '0'
      ],
      [
        'id' => 5,
        'name_action' => 'customer_email_rescheduled',
        'name' => 'Appointment Rescheduled',
        'subject' => '[#service_name] Appointment Rescheduled',
        'text' => '<p>Hello [#customer_first_name] [#customer_last_name], </p><p>Your appointment has been rescheduled.</p><p>We apologize for any inconvenience caused.</p><br><br>
        <p>Best regards,</p>
        <p>[#business_name]</p>',
        'send_to' => 'customer',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '1'
      ],
      [
        'id' => 6,
        'name_action' => 'customer_email_next_day_reminder',
        'name' => 'Appointment Next Day Reminder',
        'subject' => '[#service_name] Appointment Next Day Reminder',
        'text' => '<p>Hello [#customer_first_name] [#customer_last_name], </p><p>Just a friendly reminder that you have an appointment with us tomorrow. We look forward to seeing you.</p><br><br>
        <p>Best regards,</p>
        <p>[#business_name]</p>',
        'send_to' => 'customer',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => ''
      ],
      [
        'id' => 7,
        'name_action' => 'customer_email_follow_up',
        'name' => 'Appointment Follow Up',
        'subject' => '[#service_name] Appointment Follow Up',
        'text' => '<p>Hello [#customer_first_name] [#customer_last_name],</p>
        <p>We hope your recent appointment went well. Please let us know if theres anything else we can assist you with.</p><br><br><p>Best regards,</p>
        <p>[#business_name]</p>',
        'send_to' => 'customer',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '1'
      ],
    ];
    return $dataArray;
  }
  public static function email_seeder_employee()
  {
    $dataArray = [
      [
        'id' => 8,
        'name_action' => 'employee_email_approved',
        'name' => 'Booking Approved',
        'subject' => '[#service_name] Booking Approved',
        'text' => '<p>Hello [#staff_first_name] [#staff_last_name],</p>  
           <p>Your booking for <strong>[#service_name]</strong> on <strong>[#book_date]</strong> from <strong>[#book_start_time]</strong> to <strong>[#book_end_time]</strong> has been approved.</p>  
           <p>Thank you for your attention.</p><br><br>  
           <p>Best regards,</p>  
           <p>[#business_name]</p>',
        'send_to' => 'employee',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '1'
      ],
      [
        'id' => 9,
        'name_action' => 'employee_email_pending',
        'name' => 'Appointment Pending',
        'subject' => '[#service_name] Appointment Pending',
        'text' => '<p>Hello [#staff_first_name] [#staff_last_name],</p>  
           <p>An appointment for <strong>[#service_name]</strong> on <strong>[#book_date]</strong>  
           from <strong>[#book_start_time]</strong> to <strong>[#book_end_time]</strong> is pending your approval.</p>  
           <p>Please review it at your earliest convenience.</p><br><br>  
           <p>Best regards,</p>  
           <p>[#business_name]</p>',
        'send_to' => 'employee',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '1'
      ],
      [
        'id' => 10,
        'name_action' => 'employee_email_rejected',
        'name' => 'Appointment Rejected',
        'subject' => '[#service_name] Appointment Rejected',
        'text' => '<p>Hello [#staff_first_name] [#staff_last_name],</p>  
           <p>The appointment for <strong>[#service_name]</strong> on <strong>[#book_date]</strong> from <strong>[#book_start_time]</strong> to <strong>[#book_end_time]</strong> has been rejected.</p><p>No further action is required.</p><br><br>  
           <p>Best regards,</p>  
           <p>[#business_name]</p>',
        'send_to' => 'employee',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '0'
      ],
      [
        'id' => 11,
        'name_action' => 'employee_email_canceled',
        'name' => 'Appointment Canceled',
        'subject' => '[#service_name] Appointment Canceled',
        'text' => '<p>Hello [#staff_first_name] [#staff_last_name],</p>  
           <p>The appointment for <strong>[#service_name]</strong> on <strong>[#book_date]</strong> from <strong>[#book_start_time]</strong> to <strong>[#book_end_time]</strong> has been canceled.</p><p>Please update your schedule accordingly.</p><br><br>  
           <p>Best regards,</p>  
           <p>[#business_name]</p>',
        'send_to' => 'employee',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '0'
      ],
      [
        'id' => 12,
        'name_action' => 'employee_email_rescheduled',
        'name' => 'Appointment Rescheduled',
        'subject' => '[#service_name] Appointment Rescheduled',
        'text' => '<p>Hello [#staff_first_name] [#staff_last_name],</p>  
           <p>The appointment for <strong>[#service_name]</strong> has been rescheduled to  
           <strong>[#book_date]</strong> from <strong>[#book_start_time]</strong> to <strong>[#book_end_time]</strong>.</p>  
           <p>Please review and confirm your availability.</p><br><br>  
           <p>Best regards,</p>  
           <p>[#business_name]</p>',
        'send_to' => 'employee',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '1'
      ],
      [
        'id' => 13,
        'name_action' => 'employee_email_next_day_reminder',
        'name' => 'Appointment Next Day Reminder',
        'subject' => '[#service_name] Appointment Next Day Reminder',
        'text' => '<p>Hello [#staff_first_name] [#staff_last_name],</p>  
           <p>This is a reminder for your <strong>[#service_name]</strong> appointment scheduled for  
           <strong>[#book_date]</strong> from <strong>[#book_start_time]</strong> to <strong>[#book_end_time]</strong>.</p>  
           <p>Please be prepared.</p><br><br>  
           <p>Best regards,</p>  
           <p>[#business_name]</p>',
        'send_to' => 'employee',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => ''
      ],
      [
        'id' => 14,
        'name_action' => 'employee_email_follow_up',
        'name' => 'Appointment Follow Up',
        'subject' => '[#service_name] Appointment Follow Up',
        'text' => '<p>Hello [#staff_first_name] [#staff_last_name],</p>  
           <p>Please follow up with the customer after the <strong>[#service_name]</strong> appointment on  
           <strong>[#book_date]</strong> from <strong>[#book_start_time]</strong> to <strong>[#book_end_time]</strong>.</p>  
           <p>Your follow-up will ensure the customer had a great experience.</p><br><br>  
           <p>Best regards,</p>  
           <p>[#business_name]</p>',
        'send_to' => 'employee',
        'type' => 'email',
        'paid_amount' => '',
        'tax_charges' => '',
        'coupon_id' => '',
        'book_date' => '',
        'book_time' => '',
        'status' => '1'
      ],
    ];
    return $dataArray;
  }
  public static function getCountriesList()
  {
    return [
      "AF" => "Afghanistan",
      "AL" => "Albania",
      "DZ" => "Algeria",
      "AS" => "American Samoa",
      "AD" => "Andorra",
      "AO" => "Angola",
      "AI" => "Anguilla",
      "AQ" => "Antarctica",
      "AG" => "Antigua and Barbuda",
      "AR" => "Argentina",
      "AM" => "Armenia",
      "AW" => "Aruba",
      "AU" => "Australia",
      "AT" => "Austria",
      "AZ" => "Azerbaijan",
      "BS" => "Bahamas",
      "BH" => "Bahrain",
      "BD" => "Bangladesh",
      "BB" => "Barbados",
      "BY" => "Belarus",
      "BE" => "Belgium",
      "AF" => "Afghanistan",
      "AL" => "Albania",
      "DZ" => "Algeria",
      "AS" => "American Samoa",
      "AD" => "Andorra",
      "AO" => "Angola",
      "AI" => "Anguilla",
      "AQ" => "Antarctica",
      "AG" => "Antigua and Barbuda",
      "AR" => "Argentina",
      "AM" => "Armenia",
      "AW" => "Aruba",
      "AU" => "Australia",
      "AT" => "Austria",
      "AZ" => "Azerbaijan",
      "BS" => "Bahamas",
      "BH" => "Bahrain",
      "BD" => "Bangladesh",
      "BB" => "Barbados",
      "BY" => "Belarus",
      "BE" => "Belgium",
      "BZ" => "Belize",
      "BJ" => "Benin",
      "BM" => "Bermuda",
      "BT" => "Bhutan",
      "BO" => "Bolivia",
      "BA" => "Bosnia and Herzegovina",
      "BW" => "Botswana",
      "BV" => "Bouvet Island",
      "BR" => "Brazil",
      "IO" => "British Indian Ocean Territory",
      "BN" => "Brunei Darussalam",
      "BG" => "Bulgaria",
      "BF" => "Burkina Faso",
      "BI" => "Burundi",
      "KH" => "Cambodia",
      "CM" => "Cameroon",
      "CA" => "Canada",
      "CV" => "Cape Verde",
      "KY" => "Cayman Islands",
      "CF" => "Central African Republic",
      "TD" => "Chad",
      "CL" => "Chile",
      "CN" => "China",
      "CX" => "Christmas Island",
      "CC" => "Cocos (Keeling) Islands",
      "CO" => "Colombia",
      "KM" => "Comoros",
      "CG" => "Congo",
      "CD" => "Congo, the Democratic Republic of the",
      "CK" => "Cook Islands",
      "CR" => "Costa Rica",
      "CI" => "Cote D'Ivoire",
      "HR" => "Croatia",
      "CU" => "Cuba",
      "CY" => "Cyprus",
      "CZ" => "Czech Republic",
      "DK" => "Denmark",
      "DJ" => "Djibouti",
      "DM" => "Dominica",
      "DO" => "Dominican Republic",
      "EC" => "Ecuador",
      "EG" => "Egypt",
      "SV" => "El Salvador",
      "GQ" => "Equatorial Guinea",
      "ER" => "Eritrea",
      "EE" => "Estonia",
      "ET" => "Ethiopia",
      "FK" => "Falkland Islands (Malvinas)",
      "FO" => "Faroe Islands",
      "FJ" => "Fiji",
      "FI" => "Finland",
      "FR" => "France",
      "GF" => "French Guiana",
      "PF" => "French Polynesia",
      "TF" => "French Southern Territories",
      "GA" => "Gabon",
      "GM" => "Gambia",
      "GE" => "Georgia",
      "DE" => "Germany",
      "GH" => "Ghana",
      "GI" => "Gibraltar",
      "GR" => "Greece",
      "GL" => "Greenland",
      "GD" => "Grenada",
      "GP" => "Guadeloupe",
      "GU" => "Guam",
      "GT" => "Guatemala",
      "GN" => "Guinea",
      "GW" => "Guinea-Bissau",
      "GY" => "Guyana",
      "HT" => "Haiti",
      "HM" => "Heard Island and Mcdonald Islands",
      "VA" => "Holy See (Vatican City State)",
      "HN" => "Honduras",
      "HK" => "Hong Kong",
      "HU" => "Hungary",
      "IS" => "Iceland",
      "IN" => "India",
      "ID" => "Indonesia",
      "IR" => "Iran, Islamic Republic of",
      "IQ" => "Iraq",
      "IE" => "Ireland",
      "IL" => "Israel",
      "IT" => "Italy",
      "JM" => "Jamaica",
      "JP" => "Japan",
      "JO" => "Jordan",
      "KZ" => "Kazakhstan",
      "KE" => "Kenya",
      "KI" => "Kiribati",
      "KP" => "Korea, Democratic People's Republic of",
      "KR" => "Korea, Republic of",
      "KW" => "Kuwait",
      "KG" => "Kyrgyzstan",
      "LA" => "Lao People's Democratic Republic",
      "LV" => "Latvia",
      "LB" => "Lebanon",
      "LS" => "Lesotho",
      "LR" => "Liberia",
      "LY" => "Libyan Arab Jamahiriya",
      "LI" => "Liechtenstein",
      "LT" => "Lithuania",
      "LU" => "Luxembourg",
      "MO" => "Macao",
      "MK" => "Macedonia, the Former Yugoslav Republic of",
      "MG" => "Madagascar",
      "MW" => "Malawi",
      "MY" => "Malaysia",
      "MV" => "Maldives",
      "ML" => "Mali",
      "MT" => "Malta",
      "MH" => "Marshall Islands",
      "MQ" => "Martinique",
      "MR" => "Mauritania",
      "MU" => "Mauritius",
      "YT" => "Mayotte",
      "MX" => "Mexico",
      "FM" => "Micronesia, Federated States of",
      "MD" => "Moldova, Republic of",
      "MC" => "Monaco",
      "MN" => "Mongolia",
      "MS" => "Montserrat",
      "MA" => "Morocco",
      "MZ" => "Mozambique",
      "MM" => "Myanmar",
      "NA" => "Namibia",
      "NR" => "Nauru",
      "NP" => "Nepal",
      "NL" => "Netherlands",
      "AN" => "Netherlands Antilles",
      "NC" => "New Caledonia",
      "NZ" => "New Zealand",
      "NI" => "Nicaragua",
      "NE" => "Niger",
      "NG" => "Nigeria",
      "NU" => "Niue",
      "NF" => "Norfolk Island",
      "MP" => "Northern Mariana Islands",
      "NO" => "Norway",
      "OM" => "Oman",
      "PK" => "Pakistan",
      "PW" => "Palau",
      "PS" => "Palestinian Territory, Occupied",
      "PA" => "Panama",
      "PG" => "Papua New Guinea",
      "PY" => "Paraguay",
      "PE" => "Peru",
      "PH" => "Philippines",
      "PN" => "Pitcairn",
      "PL" => "Poland",
      "PT" => "Portugal",
      "PR" => "Puerto Rico",
      "QA" => "Qatar",
      "RE" => "Reunion",
      "RO" => "Romania",
      "RU" => "Russian Federation",
      "RW" => "Rwanda",
      "SH" => "Saint Helena",
      "KN" => "Saint Kitts and Nevis",
      "LC" => "Saint Lucia",
      "PM" => "Saint Pierre and Miquelon",
      "VC" => "Saint Vincent and the Grenadines",
      "WS" => "Samoa",
      "SM" => "San Marino",
      "ST" => "Sao Tome and Principe",
      "SA" => "Saudi Arabia",
      "SN" => "Senegal",
      "CS" => "Serbia and Montenegro",
      "SC" => "Seychelles",
      "SL" => "Sierra Leone",
      "SG" => "Singapore",
      "SK" => "Slovakia",
      "SI" => "Slovenia",
      "SB" => "Solomon Islands",
      "SO" => "Somalia",
      "ZA" => "South Africa",
      "GS" => "South Georgia and the South Sandwich Islands",
      "ES" => "Spain",
      "LK" => "Sri Lanka",
      "SD" => "Sudan",
      "SR" => "Suriname",
      "SJ" => "Svalbard and Jan Mayen",
      "SZ" => "Swaziland",
      "SE" => "Sweden",
      "CH" => "Switzerland",
      "SY" => "Syrian Arab Republic",
      "TW" => "Taiwan, Province of China",
      "TJ" => "Tajikistan",
      "TZ" => "Tanzania, United Republic of",
      "TH" => "Thailand",
      "TL" => "Timor-Leste",
      "TG" => "Togo",
      "TK" => "Tokelau",
      "TO" => "Tonga",
      "TT" => "Trinidad and Tobago",
      "TN" => "Tunisia",
      "TR" => "Turkey",
      "TM" => "Turkmenistan",
      "TC" => "Turks and Caicos Islands",
      "TV" => "Tuvalu",
      "UG" => "Uganda",
      "UA" => "Ukraine",
      "AE" => "United Arab Emirates",
      "GB" => "United Kingdom",
      "US" => "United States",
      "UM" => "United States Minor Outlying Islands",
      "UY" => "Uruguay",
      "UZ" => "Uzbekistan",
      "VU" => "Vanuatu",
      "VE" => "Venezuela",
      "VN" => "Viet Nam",
      "VG" => "Virgin Islands, British",
      "VI" => "Virgin Islands, U.s.",
      "WF" => "Wallis and Futuna",
      "EH" => "Western Sahara",
      "YE" => "Yemen",
      "ZM" => "Zambia",
      "ZW" => "Zimbabwe"
    ];
  }
}
