Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/fields.tar

accesslevel.php000064400000002743151155626620007565 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Provides a list of access levels. Access levels control what users in
specific
 * groups can see.
 *
 * @see    JAccess
 * @since  1.7.0
 */
class JFormFieldAccessLevel extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'AccessLevel';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		$attr = '';

		// Initialize some field attributes.
		$attr .= !empty($this->class) ? ' class="' .
$this->class . '"' : '';
		$attr .= $this->disabled ? ' disabled' : '';
		$attr .= !empty($this->size) ? ' size="' .
$this->size . '"' : '';
		$attr .= $this->multiple ? ' multiple' : '';
		$attr .= $this->required ? ' required
aria-required="true"' : '';
		$attr .= $this->autofocus ? ' autofocus' : '';

		// Initialize JavaScript field attributes.
		$attr .= $this->onchange ? ' onchange="' .
$this->onchange . '"' : '';

		// Get the field options.
		$options = $this->getOptions();

		return JHtml::_('access.level', $this->name,
$this->value, $attr, $options, $this->id);
	}
}
agents.php000064400000016304151155626620006553 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use Joomla\Registry\Registry;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Agents extends \RegularLabs\Library\Field
{
	public $type = 'Agents';

	protected function getInput()
	{
		if ( ! is_array($this->value))
		{
			$this->value = explode(',', $this->value);
		}

		$size  = (int) $this->get('size');
		$group = $this->get('group', 'os');

		return $this->selectListSimpleAjax(
			$this->type, $this->name, $this->value, $this->id,
			compact('size', 'group')
		);
	}

	function getAjaxRaw(Registry $attributes)
	{
		$name  = $attributes->get('name', $this->type);
		$id    = $attributes->get('id', strtolower($name));
		$value = $attributes->get('value', []);
		$size  = $attributes->get('size');

		$options = $this->getAgents(
			$attributes->get('group')
		);

		return $this->selectListSimple($options, $name, $value, $id, $size,
true);
	}

	function getAgents($group = 'os')
	{
		$agents = [];
		switch ($group)
		{
			/* OS */
			case 'os':
				$agents[] = ['Windows (' . JText::_('JALL') .
')', 'Windows'];
				$agents[] = ['Windows 10', 'Windows nt 10.0'];
				$agents[] = ['Windows 8', 'Windows nt 6.2'];
				$agents[] = ['Windows 7', 'Windows nt 6.1'];
				$agents[] = ['Windows Vista', 'Windows nt 6.0'];
				$agents[] = ['Windows Server 2003', 'Windows nt
5.2'];
				$agents[] = ['Windows XP', 'Windows nt 5.1'];
				$agents[] = ['Windows 2000 sp1', 'Windows nt
5.01'];
				$agents[] = ['Windows 2000', 'Windows nt 5.0'];
				$agents[] = ['Windows NT 4.0', 'Windows nt 4.0'];
				$agents[] = ['Windows Me', 'Win 9x 4.9'];
				$agents[] = ['Windows 98', 'Windows 98'];
				$agents[] = ['Windows 95', 'Windows 95'];
				$agents[] = ['Windows CE', 'Windows ce'];
				$agents[] = ['Mac OS (' . JText::_('JALL') .
')', '#(Mac OS|Mac_PowerPC|Macintosh)#'];
				$agents[] = ['Mac OSX (' . JText::_('JALL') .
')', 'Mac OS X'];
				$agents[] = ['Mac OSX El Capitan', 'Mac OS X
10.11'];
				$agents[] = ['Mac OSX Yosemite', 'Mac OS X 10.10'];
				$agents[] = ['Mac OSX Mavericks', 'Mac OS X 10.9'];
				$agents[] = ['Mac OSX Mountain Lion', 'Mac OS X
10.8'];
				$agents[] = ['Mac OSX Lion', 'Mac OS X 10.7'];
				$agents[] = ['Mac OSX Snow Leopard', 'Mac OS X
10.6'];
				$agents[] = ['Mac OSX Leopard', 'Mac OS X 10.5'];
				$agents[] = ['Mac OSX Tiger', 'Mac OS X 10.4'];
				$agents[] = ['Mac OSX Panther', 'Mac OS X 10.3'];
				$agents[] = ['Mac OSX Jaguar', 'Mac OS X 10.2'];
				$agents[] = ['Mac OSX Puma', 'Mac OS X 10.1'];
				$agents[] = ['Mac OSX Cheetah', 'Mac OS X 10.0'];
				$agents[] = ['Mac OS (classic)',
'#(Mac_PowerPC|Macintosh)#'];
				$agents[] = ['Linux', '#(Linux|X11)#'];
				$agents[] = ['Open BSD', 'OpenBSD'];
				$agents[] = ['Sun OS', 'SunOS'];
				$agents[] = ['QNX', 'QNX'];
				$agents[] = ['BeOS', 'BeOS'];
				$agents[] = ['OS/2', 'OS/2'];
				break;

			/* Browsers */
			case 'browsers':
				if ($this->get('simple') &&
$this->get('simple') !== 'false')
				{
					$agents[] = ['Chrome', 'Chrome'];
					$agents[] = ['Firefox', 'Firefox'];
					$agents[] = ['Edge', 'Edge'];
					$agents[] = ['Internet Explorer', 'MSIE'];
					$agents[] = ['Opera', 'Opera'];
					$agents[] = ['Safari', 'Safari'];
					break;
				}

				$agents[] = ['Chrome (' . JText::_('JALL') .
')', 'Chrome'];
				$agents[] = ['Chrome 61-70',
'#Chrome/(6[1-9]|70)\.#'];
				$agents[] = ['Chrome 51-60',
'#Chrome/(5[1-9]|60)\.#'];
				$agents[] = ['Chrome 41-50',
'#Chrome/(4[1-9]|50)\.#'];
				$agents[] = ['Chrome 31-40',
'#Chrome/(3[1-9]|40)\.#'];
				$agents[] = ['Chrome 21-30',
'#Chrome/(2[1-9]|30)\.#'];
				$agents[] = ['Chrome 11-20',
'#Chrome/(1[1-9]|20)\.#'];
				$agents[] = ['Chrome 1-10',
'#Chrome/([1-9]|10)\.#'];
				$agents[] = ['Firefox (' . JText::_('JALL') .
')', 'Firefox'];
				$agents[] = ['Firefox 61-70',
'#Firefox/(6[1-9]|70)\.#'];
				$agents[] = ['Firefox 51-60',
'#Firefox/(5[1-9]|60)\.#'];
				$agents[] = ['Firefox 41-50',
'#Firefox/(4[1-9]|50)\.#'];
				$agents[] = ['Firefox 31-40',
'#Firefox/(3[1-9]|40)\.#'];
				$agents[] = ['Firefox 21-30',
'#Firefox/(2[1-9]|30)\.#'];
				$agents[] = ['Firefox 11-20',
'#Firefox/(1[1-9]|20)\.#'];
				$agents[] = ['Firefox 1-10',
'#Firefox/([1-9]|10)\.#'];
				$agents[] = ['Internet Explorer (' .
JText::_('JALL') . ')', 'MSIE'];
				$agents[] = ['Internet Explorer Edge', 'MSIE
Edge']; // missing MSIE is added to agent string in
assignments/agents.php
				$agents[] = ['Edge 15', 'Edge/15'];
				$agents[] = ['Edge 14', 'Edge/14'];
				$agents[] = ['Edge 13', 'Edge/13'];
				$agents[] = ['Edge 12', 'Edge/12'];
				$agents[] = ['Internet Explorer 11', 'MSIE 11']; //
missing MSIE is added to agent string in assignments/agents.php
				$agents[] = ['Internet Explorer 10.6', 'MSIE
10.6'];
				$agents[] = ['Internet Explorer 10.0', 'MSIE
10.0'];
				$agents[] = ['Internet Explorer 10', 'MSIE 10.'];
				$agents[] = ['Internet Explorer 9', 'MSIE 9.'];
				$agents[] = ['Internet Explorer 8', 'MSIE 8.'];
				$agents[] = ['Internet Explorer 7', 'MSIE 7.'];
				$agents[] = ['Internet Explorer 1-6', '#MSIE
[1-6]\.#'];
				$agents[] = ['Opera (' . JText::_('JALL') .
')', 'Opera'];
				$agents[] = ['Opera 51-60',
'#Opera/(5[1-9]|60)\.#'];
				$agents[] = ['Opera 41-50',
'#Opera/(4[1-9]|50)\.#'];
				$agents[] = ['Opera 31-40',
'#Opera/(3[1-9]|40)\.#'];
				$agents[] = ['Opera 21-30',
'#Opera/(2[1-9]|30)\.#'];
				$agents[] = ['Opera 11-20',
'#Opera/(1[1-9]|20)\.#'];
				$agents[] = ['Opera 1-10', '#Opera/([1-9]|10)\.#'];
				$agents[] = ['Safari (' . JText::_('JALL') .
')', 'Safari'];
				$agents[] = ['Safari 11',
'#Version/11\..*Safari/#'];
				$agents[] = ['Safari 10',
'#Version/10\..*Safari/#'];
				$agents[] = ['Safari 9', '#Version/9\..*Safari/#'];
				$agents[] = ['Safari 8', '#Version/8\..*Safari/#'];
				$agents[] = ['Safari 7', '#Version/7\..*Safari/#'];
				$agents[] = ['Safari 6', '#Version/6\..*Safari/#'];
				$agents[] = ['Safari 5', '#Version/5\..*Safari/#'];
				$agents[] = ['Safari 4', '#Version/4\..*Safari/#'];
				$agents[] = ['Safari 1-3',
'#Version/[1-3]\..*Safari/#'];
				break;

			/* Mobile browsers */
			case 'mobile':
				$agents[] = [JText::_('JALL'), 'mobile'];
				$agents[] = ['Android', 'Android'];
				$agents[] = ['Android Chrome',
'#Android.*Chrome#'];
				$agents[] = ['Blackberry', 'Blackberry'];
				$agents[] = ['IE Mobile', 'IEMobile'];
				$agents[] = ['iPad', 'iPad'];
				$agents[] = ['iPhone', 'iPhone'];
				$agents[] = ['iPod Touch', 'iPod'];
				$agents[] = ['NetFront', 'NetFront'];
				$agents[] = ['Nokia', 'NokiaBrowser'];
				$agents[] = ['Opera Mini', 'Opera Mini'];
				$agents[] = ['Opera Mobile', 'Opera Mobi'];
				$agents[] = ['UC Browser', 'UC Browser'];
				break;
		}

		$options = [];
		foreach ($agents as $agent)
		{
			$option    = JHtml::_('select.option', $agent[1], $agent[0]);
			$options[] = $option;
		}

		return $options;
	}
}
ajax.php000064400000011024151155626620006207 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\Document as RL_Document;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Ajax extends \RegularLabs\Library\Field
{
	public $type = 'Ajax';

	protected function getInput()
	{
		RL_Document::loadMainDependencies();

		$class = $this->get('class', 'btn');

		if ($this->get('disabled'))
		{
			return $this->getButton($class . ' disabled',
'disabled');
		}

		$loading = 'jQuery("#' . $this->id . '
span:nth-child(1)").attr("class", "icon-refresh
icon-spin");';

		$success = '
			jQuery("#' . $this->id .
'").removeClass("btn-warning").addClass("btn-success");
			jQuery("#' . $this->id . '
span:nth-child(1)").attr("class", "icon-ok");
			if(data){
				jQuery("#message_' . $this->id .
'").addClass("alert alert-success alert-noclose
alert-inline").html(data);
			}
			';

		$error = '
			jQuery("#' . $this->id .
'").removeClass("btn-success").addClass("btn-warning");
			jQuery("#' . $this->id . '
span:nth-child(1)").attr("class", "icon-warning");
			if(data){
				let error = data;
				if(data.statusText) { 
					error = data.statusText;
					if(data.responseText.test(/<blockquote>/)) {
						error =
data.responseText.replace(/^[.\\\\s\\\\S]*?<blockquote>([.\\\\s\\\\S]*?)<\\\\/blockquote>[.\\\\s\\\\S]*$/gm,
"$1");
					}
				}
				jQuery("#message_' . $this->id .
'").addClass("alert alert-danger alert-noclose
alert-inline").html(error);
			}';

		if ($this->get('success-disabled'))
		{
			$success .= '
			jQuery("#' . $this->id . '").disabled = true;
			jQuery("#' . $this->id .
'").addClass("disabled");
			jQuery("#' . $this->id .
'").attr("onclick", "return false;");
			';
		}

		if ($this->get('success-text') ||
$this->get('error-text'))
		{
			$success_text = $this->get('success-text',
$this->get('text'));
			$error_text   = $this->get('error-text',
$this->get('text'));

			$success .= '
			jQuery("#' . $this->id . '
span:nth-child(2)").text("' .
addslashes(JText::_($success_text)) . '");
			';

			$error .= '
			jQuery("#' . $this->id . '
span:nth-child(2)").text("' .
addslashes(JText::_($error_text)) . '");
			';
		}

		$query = '';

		if ($url_query = $this->get('url-query'))
		{
			$name_prefix = $this->form->getFormControl() . '\\\[' .
$this->group . '\\\]';
			$id_prefix   = $this->form->getFormControl() . '_' .
$this->group . '_';
			$query_parts = [];
			$url_query   = explode(',', $url_query);

			foreach ($url_query as $url_query_part)
			{
				list($key, $id) = explode(':', $url_query_part);

				$el_name = 'document.querySelector("input[name=' .
$name_prefix . '\\\[' . $id . '\\\]]:checked")';
				$el_id   = 'document.querySelector("#' . $id_prefix .
$id . '")';

				$query_parts[] = '`&' . $key . '=`'
					. ' + encodeURI(' . $el_name . ' ? ' . $el_name .
'.value : (' . $el_id . ' ? ' . $el_id .
'.value' . ' : ""))';
			}

			$query = '+' . implode('+', $query_parts);
		}

		$script = 'function loadAjax' . $this->id . '() {
				' . $loading . '
				jQuery("#message_' . $this->id .
'").attr("class", "").html("");
				RegularLabsScripts.loadajax(
					`' . addslashes($this->get('url')) . '`' .
$query . ',
					`
					if(data == "" || data.substring(0,1) == "+") {
						data = data.trim().replace(/^[+]/, "");
						' . $success . '
					} else {
						data = data.trim().replace(/^[-]/, "");
						' . $error . '
					}`,
					`' . $error . '`
				);
			}';

		$script = preg_replace('#\s*\n\s*#', ' ', $script);

		JFactory::getDocument()->addScriptDeclaration($script);

		$attributes = 'onclick="loadAjax' . $this->id .
'();return false;"';

		return $this->getButton($class, $attributes);
	}

	private function getButton($class = 'btn', $attributes =
'')
	{
		$icon = $this->get('icon', '')
			? 'icon-' . $this->get('icon', '')
			: '';

		return
			'<button id="' . $this->id . '"
class="' . $class . '"'
			. ' title="' .
JText::_($this->get('description')) . '"'
			. ' ' . $attributes . '>'
			. '<span class="' . $icon .
'"></span> '
			. '<span>' . JText::_($this->get('text',
$this->get('label'))) . '</span>'
			. '</button>'
			. '<div id="message_' . $this->id .
'"></div>';
	}
}
akeebasubs.php000064400000002245151155626620007376 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_AkeebaSubs extends \RegularLabs\Library\FieldGroup
{
	public $type          = 'AkeebaSubs';
	public $default_group = 'Levels';

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['levels']))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getLevels()
	{
		$query = $this->db->getQuery(true)
			->select('l.akeebasubs_level_id as id, l.title AS name,
l.enabled as published')
			->from('#__akeebasubs_levels AS l')
			->where('l.enabled > -1')
			->order('l.title, l.akeebasubs_level_id');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list, ['id']);
	}
}
assignmentselection.php000064400000007301151155626620011345
0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\StringHelper as RL_String;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

/**
 * @deprecated  2018-10-30  Use ConditionSelection instead
 */
class JFormFieldRL_AssignmentSelection extends \RegularLabs\Library\Field
{
	public $type = 'AssignmentSelection';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		require_once __DIR__ . '/toggler.php';
		$toggler = new RLFieldToggler;

		$this->value     = (int) $this->value;
		$label           = $this->get('label');
		$param_name      = $this->get('name');
		$use_main_toggle = $this->get('use_main_toggle', 1);
		$showclose       = $this->get('showclose', 0);

		$html = [];

		if ( ! $label)
		{
			if ($use_main_toggle)
			{
				$html[] = $toggler->getInput(['div' => 1]);
			}

			$html[] = $toggler->getInput(['div' => 1]);

			return '</div>' . implode('', $html);
		}

		$label = RL_String::html_entity_decoder(JText::_($label));

		$html[] = '</div>';
		if ($use_main_toggle)
		{
			$html[] = $toggler->getInput(['div' => 1,
'param' => 'show_assignments|' . $param_name,
'value' => '1|1,2']);
		}

		$class = 'well well-small rl_well';
		if ($this->value === 1)
		{
			$class .= ' alert-success';
		}
		else if ($this->value === 2)
		{
			$class .= ' alert-error';
		}
		$html[] = '<div class="' . $class .
'">';
		if ($showclose &&
JFactory::getUser()->authorise('core.admin'))
		{
			$html[] = '<button type="button" class="close
rl_remove_assignment"
aria-label="Close">&times;</button>';
		}

		$html[] = '<div class="control-group">';

		$html[] = '<div class="control-label">';
		$html[] = '<label><h4
class="rl_assignmentselection-header">' . $label .
'</h4></label>';
		$html[] = '</div>';

		$html[] = '<div class="controls">';
		$html[] = '<fieldset id="' . $this->id .
'"  class="radio btn-group">';

		$onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this,
0)"';
		$html[]  = '<input type="radio" id="' .
$this->id . '0" name="' . $this->name .
'" value="0"' . (( ! $this->value) ? '
checked="checked"' : '') . $onclick .
'>';
		$html[]  = '<label class="rl_btn-ignore"
for="' . $this->id . '0">' .
JText::_('RL_IGNORE') . '</label>';

		$onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this,
1)"';
		$html[]  = '<input type="radio" id="' .
$this->id . '1" name="' . $this->name .
'" value="1"' . (($this->value === 1) ? '
checked="checked"' : '') . $onclick .
'>';
		$html[]  = '<label class="rl_btn-include"
for="' . $this->id . '1">' .
JText::_('RL_INCLUDE') . '</label>';

		$onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this,
2)"';
		$onclick .= ' onload="RegularLabsForm.setToggleTitleClass(this,
' . $this->value . ', 7)"';
		$html[]  = '<input type="radio" id="' .
$this->id . '2" name="' . $this->name .
'" value="2"' . (($this->value === 2) ? '
checked="checked"' : '') . $onclick .
'>';
		$html[]  = '<label class="rl_btn-exclude"
for="' . $this->id . '2">' .
JText::_('RL_EXCLUDE') . '</label>';

		$html[] = '</fieldset>';
		$html[] = '</div>';

		$html[] = '</div>';
		$html[] = '<div class="clearfix">
</div>';

		$html[] = $toggler->getInput(['div' => 1,
'param' => $param_name, 'value' =>
'1,2']);
		$html[] = '<div><div>';

		return '</div>' . implode('', $html);
	}
}
block.php000064400000003360151155626620006362 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Block extends \RegularLabs\Library\Field
{
	public $type = 'Block';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$title       = $this->get('label');
		$description = $this->get('description');
		$class       = $this->get('class');
		$showclose   = $this->get('showclose', 0);
		$nowell      = $this->get('nowell', 0);

		$start = $this->get('start', 0);
		$end   = $this->get('end', 0);

		$html = [];

		if ($start || ! $end)
		{
			$html[] = '</div>';

			if (strpos($class, 'alert') !== false)
			{
				$class = 'alert ' . $class;
			}
			else if ( ! $nowell)
			{
				$class = 'well well-small ' . $class;
			}

			$html[] = '<div class="' . $class .
'">';

			if ($showclose &&
JFactory::getUser()->authorise('core.admin'))
			{
				$html[] = '<button type="button" class="close
rl_remove_assignment"
aria-label="Close">&times;</button>';
			}

			if ($title)
			{
				$html[] = '<h4>' . $this->prepareText($title) .
'</h4>';
			}

			if ($description)
			{
				$html[] = '<div>' . $this->prepareText($description)
. '</div>';
			}

			$html[] = '<div><div>';
		}

		if ( ! $start && ! $end)
		{
			$html[] = '</div>';
		}

		return '</div>' . implode('', $html);
	}
}
checkbox.php000064400000010433151155626630007056 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Single checkbox field.
 * This is a boolean field with null for false and the specified option for
true
 *
 * @link  
http://www.w3.org/TR/html-markup/input.checkbox.html#input.checkbox
 * @see    JFormFieldCheckboxes
 * @since  1.7.0
 */
class JFormFieldCheckbox extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Checkbox';

	/**
	 * The checked state of checkbox field.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $checked = false;

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'checked':
				return $this->checked;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'checked':
				$value = (string) $value;
				$this->checked = ($value == 'true' || $value == $name ||
$value == '1');
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		// Handle the default attribute
		$default = (string) $element['default'];

		if ($default)
		{
			$test = $this->form->getValue((string) $element['name'],
$group);

			$value = ($test == $default) ? $default : null;
		}

		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$checked = (string) $this->element['checked'];
			$this->checked = ($checked == 'true' || $checked ==
'checked' || $checked == '1');

			empty($this->value) || $this->checked ? null : $this->checked =
true;
		}

		return $return;
	}

	/**
	 * Method to get the field input markup.
	 * The checked element sets the field to selected.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		// Initialize some field attributes.
		$class     = !empty($this->class) ? ' class="' .
$this->class . '"' : '';
		$disabled  = $this->disabled ? ' disabled' : '';
		$value     = !empty($this->default) ? $this->default :
'1';
		$required  = $this->required ? ' required
aria-required="true"' : '';
		$autofocus = $this->autofocus ? ' autofocus' : '';
		$checked   = $this->checked || !empty($this->value) ? '
checked' : '';

		// Initialize JavaScript field attributes.
		$onclick  = !empty($this->onclick) ? ' onclick="' .
$this->onclick . '"' : '';
		$onchange = !empty($this->onchange) ? ' onchange="' .
$this->onchange . '"' : '';

		// Including fallback code for HTML5 non supported browsers.
		JHtml::_('jquery.framework');
		JHtml::_('script', 'system/html5fallback.js',
array('version' => 'auto', 'relative'
=> true, 'conditional' => 'lt IE 9'));

		return '<input type="checkbox" name="' .
$this->name . '" id="' . $this->id . '"
value="'
			. htmlspecialchars($value, ENT_COMPAT, 'UTF-8') .
'"' . $class . $checked . $disabled . $onclick . $onchange
			. $required . $autofocus . ' />';
	}
}
codeeditor.php000064400000004264151155626630007416 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Editor\Editor as JEditor;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Plugin\PluginHelper as JPluginHelper;
use RegularLabs\Library\Document as RL_Document;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_CodeEditor extends \RegularLabs\Library\Field
{
	public $type = 'CodeEditor';

	protected function getInput()
	{
		$width  = $this->get('width', '100%');
		$height = $this->get('height', 400);
		$syntax = $this->get('syntax', 'html');

		$this->value = htmlspecialchars(str_replace('\n',
"\n", $this->value), ENT_COMPAT, 'UTF-8');

		$editor_plugin = JPluginHelper::getPlugin('editors',
'codemirror');

		if (empty($editor_plugin))
		{
			return
				'<textarea name="' . $this->name . '"
style="'
				. 'width:' . (strpos($width, '%') ? $width : $width
. 'px') . ';'
				. 'height:' . (strpos($height, '%') ? $height :
$height . 'px') . ';'
				. '" id="' . $this->id . '">'
. $this->value . '</textarea>';
		}

		RL_Document::script('regularlabs/codemirror.min.js');
		RL_Document::stylesheet('regularlabs/codemirror.min.css');

		JFactory::getDocument()->addScriptDeclaration("
			jQuery(document).ready(function($) {
				RegularLabsCodeMirror.init('" . $this->id . "');
			});
		");

		JFactory::getDocument()->addStyleDeclaration("
			#rl_codemirror_" . $this->id . " .CodeMirror {
			    height: " . $height . "px;
			    min-height: " . min($height, '100') . "px;
			}
		");

		return '<div class="rl_codemirror"
id="rl_codemirror_' . $this->id . '">'
			. JEditor::getInstance('codemirror')->display(
				$this->name, $this->value,
				$width, $height,
				80, 10,
				false,
				$this->id, null, null,
				['markerGutter' => false, 'activeLine' =>
true, 'syntax' => $syntax, 'class' =>
'xxx']
			)
			. '</div>';
	}
}
color.php000064400000015042151155626630006407 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Color Form Field class for the Joomla Platform.
 * This implementation is designed to be compatible with HTML5's
`<input type="color">`
 *
 * @link   http://www.w3.org/TR/html-markup/input.color.html
 * @since  1.7.3
 */
class JFormFieldColor extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.3
	 */
	protected $type = 'Color';

	/**
	 * The control.
	 *
	 * @var    mixed
	 * @since  3.2
	 */
	protected $control = 'hue';

	/**
	 * The format.
	 *
	 * @var    string
	 * @since  3.6.0
	 */
	protected $format = 'hex';

	/**
	 * The keywords (transparent,initial,inherit).
	 *
	 * @var    string
	 * @since  3.6.0
	 */
	protected $keywords = '';

	/**
	 * The position.
	 *
	 * @var    mixed
	 * @since  3.2
	 */
	protected $position = 'default';

	/**
	 * The colors.
	 *
	 * @var    mixed
	 * @since  3.2
	 */
	protected $colors;

	/**
	 * The split.
	 *
	 * @var    integer
	 * @since  3.2
	 */
	protected $split = 3;

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.5
	 */
	protected $layout = 'joomla.form.field.color';

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'control':
			case 'format':
			case 'keywords':
			case 'exclude':
			case 'colors':
			case 'split':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'split':
				$value = (int) $value;
			case 'control':
			case 'format':
				$this->$name = (string) $value;
				break;
			case 'keywords':
				$this->$name = (string) $value;
				break;
			case 'exclude':
			case 'colors':
				$this->$name = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->control  = isset($this->element['control']) ?
(string) $this->element['control'] : 'hue';
			$this->format   = isset($this->element['format']) ?
(string) $this->element['format'] : 'hex';
			$this->keywords = isset($this->element['keywords']) ?
(string) $this->element['keywords'] : '';
			$this->position = isset($this->element['position']) ?
(string) $this->element['position'] : 'default';
			$this->colors   = (string) $this->element['colors'];
			$this->split    = isset($this->element['split']) ? (int)
$this->element['split'] : 3;
		}

		return $return;
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.3
	 */
	protected function getInput()
	{
		// Switch the layouts
		$this->layout = $this->control === 'simple' ?
$this->layout . '.simple' : $this->layout .
'.advanced';

		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.5
	 */
	protected function getLayoutData()
	{
		$lang  = JFactory::getLanguage();
		$data  = parent::getLayoutData();
		$color = strtolower($this->value);
		$color = ! $color ? '' : $color;

		// Position of the panel can be: right (default), left, top or bottom
(default RTL is left)
		$position = ' data-position="' . (($lang->isRTL()
&& $this->position == 'default') ? 'left' :
$this->position) . '"';

		if (!$color || in_array($color, array('none',
'transparent')))
		{
			$color = 'none';
		}
		elseif ($color['0'] != '#' &&
$this->format == 'hex')
		{
			$color = '#' . $color;
		}

		// Assign data for simple/advanced mode
		$controlModeData = $this->control === 'simple' ?
$this->getSimpleModeLayoutData() :
$this->getAdvancedModeLayoutData($lang);

		$extraData = array(
			'color'    => $color,
			'format'   => $this->format,
			'keywords' => $this->keywords,
			'position' => $position,
			'validate' => $this->validate
		);

		return array_merge($data, $extraData, $controlModeData);
	}

	/**
	 * Method to get the data for the simple mode to be passed to the layout
for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.5
	 */
	protected function getSimpleModeLayoutData()
	{
		$colors = strtolower($this->colors);

		if (empty($colors))
		{
			$colors = array(
				'none',
				'#049cdb',
				'#46a546',
				'#9d261d',
				'#ffc40d',
				'#f89406',
				'#c3325f',
				'#7a43b6',
				'#ffffff',
				'#999999',
				'#555555',
				'#000000',
			);
		}
		else
		{
			$colors = explode(',', $colors);
		}

		if (!$this->split)
		{
			$count = count($colors);
			if ($count % 5 == 0)
			{
				$split = 5;
			}
			else
			{
				if ($count % 4 == 0)
				{
					$split = 4;
				}
			}
		}

		$split = $this->split ? $this->split : 3;

		return array(
			'colors' => $colors,
			'split'  => $split,
		);
	}

	/**
	 * Method to get the data for the advanced mode to be passed to the layout
for rendering.
	 *
	 * @param   object  $lang  The language object
	 *
	 * @return  array
	 *
	 * @since   3.5
	 */
	protected function getAdvancedModeLayoutData($lang)
	{
		return array(
			'colors'  => $this->colors,
			'control' => $this->control,
			'lang'    => $lang,
		);
	}
}
components.php000064400000003201151155626630007450 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

use Joomla\Utilities\ArrayHelper;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Framework.
 *
 * @since  3.7.0
 */
class JFormFieldComponents extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var     string
	 * @since   3.7.0
	 */
	protected $type = 'Components';

	/**
	 * Method to get a list of options for a list input.
	 *
	 * @return	array  An array of JHtml options.
	 *
	 * @since   2.5.0
	 */
	protected function getOptions()
	{
		$db    = JFactory::getDbo();
		$query = $db->getQuery(true)
			->select('name AS text, element AS value')
			->from('#__extensions')
			->where('enabled >= 1')
			->where('type =' . $db->quote('component'));

		$items = $db->setQuery($query)->loadObjectList();

		if ($items)
		{
			$lang = JFactory::getLanguage();

			foreach ($items as &$item)
			{
				// Load language
				$extension = $item->value;

				$lang->load("$extension.sys", JPATH_ADMINISTRATOR, null,
false, true)
					|| $lang->load("$extension.sys", JPATH_ADMINISTRATOR .
'/components/' . $extension, null, false, true);

				// Translate component name
				$item->text = JText::_($item->text);
			}

			// Sort by component name
			$items = ArrayHelper::sortObjects($items, 'text', 1, true,
true);
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $items);

		return $options;
	}
}
conditionselection.php000064400000007505151155626630011172 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\ShowOn as RL_ShowOn;
use RegularLabs\Library\StringHelper as RL_String;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_ConditionSelection extends \RegularLabs\Library\Field
{
	public $type = 'ConditionSelection';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$this->value     = (int) $this->value;
		$label           = $this->get('label');
		$param_name      = $this->get('name');
		$use_main_switch = $this->get('use_main_switch', 1);
		$showclose       = $this->get('showclose', 0);

		$html = [];

		if ( ! $label)
		{
			if ($use_main_switch)
			{
				$html[] = $this->closeShowOn();
			}

			$html[] = $this->closeShowOn();

			return '</div>' . implode('', $html);
		}

		$label = RL_String::html_entity_decoder(JText::_($label));

		$html[] = '</div>';

		if ($use_main_switch)
		{
			$html[] =
$this->openShowOn('show_conditions:1[OR]show_assignments:1[OR]'
. $param_name . ':1,2');
		}

		$class = 'well well-small rl_well';
		if ($this->value === 1)
		{
			$class .= ' alert-success';
		}
		else if ($this->value === 2)
		{
			$class .= ' alert-error';
		}
		$html[] = '<div class="' . $class .
'">';
		if ($showclose &&
JFactory::getUser()->authorise('core.admin'))
		{
			$html[] = '<button type="button"
class="close"
aria-label="Close">&times;</button>';
		}

		$html[] = '<div class="control-group">';

		$html[] = '<div class="control-label">';
		$html[] = '<label><h4>' . $label .
'</h4></label>';
		$html[] = '</div>';

		$html[] = '<div class="controls">';
		$html[] = '<fieldset id="' . $this->id .
'"  class="radio btn-group">';

		$onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this,
0)"';
		$html[]  = '<input type="radio" id="' .
$this->id . '0" name="' . $this->name .
'" value="0"' . (( ! $this->value) ? '
checked="checked"' : '') . $onclick .
'>';
		$html[]  = '<label class="rl_btn-ignore"
for="' . $this->id . '0">' .
JText::_('RL_IGNORE') . '</label>';

		$onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this,
1)"';
		$html[]  = '<input type="radio" id="' .
$this->id . '1" name="' . $this->name .
'" value="1"' . (($this->value === 1) ? '
checked="checked"' : '') . $onclick .
'>';
		$html[]  = '<label class="rl_btn-include"
for="' . $this->id . '1">' .
JText::_('RL_INCLUDE') . '</label>';

		$onclick = ' onclick="RegularLabsForm.setToggleTitleClass(this,
2)"';
		$onclick .= ' onload="RegularLabsForm.setToggleTitleClass(this,
' . $this->value . ', 7)"';
		$html[]  = '<input type="radio" id="' .
$this->id . '2" name="' . $this->name .
'" value="2"' . (($this->value === 2) ? '
checked="checked"' : '') . $onclick .
'>';
		$html[]  = '<label class="rl_btn-exclude"
for="' . $this->id . '2">' .
JText::_('RL_EXCLUDE') . '</label>';

		$html[] = '</fieldset>';
		$html[] = '</div>';

		$html[] = '</div>';
		$html[] = '<div class="clearfix">
</div>';

		$html[] = $this->openShowOn($param_name . ':1,2');

		$html[] = '<div><div>';

		return '</div>' . implode('', $html);
	}

	protected function openShowOn($condition = '')
	{
		if ( ! $condition)
		{
			return $this->closeShowon();
		}

		$formControl = $this->get('form', $this->formControl);
		$formControl = $formControl == 'root' ? '' :
$formControl;

		return RL_ShowOn::open($condition, $formControl);
	}

	protected function closeShowOn()
	{
		return RL_ShowOn::close();
	}
}
content.php000064400000005150151155626630006742 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\ArrayHelper as RL_ArrayHelper;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Content extends \RegularLabs\Library\FieldGroup
{
	public $type = 'Content';

	function getCategories()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__categories')
			->where('extension = ' .
$this->db->quote('com_content'))
			->where('parent_id > 0')
			->where('published > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$this->value = RL_ArrayHelper::toArray($this->value);

		// assemble items to the array
		$options = [];
		if ($this->get('show_ignore'))
		{
			if (in_array('-1', $this->value))
			{
				$this->value = ['-1'];
			}
			$options[] = JHtml::_('select.option', '-1', '-
' . JText::_('RL_IGNORE') . ' -');
			$options[] = JHtml::_('select.option', '-',
'&nbsp;', 'value', 'text', true);
		}

		$query->clear('select')
			->select('id, title as name, level, published, language')
			->order('lft');

		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		$options = array_merge($options, $this->getOptionsByList($list,
['language'], -1));

		return $options;
	}

	function getItems()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__content AS i')
			->where('i.access > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear('select')
			->select('i.id, i.title as name, i.language, c.title as cat,
i.state as published')
			->join('LEFT', '#__categories AS c ON c.id =
i.catid')
			->order('i.title, i.ordering, i.id');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		$options = $this->getOptionsByList($list, ['language',
'cat', 'id']);

		if ($this->get('showselect'))
		{
			array_unshift($options, JHtml::_('select.option',
'-', '&nbsp;', 'value', 'text',
true));
			array_unshift($options, JHtml::_('select.option',
'-', '- ' . JText::_('Select Item') . '
-'));
		}

		return $options;
	}
}
customfieldkey.php000064400000002674151155626630010327 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\StringHelper as RL_String;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_CustomFieldKey extends \RegularLabs\Library\Field
{
	public $type = 'CustomFieldKey';

	protected function getLabel()
	{
		$label       = $this->get('label') ?
$this->get('label') : '';
		$size        = $this->get('size') ?
'style="width:' . $this->get('size') .
'px"' : '';
		$class       = 'class="' .
($this->get('class') ? $this->get('class') :
'text_area') . '"';
		$this->value =
htmlspecialchars(RL_String::html_entity_decoder($this->value),
ENT_QUOTES);

		return
			'<label for="' . $this->id . '"
style="margin-top: -5px;">'
			. '<input type="text" name="' .
$this->name . '" id="' . $this->id . '"
value="' . $this->value
			. '" placeholder="' . JText::_($label) .
'" title="' . JText::_($label) . '" ' .
$class . ' ' . $size . '>'
			. '</label>';
	}

	protected function getInput()
	{
		return '<div
style="display:none;"><div><div>';
	}
}
customfieldvalue.php000064400000002544151155626630010647 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\StringHelper as RL_String;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_CustomFieldValue extends \RegularLabs\Library\Field
{
	public $type = 'CustomFieldValue';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$label       = $this->get('label') ?
$this->get('label') : '';
		$size        = $this->get('size') ?
'style="width:' . $this->get('size') .
'px"' : '';
		$class       = 'class="' .
($this->get('class') ? $this->get('class') :
'text_area') . '"';
		$this->value =
htmlspecialchars(RL_String::html_entity_decoder($this->value),
ENT_QUOTES);

		return
			'</div></div></div>'
			. '<input type="text" name="' .
$this->name . '" id="' . $this->id . '"
value="' . $this->value
			. '" placeholder="' . JText::_($label) .
'" title="' . JText::_($label) . '" ' .
$class . ' ' . $size . '>';
	}
}
datetime.php000064400000002450151155626640007065 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\Date as RL_Date;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_DateTime extends \RegularLabs\Library\Field
{
	public $type = 'DateTime';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$label  = $this->get('label');
		$format = $this->get('format');

		$date = JFactory::getDate();

		$tz = new
DateTimeZone(JFactory::getApplication()->getCfg('offset'));
		$date->setTimeZone($tz);

		if ($format)
		{
			if (strpos($format, '%') !== false)
			{
				$format = RL_Date::strftimeToDateFormat($format);
			}
			$html = $date->format($format, true);
		}
		else
		{
			$html = $date->format('', true);
		}

		if ($label)
		{
			$html = JText::sprintf($label, $html);
		}

		return '</div><div>' . $html;
	}
}
dependency.php000064400000005267151155626640007420 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\RegEx as RL_RegEx;

jimport('joomla.form.formfield');

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Dependency extends \RegularLabs\Library\Field
{
	public $type = 'Dependency';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		if ($file = $this->get('file'))
		{
			$label = $this->get('label', 'the main
extension');

			RLFieldDependency::setMessage($file, $label);

			return '';
		}

		$path      = ($this->get('path') == 'site') ?
'' : '/administrator';
		$label     = $this->get('label');
		$file      = $this->get('alias', $label);
		$file      = RL_RegEx::replace('[^a-z-]', '',
strtolower($file));
		$extension = $this->get('extension');

		switch ($extension)
		{
			case 'com':
				$file = $path . '/components/com_' . $file .
'/com_' . $file . '.xml';
				break;
			case 'mod':
				$file = $path . '/modules/mod_' . $file . '/mod_' .
$file . '.xml';
				break;
			default:
				$file = '/plugins/' . str_replace('plg_',
'', $extension) . '/' . $file . '.xml';
				break;
		}

		$label = JText::_($label) . ' (' . JText::_('RL_' .
strtoupper($extension)) . ')';

		RLFieldDependency::setMessage($file, $label);

		return '';
	}
}

class RLFieldDependency
{
	static function setMessage($file, $name)
	{
		jimport('joomla.filesystem.file');

		$file = str_replace('\\', '/', $file);
		if (strpos($file, '/administrator') === 0)
		{
			$file = str_replace('/administrator', JPATH_ADMINISTRATOR,
$file);
		}
		else
		{
			$file = JPATH_SITE . '/' . $file;
		}
		$file = str_replace('//', '/', $file);

		$file_alt = RL_RegEx::replace('(com|mod)_([a-z-_]+\.)',
'\2', $file);

		if ( ! file_exists($file) && ! file_exists($file_alt))
		{
			$msg          =
JText::sprintf('RL_THIS_EXTENSION_NEEDS_THE_MAIN_EXTENSION_TO_FUNCTION',
JText::_($name));
			$message_set  = 0;
			$messageQueue = JFactory::getApplication()->getMessageQueue();
			foreach ($messageQueue as $queue_message)
			{
				if ($queue_message['type'] == 'error' &&
$queue_message['message'] == $msg)
				{
					$message_set = 1;
					break;
				}
			}
			if ( ! $message_set)
			{
				JFactory::getApplication()->enqueueMessage($msg, 'error');
			}
		}
	}
}
easyblog.php000064400000004151151155626640007076 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_EasyBlog extends \RegularLabs\Library\FieldGroup
{
	public $type = 'EasyBlog';

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['categories' =>
'category', 'items' => 'post',
'tags' => 'tag']))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getCategories()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__easyblog_category AS c')
			->where('c.published > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear('select')
			->select('c.id, c.parent_id, c.title, c.published')
			->order('c.ordering, c.title');
		$this->db->setQuery($query);
		$items = $this->db->loadObjectList();

		return $this->getOptionsTreeByList($items);
	}

	function getItems()
	{
		$query = $this->db->getQuery(true)
			->select('i.id, i.title as name, c.title as cat,
i.published')
			->from('#__easyblog_post AS i')
			->join('LEFT', '#__easyblog_category AS c ON c.id =
i.category_id')
			->where('i.published > -1')
			->order('i.title, c.title, i.id');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list, ['cat',
'id']);
	}

	function getTags()
	{
		$query = $this->db->getQuery(true)
			->select('t.alias as id, t.title as name')
			->from('#__easyblog_tag AS t')
			->where('t.published > -1')
			->where('t.title != ' .
$this->db->quote(''))
			->group('t.title')
			->order('t.title');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list);
	}
}
editor.php000064400000002042151155626640006554 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Editor extends \RegularLabs\Library\Field
{
	public $type = 'Editor';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$width  = $this->get('width', '100%');
		$height = $this->get('height', 400);

		$this->value = htmlspecialchars($this->value, ENT_COMPAT,
'UTF-8');

		// Get an editor object.
		$editor = JFactory::getEditor();
		$html   = $editor->display($this->name, $this->value, $width,
$height, true, $this->id);

		return '</div><div>' . $html;
	}
}
field.php000064400000003262151155626640006356 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Field extends \RegularLabs\Library\Field
{
	public $type = 'Field';

	protected function getInput()
	{
		$options = $this->getFields();

		return $this->selectListSimple($options, $this->name,
$this->value, $this->id);
	}

	function getFields()
	{
		$db    = JFactory::getDbo();
		$query = $db->getQuery(true)
			->select('DISTINCT a.id, a.name, a.type, a.title')
			->from('#__fields AS a')
			->where('a.state = 1')
			->order('a.name');

		$db->setQuery($query);

		$fields = $db->loadObjectList();

		$options = [];

		$options[] = JHtml::_('select.option', '', '-
' . JText::_('RL_SELECT_FIELD') . ' -');

		foreach ($fields as &$field)
		{
			// Skip our own subfields type. We won't have subfields in
subfields.
			if ($field->type == 'subfields' || $field->type ==
'repeatable')
			{
				continue;
			}

			$options[] = JHtml::_('select.option', $field->name,
($field->title . ' (' . $field->type . ')'));
		}

		if ($this->get('show_custom'))
		{
			$options[] = JHtml::_('select.option', 'custom',
'- ' . JText::_('RL_CUSTOM') . ' -');
		}

		return $options;
	}
}
filelist.php000064400000013054151155626640007106 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.path');

JFormHelper::loadFieldClass('list');

/**
 * Supports an HTML select list of files
 *
 * @since  1.7.0
 */
class JFormFieldFileList extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'FileList';

	/**
	 * The filter.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $filter;

	/**
	 * The exclude.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $exclude;

	/**
	 * The hideNone.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $hideNone = false;

	/**
	 * The hideDefault.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $hideDefault = false;

	/**
	 * The stripExt.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $stripExt = false;

	/**
	 * The directory.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $directory;

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'filter':
			case 'exclude':
			case 'hideNone':
			case 'hideDefault':
			case 'stripExt':
			case 'directory':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'filter':
			case 'directory':
			case 'exclude':
				$this->$name = (string) $value;
				break;

			case 'hideNone':
			case 'hideDefault':
			case 'stripExt':
				$value = (string) $value;
				$this->$name = ($value === 'true' || $value === $name ||
$value === '1');
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->filter  = (string) $this->element['filter'];
			$this->exclude = (string) $this->element['exclude'];

			$hideNone       = (string) $this->element['hide_none'];
			$this->hideNone = ($hideNone == 'true' || $hideNone ==
'hideNone' || $hideNone == '1');

			$hideDefault       = (string)
$this->element['hide_default'];
			$this->hideDefault = ($hideDefault == 'true' ||
$hideDefault == 'hideDefault' || $hideDefault == '1');

			$stripExt       = (string) $this->element['stripext'];
			$this->stripExt = ($stripExt == 'true' || $stripExt ==
'stripExt' || $stripExt == '1');

			// Get the path in which to search for file options.
			$this->directory = (string) $this->element['directory'];
		}

		return $return;
	}

	/**
	 * Method to get the list of files for the field options.
	 * Specify the target directory with a directory attribute
	 * Attributes allow an exclude mask and stripping of extensions from file
name.
	 * Default attribute may optionally be set to null (no file) or -1 (use a
default).
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.0
	 */
	protected function getOptions()
	{
		$options = array();

		$path = $this->directory;

		if (!is_dir($path))
		{
			$path = JPATH_ROOT . '/' . $path;
		}
		
		$path = JPath::clean($path);

		// Prepend some default options based on field attributes.
		if (!$this->hideNone)
		{
			$options[] = JHtml::_('select.option', '-1',
JText::alt('JOPTION_DO_NOT_USE',
preg_replace('/[^a-zA-Z0-9_\-]/', '_',
$this->fieldname)));
		}

		if (!$this->hideDefault)
		{
			$options[] = JHtml::_('select.option', '',
JText::alt('JOPTION_USE_DEFAULT',
preg_replace('/[^a-zA-Z0-9_\-]/', '_',
$this->fieldname)));
		}

		// Get a list of files in the search path with the given filter.
		$files = JFolder::files($path, $this->filter);

		// Build the options list from the list of files.
		if (is_array($files))
		{
			foreach ($files as $file)
			{
				// Check to see if the file is in the exclude mask.
				if ($this->exclude)
				{
					if (preg_match(chr(1) . $this->exclude . chr(1), $file))
					{
						continue;
					}
				}

				// If the extension is to be stripped, do it.
				if ($this->stripExt)
				{
					$file = JFile::stripExt($file);
				}

				$options[] = JHtml::_('select.option', $file, $file);
			}
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}
}
flexicontent.php000064400000002721151155626650007775 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_FlexiContent extends \RegularLabs\Library\FieldGroup
{
	public $type          = 'FlexiContent';
	public $default_group = 'Tags';

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['tags',
'types']))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getTags()
	{
		$query = $this->db->getQuery(true)
			->select('t.name as id, t.name')
			->from('#__flexicontent_tags AS t')
			->where('t.published = 1')
			->where('t.name != ' .
$this->db->quote(''))
			->group('t.name')
			->order('t.name');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list);
	}

	function getTypes()
	{
		$query = $this->db->getQuery(true)
			->select('t.id, t.name')
			->from('#__flexicontent_types AS t')
			->where('t.published = 1')
			->order('t.name, t.id');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list);
	}
}
form2content.php000064400000002172151155626650007713 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Form2Content extends \RegularLabs\Library\FieldGroup
{
	public $type          = 'Form2Content';
	public $default_group = 'Projects';

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['projects' =>
'project'], '', 'f2c'))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getProjects()
	{
		$query = $this->db->getQuery(true)
			->select('t.id, t.title as name')
			->from('#__f2c_project AS t')
			->where('t.published = 1')
			->order('t.title, t.id');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list);
	}
}
geo.php000064400000270140151155626650006047 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\Registry\Registry;
use RegularLabs\Library\Form as RL_Form;
use RegularLabs\Library\RegEx as RL_RegEx;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Geo extends \RegularLabs\Library\Field
{
	public $type = 'Geo';

	protected function getInput()
	{

		if ( ! is_array($this->value))
		{
			$this->value = explode(',', $this->value);
		}

		$size      = (int) $this->get('size');
		$multiple  = $this->get('multiple');
		$group     = $this->get('group', 'countries');
		$use_names = $this->get('use_names', false);

		return $this->selectListSimpleAjax(
			$this->type, $this->name, $this->value, $this->id,
			compact('size', 'multiple', 'group',
'use_names')
		);
	}

	function getAjaxRaw(Registry $attributes)
	{
		$name  = $attributes->get('name', $this->type);
		$id    = $attributes->get('id', strtolower($name));
		$value = $attributes->get('value', []);
		$size  = $attributes->get('size');

		$options = $this->getOptions(
			$attributes->get('group', 'countries'),
			(bool) $attributes->get('use_names', false)
		);

		return $this->selectListSimple($options, $name, $value, $id, $size,
true);
	}

	function getOptions($group = 'countries', $use_names =
'')
	{
		$options = [];
		foreach ($this->{$group} as $key => $val)
		{
			if ( ! $val)
			{
				$options[] = JHtml::_('select.option', '-',
'&nbsp;', 'value', 'text', true);
				continue;
			}

			if ($key[0] == '-')
			{
				$options[] = JHtml::_('select.option', '-', $val,
'value', 'text', true);
				continue;
			}

			$val       = RL_Form::prepareSelectItem($val);
			$options[] = JHtml::_('select.option', $use_names ? $val :
$key, $val);
		}

		return $options;
	}

	public $continents = [
		'AF' => 'Africa',
		'AS' => 'Asia',
		'EU' => 'Europe',
		'NA' => 'North America',
		'SA' => 'South America',
		'OC' => 'Oceania',
		'AN' => 'Antarctica',
	];

	public $countries = [
		'AF' => "Afghanistan",
		'AX' => "Aland Islands",
		'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",
		'GG' => "Guernsey",
		'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",
		'IM' => "Isle of Man",
		'IL' => "Israel",
		'IT' => "Italy",
		'JM' => "Jamaica",
		'JP' => "Japan",
		'JE' => "Jersey",
		'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",
		'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",
		'ME' => "Montenegro",
		'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",
		'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",
		'RS' => "Serbia",
		'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",
		'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' => "Vietnam",
		'VG' => "Virgin Islands, British",
		'VI' => "Virgin Islands, U.S.",
		'WF' => "Wallis and Futuna",
		'EH' => "Western Sahara",
		'YE' => "Yemen",
		'ZM' => "Zambia",
		'ZW' => "Zimbabwe",
	];

	public $regions = [
		'-AU'    => "Australia",
		'AU-ACT' => "Australia: Australian Capital
Territory",
		'AU-NSW' => "Australia: New South Wales",
		'AU-NT'  => "Australia: Northern Territory",
		'AU-QLD' => "Australia: Queensland",
		'AU-SA'  => "Australia: South Australia",
		'AU-TAS' => "Australia: Tasmania",
		'AU-VIC' => "Australia: Victoria",
		'AU-WA'  => "Australia: Western Australia",

		'--BE'   => "", '-BE' =>
"Belgium",
		'BE-VAN' => "Belgium: Antwerpen",
		'BE-WBR' => "Belgium: Brabant Wallon",
		'BE-BRU' => "Belgium: Brussels-Capital Region",
		'BE-WHT' => "Belgium: Hainaut",
		'BE-WLG' => "Belgium: Liege",
		'BE-VLI' => "Belgium: Limburg",
		'BE-WLX' => "Belgium: Luxembourg, Luxemburg",
		'BE-WNA' => "Belgium: Namur",
		'BE-VOV' => "Belgium: Oost-Vlaanderen",
		'BE-VBR' => "Belgium: Vlaams-Brabant",
		'BE-VWV' => "Belgium: West-Vlaanderen",

		'--BR'  => "", '-BR' =>
"Brazil",
		'BR-AC' => "Brazil: Acre",
		'BR-AL' => "Brazil: Alagoas",
		'BR-AP' => "Brazil: Amapá",
		'BR-AM' => "Brazil: Amazonas",
		'BR-BA' => "Brazil: Bahia",
		'BR-CE' => "Brazil: Ceará",
		'BR-DF' => "Brazil: Distrito Federal",
		'BR-ES' => "Brazil: Espírito Santo",
		'BR-FN' => "Brazil: Fernando de Noronha",
		'BR-GO' => "Brazil: Goiás",
		'BR-MA' => "Brazil: Maranhão",
		'BR-MT' => "Brazil: Mato Grosso",
		'BR-MS' => "Brazil: Mato Grosso do Sul",
		'BR-MG' => "Brazil: Minas Gerais",
		'BR-PR' => "Brazil: Paraná",
		'BR-PB' => "Brazil: Paraíba",
		'BR-PA' => "Brazil: Pará",
		'BR-PE' => "Brazil: Pernambuco",
		'BR-PI' => "Brazil: Piauí",
		'BR-RN' => "Brazil: Rio Grande do Norte",
		'BR-RS' => "Brazil: Rio Grande do Sul",
		'BR-RJ' => "Brazil: Rio de Janeiro",
		'BR-RO' => "Brazil: Rondônia",
		'BR-RR' => "Brazil: Roraima",
		'BR-SC' => "Brazil: Santa Catarina",
		'BR-SE' => "Brazil: Sergipe",
		'BR-SP' => "Brazil: São Paulo",
		'BR-TO' => "Brazil: Tocantins",

		'--BG'  => "", '-BG' =>
"Bulgaria",
		'BG-01' => "Bulgaria: Blagoevgrad",
		'BG-02' => "Bulgaria: Burgas",
		'BG-08' => "Bulgaria: Dobrich",
		'BG-07' => "Bulgaria: Gabrovo",
		'BG-26' => "Bulgaria: Haskovo",
		'BG-09' => "Bulgaria: Kardzhali",
		'BG-10' => "Bulgaria: Kyustendil",
		'BG-11' => "Bulgaria: Lovech",
		'BG-12' => "Bulgaria: Montana",
		'BG-13' => "Bulgaria: Pazardzhik",
		'BG-14' => "Bulgaria: Pernik",
		'BG-15' => "Bulgaria: Pleven",
		'BG-16' => "Bulgaria: Plovdiv",
		'BG-17' => "Bulgaria: Razgrad",
		'BG-18' => "Bulgaria: Ruse",
		'BG-27' => "Bulgaria: Shumen",
		'BG-19' => "Bulgaria: Silistra",
		'BG-20' => "Bulgaria: Sliven",
		'BG-21' => "Bulgaria: Smolyan",
		'BG-23' => "Bulgaria: Sofia",
		'BG-22' => "Bulgaria: Sofia-Grad",
		'BG-24' => "Bulgaria: Stara Zagora",
		'BG-25' => "Bulgaria: Targovishte",
		'BG-03' => "Bulgaria: Varna",
		'BG-04' => "Bulgaria: Veliko Tarnovo",
		'BG-05' => "Bulgaria: Vidin",
		'BG-06' => "Bulgaria: Vratsa",
		'BG-28' => "Bulgaria: Yambol",

		'--CA'  => "", '-CA' =>
"Canada",
		'CA-AB' => "Canada: Alberta",
		'CA-BC' => "Canada: British Columbia",
		'CA-MB' => "Canada: Manitoba",
		'CA-NB' => "Canada: New Brunswick",
		'CA-NL' => "Canada: Newfoundland and Labrador",
		'CA-NT' => "Canada: Northwest Territories",
		'CA-NS' => "Canada: Nova Scotia",
		'CA-NU' => "Canada: Nunavut",
		'CA-ON' => "Canada: Ontario",
		'CA-PE' => "Canada: Prince Edward Island",
		'CA-QC' => "Canada: Quebec",
		'CA-SK' => "Canada: Saskatchewan",
		'CA-YT' => "Canada: Yukon Territory",

		'--CN'  => "", '-CN' =>
"China",
		'CN-34' => "China: Anhui",
		'CN-92' => "China: Aomen (Macau)",
		'CN-11' => "China: Beijing",
		'CN-50' => "China: Chongqing",
		'CN-35' => "China: Fujian",
		'CN-62' => "China: Gansu",
		'CN-44' => "China: Guangdong",
		'CN-45' => "China: Guangxi",
		'CN-52' => "China: Guizhou",
		'CN-46' => "China: Hainan",
		'CN-13' => "China: Hebei",
		'CN-23' => "China: Heilongjiang",
		'CN-41' => "China: Henan",
		'CN-42' => "China: Hubei",
		'CN-43' => "China: Hunan",
		'CN-32' => "China: Jiangsu",
		'CN-36' => "China: Jiangxi",
		'CN-22' => "China: Jilin",
		'CN-21' => "China: Liaoning",
		'CN-15' => "China: Nei Mongol",
		'CN-64' => "China: Ningxia",
		'CN-63' => "China: Qinghai",
		'CN-61' => "China: Shaanxi",
		'CN-37' => "China: Shandong",
		'CN-31' => "China: Shanghai",
		'CN-14' => "China: Shanxi",
		'CN-51' => "China: Sichuan",
		'CN-71' => "China: Taiwan",
		'CN-12' => "China: Tianjin",
		'CN-91' => "China: Xianggang (Hong-Kong)",
		'CN-65' => "China: Xinjiang",
		'CN-54' => "China: Xizang",
		'CN-53' => "China: Yunnan",
		'CN-33' => "China: Zhejiang",

		'--CY'  => "", '-CY' =>
"Cyprus",
		'CY-04' => "Cyprus: Ammóchostos",
		'CY-06' => "Cyprus: Kerýneia",
		'CY-01' => "Cyprus: Lefkosía",
		'CY-02' => "Cyprus: Lemesós",
		'CY-03' => "Cyprus: Lárnaka",
		'CY-05' => "Cyprus: Páfos",

		'--CZ'   => "", '-CZ' => "Czech
Republic",
		'CZ-201' => "Czech Republic: Benešov",
		'CZ-202' => "Czech Republic: Beroun",
		'CZ-621' => "Czech Republic: Blansko",
		'CZ-622' => "Czech Republic: Brno-město",
		'CZ-623' => "Czech Republic: Brno-venkov",
		'CZ-801' => "Czech Republic: Bruntál",
		'CZ-624' => "Czech Republic: Břeclav",
		'CZ-411' => "Czech Republic: Cheb",
		'CZ-422' => "Czech Republic: Chomutov",
		'CZ-531' => "Czech Republic: Chrudim",
		'CZ-321' => "Czech Republic: Domažlice",
		'CZ-421' => "Czech Republic: Děčín",
		'CZ-802' => "Czech Republic: Frýdek Místek",
		'CZ-611' => "Czech Republic: Havlíčkův Brod",
		'CZ-625' => "Czech Republic: Hodonín",
		'CZ-521' => "Czech Republic: Hradec Králové",
		'CZ-512' => "Czech Republic: Jablonec nad Nisou",
		'CZ-711' => "Czech Republic: Jeseník",
		'CZ-612' => "Czech Republic: Jihlava",
		'CZ-JM'  => "Czech Republic: Jihomoravský kraj",
		'CZ-JC'  => "Czech Republic: Jihočeský kraj",
		'CZ-313' => "Czech Republic: Jindřichův Hradec",
		'CZ-522' => "Czech Republic: Jičín",
		'CZ-KA'  => "Czech Republic: Karlovarský kraj",
		'CZ-412' => "Czech Republic: Karlovy Vary",
		'CZ-803' => "Czech Republic: Karviná",
		'CZ-203' => "Czech Republic: Kladno",
		'CZ-322' => "Czech Republic: Klatovy",
		'CZ-204' => "Czech Republic: Kolín",
		'CZ-721' => "Czech Republic: Kromĕříž",
		'CZ-KR'  => "Czech Republic: Královéhradecký
kraj",
		'CZ-205' => "Czech Republic: Kutná Hora",
		'CZ-513' => "Czech Republic: Liberec",
		'CZ-LI'  => "Czech Republic: Liberecký kraj",
		'CZ-423' => "Czech Republic: Litoměřice",
		'CZ-424' => "Czech Republic: Louny",
		'CZ-207' => "Czech Republic: Mladá Boleslav",
		'CZ-MO'  => "Czech Republic: Moravskoslezský
kraj",
		'CZ-425' => "Czech Republic: Most",
		'CZ-206' => "Czech Republic: Mělník",
		'CZ-804' => "Czech Republic: Nový Jičín",
		'CZ-208' => "Czech Republic: Nymburk",
		'CZ-523' => "Czech Republic: Náchod",
		'CZ-712' => "Czech Republic: Olomouc",
		'CZ-OL'  => "Czech Republic: Olomoucký kraj",
		'CZ-805' => "Czech Republic: Opava",
		'CZ-806' => "Czech Republic: Ostrava město",
		'CZ-532' => "Czech Republic: Pardubice",
		'CZ-PA'  => "Czech Republic: Pardubický kraj",
		'CZ-613' => "Czech Republic: Pelhřimov",
		'CZ-324' => "Czech Republic: Plzeň jih",
		'CZ-323' => "Czech Republic: Plzeň město",
		'CZ-325' => "Czech Republic: Plzeň sever",
		'CZ-PL'  => "Czech Republic: Plzeňský kraj",
		'CZ-315' => "Czech Republic: Prachatice",
		'CZ-101' => "Czech Republic: Praha 1",
		'CZ-10A' => "Czech Republic: Praha 10",
		'CZ-10B' => "Czech Republic: Praha 11",
		'CZ-10C' => "Czech Republic: Praha 12",
		'CZ-10D' => "Czech Republic: Praha 13",
		'CZ-10E' => "Czech Republic: Praha 14",
		'CZ-10F' => "Czech Republic: Praha 15",
		'CZ-102' => "Czech Republic: Praha 2",
		'CZ-103' => "Czech Republic: Praha 3",
		'CZ-104' => "Czech Republic: Praha 4",
		'CZ-105' => "Czech Republic: Praha 5",
		'CZ-106' => "Czech Republic: Praha 6",
		'CZ-107' => "Czech Republic: Praha 7",
		'CZ-108' => "Czech Republic: Praha 8",
		'CZ-109' => "Czech Republic: Praha 9",
		'CZ-209' => "Czech Republic: Praha východ",
		'CZ-20A' => "Czech Republic: Praha západ",
		'CZ-PR'  => "Czech Republic: Praha, hlavní
město",
		'CZ-713' => "Czech Republic: Prostĕjov",
		'CZ-314' => "Czech Republic: Písek",
		'CZ-714' => "Czech Republic: Přerov",
		'CZ-20B' => "Czech Republic: Příbram",
		'CZ-20C' => "Czech Republic: Rakovník",
		'CZ-326' => "Czech Republic: Rokycany",
		'CZ-524' => "Czech Republic: Rychnov nad
Kněžnou",
		'CZ-514' => "Czech Republic: Semily",
		'CZ-413' => "Czech Republic: Sokolov",
		'CZ-316' => "Czech Republic: Strakonice",
		'CZ-ST'  => "Czech Republic: Středočeský kraj",
		'CZ-533' => "Czech Republic: Svitavy",
		'CZ-327' => "Czech Republic: Tachov",
		'CZ-426' => "Czech Republic: Teplice",
		'CZ-525' => "Czech Republic: Trutnov",
		'CZ-317' => "Czech Republic: Tábor",
		'CZ-614' => "Czech Republic: Třebíč",
		'CZ-722' => "Czech Republic: Uherské Hradištĕ",
		'CZ-723' => "Czech Republic: Vsetín",
		'CZ-VY'  => "Czech Republic: Vysočina",
		'CZ-626' => "Czech Republic: Vyškov",
		'CZ-724' => "Czech Republic: Zlín",
		'CZ-ZL'  => "Czech Republic: Zlínský kraj",
		'CZ-627' => "Czech Republic: Znojmo",
		'CZ-US'  => "Czech Republic: Ústecký kraj",
		'CZ-427' => "Czech Republic: Ústí nad Labem",
		'CZ-534' => "Czech Republic: Ústí nad Orlicí",
		'CZ-511' => "Czech Republic: Česká Lípa",
		'CZ-311' => "Czech Republic: České Budějovice",
		'CZ-312' => "Czech Republic: Český Krumlov",
		'CZ-715' => "Czech Republic: Šumperk",
		'CZ-615' => "Czech Republic: Žd’ár nad
Sázavou",

		'--DK'  => "", '-DK' =>
"Denmark",
		'DK-84' => "Denmark: Hovedstaden",
		'DK-82' => "Denmark: Midtjylland",
		'DK-81' => "Denmark: Nordjylland",
		'DK-85' => "Denmark: Sjælland",
		'DK-83' => "Denmark: Syddanmark",

		'--EG'   => "", '-EG' =>
"Egypt",
		'EG-DK'  => "Egypt: Ad Daqahlīyah",
		'EG-BA'  => "Egypt: Al Bahr al Ahmar",
		'EG-BH'  => "Egypt: Al Buhayrah",
		'EG-FYM' => "Egypt: Al Fayyūm",
		'EG-GH'  => "Egypt: Al Gharbīyah",
		'EG-ALX' => "Egypt: Al Iskandarīyah",
		'EG-IS'  => "Egypt: Al Ismā`īlīyah",
		'EG-GZ'  => "Egypt: Al Jīzah",
		'EG-MN'  => "Egypt: Al Minyā",
		'EG-MNF' => "Egypt: Al Minūfīyah",
		'EG-KB'  => "Egypt: Al Qalyūbīyah",
		'EG-C'   => "Egypt: Al Qāhirah",
		'EG-WAD' => "Egypt: Al Wādī al Jadīd",
		'EG-SUZ' => "Egypt: As Suways",
		'EG-SU'  => "Egypt: As Sādis min Uktūbar",
		'EG-SHR' => "Egypt: Ash Sharqīyah",
		'EG-ASN' => "Egypt: Aswān",
		'EG-AST' => "Egypt: Asyūt",
		'EG-BNS' => "Egypt: Banī Suwayf",
		'EG-PTS' => "Egypt: Būr Sa`īd",
		'EG-DT'  => "Egypt: Dumyāt",
		'EG-JS'  => "Egypt: Janūb Sīnā'",
		'EG-KFS' => "Egypt: Kafr ash Shaykh",
		'EG-MT'  => "Egypt: Matrūh",
		'EG-KN'  => "Egypt: Qinā",
		'EG-SIN' => "Egypt: Shamal Sīnā'",
		'EG-SHG' => "Egypt: Sūhāj",
		'EG-HU'  => "Egypt: Ḩulwān",

		'--FR'  => "", '-FR' =>
"France",
		'FR-01' => "France: Ain",
		'FR-02' => "France: Aisne",
		'FR-03' => "France: Allier",
		'FR-06' => "France: Alpes-Maritimes",
		'FR-04' => "France: Alpes-de-Haute-Provence",
		'FR-A'  => "France: Alsace",
		'FR-B'  => "France: Aquitaine",
		'FR-08' => "France: Ardennes",
		'FR-07' => "France: Ardèche",
		'FR-09' => "France: Ariège",
		'FR-10' => "France: Aube",
		'FR-11' => "France: Aude",
		'FR-C'  => "France: Auvergne",
		'FR-12' => "France: Aveyron",
		'FR-67' => "France: Bas-Rhin",
		'FR-P'  => "France: Basse-Normandie",
		'FR-13' => "France: Bouches-du-Rhône",
		'FR-D'  => "France: Bourgogne",
		'FR-E'  => "France: Bretagne",
		'FR-14' => "France: Calvados",
		'FR-15' => "France: Cantal",
		'FR-F'  => "France: Centre",
		'FR-G'  => "France: Champagne-Ardenne",
		'FR-16' => "France: Charente",
		'FR-17' => "France: Charente-Maritime",
		'FR-18' => "France: Cher",
		'FR-CP' => "France: Clipperton",
		'FR-19' => "France: Corrèze",
		'FR-H'  => "France: Corse",
		'FR-2A' => "France: Corse-du-Sud",
		'FR-23' => "France: Creuse",
		'FR-21' => "France: Côte-d'Or",
		'FR-22' => "France: Côtes-d'Armor",
		'FR-79' => "France: Deux-Sèvres",
		'FR-24' => "France: Dordogne",
		'FR-25' => "France: Doubs",
		'FR-26' => "France: Drôme",
		'FR-91' => "France: Essonne",
		'FR-27' => "France: Eure",
		'FR-28' => "France: Eure-et-Loir",
		'FR-29' => "France: Finistère",
		'FR-I'  => "France: Franche-Comté",
		'FR-30' => "France: Gard",
		'FR-32' => "France: Gers",
		'FR-33' => "France: Gironde",
		'FR-GP' => "France: Guadeloupe",
		'FR-GF' => "France: Guyane",
		'FR-68' => "France: Haut-Rhin",
		'FR-2B' => "France: Haute-Corse",
		'FR-31' => "France: Haute-Garonne",
		'FR-43' => "France: Haute-Loire",
		'FR-52' => "France: Haute-Marne",
		'FR-Q'  => "France: Haute-Normandie",
		'FR-74' => "France: Haute-Savoie",
		'FR-70' => "France: Haute-Saône",
		'FR-87' => "France: Haute-Vienne",
		'FR-05' => "France: Hautes-Alpes",
		'FR-65' => "France: Hautes-Pyrénées",
		'FR-92' => "France: Hauts-de-Seine",
		'FR-34' => "France: Hérault",
		'FR-35' => "France: Ille-et-Vilaine",
		'FR-36' => "France: Indre",
		'FR-37' => "France: Indre-et-Loire",
		'FR-38' => "France: Isère",
		'FR-39' => "France: Jura",
		'FR-40' => "France: Landes",
		'FR-K'  => "France: Languedoc-Roussillon",
		'FR-L'  => "France: Limousin",
		'FR-41' => "France: Loir-et-Cher",
		'FR-42' => "France: Loire",
		'FR-44' => "France: Loire-Atlantique",
		'FR-45' => "France: Loiret",
		'FR-M'  => "France: Lorraine",
		'FR-46' => "France: Lot",
		'FR-47' => "France: Lot-et-Garonne",
		'FR-48' => "France: Lozère",
		'FR-49' => "France: Maine-et-Loire",
		'FR-50' => "France: Manche",
		'FR-51' => "France: Marne",
		'FR-MQ' => "France: Martinique",
		'FR-53' => "France: Mayenne",
		'FR-YT' => "France: Mayotte",
		'FR-54' => "France: Meurthe-et-Moselle",
		'FR-55' => "France: Meuse",
		'FR-N'  => "France: Midi-Pyrénées",
		'FR-56' => "France: Morbihan",
		'FR-57' => "France: Moselle",
		'FR-58' => "France: Nièvre",
		'FR-59' => "France: Nord",
		'FR-O'  => "France: Nord - Pas-de-Calais",
		'FR-NC' => "France: Nouvelle-Calédonie",
		'FR-60' => "France: Oise",
		'FR-61' => "France: Orne",
		'FR-75' => "France: Paris",
		'FR-62' => "France: Pas-de-Calais",
		'FR-R'  => "France: Pays de la Loire",
		'FR-S'  => "France: Picardie",
		'FR-T'  => "France: Poitou-Charentes",
		'FR-PF' => "France: Polynésie française",
		'FR-U'  => "France: Provence-Alpes-Côte
d'Azur",
		'FR-63' => "France: Puy-de-Dôme",
		'FR-64' => "France: Pyrénées-Atlantiques",
		'FR-66' => "France: Pyrénées-Orientales",
		'FR-69' => "France: Rhône",
		'FR-V'  => "France: Rhône-Alpes",
		'FR-RE' => "France: Réunion",
		'FR-BL' => "France: Saint-Barthélemy",
		'FR-MF' => "France: Saint-Martin",
		'FR-PM' => "France: Saint-Pierre-et-Miquelon",
		'FR-72' => "France: Sarthe",
		'FR-73' => "France: Savoie",
		'FR-71' => "France: Saône-et-Loire",
		'FR-76' => "France: Seine-Maritime",
		'FR-93' => "France: Seine-Saint-Denis",
		'FR-77' => "France: Seine-et-Marne",
		'FR-80' => "France: Somme",
		'FR-81' => "France: Tarn",
		'FR-82' => "France: Tarn-et-Garonne",
		'FR-TF' => "France: Terres australes françaises",
		'FR-90' => "France: Territoire de Belfort",
		'FR-95' => "France: Val d'Oise",
		'FR-94' => "France: Val-de-Marne",
		'FR-83' => "France: Var",
		'FR-84' => "France: Vaucluse",
		'FR-85' => "France: Vendée",
		'FR-86' => "France: Vienne",
		'FR-88' => "France: Vosges",
		'FR-WF' => "France: Wallis-et-Futuna",
		'FR-89' => "France: Yonne",
		'FR-78' => "France: Yvelines",
		'FR-J'  => "France: Île-de-France",

		'--DE'  => "", '-DE' =>
"Germany",
		'DE-BW' => "Germany: Baden-Württemberg",
		'DE-BY' => "Germany: Bayern",
		'DE-BE' => "Germany: Berlin",
		'DE-BB' => "Germany: Brandenburg",
		'DE-HB' => "Germany: Bremen",
		'DE-HH' => "Germany: Hamburg",
		'DE-HE' => "Germany: Hessen",
		'DE-MV' => "Germany: Mecklenburg-Vorpommern",
		'DE-NI' => "Germany: Niedersachsen",
		'DE-NW' => "Germany: Nordrhein-Westfalen",
		'DE-RP' => "Germany: Rheinland-Pfalz",
		'DE-SL' => "Germany: Saarland",
		'DE-SN' => "Germany: Sachsen",
		'DE-ST' => "Germany: Sachsen-Anhalt",
		'DE-SH' => "Germany: Schleswig-Holstein",
		'DE-TH' => "Germany: Thüringen",

		'--GR'  => "", '-GR' =>
"Greece",
		'GR-13' => "Greece: Achaïa",
		'GR-69' => "Greece: Agio Oros",
		'GR-01' => "Greece: Aitolia kai Akarnania",
		'GR-A'  => "Greece: Anatoliki Makedonia kai
Thraki",
		'GR-11' => "Greece: Argolida",
		'GR-12' => "Greece: Arkadia",
		'GR-31' => "Greece: Arta",
		'GR-A1' => "Greece: Attiki",
		'GR-64' => "Greece: Chalkidiki",
		'GR-94' => "Greece: Chania",
		'GR-85' => "Greece: Chios",
		'GR-81' => "Greece: Dodekanisos",
		'GR-52' => "Greece: Drama",
		'GR-G'  => "Greece: Dytiki Ellada",
		'GR-C'  => "Greece: Dytiki Makedonia",
		'GR-71' => "Greece: Evros",
		'GR-05' => "Greece: Evrytania",
		'GR-04' => "Greece: Evvoias",
		'GR-63' => "Greece: Florina",
		'GR-07' => "Greece: Fokida",
		'GR-06' => "Greece: Fthiotida",
		'GR-51' => "Greece: Grevena",
		'GR-14' => "Greece: Ileia",
		'GR-53' => "Greece: Imathia",
		'GR-33' => "Greece: Ioannina",
		'GR-F'  => "Greece: Ionia Nisia",
		'GR-D'  => "Greece: Ipeiros",
		'GR-91' => "Greece: Irakleio",
		'GR-41' => "Greece: Karditsa",
		'GR-56' => "Greece: Kastoria",
		'GR-55' => "Greece: Kavala",
		'GR-23' => "Greece: Kefallonia",
		'GR-B'  => "Greece: Kentriki Makedonia",
		'GR-22' => "Greece: Kerkyra",
		'GR-57' => "Greece: Kilkis",
		'GR-15' => "Greece: Korinthia",
		'GR-58' => "Greece: Kozani",
		'GR-M'  => "Greece: Kriti",
		'GR-82' => "Greece: Kyklades",
		'GR-16' => "Greece: Lakonia",
		'GR-42' => "Greece: Larisa",
		'GR-92' => "Greece: Lasithi",
		'GR-24' => "Greece: Lefkada",
		'GR-83' => "Greece: Lesvos",
		'GR-43' => "Greece: Magnisia",
		'GR-17' => "Greece: Messinia",
		'GR-L'  => "Greece: Notio Aigaio",
		'GR-59' => "Greece: Pella",
		'GR-J'  => "Greece: Peloponnisos",
		'GR-61' => "Greece: Pieria",
		'GR-34' => "Greece: Preveza",
		'GR-93' => "Greece: Rethymno",
		'GR-73' => "Greece: Rodopi",
		'GR-84' => "Greece: Samos",
		'GR-62' => "Greece: Serres",
		'GR-H'  => "Greece: Sterea Ellada",
		'GR-32' => "Greece: Thesprotia",
		'GR-E'  => "Greece: Thessalia",
		'GR-54' => "Greece: Thessaloniki",
		'GR-44' => "Greece: Trikala",
		'GR-03' => "Greece: Voiotia",
		'GR-K'  => "Greece: Voreio Aigaio",
		'GR-72' => "Greece: Xanthi",
		'GR-21' => "Greece: Zakynthos",

		'--HU'  => "", '-HU' =>
"Hungary",
		'HU-BA' => "Hungary: Baranya",
		'HU-BZ' => "Hungary: Borsod-Abaúj-Zemplén",
		'HU-BU' => "Hungary: Budapest",
		'HU-BK' => "Hungary: Bács-Kiskun",
		'HU-BE' => "Hungary: Békés",
		'HU-BC' => "Hungary: Békéscsaba",
		'HU-CS' => "Hungary: Csongrád",
		'HU-DE' => "Hungary: Debrecen",
		'HU-DU' => "Hungary: Dunaújváros",
		'HU-EG' => "Hungary: Eger",
		'HU-FE' => "Hungary: Fejér",
		'HU-GY' => "Hungary: Győr",
		'HU-GS' => "Hungary: Győr-Moson-Sopron",
		'HU-HB' => "Hungary: Hajdú-Bihar",
		'HU-HE' => "Hungary: Heves",
		'HU-HV' => "Hungary: Hódmezővásárhely",
		'HU-JN' => "Hungary: Jász-Nagykun-Szolnok",
		'HU-KV' => "Hungary: Kaposvár",
		'HU-KM' => "Hungary: Kecskemét",
		'HU-KE' => "Hungary: Komárom-Esztergom",
		'HU-MI' => "Hungary: Miskolc",
		'HU-NK' => "Hungary: Nagykanizsa",
		'HU-NY' => "Hungary: Nyíregyháza",
		'HU-NO' => "Hungary: Nógrád",
		'HU-PE' => "Hungary: Pest",
		'HU-PS' => "Hungary: Pécs",
		'HU-ST' => "Hungary: Salgótarján",
		'HU-SO' => "Hungary: Somogy",
		'HU-SN' => "Hungary: Sopron",
		'HU-SZ' => "Hungary: Szabolcs-Szatmár-Bereg",
		'HU-SD' => "Hungary: Szeged",
		'HU-SS' => "Hungary: Szekszárd",
		'HU-SK' => "Hungary: Szolnok",
		'HU-SH' => "Hungary: Szombathely",
		'HU-SF' => "Hungary: Székesfehérvár",
		'HU-TB' => "Hungary: Tatabánya",
		'HU-TO' => "Hungary: Tolna",
		'HU-VA' => "Hungary: Vas",
		'HU-VM' => "Hungary: Veszprém",
		'HU-VE' => "Hungary: Veszprém (county)",
		'HU-ZA' => "Hungary: Zala",
		'HU-ZE' => "Hungary: Zalaegerszeg",
		'HU-ER' => "Hungary: Érd",

		'--IS' => "", '-IS' =>
"Iceland",
		'IS-7' => "Iceland: Austurland",
		'IS-1' => "Iceland: Höfuðborgarsvæðið",
		'IS-6' => "Iceland: Norðurland eystra",
		'IS-5' => "Iceland: Norðurland vestra",
		'IS-0' => "Iceland: Reykjavík",
		'IS-8' => "Iceland: Suðurland",
		'IS-2' => "Iceland: Suðurnes",
		'IS-4' => "Iceland: Vestfirðir",
		'IS-3' => "Iceland: Vesturland",

		'--IN'  => "", '-IN' =>
"India",
		'IN-AN' => "India: Andaman and Nicobar Islands",
		'IN-AP' => "India: Andhra Pradesh",
		'IN-AR' => "India: Arunāchal Pradesh",
		'IN-AS' => "India: Assam",
		'IN-BR' => "India: Bihār",
		'IN-CH' => "India: Chandīgarh",
		'IN-CT' => "India: Chhattīsgarh",
		'IN-DD' => "India: Damān and Diu",
		'IN-DL' => "India: Delhi",
		'IN-DN' => "India: Dādra and Nagar Haveli",
		'IN-GA' => "India: Goa",
		'IN-GJ' => "India: Gujarāt",
		'IN-HR' => "India: Haryāna",
		'IN-HP' => "India: Himāchal Pradesh",
		'IN-JK' => "India: Jammu and Kashmīr",
		'IN-JH' => "India: Jharkhand",
		'IN-KA' => "India: Karnātaka",
		'IN-KL' => "India: Kerala",
		'IN-LD' => "India: Lakshadweep",
		'IN-MP' => "India: Madhya Pradesh",
		'IN-MH' => "India: Mahārāshtra",
		'IN-MN' => "India: Manipur",
		'IN-ML' => "India: Meghālaya",
		'IN-MZ' => "India: Mizoram",
		'IN-NL' => "India: Nāgāland",
		'IN-OR' => "India: Orissa",
		'IN-PY' => "India: Pondicherry",
		'IN-PB' => "India: Punjab",
		'IN-RJ' => "India: Rājasthān",
		'IN-SK' => "India: Sikkim",
		'IN-TN' => "India: Tamil Nādu",
		'IN-TR' => "India: Tripura",
		'IN-UP' => "India: Uttar Pradesh",
		'IN-UL' => "India: Uttaranchal",
		'IN-WB' => "India: West Bengal",

		'--ID'  => "", '-ID' =>
"Indonesia",
		'ID-AC' => "Indonesia: Aceh",
		'ID-BA' => "Indonesia: Bali",
		'ID-BB' => "Indonesia: Bangka Belitung",
		'ID-BT' => "Indonesia: Banten",
		'ID-BE' => "Indonesia: Bengkulu",
		'ID-GO' => "Indonesia: Gorontalo",
		'ID-JK' => "Indonesia: Jakarta Raya",
		'ID-JA' => "Indonesia: Jambi",
		'ID-JW' => "Indonesia: Jawa",
		'ID-JB' => "Indonesia: Jawa Barat",
		'ID-JT' => "Indonesia: Jawa Tengah",
		'ID-JI' => "Indonesia: Jawa Timur",
		'ID-KA' => "Indonesia: Kalimantan",
		'ID-KB' => "Indonesia: Kalimantan Barat",
		'ID-KS' => "Indonesia: Kalimantan Selatan",
		'ID-KT' => "Indonesia: Kalimantan Tengah",
		'ID-KI' => "Indonesia: Kalimantan Timur",
		'ID-KR' => "Indonesia: Kepulauan Riau",
		'ID-LA' => "Indonesia: Lampung",
		'ID-MA' => "Indonesia: Maluku",
		'ID-MU' => "Indonesia: Maluku Utara",
		'ID-NU' => "Indonesia: Nusa Tenggara",
		'ID-NB' => "Indonesia: Nusa Tenggara Barat",
		'ID-NT' => "Indonesia: Nusa Tenggara Timur",
		'ID-PA' => "Indonesia: Papua",
		'ID-PB' => "Indonesia: Papua Barat",
		'ID-RI' => "Indonesia: Riau",
		'ID-SL' => "Indonesia: Sulawesi",
		'ID-SR' => "Indonesia: Sulawesi Barat",
		'ID-SN' => "Indonesia: Sulawesi Selatan",
		'ID-ST' => "Indonesia: Sulawesi Tengah",
		'ID-SG' => "Indonesia: Sulawesi Tenggara",
		'ID-SA' => "Indonesia: Sulawesi Utara",
		'ID-SM' => "Indonesia: Sumatera",
		'ID-SU' => "Indonesia: Sumatera Utara",
		'ID-SB' => "Indonesia: Sumatra Barat",
		'ID-SS' => "Indonesia: Sumatra Selatan",
		'ID-YO' => "Indonesia: Yogyakarta",

		'--IE'  => "", '-IE' =>
"Ireland",
		'IE-CW' => "Ireland: Carlow",
		'IE-CN' => "Ireland: Cavan",
		'IE-CE' => "Ireland: Clare",
		'IE-C'  => "Ireland: Connacht",
		'IE-C'  => "Ireland: Cork",
		'IE-DL' => "Ireland: Donegal",
		'IE-D'  => "Ireland: Dublin",
		'IE-G'  => "Ireland: Galway",
		'IE-KY' => "Ireland: Kerry",
		'IE-KE' => "Ireland: Kildare",
		'IE-KK' => "Ireland: Kilkenny",
		'IE-LS' => "Ireland: Laois",
		'IE-L'  => "Ireland: Leinster",
		'IE-LM' => "Ireland: Leitrim",
		'IE-LK' => "Ireland: Limerick",
		'IE-LD' => "Ireland: Longford",
		'IE-LH' => "Ireland: Louth",
		'IE-MO' => "Ireland: Mayo",
		'IE-MH' => "Ireland: Meath",
		'IE-MN' => "Ireland: Monaghan",
		'IE-M'  => "Ireland: Munster",
		'IE-OY' => "Ireland: Offaly",
		'IE-RN' => "Ireland: Roscommon",
		'IE-SO' => "Ireland: Sligo",
		'IE-TA' => "Ireland: Tipperary",
		'IE-U'  => "Ireland: Ulster",
		'IE-WD' => "Ireland: Waterford",
		'IE-WH' => "Ireland: Westmeath",
		'IE-WX' => "Ireland: Wexford",
		'IE-WW' => "Ireland: Wicklow",

		'--IL'  => "", '-IL' =>
"Israel",
		'IL-D'  => "Israel: HaDarom",
		'IL-M'  => "Israel: HaMerkaz",
		'IL-Z'  => "Israel: HaZafon",
		'IL-HA' => "Israel: Hefa",
		'IL-TA' => "Israel: Tel-Aviv",
		'IL-JM' => "Israel: Yerushalayim Al Quds",

		'--IT'  => "", '-IT' =>
"Italy",
		'IT-65' => "Italy: Abruzzo",
		'IT-AG' => "Italy: Agrigento",
		'IT-AL' => "Italy: Alessandria",
		'IT-AN' => "Italy: Ancona",
		'IT-AO' => "Italy: Aosta",
		'IT-AR' => "Italy: Arezzo",
		'IT-AP' => "Italy: Ascoli Piceno",
		'IT-AT' => "Italy: Asti",
		'IT-AV' => "Italy: Avellino",
		'IT-BA' => "Italy: Bari",
		'IT-BT' => "Italy: Barletta-Andria-Trani",
		'IT-77' => "Italy: Basilicata",
		'IT-BL' => "Italy: Belluno",
		'IT-BN' => "Italy: Benevento",
		'IT-BG' => "Italy: Bergamo",
		'IT-BI' => "Italy: Biella",
		'IT-BO' => "Italy: Bologna",
		'IT-BZ' => "Italy: Bolzano",
		'IT-BS' => "Italy: Brescia",
		'IT-BR' => "Italy: Brindisi",
		'IT-CA' => "Italy: Cagliari",
		'IT-78' => "Italy: Calabria",
		'IT-CL' => "Italy: Caltanissetta",
		'IT-72' => "Italy: Campania",
		'IT-CB' => "Italy: Campobasso",
		'IT-CI' => "Italy: Carbonia-Iglesias",
		'IT-CE' => "Italy: Caserta",
		'IT-CT' => "Italy: Catania",
		'IT-CZ' => "Italy: Catanzaro",
		'IT-CH' => "Italy: Chieti",
		'IT-CO' => "Italy: Como",
		'IT-CS' => "Italy: Cosenza",
		'IT-CR' => "Italy: Cremona",
		'IT-KR' => "Italy: Crotone",
		'IT-CN' => "Italy: Cuneo",
		'IT-45' => "Italy: Emilia-Romagna",
		'IT-EN' => "Italy: Enna",
		'IT-FM' => "Italy: Fermo",
		'IT-FE' => "Italy: Ferrara",
		'IT-FI' => "Italy: Firenze",
		'IT-FG' => "Italy: Foggia",
		'IT-FC' => "Italy: Forlì-Cesena",
		'IT-36' => "Italy: Friuli-Venezia Giulia",
		'IT-FR' => "Italy: Frosinone",
		'IT-GE' => "Italy: Genova",
		'IT-GO' => "Italy: Gorizia",
		'IT-GR' => "Italy: Grosseto",
		'IT-IM' => "Italy: Imperia",
		'IT-IS' => "Italy: Isernia",
		'IT-AQ' => "Italy: L'Aquila",
		'IT-SP' => "Italy: La Spezia",
		'IT-LT' => "Italy: Latina",
		'IT-62' => "Italy: Lazio",
		'IT-LE' => "Italy: Lecce",
		'IT-LC' => "Italy: Lecco",
		'IT-42' => "Italy: Liguria",
		'IT-LI' => "Italy: Livorno",
		'IT-LO' => "Italy: Lodi",
		'IT-25' => "Italy: Lombardia",
		'IT-LU' => "Italy: Lucca",
		'IT-MC' => "Italy: Macerata",
		'IT-MN' => "Italy: Mantova",
		'IT-57' => "Italy: Marche",
		'IT-MS' => "Italy: Massa-Carrara",
		'IT-MT' => "Italy: Matera",
		'IT-VS' => "Italy: Medio Campidano",
		'IT-ME' => "Italy: Messina",
		'IT-MI' => "Italy: Milano",
		'IT-MO' => "Italy: Modena",
		'IT-67' => "Italy: Molise",
		'IT-MB' => "Italy: Monza e Brianza",
		'IT-NA' => "Italy: Napoli",
		'IT-NO' => "Italy: Novara",
		'IT-NU' => "Italy: Nuoro",
		'IT-OG' => "Italy: Ogliastra",
		'IT-OT' => "Italy: Olbia-Tempio",
		'IT-OR' => "Italy: Oristano",
		'IT-PD' => "Italy: Padova",
		'IT-PA' => "Italy: Palermo",
		'IT-PR' => "Italy: Parma",
		'IT-PV' => "Italy: Pavia",
		'IT-PG' => "Italy: Perugia",
		'IT-PU' => "Italy: Pesaro e Urbino",
		'IT-PE' => "Italy: Pescara",
		'IT-PC' => "Italy: Piacenza",
		'IT-21' => "Italy: Piemonte",
		'IT-PI' => "Italy: Pisa",
		'IT-PT' => "Italy: Pistoia",
		'IT-PN' => "Italy: Pordenone",
		'IT-PZ' => "Italy: Potenza",
		'IT-PO' => "Italy: Prato",
		'IT-75' => "Italy: Puglia",
		'IT-RG' => "Italy: Ragusa",
		'IT-RA' => "Italy: Ravenna",
		'IT-RC' => "Italy: Reggio Calabria",
		'IT-RE' => "Italy: Reggio Emilia",
		'IT-RI' => "Italy: Rieti",
		'IT-RN' => "Italy: Rimini",
		'IT-RM' => "Italy: Roma",
		'IT-RO' => "Italy: Rovigo",
		'IT-SA' => "Italy: Salerno",
		'IT-88' => "Italy: Sardegna",
		'IT-SS' => "Italy: Sassari",
		'IT-SV' => "Italy: Savona",
		'IT-82' => "Italy: Sicilia",
		'IT-SI' => "Italy: Siena",
		'IT-SR' => "Italy: Siracusa",
		'IT-SO' => "Italy: Sondrio",
		'IT-TA' => "Italy: Taranto",
		'IT-TE' => "Italy: Teramo",
		'IT-TR' => "Italy: Terni",
		'IT-TO' => "Italy: Torino",
		'IT-52' => "Italy: Toscana",
		'IT-TP' => "Italy: Trapani",
		'IT-32' => "Italy: Trentino-Alto Adige",
		'IT-TN' => "Italy: Trento",
		'IT-TV' => "Italy: Treviso",
		'IT-TS' => "Italy: Trieste",
		'IT-UD' => "Italy: Udine",
		'IT-55' => "Italy: Umbria",
		'IT-23' => "Italy: Valle d'Aosta",
		'IT-VA' => "Italy: Varese",
		'IT-34' => "Italy: Veneto",
		'IT-VE' => "Italy: Venezia",
		'IT-VB' => "Italy: Verbano-Cusio-Ossola",
		'IT-VC' => "Italy: Vercelli",
		'IT-VR' => "Italy: Verona",
		'IT-VV' => "Italy: Vibo Valentia",
		'IT-VI' => "Italy: Vicenza",
		'IT-VT' => "Italy: Viterbo",

		'--JP'  => "", '-JP' =>
"Japan",
		'JP-23' => "Japan: Aichi",
		'JP-05' => "Japan: Akita",
		'JP-02' => "Japan: Aomori",
		'JP-12' => "Japan: Chiba",
		'JP-38' => "Japan: Ehime",
		'JP-18' => "Japan: Fukui",
		'JP-40' => "Japan: Fukuoka",
		'JP-07' => "Japan: Fukushima",
		'JP-21' => "Japan: Gifu",
		'JP-10' => "Japan: Gunma",
		'JP-34' => "Japan: Hiroshima",
		'JP-01' => "Japan: Hokkaido",
		'JP-28' => "Japan: Hyogo",
		'JP-08' => "Japan: Ibaraki",
		'JP-17' => "Japan: Ishikawa",
		'JP-03' => "Japan: Iwate",
		'JP-37' => "Japan: Kagawa",
		'JP-46' => "Japan: Kagoshima",
		'JP-14' => "Japan: Kanagawa",
		'JP-39' => "Japan: Kochi",
		'JP-43' => "Japan: Kumamoto",
		'JP-26' => "Japan: Kyoto",
		'JP-24' => "Japan: Mie",
		'JP-04' => "Japan: Miyagi",
		'JP-45' => "Japan: Miyazaki",
		'JP-20' => "Japan: Nagano",
		'JP-42' => "Japan: Nagasaki",
		'JP-29' => "Japan: Nara",
		'JP-15' => "Japan: Niigata",
		'JP-44' => "Japan: Oita",
		'JP-33' => "Japan: Okayama",
		'JP-47' => "Japan: Okinawa",
		'JP-27' => "Japan: Osaka",
		'JP-41' => "Japan: Saga",
		'JP-11' => "Japan: Saitama",
		'JP-25' => "Japan: Shiga",
		'JP-32' => "Japan: Shimane",
		'JP-22' => "Japan: Shizuoka",
		'JP-09' => "Japan: Tochigi",
		'JP-36' => "Japan: Tokushima",
		'JP-13' => "Japan: Tokyo",
		'JP-31' => "Japan: Tottori",
		'JP-16' => "Japan: Toyama",
		'JP-30' => "Japan: Wakayama",
		'JP-06' => "Japan: Yamagata",
		'JP-35' => "Japan: Yamaguchi",
		'JP-19' => "Japan: Yamanashi",

		'--MX'   => "", '-MX' =>
"Mexico",
		'MX-AGU' => "Mexico: Aguascalientes",
		'MX-BCN' => "Mexico: Baja California",
		'MX-BCS' => "Mexico: Baja California Sur",
		'MX-CAM' => "Mexico: Campeche",
		'MX-CHP' => "Mexico: Chiapas",
		'MX-CHH' => "Mexico: Chihuahua",
		'MX-COA' => "Mexico: Coahuila",
		'MX-COL' => "Mexico: Colima",
		'MX-DIF' => "Mexico: Distrito Federal (Mexico
City)",
		'MX-DUR' => "Mexico: Durango",
		'MX-GUA' => "Mexico: Guanajuato",
		'MX-GRO' => "Mexico: Guerrero",
		'MX-HID' => "Mexico: Hidalgo",
		'MX-JAL' => "Mexico: Jalisco",
		'MX-MIC' => "Mexico: Michoacán",
		'MX-MOR' => "Mexico: Morelos",
		'MX-MEX' => "Mexico: México",
		'MX-NAY' => "Mexico: Nayarit",
		'MX-NLE' => "Mexico: Nuevo León",
		'MX-OAX' => "Mexico: Oaxaca",
		'MX-PUE' => "Mexico: Puebla",
		'MX-QUE' => "Mexico: Querétaro",
		'MX-ROO' => "Mexico: Quintana Roo",
		'MX-SLP' => "Mexico: San Luis Potosí",
		'MX-SIN' => "Mexico: Sinaloa",
		'MX-SON' => "Mexico: Sonora",
		'MX-TAB' => "Mexico: Tabasco",
		'MX-TAM' => "Mexico: Tamaulipas",
		'MX-TLA' => "Mexico: Tlaxcala",
		'MX-VER' => "Mexico: Veracruz",
		'MX-YUC' => "Mexico: Yucatán",
		'MX-ZAC' => "Mexico: Zacatecas",

		'--MA'   => "", '-MA' =>
"Morocco",
		'MA-AGD' => "Morocco: Agadir-Ida-Outanane",
		'MA-HAO' => "Morocco: Al Haouz",
		'MA-HOC' => "Morocco: Al Hoceïma",
		'MA-AOU' => "Morocco: Aousserd",
		'MA-ASZ' => "Morocco: Assa-Zag",
		'MA-AZI' => "Morocco: Azilal",
		'MA-BES' => "Morocco: Ben Slimane",
		'MA-BEM' => "Morocco: Beni Mellal",
		'MA-BER' => "Morocco: Berkane",
		'MA-BOD' => "Morocco: Boujdour (EH)",
		'MA-BOM' => "Morocco: Boulemane",
		'MA-CAS' => "Morocco: Casablanca [Dar el Beïda]",
		'MA-09'  => "Morocco: Chaouia-Ouardigha",
		'MA-CHE' => "Morocco: Chefchaouen",
		'MA-CHI' => "Morocco: Chichaoua",
		'MA-CHT' => "Morocco: Chtouka-Ait Baha",
		'MA-10'  => "Morocco: Doukhala-Abda",
		'MA-HAJ' => "Morocco: El Hajeb",
		'MA-JDI' => "Morocco: El Jadida",
		'MA-ERR' => "Morocco: Errachidia",
		'MA-ESM' => "Morocco: Es Smara (EH)",
		'MA-ESI' => "Morocco: Essaouira",
		'MA-FAH' => "Morocco: Fahs-Beni Makada",
		'MA-FIG' => "Morocco: Figuig",
		'MA-05'  => "Morocco: Fès-Boulemane",
		'MA-FES' => "Morocco: Fès-Dar-Dbibegh",
		'MA-02'  => "Morocco: Gharb-Chrarda-Beni Hssen",
		'MA-08'  => "Morocco: Grand Casablanca",
		'MA-GUE' => "Morocco: Guelmim",
		'MA-14'  => "Morocco: Guelmim-Es Smara",
		'MA-IFR' => "Morocco: Ifrane",
		'MA-INE' => "Morocco: Inezgane-Ait Melloul",
		'MA-JRA' => "Morocco: Jrada",
		'MA-KES' => "Morocco: Kelaat es Sraghna",
		'MA-KHE' => "Morocco: Khemisaet",
		'MA-KHN' => "Morocco: Khenifra",
		'MA-KHO' => "Morocco: Khouribga",
		'MA-KEN' => "Morocco: Kénitra",
		'MA-04'  => "Morocco: L'Oriental",
		'MA-LAR' => "Morocco: Larache",
		'MA-LAA' => "Morocco: Laâyoune (EH)",
		'MA-15'  => "Morocco: Laâyoune-Boujdour-Sakia el
Hamra",
		'MA-MMD' => "Morocco: Marrakech-Medina",
		'MA-MMN' => "Morocco: Marrakech-Menara",
		'MA-11'  => "Morocco: Marrakech-Tensift-Al Haouz",
		'MA-MEK' => "Morocco: Meknès",
		'MA-06'  => "Morocco: Meknès-Tafilalet",
		'MA-MOH' => "Morocco: Mohammadia",
		'MA-MOU' => "Morocco: Moulay Yacoub",
		'MA-MED' => "Morocco: Médiouna",
		'MA-NAD' => "Morocco: Nador",
		'MA-NOU' => "Morocco: Nouaceur",
		'MA-OUA' => "Morocco: Ouarzazate",
		'MA-OUD' => "Morocco: Oued ed Dahab (EH)",
		'MA-16'  => "Morocco: Oued ed Dahab-Lagouira",
		'MA-OUJ' => "Morocco: Oujda-Angad",
		'MA-RAB' => "Morocco: Rabat",
		'MA-07'  => "Morocco: Rabat-Salé-Zemmour-Zaer",
		'MA-SAF' => "Morocco: Safi",
		'MA-SAL' => "Morocco: Salé",
		'MA-SEF' => "Morocco: Sefrou",
		'MA-SET' => "Morocco: Settat",
		'MA-SYB' => "Morocco: Sidi Youssef Ben Ali",
		'MA-SIK' => "Morocco: Sidl Kacem",
		'MA-SKH' => "Morocco: Skhirate-Témara",
		'MA-13'  => "Morocco: Sous-Massa-Draa",
		'MA-12'  => "Morocco: Tadla-Azilal",
		'MA-TNT' => "Morocco: Tan-Tan",
		'MA-TNG' => "Morocco: Tanger-Assilah",
		'MA-01'  => "Morocco: Tanger-Tétouan",
		'MA-TAO' => "Morocco: Taounate",
		'MA-TAI' => "Morocco: Taourirt",
		'MA-TAR' => "Morocco: Taroudant",
		'MA-TAT' => "Morocco: Tata",
		'MA-TAZ' => "Morocco: Taza",
		'MA-03'  => "Morocco: Taza-Al Hoceima-Taounate",
		'MA-TIZ' => "Morocco: Tiznit",
		'MA-TET' => "Morocco: Tétouan",
		'MA-ZAG' => "Morocco: Zagora",

		'--NL'  => "", '-NL' =>
"Netherlands",
		'NL-DR' => "Netherlands: Drenthe",
		'NL-FL' => "Netherlands: Flevoland",
		'NL-FR' => "Netherlands: Friesland",
		'NL-GE' => "Netherlands: Gelderland",
		'NL-GR' => "Netherlands: Groningen",
		'NL-LI' => "Netherlands: Limburg",
		'NL-NB' => "Netherlands: Noord-Brabant",
		'NL-NH' => "Netherlands: Noord-Holland",
		'NL-OV' => "Netherlands: Overijssel",
		'NL-UT' => "Netherlands: Utrecht",
		'NL-ZE' => "Netherlands: Zeeland",
		'NL-ZH' => "Netherlands: Zuid-Holland",

		'--NG'  => "", '-NG' =>
"Nigeria",
		'NG-AB' => "Nigeria: Abia",
		'NG-FC' => "Nigeria: Abuja Capital Territory",
		'NG-AD' => "Nigeria: Adamawa",
		'NG-AK' => "Nigeria: Akwa Ibom",
		'NG-AN' => "Nigeria: Anambra",
		'NG-BA' => "Nigeria: Bauchi",
		'NG-BY' => "Nigeria: Bayelsa",
		'NG-BE' => "Nigeria: Benue",
		'NG-BO' => "Nigeria: Borno",
		'NG-CR' => "Nigeria: Cross River",
		'NG-DE' => "Nigeria: Delta",
		'NG-EB' => "Nigeria: Ebonyi",
		'NG-ED' => "Nigeria: Edo",
		'NG-EK' => "Nigeria: Ekiti",
		'NG-EN' => "Nigeria: Enugu",
		'NG-GO' => "Nigeria: Gombe",
		'NG-IM' => "Nigeria: Imo",
		'NG-JI' => "Nigeria: Jigawa",
		'NG-KD' => "Nigeria: Kaduna",
		'NG-KN' => "Nigeria: Kano",
		'NG-KT' => "Nigeria: Katsina",
		'NG-KE' => "Nigeria: Kebbi",
		'NG-KO' => "Nigeria: Kogi",
		'NG-KW' => "Nigeria: Kwara",
		'NG-LA' => "Nigeria: Lagos",
		'NG-NA' => "Nigeria: Nassarawa",
		'NG-NI' => "Nigeria: Niger, Níger",
		'NG-OG' => "Nigeria: Ogun",
		'NG-ON' => "Nigeria: Ondo",
		'NG-OS' => "Nigeria: Osun",
		'NG-OY' => "Nigeria: Oyo",
		'NG-PL' => "Nigeria: Plateau",
		'NG-RI' => "Nigeria: Rivers",
		'NG-SO' => "Nigeria: Sokoto",
		'NG-TA' => "Nigeria: Taraba",
		'NG-YO' => "Nigeria: Yobe",
		'NG-ZA' => "Nigeria: Zamfara",

		'--NO'  => "", '-NO' =>
"Norway",
		'NO-02' => "Norway: Akershus",
		'NO-09' => "Norway: Aust-Agder",
		'NO-06' => "Norway: Buskerud",
		'NO-20' => "Norway: Finnmark",
		'NO-04' => "Norway: Hedmark",
		'NO-12' => "Norway: Hordaland",
		'NO-22' => "Norway: Jan Mayen",
		'NO-15' => "Norway: Møre og Romsdal",
		'NO-17' => "Norway: Nord-Trøndelag",
		'NO-18' => "Norway: Nordland",
		'NO-05' => "Norway: Oppland",
		'NO-03' => "Norway: Oslo",
		'NO-11' => "Norway: Rogaland",
		'NO-14' => "Norway: Sogn og Fjordane",
		'NO-21' => "Norway: Svalbard",
		'NO-16' => "Norway: Sør-Trøndelag",
		'NO-08' => "Norway: Telemark",
		'NO-19' => "Norway: Troms",
		'NO-10' => "Norway: Vest-Agder",
		'NO-07' => "Norway: Vestfold",
		'NO-01' => "Norway: Østfold",

		'--PH'   => "", '-PH' =>
"Philippines",
		'PH-ABR' => "Philippines: Abra",
		'PH-AGN' => "Philippines: Agusan del Norte",
		'PH-AGS' => "Philippines: Agusan del Sur",
		'PH-AKL' => "Philippines: Aklan",
		'PH-ALB' => "Philippines: Albay",
		'PH-ANT' => "Philippines: Antique",
		'PH-APA' => "Philippines: Apayao",
		'PH-AUR' => "Philippines: Aurora",
		'PH-14'  => "Philippines: Autonomous Region in Muslim
Mindanao (ARMM)",
		'PH-BAS' => "Philippines: Basilan",
		'PH-BTN' => "Philippines: Batanes",
		'PH-BTG' => "Philippines: Batangas",
		'PH-BAN' => "Philippines: Batasn",
		'PH-BEN' => "Philippines: Benguet",
		'PH-05'  => "Philippines: Bicol (Region V)",
		'PH-BIL' => "Philippines: Biliran",
		'PH-BOH' => "Philippines: Bohol",
		'PH-BUK' => "Philippines: Bukidnon",
		'PH-BUL' => "Philippines: Bulacan",
		'PH-40'  => "Philippines: CALABARZON (Region
IV-A)",
		'PH-CAG' => "Philippines: Cagayan",
		'PH-02'  => "Philippines: Cagayan Valley (Region
II)",
		'PH-CAN' => "Philippines: Camarines Norte",
		'PH-CAS' => "Philippines: Camarines Sur",
		'PH-CAM' => "Philippines: Camiguin",
		'PH-CAP' => "Philippines: Capiz",
		'PH-13'  => "Philippines: Caraga (Region XIII)",
		'PH-CAT' => "Philippines: Catanduanes",
		'PH-CAV' => "Philippines: Cavite",
		'PH-CEB' => "Philippines: Cebu",
		'PH-03'  => "Philippines: Central Luzon (Region
III)",
		'PH-07'  => "Philippines: Central Visayas (Region
VII)",
		'PH-COM' => "Philippines: Compostela Valley",
		'PH-15'  => "Philippines: Cordillera Administrative
Region (CAR)",
		'PH-11'  => "Philippines: Davao (Region XI)",
		'PH-DAO' => "Philippines: Davao Oriental",
		'PH-DAV' => "Philippines: Davao del Norte",
		'PH-DAS' => "Philippines: Davao del Sur",
		'PH-DIN' => "Philippines: Dinagat Islands",
		'PH-EAS' => "Philippines: Eastern Samar",
		'PH-08'  => "Philippines: Eastern Visayas (Region
VIII)",
		'PH-GUI' => "Philippines: Guimaras",
		'PH-IFU' => "Philippines: Ifugao",
		'PH-01'  => "Philippines: Ilocos (Region I)",
		'PH-ILN' => "Philippines: Ilocos Norte",
		'PH-ILS' => "Philippines: Ilocos Sur",
		'PH-ILI' => "Philippines: Iloilo",
		'PH-ISA' => "Philippines: Isabela",
		'PH-KAL' => "Philippines: Kalinga-Apayso",
		'PH-LUN' => "Philippines: La Union",
		'PH-LAG' => "Philippines: Laguna",
		'PH-LAN' => "Philippines: Lanao del Norte",
		'PH-LAS' => "Philippines: Lanao del Sur",
		'PH-LEY' => "Philippines: Leyte",
		'PH-41'  => "Philippines: MIMAROPA (Region IV-B)",
		'PH-MAG' => "Philippines: Maguindanao",
		'PH-MAD' => "Philippines: Marinduque",
		'PH-MAS' => "Philippines: Masbate",
		'PH-MDC' => "Philippines: Mindoro Occidental",
		'PH-MDR' => "Philippines: Mindoro Oriental",
		'PH-MSC' => "Philippines: Misamis Occidental",
		'PH-MSR' => "Philippines: Misamis Oriental",
		'PH-MOU' => "Philippines: Mountain Province",
		'PH-00'  => "Philippines: National Capital
Region",
		'PH-NEC' => "Philippines: Negroe Occidental",
		'PH-NER' => "Philippines: Negros Oriental",
		'PH-NCO' => "Philippines: North Cotabato",
		'PH-10'  => "Philippines: Northern Mindanao (Region
X)",
		'PH-NSA' => "Philippines: Northern Samar",
		'PH-NUE' => "Philippines: Nueva Ecija",
		'PH-NUV' => "Philippines: Nueva Vizcaya",
		'PH-PLW' => "Philippines: Palawan",
		'PH-PAM' => "Philippines: Pampanga",
		'PH-PAN' => "Philippines: Pangasinan",
		'PH-QUE' => "Philippines: Quezon",
		'PH-QUI' => "Philippines: Quirino",
		'PH-RIZ' => "Philippines: Rizal",
		'PH-ROM' => "Philippines: Romblon",
		'PH-SAR' => "Philippines: Sarangani",
		'PH-SIG' => "Philippines: Siquijor",
		'PH-12'  => "Philippines: Soccsksargen (Region
XII)",
		'PH-SOR' => "Philippines: Sorsogon",
		'PH-SCO' => "Philippines: South Cotabato",
		'PH-SLE' => "Philippines: Southern Leyte",
		'PH-SUK' => "Philippines: Sultan Kudarat",
		'PH-SLU' => "Philippines: Sulu",
		'PH-SUN' => "Philippines: Surigao del Norte",
		'PH-SUR' => "Philippines: Surigao del Sur",
		'PH-TAR' => "Philippines: Tarlac",
		'PH-TAW' => "Philippines: Tawi-Tawi",
		'PH-WSA' => "Philippines: Western Samar",
		'PH-06'  => "Philippines: Western Visayas (Region
VI)",
		'PH-ZMB' => "Philippines: Zambales",
		'PH-09'  => "Philippines: Zamboanga Peninsula (Region
IX)",
		'PH-ZSI' => "Philippines: Zamboanga Sibugay",
		'PH-ZAN' => "Philippines: Zamboanga del Norte",
		'PH-ZAS' => "Philippines: Zamboanga del Sur",

		'--PL'  => "", '-PL' =>
"Poland",
		'PL-DS' => "Poland: Dolnośląskie",
		'PL-KP' => "Poland: Kujawsko-pomorskie",
		'PL-LU' => "Poland: Lubelskie",
		'PL-LB' => "Poland: Lubuskie",
		'PL-MZ' => "Poland: Mazowieckie",
		'PL-MA' => "Poland: Małopolskie",
		'PL-OP' => "Poland: Opolskie",
		'PL-PK' => "Poland: Podkarpackie",
		'PL-PD' => "Poland: Podlaskie",
		'PL-PM' => "Poland: Pomorskie",
		'PL-WN' => "Poland: Warmińsko-mazurskie",
		'PL-WP' => "Poland: Wielkopolskie",
		'PL-ZP' => "Poland: Zachodniopomorskie",
		'PL-LD' => "Poland: Łódzkie",
		'PL-SL' => "Poland: Śląskie",
		'PL-SK' => "Poland: Świętokrzyskie",

		'--PT'  => "", '-PT' =>
"Portugal",
		'PT-01' => "Portugal: Aveiro",
		'PT-02' => "Portugal: Beja",
		'PT-03' => "Portugal: Braga",
		'PT-04' => "Portugal: Bragança",
		'PT-05' => "Portugal: Castelo Branco",
		'PT-06' => "Portugal: Coimbra",
		'PT-08' => "Portugal: Faro",
		'PT-09' => "Portugal: Guarda",
		'PT-10' => "Portugal: Leiria",
		'PT-11' => "Portugal: Lisboa",
		'PT-12' => "Portugal: Portalegre",
		'PT-13' => "Portugal: Porto",
		'PT-30' => "Portugal: Região Autónoma da
Madeira",
		'PT-20' => "Portugal: Região Autónoma dos
Açores",
		'PT-14' => "Portugal: Santarém",
		'PT-15' => "Portugal: Setúbal",
		'PT-16' => "Portugal: Viana do Castelo",
		'PT-17' => "Portugal: Vila Real",
		'PT-18' => "Portugal: Viseu",
		'PT-07' => "Portugal: Évora",

		'--RO'  => "", '-RO' =>
"Romania",
		'RO-AB' => "Romania: Alba",
		'RO-AR' => "Romania: Arad",
		'RO-AG' => "Romania: Argeș",
		'RO-BC' => "Romania: Bacău",
		'RO-BH' => "Romania: Bihor",
		'RO-BN' => "Romania: Bistrița-Năsăud",
		'RO-BT' => "Romania: Botoșani",
		'RO-BV' => "Romania: Brașov",
		'RO-BR' => "Romania: Brăila",
		'RO-B'  => "Romania: București",
		'RO-BZ' => "Romania: Buzău",
		'RO-CS' => "Romania: Caraș-Severin",
		'RO-CJ' => "Romania: Cluj",
		'RO-CT' => "Romania: Constanța",
		'RO-CV' => "Romania: Covasna",
		'RO-CL' => "Romania: Călărași",
		'RO-DJ' => "Romania: Dolj",
		'RO-DB' => "Romania: Dâmbovița",
		'RO-GL' => "Romania: Galați",
		'RO-GR' => "Romania: Giurgiu",
		'RO-GJ' => "Romania: Gorj",
		'RO-HR' => "Romania: Harghita",
		'RO-HD' => "Romania: Hunedoara",
		'RO-IL' => "Romania: Ialomița",
		'RO-IS' => "Romania: Iași",
		'RO-IF' => "Romania: Ilfov",
		'RO-MM' => "Romania: Maramureș",
		'RO-MH' => "Romania: Mehedinți",
		'RO-MS' => "Romania: Mureș",
		'RO-NT' => "Romania: Neamț",
		'RO-OT' => "Romania: Olt",
		'RO-PH' => "Romania: Prahova",
		'RO-SM' => "Romania: Satu Mare",
		'RO-SB' => "Romania: Sibiu",
		'RO-SV' => "Romania: Suceava",
		'RO-SJ' => "Romania: Sălaj",
		'RO-TR' => "Romania: Teleorman",
		'RO-TM' => "Romania: Timiș",
		'RO-TL' => "Romania: Tulcea",
		'RO-VS' => "Romania: Vaslui",
		'RO-VN' => "Romania: Vrancea",
		'RO-VL' => "Romania: Vâlcea",

		'--RU'   => "", '-RU' =>
"Russian Federation",
		'RU-AD'  => "Russian Federation: Adygeya,
Respublika",
		'RU-AL'  => "Russian Federation: Altay,
Respublika",
		'RU-ALT' => "Russian Federation: Altayskiy kray",
		'RU-AMU' => "Russian Federation: Amurskaya
oblast'",
		'RU-ARK' => "Russian Federation: Arkhangel'skaya
oblast'",
		'RU-AST' => "Russian Federation: Astrakhanskaya
oblast'",
		'RU-BA'  => "Russian Federation: Bashkortostan,
Respublika",
		'RU-BEL' => "Russian Federation: Belgorodskaya
oblast'",
		'RU-BRY' => "Russian Federation: Bryanskaya
oblast'",
		'RU-BU'  => "Russian Federation: Buryatiya,
Respublika",
		'RU-CE'  => "Russian Federation: Chechenskaya
Respublika",
		'RU-CHE' => "Russian Federation: Chelyabinskaya
oblast'",
		'RU-CHU' => "Russian Federation: Chukotskiy avtonomnyy
okrug",
		'RU-CU'  => "Russian Federation: Chuvashskaya
Respublika",
		'RU-DA'  => "Russian Federation: Dagestan,
Respublika",
		'RU-IRK' => "Russian Federation: Irkutiskaya
oblast'",
		'RU-IVA' => "Russian Federation: Ivanovskaya
oblast'",
		'RU-KB'  => "Russian Federation: Kabardino-Balkarskaya
Respublika",
		'RU-KGD' => "Russian Federation: Kaliningradskaya
oblast'",
		'RU-KL'  => "Russian Federation: Kalmykiya,
Respublika",
		'RU-KLU' => "Russian Federation: Kaluzhskaya
oblast'",
		'RU-KAM' => "Russian Federation: Kamchatskiy
kray",
		'RU-KC'  => "Russian Federation:
Karachayevo-Cherkesskaya Respublika",
		'RU-KR'  => "Russian Federation: Kareliya,
Respublika",
		'RU-KEM' => "Russian Federation: Kemerovskaya
oblast'",
		'RU-KHA' => "Russian Federation: Khabarovskiy
kray",
		'RU-KK'  => "Russian Federation: Khakasiya,
Respublika",
		'RU-KHM' => "Russian Federation: Khanty-Mansiysky
avtonomnyy okrug-Yugra",
		'RU-KIR' => "Russian Federation: Kirovskaya
oblast'",
		'RU-KO'  => "Russian Federation: Komi,
Respublika",
		'RU-KOS' => "Russian Federation: Kostromskaya
oblast'",
		'RU-KDA' => "Russian Federation: Krasnodarskiy
kray",
		'RU-KYA' => "Russian Federation: Krasnoyarskiy
kray",
		'RU-KGN' => "Russian Federation: Kurganskaya
oblast'",
		'RU-KRS' => "Russian Federation: Kurskaya
oblast'",
		'RU-LEN' => "Russian Federation: Leningradskaya
oblast'",
		'RU-LIP' => "Russian Federation: Lipetskaya
oblast'",
		'RU-MAG' => "Russian Federation: Magadanskaya
oblast'",
		'RU-ME'  => "Russian Federation: Mariy El,
Respublika",
		'RU-MO'  => "Russian Federation: Mordoviya,
Respublika",
		'RU-MOS' => "Russian Federation: Moskovskaya
oblast'",
		'RU-MOW' => "Russian Federation: Moskva",
		'RU-MUR' => "Russian Federation: Murmanskaya
oblast'",
		'RU-NEN' => "Russian Federation: Nenetskiy avtonomnyy
okrug",
		'RU-NIZ' => "Russian Federation: Nizhegorodskaya
oblast'",
		'RU-NGR' => "Russian Federation: Novgorodskaya
oblast'",
		'RU-NVS' => "Russian Federation: Novosibirskaya
oblast'",
		'RU-OMS' => "Russian Federation: Omskaya
oblast'",
		'RU-ORE' => "Russian Federation: Orenburgskaya
oblast'",
		'RU-ORL' => "Russian Federation: Orlovskaya
oblast'",
		'RU-PNZ' => "Russian Federation: Penzenskaya
oblast'",
		'RU-PER' => "Russian Federation: Permskiy kray",
		'RU-PRI' => "Russian Federation: Primorskiy kray",
		'RU-PSK' => "Russian Federation: Pskovskaya
oblast'",
		'RU-IN'  => "Russian Federation: Respublika
Ingushetiya",
		'RU-ROS' => "Russian Federation: Rostovskaya
oblast'",
		'RU-RYA' => "Russian Federation: Ryazanskaya
oblast'",
		'RU-SA'  => "Russian Federation: Sakha, Respublika
[Yakutiya]",
		'RU-SAK' => "Russian Federation: Sakhalinskaya
oblast'",
		'RU-SAM' => "Russian Federation: Samaraskaya
oblast'",
		'RU-SPE' => "Russian Federation: Sankt-Peterburg",
		'RU-SAR' => "Russian Federation: Saratovskaya
oblast'",
		'RU-SE'  => "Russian Federation: Severnaya
Osetiya-Alaniya, Respublika",
		'RU-SMO' => "Russian Federation: Smolenskaya
oblast'",
		'RU-STA' => "Russian Federation: Stavropol'skiy
kray",
		'RU-SVE' => "Russian Federation: Sverdlovskaya
oblast'",
		'RU-TAM' => "Russian Federation: Tambovskaya
oblast'",
		'RU-TA'  => "Russian Federation: Tatarstan,
Respublika",
		'RU-TOM' => "Russian Federation: Tomskaya
oblast'",
		'RU-TUL' => "Russian Federation: Tul'skaya
oblast'",
		'RU-TVE' => "Russian Federation: Tverskaya
oblast'",
		'RU-TYU' => "Russian Federation: Tyumenskaya
oblast'",
		'RU-TY'  => "Russian Federation: Tyva, Respublika
[Tuva]",
		'RU-UD'  => "Russian Federation: Udmurtskaya
Respublika",
		'RU-ULY' => "Russian Federation: Ul'yanovskaya
oblast'",
		'RU-VLA' => "Russian Federation: Vladimirskaya
oblast'",
		'RU-VGG' => "Russian Federation: Volgogradskaya
oblast'",
		'RU-VLG' => "Russian Federation: Vologodskaya
oblast'",
		'RU-VOR' => "Russian Federation: Voronezhskaya
oblast'",
		'RU-YAN' => "Russian Federation: Yamalo-Nenetskiy
avtonomnyy okrug",
		'RU-YAR' => "Russian Federation: Yaroslavskaya
oblast'",
		'RU-YEV' => "Russian Federation: Yevreyskaya
avtonomnaya oblast'",
		'RU-ZAB' => "Russian Federation: Zabajkal'skij
kraj",

		'--SK'  => "", '-SK' =>
"Slovakia",
		'SK-BC' => "Slovakia: Banskobystrický kraj",
		'SK-BL' => "Slovakia: Bratislavský kraj",
		'SK-KI' => "Slovakia: Košický kraj",
		'SK-NI' => "Slovakia: Nitriansky kraj",
		'SK-PV' => "Slovakia: Prešovský kraj",
		'SK-TC' => "Slovakia: Trenčiansky kraj",
		'SK-TA' => "Slovakia: Trnavský kraj",
		'SK-ZI' => "Slovakia: Žilinský kraj",

		'--SI'   => "", '-SI' =>
"Slovenia",
		'SI-001' => "Slovenia: Ajdovščina",
		'SI-195' => "Slovenia: Apače",
		'SI-002' => "Slovenia: Beltinci",
		'SI-148' => "Slovenia: Benedikt",
		'SI-149' => "Slovenia: Bistrica ob Sotli",
		'SI-003' => "Slovenia: Bled",
		'SI-150' => "Slovenia: Bloke",
		'SI-004' => "Slovenia: Bohinj",
		'SI-005' => "Slovenia: Borovnica",
		'SI-006' => "Slovenia: Bovec",
		'SI-151' => "Slovenia: Braslovče",
		'SI-007' => "Slovenia: Brda",
		'SI-008' => "Slovenia: Brezovica",
		'SI-009' => "Slovenia: Brežice",
		'SI-152' => "Slovenia: Cankova",
		'SI-011' => "Slovenia: Celje",
		'SI-012' => "Slovenia: Cerklje na Gorenjskem",
		'SI-013' => "Slovenia: Cerknica",
		'SI-014' => "Slovenia: Cerkno",
		'SI-153' => "Slovenia: Cerkvenjak",
		'SI-196' => "Slovenia: Cirkulane",
		'SI-018' => "Slovenia: Destrnik",
		'SI-019' => "Slovenia: Divača",
		'SI-154' => "Slovenia: Dobje",
		'SI-020' => "Slovenia: Dobrepolje",
		'SI-155' => "Slovenia: Dobrna",
		'SI-021' => "Slovenia: Dobrova-Polhov Gradec",
		'SI-156' => "Slovenia: Dobrovnik/Dobronak",
		'SI-022' => "Slovenia: Dol pri Ljubljani",
		'SI-157' => "Slovenia: Dolenjske Toplice",
		'SI-023' => "Slovenia: Domžale",
		'SI-024' => "Slovenia: Dornava",
		'SI-025' => "Slovenia: Dravograd",
		'SI-026' => "Slovenia: Duplek",
		'SI-027' => "Slovenia: Gorenja vas-Poljane",
		'SI-028' => "Slovenia: Gorišnica",
		'SI-207' => "Slovenia: Gorje",
		'SI-029' => "Slovenia: Gornja Radgona",
		'SI-030' => "Slovenia: Gornji Grad",
		'SI-031' => "Slovenia: Gornji Petrovci",
		'SI-158' => "Slovenia: Grad",
		'SI-032' => "Slovenia: Grosuplje",
		'SI-159' => "Slovenia: Hajdina",
		'SI-161' => "Slovenia: Hodoš/Hodos",
		'SI-162' => "Slovenia: Horjul",
		'SI-160' => "Slovenia: Hoče-Slivnica",
		'SI-034' => "Slovenia: Hrastnik",
		'SI-035' => "Slovenia: Hrpelje-Kozina",
		'SI-036' => "Slovenia: Idrija",
		'SI-037' => "Slovenia: Ig",
		'SI-038' => "Slovenia: Ilirska Bistrica",
		'SI-039' => "Slovenia: Ivančna Gorica",
		'SI-040' => "Slovenia: Izola/Isola",
		'SI-041' => "Slovenia: Jesenice",
		'SI-163' => "Slovenia: Jezersko",
		'SI-042' => "Slovenia: Juršinci",
		'SI-043' => "Slovenia: Kamnik",
		'SI-044' => "Slovenia: Kanal",
		'SI-045' => "Slovenia: Kidričevo",
		'SI-046' => "Slovenia: Kobarid",
		'SI-047' => "Slovenia: Kobilje",
		'SI-049' => "Slovenia: Komen",
		'SI-164' => "Slovenia: Komenda",
		'SI-050' => "Slovenia: Koper/Capodistria",
		'SI-197' => "Slovenia: Kosanjevica na Krki",
		'SI-165' => "Slovenia: Kostel",
		'SI-051' => "Slovenia: Kozje",
		'SI-048' => "Slovenia: Kočevje",
		'SI-052' => "Slovenia: Kranj",
		'SI-053' => "Slovenia: Kranjska Gora",
		'SI-166' => "Slovenia: Križevci",
		'SI-054' => "Slovenia: Krško",
		'SI-055' => "Slovenia: Kungota",
		'SI-056' => "Slovenia: Kuzma",
		'SI-057' => "Slovenia: Laško",
		'SI-058' => "Slovenia: Lenart",
		'SI-059' => "Slovenia: Lendava/Lendva",
		'SI-060' => "Slovenia: Litija",
		'SI-061' => "Slovenia: Ljubljana",
		'SI-062' => "Slovenia: Ljubno",
		'SI-063' => "Slovenia: Ljutomer",
		'SI-208' => "Slovenia: Log-Dragomer",
		'SI-064' => "Slovenia: Logatec",
		'SI-167' => "Slovenia: Lovrenc na Pohorju",
		'SI-065' => "Slovenia: Loška dolina",
		'SI-066' => "Slovenia: Loški Potok",
		'SI-068' => "Slovenia: Lukovica",
		'SI-067' => "Slovenia: Luče",
		'SI-069' => "Slovenia: Majšperk",
		'SI-198' => "Slovenia: Makole",
		'SI-070' => "Slovenia: Maribor",
		'SI-168' => "Slovenia: Markovci",
		'SI-071' => "Slovenia: Medvode",
		'SI-072' => "Slovenia: Mengeš",
		'SI-073' => "Slovenia: Metlika",
		'SI-074' => "Slovenia: Mežica",
		'SI-169' => "Slovenia: Miklavž na Dravskem
polju",
		'SI-075' => "Slovenia: Miren-Kostanjevica",
		'SI-170' => "Slovenia: Mirna Peč",
		'SI-076' => "Slovenia: Mislinja",
		'SI-199' => "Slovenia: Mokronog-Trebelno",
		'SI-078' => "Slovenia: Moravske Toplice",
		'SI-077' => "Slovenia: Moravče",
		'SI-079' => "Slovenia: Mozirje",
		'SI-080' => "Slovenia: Murska Sobota",
		'SI-081' => "Slovenia: Muta",
		'SI-082' => "Slovenia: Naklo",
		'SI-083' => "Slovenia: Nazarje",
		'SI-084' => "Slovenia: Nova Gorica",
		'SI-085' => "Slovenia: Novo mesto",
		'SI-086' => "Slovenia: Odranci",
		'SI-171' => "Slovenia: Oplotnica",
		'SI-087' => "Slovenia: Ormož",
		'SI-088' => "Slovenia: Osilnica",
		'SI-089' => "Slovenia: Pesnica",
		'SI-090' => "Slovenia: Piran/Pirano",
		'SI-091' => "Slovenia: Pivka",
		'SI-172' => "Slovenia: Podlehnik",
		'SI-093' => "Slovenia: Podvelka",
		'SI-092' => "Slovenia: Podčetrtek",
		'SI-200' => "Slovenia: Poljčane",
		'SI-173' => "Slovenia: Polzela",
		'SI-094' => "Slovenia: Postojna",
		'SI-174' => "Slovenia: Prebold",
		'SI-095' => "Slovenia: Preddvor",
		'SI-175' => "Slovenia: Prevalje",
		'SI-096' => "Slovenia: Ptuj",
		'SI-097' => "Slovenia: Puconci",
		'SI-100' => "Slovenia: Radenci",
		'SI-099' => "Slovenia: Radeče",
		'SI-101' => "Slovenia: Radlje ob Dravi",
		'SI-102' => "Slovenia: Radovljica",
		'SI-103' => "Slovenia: Ravne na Koroškem",
		'SI-176' => "Slovenia: Razkrižje",
		'SI-098' => "Slovenia: Rače-Fram",
		'SI-201' => "Slovenia: Renče-Vogrsko",
		'SI-209' => "Slovenia: Rečica ob Savinji",
		'SI-104' => "Slovenia: Ribnica",
		'SI-177' => "Slovenia: Ribnica na Pohorju",
		'SI-107' => "Slovenia: Rogatec",
		'SI-106' => "Slovenia: Rogaška Slatina",
		'SI-105' => "Slovenia: Rogašovci",
		'SI-108' => "Slovenia: Ruše",
		'SI-178' => "Slovenia: Selnica ob Dravi",
		'SI-109' => "Slovenia: Semič",
		'SI-110' => "Slovenia: Sevnica",
		'SI-111' => "Slovenia: Sežana",
		'SI-112' => "Slovenia: Slovenj Gradec",
		'SI-113' => "Slovenia: Slovenska Bistrica",
		'SI-114' => "Slovenia: Slovenske Konjice",
		'SI-179' => "Slovenia: Sodražica",
		'SI-180' => "Slovenia: Solčava",
		'SI-202' => "Slovenia: Središče ob Dravi",
		'SI-115' => "Slovenia: Starče",
		'SI-203' => "Slovenia: Straža",
		'SI-181' => "Slovenia: Sveta Ana",
		'SI-182' => "Slovenia: Sveta Andraž v Slovenskih
Goricah",
		'SI-204' => "Slovenia: Sveta Trojica v Slovenskih
Goricah",
		'SI-116' => "Slovenia: Sveti Jurij",
		'SI-210' => "Slovenia: Sveti Jurij v Slovenskih
Goricah",
		'SI-205' => "Slovenia: Sveti Tomaž",
		'SI-184' => "Slovenia: Tabor",
		'SI-010' => "Slovenia: Tišina",
		'SI-128' => "Slovenia: Tolmin",
		'SI-129' => "Slovenia: Trbovlje",
		'SI-130' => "Slovenia: Trebnje",
		'SI-185' => "Slovenia: Trnovska vas",
		'SI-186' => "Slovenia: Trzin",
		'SI-131' => "Slovenia: Tržič",
		'SI-132' => "Slovenia: Turnišče",
		'SI-133' => "Slovenia: Velenje",
		'SI-187' => "Slovenia: Velika Polana",
		'SI-134' => "Slovenia: Velike Lašče",
		'SI-188' => "Slovenia: Veržej",
		'SI-135' => "Slovenia: Videm",
		'SI-136' => "Slovenia: Vipava",
		'SI-137' => "Slovenia: Vitanje",
		'SI-138' => "Slovenia: Vodice",
		'SI-139' => "Slovenia: Vojnik",
		'SI-189' => "Slovenia: Vransko",
		'SI-140' => "Slovenia: Vrhnika",
		'SI-141' => "Slovenia: Vuzenica",
		'SI-142' => "Slovenia: Zagorje ob Savi",
		'SI-143' => "Slovenia: Zavrč",
		'SI-144' => "Slovenia: Zreče",
		'SI-015' => "Slovenia: Črenšovci",
		'SI-016' => "Slovenia: Črna na Koroškem",
		'SI-017' => "Slovenia: Črnomelj",
		'SI-033' => "Slovenia: Šalovci",
		'SI-183' => "Slovenia: Šempeter-Vrtojba",
		'SI-118' => "Slovenia: Šentilj",
		'SI-119' => "Slovenia: Šentjernej",
		'SI-120' => "Slovenia: Šentjur",
		'SI-211' => "Slovenia: Šentrupert",
		'SI-117' => "Slovenia: Šenčur",
		'SI-121' => "Slovenia: Škocjan",
		'SI-122' => "Slovenia: Škofja Loka",
		'SI-123' => "Slovenia: Škofljica",
		'SI-124' => "Slovenia: Šmarje pri Jelšah",
		'SI-206' => "Slovenia: Šmarjeske Topliče",
		'SI-125' => "Slovenia: Šmartno ob Paki",
		'SI-194' => "Slovenia: Šmartno pri Litiji",
		'SI-126' => "Slovenia: Šoštanj",
		'SI-127' => "Slovenia: Štore",
		'SI-190' => "Slovenia: Žalec",
		'SI-146' => "Slovenia: Železniki",
		'SI-191' => "Slovenia: Žetale",
		'SI-147' => "Slovenia: Žiri",
		'SI-192' => "Slovenia: Žirovnica",
		'SI-193' => "Slovenia: Žužemberk",

		'--ZA'  => "", '-ZA' => "South
Africa",
		'ZA-EC' => "South Africa: Eastern Cape",
		'ZA-FS' => "South Africa: Free State",
		'ZA-GT' => "South Africa: Gauteng",
		'ZA-NL' => "South Africa: Kwazulu-Natal",
		'ZA-LP' => "South Africa: Limpopo",
		'ZA-MP' => "South Africa: Mpumalanga",
		'ZA-NW' => "South Africa: North-West (South
Africa)",
		'ZA-NC' => "South Africa: Northern Cape",
		'ZA-WC' => "South Africa: Western Cape",

		'--ES'  => "", '-ES' =>
"Spain",
		'ES-C'  => "Spain: A Coruña",
		'ES-AB' => "Spain: Albacete",
		'ES-A'  => "Spain: Alicante",
		'ES-AL' => "Spain: Almería",
		'ES-AN' => "Spain: Andalucía",
		'ES-AR' => "Spain: Aragón",
		'ES-O'  => "Spain: Asturias",
		'ES-AS' => "Spain: Asturias, Principado de",
		'ES-BA' => "Spain: Badajoz",
		'ES-PM' => "Spain: Balears",
		'ES-B'  => "Spain: Barcelona",
		'ES-BU' => "Spain: Burgos",
		'ES-CN' => "Spain: Canarias",
		'ES-S'  => "Spain: Cantabria",
		'ES-CS' => "Spain: Castellón",
		'ES-CL' => "Spain: Castilla y León",
		'ES-CM' => "Spain: Castilla-La Mancha",
		'ES-CT' => "Spain: Catalunya",
		'ES-CE' => "Spain: Ceuta",
		'ES-CR' => "Spain: Ciudad Real",
		'ES-CU' => "Spain: Cuenca",
		'ES-CC' => "Spain: Cáceres",
		'ES-CA' => "Spain: Cádiz",
		'ES-CO' => "Spain: Córdoba",
		'ES-EX' => "Spain: Extremadura",
		'ES-GA' => "Spain: Galicia",
		'ES-GI' => "Spain: Girona",
		'ES-GR' => "Spain: Granada",
		'ES-GU' => "Spain: Guadalajara",
		'ES-SS' => "Spain: Guipúzcoa / Gipuzkoa",
		'ES-H'  => "Spain: Huelva",
		'ES-HU' => "Spain: Huesca",
		'ES-IB' => "Spain: Illes Balears",
		'ES-J'  => "Spain: Jaén",
		'ES-LO' => "Spain: La Rioja",
		'ES-GC' => "Spain: Las Palmas",
		'ES-LE' => "Spain: León",
		'ES-L'  => "Spain: Lleida",
		'ES-LU' => "Spain: Lugo",
		'ES-M'  => "Spain: Madrid",
		'ES-MD' => "Spain: Madrid, Comunidad de",
		'ES-ML' => "Spain: Melilla",
		'ES-MU' => "Spain: Murcia",
		'ES-MC' => "Spain: Murcia, Región de",
		'ES-MA' => "Spain: Málaga",
		'ES-NA' => "Spain: Navarra / Nafarroa",
		'ES-NC' => "Spain: Navarra, Comunidad Foral de /
Nafarroako Foru Komunitatea",
		'ES-OR' => "Spain: Ourense",
		'ES-P'  => "Spain: Palencia",
		'ES-PV' => "Spain: País Vasco / Euskal Herria",
		'ES-PO' => "Spain: Pontevedra",
		'ES-SA' => "Spain: Salamanca",
		'ES-TF' => "Spain: Santa Cruz de Tenerife",
		'ES-SG' => "Spain: Segovia",
		'ES-SE' => "Spain: Sevilla",
		'ES-SO' => "Spain: Soria",
		'ES-T'  => "Spain: Tarragona",
		'ES-TE' => "Spain: Teruel",
		'ES-TO' => "Spain: Toledo",
		'ES-V'  => "Spain: Valencia / València",
		'ES-VC' => "Spain: Valenciana, Comunidad / Valenciana,
Comunitat",
		'ES-VA' => "Spain: Valladolid",
		'ES-BI' => "Spain: Vizcayaa / Bizkaia",
		'ES-ZA' => "Spain: Zamora",
		'ES-Z'  => "Spain: Zaragoza",
		'ES-VI' => "Spain: Álava",
		'ES-AV' => "Spain: Ávila",

		'--SE'  => "", '-SE' =>
"Sweden",
		'SE-K'  => "Sweden: Blekinge län",
		'SE-W'  => "Sweden: Dalarnas län",
		'SE-I'  => "Sweden: Gotlands län",
		'SE-X'  => "Sweden: Gävleborgs län",
		'SE-N'  => "Sweden: Hallands län",
		'SE-Z'  => "Sweden: Jämtlande län",
		'SE-F'  => "Sweden: Jönköpings län",
		'SE-H'  => "Sweden: Kalmar län",
		'SE-G'  => "Sweden: Kronobergs län",
		'SE-BD' => "Sweden: Norrbottens län",
		'SE-M'  => "Sweden: Skåne län",
		'SE-AB' => "Sweden: Stockholms län",
		'SE-D'  => "Sweden: Södermanlands län",
		'SE-C'  => "Sweden: Uppsala län",
		'SE-S'  => "Sweden: Värmlands län",
		'SE-AC' => "Sweden: Västerbottens län",
		'SE-Y'  => "Sweden: Västernorrlands län",
		'SE-U'  => "Sweden: Västmanlands län",
		'SE-O'  => "Sweden: Västra Götalands län",
		'SE-T'  => "Sweden: Örebro län",
		'SE-E'  => "Sweden: Östergötlands län",

		'--CH'  => "", '-CH' =>
"Switzerland",
		'CH-AG' => "Switzerland: Aargau",
		'CH-AR' => "Switzerland: Appenzell Ausserrhoden",
		'CH-AI' => "Switzerland: Appenzell Innerrhoden",
		'CH-BL' => "Switzerland: Basel-Landschaft",
		'CH-BS' => "Switzerland: Basel-Stadt",
		'CH-BE' => "Switzerland: Bern",
		'CH-FR' => "Switzerland: Fribourg",
		'CH-GE' => "Switzerland: Genève",
		'CH-GL' => "Switzerland: Glarus",
		'CH-GR' => "Switzerland: Graubünden",
		'CH-JU' => "Switzerland: Jura",
		'CH-LU' => "Switzerland: Luzern",
		'CH-NE' => "Switzerland: Neuchâtel",
		'CH-NW' => "Switzerland: Nidwalden",
		'CH-OW' => "Switzerland: Obwalden",
		'CH-SG' => "Switzerland: Sankt Gallen",
		'CH-SH' => "Switzerland: Schaffhausen",
		'CH-SZ' => "Switzerland: Schwyz",
		'CH-SO' => "Switzerland: Solothurn",
		'CH-TG' => "Switzerland: Thurgau",
		'CH-TI' => "Switzerland: Ticino",
		'CH-UR' => "Switzerland: Uri",
		'CH-VS' => "Switzerland: Valais",
		'CH-VD' => "Switzerland: Vaud",
		'CH-ZG' => "Switzerland: Zug",
		'CH-ZH' => "Switzerland: Zürich",

		'--TW'   => "", '-TW' =>
"Taiwan",
		'TW-CHA' => "Taiwan: Changhua",
		'TW-CYI' => "Taiwan: Chiay City",
		'TW-CYQ' => "Taiwan: Chiayi",
		'TW-HSQ' => "Taiwan: Hsinchu",
		'TW-HSZ' => "Taiwan: Hsinchui City",
		'TW-HUA' => "Taiwan: Hualien",
		'TW-ILA' => "Taiwan: Ilan",
		'TW-KHQ' => "Taiwan: Kaohsiung",
		'TW-KHH' => "Taiwan: Kaohsiung City",
		'TW-KEE' => "Taiwan: Keelung City",
		'TW-MIA' => "Taiwan: Miaoli",
		'TW-NAN' => "Taiwan: Nantou",
		'TW-PEN' => "Taiwan: Penghu",
		'TW-PIF' => "Taiwan: Pingtung",
		'TW-TXQ' => "Taiwan: Taichung",
		'TW-TXG' => "Taiwan: Taichung City",
		'TW-TNQ' => "Taiwan: Tainan",
		'TW-TNN' => "Taiwan: Tainan City",
		'TW-TPQ' => "Taiwan: Taipei",
		'TW-TPE' => "Taiwan: Taipei City",
		'TW-TTT' => "Taiwan: Taitung",
		'TW-TAO' => "Taiwan: Taoyuan",
		'TW-YUN' => "Taiwan: Yunlin",

		'--TH'  => "", '-TH' =>
"Thailand",
		'TH-37' => "Thailand: Amnat Charoen",
		'TH-15' => "Thailand: Ang Thong",
		'TH-31' => "Thailand: Buri Ram",
		'TH-24' => "Thailand: Chachoengsao",
		'TH-18' => "Thailand: Chai Nat",
		'TH-36' => "Thailand: Chaiyaphum",
		'TH-22' => "Thailand: Chanthaburi",
		'TH-50' => "Thailand: Chiang Mai",
		'TH-57' => "Thailand: Chiang Rai",
		'TH-20' => "Thailand: Chon Buri",
		'TH-86' => "Thailand: Chumphon",
		'TH-46' => "Thailand: Kalasin",
		'TH-62' => "Thailand: Kamphaeng Phet",
		'TH-71' => "Thailand: Kanchanaburi",
		'TH-40' => "Thailand: Khon Kaen",
		'TH-81' => "Thailand: Krabi",
		'TH-10' => "Thailand: Krung Thep Maha Nakhon
Bangkok",
		'TH-52' => "Thailand: Lampang",
		'TH-51' => "Thailand: Lamphun",
		'TH-42' => "Thailand: Loei",
		'TH-16' => "Thailand: Lop Buri",
		'TH-58' => "Thailand: Mae Hong Son",
		'TH-44' => "Thailand: Maha Sarakham",
		'TH-49' => "Thailand: Mukdahan",
		'TH-26' => "Thailand: Nakhon Nayok",
		'TH-73' => "Thailand: Nakhon Pathom",
		'TH-48' => "Thailand: Nakhon Phanom",
		'TH-30' => "Thailand: Nakhon Ratchasima",
		'TH-60' => "Thailand: Nakhon Sawan",
		'TH-80' => "Thailand: Nakhon Si Thammarat",
		'TH-55' => "Thailand: Nan",
		'TH-96' => "Thailand: Narathiwat",
		'TH-39' => "Thailand: Nong Bua Lam Phu",
		'TH-43' => "Thailand: Nong Khai",
		'TH-12' => "Thailand: Nonthaburi",
		'TH-13' => "Thailand: Pathum Thani",
		'TH-94' => "Thailand: Pattani",
		'TH-82' => "Thailand: Phangnga",
		'TH-93' => "Thailand: Phatthalung",
		'TH-S'  => "Thailand: Phatthaya",
		'TH-56' => "Thailand: Phayao",
		'TH-67' => "Thailand: Phetchabun",
		'TH-76' => "Thailand: Phetchaburi",
		'TH-66' => "Thailand: Phichit",
		'TH-65' => "Thailand: Phitsanulok",
		'TH-14' => "Thailand: Phra Nakhon Si Ayutthaya",
		'TH-54' => "Thailand: Phrae",
		'TH-83' => "Thailand: Phuket",
		'TH-25' => "Thailand: Prachin Buri",
		'TH-77' => "Thailand: Prachuap Khiri Khan",
		'TH-85' => "Thailand: Ranong",
		'TH-70' => "Thailand: Ratchaburi",
		'TH-21' => "Thailand: Rayong",
		'TH-45' => "Thailand: Roi Et",
		'TH-27' => "Thailand: Sa Kaeo",
		'TH-47' => "Thailand: Sakon Nakhon",
		'TH-11' => "Thailand: Samut Prakan",
		'TH-74' => "Thailand: Samut Sakhon",
		'TH-75' => "Thailand: Samut Songkhram",
		'TH-19' => "Thailand: Saraburi",
		'TH-91' => "Thailand: Satun",
		'TH-33' => "Thailand: Si Sa Ket",
		'TH-17' => "Thailand: Sing Buri",
		'TH-90' => "Thailand: Songkhla",
		'TH-64' => "Thailand: Sukhothai",
		'TH-72' => "Thailand: Suphan Buri",
		'TH-84' => "Thailand: Surat Thani",
		'TH-32' => "Thailand: Surin",
		'TH-63' => "Thailand: Tak",
		'TH-92' => "Thailand: Trang",
		'TH-23' => "Thailand: Trat",
		'TH-34' => "Thailand: Ubon Ratchathani",
		'TH-41' => "Thailand: Udon Thani",
		'TH-61' => "Thailand: Uthai Thani",
		'TH-53' => "Thailand: Uttaradit",
		'TH-95' => "Thailand: Yala",
		'TH-35' => "Thailand: Yasothon",

		'--TR'  => "", '-TR' =>
"Turkey",
		'TR-01' => "Turkey: Adana",
		'TR-02' => "Turkey: Adıyaman",
		'TR-03' => "Turkey: Afyon",
		'TR-68' => "Turkey: Aksaray",
		'TR-05' => "Turkey: Amasya",
		'TR-06' => "Turkey: Ankara",
		'TR-07' => "Turkey: Antalya",
		'TR-75' => "Turkey: Ardahan",
		'TR-08' => "Turkey: Artvin",
		'TR-09' => "Turkey: Aydın",
		'TR-04' => "Turkey: Ağrı",
		'TR-10' => "Turkey: Balıkesir",
		'TR-74' => "Turkey: Bartın",
		'TR-72' => "Turkey: Batman",
		'TR-69' => "Turkey: Bayburt",
		'TR-11' => "Turkey: Bilecik",
		'TR-12' => "Turkey: Bingöl",
		'TR-13' => "Turkey: Bitlis",
		'TR-14' => "Turkey: Bolu",
		'TR-15' => "Turkey: Burdur",
		'TR-16' => "Turkey: Bursa",
		'TR-20' => "Turkey: Denizli",
		'TR-21' => "Turkey: Diyarbakır",
		'TR-81' => "Turkey: Düzce",
		'TR-22' => "Turkey: Edirne",
		'TR-23' => "Turkey: Elazığ",
		'TR-24' => "Turkey: Erzincan",
		'TR-25' => "Turkey: Erzurum",
		'TR-26' => "Turkey: Eskişehir",
		'TR-27' => "Turkey: Gaziantep",
		'TR-28' => "Turkey: Giresun",
		'TR-29' => "Turkey: Gümüşhane",
		'TR-30' => "Turkey: Hakkâri",
		'TR-31' => "Turkey: Hatay",
		'TR-32' => "Turkey: Isparta",
		'TR-76' => "Turkey: Iğdır",
		'TR-46' => "Turkey: Kahramanmaraş",
		'TR-78' => "Turkey: Karabük",
		'TR-70' => "Turkey: Karaman",
		'TR-36' => "Turkey: Kars",
		'TR-37' => "Turkey: Kastamonu",
		'TR-38' => "Turkey: Kayseri",
		'TR-79' => "Turkey: Kilis",
		'TR-41' => "Turkey: Kocaeli",
		'TR-42' => "Turkey: Konya",
		'TR-43' => "Turkey: Kütahya",
		'TR-39' => "Turkey: Kırklareli",
		'TR-71' => "Turkey: Kırıkkale",
		'TR-40' => "Turkey: Kırşehir",
		'TR-44' => "Turkey: Malatya",
		'TR-45' => "Turkey: Manisa",
		'TR-47' => "Turkey: Mardin",
		'TR-48' => "Turkey: Muğla",
		'TR-49' => "Turkey: Muş",
		'TR-50' => "Turkey: Nevşehir",
		'TR-51' => "Turkey: Niğde",
		'TR-52' => "Turkey: Ordu",
		'TR-80' => "Turkey: Osmaniye",
		'TR-53' => "Turkey: Rize",
		'TR-54' => "Turkey: Sakarya",
		'TR-55' => "Turkey: Samsun",
		'TR-56' => "Turkey: Siirt",
		'TR-57' => "Turkey: Sinop",
		'TR-58' => "Turkey: Sivas",
		'TR-59' => "Turkey: Tekirdağ",
		'TR-60' => "Turkey: Tokat",
		'TR-61' => "Turkey: Trabzon",
		'TR-62' => "Turkey: Tunceli",
		'TR-64' => "Turkey: Uşak",
		'TR-65' => "Turkey: Van",
		'TR-77' => "Turkey: Yalova",
		'TR-66' => "Turkey: Yozgat",
		'TR-67' => "Turkey: Zonguldak",
		'TR-17' => "Turkey: Çanakkale",
		'TR-18' => "Turkey: Çankırı",
		'TR-19' => "Turkey: Çorum",
		'TR-34' => "Turkey: İstanbul",
		'TR-35' => "Turkey: İzmir",
		'TR-33' => "Turkey: İçel",
		'TR-63' => "Turkey: Şanlıurfa",
		'TR-73' => "Turkey: Şırnak",

		'--UA'  => "", '-UA' =>
"Ukraine",
		'UA-71' => "Ukraine: Cherkas'ka
Oblast'",
		'UA-74' => "Ukraine: Chernihivs'ka
Oblast'",
		'UA-77' => "Ukraine: Chernivets'ka
Oblast'",
		'UA-12' => "Ukraine: Dnipropetrovs'ka
Oblast'",
		'UA-14' => "Ukraine: Donets'ka Oblast'",
		'UA-26' => "Ukraine: Ivano-Frankivs'ka
Oblast'",
		'UA-63' => "Ukraine: Kharkivs'ka
Oblast'",
		'UA-65' => "Ukraine: Khersons'ka
Oblast'",
		'UA-68' => "Ukraine: Khmel'nyts'ka
Oblast'",
		'UA-35' => "Ukraine: Kirovohrads'ka
Oblast'",
		'UA-32' => "Ukraine: Kyïvs'ka Oblast'",
		'UA-30' => "Ukraine: Kyïvs'ka mis'ka
rada",
		'UA-46' => "Ukraine: L'vivs'ka
Oblast'",
		'UA-09' => "Ukraine: Luhans'ka Oblast'",
		'UA-48' => "Ukraine: Mykolaïvs'ka
Oblast'",
		'UA-51' => "Ukraine: Odes'ka Oblast'",
		'UA-53' => "Ukraine: Poltavs'ka
Oblast'",
		'UA-43' => "Ukraine: Respublika Krym",
		'UA-56' => "Ukraine: Rivnens'ka
Oblast'",
		'UA-40' => "Ukraine: Sevastopol",
		'UA-59' => "Ukraine: Sums 'ka Oblast'",
		'UA-61' => "Ukraine: Ternopil's'ka
Oblast'",
		'UA-05' => "Ukraine: Vinnyts'ka
Oblast'",
		'UA-07' => "Ukraine: Volyns'ka Oblast'",
		'UA-21' => "Ukraine: Zakarpats'ka
Oblast'",
		'UA-23' => "Ukraine: Zaporiz'ka
Oblast'",
		'UA-18' => "Ukraine: Zhytomyrs'ka
Oblast'",

		'--AE'  => "", '-AE' => "United
Arab Emirates",
		'AE-AJ' => "United Arab Emirates: 'Ajmān",
		'AE-AZ' => "United Arab Emirates: Abū Ȥaby [Abu
Dhabi]",
		'AE-FU' => "United Arab Emirates: Al Fujayrah",
		'AE-SH' => "United Arab Emirates: Ash Shāriqah",
		'AE-DU' => "United Arab Emirates: Dubayy",
		'AE-RK' => "United Arab Emirates: Ra’s al
Khaymah",
		'AE-UQ' => "United Arab Emirates: Umm al Qaywayn",

		'--GB'   => "", '-GB' => "United
Kingdom",
		'GB-ABE' => "United Kingdom: Aberdeen City",
		'GB-ABD' => "United Kingdom: Aberdeenshire",
		'GB-ANS' => "United Kingdom: Angus",
		'GB-ANT' => "United Kingdom: Antrim",
		'GB-ARD' => "United Kingdom: Ards",
		'GB-AGB' => "United Kingdom: Argyll and Bute",
		'GB-ARM' => "United Kingdom: Armagh",
		'GB-BLA' => "United Kingdom: Ballymena",
		'GB-BLY' => "United Kingdom: Ballymoney",
		'GB-BNB' => "United Kingdom: Banbridge",
		'GB-BDG' => "United Kingdom: Barking and
Dagenham",
		'GB-BNE' => "United Kingdom: Barnet",
		'GB-BNS' => "United Kingdom: Barnsley",
		'GB-BAS' => "United Kingdom: Bath and North East
Somerset",
		'GB-BDF' => "United Kingdom: Bedford",
		'GB-BFS' => "United Kingdom: Belfast",
		'GB-BEX' => "United Kingdom: Bexley",
		'GB-BIR' => "United Kingdom: Birmingham",
		'GB-BBD' => "United Kingdom: Blackburn with
Darwen",
		'GB-BPL' => "United Kingdom: Blackpool",
		'GB-BGW' => "United Kingdom: Blaenau Gwent",
		'GB-BOL' => "United Kingdom: Bolton",
		'GB-BMH' => "United Kingdom: Bournemouth",
		'GB-BRC' => "United Kingdom: Bracknell Forest",
		'GB-BRD' => "United Kingdom: Bradford",
		'GB-BEN' => "United Kingdom: Brent",
		'GB-BGE' => "United Kingdom: Bridgend (Pen-y-bont ar
Ogwr)",
		'GB-BNH' => "United Kingdom: Brighton and Hove",
		'GB-BST' => "United Kingdom: Bristol, City of",
		'GB-BRY' => "United Kingdom: Bromley",
		'GB-BKM' => "United Kingdom: Buckinghamshire",
		'GB-BUR' => "United Kingdom: Bury",
		'GB-CAY' => "United Kingdom: Caerphilly
(Caerffili)",
		'GB-CLD' => "United Kingdom: Calderdale",
		'GB-CAM' => "United Kingdom: Cambridgeshire",
		'GB-CMD' => "United Kingdom: Camden",
		'GB-CRF' => "United Kingdom: Cardiff (Caerdydd)",
		'GB-CMN' => "United Kingdom: Carmarthenshire (Sir
Gaerfyrddin)",
		'GB-CKF' => "United Kingdom: Carrickfergus",
		'GB-CSR' => "United Kingdom: Castlereagh",
		'GB-CBF' => "United Kingdom: Central
Bedfordshire",
		'GB-CGN' => "United Kingdom: Ceredigion (Sir
Ceredigion)",
		'GB-CHE' => "United Kingdom: Cheshire East",
		'GB-CHW' => "United Kingdom: Cheshire West and
Chester",
		'GB-CLK' => "United Kingdom: Clackmannanshire",
		'GB-CLR' => "United Kingdom: Coleraine",
		'GB-CWY' => "United Kingdom: Conwy",
		'GB-CKT' => "United Kingdom: Cookstown",
		'GB-CON' => "United Kingdom: Cornwall",
		'GB-COV' => "United Kingdom: Coventry",
		'GB-CGV' => "United Kingdom: Craigavon",
		'GB-CRY' => "United Kingdom: Croydon",
		'GB-CMA' => "United Kingdom: Cumbria",
		'GB-DAL' => "United Kingdom: Darlington",
		'GB-DEN' => "United Kingdom: Denbighshire (Sir
Ddinbych)",
		'GB-DER' => "United Kingdom: Derby",
		'GB-DBY' => "United Kingdom: Derbyshire",
		'GB-DRY' => "United Kingdom: Derry",
		'GB-DEV' => "United Kingdom: Devon",
		'GB-DNC' => "United Kingdom: Doncaster",
		'GB-DOR' => "United Kingdom: Dorset",
		'GB-DOW' => "United Kingdom: Down",
		'GB-DUD' => "United Kingdom: Dudley",
		'GB-DGY' => "United Kingdom: Dumfries and
Galloway",
		'GB-DND' => "United Kingdom: Dundee City",
		'GB-DGN' => "United Kingdom: Dungannon",
		'GB-DUR' => "United Kingdom: Durham",
		'GB-EAL' => "United Kingdom: Ealing",
		'GB-EAY' => "United Kingdom: East Ayrshire",
		'GB-EDU' => "United Kingdom: East Dunbartonshire",
		'GB-ELN' => "United Kingdom: East Lothian",
		'GB-ERW' => "United Kingdom: East Renfrewshire",
		'GB-ERY' => "United Kingdom: East Riding of
Yorkshire",
		'GB-ESX' => "United Kingdom: East Sussex",
		'GB-EDH' => "United Kingdom: Edinburgh, City of",
		'GB-ELS' => "United Kingdom: Eilean Siar",
		'GB-ENF' => "United Kingdom: Enfield",
		'GB-ENG' => "United Kingdom: England",
		'GB-EAW' => "United Kingdom: England and Wales",
		'GB-ESS' => "United Kingdom: Essex",
		'GB-FAL' => "United Kingdom: Falkirk",
		'GB-FER' => "United Kingdom: Fermanagh",
		'GB-FIF' => "United Kingdom: Fife",
		'GB-FLN' => "United Kingdom: Flintshire (Sir y
Fflint)",
		'GB-GAT' => "United Kingdom: Gateshead",
		'GB-GLG' => "United Kingdom: Glasgow City",
		'GB-GLS' => "United Kingdom: Gloucestershire",
		'GB-GBN' => "United Kingdom: Great Britain",
		'GB-GRE' => "United Kingdom: Greenwich",
		'GB-GWN' => "United Kingdom: Gwynedd",
		'GB-HCK' => "United Kingdom: Hackney",
		'GB-HAL' => "United Kingdom: Halton",
		'GB-HMF' => "United Kingdom: Hammersmith and
Fulham",
		'GB-HAM' => "United Kingdom: Hampshire",
		'GB-HRY' => "United Kingdom: Haringey",
		'GB-HRW' => "United Kingdom: Harrow",
		'GB-HPL' => "United Kingdom: Hartlepool",
		'GB-HAV' => "United Kingdom: Havering",
		'GB-HEF' => "United Kingdom: Herefordshire",
		'GB-HRT' => "United Kingdom: Hertfordshire",
		'GB-HLD' => "United Kingdom: Highland",
		'GB-HIL' => "United Kingdom: Hillingdon",
		'GB-HNS' => "United Kingdom: Hounslow",
		'GB-IVC' => "United Kingdom: Inverclyde",
		'GB-AGY' => "United Kingdom: Isle of Anglesey (Sir Ynys
Môn)",
		'GB-IOW' => "United Kingdom: Isle of Wight",
		'GB-ISL' => "United Kingdom: Islington",
		'GB-KEC' => "United Kingdom: Kensington and
Chelsea",
		'GB-KEN' => "United Kingdom: Kent",
		'GB-KHL' => "United Kingdom: Kingston upon Hull",
		'GB-KTT' => "United Kingdom: Kingston upon
Thames",
		'GB-KIR' => "United Kingdom: Kirklees",
		'GB-KWL' => "United Kingdom: Knowsley",
		'GB-LBH' => "United Kingdom: Lambeth",
		'GB-LAN' => "United Kingdom: Lancashire",
		'GB-LRN' => "United Kingdom: Larne",
		'GB-LDS' => "United Kingdom: Leeds",
		'GB-LCE' => "United Kingdom: Leicester",
		'GB-LEC' => "United Kingdom: Leicestershire",
		'GB-LEW' => "United Kingdom: Lewisham",
		'GB-LMV' => "United Kingdom: Limavady",
		'GB-LIN' => "United Kingdom: Lincolnshire",
		'GB-LSB' => "United Kingdom: Lisburn",
		'GB-LIV' => "United Kingdom: Liverpool",
		'GB-LND' => "United Kingdom: London, City of",
		'GB-LUT' => "United Kingdom: Luton",
		'GB-MFT' => "United Kingdom: Magherafelt",
		'GB-MAN' => "United Kingdom: Manchester",
		'GB-MDW' => "United Kingdom: Medway",
		'GB-MTY' => "United Kingdom: Merthyr Tydfil (Merthyr
Tudful)",
		'GB-MRT' => "United Kingdom: Merton",
		'GB-MDB' => "United Kingdom: Middlesbrough",
		'GB-MLN' => "United Kingdom: Midlothian",
		'GB-MIK' => "United Kingdom: Milton Keynes",
		'GB-MON' => "United Kingdom: Monmouthshire (Sir
Fynwy)",
		'GB-MRY' => "United Kingdom: Moray",
		'GB-MYL' => "United Kingdom: Moyle",
		'GB-NTL' => "United Kingdom: Neath Port Talbot
(Castell-nedd Port Talbot)",
		'GB-NET' => "United Kingdom: Newcastle upon Tyne",
		'GB-NWM' => "United Kingdom: Newham",
		'GB-NWP' => "United Kingdom: Newport (Casnewydd)",
		'GB-NYM' => "United Kingdom: Newry and Mourne",
		'GB-NTA' => "United Kingdom: Newtownabbey",
		'GB-NFK' => "United Kingdom: Norfolk",
		'GB-NAY' => "United Kingdom: North Ayrshire",
		'GB-NDN' => "United Kingdom: North Down",
		'GB-NEL' => "United Kingdom: North East
Lincolnshire",
		'GB-NLK' => "United Kingdom: North Lanarkshire",
		'GB-NLN' => "United Kingdom: North Lincolnshire",
		'GB-NSM' => "United Kingdom: North Somerset",
		'GB-NTY' => "United Kingdom: North Tyneside",
		'GB-NYK' => "United Kingdom: North Yorkshire",
		'GB-NTH' => "United Kingdom: Northamptonshire",
		'GB-NIR' => "United Kingdom: Northern Ireland",
		'GB-NBL' => "United Kingdom: Northumberland",
		'GB-NGM' => "United Kingdom: Nottingham",
		'GB-NTT' => "United Kingdom: Nottinghamshire",
		'GB-OLD' => "United Kingdom: Oldham",
		'GB-OMH' => "United Kingdom: Omagh",
		'GB-ORK' => "United Kingdom: Orkney Islands",
		'GB-OXF' => "United Kingdom: Oxfordshire",
		'GB-PEM' => "United Kingdom: Pembrokeshire (Sir
Benfro)",
		'GB-PKN' => "United Kingdom: Perth and Kinross",
		'GB-PTE' => "United Kingdom: Peterborough",
		'GB-PLY' => "United Kingdom: Plymouth",
		'GB-POL' => "United Kingdom: Poole",
		'GB-POR' => "United Kingdom: Portsmouth",
		'GB-POW' => "United Kingdom: Powys",
		'GB-RDG' => "United Kingdom: Reading",
		'GB-RDB' => "United Kingdom: Redbridge",
		'GB-RCC' => "United Kingdom: Redcar and
Cleveland",
		'GB-RFW' => "United Kingdom: Renfrewshire",
		'GB-RCT' => "United Kingdom: Rhondda, Cynon, Taff
(Rhondda, Cynon, Taf)",
		'GB-RIC' => "United Kingdom: Richmond upon
Thames",
		'GB-RCH' => "United Kingdom: Rochdale",
		'GB-ROT' => "United Kingdom: Rotherham",
		'GB-RUT' => "United Kingdom: Rutland",
		'GB-SLF' => "United Kingdom: Salford",
		'GB-SAW' => "United Kingdom: Sandwell",
		'GB-SCT' => "United Kingdom: Scotland",
		'GB-SCB' => "United Kingdom: Scottish Borders,
The",
		'GB-SFT' => "United Kingdom: Sefton",
		'GB-SHF' => "United Kingdom: Sheffield",
		'GB-ZET' => "United Kingdom: Shetland Islands",
		'GB-SHR' => "United Kingdom: Shropshire",
		'GB-SLG' => "United Kingdom: Slough",
		'GB-SOL' => "United Kingdom: Solihull",
		'GB-SOM' => "United Kingdom: Somerset",
		'GB-SAY' => "United Kingdom: South Ayrshire",
		'GB-SGC' => "United Kingdom: South
Gloucestershire",
		'GB-SLK' => "United Kingdom: South Lanarkshire",
		'GB-STY' => "United Kingdom: South Tyneside",
		'GB-STH' => "United Kingdom: Southampton",
		'GB-SOS' => "United Kingdom: Southend-on-Sea",
		'GB-SWK' => "United Kingdom: Southwark",
		'GB-SHN' => "United Kingdom: St. Helens",
		'GB-STS' => "United Kingdom: Staffordshire",
		'GB-STG' => "United Kingdom: Stirling",
		'GB-SKP' => "United Kingdom: Stockport",
		'GB-STT' => "United Kingdom: Stockton-on-Tees",
		'GB-STE' => "United Kingdom: Stoke-on-Trent",
		'GB-STB' => "United Kingdom: Strabane",
		'GB-SFK' => "United Kingdom: Suffolk",
		'GB-SND' => "United Kingdom: Sunderland",
		'GB-SRY' => "United Kingdom: Surrey",
		'GB-STN' => "United Kingdom: Sutton",
		'GB-SWA' => "United Kingdom: Swansea (Abertawe)",
		'GB-SWD' => "United Kingdom: Swindon",
		'GB-TAM' => "United Kingdom: Tameside",
		'GB-TFW' => "United Kingdom: Telford and Wrekin",
		'GB-THR' => "United Kingdom: Thurrock",
		'GB-TOB' => "United Kingdom: Torbay",
		'GB-TOF' => "United Kingdom: Torfaen (Tor-faen)",
		'GB-TWH' => "United Kingdom: Tower Hamlets",
		'GB-TRF' => "United Kingdom: Trafford",
		'GB-UKM' => "United Kingdom: United Kingdom",
		'GB-VGL' => "United Kingdom: Vale of Glamorgan, The
(Bro Morgannwg)",
		'GB-WKF' => "United Kingdom: Wakefield",
		'GB-WLS' => "United Kingdom: Wales",
		'GB-WLL' => "United Kingdom: Walsall",
		'GB-WFT' => "United Kingdom: Waltham Forest",
		'GB-WND' => "United Kingdom: Wandsworth",
		'GB-WRT' => "United Kingdom: Warrington",
		'GB-WAR' => "United Kingdom: Warwickshire",
		'GB-WBK' => "United Kingdom: West Berkshire",
		'GB-WDU' => "United Kingdom: West Dunbartonshire",
		'GB-WLN' => "United Kingdom: West Lothian",
		'GB-WSX' => "United Kingdom: West Sussex",
		'GB-WSM' => "United Kingdom: Westminster",
		'GB-WGN' => "United Kingdom: Wigan",
		'GB-WNM' => "United Kingdom: Windsor and
Maidenhead",
		'GB-WRL' => "United Kingdom: Wirral",
		'GB-WOK' => "United Kingdom: Wokingham",
		'GB-WLV' => "United Kingdom: Wolverhampton",
		'GB-WOR' => "United Kingdom: Worcestershire",
		'GB-WRX' => "United Kingdom: Wrexham (Wrecsam)",
		'GB-YOR' => "United Kingdom: York",

		'--US'  => "", '-US' => "United
States",
		'US-AL' => "United States: Alabama",
		'US-AK' => "United States: Alaska",
		'US-AS' => "United States: American Samoa, Samoa
Americana",
		'US-AZ' => "United States: Arizona",
		'US-AR' => "United States: Arkansas",
		'US-CA' => "United States: California",
		'US-CO' => "United States: Colorado",
		'US-CT' => "United States: Connecticut",
		'US-DE' => "United States: Delaware",
		'US-DC' => "United States: District of Columbia,
Disricte de Columbia",
		'US-FL' => "United States: Florida",
		'US-GA' => "United States: Georgia, Geòrgia",
		'US-GU' => "United States: Guam",
		'US-HI' => "United States: Hawaii",
		'US-ID' => "United States: Idaho",
		'US-IL' => "United States: Illinois",
		'US-IN' => "United States: Indiana",
		'US-IA' => "United States: Iowa",
		'US-KS' => "United States: Kansas",
		'US-KY' => "United States: Kentucky",
		'US-LA' => "United States: Louisiana",
		'US-ME' => "United States: Maine",
		'US-MD' => "United States: Maryland",
		'US-MA' => "United States: Massachusetts",
		'US-MI' => "United States: Michigan",
		'US-MN' => "United States: Minnesota",
		'US-MS' => "United States: Mississippi",
		'US-MO' => "United States: Missouri",
		'US-MT' => "United States: Montana",
		'US-NE' => "United States: Nebraska",
		'US-NV' => "United States: Nevada",
		'US-NH' => "United States: New Hampshire",
		'US-NJ' => "United States: New Jersey",
		'US-NM' => "United States: New Mexico",
		'US-NY' => "United States: New York",
		'US-NC' => "United States: North Carolina",
		'US-ND' => "United States: North Dakota",
		'US-MP' => "United States: Northern Mariana Islands,
Illes Marianes del Nord",
		'US-OH' => "United States: Ohio",
		'US-OK' => "United States: Oklahoma",
		'US-OR' => "United States: Oregon",
		'US-PA' => "United States: Pennsylvania",
		'US-PR' => "United States: Puerto Rico",
		'US-RI' => "United States: Rhode Island",
		'US-SC' => "United States: South Carolina",
		'US-SD' => "United States: South Dakota",
		'US-TN' => "United States: Tennessee",
		'US-TX' => "United States: Texas",
		'US-UM' => "United States: United States Minor Outlying
Islands, Illes Perifèriques Menors dels EUA",
		'US-UT' => "United States: Utah",
		'US-VT' => "United States: Vermont",
		'US-VI' => "United States: Virgin Islands, Illes
Verge",
		'US-VA' => "United States: Virginia",
		'US-WA' => "United States: Washington",
		'US-WV' => "United States: West Virginia",
		'US-WI' => "United States: Wisconsin",
		'US-WY' => "United States: Wyoming",

		'--VN'  => "", '-VN' =>
"Vietnam",
		'VN-44' => "Vietnam: An Giang",
		'VN-43' => "Vietnam: Bà Rịa - Vũng Tàu",
		'VN-57' => "Vietnam: Bình Dương",
		'VN-58' => "Vietnam: Bình Phước",
		'VN-40' => "Vietnam: Bình Thuận",
		'VN-31' => "Vietnam: Bình Định",
		'VN-55' => "Vietnam: Bạc Liêu",
		'VN-54' => "Vietnam: Bắc Giang",
		'VN-53' => "Vietnam: Bắc Kạn",
		'VN-56' => "Vietnam: Bắc Ninh",
		'VN-50' => "Vietnam: Bến Tre",
		'VN-04' => "Vietnam: Cao Bằng",
		'VN-59' => "Vietnam: Cà Mau",
		'VN-48' => "Vietnam: Cần Thơ",
		'VN-30' => "Vietnam: Gia Lai",
		'VN-14' => "Vietnam: Hoà Bình",
		'VN-03' => "Vietnam: Hà Giang",
		'VN-63' => "Vietnam: Hà Nam",
		'VN-64' => "Vietnam: Hà Nội, thủ đô",
		'VN-15' => "Vietnam: Hà Tây",
		'VN-23' => "Vietnam: Hà Tỉnh",
		'VN-66' => "Vietnam: Hưng Yên",
		'VN-61' => "Vietnam: Hải Duong",
		'VN-62' => "Vietnam: Hải Phòng, thành phố",
		'VN-73' => "Vietnam: Hậu Giang",
		'VN-65' => "Vietnam: Hồ Chí Minh, thành phố [Sài
Gòn]",
		'VN-34' => "Vietnam: Khánh Hòa",
		'VN-47' => "Vietnam: Kiên Giang",
		'VN-28' => "Vietnam: Kon Tum",
		'VN-01' => "Vietnam: Lai Châu",
		'VN-41' => "Vietnam: Long An",
		'VN-02' => "Vietnam: Lào Cai",
		'VN-35' => "Vietnam: Lâm Đồng",
		'VN-09' => "Vietnam: Lạng Sơn",
		'VN-67' => "Vietnam: Nam Định",
		'VN-22' => "Vietnam: Nghệ An",
		'VN-18' => "Vietnam: Ninh Bình",
		'VN-36' => "Vietnam: Ninh Thuận",
		'VN-68' => "Vietnam: Phú Thọ",
		'VN-32' => "Vietnam: Phú Yên",
		'VN-24' => "Vietnam: Quảng Bình",
		'VN-27' => "Vietnam: Quảng Nam",
		'VN-29' => "Vietnam: Quảng Ngãi",
		'VN-13' => "Vietnam: Quảng Ninh",
		'VN-25' => "Vietnam: Quảng Trị",
		'VN-52' => "Vietnam: Sóc Trăng",
		'VN-05' => "Vietnam: Sơn La",
		'VN-21' => "Vietnam: Thanh Hóa",
		'VN-20' => "Vietnam: Thái Bình",
		'VN-69' => "Vietnam: Thái Nguyên",
		'VN-26' => "Vietnam: Thừa Thiên-Huế",
		'VN-46' => "Vietnam: Tiền Giang",
		'VN-51' => "Vietnam: Trà Vinh",
		'VN-07' => "Vietnam: Tuyên Quang",
		'VN-37' => "Vietnam: Tây Ninh",
		'VN-49' => "Vietnam: Vĩnh Long",
		'VN-70' => "Vietnam: Vĩnh Phúc",
		'VN-06' => "Vietnam: Yên Bái",
		'VN-71' => "Vietnam: Điện Biên",
		'VN-60' => "Vietnam: Đà Nẵng, thành phố",
		'VN-33' => "Vietnam: Đắc Lắk",
		'VN-72' => "Vietnam: Đắk Nông",
		'VN-39' => "Vietnam: Đồng Nai",
		'VN-45' => "Vietnam: Đồng Tháp",
	];

}
grouplevel.php000064400000004434151155626660007463 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text as JText;
use Joomla\Registry\Registry;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_GroupLevel extends \RegularLabs\Library\Field
{
	public $type = 'GroupLevel';

	protected function getInput()
	{
		$size      = (int) $this->get('size');
		$multiple  = $this->get('multiple');
		$show_all  = $this->get('show_all');
		$use_names = $this->get('use_names');

		return $this->selectListAjax(
			$this->type, $this->name, $this->value, $this->id,
			compact('size', 'multiple', 'show_all',
'use_names')
		);
	}

	function getAjaxRaw(Registry $attributes)
	{
		$name     = $attributes->get('name', $this->type);
		$id       = $attributes->get('id', strtolower($name));
		$value    = $attributes->get('value', []);
		$size     = $attributes->get('size');
		$multiple = $attributes->get('multiple');

		$options = $this->getOptions(
			(bool) $attributes->get('show_all'),
			(bool) $attributes->get('use_names')
		);

		return $this->selectList($options, $name, $value, $id, $size,
$multiple);
	}

	protected function getOptions($show_all = false, $use_names = false)
	{
		$options = $this->getUserGroups($use_names);

		if ($show_all)
		{
			$option          = (object) [];
			$option->value   = -1;
			$option->text    = '- ' . JText::_('JALL') .
' -';
			$option->disable = '';
			array_unshift($options, $option);
		}

		return $options;
	}

	protected function getUserGroups($use_names = false)
	{
		$value = $use_names ? 'a.title' : 'a.id';

		$query = $this->db->getQuery(true)
			->select($value . ' as value, a.title as text, a.parent_id AS
parent')
			->from('#__usergroups AS a')
			->select('COUNT(DISTINCT b.id) AS level')
			->join('LEFT', '#__usergroups AS b ON a.lft > b.lft
AND a.rgt < b.rgt')
			->group('a.id')
			->order('a.lft ASC');
		$this->db->setQuery($query);

		return $this->db->loadObjectList();
	}
}
header.php000064400000006420151155626660006524 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Application\ApplicationHelper as JApplicationHelper;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\RegEx as RL_RegEx;
use RegularLabs\Library\StringHelper as RL_String;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Header extends \RegularLabs\Library\Field
{
	public $type = 'Header';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$title       = $this->get('label');
		$description = $this->get('description');
		$xml         = $this->get('xml');
		$url         = $this->get('url');

		if ($description)
		{
			$description =
RL_String::html_entity_decoder(trim(JText::_($description)));
		}

		if ($title)
		{
			$title = JText::_($title);
		}

		if ($description)
		{
			// Replace inline monospace style with rl_code classname
			$description = str_replace('span
style="font-family:monospace;"', 'span
class="rl_code"', $description);

			// 'Break' plugin style tags
			$description = str_replace(['{', '['],
['<span>{</span>',
'<span>[</span>'], $description);

			// Wrap in paragraph (if not already starting with an html tag)
			if ($description[0] != '<')
			{
				$description = '<p>' . $description .
'</p>';
			}
		}

		if ( ! $xml && $this->form->getValue('element'))
		{
			if ($this->form->getValue('folder'))
			{
				$xml = 'plugins/' .
$this->form->getValue('folder') . '/' .
$this->form->getValue('element') . '/' .
$this->form->getValue('element') . '.xml';
			}
			else
			{
				$xml = 'administrator/modules/' .
$this->form->getValue('element') . '/' .
$this->form->getValue('element') . '.xml';
			}
		}

		if ($xml)
		{
			$xml     = JApplicationHelper::parseXMLInstallFile(JPATH_SITE .
'/' . $xml);
			$version = 0;
			if ($xml && isset($xml['version']))
			{
				$version = $xml['version'];
			}
			if ($version)
			{
				if (strpos($version, 'PRO') !== false)
				{
					$version = str_replace('PRO', '', $version);
					$version .= ' <small
style="color:green">[PRO]</small>';
				}
				else if (strpos($version, 'FREE') !== false)
				{
					$version = str_replace('FREE', '', $version);
					$version .= ' <small
style="color:green">[FREE]</small>';
				}
				if ($title)
				{
					$title .= ' v';
				}
				else
				{
					$title = JText::_('Version') . ' ';
				}
				$title .= $version;
			}
		}
		$html = [];

		if ($title)
		{
			if ($url)
			{
				$title = '<a href="' . $url . '"
target="_blank" title="'
					. RL_RegEx::replace('<[^>]*>', '',
$title) . '">' . $title . '</a>';
			}
			$html[] = '<h4>' .
RL_String::html_entity_decoder($title) . '</h4>';
		}

		if ($description)
		{
			$html[] = $description;
		}

		if ($url)
		{
			$html[] = '<p><a href="' . $url . '"
class="btn btn-default" target="_blank"
title="' . JText::_('RL_MORE_INFO') .
'">' . JText::_('RL_MORE_INFO') . '
>></a></p>';
		}

		return '</div><div>' . implode('',
$html);
	}
}
header_library.php000064400000003060151155626660010245 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text as JText;

require_once __DIR__ . '/header.php';

class JFormFieldRL_Header_Library extends JFormFieldRL_Header
{
	protected function getInput()
	{
		$extensions = [
			'Add to Menu',
			'Advanced Module Manager',
			'Advanced Template Manager',
			'Articles Anywhere',
			'Articles Field',
			'Better Preview',
			'Better Trash',
			'Cache Cleaner',
			'CDN for Joomla!',
			'Components Anywhere',
			'Conditional Content',
			'Content Templater',
			'DB Replacer',
			'Dummy Content',
			'Email Protector',
			'GeoIP',
			'IP Login',
			'Modals',
			'Modules Anywhere',
			'Quick Index',
			'Regular Labs Extension Manager',
			'ReReplacer',
			'Simple User Notes',
			'Sliders',
			'Snippets',
			'Sourcerer',
			'Tabs',
			'Tooltips',
			'What? Nothing!',
		];

		$list = '<ul><li>' .
implode('</li><li>', $extensions) .
'</li></ul>';

		$attributes = $this->element->attributes();

		$warning = '';
		if (isset($attributes['warning']))
		{
			$warning = '<div class="alert alert-danger">'
. JText::_($attributes['warning']) . '</div>';
		}

		$this->element->attributes()['description'] =
JText::sprintf($attributes['description'], $warning, $list);

		return parent::getInput();
	}
}
hikashop.php000064400000005110151155626660007075 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_HikaShop extends \RegularLabs\Library\FieldGroup
{
	public $type = 'HikaShop';

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['categories' =>
'category', 'products' => 'product']))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getCategories()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__hikashop_category')
			->where('category_published > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear()
			->select('c.category_id')
			->from('#__hikashop_category AS c')
			->where('c.category_type = ' .
$this->db->quote('root'));
		$this->db->setQuery($query);
		$root = (int) $this->db->loadResult();

		$query->clear()
			->select('c.category_id as id, c.category_parent_id AS
parent_id, c.category_name AS title, c.category_published as
published')
			->from('#__hikashop_category AS c')
			->where('c.category_type = ' .
$this->db->quote('product'))
			->where('c.category_published > -1')
			->order('c.category_ordering, c.category_name');
		$this->db->setQuery($query);
		$items = $this->db->loadObjectList();

		return $this->getOptionsTreeByList($items, $root);
	}

	function getProducts()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__hikashop_product AS p')
			->where('p.product_published = 1')
			->where('p.product_type = ' .
$this->db->quote('main'));
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear('select')
			->select('p.product_id as id, p.product_name AS name,
p.product_published AS published, c.category_name AS cat')
			->join('LEFT', '#__hikashop_product_category AS x ON
x.product_id = p.product_id')
			->join('INNER', '#__hikashop_category AS c ON
c.category_id = x.category_id')
			->group('p.product_id')
			->order('p.product_id');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list, ['cat',
'id']);
	}
}
icons.php000064400000006063151155626660006412 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text as JText;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Icons extends \RegularLabs\Library\Field
{
	public $type = 'Icons';

	protected function getInput()
	{
		$value = $this->value;
		if ( ! is_array($value))
		{
			$value = explode(',', $value);
		}

		$classes = [
			'reglab icon-contenttemplater',
			'home',
			'user',
			'locked',
			'comments',
			'comments-2',
			'out',
			'plus',
			'pencil',
			'pencil-2',
			'file',
			'file-add',
			'file-remove',
			'copy',
			'folder',
			'folder-2',
			'picture',
			'pictures',
			'list-view',
			'power-cord',
			'cube',
			'puzzle',
			'flag',
			'tools',
			'cogs',
			'cog',
			'equalizer',
			'wrench',
			'brush',
			'eye',
			'star',
			'calendar',
			'calendar-2',
			'help',
			'support',
			'warning',
			'checkmark',
			'mail',
			'mail-2',
			'drawer',
			'drawer-2',
			'box-add',
			'box-remove',
			'search',
			'filter',
			'camera',
			'play',
			'music',
			'grid-view',
			'grid-view-2',
			'menu',
			'thumbs-up',
			'thumbs-down',
			'plus-2',
			'minus-2',
			'key',
			'quote',
			'quote-2',
			'database',
			'location',
			'zoom-in',
			'zoom-out',
			'health',
			'wand',
			'refresh',
			'vcard',
			'clock',
			'compass',
			'address',
			'feed',
			'flag-2',
			'pin',
			'lamp',
			'chart',
			'bars',
			'pie',
			'dashboard',
			'lightning',
			'move',
			'printer',
			'color-palette',
			'camera-2',
			'cart',
			'basket',
			'broadcast',
			'screen',
			'tablet',
			'mobile',
			'users',
			'briefcase',
			'download',
			'upload',
			'bookmark',
			'out-2',
		];

		$html = [];

		if ($this->get('show_none'))
		{
			$checked = (in_array('0', $value) ? '
checked="checked"' : '');
			$html[]  = '<fieldset>';
			$html[]  = '<input type="radio" id="' .
$this->id . '0" name="' . $this->name .
'"' . ' value="0"' . $checked .
'>';
			$html[]  = '<label for="' . $this->id .
'0">' . JText::_('RL_NO_ICON') .
'</label>';
			$html[]  = '</fieldset>';
		}

		foreach ($classes as $i => $class)
		{
			$id      = str_replace(' ', '_', $this->id .
$class);
			$checked = (in_array($class, $value) ? '
checked="checked"' : '');

			$html[] = '<fieldset class="pull-left">';
			$html[] = '<input type="radio" id="' . $id .
'" name="' . $this->name . '"'
				. ' value="' . htmlspecialchars($class, ENT_COMPAT,
'UTF-8') . '"' . $checked . '>';
			$html[] = '<label for="' . $id . '"
class="btn btn-small hasTip" title="' . $class .
'"><span class="icon-' . $class .
'"></span></label>';
			$html[] = '</fieldset>';
		}

		return '<div id="' . $this->id . '"
class="btn-group radio rl_icon_group">' .
implode('', $html) . '</div>';
	}
}
isinstalled.php000064400000001777151155626660007621 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use RegularLabs\Library\Extension as RL_Extension;

jimport('joomla.form.formfield');

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_IsInstalled extends \RegularLabs\Library\Field
{
	public $type = 'IsInstalled';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$is_installed =
RL_Extension::isInstalled($this->get('extension'),
$this->get('extension_type'),
$this->get('folder'));

		return '<input type="hidden" name="' .
$this->name . '" id="' . $this->id . '"
value="' . (int) $is_installed . '">';
	}
}
k2.php000064400000006147151155626660005616 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

// If controller.php exists, assume this is K2 v3
defined('RL_K2_VERSION') or define('RL_K2_VERSION',
file_exists(JPATH_ADMINISTRATOR .
'/components/com_k2/controller.php') ? 3 : 2);

class JFormFieldRL_K2 extends \RegularLabs\Library\FieldGroup
{
	public $type = 'K2';

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['categories',
'items', 'tags']))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getCategories()
	{
		$state_field = RL_K2_VERSION == 3 ? 'state' :
'published';

		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__k2_categories AS c')
			->where('c.' . $state_field . ' > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$parent_field   = RL_K2_VERSION == 3 ? 'parent_id' :
'parent';
		$title_field    = RL_K2_VERSION == 3 ? 'title' :
'name';
		$ordering_field = RL_K2_VERSION == 3 ? 'lft' :
'ordering';

		$query->clear('select')
			->select('c.id, c.' . $parent_field . ' AS parent_id,
c.' . $title_field . ' AS title, c.' . $state_field . '
AS published');
		if ( ! $this->get('getcategories', 1))
		{
			$query->where('c.' . $parent_field . ' = 0');
		}
		$query->order('c.' . $ordering_field . ', c.' .
$title_field);
		$this->db->setQuery($query);
		$items = $this->db->loadObjectList();

		return $this->getOptionsTreeByList($items);
	}

	function getTags()
	{
		$state_field = RL_K2_VERSION == 3 ? 'state' :
'published';

		$query = $this->db->getQuery(true)
			->select('t.name as id, t.name as name')
			->from('#__k2_tags AS t')
			->where('t.' . $state_field . ' = 1')
			->where('t.name != ' .
$this->db->quote(''))
			->group('t.name')
			->order('t.name');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list);
	}

	function getItems()
	{
		$state_field = RL_K2_VERSION == 3 ? 'state' :
'published';

		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__k2_items AS i')
			->where('i.' . $state_field . ' > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$cat_title_field = RL_K2_VERSION == 3 ? 'title' :
'name';

		$query->clear('select')
			->select('i.id, i.title as name, c.' . $cat_title_field .
' as cat, i.' . $state_field . ' as published')
			->join('LEFT', '#__k2_categories AS c ON c.id =
i.catid')
			->group('i.id')
			->order('i.title, i.ordering, i.id');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list, ['cat',
'id']);
	}
}
key.php000064400000005560151155626660006070 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text as JText;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Key extends \RegularLabs\Library\Field
{
	public $type = 'Key';

	protected function getInput()
	{
		$action = $this->get('action',
'Joomla.submitbutton(\'config.save.component.apply\')');

		$key = trim($this->value);

		if ( ! $key)
		{
			return '<div id="' . $this->id . '_field"
class="btn-wrapper input-append clearfix">'
				. '<input type="text" class="rl_codefield"
name="' . $this->name . '" id="' .
$this->id . '" autocomplete="off"
value="">'
				. '<button href="#" class="btn btn-success"
title="' . JText::_('JAPPLY') . '"
onclick="' . $action . '">'
				. '<span
class="icon-checkmark"></span>'
				. '</button>'
				. '</div>';
		}

		$cloak_length = max(0, strlen($key) - 4);
		$key          = str_repeat('*', $cloak_length) .
substr($this->value, $cloak_length);

		$show = 'jQuery(\'#' . $this->id .
'\').attr(\'name\', \'' . $this->name .
'\');'
			. 'jQuery(\'#' . $this->id .
'_hidden\').attr(\'name\', \'\');'
			. 'jQuery(\'#' . $this->id .
'_button\').hide();'
			. 'jQuery(\'#' . $this->id .
'_field\').show();';

		$hide = 'jQuery(\'#' . $this->id .
'\').attr(\'name\', \'\');'
			. 'jQuery(\'#' . $this->id .
'_hidden\').attr(\'name\', \'' .
$this->name . '\');'
			. 'jQuery(\'#' . $this->id .
'_field\').hide();'
			. 'jQuery(\'#' . $this->id .
'_button\').show();';

		return
			'<div class="rl_keycode pull-left">' . $key .
'</div>'

			. '<div id="' . $this->id . '_button"
class="pull-left">'
			. '<button class="btn btn-default btn-small"
onclick="' . $show . ';return false;">'
			. '<span class="icon-edit"></span> '
			. JText::_('JACTION_EDIT')
			. '</button>'
			. '</div>'

			. '<div class="clearfix"></div>'

			. '<div id="' . $this->id . '_field"
class="btn-wrapper input-append clearfix"
style="display:none;">'
			. '<input type="text" class="rl_codefield"
name="" id="' . $this->id . '"
autocomplete="off" value="">'
			. '<button href="#" class="btn btn-success
btn" title="' . JText::_('JAPPLY') . '"
onclick="' . $action . '">'
			. '<span class="icon-checkmark"></span>'
			. '</button>'
			. '<button href="#" class="btn btn-danger
btn" title="' . JText::_('JCANCEL') . '"
onclick="' . $hide . ';return false;">'
			. '<span class="icon-cancel-2"></span>'
			. '</button>'
			. '</div>'

			. '<input type="hidden" name="' .
$this->name . '" id="' . $this->id .
'_hidden" value="' . $this->value .
'">';
	}
}

languages.php000064400000003363151155626670007246 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\Registry\Registry;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Languages extends \RegularLabs\Library\Field
{
	public $type = 'Languages';

	protected function getInput()
	{
		$size     = (int) $this->get('size');
		$multiple = $this->get('multiple');

		return $this->selectListSimpleAjax(
			$this->type, $this->name, $this->value, $this->id,
			compact('size', 'multiple')
		);
	}

	function getAjaxRaw(Registry $attributes)
	{
		$name     = $attributes->get('name', $this->type);
		$id       = $attributes->get('id', strtolower($name));
		$value    = $attributes->get('value', []);
		$size     = $attributes->get('size');
		$multiple = $attributes->get('multiple');

		$options = $this->getLanguages($value);

		return $this->selectListSimple($options, $name, $value, $id, $size,
$multiple);
	}

	function getLanguages($value)
	{
		$langs = JHtml::_('contentlanguage.existing');

		if ( ! is_array($value))
		{
			$value = [$value];
		}

		$options = [];

		foreach ($langs as $lang)
		{
			if (empty($lang->value))
			{
				continue;
			}

			$options[] = (object) [
				'value'    => $lang->value,
				'text'     => $lang->text . ' [' .
$lang->value . ']',
				'selected' => in_array($lang->value, $value),
			];
		}

		return $options;
	}
}
license.php000064400000001677151155626670006730 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use RegularLabs\Library\License as RL_License;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_License extends \RegularLabs\Library\Field
{
	public $type = 'License';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$extension = $this->get('extension');

		if (empty($extension))
		{
			return '';
		}

		$message = RL_License::getMessage($extension, true);

		if (empty($message))
		{
			return '';
		}

		return '</div><div>' . $message;
	}
}
list.php000064400000016434151155626670006256 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Supports a generic list of options.
 *
 * @since  1.7.0
 */
class JFormFieldList extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'List';

	/**
	 * Method to get the field input markup for a generic list.
	 * Use the multiple attribute to enable multiselect.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.7.0
	 */
	protected function getInput()
	{
		$html = array();
		$attr = '';

		// Initialize some field attributes.
		$attr .= !empty($this->class) ? ' class="' .
$this->class . '"' : '';
		$attr .= !empty($this->size) ? ' size="' .
$this->size . '"' : '';
		$attr .= $this->multiple ? ' multiple' : '';
		$attr .= $this->required ? ' required
aria-required="true"' : '';
		$attr .= $this->autofocus ? ' autofocus' : '';

		// To avoid user's confusion, readonly="true" should imply
disabled="true".
		if ((string) $this->readonly == '1' || (string)
$this->readonly == 'true' || (string) $this->disabled ==
'1'|| (string) $this->disabled == 'true')
		{
			$attr .= ' disabled="disabled"';
		}

		// Initialize JavaScript field attributes.
		$attr .= $this->onchange ? ' onchange="' .
$this->onchange . '"' : '';

		// Get the field options.
		$options = (array) $this->getOptions();

		// Create a read-only list (no name) with hidden input(s) to store the
value(s).
		if ((string) $this->readonly == '1' || (string)
$this->readonly == 'true')
		{
			$html[] = JHtml::_('select.genericlist', $options,
'', trim($attr), 'value', 'text',
$this->value, $this->id);

			// E.g. form field type tag sends $this->value as array
			if ($this->multiple && is_array($this->value))
			{
				if (!count($this->value))
				{
					$this->value[] = '';
				}

				foreach ($this->value as $value)
				{
					$html[] = '<input type="hidden" name="' .
$this->name . '" value="' . htmlspecialchars($value,
ENT_COMPAT, 'UTF-8') . '"/>';
				}
			}
			else
			{
				$html[] = '<input type="hidden" name="' .
$this->name . '" value="' .
htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') .
'"/>';
			}
		}
		else
		// Create a regular list passing the arguments in an array.
		{
			$listoptions = array();
			$listoptions['option.key'] = 'value';
			$listoptions['option.text'] = 'text';
			$listoptions['list.select'] = $this->value;
			$listoptions['id'] = $this->id;
			$listoptions['list.translate'] = false;
			$listoptions['option.attr'] = 'optionattr';
			$listoptions['list.attr'] = trim($attr);

			$html[] = JHtml::_('select.genericlist', $options,
$this->name, $listoptions);
		}

		return implode($html);
	}

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   3.7.0
	 */
	protected function getOptions()
	{
		$fieldname = preg_replace('/[^a-zA-Z0-9_\-]/', '_',
$this->fieldname);
		$options   = array();

		foreach ($this->element->xpath('option') as $option)
		{
			// Filter requirements
			if ($requires = explode(',', (string)
$option['requires']))
			{
				// Requires multilanguage
				if (in_array('multilanguage', $requires) &&
!JLanguageMultilang::isEnabled())
				{
					continue;
				}

				// Requires associations
				if (in_array('associations', $requires) &&
!JLanguageAssociations::isEnabled())
				{
					continue;
				}

				// Requires adminlanguage
				if (in_array('adminlanguage', $requires) &&
!JModuleHelper::isAdminMultilang())
				{
					continue;
				}

				// Requires vote plugin
				if (in_array('vote', $requires) &&
!JPluginHelper::isEnabled('content', 'vote'))
				{
					continue;
				}
			}

			$value = (string) $option['value'];
			$text  = trim((string) $option) != '' ? trim((string) $option)
: $value;

			$disabled = (string) $option['disabled'];
			$disabled = ($disabled == 'true' || $disabled ==
'disabled' || $disabled == '1');
			$disabled = $disabled || ($this->readonly && $value !=
$this->value);

			$checked = (string) $option['checked'];
			$checked = ($checked == 'true' || $checked ==
'checked' || $checked == '1');

			$selected = (string) $option['selected'];
			$selected = ($selected == 'true' || $selected ==
'selected' || $selected == '1');

			$tmp = array(
					'value'    => $value,
					'text'     => JText::alt($text, $fieldname),
					'disable'  => $disabled,
					'class'    => (string) $option['class'],
					'selected' => ($checked || $selected),
					'checked'  => ($checked || $selected),
			);

			// Set some event handler attributes. But really, should be using
unobtrusive js.
			$tmp['onclick']  = (string) $option['onclick'];
			$tmp['onchange'] = (string) $option['onchange'];

			if ((string) $option['showon'])
			{
				$tmp['optionattr'] = " data-showon='" .
					json_encode(
						JFormHelper::parseShowOnConditions((string)
$option['showon'], $this->formControl, $this->group)
						)
					. "'";
			}
			// Add the option object to the result set.
			$options[] = (object) $tmp;
		}

		if ($this->element['useglobal'])
		{
			$tmp        = new stdClass;
			$tmp->value = '';
			$tmp->text  = JText::_('JGLOBAL_USE_GLOBAL');
			$component  =
JFactory::getApplication()->input->getCmd('option');

			// Get correct component for menu items
			if ($component == 'com_menus')
			{
				$link      = $this->form->getData()->get('link');
				$uri       = new JUri($link);
				$component = $uri->getVar('option',
'com_menus');
			}

			$params = JComponentHelper::getParams($component);
			$value  = $params->get($this->fieldname);

			// Try with global configuration
			if (is_null($value))
			{
				$value = JFactory::getConfig()->get($this->fieldname);
			}

			// Try with menu configuration
			if (is_null($value) &&
JFactory::getApplication()->input->getCmd('option') ==
'com_menus')
			{
				$value =
JComponentHelper::getParams('com_menus')->get($this->fieldname);
			}

			if (!is_null($value))
			{
				$value = (string) $value;

				foreach ($options as $option)
				{
					if ($option->value === $value)
					{
						$value = $option->text;

						break;
					}
				}

				$tmp->text = JText::sprintf('JGLOBAL_USE_GLOBAL_VALUE',
$value);
			}

			array_unshift($options, $tmp);
		}

		reset($options);

		return $options;
	}

	/**
	 * Method to add an option to the list field.
	 *
	 * @param   string  $text        Text/Language variable of the option.
	 * @param   array   $attributes  Array of attributes ('name'
=> 'value' format)
	 *
	 * @return  JFormFieldList  For chaining.
	 *
	 * @since   3.7.0
	 */
	public function addOption($text, $attributes = array())
	{
		if ($text && $this->element instanceof SimpleXMLElement)
		{
			$child = $this->element->addChild('option', $text);

			foreach ($attributes as $name => $value)
			{
				$child->addAttribute($name, $value);
			}
		}

		return $this;
	}

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.7.0
	 */
	public function __get($name)
	{
		if ($name == 'options')
		{
			return $this->getOptions();
		}

		return parent::__get($name);
	}
}
loadlanguage.php000064400000002034151155626670007715 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use RegularLabs\Library\Language as RL_Language;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_LoadLanguage extends \RegularLabs\Library\Field
{
	public $type = 'LoadLanguage';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$extension = $this->get('extension');
		$admin     = $this->get('admin', 1);

		self::loadLanguage($extension, $admin);

		return '';
	}

	function loadLanguage($extension, $admin = 1)
	{
		if ( ! $extension)
		{
			return;
		}

		RL_Language::load($extension, $admin ? JPATH_ADMINISTRATOR : JPATH_SITE);
	}
}
menuitems.php000064400000006241151155626670007304 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text as JText;
use Joomla\Registry\Registry;
use RegularLabs\Library\Language as RL_Language;
use RegularLabs\Library\RegEx as RL_RegEx;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_MenuItems extends \RegularLabs\Library\Field
{
	public $type = 'MenuItems';

	protected function getInput()
	{
		$size     = (int) $this->get('size');
		$multiple = $this->get('multiple', 0);

		return $this->selectListAjax(
			$this->type, $this->name, $this->value, $this->id,
			compact('size', 'multiple')
		);
	}

	function getAjaxRaw(Registry $attributes)
	{
		$name     = $attributes->get('name', $this->type);
		$id       = $attributes->get('id', strtolower($name));
		$value    = $attributes->get('value', []);
		$size     = $attributes->get('size');
		$multiple = $attributes->get('multiple');

		$options = $this->getMenuItems();

		return $this->selectList($options, $name, $value, $id, $size,
$multiple);
	}

	/**
	 * Get a list of menu links for one or all menus.
	 */
	public static function getMenuItems()
	{
		RL_Language::load('com_modules', JPATH_ADMINISTRATOR);
		JLoader::register('MenusHelper', JPATH_ADMINISTRATOR .
'/components/com_menus/helpers/menus.php');
		$menuTypes = MenusHelper::getMenuLinks();

		foreach ($menuTypes as &$type)
		{
			$type->value      = 'type.' . $type->menutype;
			$type->text       = $type->title;
			$type->level      = 0;
			$type->class      = 'hidechildren';
			$type->labelclass = 'nav-header';

			$rlu[$type->menutype] = &$type;

			foreach ($type->links as &$link)
			{
				$check1 = RL_RegEx::replace('[^a-z0-9]', '',
strtolower($link->text));
				$check2 = RL_RegEx::replace('[^a-z0-9]', '',
$link->alias);

				$text   = [];
				$text[] = $link->text;

				if ($check1 !== $check2)
				{
					$text[] = '<span class="small ghosted">[' .
$link->alias . ']</span>';
				}

				if (in_array($link->type, ['separator',
'heading', 'alias', 'url']))
				{
					$text[] = '<span class="label label-info">'
. JText::_('COM_MODULES_MENU_ITEM_' . strtoupper($link->type))
. '</span>';
					// Don't disable, as you need to be able to select the 'Also
on Child Items' option
					// $link->disable = 1;
				}

				if ($link->published == 0)
				{
					$text[] = '<span class="label">' .
JText::_('JUNPUBLISHED') . '</span>';
				}

				if (JLanguageMultilang::isEnabled() && $link->language !=
'' && $link->language != '*')
				{
					$text[] = $link->language_image
						? JHtml::_('image', 'mod_languages/' .
$link->language_image . '.gif', $link->language_title,
['title' => $link->language_title], true)
						: '<span class="label" title="' .
$link->language_title . '">' . $link->language_sef
. '</span>';
				}

				$link->text = implode(' ', $text);
			}
		}

		return $menuTypes;
	}
}
mijoshop.php000064400000006450151155626700007122 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_MijoShop extends \RegularLabs\Library\FieldGroup
{
	public $type        = 'MijoShop';
	public $store_id    = 0;
	public $language_id = 1;

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['categories' =>
'category', 'products' => 'product']))
		{
			return $error;
		}

		if ( ! class_exists('MijoShop'))
		{
			require_once(JPATH_ROOT .
'/components/com_mijoshop/mijoshop/mijoshop.php');
		}

		$this->store_id    = (int)
MijoShop::get('opencart')->get('config')->get('config_store_id');
		$this->language_id = (int)
MijoShop::get('opencart')->get('config')->get('config_language_id');

		return $this->getSelectList();
	}

	function getCategories()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__mijoshop_category AS c')
			->join('INNER', '#__mijoshop_category_description AS
cd ON c.category_id = cd.category_id')
			->join('INNER', '#__mijoshop_category_to_store AS cts
ON c.category_id = cts.category_id')
			->where('c.status = 1')
			->where('cd.language_id = ' . $this->language_id)
			->where('cts.store_id = ' . $this->store_id)
			->group('c.category_id');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear('select')
			->select('c.category_id AS id, c.parent_id, cd.name AS title,
c.status AS published')
			->order('c.sort_order, cd.name');
		$this->db->setQuery($query);
		$items = $this->db->loadObjectList();

		return $this->getOptionsTreeByList($items);
	}

	function getProducts()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__mijoshop_product AS p')
			->join('INNER', '#__mijoshop_product_description AS pd
ON p.product_id = pd.product_id')
			->join('INNER', '#__mijoshop_product_to_store AS pts
ON p.product_id = pts.product_id')->where('p.status = 1')
			->where('p.date_available <= NOW()')
			->where('pd.language_id = ' . $this->language_id)
			->group('p.product_id');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear('select')
			->select('p.product_id as id, pd.name, p.model as model, cd.name
AS cat, p.status AS published')
			->join('LEFT', '#__mijoshop_product_to_category AS ptc
ON p.product_id = ptc.product_id')
			->join('LEFT', '#__mijoshop_category_description AS cd
ON ptc.category_id = cd.category_id')
			->join('LEFT', '#__mijoshop_category_to_store AS cts
ON ptc.category_id = cts.category_id')
			->where('cts.store_id = ' . $this->store_id)
			->where('cd.language_id = ' . $this->language_id)
			->where('cts.store_id = ' . $this->store_id)
			->order('pd.name, p.model');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list, ['model',
'cat', 'id']);
	}
}
modules.php000064400000013156151155626700006743 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\Form as RL_Form;
use RegularLabs\Library\RegEx as RL_RegEx;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Modules extends \RegularLabs\Library\Field
{
	public $type = 'Modules';

	protected function getInput()
	{
		JHtml::_('behavior.modal', 'a.modal');

		$size = $this->get('size') ? 'style="width:'
. $this->get('size') . 'px"' : '';

		$multiple  = $this->get('multiple');
		$showtype  = $this->get('showtype');
		$showid    = $this->get('showid');
		$showinput = $this->get('showinput');
		$showlink  = ! $multiple ? $this->get('showlink') : false;

		// load the list of modules
		$query = $this->db->getQuery(true)
			->select('m.id, m.title, m.position, m.module, m.published,
m.language')
			->from('#__modules AS m')
			->where('m.client_id = 0')
			->where('m.published > -2')
			->order('m.position, m.title, m.ordering, m.id');
		$this->db->setQuery($query);
		$modules = $this->db->loadObjectList();

		// assemble menu items to the array
		$options = [];

		$selected_title = '';

		$p = 0;
		foreach ($modules as $item)
		{
			if ($p !== $item->position)
			{
				$pos = $item->position;
				if ($pos == '')
				{
					$pos = ':: ' . JText::_('JNONE') . '
::';
				}
				$options[] = JHtml::_('select.option', '-', '[
' . $pos . ' ]', 'value', 'text', true);
			}
			$p = $item->position;

			$item->title = $item->title;
			if ($showtype)
			{
				$item->title .= ' [' . $item->module . ']';
			}
			if ($showinput || $showid)
			{
				$item->title .= ' [' . $item->id . ']';
			}
			if ($item->language && $item->language != '*')
			{
				$item->title .= ' (' . $item->language . ')';
			}
			$item->title = RL_Form::prepareSelectItem($item->title,
$item->published);

			$options[] = JHtml::_('select.option', $item->id,
$item->title);

			if ($showlink && $this->value == $item->id)
			{
				$selected_title = $item->title;
			}
		}

		if ($showinput)
		{
			array_unshift($options, JHtml::_('select.option',
'-', '&nbsp;', 'value', 'text',
true));
			array_unshift($options, JHtml::_('select.option',
'-', '- ' . JText::_('Select Item') . '
-'));

			if ($multiple)
			{
				$onchange = 'if ( this.value ) { if ( ' . $this->id .
'.value ) { ' . $this->id . '.value+=\',\'; }
' . $this->id . '.value+=this.value; }
this.value=\'\';';
			}
			else
			{
				$onchange = 'if ( this.value ) { ' . $this->id .
'.value=this.value;' . $this->id .
'_text.value=this.options[this.selectedIndex].innerHTML.replace(
/^((&|&amp;|&#160;)nbsp;|-)*/gm, \'\' ).trim(); }
this.value=\'\';';
			}
			$attribs = 'class="inputbox" onchange="' .
$onchange . '"';

			$html = '<table cellpadding="0"
cellspacing="0"><tr><td style="padding:
0px;">' . "\n";
			if ( ! $multiple)
			{
				$val_name = $this->value;
				if ($this->value)
				{
					foreach ($modules as $item)
					{
						if ($item->id == $this->value)
						{
							$val_name = $item->title;
							if ($showtype)
							{
								$val_name .= ' [' . $item->module . ']';
							}
							$val_name .= ' [' . $this->value . ']';
							break;
						}
					}
				}
				$html .= '<input type="text" id="' .
$this->id . '_text" value="' . $val_name .
'" class="inputbox" ' . $size . '
disabled="disabled">';
				$html .= '<input type="hidden" name="' .
$this->name . '" id="' . $this->id . '"
value="' . $this->value . '">';
			}
			else
			{
				$html .= '<input type="text" name="' .
$this->name . '" id="' . $this->id . '"
value="' . $this->value . '"
class="inputbox" ' . $size . '>';
			}
			$html .= '</td><td style="padding:
0px;"padding-left: 5px;>' . "\n";
			$html .= JHtml::_('select.genericlist', $options,
'', $attribs, 'value', 'text', '',
'');
			$html .= '</td></tr></table>' .
"\n";
		}
		else
		{
			$attr = $size;
			$attr .= $multiple ? ' multiple="multiple"' :
'';
			$attr .= ' class="input-xxlarge"';

			if ($showlink)
			{
				$link = '\'<a'
					. '
href=&quot;index.php?option=com_advancedmodules&task=module.edit&id=\'+this.value+\'&quot;'
					. ' target=&quot;_blank&quot; class=&quot;btn
btn-small&quot;>\''
					. '+\'<span
class=&quot;icon-edit&quot;></span>\' '
					. '+\'' . JText::_('JACTION_EDIT', true) .
' :\' '
					. '+(this.options[this.selectedIndex].text)'
					. '+\'</a>\'';

				$function = 'document.getElementById(\'module_link_' .
$this->id . '\').innerHTML = \'\';'
					. 'if(this.value){'
					. 'document.getElementById(\'module_link_' .
$this->id . '\').innerHTML = ' . $link . ';'
					. '}';

				$attr .= ' onchange="' . $function . '"';
			}

			$html = JHtml::_('select.genericlist', $options,
$this->name, trim($attr), 'value', 'text',
$this->value, $this->id);

			if ($showlink)
			{
				$link = $this->value
					? '<a
href="index.php?option=com_advancedmodules&task=module.edit&id='
. $this->value . '"'
					. ' target="_blank" class="btn
btn-small">'
					. '<span class="icon-edit"></span> '
					. JText::_('JACTION_EDIT') . ': ' .
$selected_title
					. '</a>'
					: '';

				$html .= '<div id="module_link_' . $this->id .
'" class="alert-block">'
					. $link
					. '</div>';
			}

			$html = '<div class="input-maximize">' . $html
. '</div>';
		}

		return RL_RegEx::replace('>\[\[\:(.*?)\:\]\]', '
style="\1">', $html);
	}
}
note.php000064400000003467151155626700006244 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Supports a one line text field.
 *
 * @link   http://www.w3.org/TR/html-markup/input.text.html#input.text
 * @since  1.7.0
 */
class JFormFieldNote extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Note';

	/**
	 * Method to get the field label markup.
	 *
	 * @return  string  The field label markup.
	 *
	 * @since   1.7.0
	 */
	protected function getLabel()
	{
		if (empty($this->element['label']) &&
empty($this->element['description']))
		{
			return '';
		}

		$title = $this->element['label'] ? (string)
$this->element['label'] :
($this->element['title'] ? (string)
$this->element['title'] : '');
		$heading = $this->element['heading'] ? (string)
$this->element['heading'] : 'h4';
		$description = (string) $this->element['description'];
		$class = !empty($this->class) ? ' class="' .
$this->class . '"' : '';
		$close = (string) $this->element['close'];

		$html = array();

		if ($close)
		{
			$close = $close == 'true' ? 'alert' : $close;
			$html[] = '<button type="button"
class="close" data-dismiss="' . $close .
'">&times;</button>';
		}

		$html[] = !empty($title) ? '<' . $heading . '>'
. JText::_($title) . '</' . $heading . '>' :
'';
		$html[] = !empty($description) ? JText::_($description) : '';

		return '</div><div ' . $class . '>' .
implode('', $html);
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		return '';
	}
}
onlypro.php000064400000004356151155626700006777 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use RegularLabs\Library\Extension as RL_Extension;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_OnlyPro extends \RegularLabs\Library\Field
{
	public $type = 'OnlyPro';

	protected function getLabel()
	{
		$label   = $this->prepareText($this->get('label'));
		$tooltip = $this->prepareText($this->get('description'));

		if ( ! $label && ! $tooltip)
		{
			return '</div><div>' . $this->getText();
		}

		if ( ! $label)
		{
			return $tooltip;
		}

		if ( ! $tooltip)
		{
			return $label;
		}

		return '<label class="hasPopover" title="' .
$label . '" data-content="' . htmlentities($tooltip) .
'">'
			. $label
			. '</label>';
	}

	protected function getInput()
	{
		$label   = $this->prepareText($this->get('label'));
		$tooltip = $this->prepareText($this->get('description'));

		if ( ! $label && ! $tooltip)
		{
			return '';
		}

		return $this->getText();
	}

	protected function getText()
	{
		$text = JText::_('RL_ONLY_AVAILABLE_IN_PRO');
		$text = '<em>' . $text . '</em>';

		$extension = $this->getExtensionName();

		$alias = RL_Extension::getAliasByName($extension);

		if ($alias)
		{
			$text = '<a
href="https://www.regularlabs.com/extensions/' . $extension .
'/features" target="_blank">'
				. $text
				. '</a>';
		}

		$class = $this->get('class');
		$class = $class ? ' class="' . $class . '"'
: '';

		return '<div' . $class . '>' . $text .
'</div>';
	}

	protected function getExtensionName()
	{
		if ($extension = $this->form->getValue('element'))
		{
			return $extension;
		}

		if ($extension =
JFactory::getApplication()->input->get('component'))
		{
			return str_replace('com_', '', $extension);
		}

		if ($extension =
JFactory::getApplication()->input->get('folder'))
		{
			$extension = explode('.', $extension);

			return array_pop($extension);
		}

		return false;
	}
}
plaintext.php000064400000002360151155626700007276 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_PlainText extends \RegularLabs\Library\Field
{
	public $type = 'PlainText';

	protected function getLabel()
	{
		$label   = $this->prepareText($this->get('label'));
		$tooltip = $this->prepareText($this->get('description'));

		if ( ! $label && ! $tooltip)
		{
			return '';
		}

		if ( ! $label)
		{
			return '<div>' . $tooltip . '</div>';
		}

		if ( ! $tooltip)
		{
			return '<div>' . $label . '</div>';
		}

		return '<label class="hasPopover" title="' .
$label . '" data-content="' . htmlentities($tooltip) .
'">'
			. $label . '</label>';
	}

	protected function getInput()
	{
		$text = $this->prepareText($this->value);

		if ( ! $text)
		{
			return '';
		}

		return '<fieldset class="rl_plaintext">' .
$text . '</fieldset>';
	}
}
range.php000064400000002642151155626700006365 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('number');

/**
 * Form Field class for the Joomla Platform.
 * Provides a horizontal scroll bar to specify a value in a range.
 *
 * @link   http://www.w3.org/TR/html-markup/input.text.html#input.text
 * @since  3.2
 */
class JFormFieldRange extends JFormFieldNumber
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $type = 'Range';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.range';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.2
	 */
	protected function getInput()
	{
		return
$this->getRenderer($this->layout)->render($this->getLayoutData());
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.7
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Initialize some field attributes.
		$extraData = array(
			'max' => $this->max,
			'min' => $this->min,
			'step' => $this->step,
		);

		return array_merge($data, $extraData);
	}
}
redshop.php000064400000006227151155626710006741 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use RegularLabs\Library\DB as RL_DB;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_RedShop extends \RegularLabs\Library\FieldGroup
{
	public $type = 'RedShop';

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['categories' =>
'category', 'products' => 'product']))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getCategories()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__redshop_category AS c')
			->where('c.published > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$this->db->setQuery($this->getCategoriesQuery());
		$items = $this->db->loadObjectList();

		return $this->getOptionsTreeByList($items);
	}

	function getProducts()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__redshop_product AS p')
			->where('p.published > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$this->db->setQuery($this->getProductsQuery());
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list, ['number',
'cat']);
	}

	private function getCategoriesQuery()
	{
		$query = $this->db->getQuery(true)
			->select('c.id, c.parent_id, c.name AS title, c.published')
			->from('#__redshop_category AS c')
			->where('c.published > -1');

		if (RL_DB::tableExists('redshop_category_xref'))
		{
			$query->clear('select')
				->select('c.category_id as id, x.category_parent_id AS
parent_id, c.category_name AS title, c.published')
				->join('LEFT', '#__redshop_category_xref AS x ON
x.category_child_id = c.category_id')
				->group('c.category_id')
				->order('c.ordering, c.category_name');

			return $query;
		}

		$query
			->group('c.id')
			->order('c.ordering, c.name');

		return $query;
	}

	private function getProductsQuery()
	{
		$query = $this->db->getQuery(true)
			->select('p.product_id as id, p.product_name AS name,
p.product_number as number, c.name AS cat, p.published')
			->from('#__redshop_product AS p')
			->where('p.published > -1')
			->join('LEFT', '#__redshop_product_category_xref AS x
ON x.product_id = p.product_id')
			->group('p.product_id')
			->order('p.product_name, p.product_number');

		if (RL_DB::tableExists('redshop_category_xref'))
		{
			$query->clear('select')
				->select('p.product_id as id, p.product_name AS name,
p.product_number as number, c.category_name AS cat, p.published')
				->join('LEFT', '#__redshop_category AS c ON
c.category_id = x.category_id');

			return $query;
		}

		$query
			->join('LEFT', '#__redshop_category AS c ON c.id =
x.category_id');

		return $query;
	}
}
regions.txt000064400000453605151155626710007001 0ustar00// Region codes
taken from https://documentation.snoobi.com/region-codes

'--AF' => '','-AF' =>
'Afghanistan',
'AF-01' => 'Afghanistan: Badakhshan',
'AF-02' => 'Afghanistan: Badghis',
'AF-03' => 'Afghanistan: Baghlan',
'AF-30' => 'Afghanistan: Balkh',
'AF-05' => 'Afghanistan: Bamian',
'AF-06' => 'Afghanistan: Farah',
'AF-07' => 'Afghanistan: Faryab',
'AF-08' => 'Afghanistan: Ghazni',
'AF-09' => 'Afghanistan: Ghowr',
'AF-10' => 'Afghanistan: Helmand',
'AF-11' => 'Afghanistan: Herat',
'AF-31' => 'Afghanistan: Jowzjan',
'AF-13' => 'Afghanistan: Kabol',
'AF-23' => 'Afghanistan: Kandahar',
'AF-14' => 'Afghanistan: Kapisa',
'AF-37' => 'Afghanistan: Khowst',
'AF-15' => 'Afghanistan: Konar',
'AF-34' => 'Afghanistan: Konar',
'AF-24' => 'Afghanistan: Kondoz',
'AF-16' => 'Afghanistan: Laghman',
'AF-35' => 'Afghanistan: Laghman',
'AF-17' => 'Afghanistan: Lowgar',
'AF-18' => 'Afghanistan: Nangarhar',
'AF-19' => 'Afghanistan: Nimruz',
'AF-38' => 'Afghanistan: Nurestan',
'AF-20' => 'Afghanistan: Oruzgan',
'AF-21' => 'Afghanistan: Paktia',
'AF-36' => 'Afghanistan: Paktia',
'AF-29' => 'Afghanistan: Paktika',
'AF-22' => 'Afghanistan: Parvan',
'AF-32' => 'Afghanistan: Samangan',
'AF-33' => 'Afghanistan: Sar-e Pol',
'AF-26' => 'Afghanistan: Takhar',
'AF-27' => 'Afghanistan: Vardak',
'AF-28' => 'Afghanistan: Zabol',

'--AL' => '','-AL' =>
'Albania',
'AL-40' => 'Albania: Berat',
'AL-41' => 'Albania: Diber',
'AL-42' => 'Albania: Durres',
'AL-43' => 'Albania: Elbasan',
'AL-44' => 'Albania: Fier',
'AL-45' => 'Albania: Gjirokaster',
'AL-46' => 'Albania: Korce',
'AL-47' => 'Albania: Kukes',
'AL-48' => 'Albania: Lezhe',
'AL-49' => 'Albania: Shkoder',
'AL-50' => 'Albania: Tirane',
'AL-51' => 'Albania: Vlore',

'--DZ' => '','-DZ' =>
'Algeria',
'DZ-34' => 'Algeria: Adrar',
'DZ-35' => 'Algeria: Ain Defla',
'DZ-36' => 'Algeria: Ain Temouchent',
'DZ-01' => 'Algeria: Alger',
'DZ-37' => 'Algeria: Annaba',
'DZ-03' => 'Algeria: Batna',
'DZ-38' => 'Algeria: Bechar',
'DZ-18' => 'Algeria: Bejaia',
'DZ-19' => 'Algeria: Biskra',
'DZ-20' => 'Algeria: Blida',
'DZ-39' => 'Algeria: Bordj Bou Arreridj',
'DZ-21' => 'Algeria: Bouira',
'DZ-40' => 'Algeria: Boumerdes',
'DZ-41' => 'Algeria: Chlef',
'DZ-04' => 'Algeria: Constantine',
'DZ-22' => 'Algeria: Djelfa',
'DZ-42' => 'Algeria: El Bayadh',
'DZ-43' => 'Algeria: El Oued',
'DZ-44' => 'Algeria: El Tarf',
'DZ-45' => 'Algeria: Ghardaia',
'DZ-23' => 'Algeria: Guelma',
'DZ-46' => 'Algeria: Illizi',
'DZ-24' => 'Algeria: Jijel',
'DZ-47' => 'Algeria: Khenchela',
'DZ-25' => 'Algeria: Laghouat',
'DZ-26' => 'Algeria: Mascara',
'DZ-06' => 'Algeria: Medea',
'DZ-48' => 'Algeria: Mila',
'DZ-07' => 'Algeria: Mostaganem',
'DZ-27' => 'Algeria: M\'sila',
'DZ-49' => 'Algeria: Naama',
'DZ-09' => 'Algeria: Oran',
'DZ-50' => 'Algeria: Ouargla',
'DZ-29' => 'Algeria: Oum el Bouaghi',
'DZ-51' => 'Algeria: Relizane',
'DZ-10' => 'Algeria: Saida',
'DZ-12' => 'Algeria: Setif',
'DZ-30' => 'Algeria: Sidi Bel Abbes',
'DZ-31' => 'Algeria: Skikda',
'DZ-52' => 'Algeria: Souk Ahras',
'DZ-53' => 'Algeria: Tamanghasset',
'DZ-33' => 'Algeria: Tebessa',
'DZ-13' => 'Algeria: Tiaret',
'DZ-54' => 'Algeria: Tindouf',
'DZ-55' => 'Algeria: Tipaza',
'DZ-56' => 'Algeria: Tissemsilt',
'DZ-14' => 'Algeria: Tizi Ouzou',
'DZ-15' => 'Algeria: Tlemcen',

'--AD' => '','-AD' =>
'Andorra',
'AD-07' => 'Andorra: Andorra la Vella',
'AD-02' => 'Andorra: Canillo',
'AD-03' => 'Andorra: Encamp',
'AD-08' => 'Andorra: Escaldes-Engordany',
'AD-04' => 'Andorra: La Massana',
'AD-05' => 'Andorra: Ordino',
'AD-06' => 'Andorra: Sant Julia de Loria',

'--AO' => '','-AO' =>
'Angola',
'AO-19' => 'Angola: Bengo',
'AO-01' => 'Angola: Benguela',
'AO-02' => 'Angola: Bie',
'AO-03' => 'Angola: Cabinda',
'AO-04' => 'Angola: Cuando Cubango',
'AO-05' => 'Angola: Cuanza Norte',
'AO-06' => 'Angola: Cuanza Sul',
'AO-07' => 'Angola: Cunene',
'AO-08' => 'Angola: Huambo',
'AO-09' => 'Angola: Huila',
'AO-20' => 'Angola: Luanda',
'AO-17' => 'Angola: Lunda Norte',
'AO-18' => 'Angola: Lunda Sul',
'AO-12' => 'Angola: Malanje',
'AO-14' => 'Angola: Moxico',
'AO-15' => 'Angola: Uige',
'AO-16' => 'Angola: Zaire',

'--AG' => '','-AG' => 'Antigua and
Barbuda',
'AG-01' => 'Antigua and Barbuda: Barbuda',
'AG-03' => 'Antigua and Barbuda: Saint George',
'AG-04' => 'Antigua and Barbuda: Saint John',
'AG-05' => 'Antigua and Barbuda: Saint Mary',
'AG-06' => 'Antigua and Barbuda: Saint Paul',
'AG-07' => 'Antigua and Barbuda: Saint Peter',
'AG-08' => 'Antigua and Barbuda: Saint Philip',

'--AR' => '','-AR' =>
'Argentina',
'AR-01' => 'Argentina: Buenos Aires',
'AR-02' => 'Argentina: Catamarca',
'AR-03' => 'Argentina: Chaco',
'AR-04' => 'Argentina: Chubut',
'AR-05' => 'Argentina: Cordoba',
'AR-06' => 'Argentina: Corrientes',
'AR-07' => 'Argentina: Distrito Federal',
'AR-08' => 'Argentina: Entre Rios',
'AR-09' => 'Argentina: Formosa',
'AR-10' => 'Argentina: Jujuy',
'AR-11' => 'Argentina: La Pampa',
'AR-12' => 'Argentina: La Rioja',
'AR-13' => 'Argentina: Mendoza',
'AR-14' => 'Argentina: Misiones',
'AR-15' => 'Argentina: Neuquen',
'AR-16' => 'Argentina: Rio Negro',
'AR-17' => 'Argentina: Salta',
'AR-18' => 'Argentina: San Juan',
'AR-19' => 'Argentina: San Luis',
'AR-20' => 'Argentina: Santa Cruz',
'AR-21' => 'Argentina: Santa Fe',
'AR-22' => 'Argentina: Santiago del Estero',
'AR-23' => 'Argentina: Tierra del Fuego',
'AR-24' => 'Argentina: Tucuman',

'--AM' => '','-AM' =>
'Armenia',
'AM-01' => 'Armenia: Aragatsotn',
'AM-02' => 'Armenia: Ararat',
'AM-03' => 'Armenia: Armavir',
'AM-04' => 'Armenia: Geghark\'unik\'',
'AM-05' => 'Armenia: Kotayk\'',
'AM-06' => 'Armenia: Lorri',
'AM-07' => 'Armenia: Shirak',
'AM-08' => 'Armenia: Syunik\'',
'AM-09' => 'Armenia: Tavush',
'AM-10' => 'Armenia: Vayots\' Dzor',
'AM-11' => 'Armenia: Yerevan',

'--AU' => '','-AU' =>
'Australia',
'AU-01' => 'Australia: Australian Capital
Territory',
'AU-02' => 'Australia: New South Wales',
'AU-03' => 'Australia: Northern Territory',
'AU-04' => 'Australia: Queensland',
'AU-05' => 'Australia: South Australia',
'AU-06' => 'Australia: Tasmania',
'AU-07' => 'Australia: Victoria',
'AU-08' => 'Australia: Western Australia',

'--AT' => '','-AT' =>
'Austria',
'AT-01' => 'Austria: Burgenland',
'AT-02' => 'Austria: Karnten',
'AT-03' => 'Austria: Niederosterreich',
'AT-04' => 'Austria: Oberosterreich',
'AT-05' => 'Austria: Salzburg',
'AT-06' => 'Austria: Steiermark',
'AT-07' => 'Austria: Tirol',
'AT-08' => 'Austria: Vorarlberg',
'AT-09' => 'Austria: Wien',

'--AZ' => '','-AZ' =>
'Azerbaijan',
'AZ-01' => 'Azerbaijan: Abseron',
'AZ-02' => 'Azerbaijan: Agcabadi',
'AZ-03' => 'Azerbaijan: Agdam',
'AZ-04' => 'Azerbaijan: Agdas',
'AZ-05' => 'Azerbaijan: Agstafa',
'AZ-06' => 'Azerbaijan: Agsu',
'AZ-07' => 'Azerbaijan: Ali Bayramli',
'AZ-08' => 'Azerbaijan: Astara',
'AZ-09' => 'Azerbaijan: Baki',
'AZ-10' => 'Azerbaijan: Balakan',
'AZ-11' => 'Azerbaijan: Barda',
'AZ-12' => 'Azerbaijan: Beylaqan',
'AZ-13' => 'Azerbaijan: Bilasuvar',
'AZ-14' => 'Azerbaijan: Cabrayil',
'AZ-15' => 'Azerbaijan: Calilabad',
'AZ-16' => 'Azerbaijan: Daskasan',
'AZ-17' => 'Azerbaijan: Davaci',
'AZ-18' => 'Azerbaijan: Fuzuli',
'AZ-19' => 'Azerbaijan: Gadabay',
'AZ-20' => 'Azerbaijan: Ganca',
'AZ-21' => 'Azerbaijan: Goranboy',
'AZ-22' => 'Azerbaijan: Goycay',
'AZ-23' => 'Azerbaijan: Haciqabul',
'AZ-24' => 'Azerbaijan: Imisli',
'AZ-25' => 'Azerbaijan: Ismayilli',
'AZ-26' => 'Azerbaijan: Kalbacar',
'AZ-27' => 'Azerbaijan: Kurdamir',
'AZ-28' => 'Azerbaijan: Lacin',
'AZ-29' => 'Azerbaijan: Lankaran',
'AZ-30' => 'Azerbaijan: Lankaran',
'AZ-31' => 'Azerbaijan: Lerik',
'AZ-32' => 'Azerbaijan: Masalli',
'AZ-33' => 'Azerbaijan: Mingacevir',
'AZ-34' => 'Azerbaijan: Naftalan',
'AZ-35' => 'Azerbaijan: Naxcivan',
'AZ-36' => 'Azerbaijan: Neftcala',
'AZ-37' => 'Azerbaijan: Oguz',
'AZ-38' => 'Azerbaijan: Qabala',
'AZ-39' => 'Azerbaijan: Qax',
'AZ-40' => 'Azerbaijan: Qazax',
'AZ-41' => 'Azerbaijan: Qobustan',
'AZ-42' => 'Azerbaijan: Quba',
'AZ-43' => 'Azerbaijan: Qubadli',
'AZ-44' => 'Azerbaijan: Qusar',
'AZ-45' => 'Azerbaijan: Saatli',
'AZ-46' => 'Azerbaijan: Sabirabad',
'AZ-47' => 'Azerbaijan: Saki',
'AZ-48' => 'Azerbaijan: Saki',
'AZ-49' => 'Azerbaijan: Salyan',
'AZ-50' => 'Azerbaijan: Samaxi',
'AZ-51' => 'Azerbaijan: Samkir',
'AZ-52' => 'Azerbaijan: Samux',
'AZ-53' => 'Azerbaijan: Siyazan',
'AZ-54' => 'Azerbaijan: Sumqayit',
'AZ-55' => 'Azerbaijan: Susa',
'AZ-56' => 'Azerbaijan: Susa',
'AZ-57' => 'Azerbaijan: Tartar',
'AZ-58' => 'Azerbaijan: Tovuz',
'AZ-59' => 'Azerbaijan: Ucar',
'AZ-60' => 'Azerbaijan: Xacmaz',
'AZ-61' => 'Azerbaijan: Xankandi',
'AZ-62' => 'Azerbaijan: Xanlar',
'AZ-63' => 'Azerbaijan: Xizi',
'AZ-64' => 'Azerbaijan: Xocali',
'AZ-65' => 'Azerbaijan: Xocavand',
'AZ-66' => 'Azerbaijan: Yardimli',
'AZ-67' => 'Azerbaijan: Yevlax',
'AZ-68' => 'Azerbaijan: Yevlax',
'AZ-69' => 'Azerbaijan: Zangilan',
'AZ-70' => 'Azerbaijan: Zaqatala',
'AZ-71' => 'Azerbaijan: Zardab',

'--BS' => '','-BS' =>
'Bahamas',
'BS-24' => 'Bahamas: Acklins and Crooked Islands',
'BS-05' => 'Bahamas: Bimini',
'BS-06' => 'Bahamas: Cat Island',
'BS-10' => 'Bahamas: Exuma',
'BS-25' => 'Bahamas: Freeport',
'BS-26' => 'Bahamas: Fresh Creek',
'BS-27' => 'Bahamas: Governor\'s Harbour',
'BS-28' => 'Bahamas: Green Turtle Cay',
'BS-22' => 'Bahamas: Harbour Island',
'BS-29' => 'Bahamas: High Rock',
'BS-13' => 'Bahamas: Inagua',
'BS-30' => 'Bahamas: Kemps Bay',
'BS-15' => 'Bahamas: Long Island',
'BS-31' => 'Bahamas: Marsh Harbour',
'BS-16' => 'Bahamas: Mayaguana',
'BS-23' => 'Bahamas: New Providence',
'BS-32' => 'Bahamas: Nichollstown and Berry
Islands',
'BS-18' => 'Bahamas: Ragged Island',
'BS-33' => 'Bahamas: Rock Sound',
'BS-35' => 'Bahamas: San Salvador and Rum Cay',
'BS-34' => 'Bahamas: Sandy Point',

'--BH' => '','-BH' =>
'Bahrain',
'BH-01' => 'Bahrain: Al Hadd',
'BH-02' => 'Bahrain: Al Manamah',
'BH-08' => 'Bahrain: Al Mintaqah al Gharbiyah',
'BH-11' => 'Bahrain: Al Mintaqah al Wusta',
'BH-10' => 'Bahrain: Al Mintaqah ash Shamaliyah',
'BH-03' => 'Bahrain: Al Muharraq',
'BH-13' => 'Bahrain: Ar Rifa',
'BH-05' => 'Bahrain: Jidd Hafs',
'BH-14' => 'Bahrain: Madinat Hamad',
'BH-12' => 'Bahrain: Madinat',
'BH-09' => 'Bahrain: Mintaqat Juzur Hawar',
'BH-06' => 'Bahrain: Sitrah',

'--BD' => '','-BD' =>
'Bangladesh',
'BD-22' => 'Bangladesh: Bagerhat',
'BD-04' => 'Bangladesh: Bandarban',
'BD-25' => 'Bangladesh: Barguna',
'BD-01' => 'Bangladesh: Barisal',
'BD-23' => 'Bangladesh: Bhola',
'BD-24' => 'Bangladesh: Bogra',
'BD-26' => 'Bangladesh: Brahmanbaria',
'BD-27' => 'Bangladesh: Chandpur',
'BD-28' => 'Bangladesh: Chapai Nawabganj',
'BD-29' => 'Bangladesh: Chattagram',
'BD-30' => 'Bangladesh: Chuadanga',
'BD-05' => 'Bangladesh: Comilla',
'BD-31' => 'Bangladesh: Cox\'s Bazar',
'BD-32' => 'Bangladesh: Dhaka',
'BD-33' => 'Bangladesh: Dinajpur',
'BD-34' => 'Bangladesh: Faridpur',
'BD-35' => 'Bangladesh: Feni',
'BD-36' => 'Bangladesh: Gaibandha',
'BD-37' => 'Bangladesh: Gazipur',
'BD-38' => 'Bangladesh: Gopalganj',
'BD-39' => 'Bangladesh: Habiganj',
'BD-40' => 'Bangladesh: Jaipurhat',
'BD-41' => 'Bangladesh: Jamalpur',
'BD-42' => 'Bangladesh: Jessore',
'BD-43' => 'Bangladesh: Jhalakati',
'BD-44' => 'Bangladesh: Jhenaidah',
'BD-45' => 'Bangladesh: Khagrachari',
'BD-46' => 'Bangladesh: Khulna',
'BD-47' => 'Bangladesh: Kishorganj',
'BD-48' => 'Bangladesh: Kurigram',
'BD-49' => 'Bangladesh: Kushtia',
'BD-50' => 'Bangladesh: Laksmipur',
'BD-51' => 'Bangladesh: Lalmonirhat',
'BD-52' => 'Bangladesh: Madaripur',
'BD-53' => 'Bangladesh: Magura',
'BD-54' => 'Bangladesh: Manikganj',
'BD-55' => 'Bangladesh: Meherpur',
'BD-56' => 'Bangladesh: Moulavibazar',
'BD-57' => 'Bangladesh: Munshiganj',
'BD-12' => 'Bangladesh: Mymensingh',
'BD-58' => 'Bangladesh: Naogaon',
'BD-59' => 'Bangladesh: Narail',
'BD-60' => 'Bangladesh: Narayanganj',
'BD-61' => 'Bangladesh: Narsingdi',
'BD-62' => 'Bangladesh: Nator',
'BD-63' => 'Bangladesh: Netrakona',
'BD-64' => 'Bangladesh: Nilphamari',
'BD-13' => 'Bangladesh: Noakhali',
'BD-65' => 'Bangladesh: Pabna',
'BD-66' => 'Bangladesh: Panchagar',
'BD-67' => 'Bangladesh: Parbattya Chattagram',
'BD-15' => 'Bangladesh: Patuakhali',
'BD-68' => 'Bangladesh: Pirojpur',
'BD-69' => 'Bangladesh: Rajbari',
'BD-70' => 'Bangladesh: Rajshahi',
'BD-71' => 'Bangladesh: Rangpur',
'BD-72' => 'Bangladesh: Satkhira',
'BD-73' => 'Bangladesh: Shariyatpur',
'BD-74' => 'Bangladesh: Sherpur',
'BD-75' => 'Bangladesh: Sirajganj',
'BD-76' => 'Bangladesh: Sunamganj',
'BD-77' => 'Bangladesh: Sylhet',
'BD-78' => 'Bangladesh: Tangail',
'BD-79' => 'Bangladesh: Thakurgaon',

'--BB' => '','-BB' =>
'Barbados',
'BB-01' => 'Barbados: Christ Church',
'BB-02' => 'Barbados: Saint Andrew',
'BB-03' => 'Barbados: Saint George',
'BB-04' => 'Barbados: Saint James',
'BB-05' => 'Barbados: Saint John',
'BB-06' => 'Barbados: Saint Joseph',
'BB-07' => 'Barbados: Saint Lucy',
'BB-08' => 'Barbados: Saint Michael',
'BB-09' => 'Barbados: Saint Peter',
'BB-10' => 'Barbados: Saint Philip',
'BB-11' => 'Barbados: Saint Thomas',

'--BY' => '','-BY' =>
'Belarus',
'BY-01' => 'Belarus: Brestskaya Voblasts\'',
'BY-02' => 'Belarus: Homyel\'skaya
Voblasts\'',
'BY-03' => 'Belarus: Hrodzyenskaya Voblasts\'',
'BY-06' => 'Belarus: Mahilyowskaya Voblasts\'',
'BY-04' => 'Belarus: Minsk',
'BY-05' => 'Belarus: Minskaya Voblasts\'',
'BY-07' => 'Belarus: Vitsyebskaya Voblasts\'',

'--BE' => '','-BE' =>
'Belgium',
'BE-01' => 'Belgium: Antwerpen',
'BE-10' => 'Belgium: Brabant Wallon',
'BE-02' => 'Belgium: Brabant',
'BE-11' => 'Belgium: Brussels Hoofdstedelijk
Gewest',
'BE-03' => 'Belgium: Hainaut',
'BE-04' => 'Belgium: Liege',
'BE-05' => 'Belgium: Limburg',
'BE-06' => 'Belgium: Luxembourg',
'BE-07' => 'Belgium: Namur',
'BE-08' => 'Belgium: Oost-Vlaanderen',
'BE-12' => 'Belgium: Vlaams-Brabant',
'BE-09' => 'Belgium: West-Vlaanderen',

'--BZ' => '','-BZ' =>
'Belize',
'BZ-01' => 'Belize: Belize',
'BZ-02' => 'Belize: Cayo',
'BZ-03' => 'Belize: Corozal',
'BZ-04' => 'Belize: Orange Walk',
'BZ-05' => 'Belize: Stann Creek',
'BZ-06' => 'Belize: Toledo',

'--BJ' => '','-BJ' =>
'Benin',
'BJ-01' => 'Benin: Atakora',
'BJ-02' => 'Benin: Atlantique',
'BJ-03' => 'Benin: Borgou',
'BJ-04' => 'Benin: Mono',
'BJ-05' => 'Benin: Oueme',
'BJ-06' => 'Benin: Zou',

'--BM' => '','-BM' =>
'Bermuda',
'BM-01' => 'Bermuda: Devonshire',
'BM-02' => 'Bermuda: Hamilton',
'BM-03' => 'Bermuda: Hamilton',
'BM-04' => 'Bermuda: Paget',
'BM-05' => 'Bermuda: Pembroke',
'BM-06' => 'Bermuda: Saint George',
'BM-07' => 'Bermuda: Saint George\'s',
'BM-08' => 'Bermuda: Sandys',
'BM-09' => 'Bermuda: Smiths',
'BM-10' => 'Bermuda: Southampton',
'BM-11' => 'Bermuda: Warwick',

'--BT' => '','-BT' =>
'Bhutan',
'BT-05' => 'Bhutan: Bumthang',
'BT-06' => 'Bhutan: Chhukha',
'BT-07' => 'Bhutan: Chirang',
'BT-08' => 'Bhutan: Daga',
'BT-09' => 'Bhutan: Geylegphug',
'BT-10' => 'Bhutan: Ha',
'BT-11' => 'Bhutan: Lhuntshi',
'BT-12' => 'Bhutan: Mongar',
'BT-13' => 'Bhutan: Paro',
'BT-14' => 'Bhutan: Pemagatsel',
'BT-15' => 'Bhutan: Punakha',
'BT-16' => 'Bhutan: Samchi',
'BT-17' => 'Bhutan: Samdrup',
'BT-18' => 'Bhutan: Shemgang',
'BT-19' => 'Bhutan: Tashigang',
'BT-20' => 'Bhutan: Thimphu',
'BT-21' => 'Bhutan: Tongsa',
'BT-22' => 'Bhutan: Wangdi Phodrang',

'--BO' => '','-BO' =>
'Bolivia',
'BO-01' => 'Bolivia: Chuquisaca',
'BO-02' => 'Bolivia: Cochabamba',
'BO-03' => 'Bolivia: El Beni',
'BO-04' => 'Bolivia: La Paz',
'BO-05' => 'Bolivia: Oruro',
'BO-06' => 'Bolivia: Pando',
'BO-07' => 'Bolivia: Potosi',
'BO-08' => 'Bolivia: Santa Cruz',
'BO-09' => 'Bolivia: Tarija',

'--BA' => '','-BA' => 'Bosnia and
Herzegovina',
'BA-01' => 'Bosnia and Herzegovina: Federation of Bosnia
and Herzegovina',
'BA-02' => 'Bosnia and Herzegovina: Republika
Srpska',

'--BW' => '','-BW' =>
'Botswana',
'BW-01' => 'Botswana: Central',
'BW-02' => 'Botswana: Chobe',
'BW-03' => 'Botswana: Ghanzi',
'BW-04' => 'Botswana: Kgalagadi',
'BW-05' => 'Botswana: Kgatleng',
'BW-06' => 'Botswana: Kweneng',
'BW-07' => 'Botswana: Ngamiland',
'BW-08' => 'Botswana: North-East',
'BW-09' => 'Botswana: South-East',
'BW-10' => 'Botswana: Southern',

'--BR' => '','-BR' =>
'Brazil',
'BR-01' => 'Brazil: Acre',
'BR-02' => 'Brazil: Alagoas',
'BR-03' => 'Brazil: Amapa',
'BR-04' => 'Brazil: Amazonas',
'BR-05' => 'Brazil: Bahia',
'BR-06' => 'Brazil: Ceara',
'BR-07' => 'Brazil: Distrito Federal',
'BR-08' => 'Brazil: Espirito Santo',
'BR-29' => 'Brazil: Goias',
'BR-13' => 'Brazil: Maranhao',
'BR-11' => 'Brazil: Mato Grosso do Sul',
'BR-14' => 'Brazil: Mato Grosso',
'BR-15' => 'Brazil: Minas Gerais',
'BR-16' => 'Brazil: Para',
'BR-17' => 'Brazil: Paraiba',
'BR-18' => 'Brazil: Parana',
'BR-30' => 'Brazil: Pernambuco',
'BR-20' => 'Brazil: Piaui',
'BR-21' => 'Brazil: Rio de Janeiro',
'BR-22' => 'Brazil: Rio Grande do Norte',
'BR-23' => 'Brazil: Rio Grande do Sul',
'BR-24' => 'Brazil: Rondonia',
'BR-25' => 'Brazil: Roraima',
'BR-26' => 'Brazil: Santa Catarina',
'BR-27' => 'Brazil: Sao Paulo',
'BR-28' => 'Brazil: Sergipe',
'BR-31' => 'Brazil: Tocantins',

'--BN' => '','-BN' => 'Brunei
Darussalam',
'BN-07' => 'Brunei Darussalam: Alibori',
'BN-08' => 'Brunei Darussalam: Belait',
'BN-09' => 'Brunei Darussalam: Brunei and Muara',
'BN-11' => 'Brunei Darussalam: Collines',
'BN-13' => 'Brunei Darussalam: Donga',
'BN-12' => 'Brunei Darussalam: Kouffo',
'BN-14' => 'Brunei Darussalam: Littoral',
'BN-16' => 'Brunei Darussalam: Oueme',
'BN-17' => 'Brunei Darussalam: Plateau',
'BN-10' => 'Brunei Darussalam: Temburong',
'BN-15' => 'Brunei Darussalam: Tutong',
'BN-18' => 'Brunei Darussalam: Zou',

'--BG' => '','-BG' =>
'Bulgaria',
'BG-38' => 'Bulgaria: Blagoevgrad',
'BG-39' => 'Bulgaria: Burgas',
'BG-40' => 'Bulgaria: Dobrich',
'BG-41' => 'Bulgaria: Gabrovo',
'BG-42' => 'Bulgaria: Grad Sofiya',
'BG-43' => 'Bulgaria: Khaskovo',
'BG-44' => 'Bulgaria: Kurdzhali',
'BG-45' => 'Bulgaria: Kyustendil',
'BG-46' => 'Bulgaria: Lovech',
'BG-33' => 'Bulgaria: Mikhaylovgrad',
'BG-47' => 'Bulgaria: Montana',
'BG-48' => 'Bulgaria: Pazardzhik',
'BG-49' => 'Bulgaria: Pernik',
'BG-50' => 'Bulgaria: Pleven',
'BG-51' => 'Bulgaria: Plovdiv',
'BG-52' => 'Bulgaria: Razgrad',
'BG-53' => 'Bulgaria: Ruse',
'BG-54' => 'Bulgaria: Shumen',
'BG-55' => 'Bulgaria: Silistra',
'BG-56' => 'Bulgaria: Sliven',
'BG-57' => 'Bulgaria: Smolyan',
'BG-58' => 'Bulgaria: Sofiya',
'BG-59' => 'Bulgaria: Stara Zagora',
'BG-60' => 'Bulgaria: Turgovishte',
'BG-61' => 'Bulgaria: Varna',
'BG-62' => 'Bulgaria: Veliko Turnovo',
'BG-63' => 'Bulgaria: Vidin',
'BG-64' => 'Bulgaria: Vratsa',
'BG-65' => 'Bulgaria: Yambol',

'--BF' => '','-BF' => 'Burkina
Faso',
'BF-45' => 'Burkina Faso: Bale',
'BF-15' => 'Burkina Faso: Bam',
'BF-46' => 'Burkina Faso: Banwa',
'BF-47' => 'Burkina Faso: Bazega',
'BF-48' => 'Burkina Faso: Bougouriba',
'BF-49' => 'Burkina Faso: Boulgou',
'BF-19' => 'Burkina Faso: Boulkiemde',
'BF-20' => 'Burkina Faso: Ganzourgou',
'BF-21' => 'Burkina Faso: Gnagna',
'BF-50' => 'Burkina Faso: Gourma',
'BF-51' => 'Burkina Faso: Houet',
'BF-52' => 'Burkina Faso: Ioba',
'BF-53' => 'Burkina Faso: Kadiogo',
'BF-54' => 'Burkina Faso: Kenedougou',
'BF-55' => 'Burkina Faso: Komoe',
'BF-56' => 'Burkina Faso: Komondjari',
'BF-57' => 'Burkina Faso: Kompienga',
'BF-58' => 'Burkina Faso: Kossi',
'BF-59' => 'Burkina Faso: Koulpelogo',
'BF-28' => 'Burkina Faso: Kouritenga',
'BF-60' => 'Burkina Faso: Kourweogo',
'BF-61' => 'Burkina Faso: Leraba',
'BF-62' => 'Burkina Faso: Loroum',
'BF-63' => 'Burkina Faso: Mouhoun',
'BF-64' => 'Burkina Faso: Namentenga',
'BF-65' => 'Burkina Faso: Naouri',
'BF-66' => 'Burkina Faso: Nayala',
'BF-67' => 'Burkina Faso: Noumbiel',
'BF-68' => 'Burkina Faso: Oubritenga',
'BF-33' => 'Burkina Faso: Oudalan',
'BF-34' => 'Burkina Faso: Passore',
'BF-69' => 'Burkina Faso: Poni',
'BF-36' => 'Burkina Faso: Sanguie',
'BF-70' => 'Burkina Faso: Sanmatenga',
'BF-71' => 'Burkina Faso: Seno',
'BF-72' => 'Burkina Faso: Sissili',
'BF-40' => 'Burkina Faso: Soum',
'BF-73' => 'Burkina Faso: Sourou',
'BF-42' => 'Burkina Faso: Tapoa',
'BF-74' => 'Burkina Faso: Tuy',
'BF-75' => 'Burkina Faso: Yagha',
'BF-76' => 'Burkina Faso: Yatenga',
'BF-77' => 'Burkina Faso: Ziro',
'BF-78' => 'Burkina Faso: Zondoma',
'BF-44' => 'Burkina Faso: Zoundweogo',

'--BI' => '','-BI' =>
'Burundi',
'BI-09' => 'Burundi: Bubanza',
'BI-02' => 'Burundi: Bujumbura',
'BI-10' => 'Burundi: Bururi',
'BI-11' => 'Burundi: Cankuzo',
'BI-12' => 'Burundi: Cibitoke',
'BI-13' => 'Burundi: Gitega',
'BI-14' => 'Burundi: Karuzi',
'BI-15' => 'Burundi: Kayanza',
'BI-16' => 'Burundi: Kirundo',
'BI-17' => 'Burundi: Makamba',
'BI-22' => 'Burundi: Muramvya',
'BI-18' => 'Burundi: Muyinga',
'BI-23' => 'Burundi: Mwaro',
'BI-19' => 'Burundi: Ngozi',
'BI-20' => 'Burundi: Rutana',
'BI-21' => 'Burundi: Ruyigi',

'--KH' => '','-KH' =>
'Cambodia',
'KH-29' => 'Cambodia: Batdambang',
'KH-02' => 'Cambodia: Kampong Cham',
'KH-03' => 'Cambodia: Kampong Chhnang',
'KH-04' => 'Cambodia: Kampong Spoe',
'KH-05' => 'Cambodia: Kampong Thum',
'KH-06' => 'Cambodia: Kampot',
'KH-07' => 'Cambodia: Kandal',
'KH-08' => 'Cambodia: Kaoh Kong',
'KH-09' => 'Cambodia: Kracheh',
'KH-10' => 'Cambodia: Mondol Kiri',
'KH-30' => 'Cambodia: Pailin',
'KH-11' => 'Cambodia: Phnum Penh',
'KH-12' => 'Cambodia: Pouthisat',
'KH-13' => 'Cambodia: Preah Vihear',
'KH-14' => 'Cambodia: Prey Veng',
'KH-15' => 'Cambodia: Rotanokiri',
'KH-16' => 'Cambodia: Siemreab-Otdar Meanchey',
'KH-17' => 'Cambodia: Stoeng Treng',
'KH-18' => 'Cambodia: Svay Rieng',
'KH-19' => 'Cambodia: Takev',

'--CM' => '','-CM' =>
'Cameroon',
'CM-10' => 'Cameroon: Adamaoua',
'CM-11' => 'Cameroon: Centre',
'CM-04' => 'Cameroon: Est',
'CM-12' => 'Cameroon: Extreme-Nord',
'CM-05' => 'Cameroon: Littoral',
'CM-13' => 'Cameroon: Nord',
'CM-07' => 'Cameroon: Nord-Ouest',
'CM-08' => 'Cameroon: Ouest',
'CM-14' => 'Cameroon: Sud',
'CM-09' => 'Cameroon: Sud-Ouest',

'--CA' => '','-CA' =>
'Canada',
'CA-AB' => 'Canada: Alberta',
'CA-BC' => 'Canada: British Columbia',
'CA-MB' => 'Canada: Manitoba',
'CA-NB' => 'Canada: New Brunswick',
'CA-NL' => 'Canada: Newfoundland',
'CA-NT' => 'Canada: Northwest Territories',
'CA-NS' => 'Canada: Nova Scotia',
'CA-NU' => 'Canada: Nunavut',
'CA-ON' => 'Canada: Ontario',
'CA-PE' => 'Canada: Prince Edward Island',
'CA-QC' => 'Canada: Quebec',
'CA-SK' => 'Canada: Saskatchewan',
'CA-YT' => 'Canada: Yukon Territory',

'--CV' => '','-CV' => 'Cape
Verde',
'CV-01' => 'Cape Verde: Boa Vista',
'CV-02' => 'Cape Verde: Brava',
'CV-04' => 'Cape Verde: Maio',
'CV-13' => 'Cape Verde: Mosteiros',
'CV-05' => 'Cape Verde: Paul',
'CV-14' => 'Cape Verde: Praia',
'CV-07' => 'Cape Verde: Ribeira Grande',
'CV-08' => 'Cape Verde: Sal',
'CV-15' => 'Cape Verde: Santa Catarina',
'CV-16' => 'Cape Verde: Santa Cruz',
'CV-17' => 'Cape Verde: Sao Domingos',
'CV-18' => 'Cape Verde: Sao Filipe',
'CV-19' => 'Cape Verde: Sao Miguel',
'CV-10' => 'Cape Verde: Sao Nicolau',
'CV-11' => 'Cape Verde: Sao Vicente',
'CV-20' => 'Cape Verde: Tarrafal',

'--KY' => '','-KY' => 'Cayman
Islands',
'KY-01' => 'Cayman Islands: Creek',
'KY-02' => 'Cayman Islands: Eastern',
'KY-03' => 'Cayman Islands: Midland',
'KY-04' => 'Cayman Islands: South Town',
'KY-05' => 'Cayman Islands: Spot Bay',
'KY-06' => 'Cayman Islands: Stake Bay',
'KY-07' => 'Cayman Islands: West End',
'KY-08' => 'Cayman Islands: Western',

'--CF' => '','-CF' => 'Central
African Republic',
'CF-01' => 'Central African Republic:
Bamingui-Bangoran',
'CF-18' => 'Central African Republic: Bangui',
'CF-02' => 'Central African Republic: Basse-Kotto',
'CF-03' => 'Central African Republic: Haute-Kotto',
'CF-05' => 'Central African Republic: Haut-Mbomou',
'CF-06' => 'Central African Republic: Kemo',
'CF-07' => 'Central African Republic: Lobaye',
'CF-04' => 'Central African Republic:
Mambere-Kadei',
'CF-08' => 'Central African Republic: Mbomou',
'CF-15' => 'Central African Republic: Nana-Grebizi',
'CF-09' => 'Central African Republic: Nana-Mambere',
'CF-17' => 'Central African Republic:
Ombella-Mpoko',
'CF-11' => 'Central African Republic: Ouaka',
'CF-12' => 'Central African Republic: Ouham',
'CF-13' => 'Central African Republic: Ouham-Pende',
'CF-16' => 'Central African Republic:
Sangha-Mbaere',
'CF-14' => 'Central African Republic: Vakaga',

'--TD' => '','-TD' => 'Chad',
'TD-01' => 'Chad: Batha',
'TD-02' => 'Chad: Biltine',
'TD-03' => 'Chad: Borkou-Ennedi-Tibesti',
'TD-04' => 'Chad: Chari-Baguirmi',
'TD-05' => 'Chad: Guera',
'TD-06' => 'Chad: Kanem',
'TD-07' => 'Chad: Lac',
'TD-08' => 'Chad: Logone Occidental',
'TD-09' => 'Chad: Logone Oriental',
'TD-10' => 'Chad: Mayo-Kebbi',
'TD-11' => 'Chad: Moyen-Chari',
'TD-12' => 'Chad: Ouaddai',
'TD-13' => 'Chad: Salamat',
'TD-14' => 'Chad: Tandjile',

'--CL' => '','-CL' =>
'Chile',
'CL-02' => 'Chile: Aisen del General Carlos Ibanez del
Campo',
'CL-03' => 'Chile: Antofagasta',
'CL-04' => 'Chile: Araucania',
'CL-05' => 'Chile: Atacama',
'CL-06' => 'Chile: Bio-Bio',
'CL-07' => 'Chile: Coquimbo',
'CL-08' => 'Chile: Libertador General Bernardo
O\'Higgins',
'CL-09' => 'Chile: Los Lagos',
'CL-10' => 'Chile: Magallanes y de la Antartica
Chilena',
'CL-11' => 'Chile: Maule',
'CL-12' => 'Chile: Region Metropolitana',
'CL-13' => 'Chile: Tarapaca',
'CL-01' => 'Chile: Valparaiso',

'--CN' => '','-CN' =>
'China',
'CN-01' => 'China: Anhui',
'CN-22' => 'China: Beijing',
'CN-33' => 'China: Chongqing',
'CN-07' => 'China: Fujian',
'CN-15' => 'China: Gansu',
'CN-30' => 'China: Guangdong',
'CN-16' => 'China: Guangxi',
'CN-18' => 'China: Guizhou',
'CN-31' => 'China: Hainan',
'CN-10' => 'China: Hebei',
'CN-08' => 'China: Heilongjiang',
'CN-09' => 'China: Henan',
'CN-12' => 'China: Hubei',
'CN-11' => 'China: Hunan',
'CN-04' => 'China: Jiangsu',
'CN-03' => 'China: Jiangxi',
'CN-05' => 'China: Jilin',
'CN-19' => 'China: Liaoning',
'CN-20' => 'China: Nei Mongol',
'CN-21' => 'China: Ningxia',
'CN-06' => 'China: Qinghai',
'CN-26' => 'China: Shaanxi',
'CN-25' => 'China: Shandong',
'CN-23' => 'China: Shanghai',
'CN-24' => 'China: Shanxi',
'CN-32' => 'China: Sichuan',
'CN-28' => 'China: Tianjin',
'CN-13' => 'China: Xinjiang',
'CN-14' => 'China: Xizang',
'CN-29' => 'China: Yunnan',
'CN-02' => 'China: Zhejiang',

'--CO' => '','-CO' =>
'Colombia',
'CO-01' => 'Colombia: Amazonas',
'CO-02' => 'Colombia: Antioquia',
'CO-03' => 'Colombia: Arauca',
'CO-04' => 'Colombia: Atlantico',
'CO-35' => 'Colombia: Bolivar',
'CO-36' => 'Colombia: Boyaca',
'CO-37' => 'Colombia: Caldas',
'CO-08' => 'Colombia: Caqueta',
'CO-32' => 'Colombia: Casanare',
'CO-09' => 'Colombia: Cauca',
'CO-10' => 'Colombia: Cesar',
'CO-11' => 'Colombia: Choco',
'CO-12' => 'Colombia: Cordoba',
'CO-33' => 'Colombia: Cundinamarca',
'CO-34' => 'Colombia: Distrito Especial',
'CO-15' => 'Colombia: Guainia',
'CO-14' => 'Colombia: Guaviare',
'CO-16' => 'Colombia: Huila',
'CO-17' => 'Colombia: La Guajira',
'CO-38' => 'Colombia: Magdalena',
'CO-19' => 'Colombia: Meta',
'CO-20' => 'Colombia: Narino',
'CO-21' => 'Colombia: Norte de Santander',
'CO-22' => 'Colombia: Putumayo',
'CO-23' => 'Colombia: Quindio',
'CO-24' => 'Colombia: Risaralda',
'CO-25' => 'Colombia: San Andres y Providencia',
'CO-26' => 'Colombia: Santander',
'CO-27' => 'Colombia: Sucre',
'CO-28' => 'Colombia: Tolima',
'CO-29' => 'Colombia: Valle del Cauca',
'CO-30' => 'Colombia: Vaupes',
'CO-31' => 'Colombia: Vichada',

'--KM' => '','-KM' =>
'Comoros',
'KM-01' => 'Comoros: Anjouan',
'KM-02' => 'Comoros: Grande Comore',
'KM-03' => 'Comoros: Moheli',

'--CD' => '','-CD' =>
'Congo',
'CD-01' => 'Congo: Bandundu',
'CD-08' => 'Congo: Bas-Congo',

'--CG' => '','-CG' =>
'Congo',
'CG-01' => 'Congo: Bouenza',
'CG-12' => 'Congo: Brazzamark',
'CG-03' => 'Congo: Cuvette',

'--CD' => '','-CD' =>
'Congo',
'CD-02' => 'Congo: Equateur',
'CD-03' => 'Congo: Kasai-Occidental',
'CD-04' => 'Congo: Kasai-Oriental',
'CD-05' => 'Congo: Katanga',
'CD-06' => 'Congo: Kinshasa',
'CD-07' => 'Congo: Kivu',

'--CG' => '','-CG' =>
'Congo',
'CG-04' => 'Congo: Kouilou',
'CG-05' => 'Congo: Lekoumou',
'CG-06' => 'Congo: Likouala',

'--CD' => '','-CD' =>
'Congo',
'CD-10' => 'Congo: Maniema',

'--CG' => '','-CG' =>
'Congo',
'CG-07' => 'Congo: Niari',

'--CD' => '','-CD' =>
'Congo',
'CD-11' => 'Congo: Nord-Kivu',
'CD-09' => 'Congo: Orientale',

'--CG' => '','-CG' =>
'Congo',
'CG-08' => 'Congo: Plateaux',
'CG-11' => 'Congo: Pool',
'CG-10' => 'Congo: Sangha',

'--CD' => '','-CD' =>
'Congo',
'CD-12' => 'Congo: Sud-Kivu',

'--CR' => '','-CR' => 'Costa
Rica',
'CR-01' => 'Costa Rica: Alajuela',
'CR-02' => 'Costa Rica: Cartago',
'CR-03' => 'Costa Rica: Guanacaste',
'CR-04' => 'Costa Rica: Heredia',
'CR-06' => 'Costa Rica: Limon',
'CR-07' => 'Costa Rica: Puntarenas',
'CR-08' => 'Costa Rica: San Jose',

'--CI' => '','-CI' => 'Cote
D'Ivoire',
'CI-01' => 'Cote D\'Ivoire: Abengourou',
'CI-61' => 'Cote D\'Ivoire: Abidjan',
'CI-62' => 'Cote D\'Ivoire: Aboisso',
'CI-63' => 'Cote D\'Ivoire: Adiake',
'CI-05' => 'Cote D\'Ivoire: Adzope',
'CI-06' => 'Cote D\'Ivoire: Agbomark',
'CI-64' => 'Cote D\'Ivoire: Alepe',
'CI-36' => 'Cote D\'Ivoire: Bangolo',
'CI-37' => 'Cote D\'Ivoire: Beoumi',
'CI-07' => 'Cote D\'Ivoire: Biankouma',
'CI-65' => 'Cote D\'Ivoire: Bocanda',
'CI-38' => 'Cote D\'Ivoire: Bondoukou',
'CI-27' => 'Cote D\'Ivoire: Bongouanou',
'CI-39' => 'Cote D\'Ivoire: Bouafle',
'CI-40' => 'Cote D\'Ivoire: Bouake',
'CI-11' => 'Cote D\'Ivoire: Bouna',
'CI-12' => 'Cote D\'Ivoire: Boundiali',
'CI-03' => 'Cote D\'Ivoire: Dabakala',
'CI-66' => 'Cote D\'Ivoire: Dabou',
'CI-41' => 'Cote D\'Ivoire: Daloa',
'CI-14' => 'Cote D\'Ivoire: Danane',
'CI-42' => 'Cote D\'Ivoire: Daoukro',
'CI-67' => 'Cote D\'Ivoire: Dimbokro',
'CI-16' => 'Cote D\'Ivoire: Divo',
'CI-44' => 'Cote D\'Ivoire: Duekoue',
'CI-17' => 'Cote D\'Ivoire: Ferkessedougou',
'CI-18' => 'Cote D\'Ivoire: Gagnoa',
'CI-68' => 'Cote D\'Ivoire: Grand-Bassam',
'CI-45' => 'Cote D\'Ivoire: Grand-Lahou',
'CI-69' => 'Cote D\'Ivoire: Guiglo',
'CI-28' => 'Cote D\'Ivoire: Issia',
'CI-70' => 'Cote D\'Ivoire: Jacquemark',
'CI-20' => 'Cote D\'Ivoire: Katiola',
'CI-21' => 'Cote D\'Ivoire: Korhogo',
'CI-29' => 'Cote D\'Ivoire: Lakota',
'CI-47' => 'Cote D\'Ivoire: Man',
'CI-30' => 'Cote D\'Ivoire: Mankono',
'CI-48' => 'Cote D\'Ivoire: Mbahiakro',
'CI-23' => 'Cote D\'Ivoire: Odienne',
'CI-31' => 'Cote D\'Ivoire: Oume',
'CI-49' => 'Cote D\'Ivoire: Sakassou',
'CI-50' => 'Cote D\'Ivoire: San Pedro',
'CI-51' => 'Cote D\'Ivoire: Sassandra',
'CI-25' => 'Cote D\'Ivoire: Seguela',
'CI-52' => 'Cote D\'Ivoire: Sinfra',
'CI-32' => 'Cote D\'Ivoire: Soubre',
'CI-53' => 'Cote D\'Ivoire: Tabou',
'CI-54' => 'Cote D\'Ivoire: Tanda',
'CI-55' => 'Cote D\'Ivoire: Tiassale',
'CI-71' => 'Cote D\'Ivoire: Tiebissou',
'CI-33' => 'Cote D\'Ivoire: Tingrela',
'CI-26' => 'Cote D\'Ivoire: Touba',
'CI-72' => 'Cote D\'Ivoire: Toulepleu',
'CI-56' => 'Cote D\'Ivoire: Toumodi',
'CI-57' => 'Cote D\'Ivoire: Vavoua',
'CI-73' => 'Cote D\'Ivoire: Yamoussoukro',
'CI-34' => 'Cote D\'Ivoire: Zuenoula',

'--HR' => '','-HR' =>
'Croatia',
'HR-01' => 'Croatia: Bjelovarsko-Bilogorska',
'HR-02' => 'Croatia: Brodsko-Posavska',
'HR-03' => 'Croatia: Dubrovacko-Neretvanska',
'HR-21' => 'Croatia: Grad Zagreb',
'HR-04' => 'Croatia: Istarska',
'HR-05' => 'Croatia: Karlovacka',
'HR-06' => 'Croatia: Koprivnicko-Krizevacka',
'HR-07' => 'Croatia: Krapinsko-Zagorska',
'HR-08' => 'Croatia: Licko-Senjska',
'HR-09' => 'Croatia: Medimurska',
'HR-10' => 'Croatia: Osjecko-Baranjska',
'HR-11' => 'Croatia: Pozesko-Slavonska',
'HR-12' => 'Croatia: Primorsko-Goranska',
'HR-13' => 'Croatia: Sibensko-Kninska',
'HR-14' => 'Croatia: Sisacko-Moslavacka',
'HR-15' => 'Croatia: Splitsko-Dalmatinska',
'HR-16' => 'Croatia: Varazdinska',
'HR-17' => 'Croatia: Viroviticko-Podravska',
'HR-18' => 'Croatia: Vukovarsko-Srijemska',
'HR-19' => 'Croatia: Zadarska',
'HR-20' => 'Croatia: Zagrebacka',

'--CU' => '','-CU' => 'Cuba',
'CU-05' => 'Cuba: Camaguey',
'CU-07' => 'Cuba: Ciego de Avila',
'CU-08' => 'Cuba: Cienfuegos',
'CU-02' => 'Cuba: Ciudad de la Habana',
'CU-09' => 'Cuba: Granma',
'CU-10' => 'Cuba: Guantanamo',
'CU-12' => 'Cuba: Holguin',
'CU-04' => 'Cuba: Isla de la Juventud',
'CU-11' => 'Cuba: La Habana',
'CU-13' => 'Cuba: Las Tunas',
'CU-03' => 'Cuba: Matanzas',
'CU-01' => 'Cuba: Pinar del Rio',
'CU-14' => 'Cuba: Sancti Spiritus',
'CU-15' => 'Cuba: Santiago de Cuba',
'CU-16' => 'Cuba: Villa Clara',

'--CY' => '','-CY' =>
'Cyprus',
'CY-01' => 'Cyprus: Famagusta',
'CY-02' => 'Cyprus: Kyrenia',
'CY-03' => 'Cyprus: Larnaca',
'CY-05' => 'Cyprus: Limassol',
'CY-04' => 'Cyprus: Nicosia',
'CY-06' => 'Cyprus: Paphos',

'--CZ' => '','-CZ' => 'Czech
Republic',
'CZ-03' => 'Czech Republic: Blansko',
'CZ-04' => 'Czech Republic: Breclav',
'CZ-52' => 'Czech Republic: Hlavni Mesto Praha',
'CZ-20' => 'Czech Republic: Hradec Kralove',
'CZ-21' => 'Czech Republic: Jablonec nad Nisou',
'CZ-23' => 'Czech Republic: Jiein',
'CZ-24' => 'Czech Republic: Jihlava',
'CZ-79' => 'Czech Republic: Jihocesky Kraj',
'CZ-78' => 'Czech Republic: Jihomoravsky Kraj',
'CZ-81' => 'Czech Republic: Karlovarsky Kraj',
'CZ-30' => 'Czech Republic: Kolin',
'CZ-82' => 'Czech Republic: Kralovehradecky Kraj',
'CZ-33' => 'Czech Republic: Liberec',
'CZ-83' => 'Czech Republic: Liberecky Kraj',
'CZ-36' => 'Czech Republic: Melnik',
'CZ-37' => 'Czech Republic: Mlada Boleslav',
'CZ-85' => 'Czech Republic: Moravskoslezsky Kraj',
'CZ-39' => 'Czech Republic: Nachod',
'CZ-41' => 'Czech Republic: Nymburk',
'CZ-84' => 'Czech Republic: Olomoucky Kraj',
'CZ-45' => 'Czech Republic: Pardubice',
'CZ-86' => 'Czech Republic: Pardubicky Kraj',
'CZ-87' => 'Czech Republic: Plzensky Kraj',
'CZ-61' => 'Czech Republic: Semily',
'CZ-88' => 'Czech Republic: Stredocesky Kraj',
'CZ-70' => 'Czech Republic: Trutnov',
'CZ-89' => 'Czech Republic: Ustecky Kraj',
'CZ-80' => 'Czech Republic: Vysocina',
'CZ-90' => 'Czech Republic: Zlinsky Kraj',

'--DK' => '','-DK' =>
'Denmark',
'DK-01' => 'Denmark: Arhus',
'DK-02' => 'Denmark: Bornholm',
'DK-03' => 'Denmark: Frederiksborg',
'DK-04' => 'Denmark: Fyn',
'DK-05' => 'Denmark: Kobenhavn',
'DK-07' => 'Denmark: Nordjylland',
'DK-08' => 'Denmark: Ribe',
'DK-09' => 'Denmark: Ringkobing',
'DK-10' => 'Denmark: Roskilde',
'DK-11' => 'Denmark: Sonderjylland',
'DK-06' => 'Denmark: Staden Kobenhavn',
'DK-12' => 'Denmark: Storstrom',
'DK-13' => 'Denmark: Vejle',
'DK-14' => 'Denmark: Vestsjalland',
'DK-15' => 'Denmark: Viborg',

'--DJ' => '','-DJ' =>
'Djibouti',
'DJ-02' => 'Djibouti: Dikhil',
'DJ-03' => 'Djibouti: Djibouti',
'DJ-04' => 'Djibouti: Obock',
'DJ-05' => 'Djibouti: Tadjoura',

'--DM' => '','-DM' =>
'Dominica',
'DM-02' => 'Dominica: Saint Andrew',
'DM-03' => 'Dominica: Saint David',
'DM-04' => 'Dominica: Saint George',
'DM-05' => 'Dominica: Saint John',
'DM-06' => 'Dominica: Saint Joseph',
'DM-07' => 'Dominica: Saint Luke',
'DM-08' => 'Dominica: Saint Mark',
'DM-09' => 'Dominica: Saint Patrick',
'DM-10' => 'Dominica: Saint Paul',
'DM-11' => 'Dominica: Saint Peter',

'--DO' => '','-DO' => 'Dominican
Republic',
'DO-01' => 'Dominican Republic: Azua',
'DO-02' => 'Dominican Republic: Baoruco',
'DO-03' => 'Dominican Republic: Barahona',
'DO-04' => 'Dominican Republic: Dajabon',
'DO-05' => 'Dominican Republic: Distrito Nacional',
'DO-06' => 'Dominican Republic: Duarte',
'DO-28' => 'Dominican Republic: El Seibo',
'DO-11' => 'Dominican Republic: Elias Pina',
'DO-08' => 'Dominican Republic: Espaillat',
'DO-29' => 'Dominican Republic: Hato Mayor',
'DO-09' => 'Dominican Republic: Independencia',
'DO-10' => 'Dominican Republic: La Altagracia',
'DO-12' => 'Dominican Republic: La Romana',
'DO-30' => 'Dominican Republic: La Vega',
'DO-14' => 'Dominican Republic: Maria Trinidad
Sanchez',
'DO-31' => 'Dominican Republic: Monsenor Nouel',
'DO-15' => 'Dominican Republic: Monte Cristi',
'DO-32' => 'Dominican Republic: Monte Plata',
'DO-16' => 'Dominican Republic: Pedernales',
'DO-17' => 'Dominican Republic: Peravia',
'DO-18' => 'Dominican Republic: Puerto Plata',
'DO-19' => 'Dominican Republic: Salcedo',
'DO-20' => 'Dominican Republic: Samana',
'DO-33' => 'Dominican Republic: San Cristobal',
'DO-23' => 'Dominican Republic: San Juan',
'DO-24' => 'Dominican Republic: San Pedro De
Macoris',
'DO-21' => 'Dominican Republic: Sanchez Ramirez',
'DO-26' => 'Dominican Republic: Santiago Rodriguez',
'DO-25' => 'Dominican Republic: Santiago',
'DO-27' => 'Dominican Republic: Valverde',

'--EC' => '','-EC' =>
'Ecuador',
'EC-02' => 'Ecuador: Azuay',
'EC-03' => 'Ecuador: Bolivar',
'EC-04' => 'Ecuador: Canar',
'EC-05' => 'Ecuador: Carchi',
'EC-06' => 'Ecuador: Chimborazo',
'EC-07' => 'Ecuador: Cotopaxi',
'EC-08' => 'Ecuador: El Oro',
'EC-09' => 'Ecuador: Esmeraldas',
'EC-01' => 'Ecuador: Galapagos',
'EC-10' => 'Ecuador: Guayas',
'EC-11' => 'Ecuador: Imbabura',
'EC-12' => 'Ecuador: Loja',
'EC-13' => 'Ecuador: Los Rios',
'EC-14' => 'Ecuador: Manabi',
'EC-15' => 'Ecuador: Morona-Santiago',
'EC-23' => 'Ecuador: Napo',
'EC-24' => 'Ecuador: Orellana',
'EC-17' => 'Ecuador: Pastaza',
'EC-18' => 'Ecuador: Pichincha',
'EC-22' => 'Ecuador: Sucumbios',
'EC-19' => 'Ecuador: Tungurahua',
'EC-20' => 'Ecuador: Zamora-Chinchipe',

'--EG' => '','-EG' =>
'Egypt',
'EG-01' => 'Egypt: Ad Daqahliyah',
'EG-02' => 'Egypt: Al Bahr al Ahmar',
'EG-03' => 'Egypt: Al Buhayrah',
'EG-04' => 'Egypt: Al Fayyum',
'EG-05' => 'Egypt: Al Gharbiyah',
'EG-06' => 'Egypt: Al Iskandariyah',
'EG-07' => 'Egypt: Al Isma\'iliyah',
'EG-08' => 'Egypt: Al Jizah',
'EG-09' => 'Egypt: Al Minufiyah',
'EG-10' => 'Egypt: Al Minya',
'EG-11' => 'Egypt: Al Qahirah',
'EG-12' => 'Egypt: Al Qalyubiyah',
'EG-13' => 'Egypt: Al Wadi al Jadid',
'EG-15' => 'Egypt: As Suways',
'EG-14' => 'Egypt: Ash Sharqiyah',
'EG-16' => 'Egypt: Aswan',
'EG-17' => 'Egypt: Asyut',
'EG-18' => 'Egypt: Bani Suwayf',
'EG-19' => 'Egypt: Bur Sa\'id',
'EG-20' => 'Egypt: Dumyat',
'EG-26' => 'Egypt: Janub Sina\'',
'EG-21' => 'Egypt: Kafr ash Shaykh',
'EG-22' => 'Egypt: Matruh',
'EG-23' => 'Egypt: Qina',
'EG-27' => 'Egypt: Shamal Sina\'',
'EG-24' => 'Egypt: Suhaj',

'--SV' => '','-SV' => 'El
Salvador',
'SV-01' => 'El Salvador: Ahuachapan',
'SV-02' => 'El Salvador: Cabanas',
'SV-03' => 'El Salvador: Chalatenango',
'SV-04' => 'El Salvador: Cuscatlan',
'SV-05' => 'El Salvador: La Libertad',
'SV-06' => 'El Salvador: La Paz',
'SV-07' => 'El Salvador: La Union',
'SV-08' => 'El Salvador: Morazan',
'SV-09' => 'El Salvador: San Miguel',
'SV-10' => 'El Salvador: San Salvador',
'SV-12' => 'El Salvador: San Vicente',
'SV-11' => 'El Salvador: Santa Ana',
'SV-13' => 'El Salvador: Sonsonate',
'SV-14' => 'El Salvador: Usulutan',

'--GQ' => '','-GQ' => 'Equatorial
Guinea',
'GQ-03' => 'Equatorial Guinea: Annobon',
'GQ-04' => 'Equatorial Guinea: Bioko Norte',
'GQ-05' => 'Equatorial Guinea: Bioko Sur',
'GQ-06' => 'Equatorial Guinea: Centro Sur',
'GQ-07' => 'Equatorial Guinea: Kie-Ntem',
'GQ-08' => 'Equatorial Guinea: Litoral',
'GQ-09' => 'Equatorial Guinea: Wele-Nzas',

'--EE' => '','-EE' =>
'Estonia',
'EE-01' => 'Estonia: Harjumaa',
'EE-02' => 'Estonia: Hiiumaa',
'EE-03' => 'Estonia: Ida-Virumaa',
'EE-04' => 'Estonia: Jarvamaa',
'EE-05' => 'Estonia: Jogevamaa',
'EE-06' => 'Estonia: Kohtla-Jarve',
'EE-07' => 'Estonia: Laanemaa',
'EE-08' => 'Estonia: Laane-Virumaa',
'EE-09' => 'Estonia: Narva',
'EE-10' => 'Estonia: Parnu',
'EE-11' => 'Estonia: Parnumaa',
'EE-12' => 'Estonia: Polvamaa',
'EE-13' => 'Estonia: Raplamaa',
'EE-14' => 'Estonia: Saaremaa',
'EE-15' => 'Estonia: Sillamae',
'EE-16' => 'Estonia: Tallinn',
'EE-17' => 'Estonia: Tartu',
'EE-18' => 'Estonia: Tartumaa',
'EE-19' => 'Estonia: Valgamaa',
'EE-20' => 'Estonia: Viljandimaa',
'EE-21' => 'Estonia: Vorumaa',

'--ET' => '','-ET' =>
'Ethiopia',
'ET-10' => 'Ethiopia: Addis Abeba',
'ET-44' => 'Ethiopia: Adis Abeba',
'ET-14' => 'Ethiopia: Afar',
'ET-45' => 'Ethiopia: Afar',
'ET-46' => 'Ethiopia: Amara',
'ET-02' => 'Ethiopia: Amhara',
'ET-13' => 'Ethiopia: Benishangul',
'ET-47' => 'Ethiopia: Binshangul Gumuz',
'ET-48' => 'Ethiopia: Dire Dawa',
'ET-49' => 'Ethiopia: Gambela Hizboch',
'ET-08' => 'Ethiopia: Gambella',
'ET-50' => 'Ethiopia: Hareri Hizb',
'ET-51' => 'Ethiopia: Oromiya',
'ET-07' => 'Ethiopia: Somali',
'ET-11' => 'Ethiopia: Southern',
'ET-52' => 'Ethiopia: Sumale',
'ET-12' => 'Ethiopia: Tigray',
'ET-53' => 'Ethiopia: Tigray',
'ET-54' => 'Ethiopia: YeDebub Biheroch Bihereseboch na
Hizboch',

'--FJ' => '','-FJ' => 'Fiji',
'FJ-01' => 'Fiji: Central',
'FJ-02' => 'Fiji: Eastern',
'FJ-03' => 'Fiji: Northern',
'FJ-04' => 'Fiji: Rotuma',
'FJ-05' => 'Fiji: Western',

'--FI' => '','-FI' =>
'Finland',
'FI-01' => 'Finland: Åland',
'FI-14' => 'Finland: Eastern Finland',
'FI-06' => 'Finland: Lapland',
'FI-08' => 'Finland: Oulu',
'FI-13' => 'Finland: Southern Finland',
'FI-15' => 'Finland: Western Finland',

'--FR' => '','-FR' =>
'France',
'FR-C1' => 'France: Alsace',
'FR-97' => 'France: Aquitaine',
'FR-98' => 'France: Auvergne',
'FR-99' => 'France: Basse-Normandie',
'FR-A1' => 'France: Bourgogne',
'FR-A2' => 'France: Bretagne',
'FR-A3' => 'France: Centre',
'FR-A4' => 'France: Champagne-Ardenne',
'FR-A5' => 'France: Corse',
'FR-A6' => 'France: Franche-Comte',
'FR-A7' => 'France: Haute-Normandie',
'FR-A8' => 'France: Ile-de-France',
'FR-A9' => 'France: Languedoc-Roussillon',
'FR-B1' => 'France: Limousin',
'FR-B2' => 'France: Lorraine',
'FR-B3' => 'France: Midi-Pyrenees',
'FR-B4' => 'France: Nord-Pas-de-Calais',
'FR-B5' => 'France: Pays de la Loire',
'FR-B6' => 'France: Picardie',
'FR-B7' => 'France: Poitou-Charentes',
'FR-B8' => 'France: Provence-Alpes-Cote
d\'Azur',
'FR-B9' => 'France: Rhone-Alpes',

'--GA' => '','-GA' =>
'Gabon',
'GA-01' => 'Gabon: Estuaire',
'GA-02' => 'Gabon: Haut-Ogooue',
'GA-03' => 'Gabon: Moyen-Ogooue',
'GA-04' => 'Gabon: Ngounie',
'GA-05' => 'Gabon: Nyanga',
'GA-06' => 'Gabon: Ogooue-Ivindo',
'GA-07' => 'Gabon: Ogooue-Lolo',
'GA-08' => 'Gabon: Ogooue-Maritime',
'GA-09' => 'Gabon: Woleu-Ntem',

'--GM' => '','-GM' =>
'Gambia',
'GM-01' => 'Gambia: Banjul',
'GM-02' => 'Gambia: Lower River',
'GM-03' => 'Gambia: MacCarthy Island',
'GM-07' => 'Gambia: North Bank',
'GM-04' => 'Gambia: Upper River',
'GM-05' => 'Gambia: Western',

'--GE' => '','-GE' =>
'Georgia',
'GE-01' => 'Georgia: Abashis Raioni',
'GE-02' => 'Georgia: Abkhazia',
'GE-03' => 'Georgia: Adigenis Raioni',
'GE-04' => 'Georgia: Ajaria',
'GE-05' => 'Georgia: Akhalgoris Raioni',
'GE-06' => 'Georgia: Akhalk\'alak\'is
Raioni',
'GE-07' => 'Georgia: Akhalts\'ikhis Raioni',
'GE-08' => 'Georgia: Akhmetis Raioni',
'GE-09' => 'Georgia: Ambrolauris Raioni',
'GE-10' => 'Georgia: Aspindzis Raioni',
'GE-11' => 'Georgia: Baghdat\'is Raioni',
'GE-12' => 'Georgia: Bolnisis Raioni',
'GE-13' => 'Georgia: Borjomis Raioni',
'GE-14' => 'Georgia: Chiat\'ura',
'GE-15' => 'Georgia: Ch\'khorotsqus Raioni',
'GE-16' => 'Georgia: Ch\'okhatauris Raioni',
'GE-17' => 'Georgia: Dedop\'listsqaros Raioni',
'GE-18' => 'Georgia: Dmanisis Raioni',
'GE-19' => 'Georgia: Dushet\'is Raioni',
'GE-20' => 'Georgia: Gardabanis Raioni',
'GE-21' => 'Georgia: Gori',
'GE-22' => 'Georgia: Goris Raioni',
'GE-23' => 'Georgia: Gurjaanis Raioni',
'GE-24' => 'Georgia: Javis Raioni',
'GE-25' => 'Georgia: K\'arelis Raioni',
'GE-26' => 'Georgia: Kaspis Raioni',
'GE-27' => 'Georgia: Kharagaulis Raioni',
'GE-28' => 'Georgia: Khashuris Raioni',
'GE-29' => 'Georgia: Khobis Raioni',
'GE-30' => 'Georgia: Khonis Raioni',
'GE-31' => 'Georgia: K\'ut\'aisi',
'GE-32' => 'Georgia: Lagodekhis Raioni',
'GE-33' => 'Georgia: Lanch\'khut\'is
Raioni',
'GE-34' => 'Georgia: Lentekhis Raioni',
'GE-35' => 'Georgia: Marneulis Raioni',
'GE-36' => 'Georgia: Martvilis Raioni',
'GE-37' => 'Georgia: Mestiis Raioni',
'GE-38' => 'Georgia: Mts\'khet\'is
Raioni',
'GE-39' => 'Georgia: Ninotsmindis Raioni',
'GE-40' => 'Georgia: Onis Raioni',
'GE-41' => 'Georgia: Ozurget\'is Raioni',
'GE-42' => 'Georgia: P\'ot\'i',
'GE-43' => 'Georgia: Qazbegis Raioni',
'GE-44' => 'Georgia: Qvarlis Raioni',
'GE-45' => 'Georgia: Rust\'avi',
'GE-46' => 'Georgia: Sach\'kheris Raioni',
'GE-47' => 'Georgia: Sagarejos Raioni',
'GE-48' => 'Georgia: Samtrediis Raioni',
'GE-49' => 'Georgia: Senakis Raioni',
'GE-50' => 'Georgia: Sighnaghis Raioni',
'GE-51' => 'Georgia: T\'bilisi',
'GE-52' => 'Georgia: T\'elavis Raioni',
'GE-53' => 'Georgia: T\'erjolis Raioni',
'GE-54' => 'Georgia: T\'et\'ritsqaros
Raioni',
'GE-55' => 'Georgia: T\'ianet\'is Raioni',
'GE-56' => 'Georgia: Tqibuli',
'GE-57' => 'Georgia: Ts\'ageris Raioni',
'GE-58' => 'Georgia: Tsalenjikhis Raioni',
'GE-59' => 'Georgia: Tsalkis Raioni',
'GE-60' => 'Georgia: Tsqaltubo',
'GE-61' => 'Georgia: Vanis Raioni',
'GE-62' => 'Georgia: Zestap\'onis Raioni',
'GE-63' => 'Georgia: Zugdidi',
'GE-64' => 'Georgia: Zugdidis Raioni',

'--DE' => '','-DE' =>
'Germany',
'DE-01' => 'Germany: Baden-Württemberg',
'DE-02' => 'Germany: Bayern',
'DE-16' => 'Germany: Berlin',
'DE-11' => 'Germany: Brandenburg',
'DE-03' => 'Germany: Bremen',
'DE-04' => 'Germany: Hamburg',
'DE-05' => 'Germany: Hessen',
'DE-12' => 'Germany: Mecklenburg-Vorpommern',
'DE-06' => 'Germany: Niedersachsen',
'DE-07' => 'Germany: Nordrhein-Westfalen',
'DE-08' => 'Germany: Rheinland-Pfalz',
'DE-09' => 'Germany: Saarland',
'DE-13' => 'Germany: Sachsen',
'DE-14' => 'Germany: Sachsen-Anhalt',
'DE-10' => 'Germany: Schleswig-Holstein',
'DE-15' => 'Germany: Thuringen',

'--GH' => '','-GH' =>
'Ghana',
'GH-02' => 'Ghana: Ashanti',
'GH-03' => 'Ghana: Brong-Ahafo',
'GH-04' => 'Ghana: Central',
'GH-05' => 'Ghana: Eastern',
'GH-01' => 'Ghana: Greater Accra',
'GH-06' => 'Ghana: Northern',
'GH-10' => 'Ghana: Upper East',
'GH-11' => 'Ghana: Upper West',
'GH-08' => 'Ghana: Volta',
'GH-09' => 'Ghana: Western',

'--GR' => '','-GR' =>
'Greece',
'GR-31' => 'Greece: Aitolia kai Akarnania',
'GR-38' => 'Greece: Akhaia',
'GR-36' => 'Greece: Argolis',
'GR-41' => 'Greece: Arkadhia',
'GR-20' => 'Greece: Arta',
'GR-35' => 'Greece: Attiki',
'GR-47' => 'Greece: Dhodhekanisos',
'GR-04' => 'Greece: Drama',
'GR-30' => 'Greece: Evritania',
'GR-01' => 'Greece: Evros',
'GR-34' => 'Greece: Evvoia',
'GR-08' => 'Greece: Florina',
'GR-32' => 'Greece: Fokis',
'GR-29' => 'Greece: Fthiotis',
'GR-10' => 'Greece: Grevena',
'GR-39' => 'Greece: Ilia',
'GR-12' => 'Greece: Imathia',
'GR-17' => 'Greece: Ioannina',
'GR-45' => 'Greece: Iraklion',
'GR-23' => 'Greece: Kardhitsa',
'GR-09' => 'Greece: Kastoria',
'GR-14' => 'Greece: Kavala',
'GR-27' => 'Greece: Kefallinia',
'GR-25' => 'Greece: Kerkira',
'GR-15' => 'Greece: Khalkidhiki',
'GR-43' => 'Greece: Khania',
'GR-50' => 'Greece: Khios',
'GR-49' => 'Greece: Kikladhes',
'GR-06' => 'Greece: Kilkis',
'GR-37' => 'Greece: Korinthia',
'GR-11' => 'Greece: Kozani',
'GR-42' => 'Greece: Lakonia',
'GR-21' => 'Greece: Larisa',
'GR-46' => 'Greece: Lasithi',
'GR-51' => 'Greece: Lesvos',
'GR-26' => 'Greece: Levkas',
'GR-24' => 'Greece: Magnisia',
'GR-40' => 'Greece: Messinia',
'GR-07' => 'Greece: Pella',
'GR-16' => 'Greece: Pieria',
'GR-19' => 'Greece: Preveza',
'GR-44' => 'Greece: Rethimni',
'GR-02' => 'Greece: Rodhopi',
'GR-48' => 'Greece: Samos',
'GR-05' => 'Greece: Serrai',
'GR-18' => 'Greece: Thesprotia',
'GR-13' => 'Greece: Thessaloniki',
'GR-22' => 'Greece: Trikala',
'GR-33' => 'Greece: Voiotia',
'GR-03' => 'Greece: Xanthi',
'GR-28' => 'Greece: Zakinthos',

'--GL' => '','-GL' =>
'Greenland',
'GL-01' => 'Greenland: Nordgronland',
'GL-02' => 'Greenland: Ostgronland',
'GL-03' => 'Greenland: Vestgronland',

'--GD' => '','-GD' =>
'Grenada',
'GD-01' => 'Grenada: Saint Andrew',
'GD-02' => 'Grenada: Saint David',
'GD-03' => 'Grenada: Saint George',
'GD-04' => 'Grenada: Saint John',
'GD-05' => 'Grenada: Saint Mark',
'GD-06' => 'Grenada: Saint Patrick',

'--GT' => '','-GT' =>
'Guatemala',
'GT-01' => 'Guatemala: Alta Verapaz',
'GT-02' => 'Guatemala: Baja Verapaz',
'GT-03' => 'Guatemala: Chimaltenango',
'GT-04' => 'Guatemala: Chiquimula',
'GT-05' => 'Guatemala: El Progreso',
'GT-06' => 'Guatemala: Escuintla',
'GT-07' => 'Guatemala: Guatemala',
'GT-08' => 'Guatemala: Huehuetenango',
'GT-09' => 'Guatemala: Izabal',
'GT-10' => 'Guatemala: Jalapa',
'GT-11' => 'Guatemala: Jutiapa',
'GT-12' => 'Guatemala: Peten',
'GT-13' => 'Guatemala: Quetzaltenango',
'GT-14' => 'Guatemala: Quiche',
'GT-15' => 'Guatemala: Retalhuleu',
'GT-16' => 'Guatemala: Sacatepequez',
'GT-17' => 'Guatemala: San Marcos',
'GT-18' => 'Guatemala: Santa Rosa',
'GT-19' => 'Guatemala: Solola',
'GT-20' => 'Guatemala: Suchitepequez',
'GT-21' => 'Guatemala: Totonicapan',
'GT-22' => 'Guatemala: Zacapa',

'--GN' => '','-GN' =>
'Guinea',
'GN-01' => 'Guinea: Beyla',
'GN-02' => 'Guinea: Boffa',
'GN-03' => 'Guinea: Boke',
'GN-04' => 'Guinea: Conakry',
'GN-30' => 'Guinea: Coyah',
'GN-05' => 'Guinea: Dabola',
'GN-06' => 'Guinea: Dalaba',
'GN-07' => 'Guinea: Dinguiraye',
'GN-31' => 'Guinea: Dubreka',
'GN-09' => 'Guinea: Faranah',
'GN-10' => 'Guinea: Forecariah',
'GN-11' => 'Guinea: Fria',
'GN-12' => 'Guinea: Gaoual',
'GN-13' => 'Guinea: Gueckedou',
'GN-32' => 'Guinea: Kankan',
'GN-15' => 'Guinea: Kerouane',
'GN-16' => 'Guinea: Kindia',
'GN-17' => 'Guinea: Kissidougou',
'GN-33' => 'Guinea: Koubia',
'GN-18' => 'Guinea: Koundara',
'GN-19' => 'Guinea: Kouroussa',
'GN-34' => 'Guinea: Labe',
'GN-35' => 'Guinea: Lelouma',
'GN-36' => 'Guinea: Lola',
'GN-21' => 'Guinea: Macenta',
'GN-22' => 'Guinea: Mali',
'GN-23' => 'Guinea: Mamou',
'GN-37' => 'Guinea: Mandiana',
'GN-38' => 'Guinea: Nzerekore',
'GN-25' => 'Guinea: Pita',
'GN-39' => 'Guinea: Siguiri',
'GN-27' => 'Guinea: Telimele',
'GN-28' => 'Guinea: Tougue',
'GN-29' => 'Guinea: Yomou',

'--GW' => '','-GW' =>
'Guinea-Bissau',
'GW-01' => 'Guinea-Bissau: Bafata',
'GW-12' => 'Guinea-Bissau: Biombo',
'GW-11' => 'Guinea-Bissau: Bissau',
'GW-05' => 'Guinea-Bissau: Bolama',
'GW-06' => 'Guinea-Bissau: Cacheu',
'GW-10' => 'Guinea-Bissau: Gabu',
'GW-04' => 'Guinea-Bissau: Oio',
'GW-02' => 'Guinea-Bissau: Quinara',
'GW-07' => 'Guinea-Bissau: Tombali',

'--GY' => '','-GY' =>
'Guyana',
'GY-10' => 'Guyana: Barima-Waini',
'GY-11' => 'Guyana: Cuyuni-Mazaruni',
'GY-12' => 'Guyana: Demerara-Mahaica',
'GY-13' => 'Guyana: East Berbice-Corentyne',
'GY-14' => 'Guyana: Essequibo Islands-West
Demerara',
'GY-15' => 'Guyana: Mahaica-Berbice',
'GY-16' => 'Guyana: Pomeroon-Supenaam',
'GY-17' => 'Guyana: Potaro-Siparuni',
'GY-18' => 'Guyana: Upper Demerara-Berbice',
'GY-19' => 'Guyana: Upper Takutu-Upper Essequibo',

'--HT' => '','-HT' =>
'Haiti',
'HT-06' => 'Haiti: Artibonite',
'HT-07' => 'Haiti: Centre',
'HT-08' => 'Haiti: Grand\' Anse',
'HT-09' => 'Haiti: Nord',
'HT-10' => 'Haiti: Nord-Est',
'HT-03' => 'Haiti: Nord-Ouest',
'HT-11' => 'Haiti: Ouest',
'HT-12' => 'Haiti: Sud',
'HT-13' => 'Haiti: Sud-Est',

'--HN' => '','-HN' =>
'Honduras',
'HN-01' => 'Honduras: Atlantida',
'HN-02' => 'Honduras: Choluteca',
'HN-03' => 'Honduras: Colon',
'HN-04' => 'Honduras: Comayagua',
'HN-05' => 'Honduras: Copan',
'HN-06' => 'Honduras: Cortes',
'HN-07' => 'Honduras: El Paraiso',
'HN-08' => 'Honduras: Francisco Morazan',
'HN-09' => 'Honduras: Gracias a Dios',
'HN-10' => 'Honduras: Intibuca',
'HN-11' => 'Honduras: Islas de la Bahia',
'HN-12' => 'Honduras: La Paz',
'HN-13' => 'Honduras: Lempira',
'HN-14' => 'Honduras: Ocotepeque',
'HN-15' => 'Honduras: Olancho',
'HN-16' => 'Honduras: Santa Barbara',
'HN-17' => 'Honduras: Valle',
'HN-18' => 'Honduras: Yoro',

'--HU' => '','-HU' =>
'Hungary',
'HU-01' => 'Hungary: Bacs-Kiskun',
'HU-02' => 'Hungary: Baranya',
'HU-03' => 'Hungary: Bekes',
'HU-26' => 'Hungary: Bekescsaba',
'HU-04' => 'Hungary: Borsod-Abauj-Zemplen',
'HU-05' => 'Hungary: Budapest',
'HU-06' => 'Hungary: Csongrad',
'HU-07' => 'Hungary: Debrecen',
'HU-27' => 'Hungary: Dunaujvaros',
'HU-28' => 'Hungary: Eger',
'HU-08' => 'Hungary: Fejer',
'HU-25' => 'Hungary: Gyor',
'HU-09' => 'Hungary: Gyor-Moson-Sopron',
'HU-10' => 'Hungary: Hajdu-Bihar',
'HU-11' => 'Hungary: Heves',
'HU-29' => 'Hungary: Hodmezovasarhely',
'HU-20' => 'Hungary: Jasz-Nagykun-Szolnok',
'HU-30' => 'Hungary: Kaposvar',
'HU-31' => 'Hungary: Kecskemet',
'HU-12' => 'Hungary: Komarom-Esztergom',
'HU-13' => 'Hungary: Miskolc',
'HU-32' => 'Hungary: Nagykanizsa',
'HU-14' => 'Hungary: Nograd',
'HU-33' => 'Hungary: Nyiregyhaza',
'HU-15' => 'Hungary: Pecs',
'HU-16' => 'Hungary: Pest',
'HU-17' => 'Hungary: Somogy',
'HU-34' => 'Hungary: Sopron',
'HU-18' => 'Hungary: Szabolcs-Szatmar-Bereg',
'HU-19' => 'Hungary: Szeged',
'HU-35' => 'Hungary: Szekesfehervar',
'HU-36' => 'Hungary: Szolnok',
'HU-37' => 'Hungary: Szombathely',
'HU-38' => 'Hungary: Tatabanya',
'HU-21' => 'Hungary: Tolna',
'HU-22' => 'Hungary: Vas',
'HU-23' => 'Hungary: Veszprem',
'HU-39' => 'Hungary: Veszprem',
'HU-24' => 'Hungary: Zala',
'HU-40' => 'Hungary: Zalaegerszeg',

'--IS' => '','-IS' =>
'Iceland',
'IS-01' => 'Iceland: Akranes',
'IS-02' => 'Iceland: Akureyri',
'IS-03' => 'Iceland: Arnessysla',
'IS-04' => 'Iceland: Austur-Bardastrandarsysla',
'IS-05' => 'Iceland: Austur-Hunavatnssysla',
'IS-06' => 'Iceland: Austur-Skaftafellssysla',
'IS-07' => 'Iceland: Borgarfjardarsysla',
'IS-08' => 'Iceland: Dalasysla',
'IS-09' => 'Iceland: Eyjafjardarsysla',
'IS-10' => 'Iceland: Gullbringusysla',
'IS-11' => 'Iceland: Hafnarfjordur',
'IS-12' => 'Iceland: Husavik',
'IS-13' => 'Iceland: Isafjordur',
'IS-14' => 'Iceland: Keflavik',
'IS-15' => 'Iceland: Kjosarsysla',
'IS-16' => 'Iceland: Kopavogur',
'IS-17' => 'Iceland: Myrasysla',
'IS-18' => 'Iceland: Neskaupstadur',
'IS-19' => 'Iceland: Nordur-Isafjardarsysla',
'IS-20' => 'Iceland: Nordur-Mulasysla',
'IS-21' => 'Iceland: Nordur-Tingeyjarsysla',
'IS-22' => 'Iceland: Olafsfjordur',
'IS-23' => 'Iceland: Rangarvallasysla',
'IS-24' => 'Iceland: Reykjavik',
'IS-25' => 'Iceland: Saudarkrokur',
'IS-26' => 'Iceland: Seydisfjordur',
'IS-27' => 'Iceland: Siglufjordur',
'IS-28' => 'Iceland: Skagafjardarsysla',
'IS-29' => 'Iceland: Snafellsnes- og
Hnappadalssysla',
'IS-30' => 'Iceland: Strandasysla',
'IS-31' => 'Iceland: Sudur-Mulasysla',
'IS-32' => 'Iceland: Sudur-Tingeyjarsysla',
'IS-33' => 'Iceland: Vestmannaeyjar',
'IS-34' => 'Iceland: Vestur-Bardastrandarsysla',
'IS-35' => 'Iceland: Vestur-Hunavatnssysla',
'IS-36' => 'Iceland: Vestur-Isafjardarsysla',
'IS-37' => 'Iceland: Vestur-Skaftafellssysla',

'--IN' => '','-IN' =>
'India',
'IN-01' => 'India: Andaman and Nicobar Islands',
'IN-02' => 'India: Andhra Pradesh',
'IN-30' => 'India: Arunachal Pradesh',
'IN-03' => 'India: Assam',
'IN-34' => 'India: Bihar',
'IN-05' => 'India: Chandigarh',
'IN-37' => 'India: Chhattisgarh',
'IN-06' => 'India: Dadra and Nagar Haveli',
'IN-32' => 'India: Daman and Diu',
'IN-07' => 'India: Delhi',
'IN-33' => 'India: Goa',
'IN-09' => 'India: Gujarat',
'IN-10' => 'India: Haryana',
'IN-11' => 'India: Himachal Pradesh',
'IN-12' => 'India: Jammu and Kashmir',
'IN-38' => 'India: Jharkhand',
'IN-19' => 'India: Karnataka',
'IN-13' => 'India: Kerala',
'IN-14' => 'India: Lakshadweep',
'IN-35' => 'India: Madhya Pradesh',
'IN-16' => 'India: Maharashtra',
'IN-17' => 'India: Manipur',
'IN-18' => 'India: Meghalaya',
'IN-31' => 'India: Mizoram',
'IN-20' => 'India: Nagaland',
'IN-21' => 'India: Orissa',
'IN-22' => 'India: Pondicherry',
'IN-23' => 'India: Punjab',
'IN-24' => 'India: Rajasthan',
'IN-29' => 'India: Sikkim',
'IN-25' => 'India: Tamil Nadu',
'IN-26' => 'India: Tripura',
'IN-36' => 'India: Uttar Pradesh',
'IN-39' => 'India: Uttaranchal',
'IN-28' => 'India: West Bengal',

'--ID' => '','-ID' =>
'Indonesia',
'ID-01' => 'Indonesia: Aceh',
'ID-02' => 'Indonesia: Bali',
'ID-33' => 'Indonesia: Banten',
'ID-03' => 'Indonesia: Bengkulu',
'ID-34' => 'Indonesia: Gorontalo',
'ID-04' => 'Indonesia: Jakarta Raya',
'ID-05' => 'Indonesia: Jambi',
'ID-30' => 'Indonesia: Jawa Barat',
'ID-07' => 'Indonesia: Jawa Tengah',
'ID-08' => 'Indonesia: Jawa Timur',
'ID-11' => 'Indonesia: Kalimantan Barat',
'ID-12' => 'Indonesia: Kalimantan Selatan',
'ID-13' => 'Indonesia: Kalimantan Tengah',
'ID-14' => 'Indonesia: Kalimantan Timur',
'ID-35' => 'Indonesia: Kepulauan Bangka Belitung',
'ID-15' => 'Indonesia: Lampung',
'ID-29' => 'Indonesia: Maluku Utara',
'ID-28' => 'Indonesia: Maluku',
'ID-17' => 'Indonesia: Nusa Tenggara Barat',
'ID-18' => 'Indonesia: Nusa Tenggara Timur',
'ID-09' => 'Indonesia: Papua',
'ID-19' => 'Indonesia: Riau',
'ID-20' => 'Indonesia: Sulawesi Selatan',
'ID-21' => 'Indonesia: Sulawesi Tengah',
'ID-22' => 'Indonesia: Sulawesi Tenggara',
'ID-31' => 'Indonesia: Sulawesi Utara',
'ID-24' => 'Indonesia: Sumatera Barat',
'ID-25' => 'Indonesia: Sumatera Selatan',
'ID-32' => 'Indonesia: Sumatera Selatan',
'ID-26' => 'Indonesia: Sumatera Utara',
'ID-10' => 'Indonesia: Yogyakarta',

'--IR' => '','-IR' => 'Iran',
'IR-32' => 'Iran: Ardabil',
'IR-01' => 'Iran: Azarbayjan-e Bakhtari',
'IR-02' => 'Iran: Azarbayjan-e Khavari',
'IR-13' => 'Iran: Bakhtaran',
'IR-22' => 'Iran: Bushehr',
'IR-03' => 'Iran: Chahar Mahall va Bakhtiari',
'IR-28' => 'Iran: Esfahan',
'IR-07' => 'Iran: Fars',
'IR-08' => 'Iran: Gilan',
'IR-37' => 'Iran: Golestan',
'IR-09' => 'Iran: Hamadan',
'IR-11' => 'Iran: Hormozgan',
'IR-10' => 'Iran: Ilam',
'IR-29' => 'Iran: Kerman',
'IR-30' => 'Iran: Khorasan',
'IR-15' => 'Iran: Khuzestan',
'IR-05' => 'Iran: Kohkiluyeh va Buyer Ahmadi',
'IR-16' => 'Iran: Kordestan',
'IR-23' => 'Iran: Lorestan',
'IR-34' => 'Iran: Markazi',
'IR-35' => 'Iran: Mazandaran',
'IR-38' => 'Iran: Qazvin',
'IR-39' => 'Iran: Qom',
'IR-25' => 'Iran: Semnan',
'IR-04' => 'Iran: Sistan va Baluchestan',
'IR-26' => 'Iran: Tehran',
'IR-31' => 'Iran: Yazd',
'IR-36' => 'Iran: Zanjan',

'--IQ' => '','-IQ' => 'Iraq',
'IQ-01' => 'Iraq: Al Anbar',
'IQ-02' => 'Iraq: Al Basrah',
'IQ-03' => 'Iraq: Al Muthanna',
'IQ-04' => 'Iraq: Al Qadisiyah',
'IQ-17' => 'Iraq: An Najaf',
'IQ-11' => 'Iraq: Arbil',
'IQ-05' => 'Iraq: As Sulaymaniyah',
'IQ-13' => 'Iraq: At Ta\'mim',
'IQ-06' => 'Iraq: Babil',
'IQ-07' => 'Iraq: Baghdad',
'IQ-08' => 'Iraq: Dahuk',
'IQ-09' => 'Iraq: Dhi Qar',
'IQ-10' => 'Iraq: Diyala',
'IQ-12' => 'Iraq: Karbala\'',
'IQ-14' => 'Iraq: Maysan',
'IQ-15' => 'Iraq: Ninawa',
'IQ-18' => 'Iraq: Salah ad Din',
'IQ-16' => 'Iraq: Wasit',

'--IE' => '','-IE' =>
'Ireland',
'IE-01' => 'Ireland: Carlow',
'IE-02' => 'Ireland: Cavan',
'IE-03' => 'Ireland: Clare',
'IE-04' => 'Ireland: Cork',
'IE-06' => 'Ireland: Donegal',
'IE-07' => 'Ireland: Dublin',
'IE-10' => 'Ireland: Galway',
'IE-11' => 'Ireland: Kerry',
'IE-12' => 'Ireland: Kildare',
'IE-13' => 'Ireland: Kilkenny',
'IE-15' => 'Ireland: Laois',
'IE-14' => 'Ireland: Leitrim',
'IE-16' => 'Ireland: Limerick',
'IE-18' => 'Ireland: Longford',
'IE-19' => 'Ireland: Louth',
'IE-20' => 'Ireland: Mayo',
'IE-21' => 'Ireland: Meath',
'IE-22' => 'Ireland: Monaghan',
'IE-23' => 'Ireland: Offaly',
'IE-24' => 'Ireland: Roscommon',
'IE-25' => 'Ireland: Sligo',
'IE-26' => 'Ireland: Tipperary',
'IE-27' => 'Ireland: Waterford',
'IE-29' => 'Ireland: Westmeath',
'IE-30' => 'Ireland: Wexford',
'IE-31' => 'Ireland: Wicklow',

'--IL' => '','-IL' =>
'Israel',
'IL-01' => 'Israel: HaDarom',
'IL-02' => 'Israel: HaMerkaz',
'IL-03' => 'Israel: HaZafon',
'IL-04' => 'Israel: Hefa',
'IL-05' => 'Israel: Tel Aviv',
'IL-06' => 'Israel: Yerushalayim',

'--IT' => '','-IT' =>
'Italy',
'IT-01' => 'Italy: Abruzzi',
'IT-02' => 'Italy: Basilicata',
'IT-03' => 'Italy: Calabria',
'IT-04' => 'Italy: Campania',
'IT-05' => 'Italy: Emilia-Romagna',
'IT-06' => 'Italy: Friuli-Venezia Giulia',
'IT-07' => 'Italy: Lazio',
'IT-08' => 'Italy: Liguria',
'IT-09' => 'Italy: Lombardia',
'IT-10' => 'Italy: Marche',
'IT-11' => 'Italy: Molise',
'IT-12' => 'Italy: Piemonte',
'IT-13' => 'Italy: Puglia',
'IT-14' => 'Italy: Sardegna',
'IT-15' => 'Italy: Sicilia',
'IT-16' => 'Italy: Toscana',
'IT-17' => 'Italy: Trentino-Alto Adige',
'IT-18' => 'Italy: Umbria',
'IT-19' => 'Italy: Valle d\'Aosta',
'IT-20' => 'Italy: Veneto',

'--JM' => '','-JM' =>
'Jamaica',
'JM-01' => 'Jamaica: Clarendon',
'JM-02' => 'Jamaica: Hanover',
'JM-17' => 'Jamaica: Kingston',
'JM-04' => 'Jamaica: Manchester',
'JM-07' => 'Jamaica: Portland',
'JM-08' => 'Jamaica: Saint Andrew',
'JM-09' => 'Jamaica: Saint Ann',
'JM-10' => 'Jamaica: Saint Catherine',
'JM-11' => 'Jamaica: Saint Elizabeth',
'JM-12' => 'Jamaica: Saint James',
'JM-13' => 'Jamaica: Saint Mary',
'JM-14' => 'Jamaica: Saint Thomas',
'JM-15' => 'Jamaica: Trelawny',
'JM-16' => 'Jamaica: Westmoreland',

'--JP' => '','-JP' =>
'Japan',
'JP-01' => 'Japan: Aichi',
'JP-02' => 'Japan: Akita',
'JP-03' => 'Japan: Aomori',
'JP-04' => 'Japan: Chiba',
'JP-05' => 'Japan: Ehime',
'JP-06' => 'Japan: Fukui',
'JP-07' => 'Japan: Fukuoka',
'JP-08' => 'Japan: Fukushima',
'JP-09' => 'Japan: Gifu',
'JP-10' => 'Japan: Gumma',
'JP-11' => 'Japan: Hiroshima',
'JP-12' => 'Japan: Hokkaido',
'JP-13' => 'Japan: Hyogo',
'JP-14' => 'Japan: Ibaraki',
'JP-15' => 'Japan: Ishikawa',
'JP-16' => 'Japan: Iwate',
'JP-17' => 'Japan: Kagawa',
'JP-18' => 'Japan: Kagoshima',
'JP-19' => 'Japan: Kanagawa',
'JP-20' => 'Japan: Kochi',
'JP-21' => 'Japan: Kumamoto',
'JP-22' => 'Japan: Kyoto',
'JP-23' => 'Japan: Mie',
'JP-24' => 'Japan: Miyagi',
'JP-25' => 'Japan: Miyazaki',
'JP-26' => 'Japan: Nagano',
'JP-27' => 'Japan: Nagasaki',
'JP-28' => 'Japan: Nara',
'JP-29' => 'Japan: Niigata',
'JP-30' => 'Japan: Oita',
'JP-31' => 'Japan: Okayama',
'JP-47' => 'Japan: Okinawa',
'JP-32' => 'Japan: Osaka',
'JP-33' => 'Japan: Saga',
'JP-34' => 'Japan: Saitama',
'JP-35' => 'Japan: Shiga',
'JP-36' => 'Japan: Shimane',
'JP-37' => 'Japan: Shizuoka',
'JP-38' => 'Japan: Tochigi',
'JP-39' => 'Japan: Tokushima',
'JP-40' => 'Japan: Tokyo',
'JP-41' => 'Japan: Tottori',
'JP-42' => 'Japan: Toyama',
'JP-43' => 'Japan: Wakayama',
'JP-44' => 'Japan: Yamagata',
'JP-45' => 'Japan: Yamaguchi',
'JP-46' => 'Japan: Yamanashi',

'--JO' => '','-JO' =>
'Jordan',
'JO-02' => 'Jordan: Al Balqa\'',
'JO-09' => 'Jordan: Al Karak',
'JO-10' => 'Jordan: Al Mafraq',
'JO-16' => 'Jordan: Amman',
'JO-12' => 'Jordan: At Tafilah',
'JO-13' => 'Jordan: Az Zarqa',
'JO-14' => 'Jordan: Irbid',
'JO-07' => 'Jordan: Ma',

'--KZ' => '','-KZ' =>
'Kazakhstan',
'KZ-02' => 'Kazakhstan: Almaty City',
'KZ-01' => 'Kazakhstan: Almaty',
'KZ-03' => 'Kazakhstan: Aqmola',
'KZ-04' => 'Kazakhstan: Aqt?be',
'KZ-05' => 'Kazakhstan: Astana',
'KZ-06' => 'Kazakhstan: Atyrau',
'KZ-08' => 'Kazakhstan: Bayqonyr',
'KZ-15' => 'Kazakhstan: East Kazakhstan',
'KZ-09' => 'Kazakhstan: Mangghystau',
'KZ-16' => 'Kazakhstan: North Kazakhstan',
'KZ-11' => 'Kazakhstan: Pavlodar',
'KZ-12' => 'Kazakhstan: Qaraghandy',
'KZ-13' => 'Kazakhstan: Qostanay',
'KZ-14' => 'Kazakhstan: Qyzylorda',
'KZ-10' => 'Kazakhstan: South Kazakhstan',
'KZ-07' => 'Kazakhstan: West Kazakhstan',
'KZ-17' => 'Kazakhstan: Zhambyl',

'--KE' => '','-KE' =>
'Kenya',
'KE-01' => 'Kenya: Central',
'KE-02' => 'Kenya: Coast',
'KE-03' => 'Kenya: Eastern',
'KE-05' => 'Kenya: Nairobi Area',
'KE-06' => 'Kenya: North-Eastern',
'KE-07' => 'Kenya: Nyanza',
'KE-08' => 'Kenya: Rift Valley',
'KE-09' => 'Kenya: Western',

'--KI' => '','-KI' =>
'Kiribati',
'KI-01' => 'Kiribati: Gilbert Islands',
'KI-02' => 'Kiribati: Line Islands',
'KI-03' => 'Kiribati: Phoenix Islands',

'--KW' => '','-KW' =>
'Kuwait',
'KW-01' => 'Kuwait: Al Ahmadi',
'KW-05' => 'Kuwait: Al Jahra',
'KW-02' => 'Kuwait: Al Kuwayt',
'KW-03' => 'Kuwait: Hawalli',

'--KG' => '','-KG' =>
'Kyrgyzstan',
'KG-09' => 'Kyrgyzstan: Batken',
'KG-01' => 'Kyrgyzstan: Bishkek',
'KG-02' => 'Kyrgyzstan: Chuy',
'KG-03' => 'Kyrgyzstan: Jalal-Abad',
'KG-04' => 'Kyrgyzstan: Naryn',
'KG-08' => 'Kyrgyzstan: Osh',
'KG-06' => 'Kyrgyzstan: Talas',
'KG-07' => 'Kyrgyzstan: Ysyk-Kol',

'--LA' => '','-LA' => 'Lao',
'LA-01' => 'Lao: Attapu',
'LA-02' => 'Lao: Champasak',
'LA-03' => 'Lao: Houaphan',
'LA-04' => 'Lao: Khammouan',
'LA-05' => 'Lao: Louang Namtha',
'LA-17' => 'Lao: Louangphrabang',
'LA-07' => 'Lao: Oudomxai',
'LA-08' => 'Lao: Phongsali',
'LA-09' => 'Lao: Saravan',
'LA-10' => 'Lao: Savannakhet',
'LA-11' => 'Lao: Vientiane',
'LA-13' => 'Lao: Xaignabouri',
'LA-14' => 'Lao: Xiangkhoang',

'--LV' => '','-LV' =>
'Latvia',
'LV-01' => 'Latvia: Aizkraukles',
'LV-02' => 'Latvia: Aluksnes',
'LV-03' => 'Latvia: Balvu',
'LV-04' => 'Latvia: Bauskas',
'LV-05' => 'Latvia: Césu',
'LV-06' => 'Latvia: Daugavpils',
'LV-07' => 'Latvia: Daugavpils',
'LV-08' => 'Latvia: Dobeles',
'LV-09' => 'Latvia: Gulbenes',
'LV-10' => 'Latvia: Jékabpils',
'LV-11' => 'Latvia: Jelgava',
'LV-12' => 'Latvia: Jelgavas',
'LV-13' => 'Latvia: Jurmala',
'LV-14' => 'Latvia: Kráslavas',
'LV-15' => 'Latvia: Kuldigas',
'LV-16' => 'Latvia: Liepája',
'LV-17' => 'Latvia: Liepájas',
'LV-18' => 'Latvia: Limbazu',
'LV-19' => 'Latvia: Ludzas',
'LV-20' => 'Latvia: Madonas',
'LV-21' => 'Latvia: Ogres',
'LV-22' => 'Latvia: Preilu',
'LV-23' => 'Latvia: Rézekne',
'LV-24' => 'Latvia: Rézeknes',
'LV-25' => 'Latvia: Riga',
'LV-26' => 'Latvia: Rigas',
'LV-27' => 'Latvia: Saldus',
'LV-28' => 'Latvia: Talsu',
'LV-29' => 'Latvia: Tukuma',
'LV-30' => 'Latvia: Valkas',
'LV-31' => 'Latvia: Valmieras',
'LV-32' => 'Latvia: Ventspils',
'LV-33' => 'Latvia: Ventspils',

'--LB' => '','-LB' =>
'Lebanon',
'LB-01' => 'Lebanon: Beqaa',
'LB-04' => 'Lebanon: Beyrouth',
'LB-03' => 'Lebanon: Liban-Nord',
'LB-06' => 'Lebanon: Liban-Sud',
'LB-05' => 'Lebanon: Mont-Liban',
'LB-07' => 'Lebanon: Nabatiye',

'--LS' => '','-LS' =>
'Lesotho',
'LS-10' => 'Lesotho: Berea',
'LS-11' => 'Lesotho: Butha-Buthe',
'LS-12' => 'Lesotho: Leribe',
'LS-13' => 'Lesotho: Mafeteng',
'LS-14' => 'Lesotho: Maseru',
'LS-15' => 'Lesotho: Mohales Hoek',
'LS-16' => 'Lesotho: Mokhotlong',
'LS-17' => 'Lesotho: Qachas Nek',
'LS-18' => 'Lesotho: Quthing',
'LS-19' => 'Lesotho: Thaba-Tseka',

'--LR' => '','-LR' =>
'Liberia',
'LR-01' => 'Liberia: Bong',
'LR-11' => 'Liberia: Grand Bassa',
'LR-04' => 'Liberia: Grand Cape Mount',
'LR-02' => 'Liberia: Grand Jide',
'LR-05' => 'Liberia: Lofa',
'LR-06' => 'Liberia: Maryland',
'LR-07' => 'Liberia: Monrovia',
'LR-14' => 'Liberia: Montserrado',
'LR-09' => 'Liberia: Nimba',
'LR-10' => 'Liberia: Sino',

'--LY' => '','-LY' => 'Libyan Arab
Jamahiriya',
'LY-47' => 'Libyan Arab Jamahiriya: Ajdabiya',
'LY-48' => 'Libyan Arab Jamahiriya: Al Fatih',
'LY-49' => 'Libyan Arab Jamahiriya: Al Jabal al
Akhdar',
'LY-05' => 'Libyan Arab Jamahiriya: Al Jufrah',
'LY-50' => 'Libyan Arab Jamahiriya: Al Khums',
'LY-08' => 'Libyan Arab Jamahiriya: Al Kufrah',
'LY-03' => 'Libyan Arab Jamahiriya: Al',
'LY-51' => 'Libyan Arab Jamahiriya: An Nuqat al
Khams',
'LY-13' => 'Libyan Arab Jamahiriya: Ash
Shati\'',
'LY-52' => 'Libyan Arab Jamahiriya: Awbari',
'LY-53' => 'Libyan Arab Jamahiriya: Az Zawiyah',
'LY-54' => 'Libyan Arab Jamahiriya: Banghazi',
'LY-55' => 'Libyan Arab Jamahiriya: Darnah',
'LY-56' => 'Libyan Arab Jamahiriya: Ghadamis',
'LY-57' => 'Libyan Arab Jamahiriya: Gharyan',
'LY-58' => 'Libyan Arab Jamahiriya: Misratah',
'LY-30' => 'Libyan Arab Jamahiriya: Murzuq',
'LY-34' => 'Libyan Arab Jamahiriya: Sabha',
'LY-59' => 'Libyan Arab Jamahiriya: Sawfajjin',
'LY-60' => 'Libyan Arab Jamahiriya: Surt',
'LY-61' => 'Libyan Arab Jamahiriya: Tarabulus',
'LY-41' => 'Libyan Arab Jamahiriya: Tarhunah',
'LY-42' => 'Libyan Arab Jamahiriya: Tubruq',
'LY-62' => 'Libyan Arab Jamahiriya: Yafran',
'LY-45' => 'Libyan Arab Jamahiriya: Zlitan',

'--LI' => '','-LI' =>
'Liechtenstein',
'LI-01' => 'Liechtenstein: Balzers',
'LI-02' => 'Liechtenstein: Eschen',
'LI-03' => 'Liechtenstein: Gamprin',
'LI-04' => 'Liechtenstein: Mauren',
'LI-05' => 'Liechtenstein: Planken',
'LI-06' => 'Liechtenstein: Ruggell',
'LI-07' => 'Liechtenstein: Schaan',
'LI-08' => 'Liechtenstein: Schellenberg',
'LI-09' => 'Liechtenstein: Triesen',
'LI-10' => 'Liechtenstein: Triesenberg',
'LI-11' => 'Liechtenstein: Vaduz',

'--LT' => '','-LT' =>
'Lithuania',
'LT-56' => 'Lithuania: Alytaus Apskritis',
'LT-57' => 'Lithuania: Kauno Apskritis',
'LT-58' => 'Lithuania: Klaipedos Apskritis',
'LT-59' => 'Lithuania: Marijampoles Apskritis',
'LT-60' => 'Lithuania: Panevezio Apskritis',
'LT-61' => 'Lithuania: Siauliu Apskritis',
'LT-62' => 'Lithuania: Taurages Apskritis',
'LT-63' => 'Lithuania: Telsiu Apskritis',
'LT-64' => 'Lithuania: Utenos Apskritis',
'LT-65' => 'Lithuania: Vilniaus Apskritis',

'--LU' => '','-LU' =>
'Luxembourg',
'LU-01' => 'Luxembourg: Diekirch',
'LU-02' => 'Luxembourg: Grevenmacher',
'LU-03' => 'Luxembourg: Luxembourg',

'--MO' => '','-MO' =>
'Macau',
'MO-01' => 'Macau: Ilhas',
'MO-02' => 'Macau: Macau',

'--MK' => '','-MK' =>
'Macedonia',
'MK-01' => 'Macedonia: Aracinovo',
'MK-02' => 'Macedonia: Bac',
'MK-03' => 'Macedonia: Belcista',
'MK-04' => 'Macedonia: Berovo',
'MK-05' => 'Macedonia: Bistrica',
'MK-06' => 'Macedonia: Bitola',
'MK-07' => 'Macedonia: Blatec',
'MK-08' => 'Macedonia: Bogdanci',
'MK-09' => 'Macedonia: Bogomila',
'MK-10' => 'Macedonia: Bogovinje',
'MK-11' => 'Macedonia: Bosilovo',
'MK-12' => 'Macedonia: Brvenica',
'MK-13' => 'Macedonia: Cair',
'MK-14' => 'Macedonia: Capari',
'MK-15' => 'Macedonia: Caska',
'MK-16' => 'Macedonia: Cegrane',
'MK-18' => 'Macedonia: Centar Zupa',
'MK-17' => 'Macedonia: Centar',
'MK-19' => 'Macedonia: Cesinovo',
'MK-20' => 'Macedonia: Cucer-Sandevo',
'MK-21' => 'Macedonia: Debar',
'MK-22' => 'Macedonia: Delcevo',
'MK-23' => 'Macedonia: Delogozdi',
'MK-24' => 'Macedonia: Demir Hisar',
'MK-25' => 'Macedonia: Demir Kapija',
'MK-26' => 'Macedonia: Dobrusevo',
'MK-27' => 'Macedonia: Dolna Banjica',
'MK-28' => 'Macedonia: Dolneni',
'MK-29' => 'Macedonia: Dorce Petrov',
'MK-30' => 'Macedonia: Drugovo',
'MK-31' => 'Macedonia: Dzepciste',
'MK-32' => 'Macedonia: Gazi Baba',
'MK-33' => 'Macedonia: Gevgelija',
'MK-34' => 'Macedonia: Gostivar',
'MK-35' => 'Macedonia: Gradsko',
'MK-36' => 'Macedonia: Ilinden',
'MK-37' => 'Macedonia: Izvor',
'MK-38' => 'Macedonia: Jegunovce',
'MK-39' => 'Macedonia: Kamenjane',
'MK-40' => 'Macedonia: Karbinci',
'MK-41' => 'Macedonia: Karpos',
'MK-42' => 'Macedonia: Kavadarci',
'MK-43' => 'Macedonia: Kicevo',
'MK-44' => 'Macedonia: Kisela Voda',
'MK-45' => 'Macedonia: Klecevce',
'MK-46' => 'Macedonia: Kocani',
'MK-47' => 'Macedonia: Konce',
'MK-48' => 'Macedonia: Kondovo',
'MK-49' => 'Macedonia: Konopiste',
'MK-50' => 'Macedonia: Kosel',
'MK-51' => 'Macedonia: Kratovo',
'MK-52' => 'Macedonia: Kriva Palanka',
'MK-53' => 'Macedonia: Krivogastani',
'MK-54' => 'Macedonia: Krusevo',
'MK-55' => 'Macedonia: Kuklis',
'MK-56' => 'Macedonia: Kukurecani',
'MK-57' => 'Macedonia: Kumanovo',
'MK-58' => 'Macedonia: Labunista',
'MK-59' => 'Macedonia: Lipkovo',
'MK-60' => 'Macedonia: Lozovo',
'MK-61' => 'Macedonia: Lukovo',
'MK-62' => 'Macedonia: Makedonska Kamenica',
'MK-63' => 'Macedonia: Makedonski Brod',
'MK-64' => 'Macedonia: Mavrovi Anovi',
'MK-65' => 'Macedonia: Meseista',
'MK-66' => 'Macedonia: Miravci',
'MK-67' => 'Macedonia: Mogila',
'MK-68' => 'Macedonia: Murtino',
'MK-69' => 'Macedonia: Negotino',
'MK-70' => 'Macedonia: Negotino-Polosko',
'MK-71' => 'Macedonia: Novaci',
'MK-72' => 'Macedonia: Novo Selo',
'MK-73' => 'Macedonia: Oblesevo',
'MK-74' => 'Macedonia: Ohrid',
'MK-75' => 'Macedonia: Orasac',
'MK-76' => 'Macedonia: Orizari',
'MK-77' => 'Macedonia: Oslomej',
'MK-78' => 'Macedonia: Pehcevo',
'MK-79' => 'Macedonia: Petrovec',
'MK-80' => 'Macedonia: Plasnica',
'MK-81' => 'Macedonia: Podares',
'MK-82' => 'Macedonia: Prilep',
'MK-83' => 'Macedonia: Probistip',
'MK-84' => 'Macedonia: Radovis',
'MK-85' => 'Macedonia: Rankovce',
'MK-86' => 'Macedonia: Resen',
'MK-87' => 'Macedonia: Rosoman',
'MK-88' => 'Macedonia: Rostusa',
'MK-89' => 'Macedonia: Samokov',
'MK-90' => 'Macedonia: Saraj',
'MK-91' => 'Macedonia: Sipkovica',
'MK-92' => 'Macedonia: Sopiste',
'MK-93' => 'Macedonia: Sopotnica',
'MK-94' => 'Macedonia: Srbinovo',
'MK-96' => 'Macedonia: Star Dojran',
'MK-95' => 'Macedonia: Staravina',
'MK-97' => 'Macedonia: Staro Nagoricane',
'MK-98' => 'Macedonia: Stip',
'MK-99' => 'Macedonia: Struga',
'MK-A1' => 'Macedonia: Strumica',
'MK-A2' => 'Macedonia: Studenicani',
'MK-A3' => 'Macedonia: Suto Orizari',
'MK-A4' => 'Macedonia: Sveti Nikole',
'MK-A5' => 'Macedonia: Tearce',
'MK-A6' => 'Macedonia: Tetovo',
'MK-A7' => 'Macedonia: Topolcani',
'MK-A8' => 'Macedonia: Valandovo',
'MK-A9' => 'Macedonia: Vasilevo',
'MK-B1' => 'Macedonia: Veles',
'MK-B2' => 'Macedonia: Velesta',
'MK-B3' => 'Macedonia: Vevcani',
'MK-B4' => 'Macedonia: Vinica',
'MK-B5' => 'Macedonia: Vitoliste',
'MK-B6' => 'Macedonia: Vranestica',
'MK-B7' => 'Macedonia: Vrapciste',
'MK-B8' => 'Macedonia: Vratnica',
'MK-B9' => 'Macedonia: Vrutok',
'MK-C1' => 'Macedonia: Zajas',
'MK-C2' => 'Macedonia: Zelenikovo',
'MK-C3' => 'Macedonia: Zelino',
'MK-C4' => 'Macedonia: Zitose',
'MK-C5' => 'Macedonia: Zletovo',
'MK-C6' => 'Macedonia: Zrnovci',

'--MG' => '','-MG' =>
'Madagascar',
'MG-05' => 'Madagascar: Antananarivo',
'MG-01' => 'Madagascar: Antsiranana',
'MG-02' => 'Madagascar: Fianarantsoa',
'MG-03' => 'Madagascar: Mahajanga',
'MG-04' => 'Madagascar: Toamasina',
'MG-06' => 'Madagascar: Toliara',

'--MW' => '','-MW' =>
'Malawi',
'MW-26' => 'Malawi: Balaka',
'MW-24' => 'Malawi: Blantyre',
'MW-02' => 'Malawi: Chikwawa',
'MW-03' => 'Malawi: Chiradzulu',
'MW-04' => 'Malawi: Chitipa',
'MW-06' => 'Malawi: Dedza',
'MW-07' => 'Malawi: Dowa',
'MW-08' => 'Malawi: Karonga',
'MW-09' => 'Malawi: Kasungu',
'MW-27' => 'Malawi: Likoma',
'MW-11' => 'Malawi: Lilongwe',
'MW-28' => 'Malawi: Machinga',
'MW-12' => 'Malawi: Mangochi',
'MW-13' => 'Malawi: Mchinji',
'MW-29' => 'Malawi: Mulanje',
'MW-25' => 'Malawi: Mwanza',
'MW-15' => 'Malawi: Mzimba',
'MW-17' => 'Malawi: Nkhata Bay',
'MW-18' => 'Malawi: Nkhotakota',
'MW-19' => 'Malawi: Nsanje',
'MW-16' => 'Malawi: Ntcheu',
'MW-20' => 'Malawi: Ntchisi',
'MW-30' => 'Malawi: Phalombe',
'MW-21' => 'Malawi: Rumphi',
'MW-22' => 'Malawi: Salima',
'MW-05' => 'Malawi: Thyolo',
'MW-23' => 'Malawi: Zomba',

'--MY' => '','-MY' =>
'Malaysia',
'MY-01' => 'Malaysia: Johor',
'MY-02' => 'Malaysia: Kedah',
'MY-03' => 'Malaysia: Kelantan',
'MY-15' => 'Malaysia: Labuan',
'MY-04' => 'Malaysia: Melaka',
'MY-05' => 'Malaysia: Negeri Sembilan',
'MY-06' => 'Malaysia: Pahang',
'MY-07' => 'Malaysia: Perak',
'MY-08' => 'Malaysia: Perlis',
'MY-09' => 'Malaysia: Pulau Pinang',
'MY-16' => 'Malaysia: Sabah',
'MY-11' => 'Malaysia: Sarawak',
'MY-12' => 'Malaysia: Selangor',
'MY-13' => 'Malaysia: Terengganu',
'MY-14' => 'Malaysia: Wilayah Persekutuan',

'--MV' => '','-MV' =>
'Maldives',
'MV-02' => 'Maldives: Aliff',
'MV-20' => 'Maldives: Baa',
'MV-17' => 'Maldives: Daalu',
'MV-14' => 'Maldives: Faafu',
'MV-27' => 'Maldives: Gaafu Aliff',
'MV-28' => 'Maldives: Gaafu Daalu',
'MV-07' => 'Maldives: Haa Aliff',
'MV-23' => 'Maldives: Haa Daalu',
'MV-26' => 'Maldives: Kaafu',
'MV-05' => 'Maldives: Laamu',
'MV-03' => 'Maldives: Laviyani',
'MV-12' => 'Maldives: Meemu',
'MV-29' => 'Maldives: Naviyani',
'MV-25' => 'Maldives: Noonu',
'MV-13' => 'Maldives: Raa',
'MV-01' => 'Maldives: Seenu',
'MV-24' => 'Maldives: Shaviyani',
'MV-08' => 'Maldives: Thaa',
'MV-04' => 'Maldives: Waavu',

'--ML' => '','-ML' => 'Mali',
'ML-01' => 'Mali: Bamako',
'ML-09' => 'Mali: Gao',
'ML-03' => 'Mali: Kayes',
'ML-10' => 'Mali: Kidal',
'ML-07' => 'Mali: Koulikoro',
'ML-04' => 'Mali: Mopti',
'ML-05' => 'Mali: Segou',
'ML-06' => 'Mali: Sikasso',
'ML-08' => 'Mali: Tombouctou',

'--MR' => '','-MR' =>
'Mauritania',
'MR-07' => 'Mauritania: Adrar',
'MR-03' => 'Mauritania: Assaba',
'MR-05' => 'Mauritania: Brakna',
'MR-08' => 'Mauritania: Dakhlet Nouadhibou',
'MR-04' => 'Mauritania: Gorgol',
'MR-10' => 'Mauritania: Guidimaka',
'MR-01' => 'Mauritania: Hodh Ech Chargui',
'MR-02' => 'Mauritania: Hodh El Gharbi',
'MR-12' => 'Mauritania: Inchiri',
'MR-09' => 'Mauritania: Tagant',
'MR-11' => 'Mauritania: Tiris Zemmour',
'MR-06' => 'Mauritania: Trarza',

'--MU' => '','-MU' =>
'Mauritius',
'MU-21' => 'Mauritius: Agalega Islands',
'MU-12' => 'Mauritius: Black River',
'MU-22' => 'Mauritius: Cargados Carajos',
'MU-13' => 'Mauritius: Flacq',
'MU-14' => 'Mauritius: Grand Port',
'MU-15' => 'Mauritius: Moka',
'MU-16' => 'Mauritius: Pamplemousses',
'MU-17' => 'Mauritius: Plaines Wilhems',
'MU-18' => 'Mauritius: Port Louis',
'MU-19' => 'Mauritius: Riviere du Rempart',
'MU-23' => 'Mauritius: Rodrigues',
'MU-20' => 'Mauritius: Savanne',

'--MX' => '','-MX' =>
'Mexico',
'MX-01' => 'Mexico: Aguascalientes',
'MX-03' => 'Mexico: Baja California Sur',
'MX-02' => 'Mexico: Baja California',
'MX-04' => 'Mexico: Campeche',
'MX-05' => 'Mexico: Chiapas',
'MX-06' => 'Mexico: Chihuahua',
'MX-07' => 'Mexico: Coahuila de Zaragoza',
'MX-08' => 'Mexico: Colima',
'MX-09' => 'Mexico: Distrito Federal',
'MX-10' => 'Mexico: Durango',
'MX-11' => 'Mexico: Guanajuato',
'MX-12' => 'Mexico: Guerrero',
'MX-13' => 'Mexico: Hidalgo',
'MX-14' => 'Mexico: Jalisco',
'MX-15' => 'Mexico: Mexico',
'MX-16' => 'Mexico: Michoacan de Ocampo',
'MX-17' => 'Mexico: Morelos',
'MX-18' => 'Mexico: Nayarit',
'MX-19' => 'Mexico: Nuevo Leon',
'MX-20' => 'Mexico: Oaxaca',
'MX-21' => 'Mexico: Puebla',
'MX-22' => 'Mexico: Queretaro de Arteaga',
'MX-23' => 'Mexico: Quintana Roo',
'MX-24' => 'Mexico: San Luis Potosi',
'MX-25' => 'Mexico: Sinaloa',
'MX-26' => 'Mexico: Sonora',
'MX-27' => 'Mexico: Tabasco',
'MX-28' => 'Mexico: Tamaulipas',
'MX-29' => 'Mexico: Tlaxcala',
'MX-30' => 'Mexico: Veracruz-Llave',
'MX-31' => 'Mexico: Yucatan',
'MX-32' => 'Mexico: Zacatecas',

'--FM' => '','-FM' =>
'Micronesia',
'FM-03' => 'Micronesia: Chuuk',
'FM-01' => 'Micronesia: Kosrae',
'FM-02' => 'Micronesia: Pohnpei',
'FM-04' => 'Micronesia: Yap',

'--MD' => '','-MD' =>
'Moldova',
'MD-46' => 'Moldova: Balti',
'MD-47' => 'Moldova: Cahul',
'MD-48' => 'Moldova: Chisinau',
'MD-50' => 'Moldova: Edinet',
'MD-51' => 'Moldova: Gagauzia',
'MD-52' => 'Moldova: Lapusna',
'MD-53' => 'Moldova: Orhei',
'MD-54' => 'Moldova: Soroca',
'MD-49' => 'Moldova: Stinga Nistrului',
'MD-55' => 'Moldova: Tighina',
'MD-56' => 'Moldova: Ungheni',

'--MC' => '','-MC' =>
'Monaco',
'MC-01' => 'Monaco: La Condamine',
'MC-02' => 'Monaco: Monaco',
'MC-03' => 'Monaco: Monte-Carlo',

'--MN' => '','-MN' =>
'Mongolia',
'MN-01' => 'Mongolia: Arhangay',
'MN-02' => 'Mongolia: Bayanhongor',
'MN-03' => 'Mongolia: Bayan-Olgiy',
'MN-21' => 'Mongolia: Bulgan',
'MN-23' => 'Mongolia: Darhan Uul',
'MN-05' => 'Mongolia: Darhan',
'MN-06' => 'Mongolia: Dornod',
'MN-07' => 'Mongolia: Dornogovi',
'MN-08' => 'Mongolia: Dundgovi',
'MN-09' => 'Mongolia: Dzavhan',
'MN-22' => 'Mongolia: Erdenet',
'MN-10' => 'Mongolia: Govi-Altay',
'MN-24' => 'Mongolia: Govi-Sumber',
'MN-11' => 'Mongolia: Hentiy',
'MN-12' => 'Mongolia: Hovd',
'MN-13' => 'Mongolia: Hovsgol',
'MN-14' => 'Mongolia: Omnogovi',
'MN-25' => 'Mongolia: Orhon',
'MN-15' => 'Mongolia: Ovorhangay',
'MN-16' => 'Mongolia: Selenge',
'MN-17' => 'Mongolia: Suhbaatar',
'MN-18' => 'Mongolia: Tov',
'MN-20' => 'Mongolia: Ulaanbaatar',
'MN-19' => 'Mongolia: Uvs',

'--MS' => '','-MS' =>
'Montserrat',
'MS-01' => 'Montserrat: Saint Anthony',
'MS-02' => 'Montserrat: Saint Georges',
'MS-03' => 'Montserrat: Saint Peter',

'--MA' => '','-MA' =>
'Morocco',
'MA-01' => 'Morocco: Agadir',
'MA-02' => 'Morocco: Al Hoceima',
'MA-03' => 'Morocco: Azilal',
'MA-04' => 'Morocco: Ben Slimane',
'MA-05' => 'Morocco: Beni Mellal',
'MA-06' => 'Morocco: Boulemane',
'MA-07' => 'Morocco: Casablanca',
'MA-08' => 'Morocco: Chaouen',
'MA-09' => 'Morocco: El Jadida',
'MA-10' => 'Morocco: El Kelaa des Srarhna',
'MA-11' => 'Morocco: Er Rachidia',
'MA-12' => 'Morocco: Essaouira',
'MA-13' => 'Morocco: Fes',
'MA-14' => 'Morocco: Figuig',
'MA-33' => 'Morocco: Guelmim',
'MA-34' => 'Morocco: Ifrane',
'MA-15' => 'Morocco: Kenitra',
'MA-16' => 'Morocco: Khemisset',
'MA-17' => 'Morocco: Khenifra',
'MA-18' => 'Morocco: Khouribga',
'MA-35' => 'Morocco: Laayoune',
'MA-41' => 'Morocco: Larache',
'MA-19' => 'Morocco: Marrakech',
'MA-20' => 'Morocco: Meknes',
'MA-21' => 'Morocco: Nador',
'MA-22' => 'Morocco: Ouarzazate',
'MA-23' => 'Morocco: Oujda',
'MA-24' => 'Morocco: Rabat-Sale',
'MA-25' => 'Morocco: Safi',
'MA-26' => 'Morocco: Settat',
'MA-38' => 'Morocco: Sidi Kacem',
'MA-27' => 'Morocco: Tanger',
'MA-36' => 'Morocco: Tan-Tan',
'MA-37' => 'Morocco: Taounate',
'MA-39' => 'Morocco: Taroudannt',
'MA-29' => 'Morocco: Tata',
'MA-30' => 'Morocco: Taza',
'MA-40' => 'Morocco: Tetouan',
'MA-32' => 'Morocco: Tiznit',

'--MZ' => '','-MZ' =>
'Mozambique',
'MZ-01' => 'Mozambique: Cabo Delgado',
'MZ-02' => 'Mozambique: Gaza',
'MZ-03' => 'Mozambique: Inhambane',
'MZ-10' => 'Mozambique: Manica',
'MZ-04' => 'Mozambique: Maputo',
'MZ-06' => 'Mozambique: Nampula',
'MZ-07' => 'Mozambique: Niassa',
'MZ-05' => 'Mozambique: Sofala',
'MZ-08' => 'Mozambique: Tete',
'MZ-09' => 'Mozambique: Zambezia',

'--MM' => '','-MM' =>
'Myanmar',
'MM-02' => 'Myanmar: Chin State',
'MM-03' => 'Myanmar: Irrawaddy',
'MM-04' => 'Myanmar: Kachin State',
'MM-05' => 'Myanmar: Karan State',
'MM-06' => 'Myanmar: Kayah State',
'MM-07' => 'Myanmar: Magwe',
'MM-08' => 'Myanmar: Mandalay',
'MM-13' => 'Myanmar: Mon State',
'MM-09' => 'Myanmar: Pegu',
'MM-01' => 'Myanmar: Rakhine State',
'MM-14' => 'Myanmar: Rangoon',
'MM-10' => 'Myanmar: Sagaing',
'MM-11' => 'Myanmar: Shan State',
'MM-12' => 'Myanmar: Tenasserim',
'MM-17' => 'Myanmar: Yangon',

'--NA' => '','-NA' =>
'Namibia',
'NA-01' => 'Namibia: Bethanien',
'NA-03' => 'Namibia: Boesmanland',
'NA-02' => 'Namibia: Caprivi Oos',
'NA-28' => 'Namibia: Caprivi',
'NA-22' => 'Namibia: Damaraland',
'NA-29' => 'Namibia: Erongo',
'NA-04' => 'Namibia: Gobabis',
'NA-05' => 'Namibia: Grootfontein',
'NA-30' => 'Namibia: Hardap',
'NA-23' => 'Namibia: Hereroland Oos',
'NA-24' => 'Namibia: Hereroland Wes',
'NA-06' => 'Namibia: Kaokoland',
'NA-31' => 'Namibia: Karas',
'NA-20' => 'Namibia: Karasburg',
'NA-07' => 'Namibia: Karibib',
'NA-25' => 'Namibia: Kavango',
'NA-08' => 'Namibia: Keetmanshoop',
'NA-32' => 'Namibia: Kunene',
'NA-09' => 'Namibia: Luderitz',
'NA-10' => 'Namibia: Maltahohe',
'NA-26' => 'Namibia: Mariental',
'NA-27' => 'Namibia: Namaland',
'NA-33' => 'Namibia: Ohangwena',
'NA-11' => 'Namibia: Okahandja',
'NA-34' => 'Namibia: Okavango',
'NA-35' => 'Namibia: Omaheke',
'NA-12' => 'Namibia: Omaruru',
'NA-36' => 'Namibia: Omusati',
'NA-37' => 'Namibia: Oshana',
'NA-38' => 'Namibia: Oshikoto',
'NA-13' => 'Namibia: Otjiwarongo',
'NA-39' => 'Namibia: Otjozondjupa',
'NA-14' => 'Namibia: Outjo',
'NA-15' => 'Namibia: Owambo',
'NA-16' => 'Namibia: Rehoboth',
'NA-17' => 'Namibia: Swakopmund',
'NA-18' => 'Namibia: Tsumeb',
'NA-21' => 'Namibia: Windhoek',

'--NR' => '','-NR' =>
'Nauru',
'NR-01' => 'Nauru: Aiwo',
'NR-02' => 'Nauru: Anabar',
'NR-03' => 'Nauru: Anetan',
'NR-04' => 'Nauru: Anibare',
'NR-05' => 'Nauru: Baiti',
'NR-06' => 'Nauru: Boe',
'NR-07' => 'Nauru: Buada',
'NR-08' => 'Nauru: Denigomodu',
'NR-09' => 'Nauru: Ewa',
'NR-10' => 'Nauru: Ijuw',
'NR-11' => 'Nauru: Meneng',
'NR-12' => 'Nauru: Nibok',
'NR-13' => 'Nauru: Uaboe',
'NR-14' => 'Nauru: Yaren',

'--NP' => '','-NP' =>
'Nepal',
'NP-01' => 'Nepal: Bagmati',
'NP-02' => 'Nepal: Bheri',
'NP-03' => 'Nepal: Dhawalagiri',
'NP-04' => 'Nepal: Gandaki',
'NP-05' => 'Nepal: Janakpur',
'NP-06' => 'Nepal: Karnali',
'NP-07' => 'Nepal: Kosi',
'NP-08' => 'Nepal: Lumbini',
'NP-09' => 'Nepal: Mahakali',
'NP-10' => 'Nepal: Mechi',
'NP-11' => 'Nepal: Narayani',
'NP-12' => 'Nepal: Rapti',
'NP-13' => 'Nepal: Sagarmatha',
'NP-14' => 'Nepal: Seti',

'--NL' => '','-NL' =>
'Netherlands',
'NL-01' => 'Netherlands: Drenthe',
'NL-16' => 'Netherlands: Flevoland',
'NL-02' => 'Netherlands: Friesland',
'NL-03' => 'Netherlands: Gelderland',
'NL-04' => 'Netherlands: Groningen',
'NL-05' => 'Netherlands: Limburg',
'NL-06' => 'Netherlands: Noord-Brabant',
'NL-07' => 'Netherlands: Noord-Holland',
'NL-15' => 'Netherlands: Overijssel',
'NL-09' => 'Netherlands: Utrecht',
'NL-10' => 'Netherlands: Zeeland',
'NL-11' => 'Netherlands: Zuid-Holland',

'--NZ' => '','-NZ' => 'New
Zealand',
'NZ-01' => 'New Zealand: Akaroa',
'NZ-03' => 'New Zealand: Amuri',
'NZ-04' => 'New Zealand: Ashburton',
'NZ-07' => 'New Zealand: Bay of Islands',
'NZ-08' => 'New Zealand: Bruce',
'NZ-09' => 'New Zealand: Buller',
'NZ-10' => 'New Zealand: Chatham Islands',
'NZ-11' => 'New Zealand: Cheviot',
'NZ-12' => 'New Zealand: Clifton',
'NZ-13' => 'New Zealand: Clutha',
'NZ-14' => 'New Zealand: Cook',
'NZ-16' => 'New Zealand: Dannevirke',
'NZ-17' => 'New Zealand: Egmont',
'NZ-18' => 'New Zealand: Eketahuna',
'NZ-19' => 'New Zealand: Ellesmere',
'NZ-20' => 'New Zealand: Eltham',
'NZ-21' => 'New Zealand: Eyre',
'NZ-22' => 'New Zealand: Featherston',
'NZ-24' => 'New Zealand: Franklin',
'NZ-26' => 'New Zealand: Golden Bay',
'NZ-27' => 'New Zealand: Great Barrier Island',
'NZ-28' => 'New Zealand: Grey',
'NZ-29' => 'New Zealand: Hauraki Plains',
'NZ-30' => 'New Zealand: Hawera',
'NZ-31' => 'New Zealand: Hawke\'s Bay',
'NZ-32' => 'New Zealand: Heathcote',
'NZ-D9' => 'New Zealand: Hikurangi',
'NZ-33' => 'New Zealand: Hobson',
'NZ-34' => 'New Zealand: Hokianga',
'NZ-35' => 'New Zealand: Horowhenua',
'NZ-D4' => 'New Zealand: Hurunui',
'NZ-36' => 'New Zealand: Hutt',
'NZ-37' => 'New Zealand: Inangahua',
'NZ-38' => 'New Zealand: Inglewood',
'NZ-39' => 'New Zealand: Kaikoura',
'NZ-40' => 'New Zealand: Kairanga',
'NZ-41' => 'New Zealand: Kiwitea',
'NZ-43' => 'New Zealand: Lake',
'NZ-45' => 'New Zealand: Mackenzie',
'NZ-46' => 'New Zealand: Malvern',
'NZ-E1' => 'New Zealand: Manaia',
'NZ-47' => 'New Zealand: Manawatu',
'NZ-48' => 'New Zealand: Mangonui',
'NZ-49' => 'New Zealand: Maniototo',
'NZ-50' => 'New Zealand: Marlborough',
'NZ-51' => 'New Zealand: Masterton',
'NZ-52' => 'New Zealand: Matamata',
'NZ-53' => 'New Zealand: Mount Herbert',
'NZ-54' => 'New Zealand: Ohinemuri',
'NZ-55' => 'New Zealand: Opotiki',
'NZ-56' => 'New Zealand: Oroua',
'NZ-57' => 'New Zealand: Otamatea',
'NZ-58' => 'New Zealand: Otorohanga',
'NZ-59' => 'New Zealand: Oxford',
'NZ-60' => 'New Zealand: Pahiatua',
'NZ-61' => 'New Zealand: Paparua',
'NZ-63' => 'New Zealand: Patea',
'NZ-65' => 'New Zealand: Piako',
'NZ-66' => 'New Zealand: Pohangina',
'NZ-67' => 'New Zealand: Raglan',
'NZ-68' => 'New Zealand: Rangiora',
'NZ-69' => 'New Zealand: Rangitikei',
'NZ-70' => 'New Zealand: Rodney',
'NZ-71' => 'New Zealand: Rotorua',
'NZ-E2' => 'New Zealand: Runanga',
'NZ-E3' => 'New Zealand: Saint Kilda',
'NZ-D5' => 'New Zealand: Silverpeaks',
'NZ-72' => 'New Zealand: Southland',
'NZ-73' => 'New Zealand: Stewart Island',
'NZ-74' => 'New Zealand: Stratford',
'NZ-D6' => 'New Zealand: Strathallan',
'NZ-76' => 'New Zealand: Taranaki',
'NZ-77' => 'New Zealand: Taumarunui',
'NZ-78' => 'New Zealand: Taupo',
'NZ-79' => 'New Zealand: Tauranga',
'NZ-E4' => 'New Zealand: Thames-Coromandel',
'NZ-81' => 'New Zealand: Tuapeka',
'NZ-82' => 'New Zealand: Vincent',
'NZ-83' => 'New Zealand: Waiapu',
'NZ-D8' => 'New Zealand: Waiheke',
'NZ-84' => 'New Zealand: Waihemo',
'NZ-85' => 'New Zealand: Waikato',
'NZ-86' => 'New Zealand: Waikohu',
'NZ-88' => 'New Zealand: Waimairi',
'NZ-89' => 'New Zealand: Waimarino',
'NZ-91' => 'New Zealand: Waimate West',
'NZ-90' => 'New Zealand: Waimate',
'NZ-92' => 'New Zealand: Waimea',
'NZ-93' => 'New Zealand: Waipa',
'NZ-95' => 'New Zealand: Waipawa',
'NZ-96' => 'New Zealand: Waipukurau',
'NZ-97' => 'New Zealand: Wairarapa South',
'NZ-98' => 'New Zealand: Wairewa',
'NZ-99' => 'New Zealand: Wairoa',
'NZ-A4' => 'New Zealand: Waitaki',
'NZ-A6' => 'New Zealand: Waitomo',
'NZ-A8' => 'New Zealand: Waitotara',
'NZ-E6' => 'New Zealand: Wallace',
'NZ-B2' => 'New Zealand: Wanganui',
'NZ-E5' => 'New Zealand: Waverley',
'NZ-B3' => 'New Zealand: Westland',
'NZ-B4' => 'New Zealand: Whakatane',
'NZ-A1' => 'New Zealand: Whangarei',
'NZ-A2' => 'New Zealand: Whangaroa',
'NZ-A3' => 'New Zealand: Woodmark',

'--NI' => '','-NI' =>
'Nicaragua',
'NI-01' => 'Nicaragua: Boaco',
'NI-02' => 'Nicaragua: Carazo',
'NI-03' => 'Nicaragua: Chinandega',
'NI-04' => 'Nicaragua: Chontales',
'NI-05' => 'Nicaragua: Esteli',
'NI-06' => 'Nicaragua: Granada',
'NI-07' => 'Nicaragua: Jinotega',
'NI-08' => 'Nicaragua: Leon',
'NI-09' => 'Nicaragua: Madriz',
'NI-10' => 'Nicaragua: Managua',
'NI-11' => 'Nicaragua: Masaya',
'NI-12' => 'Nicaragua: Matagalpa',
'NI-13' => 'Nicaragua: Nueva Segovia',
'NI-14' => 'Nicaragua: Rio San Juan',
'NI-15' => 'Nicaragua: Rivas',
'NI-16' => 'Nicaragua: Zelaya',

'--NE' => '','-NE' =>
'Niger',
'NE-01' => 'Niger: Agadez',
'NE-02' => 'Niger: Diffa',
'NE-03' => 'Niger: Dosso',
'NE-04' => 'Niger: Maradi',
'NE-05' => 'Niger: Niamey',
'NE-06' => 'Niger: Tahoua',
'NE-07' => 'Niger: Zinder',

'--NG' => '','-NG' =>
'Nigeria',
'NG-45' => 'Nigeria: Abia',
'NG-11' => 'Nigeria: Abuja Capital Territory',
'NG-35' => 'Nigeria: Adamawa',
'NG-21' => 'Nigeria: Akwa Ibom',
'NG-25' => 'Nigeria: Anambra',
'NG-46' => 'Nigeria: Bauchi',
'NG-52' => 'Nigeria: Bayelsa',
'NG-26' => 'Nigeria: Benue',
'NG-27' => 'Nigeria: Borno',
'NG-22' => 'Nigeria: Cross River',
'NG-36' => 'Nigeria: Delta',
'NG-53' => 'Nigeria: Ebonyi',
'NG-37' => 'Nigeria: Edo',
'NG-54' => 'Nigeria: Ekiti',
'NG-47' => 'Nigeria: Enugu',
'NG-55' => 'Nigeria: Gombe',
'NG-28' => 'Nigeria: Imo',
'NG-39' => 'Nigeria: Jigawa',
'NG-23' => 'Nigeria: Kaduna',
'NG-29' => 'Nigeria: Kano',
'NG-24' => 'Nigeria: Katsina',
'NG-40' => 'Nigeria: Kebbi',
'NG-41' => 'Nigeria: Kogi',
'NG-30' => 'Nigeria: Kwara',
'NG-05' => 'Nigeria: Lagos',
'NG-56' => 'Nigeria: Nassarawa',
'NG-31' => 'Nigeria: Niger',
'NG-16' => 'Nigeria: Ogun',
'NG-48' => 'Nigeria: Ondo',
'NG-42' => 'Nigeria: Osun',
'NG-32' => 'Nigeria: Oyo',
'NG-49' => 'Nigeria: Plateau',
'NG-50' => 'Nigeria: Rivers',
'NG-51' => 'Nigeria: Sokoto',
'NG-43' => 'Nigeria: Taraba',
'NG-44' => 'Nigeria: Yobe',
'NG-57' => 'Nigeria: Zamfara',

'--KP' => '','-KP' => 'North
Korea',
'KP-01' => 'North Korea: Chagang-do',
'KP-17' => 'North Korea: Hamgyong-bukto',
'KP-03' => 'North Korea: Hamgyong-namdo',
'KP-07' => 'North Korea: Hwanghae-bukto',
'KP-06' => 'North Korea: Hwanghae-namdo',
'KP-08' => 'North Korea: Kaesong-si',
'KP-09' => 'North Korea: Kangwon-do',
'KP-18' => 'North Korea: Najin Sonbong-si',
'KP-14' => 'North Korea: Namp\'o-si',
'KP-11' => 'North Korea: P\'yongan-bukto',
'KP-15' => 'North Korea: P\'yongan-namdo',
'KP-12' => 'North Korea: P\'yongyang-si',
'KP-13' => 'North Korea: Yanggang-do',

'--NO' => '','-NO' =>
'Norway',
'NO-01' => 'Norway: Akershus',
'NO-02' => 'Norway: Aust-Agder',
'NO-04' => 'Norway: Buskerud',
'NO-05' => 'Norway: Finnmark',
'NO-06' => 'Norway: Hedmark',
'NO-07' => 'Norway: Hordaland',
'NO-08' => 'Norway: More og Romsdal',
'NO-09' => 'Norway: Nordland',
'NO-10' => 'Norway: Nord-Trondelag',
'NO-11' => 'Norway: Oppland',
'NO-12' => 'Norway: Oslo',
'NO-13' => 'Norway: Ostfold',
'NO-14' => 'Norway: Rogaland',
'NO-15' => 'Norway: Sogn og Fjordane',
'NO-16' => 'Norway: Sor-Trondelag',
'NO-17' => 'Norway: Telemark',
'NO-18' => 'Norway: Troms',
'NO-19' => 'Norway: Vest-Agder',
'NO-20' => 'Norway: Vestfold',

'--OM' => '','-OM' => 'Oman',
'OM-01' => 'Oman: Ad Dakhiliyah',
'OM-02' => 'Oman: Al Batinah',
'OM-03' => 'Oman: Al Wusta',
'OM-04' => 'Oman: Ash Sharqiyah',
'OM-05' => 'Oman: Az Zahirah',
'OM-06' => 'Oman: Masqat',
'OM-07' => 'Oman: Musandam',
'OM-08' => 'Oman: Zufar',

'--PK' => '','-PK' =>
'Pakistan',
'PK-06' => 'Pakistan: Azad Kashmir',
'PK-02' => 'Pakistan: Balochistan',
'PK-01' => 'Pakistan: Federally Administered Tribal
Areas',
'PK-08' => 'Pakistan: Islamabad',
'PK-07' => 'Pakistan: Northern Areas',
'PK-03' => 'Pakistan: North-West Frontier',
'PK-04' => 'Pakistan: Punjab',
'PK-05' => 'Pakistan: Sindh',

'--PA' => '','-PA' =>
'Panama',
'PA-01' => 'Panama: Bocas del Toro',
'PA-02' => 'Panama: Chiriqui',
'PA-03' => 'Panama: Cocle',
'PA-04' => 'Panama: Colon',
'PA-05' => 'Panama: Darien',
'PA-06' => 'Panama: Herrera',
'PA-07' => 'Panama: Los Santos',
'PA-08' => 'Panama: Panama',
'PA-09' => 'Panama: San Blas',
'PA-10' => 'Panama: Veraguas',

'--PG' => '','-PG' => 'Papua New
Guinea',
'PG-01' => 'Papua New Guinea: Central',
'PG-08' => 'Papua New Guinea: Chimbu',
'PG-10' => 'Papua New Guinea: East New Britain',
'PG-11' => 'Papua New Guinea: East Sepik',
'PG-09' => 'Papua New Guinea: Eastern Highlands',
'PG-19' => 'Papua New Guinea: Enga',
'PG-02' => 'Papua New Guinea: Gulf',
'PG-12' => 'Papua New Guinea: Madang',
'PG-13' => 'Papua New Guinea: Manus',
'PG-03' => 'Papua New Guinea: Milne Bay',
'PG-14' => 'Papua New Guinea: Morobe',
'PG-20' => 'Papua New Guinea: National Capital',
'PG-15' => 'Papua New Guinea: New Ireland',
'PG-07' => 'Papua New Guinea: North Solomons',
'PG-04' => 'Papua New Guinea: Northern',
'PG-18' => 'Papua New Guinea: Sandaun',
'PG-05' => 'Papua New Guinea: Southern Highlands',
'PG-17' => 'Papua New Guinea: West New Britain',
'PG-16' => 'Papua New Guinea: Western Highlands',
'PG-06' => 'Papua New Guinea: Western',

'--PY' => '','-PY' =>
'Paraguay',
'PY-23' => 'Paraguay: Alto Paraguay',
'PY-01' => 'Paraguay: Alto Parana',
'PY-02' => 'Paraguay: Amambay',
'PY-03' => 'Paraguay: Boqueron',
'PY-04' => 'Paraguay: Caaguazu',
'PY-05' => 'Paraguay: Caazapa',
'PY-19' => 'Paraguay: Canindeyu',
'PY-06' => 'Paraguay: Central',
'PY-20' => 'Paraguay: Chaco',
'PY-07' => 'Paraguay: Concepcion',
'PY-08' => 'Paraguay: Cordillera',
'PY-10' => 'Paraguay: Guaira',
'PY-11' => 'Paraguay: Itapua',
'PY-12' => 'Paraguay: Misiones',
'PY-13' => 'Paraguay: Neembucu',
'PY-21' => 'Paraguay: Nueva Asuncion',
'PY-15' => 'Paraguay: Paraguari',
'PY-16' => 'Paraguay: Presidente Hayes',
'PY-17' => 'Paraguay: San Pedro',

'--PE' => '','-PE' => 'Peru',
'PE-01' => 'Peru: Amazonas',
'PE-02' => 'Peru: Ancash',
'PE-03' => 'Peru: Apurimac',
'PE-04' => 'Peru: Arequipa',
'PE-05' => 'Peru: Ayacucho',
'PE-06' => 'Peru: Cajamarca',
'PE-07' => 'Peru: Callao',
'PE-08' => 'Peru: Cusco',
'PE-09' => 'Peru: Huancavelica',
'PE-10' => 'Peru: Huanuco',
'PE-11' => 'Peru: Ica',
'PE-12' => 'Peru: Junin',
'PE-13' => 'Peru: La Libertad',
'PE-14' => 'Peru: Lambayeque',
'PE-15' => 'Peru: Lima',
'PE-16' => 'Peru: Loreto',
'PE-17' => 'Peru: Madre de Dios',
'PE-18' => 'Peru: Moquegua',
'PE-19' => 'Peru: Pasco',
'PE-20' => 'Peru: Piura',
'PE-21' => 'Peru: Puno',
'PE-22' => 'Peru: San Martin',
'PE-23' => 'Peru: Tacna',
'PE-24' => 'Peru: Tumbes',
'PE-25' => 'Peru: Ucayali',

'--PH' => '','-PH' =>
'Philippines',
'PH-01' => 'Philippines: Abra',
'PH-02' => 'Philippines: Agusan del Norte',
'PH-03' => 'Philippines: Agusan del Sur',
'PH-04' => 'Philippines: Aklan',
'PH-05' => 'Philippines: Albay',
'PH-A1' => 'Philippines: Angeles',
'PH-06' => 'Philippines: Antique',
'PH-G8' => 'Philippines: Aurora',
'PH-A2' => 'Philippines: Bacolod',
'PH-A3' => 'Philippines: Bago',
'PH-A4' => 'Philippines: Baguio',
'PH-A5' => 'Philippines: Bais',
'PH-A6' => 'Philippines: Basilan City',
'PH-22' => 'Philippines: Basilan',
'PH-07' => 'Philippines: Bataan',
'PH-08' => 'Philippines: Batanes',
'PH-A7' => 'Philippines: Batangas City',
'PH-09' => 'Philippines: Batangas',
'PH-10' => 'Philippines: Benguet',
'PH-11' => 'Philippines: Bohol',
'PH-12' => 'Philippines: Bukidnon',
'PH-13' => 'Philippines: Bulacan',
'PH-A8' => 'Philippines: Butuan',
'PH-A9' => 'Philippines: Cabanatuan',
'PH-B1' => 'Philippines: Cadiz',
'PH-B2' => 'Philippines: Cagayan de Oro',
'PH-14' => 'Philippines: Cagayan',
'PH-B3' => 'Philippines: Calbayog',
'PH-B4' => 'Philippines: Caloocan',
'PH-15' => 'Philippines: Camarines Norte',
'PH-16' => 'Philippines: Camarines Sur',
'PH-17' => 'Philippines: Camiguin',
'PH-B5' => 'Philippines: Canlaon',
'PH-18' => 'Philippines: Capiz',
'PH-19' => 'Philippines: Catanduanes',
'PH-B6' => 'Philippines: Cavite City',
'PH-20' => 'Philippines: Cavite',
'PH-B7' => 'Philippines: Cebu City',
'PH-21' => 'Philippines: Cebu',
'PH-B8' => 'Philippines: Cotabato',
'PH-B9' => 'Philippines: Dagupan',
'PH-C1' => 'Philippines: Danao',
'PH-C2' => 'Philippines: Dapitan',
'PH-C3' => 'Philippines: Davao City',
'PH-25' => 'Philippines: Davao del Sur',
'PH-26' => 'Philippines: Davao Oriental',
'PH-24' => 'Philippines: Davao',
'PH-C4' => 'Philippines: Dipolog',
'PH-C5' => 'Philippines: Dumaguete',
'PH-23' => 'Philippines: Eastern Samar',
'PH-C6' => 'Philippines: General Santos',
'PH-C7' => 'Philippines: Gingoog',
'PH-27' => 'Philippines: Ifugao',
'PH-C8' => 'Philippines: Iligan',
'PH-28' => 'Philippines: Ilocos Norte',
'PH-29' => 'Philippines: Ilocos Sur',
'PH-C9' => 'Philippines: Iloilo City',
'PH-30' => 'Philippines: Iloilo',
'PH-D1' => 'Philippines: Iriga',
'PH-31' => 'Philippines: Isabela',
'PH-32' => 'Philippines: Kalinga-Apayao',
'PH-D2' => 'Philippines: La Carlota',
'PH-36' => 'Philippines: La Union',
'PH-33' => 'Philippines: Laguna',
'PH-34' => 'Philippines: Lanao del Norte',
'PH-35' => 'Philippines: Lanao del Sur',
'PH-D3' => 'Philippines: Laoag',
'PH-D4' => 'Philippines: Lapu-Lapu',
'PH-D5' => 'Philippines: Legaspi',
'PH-37' => 'Philippines: Leyte',
'PH-D6' => 'Philippines: Lipa',
'PH-D7' => 'Philippines: Lucena',
'PH-56' => 'Philippines: Maguindanao',
'PH-D8' => 'Philippines: Mandaue',
'PH-D9' => 'Philippines: Manila',
'PH-E1' => 'Philippines: Marawi',
'PH-38' => 'Philippines: Marinduque',
'PH-39' => 'Philippines: Masbate',
'PH-40' => 'Philippines: Mindoro Occidental',
'PH-41' => 'Philippines: Mindoro Oriental',
'PH-42' => 'Philippines: Misamis Occidental',
'PH-43' => 'Philippines: Misamis Oriental',
'PH-44' => 'Philippines: Mountain',
'PH-E2' => 'Philippines: Naga',
'PH-H3' => 'Philippines: Negros Occidental',
'PH-46' => 'Philippines: Negros Oriental',
'PH-57' => 'Philippines: North Cotabato',
'PH-67' => 'Philippines: Northern Samar',
'PH-47' => 'Philippines: Nueva Ecija',
'PH-48' => 'Philippines: Nueva Vizcaya',
'PH-E3' => 'Philippines: Olongapo',
'PH-E4' => 'Philippines: Ormoc',
'PH-E5' => 'Philippines: Oroquieta',
'PH-E6' => 'Philippines: Ozamis',
'PH-E7' => 'Philippines: Pagadian',
'PH-49' => 'Philippines: Palawan',
'PH-E8' => 'Philippines: Palayan',
'PH-50' => 'Philippines: Pampanga',
'PH-51' => 'Philippines: Pangasinan',
'PH-E9' => 'Philippines: Pasay',
'PH-F1' => 'Philippines: Puerto Princesa',
'PH-F2' => 'Philippines: Quezon City',
'PH-H2' => 'Philippines: Quezon',
'PH-68' => 'Philippines: Quirino',
'PH-53' => 'Philippines: Rizal',
'PH-54' => 'Philippines: Romblon',
'PH-F3' => 'Philippines: Roxas',
'PH-55' => 'Philippines: Samar',
'PH-F4' => 'Philippines: San Carlos',
'PH-F5' => 'Philippines: San Carlos',
'PH-F6' => 'Philippines: San Jose',
'PH-F7' => 'Philippines: San Pablo',
'PH-F8' => 'Philippines: Silay',
'PH-69' => 'Philippines: Siquijor',
'PH-58' => 'Philippines: Sorsogon',
'PH-70' => 'Philippines: South Cotabato',
'PH-59' => 'Philippines: Southern Leyte',
'PH-71' => 'Philippines: Sultan Kudarat',
'PH-60' => 'Philippines: Sulu',
'PH-61' => 'Philippines: Surigao del Norte',
'PH-62' => 'Philippines: Surigao del Sur',
'PH-F9' => 'Philippines: Surigao',
'PH-G1' => 'Philippines: Tacloban',
'PH-G2' => 'Philippines: Tagaytay',
'PH-G3' => 'Philippines: Tagbilaran',
'PH-G4' => 'Philippines: Tangub',
'PH-63' => 'Philippines: Tarlac',
'PH-72' => 'Philippines: Tawitawi',
'PH-G5' => 'Philippines: Toledo',
'PH-G6' => 'Philippines: Trece Martires',
'PH-64' => 'Philippines: Zambales',
'PH-65' => 'Philippines: Zamboanga del Norte',
'PH-66' => 'Philippines: Zamboanga del Sur',
'PH-G7' => 'Philippines: Zamboanga',

'--PL' => '','-PL' =>
'Poland',
'PL-23' => 'Poland: Biala Podlaska',
'PL-24' => 'Poland: Bialystok',
'PL-25' => 'Poland: Bielsko',
'PL-26' => 'Poland: Bydgoszcz',
'PL-27' => 'Poland: Chelm',
'PL-28' => 'Poland: Ciechanow',
'PL-29' => 'Poland: Czestochowa',
'PL-72' => 'Poland: Dolnoslaskie',
'PL-30' => 'Poland: Elblag',
'PL-31' => 'Poland: Gdansk',
'PL-32' => 'Poland: Gorzow',
'PL-33' => 'Poland: Jelenia Gora',
'PL-34' => 'Poland: Kalisz',
'PL-35' => 'Poland: Katowice',
'PL-36' => 'Poland: Kielce',
'PL-37' => 'Poland: Konin',
'PL-38' => 'Poland: Koszalin',
'PL-39' => 'Poland: Krakow',
'PL-40' => 'Poland: Krosno',
'PL-73' => 'Poland: Kujawsko-Pomorskie',
'PL-41' => 'Poland: Legnica',
'PL-42' => 'Poland: Leszno',
'PL-43' => 'Poland: Lodz',
'PL-74' => 'Poland: Lodzkie',
'PL-44' => 'Poland: Lomza',
'PL-75' => 'Poland: Lubelskie',
'PL-45' => 'Poland: Lublin',
'PL-76' => 'Poland: Lubuskie',
'PL-77' => 'Poland: Malopolskie',
'PL-78' => 'Poland: Mazowieckie',
'PL-46' => 'Poland: Nowy Sacz',
'PL-47' => 'Poland: Olsztyn',
'PL-48' => 'Poland: Opole',
'PL-79' => 'Poland: Opolskie',
'PL-49' => 'Poland: Ostroleka',
'PL-50' => 'Poland: Pila',
'PL-51' => 'Poland: Piotrkow',
'PL-52' => 'Poland: Plock',
'PL-80' => 'Poland: Podkarpackie',
'PL-81' => 'Poland: Podlaskie',
'PL-82' => 'Poland: Pomorskie',
'PL-53' => 'Poland: Poznan',
'PL-54' => 'Poland: Przemysl',
'PL-55' => 'Poland: Radom',
'PL-56' => 'Poland: Rzeszow',
'PL-57' => 'Poland: Siedlce',
'PL-58' => 'Poland: Sieradz',
'PL-59' => 'Poland: Skierniewice',
'PL-83' => 'Poland: Slaskie',
'PL-60' => 'Poland: Slupsk',
'PL-61' => 'Poland: Suwalki',
'PL-84' => 'Poland: Swietokrzyskie',
'PL-62' => 'Poland: Szczecin',
'PL-63' => 'Poland: Tarnobrzeg',
'PL-64' => 'Poland: Tarnow',
'PL-65' => 'Poland: Torun',
'PL-66' => 'Poland: Walbrzych',
'PL-85' => 'Poland: Warminsko-Mazurskie',
'PL-67' => 'Poland: Warszawa',
'PL-86' => 'Poland: Wielkopolskie',
'PL-68' => 'Poland: Wloclawek',
'PL-69' => 'Poland: Wroclaw',
'PL-87' => 'Poland: Zachodniopomorskie',
'PL-70' => 'Poland: Zamosc',
'PL-71' => 'Poland: Zielona Gora',

'--PT' => '','-PT' =>
'Portugal',
'PT-02' => 'Portugal: Aveiro',
'PT-23' => 'Portugal: Azores',
'PT-03' => 'Portugal: Beja',
'PT-04' => 'Portugal: Braga',
'PT-05' => 'Portugal: Braganca',
'PT-06' => 'Portugal: Castelo Branco',
'PT-07' => 'Portugal: Coimbra',
'PT-08' => 'Portugal: Evora',
'PT-09' => 'Portugal: Faro',
'PT-11' => 'Portugal: Guarda',
'PT-13' => 'Portugal: Leiria',
'PT-14' => 'Portugal: Lisboa',
'PT-10' => 'Portugal: Madeira',
'PT-16' => 'Portugal: Portalegre',
'PT-17' => 'Portugal: Porto',
'PT-18' => 'Portugal: Santarem',
'PT-19' => 'Portugal: Setubal',
'PT-20' => 'Portugal: Viana do Castelo',
'PT-21' => 'Portugal: Vila Real',
'PT-22' => 'Portugal: Viseu',

'--QA' => '','-QA' =>
'Qatar',
'QA-01' => 'Qatar: Ad Dawhah',
'QA-02' => 'Qatar: Al Ghuwariyah',
'QA-03' => 'Qatar: Al Jumaliyah',
'QA-04' => 'Qatar: Al Khawr',
'QA-10' => 'Qatar: Al Wakrah',
'QA-06' => 'Qatar: Ar Rayyan',
'QA-11' => 'Qatar: Jariyan al Batnah',
'QA-08' => 'Qatar: Madinat ach Shamal',
'QA-12' => 'Qatar: Umm Sa\'id',
'QA-09' => 'Qatar: Umm Salal',

'--RO' => '','-RO' =>
'Romania',
'RO-01' => 'Romania: Alba',
'RO-02' => 'Romania: Arad',
'RO-03' => 'Romania: Arges',
'RO-04' => 'Romania: Bacau',
'RO-05' => 'Romania: Bihor',
'RO-06' => 'Romania: Bistrita-Nasaud',
'RO-07' => 'Romania: Botosani',
'RO-08' => 'Romania: Braila',
'RO-09' => 'Romania: Brasov',
'RO-10' => 'Romania: Bucuresti',
'RO-11' => 'Romania: Buzau',
'RO-41' => 'Romania: Calarasi',
'RO-12' => 'Romania: Caras-Severin',
'RO-13' => 'Romania: Cluj',
'RO-14' => 'Romania: Constanta',
'RO-15' => 'Romania: Covasna',
'RO-16' => 'Romania: Dambovita',
'RO-17' => 'Romania: Dolj',
'RO-18' => 'Romania: Galati',
'RO-42' => 'Romania: Giurgiu',
'RO-19' => 'Romania: Gorj',
'RO-20' => 'Romania: Harghita',
'RO-21' => 'Romania: Hunedoara',
'RO-22' => 'Romania: Ialomita',
'RO-23' => 'Romania: Iasi',
'RO-43' => 'Romania: Ilfov',
'RO-25' => 'Romania: Maramures',
'RO-26' => 'Romania: Mehedinti',
'RO-27' => 'Romania: Mures',
'RO-28' => 'Romania: Neamt',
'RO-29' => 'Romania: Olt',
'RO-30' => 'Romania: Prahova',
'RO-31' => 'Romania: Salaj',
'RO-32' => 'Romania: Satu Mare',
'RO-33' => 'Romania: Sibiu',
'RO-34' => 'Romania: Suceava',
'RO-35' => 'Romania: Teleorman',
'RO-36' => 'Romania: Timis',
'RO-37' => 'Romania: Tulcea',
'RO-39' => 'Romania: Valcea',
'RO-38' => 'Romania: Vaslui',
'RO-40' => 'Romania: Vrancea',

'--RU' => '','-RU' => 'Russian
Federation',
'RU-01' => 'Russian Federation: Adygeya',
'RU-02' => 'Russian Federation: Aginsky Buryatsky
AO',
'RU-04' => 'Russian Federation: Altaisky krai',
'RU-05' => 'Russian Federation: Amur',
'RU-06' => 'Russian Federation: Arkhangel\'sk',
'RU-07' => 'Russian Federation: Astrakhan\'',
'RU-08' => 'Russian Federation: Bashkortostan',
'RU-09' => 'Russian Federation: Belgorod',
'RU-10' => 'Russian Federation: Bryansk',
'RU-11' => 'Russian Federation: Buryat',
'RU-12' => 'Russian Federation: Chechnya',
'RU-13' => 'Russian Federation: Chelyabinsk',
'RU-14' => 'Russian Federation: Chita',
'RU-15' => 'Russian Federation: Chukot',
'RU-16' => 'Russian Federation: Chuvashia',
'RU-17' => 'Russian Federation: Dagestan',
'RU-18' => 'Russian Federation: Evenk',
'RU-03' => 'Russian Federation: Gorno-Altay',
'RU-19' => 'Russian Federation: Ingush',
'RU-20' => 'Russian Federation: Irkutsk',
'RU-21' => 'Russian Federation: Ivanovo',
'RU-22' => 'Russian Federation: Kabardin-Balkar',
'RU-23' => 'Russian Federation: Kaliningrad',
'RU-24' => 'Russian Federation: Kalmyk',
'RU-25' => 'Russian Federation: Kaluga',
'RU-26' => 'Russian Federation: Kamchatka',
'RU-27' => 'Russian Federation: Karachay-Cherkess',
'RU-28' => 'Russian Federation: Karelia',
'RU-29' => 'Russian Federation: Kemerovo',
'RU-30' => 'Russian Federation: Khabarovsk',
'RU-31' => 'Russian Federation: Khakass',
'RU-32' => 'Russian Federation: Khanty-Mansiy',
'RU-33' => 'Russian Federation: Kirov',
'RU-34' => 'Russian Federation: Komi',
'RU-35' => 'Russian Federation: Komi-Permyak',
'RU-36' => 'Russian Federation: Koryak',
'RU-37' => 'Russian Federation: Kostroma',
'RU-38' => 'Russian Federation: Krasnodar',
'RU-39' => 'Russian Federation: Krasnoyarsk',
'RU-40' => 'Russian Federation: Kurgan',
'RU-41' => 'Russian Federation: Kursk',
'RU-42' => 'Russian Federation: Leningrad',
'RU-43' => 'Russian Federation: Lipetsk',
'RU-44' => 'Russian Federation: Magadan',
'RU-45' => 'Russian Federation: Mariy-El',
'RU-46' => 'Russian Federation: Mordovia',
'RU-48' => 'Russian Federation: Moscow City',
'RU-47' => 'Russian Federation: Moskva',
'RU-49' => 'Russian Federation: Murmansk',
'RU-50' => 'Russian Federation: Nenets',
'RU-51' => 'Russian Federation: Nizhegorod',
'RU-68' => 'Russian Federation: North Ossetia',
'RU-52' => 'Russian Federation: Novgorod',
'RU-53' => 'Russian Federation: Novosibirsk',
'RU-54' => 'Russian Federation: Omsk',
'RU-56' => 'Russian Federation: Orel',
'RU-55' => 'Russian Federation: Orenburg',
'RU-57' => 'Russian Federation: Penza',
'RU-58' => 'Russian Federation: Perm\'',
'RU-59' => 'Russian Federation: Primor\'ye',
'RU-60' => 'Russian Federation: Pskov',
'RU-61' => 'Russian Federation: Rostov',
'RU-62' => 'Russian Federation: Ryazan\'',
'RU-66' => 'Russian Federation: Saint Petersburg
City',
'RU-63' => 'Russian Federation: Sakha',
'RU-64' => 'Russian Federation: Sakhalin',
'RU-65' => 'Russian Federation: Samara',
'RU-67' => 'Russian Federation: Saratov',
'RU-69' => 'Russian Federation: Smolensk',
'RU-70' => 'Russian Federation: Stavropol\'',
'RU-71' => 'Russian Federation: Sverdlovsk',
'RU-72' => 'Russian Federation: Tambovskaya oblast',
'RU-73' => 'Russian Federation: Tatarstan',
'RU-74' => 'Russian Federation: Taymyr',
'RU-75' => 'Russian Federation: Tomsk',
'RU-76' => 'Russian Federation: Tula',
'RU-79' => 'Russian Federation: Tuva',
'RU-77' => 'Russian Federation: Tver\'',
'RU-78' => 'Russian Federation: Tyumen\'',
'RU-80' => 'Russian Federation: Udmurt',
'RU-81' => 'Russian Federation: Ul\'yanovsk',
'RU-82' => 'Russian Federation: Ust-Orda Buryat',
'RU-83' => 'Russian Federation: Vladimir',
'RU-84' => 'Russian Federation: Volgograd',
'RU-85' => 'Russian Federation: Vologda',
'RU-86' => 'Russian Federation: Voronezh',
'RU-87' => 'Russian Federation: Yamal-Nenets',
'RU-88' => 'Russian Federation: Yaroslavl\'',
'RU-89' => 'Russian Federation: Yevrey',

'--RW' => '','-RW' =>
'Rwanda',
'RW-01' => 'Rwanda: Butare',
'RW-02' => 'Rwanda: Byumba',
'RW-03' => 'Rwanda: Cyangugu',
'RW-04' => 'Rwanda: Gikongoro',
'RW-05' => 'Rwanda: Gisenyi',
'RW-06' => 'Rwanda: Gitarama',
'RW-07' => 'Rwanda: Kibungo',
'RW-08' => 'Rwanda: Kibuye',
'RW-09' => 'Rwanda: Kigali',
'RW-10' => 'Rwanda: Ruhengeri',

'--SH' => '','-SH' => 'Saint
Helena',
'SH-01' => 'Saint Helena: Ascension',
'SH-02' => 'Saint Helena: Saint Helena',
'SH-03' => 'Saint Helena: Tristan da Cunha',

'--KN' => '','-KN' => 'Saint Kitts
and Nevis',
'KN-01' => 'Saint Kitts and Nevis: Christ Church Nichola
Town',
'KN-02' => 'Saint Kitts and Nevis: Saint Anne Sandy
Point',
'KN-03' => 'Saint Kitts and Nevis: Saint George
Basseterre',
'KN-04' => 'Saint Kitts and Nevis: Saint George
Gingerland',
'KN-05' => 'Saint Kitts and Nevis: Saint James
Windward',
'KN-06' => 'Saint Kitts and Nevis: Saint John
Capisterre',
'KN-07' => 'Saint Kitts and Nevis: Saint John
Figtree',
'KN-08' => 'Saint Kitts and Nevis: Saint Mary
Cayon',
'KN-09' => 'Saint Kitts and Nevis: Saint Paul
Capisterre',
'KN-10' => 'Saint Kitts and Nevis: Saint Paul
Charlestown',
'KN-11' => 'Saint Kitts and Nevis: Saint Peter
Basseterre',
'KN-12' => 'Saint Kitts and Nevis: Saint Thomas
Lowland',
'KN-13' => 'Saint Kitts and Nevis: Saint Thomas Middle
Island',
'KN-15' => 'Saint Kitts and Nevis: Trinity Palmetto
Point',

'--LC' => '','-LC' => 'Saint
Lucia',
'LC-01' => 'Saint Lucia: Anse-la-Raye',
'LC-03' => 'Saint Lucia: Castries',
'LC-04' => 'Saint Lucia: Choiseul',
'LC-02' => 'Saint Lucia: Dauphin',
'LC-05' => 'Saint Lucia: Dennery',
'LC-06' => 'Saint Lucia: Gros-Islet',
'LC-07' => 'Saint Lucia: Laborie',
'LC-08' => 'Saint Lucia: Micoud',
'LC-11' => 'Saint Lucia: Praslin',
'LC-09' => 'Saint Lucia: Soufriere',
'LC-10' => 'Saint Lucia: Vieux-Fort',

'--VC' => '','-VC' => 'Saint
Vincent and the Grenadines',
'VC-01' => 'Saint Vincent and the Grenadines:
Charlotte',
'VC-06' => 'Saint Vincent and the Grenadines:
Grenadines',
'VC-02' => 'Saint Vincent and the Grenadines: Saint
Andrew',
'VC-03' => 'Saint Vincent and the Grenadines: Saint
David',
'VC-04' => 'Saint Vincent and the Grenadines: Saint
George',
'VC-05' => 'Saint Vincent and the Grenadines: Saint
Patrick',

'--WS' => '','-WS' =>
'Samoa',
'WS-02' => 'Samoa: Aiga-i-le-Tai',
'WS-03' => 'Samoa: Atua',
'WS-04' => 'Samoa: Fa',
'WS-05' => 'Samoa: Gaga',
'WS-07' => 'Samoa: Gagaifomauga',
'WS-08' => 'Samoa: Palauli',
'WS-09' => 'Samoa: Satupa',
'WS-10' => 'Samoa: Tuamasaga',
'WS-06' => 'Samoa: Va',
'WS-11' => 'Samoa: Vaisigano',

'--SM' => '','-SM' => 'San
Marino',
'SM-01' => 'San Marino: Acquaviva',
'SM-06' => 'San Marino: Borgo Maggiore',
'SM-02' => 'San Marino: Chiesanuova',
'SM-03' => 'San Marino: Domagnano',
'SM-04' => 'San Marino: Faetano',
'SM-05' => 'San Marino: Fiorentino',
'SM-08' => 'San Marino: Monte Giardino',
'SM-07' => 'San Marino: San Marino',
'SM-09' => 'San Marino: Serravalle',

'--ST' => '','-ST' => 'Sao Tome
and Principe',
'ST-01' => 'Sao Tome and Principe: Principe',
'ST-02' => 'Sao Tome and Principe: Sao Tome',

'--SA' => '','-SA' => 'Saudi
Arabia',
'SA-02' => 'Saudi Arabia: Al Bahah',
'SA-15' => 'Saudi Arabia: Al Hudud ash Shamaliyah',
'SA-03' => 'Saudi Arabia: Al Jawf',
'SA-20' => 'Saudi Arabia: Al Jawf',
'SA-05' => 'Saudi Arabia: Al Madinah',
'SA-08' => 'Saudi Arabia: Al Qasim',
'SA-09' => 'Saudi Arabia: Al Qurayyat',
'SA-10' => 'Saudi Arabia: Ar Riyad',
'SA-06' => 'Saudi Arabia: Ash Sharqiyah',
'SA-13' => 'Saudi Arabia: Ha\'il',
'SA-17' => 'Saudi Arabia: Jizan',
'SA-14' => 'Saudi Arabia: Makkah',
'SA-16' => 'Saudi Arabia: Najran',
'SA-19' => 'Saudi Arabia: Tabuk',

'--SN' => '','-SN' =>
'Senegal',
'SN-01' => 'Senegal: Dakar',
'SN-03' => 'Senegal: Diourbel',
'SN-09' => 'Senegal: Fatick',
'SN-10' => 'Senegal: Kaolack',
'SN-11' => 'Senegal: Kolda',
'SN-08' => 'Senegal: Louga',
'SN-04' => 'Senegal: Saint-Louis',
'SN-05' => 'Senegal: Tambacounda',
'SN-07' => 'Senegal: Thies',
'SN-12' => 'Senegal: Ziguinchor',

'--RS' => '','-RS' =>
'Serbia',
'RS-01' => 'Serbia: Kosovo',
'RS-02' => 'Serbia: Vojvodina',

'--SC' => '','-SC' =>
'Seychelles',
'SC-01' => 'Seychelles: Anse aux Pins',
'SC-02' => 'Seychelles: Anse Boileau',
'SC-03' => 'Seychelles: Anse Etoile',
'SC-04' => 'Seychelles: Anse Louis',
'SC-05' => 'Seychelles: Anse Royale',
'SC-06' => 'Seychelles: Baie Lazare',
'SC-07' => 'Seychelles: Baie Sainte Anne',
'SC-08' => 'Seychelles: Beau Vallon',
'SC-09' => 'Seychelles: Bel Air',
'SC-10' => 'Seychelles: Bel Ombre',
'SC-11' => 'Seychelles: Cascade',
'SC-12' => 'Seychelles: Glacis',
'SC-13' => 'Seychelles: Grand\' Anse',
'SC-14' => 'Seychelles: Grand\' Anse',
'SC-15' => 'Seychelles: La Digue',
'SC-16' => 'Seychelles: La Riviere Anglaise',
'SC-17' => 'Seychelles: Mont Buxton',
'SC-18' => 'Seychelles: Mont Fleuri',
'SC-19' => 'Seychelles: Plaisance',
'SC-20' => 'Seychelles: Pointe La Rue',
'SC-21' => 'Seychelles: Port Glaud',
'SC-22' => 'Seychelles: Saint Louis',
'SC-23' => 'Seychelles: Takamaka',

'--SL' => '','-SL' => 'Sierra
Leone',
'SL-01' => 'Sierra Leone: Eastern',
'SL-02' => 'Sierra Leone: Northern',
'SL-03' => 'Sierra Leone: Southern',
'SL-04' => 'Sierra Leone: Western Area',

'--SK' => '','-SK' =>
'Slovakia',
'SK-01' => 'Slovakia: Banska Bystrica',
'SK-02' => 'Slovakia: Bratislava',
'SK-03' => 'Slovakia: Kosice',
'SK-04' => 'Slovakia: Nitra',
'SK-05' => 'Slovakia: Presov',
'SK-06' => 'Slovakia: Trencin',
'SK-07' => 'Slovakia: Trnava',
'SK-08' => 'Slovakia: Zilina',

'--SI' => '','-SI' =>
'Slovenia',
'SI-01' => 'Slovenia: Ajdovscina',
'SI-02' => 'Slovenia: Beltinci',
'SI-03' => 'Slovenia: Bled',
'SI-04' => 'Slovenia: Bohinj',
'SI-05' => 'Slovenia: Borovnica',
'SI-06' => 'Slovenia: Bovec',
'SI-07' => 'Slovenia: Brda',
'SI-08' => 'Slovenia: Brezice',
'SI-09' => 'Slovenia: Brezovica',
'SI-11' => 'Slovenia: Celje',
'SI-12' => 'Slovenia: Cerklje na Gorenjskem',
'SI-13' => 'Slovenia: Cerknica',
'SI-14' => 'Slovenia: Cerkno',
'SI-15' => 'Slovenia: Crensovci',
'SI-16' => 'Slovenia: Crna na Koroskem',
'SI-17' => 'Slovenia: Crnomelj',
'SI-19' => 'Slovenia: Divaca',
'SI-20' => 'Slovenia: Dobrepolje',
'SI-G4' => 'Slovenia: Dobrova-Horjul-Polhov Gradec',
'SI-22' => 'Slovenia: Dol pri Ljubljani',
'SI-G7' => 'Slovenia: Domzale',
'SI-24' => 'Slovenia: Dornava',
'SI-25' => 'Slovenia: Dravograd',
'SI-26' => 'Slovenia: Duplek',
'SI-27' => 'Slovenia: Gorenja Vas-Poljane',
'SI-28' => 'Slovenia: Gorisnica',
'SI-29' => 'Slovenia: Gornja Radgona',
'SI-30' => 'Slovenia: Gornji Grad',
'SI-31' => 'Slovenia: Gornji Petrovci',
'SI-32' => 'Slovenia: Grosuplje',
'SI-34' => 'Slovenia: Hrastnik',
'SI-35' => 'Slovenia: Hrpelje-Kozina',
'SI-36' => 'Slovenia: Idrija',
'SI-37' => 'Slovenia: Ig',
'SI-38' => 'Slovenia: Ilirska Bistrica',
'SI-39' => 'Slovenia: Ivancna Gorica',
'SI-40' => 'Slovenia: Izola-Isola',
'SI-H4' => 'Slovenia: Jesenice',
'SI-42' => 'Slovenia: Jursinci',
'SI-H6' => 'Slovenia: Kamnik',
'SI-44' => 'Slovenia: Kanal',
'SI-45' => 'Slovenia: Kidricevo',
'SI-46' => 'Slovenia: Kobarid',
'SI-47' => 'Slovenia: Kobilje',
'SI-H7' => 'Slovenia: Kocevje',
'SI-49' => 'Slovenia: Komen',
'SI-50' => 'Slovenia: Koper-Capodistria',
'SI-51' => 'Slovenia: Kozje',
'SI-52' => 'Slovenia: Kranj',
'SI-53' => 'Slovenia: Kranjska Gora',
'SI-54' => 'Slovenia: Krsko',
'SI-55' => 'Slovenia: Kungota',
'SI-I2' => 'Slovenia: Kuzma',
'SI-57' => 'Slovenia: Lasko',
'SI-I3' => 'Slovenia: Lenart',
'SI-I5' => 'Slovenia: Litija',
'SI-61' => 'Slovenia: Ljubljana',
'SI-62' => 'Slovenia: Ljubno',
'SI-I6' => 'Slovenia: Ljutomer',
'SI-64' => 'Slovenia: Logatec',
'SI-I7' => 'Slovenia: Loska Dolina',
'SI-66' => 'Slovenia: Loski Potok',
'SI-I9' => 'Slovenia: Luce',
'SI-68' => 'Slovenia: Lukovica',
'SI-J1' => 'Slovenia: Majsperk',
'SI-J2' => 'Slovenia: Maribor',
'SI-71' => 'Slovenia: Medvode',
'SI-72' => 'Slovenia: Menges',
'SI-73' => 'Slovenia: Metlika',
'SI-74' => 'Slovenia: Mezica',
'SI-J5' => 'Slovenia: Miren-Kostanjevica',
'SI-76' => 'Slovenia: Mislinja',
'SI-77' => 'Slovenia: Moravce',
'SI-78' => 'Slovenia: Moravske Toplice',
'SI-79' => 'Slovenia: Mozirje',
'SI-80' => 'Slovenia: Murska Sobota',
'SI-81' => 'Slovenia: Muta',
'SI-82' => 'Slovenia: Naklo',
'SI-83' => 'Slovenia: Nazarje',
'SI-84' => 'Slovenia: Nova Gorica',
'SI-J7' => 'Slovenia: Novo Mesto',
'SI-86' => 'Slovenia: Odranci',
'SI-87' => 'Slovenia: Ormoz',
'SI-88' => 'Slovenia: Osilnica',
'SI-89' => 'Slovenia: Pesnica',
'SI-J9' => 'Slovenia: Piran',
'SI-91' => 'Slovenia: Pivka',
'SI-92' => 'Slovenia: Podcetrtek',
'SI-94' => 'Slovenia: Postojna',
'SI-K5' => 'Slovenia: Preddvor',
'SI-K7' => 'Slovenia: Ptuj',
'SI-97' => 'Slovenia: Puconci',
'SI-98' => 'Slovenia: Racam',
'SI-99' => 'Slovenia: Radece',
'SI-A1' => 'Slovenia: Radenci',
'SI-A2' => 'Slovenia: Radlje ob Dravi',
'SI-A3' => 'Slovenia: Radovljica',
'SI-L1' => 'Slovenia: Ribnica',
'SI-A7' => 'Slovenia: Rogaska Slatina',
'SI-A6' => 'Slovenia: Rogasovci',
'SI-A8' => 'Slovenia: Rogatec',
'SI-L3' => 'Slovenia: Ruse',
'SI-B1' => 'Slovenia: Semic',
'SI-B2' => 'Slovenia: Sencur',
'SI-B3' => 'Slovenia: Sentilj',
'SI-B4' => 'Slovenia: Sentjernej',
'SI-L7' => 'Slovenia: Sentjur pri Celju',
'SI-B6' => 'Slovenia: Sevnica',
'SI-B7' => 'Slovenia: Sezana',
'SI-B8' => 'Slovenia: Skocjan',
'SI-B9' => 'Slovenia: Skofja Loka',
'SI-C1' => 'Slovenia: Skofljica',
'SI-C2' => 'Slovenia: Slovenj Gradec',
'SI-L8' => 'Slovenia: Slovenska Bistrica',
'SI-C4' => 'Slovenia: Slovenske Konjice',
'SI-C5' => 'Slovenia: Smarje pri Jelsah',
'SI-C6' => 'Slovenia: Smartno ob Paki',
'SI-C7' => 'Slovenia: Sostanj',
'SI-C8' => 'Slovenia: Starse',
'SI-C9' => 'Slovenia: Store',
'SI-D1' => 'Slovenia: Sveti Jurij',
'SI-D2' => 'Slovenia: Tolmin',
'SI-D3' => 'Slovenia: Trbovlje',
'SI-D4' => 'Slovenia: Trebnje',
'SI-D5' => 'Slovenia: Trzic',
'SI-D6' => 'Slovenia: Turnisce',
'SI-D7' => 'Slovenia: Velenje',
'SI-D8' => 'Slovenia: Velike Lasce',
'SI-N2' => 'Slovenia: Videm',
'SI-E1' => 'Slovenia: Vipava',
'SI-E2' => 'Slovenia: Vitanje',
'SI-E3' => 'Slovenia: Vodice',
'SI-N3' => 'Slovenia: Vojnik',
'SI-E5' => 'Slovenia: Vrhnika',
'SI-E6' => 'Slovenia: Vuzenica',
'SI-E7' => 'Slovenia: Zagorje ob Savi',
'SI-N5' => 'Slovenia: Zalec',
'SI-E9' => 'Slovenia: Zavrc',
'SI-F1' => 'Slovenia: Zelezniki',
'SI-F2' => 'Slovenia: Ziri',
'SI-F3' => 'Slovenia: Zrece',

'--SB' => '','-SB' => 'Solomon
Islands',
'SB-05' => 'Solomon Islands: Central',
'SB-06' => 'Solomon Islands: Guadalcanal',
'SB-07' => 'Solomon Islands: Isabel',
'SB-08' => 'Solomon Islands: Makira',
'SB-03' => 'Solomon Islands: Malaita',
'SB-09' => 'Solomon Islands: Temotu',
'SB-04' => 'Solomon Islands: Western',

'--SO' => '','-SO' =>
'Somalia',
'SO-01' => 'Somalia: Bakool',
'SO-02' => 'Somalia: Banaadir',
'SO-03' => 'Somalia: Bari',
'SO-04' => 'Somalia: Bay',
'SO-05' => 'Somalia: Galguduud',
'SO-06' => 'Somalia: Gedo',
'SO-07' => 'Somalia: Hiiraan',
'SO-08' => 'Somalia: Jubbada Dhexe',
'SO-09' => 'Somalia: Jubbada Hoose',
'SO-10' => 'Somalia: Mudug',
'SO-11' => 'Somalia: Nugaal',
'SO-12' => 'Somalia: Sanaag',
'SO-13' => 'Somalia: Shabeellaha Dhexe',
'SO-14' => 'Somalia: Shabeellaha Hoose',
'SO-15' => 'Somalia: Togdheer',
'SO-16' => 'Somalia: Woqooyi Galbeed',

'--ZA' => '','-ZA' => 'South
Africa',
'ZA-05' => 'South Africa: Eastern Cape',
'ZA-03' => 'South Africa: Free State',
'ZA-06' => 'South Africa: Gauteng',
'ZA-02' => 'South Africa: KwaZulu-Natal',
'ZA-09' => 'South Africa: Limpopo',
'ZA-07' => 'South Africa: Mpumalanga',
'ZA-08' => 'South Africa: Northern Cape',
'ZA-10' => 'South Africa: North-West',
'ZA-11' => 'South Africa: Western Cape',

'--KR' => '','-KR' => 'South
Korea',
'KR-01' => 'South Korea: Cheju-do',
'KR-03' => 'South Korea: Cholla-bukto',
'KR-16' => 'South Korea: Cholla-namdo',
'KR-05' => 'South Korea:
Ch\'ungch\'ong-bukto',
'KR-17' => 'South Korea:
Ch\'ungch\'ong-namdo',
'KR-12' => 'South Korea: Inch\'on-jikhalsi',
'KR-06' => 'South Korea: Kangwon-do',
'KR-18' => 'South Korea: Kwangju-jikhalsi',
'KR-13' => 'South Korea: Kyonggi-do',
'KR-14' => 'South Korea: Kyongsang-bukto',
'KR-20' => 'South Korea: Kyongsang-namdo',
'KR-10' => 'South Korea: Pusan-jikhalsi',
'KR-11' => 'South Korea: Seoul-t\'ukpyolsi',
'KR-15' => 'South Korea: Taegu-jikhalsi',
'KR-19' => 'South Korea: Taejon-jikhalsi',
'KR-21' => 'South Korea: Ulsan-gwangyoksi',

'--ES' => '','-ES' =>
'Spain',
'ES-51' => 'Spain: Andalucia',
'ES-52' => 'Spain: Aragon',
'ES-34' => 'Spain: Asturias',
'ES-53' => 'Spain: Canarias',
'ES-39' => 'Spain: Cantabria',
'ES-55' => 'Spain: Castilla y Leon',
'ES-54' => 'Spain: Castilla-La Mancha',
'ES-56' => 'Spain: Catalonia',
'ES-60' => 'Spain: Comunidad Valenciana',
'ES-57' => 'Spain: Extremadura',
'ES-58' => 'Spain: Galicia',
'ES-07' => 'Spain: Islas Baleares',
'ES-27' => 'Spain: La Rioja',
'ES-29' => 'Spain: Madrid',
'ES-31' => 'Spain: Murcia',
'ES-32' => 'Spain: Navarra',
'ES-59' => 'Spain: Pais Vasco',

'--LK' => '','-LK' => 'Sri
Lanka',
'LK-01' => 'Sri Lanka: Amparai',
'LK-02' => 'Sri Lanka: Anuradhapura',
'LK-03' => 'Sri Lanka: Badulla',
'LK-04' => 'Sri Lanka: Batticaloa',
'LK-23' => 'Sri Lanka: Colombo',
'LK-06' => 'Sri Lanka: Galle',
'LK-24' => 'Sri Lanka: Gampaha',
'LK-07' => 'Sri Lanka: Hambantota',
'LK-25' => 'Sri Lanka: Jaffna',
'LK-09' => 'Sri Lanka: Kalutara',
'LK-10' => 'Sri Lanka: Kandy',
'LK-11' => 'Sri Lanka: Kegalla',
'LK-12' => 'Sri Lanka: Kurunegala',
'LK-26' => 'Sri Lanka: Mannar',
'LK-14' => 'Sri Lanka: Matale',
'LK-15' => 'Sri Lanka: Matara',
'LK-16' => 'Sri Lanka: Moneragala',
'LK-27' => 'Sri Lanka: Mullaittivu',
'LK-17' => 'Sri Lanka: Nuwara Eliya',
'LK-18' => 'Sri Lanka: Polonnaruwa',
'LK-19' => 'Sri Lanka: Puttalam',
'LK-20' => 'Sri Lanka: Ratnapura',
'LK-21' => 'Sri Lanka: Trincomalee',
'LK-28' => 'Sri Lanka: Vavuniya',

'--SD' => '','-SD' =>
'Sudan',
'SD-28' => 'Sudan: Al Istiwa\'iyah',
'SD-29' => 'Sudan: Al Khartum',
'SD-27' => 'Sudan: Al Wusta',
'SD-30' => 'Sudan: Ash Shamaliyah',
'SD-31' => 'Sudan: Ash Sharqiyah',
'SD-32' => 'Sudan: Bahr al Ghazal',
'SD-33' => 'Sudan: Darfur',
'SD-34' => 'Sudan: Kurdufan',

'--SR' => '','-SR' =>
'Suriname',
'SR-10' => 'Suriname: Brokopondo',
'SR-11' => 'Suriname: Commewijne',
'SR-12' => 'Suriname: Coronie',
'SR-13' => 'Suriname: Marowijne',
'SR-14' => 'Suriname: Nickerie',
'SR-15' => 'Suriname: Para',
'SR-16' => 'Suriname: Paramaribo',
'SR-17' => 'Suriname: Saramacca',
'SR-18' => 'Suriname: Sipaliwini',
'SR-19' => 'Suriname: Wanica',

'--SZ' => '','-SZ' =>
'Swaziland',
'SZ-01' => 'Swaziland: Hhohho',
'SZ-02' => 'Swaziland: Lubombo',
'SZ-03' => 'Swaziland: Manzini',
'SZ-05' => 'Swaziland: Praslin',
'SZ-04' => 'Swaziland: Shiselweni',

'--SE' => '','-SE' =>
'Sweden',
'SE-01' => 'Sweden: Alvsborgs Lan',
'SE-02' => 'Sweden: Blekinge Lan',
'SE-10' => 'Sweden: Dalarnas Lan',
'SE-03' => 'Sweden: Gavleborgs Lan',
'SE-04' => 'Sweden: Goteborgs och Bohus Lan',
'SE-05' => 'Sweden: Gotlands Lan',
'SE-06' => 'Sweden: Hallands Lan',
'SE-07' => 'Sweden: Jamtlands Lan',
'SE-08' => 'Sweden: Jonkopings Lan',
'SE-09' => 'Sweden: Kalmar Lan',
'SE-11' => 'Sweden: Kristianstads Lan',
'SE-12' => 'Sweden: Kronobergs Lan',
'SE-13' => 'Sweden: Malmohus Lan',
'SE-14' => 'Sweden: Norrbottens Lan',
'SE-15' => 'Sweden: Orebro Lan',
'SE-16' => 'Sweden: Ostergotlands Lan',
'SE-27' => 'Sweden: Skane Lan',
'SE-17' => 'Sweden: Skaraborgs Lan',
'SE-18' => 'Sweden: Sodermanlands Lan',
'SE-26' => 'Sweden: Stockholms Lan',
'SE-21' => 'Sweden: Uppsala Lan',
'SE-22' => 'Sweden: Varmlands Lan',
'SE-23' => 'Sweden: Vasterbottens Lan',
'SE-24' => 'Sweden: Vasternorrlands Lan',
'SE-25' => 'Sweden: Vastmanlands Lan',
'SE-28' => 'Sweden: Vastra Gotaland',

'--CH' => '','-CH' =>
'Switzerland',
'CH-01' => 'Switzerland: Aargau',
'CH-02' => 'Switzerland: Ausser-Rhoden',
'CH-03' => 'Switzerland: Basel-Landschaft',
'CH-04' => 'Switzerland: Basel-Stadt',
'CH-05' => 'Switzerland: Bern',
'CH-06' => 'Switzerland: Fribourg',
'CH-07' => 'Switzerland: Geneve',
'CH-08' => 'Switzerland: Glarus',
'CH-09' => 'Switzerland: Graubunden',
'CH-10' => 'Switzerland: Inner-Rhoden',
'CH-26' => 'Switzerland: Jura',
'CH-11' => 'Switzerland: Luzern',
'CH-12' => 'Switzerland: Neuchatel',
'CH-13' => 'Switzerland: Nidwalden',
'CH-14' => 'Switzerland: Obwalden',
'CH-15' => 'Switzerland: Sankt Gallen',
'CH-16' => 'Switzerland: Schaffhausen',
'CH-17' => 'Switzerland: Schwyz',
'CH-18' => 'Switzerland: Solothurn',
'CH-19' => 'Switzerland: Thurgau',
'CH-20' => 'Switzerland: Ticino',
'CH-21' => 'Switzerland: Uri',
'CH-22' => 'Switzerland: Valais',
'CH-23' => 'Switzerland: Vaud',
'CH-24' => 'Switzerland: Zug',
'CH-25' => 'Switzerland: Zurich',

'--SY' => '','-SY' => 'Syrian Arab
Republic',
'SY-01' => 'Syrian Arab Republic: Al Hasakah',
'SY-02' => 'Syrian Arab Republic: Al Ladhiqiyah',
'SY-03' => 'Syrian Arab Republic: Al Qunaytirah',
'SY-04' => 'Syrian Arab Republic: Ar Raqqah',
'SY-05' => 'Syrian Arab Republic: As
Suwayda\'',
'SY-06' => 'Syrian Arab Republic: Dar',
'SY-07' => 'Syrian Arab Republic: Dayr az Zawr',
'SY-13' => 'Syrian Arab Republic: Dimashq',
'SY-09' => 'Syrian Arab Republic: Halab',
'SY-10' => 'Syrian Arab Republic: Hamah',
'SY-11' => 'Syrian Arab Republic: Hims',
'SY-12' => 'Syrian Arab Republic: Idlib',
'SY-08' => 'Syrian Arab Republic: Rif Dimashq',
'SY-14' => 'Syrian Arab Republic: Tartus',

'--TW' => '','-TW' =>
'Taiwan',
'TW-01' => 'Taiwan: Fu-chien',
'TW-02' => 'Taiwan: Kao-hsiung',
'TW-03' => 'Taiwan: T\'ai-pei',
'TW-04' => 'Taiwan: T\'ai-wan',

'--TJ' => '','-TJ' =>
'Tajikistan',
'TJ-02' => 'Tajikistan: Khatlon',
'TJ-01' => 'Tajikistan: Kuhistoni Badakhshon',
'TJ-03' => 'Tajikistan: Sughd',

'--TZ' => '','-TZ' =>
'Tanwzania',
'TZ-01' => 'Tanwzania: Arusha',
'TZ-23' => 'Tanwzania: Dar es Salaam',
'TZ-03' => 'Tanwzania: Dodoma',
'TZ-04' => 'Tanwzania: Iringa',
'TZ-19' => 'Tanwzania: Kagera',
'TZ-05' => 'Tanwzania: Kigoma',
'TZ-06' => 'Tanwzania: Kilimanjaro',
'TZ-07' => 'Tanwzania: Lindi',
'TZ-08' => 'Tanwzania: Mara',
'TZ-09' => 'Tanwzania: Mbeya',
'TZ-10' => 'Tanwzania: Morogoro',
'TZ-11' => 'Tanwzania: Mtwara',
'TZ-12' => 'Tanwzania: Mwanza',
'TZ-13' => 'Tanwzania: Pemba North',
'TZ-20' => 'Tanwzania: Pemba South',
'TZ-02' => 'Tanwzania: Pwani',
'TZ-24' => 'Tanwzania: Rukwa',
'TZ-14' => 'Tanwzania: Ruvuma',
'TZ-15' => 'Tanwzania: Shinyanga',
'TZ-16' => 'Tanwzania: Singida',
'TZ-17' => 'Tanwzania: Tabora',
'TZ-18' => 'Tanwzania: Tanga',
'TZ-21' => 'Tanwzania: Zanzibar Central',
'TZ-22' => 'Tanwzania: Zanzibar North',
'TZ-25' => 'Tanwzania: Zanzibar Urban',

'--TH' => '','-TH' =>
'Thailand',
'TH-35' => 'Thailand: Ang Thong',
'TH-28' => 'Thailand: Buriram',
'TH-44' => 'Thailand: Chachoengsao',
'TH-32' => 'Thailand: Chai Nat',
'TH-26' => 'Thailand: Chaiyaphum',
'TH-48' => 'Thailand: Chanthaburi',
'TH-02' => 'Thailand: Chiang Mai',
'TH-03' => 'Thailand: Chiang Rai',
'TH-46' => 'Thailand: Chon Buri',
'TH-58' => 'Thailand: Chumphon',
'TH-23' => 'Thailand: Kalasin',
'TH-11' => 'Thailand: Kamphaeng Phet',
'TH-50' => 'Thailand: Kanchanaburi',
'TH-22' => 'Thailand: Khon Kaen',
'TH-63' => 'Thailand: Krabi',
'TH-40' => 'Thailand: Krung Thep',
'TH-06' => 'Thailand: Lampang',
'TH-05' => 'Thailand: Lamphun',
'TH-18' => 'Thailand: Loei',
'TH-34' => 'Thailand: Lop Buri',
'TH-01' => 'Thailand: Mae Hong Son',
'TH-24' => 'Thailand: Maha Sarakham',
'TH-78' => 'Thailand: Mukdahan',
'TH-43' => 'Thailand: Nakhon Nayok',
'TH-53' => 'Thailand: Nakhon Pathom',
'TH-21' => 'Thailand: Nakhon Phanom',
'TH-27' => 'Thailand: Nakhon Ratchasima',
'TH-16' => 'Thailand: Nakhon Sawan',
'TH-64' => 'Thailand: Nakhon Si Thammarat',
'TH-04' => 'Thailand: Nan',
'TH-31' => 'Thailand: Narathiwat',
'TH-17' => 'Thailand: Nong Khai',
'TH-38' => 'Thailand: Nonthaburi',
'TH-39' => 'Thailand: Pathum Thani',
'TH-69' => 'Thailand: Pattani',
'TH-61' => 'Thailand: Phangnga',
'TH-66' => 'Thailand: Phatthalung',
'TH-41' => 'Thailand: Phayao',
'TH-14' => 'Thailand: Phetchabun',
'TH-56' => 'Thailand: Phetchaburi',
'TH-13' => 'Thailand: Phichit',
'TH-12' => 'Thailand: Phitsanulok',
'TH-36' => 'Thailand: Phra Nakhon Si Ayutthaya',
'TH-07' => 'Thailand: Phrae',
'TH-62' => 'Thailand: Phuket',
'TH-45' => 'Thailand: Prachin Buri',
'TH-57' => 'Thailand: Prachuap Khiri Khan',
'TH-59' => 'Thailand: Ranong',
'TH-52' => 'Thailand: Ratchaburi',
'TH-47' => 'Thailand: Rayong',
'TH-25' => 'Thailand: Roi Et',
'TH-20' => 'Thailand: Sakon Nakhon',
'TH-42' => 'Thailand: Samut Prakan',
'TH-55' => 'Thailand: Samut Sakhon',
'TH-54' => 'Thailand: Samut Songkhram',
'TH-37' => 'Thailand: Saraburi',
'TH-67' => 'Thailand: Satun',
'TH-33' => 'Thailand: Sing Buri',
'TH-30' => 'Thailand: Sisaket',
'TH-68' => 'Thailand: Songkhla',
'TH-09' => 'Thailand: Sukhothai',
'TH-51' => 'Thailand: Suphan Buri',
'TH-60' => 'Thailand: Surat Thani',
'TH-29' => 'Thailand: Surin',
'TH-08' => 'Thailand: Tak',
'TH-65' => 'Thailand: Trang',
'TH-49' => 'Thailand: Trat',
'TH-75' => 'Thailand: Ubon Ratchathani',
'TH-76' => 'Thailand: Udon Thani',
'TH-15' => 'Thailand: Uthai Thani',
'TH-10' => 'Thailand: Uttaradit',
'TH-70' => 'Thailand: Yala',
'TH-72' => 'Thailand: Yasothon',

'--TG' => '','-TG' => 'Togo',
'TG-01' => 'Togo: Amlame',
'TG-02' => 'Togo: Aneho',
'TG-03' => 'Togo: Atakpame',
'TG-15' => 'Togo: Badou',
'TG-04' => 'Togo: Bafilo',
'TG-05' => 'Togo: Bassar',
'TG-06' => 'Togo: Dapaong',
'TG-07' => 'Togo: Kante',
'TG-08' => 'Togo: Klouto',
'TG-14' => 'Togo: Kpagouda',
'TG-09' => 'Togo: Lama-Kara',
'TG-10' => 'Togo: Lome',
'TG-11' => 'Togo: Mango',
'TG-12' => 'Togo: Niamtougou',
'TG-13' => 'Togo: Notse',
'TG-16' => 'Togo: Sotouboua',
'TG-17' => 'Togo: Tabligbo',
'TG-19' => 'Togo: Tchamba',
'TG-20' => 'Togo: Tchaoudjo',
'TG-18' => 'Togo: Tsevie',
'TG-21' => 'Togo: Vogan',

'--TO' => '','-TO' =>
'Tonga',
'TO-01' => 'Tonga: Ha',
'TO-02' => 'Tonga: Tongatapu',
'TO-03' => 'Tonga: Vava',

'--TT' => '','-TT' => 'Trinidad
and Tobago',
'TT-01' => 'Trinidad and Tobago: Arima',
'TT-02' => 'Trinidad and Tobago: Caroni',
'TT-03' => 'Trinidad and Tobago: Mayaro',
'TT-04' => 'Trinidad and Tobago: Nariva',
'TT-05' => 'Trinidad and Tobago: Port-of-Spain',
'TT-06' => 'Trinidad and Tobago: Saint Andrew',
'TT-07' => 'Trinidad and Tobago: Saint David',
'TT-08' => 'Trinidad and Tobago: Saint George',
'TT-09' => 'Trinidad and Tobago: Saint Patrick',
'TT-10' => 'Trinidad and Tobago: San Fernando',
'TT-11' => 'Trinidad and Tobago: Tobago',
'TT-12' => 'Trinidad and Tobago: Victoria',

'--TN' => '','-TN' =>
'Tunisia',
'TN-15' => 'Tunisia: Al Mahdiyah',
'TN-16' => 'Tunisia: Al Munastir',
'TN-02' => 'Tunisia: Al Qasrayn',
'TN-03' => 'Tunisia: Al Qayrawan',
'TN-38' => 'Tunisia: Ariana',
'TN-17' => 'Tunisia: Bajah',
'TN-18' => 'Tunisia: Banzart',
'TN-27' => 'Tunisia: Bin',
'TN-06' => 'Tunisia: Jundubah',
'TN-14' => 'Tunisia: Kef',
'TN-28' => 'Tunisia: Madanin',
'TN-39' => 'Tunisia: Manouba',
'TN-19' => 'Tunisia: Nabul',
'TN-29' => 'Tunisia: Qabis',
'TN-10' => 'Tunisia: Qafsah',
'TN-31' => 'Tunisia: Qibili',
'TN-32' => 'Tunisia: Safaqis',
'TN-33' => 'Tunisia: Sidi Bu Zayd',
'TN-22' => 'Tunisia: Silyanah',
'TN-23' => 'Tunisia: Susah',
'TN-34' => 'Tunisia: Tatawin',
'TN-35' => 'Tunisia: Tawzar',
'TN-36' => 'Tunisia: Tunis',
'TN-37' => 'Tunisia: Zaghwan',

'--TR' => '','-TR' =>
'Turkey',
'TR-81' => 'Turkey: Adana',
'TR-02' => 'Turkey: Adiyaman',
'TR-03' => 'Turkey: Afyon',
'TR-04' => 'Turkey: Agri',
'TR-75' => 'Turkey: Aksaray',
'TR-05' => 'Turkey: Amasya',
'TR-68' => 'Turkey: Ankara',
'TR-07' => 'Turkey: Antalya',
'TR-86' => 'Turkey: Ardahan',
'TR-08' => 'Turkey: Artvin',
'TR-09' => 'Turkey: Aydin',
'TR-10' => 'Turkey: Balikesir',
'TR-87' => 'Turkey: Bartin',
'TR-76' => 'Turkey: Batman',
'TR-77' => 'Turkey: Bayburt',
'TR-11' => 'Turkey: Bilecik',
'TR-12' => 'Turkey: Bingol',
'TR-13' => 'Turkey: Bitlis',
'TR-14' => 'Turkey: Bolu',
'TR-15' => 'Turkey: Burdur',
'TR-16' => 'Turkey: Bursa',
'TR-17' => 'Turkey: Canakkale',
'TR-82' => 'Turkey: Cankiri',
'TR-19' => 'Turkey: Corum',
'TR-20' => 'Turkey: Denizli',
'TR-21' => 'Turkey: Diyarbakir',
'TR-93' => 'Turkey: Duzce',
'TR-22' => 'Turkey: Edirne',
'TR-23' => 'Turkey: Elazig',
'TR-24' => 'Turkey: Erzincan',
'TR-25' => 'Turkey: Erzurum',
'TR-26' => 'Turkey: Eskisehir',
'TR-83' => 'Turkey: Gaziantep',
'TR-28' => 'Turkey: Giresun',
'TR-69' => 'Turkey: Gumushane',
'TR-70' => 'Turkey: Hakkari',
'TR-31' => 'Turkey: Hatay',
'TR-32' => 'Turkey: Icel',
'TR-88' => 'Turkey: Igdir',
'TR-33' => 'Turkey: Isparta',
'TR-34' => 'Turkey: Istanbul',
'TR-35' => 'Turkey: Izmir',
'TR-46' => 'Turkey: Kahramanmaras',
'TR-89' => 'Turkey: Karabuk',
'TR-78' => 'Turkey: Karaman',
'TR-84' => 'Turkey: Kars',
'TR-37' => 'Turkey: Kastamonu',
'TR-38' => 'Turkey: Kayseri',
'TR-90' => 'Turkey: Kilis',
'TR-79' => 'Turkey: Kirikkale',
'TR-39' => 'Turkey: Kirklareli',
'TR-40' => 'Turkey: Kirsehir',
'TR-41' => 'Turkey: Kocaeli',
'TR-71' => 'Turkey: Konya',
'TR-43' => 'Turkey: Kutahya',
'TR-44' => 'Turkey: Malatya',
'TR-45' => 'Turkey: Manisa',
'TR-72' => 'Turkey: Mardin',
'TR-48' => 'Turkey: Mugla',
'TR-49' => 'Turkey: Mus',
'TR-50' => 'Turkey: Nevsehir',
'TR-73' => 'Turkey: Nigde',
'TR-52' => 'Turkey: Ordu',
'TR-91' => 'Turkey: Osmaniye',
'TR-53' => 'Turkey: Rize',
'TR-54' => 'Turkey: Sakarya',
'TR-55' => 'Turkey: Samsun',
'TR-63' => 'Turkey: Sanliurfa',
'TR-74' => 'Turkey: Siirt',
'TR-57' => 'Turkey: Sinop',
'TR-80' => 'Turkey: Sirnak',
'TR-58' => 'Turkey: Sivas',
'TR-59' => 'Turkey: Tekirdag',
'TR-60' => 'Turkey: Tokat',
'TR-61' => 'Turkey: Trabzon',
'TR-62' => 'Turkey: Tunceli',
'TR-64' => 'Turkey: Usak',
'TR-65' => 'Turkey: Van',
'TR-92' => 'Turkey: Yalova',
'TR-66' => 'Turkey: Yozgat',
'TR-85' => 'Turkey: Zonguldak',

'--TM' => '','-TM' =>
'Turkmenistan',
'TM-01' => 'Turkmenistan: Ahal',
'TM-02' => 'Turkmenistan: Balkan',
'TM-03' => 'Turkmenistan: Dashoguz',
'TM-04' => 'Turkmenistan: Lebap',
'TM-05' => 'Turkmenistan: Mary',

'--UG' => '','-UG' =>
'Uganda',
'UG-65' => 'Uganda: Adjumani',
'UG-77' => 'Uganda: Arua',
'UG-66' => 'Uganda: Bugiri',
'UG-67' => 'Uganda: Busia',
'UG-05' => 'Uganda: Busoga',
'UG-18' => 'Uganda: Central',
'UG-20' => 'Uganda: Eastern',
'UG-78' => 'Uganda: Iganga',
'UG-79' => 'Uganda: Kabarole',
'UG-80' => 'Uganda: Kaberamaido',
'UG-37' => 'Uganda: Kampala',
'UG-81' => 'Uganda: Kamwenge',
'UG-82' => 'Uganda: Kanungu',
'UG-08' => 'Uganda: Karamoja',
'UG-69' => 'Uganda: Katakwi',
'UG-83' => 'Uganda: Kayunga',
'UG-84' => 'Uganda: Kitgum',
'UG-85' => 'Uganda: Kyenjojo',
'UG-86' => 'Uganda: Mayuge',
'UG-87' => 'Uganda: Mbale',
'UG-88' => 'Uganda: Moroto',
'UG-89' => 'Uganda: Mpigi',
'UG-90' => 'Uganda: Mukono',
'UG-91' => 'Uganda: Nakapiripirit',
'UG-73' => 'Uganda: Nakasongola',
'UG-21' => 'Uganda: Nile',
'UG-22' => 'Uganda: North Buganda',
'UG-23' => 'Uganda: Northern',
'UG-92' => 'Uganda: Pader',
'UG-93' => 'Uganda: Rukungiri',
'UG-74' => 'Uganda: Sembabule',
'UG-94' => 'Uganda: Sironko',
'UG-95' => 'Uganda: Soroti',
'UG-12' => 'Uganda: South Buganda',
'UG-24' => 'Uganda: Southern',
'UG-96' => 'Uganda: Wakiso',
'UG-25' => 'Uganda: Western',
'UG-97' => 'Uganda: Yumbe',

'--UA' => '','-UA' =>
'Ukraine',
'UA-01' => 'Ukraine: Cherkas\'ka
Oblast\'',
'UA-02' => 'Ukraine: Chernihivs\'ka
Oblast\'',
'UA-03' => 'Ukraine: Chernivets\'ka
Oblast\'',
'UA-04' => 'Ukraine: Dnipropetrovs\'ka
Oblast\'',
'UA-05' => 'Ukraine: Donets\'ka Oblast\'',
'UA-06' => 'Ukraine: Ivano-Frankivs\'ka
Oblast\'',
'UA-07' => 'Ukraine: Kharkivs\'ka
Oblast\'',
'UA-08' => 'Ukraine: Khersons\'ka
Oblast\'',
'UA-09' => 'Ukraine: Khmel\'nyts\'ka
Oblast\'',
'UA-10' => 'Ukraine: Kirovohrads\'ka
Oblast\'',
'UA-11' => 'Ukraine: Krym',
'UA-12' => 'Ukraine: Kyyiv',
'UA-13' => 'Ukraine: Kyyivs\'ka Oblast\'',
'UA-14' => 'Ukraine: Luhans\'ka Oblast\'',
'UA-15' => 'Ukraine: L\'vivs\'ka
Oblast\'',
'UA-16' => 'Ukraine: Mykolayivs\'ka
Oblast\'',
'UA-17' => 'Ukraine: Odes\'ka Oblast\'',
'UA-18' => 'Ukraine: Poltavs\'ka
Oblast\'',
'UA-19' => 'Ukraine: Rivnens\'ka
Oblast\'',
'UA-20' => 'Ukraine: Sevastopol\'',
'UA-21' => 'Ukraine: Sums\'ka Oblast\'',
'UA-22' => 'Ukraine: Ternopil\'s\'ka
Oblast\'',
'UA-23' => 'Ukraine: Vinnyts\'ka
Oblast\'',
'UA-24' => 'Ukraine: Volyns\'ka Oblast\'',
'UA-25' => 'Ukraine: Zakarpats\'ka
Oblast\'',
'UA-26' => 'Ukraine: Zaporiz\'ka
Oblast\'',
'UA-27' => 'Ukraine: Zhytomyrs\'ka
Oblast\'',

'--AE' => '','-AE' => 'United Arab
Emirates',
'AE-01' => 'United Arab Emirates: Abu Dhabi',
'AE-02' => 'United Arab Emirates: Ajman',
'AE-03' => 'United Arab Emirates: Dubai',
'AE-04' => 'United Arab Emirates: Fujairah',
'AE-05' => 'United Arab Emirates: Ras Al Khaimah',
'AE-06' => 'United Arab Emirates: Sharjah',
'AE-07' => 'United Arab Emirates: Umm Al Quwain',

'--GB' => '','-GB' => 'United
Kingdom',
'GB-T5' => 'United Kingdom: Aberdeen City',
'GB-T6' => 'United Kingdom: Aberdeenshire',
'GB-T7' => 'United Kingdom: Angus',
'GB-Q6' => 'United Kingdom: Antrim',
'GB-Q7' => 'United Kingdom: Ards',
'GB-T8' => 'United Kingdom: Argyll and Bute',
'GB-Q8' => 'United Kingdom: Armagh',
'GB-01' => 'United Kingdom: Avon',
'GB-Q9' => 'United Kingdom: Ballymena',
'GB-R1' => 'United Kingdom: Ballymoney',
'GB-R2' => 'United Kingdom: Banbridge',
'GB-A1' => 'United Kingdom: Barking and Dagenham',
'GB-A2' => 'United Kingdom: Barnet',
'GB-A3' => 'United Kingdom: Barnsley',
'GB-A4' => 'United Kingdom: Bath and North East
Somerset',
'GB-A5' => 'United Kingdom: Bedfordshire',
'GB-R3' => 'United Kingdom: Belfast',
'GB-03' => 'United Kingdom: Berkshire',
'GB-A6' => 'United Kingdom: Bexley',
'GB-A7' => 'United Kingdom: Birmingham',
'GB-A8' => 'United Kingdom: Blackburn with Darwen',
'GB-A9' => 'United Kingdom: Blackpool',
'GB-X2' => 'United Kingdom: Blaenau Gwent',
'GB-B1' => 'United Kingdom: Bolton',
'GB-B2' => 'United Kingdom: Bournemouth',
'GB-B3' => 'United Kingdom: Bracknell Forest',
'GB-B4' => 'United Kingdom: Bradford',
'GB-B5' => 'United Kingdom: Brent',
'GB-X3' => 'United Kingdom: Bridgend',
'GB-B6' => 'United Kingdom: Brighton and Hove',
'GB-B7' => 'United Kingdom: Bristol',
'GB-B8' => 'United Kingdom: Bromley',
'GB-B9' => 'United Kingdom: Buckinghamshire',
'GB-C1' => 'United Kingdom: Bury',
'GB-X4' => 'United Kingdom: Caerphilly',
'GB-C2' => 'United Kingdom: Calderdale',
'GB-C3' => 'United Kingdom: Cambridgeshire',
'GB-C4' => 'United Kingdom: Camden',
'GB-X5' => 'United Kingdom: Cardiff',
'GB-X7' => 'United Kingdom: Carmarthenshire',
'GB-R4' => 'United Kingdom: Carrickfergus',
'GB-R5' => 'United Kingdom: Castlereagh',
'GB-79' => 'United Kingdom: Central',
'GB-X6' => 'United Kingdom: Ceredigion',
'GB-C5' => 'United Kingdom: Cheshire',
'GB-U1' => 'United Kingdom: Clackmannanshire',
'GB-07' => 'United Kingdom: Cleveland',
'GB-90' => 'United Kingdom: Clwyd',
'GB-R6' => 'United Kingdom: Coleraine',
'GB-X8' => 'United Kingdom: Conwy',
'GB-R7' => 'United Kingdom: Cookstown',
'GB-C6' => 'United Kingdom: Cornwall',
'GB-C7' => 'United Kingdom: Coventry',
'GB-R8' => 'United Kingdom: Craigavon',
'GB-C8' => 'United Kingdom: Croydon',
'GB-C9' => 'United Kingdom: Cumbria',
'GB-D1' => 'United Kingdom: Darlington',
'GB-X9' => 'United Kingdom: Denbighshire',
'GB-D2' => 'United Kingdom: Derby',
'GB-D3' => 'United Kingdom: Derbyshire',
'GB-S6' => 'United Kingdom: Derry',
'GB-D4' => 'United Kingdom: Devon',
'GB-D5' => 'United Kingdom: Doncaster',
'GB-D6' => 'United Kingdom: Dorset',
'GB-R9' => 'United Kingdom: Down',
'GB-D7' => 'United Kingdom: Dudley',
'GB-U2' => 'United Kingdom: Dumfries and Galloway',
'GB-U3' => 'United Kingdom: Dundee City',
'GB-S1' => 'United Kingdom: Dungannon',
'GB-D8' => 'United Kingdom: Durham',
'GB-91' => 'United Kingdom: Dyfed',
'GB-D9' => 'United Kingdom: Ealing',
'GB-U4' => 'United Kingdom: East Ayrshire',
'GB-U5' => 'United Kingdom: East Dunbartonshire',
'GB-U6' => 'United Kingdom: East Lothian',
'GB-U7' => 'United Kingdom: East Renfrewshire',
'GB-E1' => 'United Kingdom: East Riding of
Yorkshire',
'GB-E2' => 'United Kingdom: East Sussex',
'GB-U8' => 'United Kingdom: Edinburgh',
'GB-W8' => 'United Kingdom: Eilean Siar',
'GB-E3' => 'United Kingdom: Enfield',
'GB-E4' => 'United Kingdom: Essex',
'GB-U9' => 'United Kingdom: Falkirk',
'GB-S2' => 'United Kingdom: Fermanagh',
'GB-V1' => 'United Kingdom: Fife',
'GB-Y1' => 'United Kingdom: Flintshire',
'GB-E5' => 'United Kingdom: Gateshead',
'GB-V2' => 'United Kingdom: Glasgow City',
'GB-E6' => 'United Kingdom: Gloucestershire',
'GB-82' => 'United Kingdom: Grampian',
'GB-17' => 'United Kingdom: Greater London',
'GB-18' => 'United Kingdom: Greater Manchester',
'GB-E7' => 'United Kingdom: Greenwich',
'GB-92' => 'United Kingdom: Gwent',
'GB-Y2' => 'United Kingdom: Gwynedd',
'GB-E8' => 'United Kingdom: Hackney',
'GB-E9' => 'United Kingdom: Halton',
'GB-F1' => 'United Kingdom: Hammersmith and Fulham',
'GB-F2' => 'United Kingdom: Hampshire',
'GB-F3' => 'United Kingdom: Haringey',
'GB-F4' => 'United Kingdom: Harrow',
'GB-F5' => 'United Kingdom: Hartlepool',
'GB-F6' => 'United Kingdom: Havering',
'GB-20' => 'United Kingdom: Hereford and Worcester',
'GB-F7' => 'United Kingdom: Herefordshire',
'GB-F8' => 'United Kingdom: Hertford',
'GB-V3' => 'United Kingdom: Highland',
'GB-F9' => 'United Kingdom: Hillingdon',
'GB-G1' => 'United Kingdom: Hounslow',
'GB-22' => 'United Kingdom: Humberside',
'GB-V4' => 'United Kingdom: Inverclyde',
'GB-X1' => 'United Kingdom: Isle of Anglesey',
'GB-G2' => 'United Kingdom: Isle of Wight',
'GB-G3' => 'United Kingdom: Islington',
'GB-G4' => 'United Kingdom: Kensington and Chelsea',
'GB-G5' => 'United Kingdom: Kent',
'GB-G6' => 'United Kingdom: Kingston upon Hull',
'GB-G7' => 'United Kingdom: Kingston upon Thames',
'GB-G8' => 'United Kingdom: Kirklees',
'GB-G9' => 'United Kingdom: Knowsley',
'GB-H1' => 'United Kingdom: Lambeth',
'GB-H2' => 'United Kingdom: Lancashire',
'GB-S3' => 'United Kingdom: Larne',
'GB-H3' => 'United Kingdom: Leeds',
'GB-H4' => 'United Kingdom: Leicester',
'GB-H5' => 'United Kingdom: Leicestershire',
'GB-H6' => 'United Kingdom: Lewisham',
'GB-S4' => 'United Kingdom: Limavady',
'GB-H7' => 'United Kingdom: Lincolnshire',
'GB-S5' => 'United Kingdom: Lisburn',
'GB-H8' => 'United Kingdom: Liverpool',
'GB-H9' => 'United Kingdom: London',
'GB-84' => 'United Kingdom: Lothian',
'GB-I1' => 'United Kingdom: Luton',
'GB-S7' => 'United Kingdom: Magherafelt',
'GB-I2' => 'United Kingdom: Manchester',
'GB-I3' => 'United Kingdom: Medway',
'GB-28' => 'United Kingdom: Merseyside',
'GB-Y3' => 'United Kingdom: Merthyr Tydfil',
'GB-I4' => 'United Kingdom: Merton',
'GB-94' => 'United Kingdom: Mid Glamorgan',
'GB-I5' => 'United Kingdom: Middlesbrough',
'GB-V5' => 'United Kingdom: Midlothian',
'GB-I6' => 'United Kingdom: Milton Keynes',
'GB-Y4' => 'United Kingdom: Monmouthshire',
'GB-V6' => 'United Kingdom: Moray',
'GB-S8' => 'United Kingdom: Moyle',
'GB-Y5' => 'United Kingdom: Neath Port Talbot',
'GB-I7' => 'United Kingdom: Newcastle upon Tyne',
'GB-I8' => 'United Kingdom: Newham',
'GB-Y6' => 'United Kingdom: Newport',
'GB-S9' => 'United Kingdom: Newry and Mourne',
'GB-T1' => 'United Kingdom: Newtownabbey',
'GB-I9' => 'United Kingdom: Norfolk',
'GB-V7' => 'United Kingdom: North Ayrshire',
'GB-T2' => 'United Kingdom: North Down',
'GB-J2' => 'United Kingdom: North East
Lincolnshire',
'GB-V8' => 'United Kingdom: North Lanarkshire',
'GB-J3' => 'United Kingdom: North Lincolnshire',
'GB-J4' => 'United Kingdom: North Somerset',
'GB-J5' => 'United Kingdom: North Tyneside',
'GB-J7' => 'United Kingdom: North Yorkshire',
'GB-J1' => 'United Kingdom: Northamptonshire',
'GB-J6' => 'United Kingdom: Northumberland',
'GB-J8' => 'United Kingdom: Nottingham',
'GB-J9' => 'United Kingdom: Nottinghamshire',
'GB-K1' => 'United Kingdom: Oldham',
'GB-T3' => 'United Kingdom: Omagh',
'GB-V9' => 'United Kingdom: Orkney',
'GB-K2' => 'United Kingdom: Oxfordshire',
'GB-Y7' => 'United Kingdom: Pembrokeshire',
'GB-W1' => 'United Kingdom: Perth and Kinross',
'GB-K3' => 'United Kingdom: Peterborough',
'GB-K4' => 'United Kingdom: Plymouth',
'GB-K5' => 'United Kingdom: Poole',
'GB-K6' => 'United Kingdom: Portsmouth',
'GB-Y8' => 'United Kingdom: Powys',
'GB-K7' => 'United Kingdom: Reading',
'GB-K8' => 'United Kingdom: Redbridge',
'GB-K9' => 'United Kingdom: Redcar and Cleveland',
'GB-W2' => 'United Kingdom: Renfrewshire',
'GB-Y9' => 'United Kingdom: Rhondda Cynon Taff',
'GB-L1' => 'United Kingdom: Richmond upon Thames',
'GB-L2' => 'United Kingdom: Rochdale',
'GB-L3' => 'United Kingdom: Rotherham',
'GB-L4' => 'United Kingdom: Rutland',
'GB-L5' => 'United Kingdom: Salford',
'GB-L7' => 'United Kingdom: Sandwell',
'GB-T9' => 'United Kingdom: Scottish Borders',
'GB-L8' => 'United Kingdom: Sefton',
'GB-L9' => 'United Kingdom: Sheffield',
'GB-W3' => 'United Kingdom: Shetland Islands',
'GB-L6' => 'United Kingdom: Shropshire',
'GB-M1' => 'United Kingdom: Slough',
'GB-M2' => 'United Kingdom: Solihull',
'GB-M3' => 'United Kingdom: Somerset',
'GB-W4' => 'United Kingdom: South Ayrshire',
'GB-96' => 'United Kingdom: South Glamorgan',
'GB-M6' => 'United Kingdom: South Gloucestershire',
'GB-W5' => 'United Kingdom: South Lanarkshire',
'GB-M7' => 'United Kingdom: South Tyneside',
'GB-37' => 'United Kingdom: South Yorkshire',
'GB-M4' => 'United Kingdom: Southampton',
'GB-M5' => 'United Kingdom: Southend-on-Sea',
'GB-M8' => 'United Kingdom: Southwark',
'GB-N1' => 'United Kingdom: St. Helens',
'GB-M9' => 'United Kingdom: Staffordshire',
'GB-W6' => 'United Kingdom: Stirling',
'GB-N2' => 'United Kingdom: Stockport',
'GB-N3' => 'United Kingdom: Stockton-on-Tees',
'GB-N4' => 'United Kingdom: Stoke-on-Trent',
'GB-T4' => 'United Kingdom: Strabane',
'GB-87' => 'United Kingdom: Strathclyde',
'GB-N5' => 'United Kingdom: Suffolk',
'GB-N6' => 'United Kingdom: Sunderland',
'GB-N7' => 'United Kingdom: Surrey',
'GB-N8' => 'United Kingdom: Sutton',
'GB-Z1' => 'United Kingdom: Swansea',
'GB-N9' => 'United Kingdom: Swindon',
'GB-O1' => 'United Kingdom: Tameside',
'GB-88' => 'United Kingdom: Tayside',
'GB-O2' => 'United Kingdom: Telford and Wrekin',
'GB-O3' => 'United Kingdom: Thurrock',
'GB-O4' => 'United Kingdom: Torbay',
'GB-Z2' => 'United Kingdom: Torfaen',
'GB-O5' => 'United Kingdom: Tower Hamlets',
'GB-O6' => 'United Kingdom: Trafford',
'GB-41' => 'United Kingdom: Tyne and Wear',
'GB-Z3' => 'United Kingdom: Vale of Glamorgan',
'GB-O7' => 'United Kingdom: Wakefield',
'GB-O8' => 'United Kingdom: Walsall',
'GB-O9' => 'United Kingdom: Waltham Forest',
'GB-P1' => 'United Kingdom: Wandsworth',
'GB-P2' => 'United Kingdom: Warrington',
'GB-P3' => 'United Kingdom: Warwickshire',
'GB-P4' => 'United Kingdom: West Berkshire',
'GB-W7' => 'United Kingdom: West Dunbartonshire',
'GB-97' => 'United Kingdom: West Glamorgan',
'GB-W9' => 'United Kingdom: West Lothian',
'GB-43' => 'United Kingdom: West Midlands',
'GB-P6' => 'United Kingdom: West Sussex',
'GB-45' => 'United Kingdom: West Yorkshire',
'GB-P5' => 'United Kingdom: Westminster',
'GB-P7' => 'United Kingdom: Wigan',
'GB-P8' => 'United Kingdom: Wiltshire',
'GB-P9' => 'United Kingdom: Windsor and Maidenhead',
'GB-Q1' => 'United Kingdom: Wirral',
'GB-Q2' => 'United Kingdom: Wokingham',
'GB-Q3' => 'United Kingdom: Wolverhampton',
'GB-Q4' => 'United Kingdom: Worcestershire',
'GB-Z4' => 'United Kingdom: Wrexham',
'GB-Q5' => 'United Kingdom: York',

'--US' => '','-US' => 'United
States',
'US-AL' => 'United States: Alabama',
'US-AK' => 'United States: Alaska',
'US-AS' => 'United States: American Samoa',
'US-AZ' => 'United States: Arizona',
'US-AR' => 'United States: Arkansas',
'US-AA' => 'United States: Armed Forces Americas',
'US-AE' => 'United States: Armed Forces Europe',
'US-AP' => 'United States: Armed Forces Pacific',
'US-CA' => 'United States: California',
'US-CO' => 'United States: Colorado',
'US-CT' => 'United States: Connecticut',
'US-DE' => 'United States: Delaware',
'US-DC' => 'United States: District of Columbia',
'US-FM' => 'United States: Federated States of
Micronesia',
'US-FL' => 'United States: Florida',
'US-GA' => 'United States: Georgia',
'US-GU' => 'United States: Guam',
'US-HI' => 'United States: Hawaii',
'US-ID' => 'United States: Idaho',
'US-IL' => 'United States: Illinois',
'US-IN' => 'United States: Indiana',
'US-IA' => 'United States: Iowa',
'US-KS' => 'United States: Kansas',
'US-KY' => 'United States: Kentucky',
'US-LA' => 'United States: Louisiana',
'US-ME' => 'United States: Maine',
'US-MH' => 'United States: Marshall Islands',
'US-MD' => 'United States: Maryland',
'US-MA' => 'United States: Massachusetts',
'US-MI' => 'United States: Michigan',
'US-MN' => 'United States: Minnesota',
'US-MS' => 'United States: Mississippi',
'US-MO' => 'United States: Missouri',
'US-MT' => 'United States: Montana',
'US-NE' => 'United States: Nebraska',
'US-NV' => 'United States: Nevada',
'US-NH' => 'United States: New Hampshire',
'US-NJ' => 'United States: New Jersey',
'US-NM' => 'United States: New Mexico',
'US-NY' => 'United States: New York',
'US-NC' => 'United States: North Carolina',
'US-ND' => 'United States: North Dakota',
'US-MP' => 'United States: Northern Mariana
Islands',
'US-OH' => 'United States: Ohio',
'US-OK' => 'United States: Oklahoma',
'US-OR' => 'United States: Oregon',
'US-PW' => 'United States: Palau',
'US-PA' => 'United States: Pennsylvania',
'US-PR' => 'United States: Puerto Rico',
'US-RI' => 'United States: Rhode Island',
'US-SC' => 'United States: South Carolina',
'US-SD' => 'United States: South Dakota',
'US-TN' => 'United States: Tennessee',
'US-TX' => 'United States: Texas',
'US-UT' => 'United States: Utah',
'US-VT' => 'United States: Vermont',
'US-VI' => 'United States: Virgin Islands',
'US-VA' => 'United States: Virginia',
'US-WA' => 'United States: Washington',
'US-WV' => 'United States: West Virginia',
'US-WI' => 'United States: Wisconsin',
'US-WY' => 'United States: Wyoming',

'--UY' => '','-UY' =>
'Uruguay',
'UY-01' => 'Uruguay: Artigas',
'UY-02' => 'Uruguay: Canelones',
'UY-03' => 'Uruguay: Cerro Largo',
'UY-04' => 'Uruguay: Colonia',
'UY-05' => 'Uruguay: Durazno',
'UY-06' => 'Uruguay: Flores',
'UY-07' => 'Uruguay: Florida',
'UY-08' => 'Uruguay: Lavalleja',
'UY-09' => 'Uruguay: Maldonado',
'UY-10' => 'Uruguay: Montevideo',
'UY-11' => 'Uruguay: Paysandu',
'UY-12' => 'Uruguay: Rio Negro',
'UY-13' => 'Uruguay: Rivera',
'UY-14' => 'Uruguay: Rocha',
'UY-15' => 'Uruguay: Salto',
'UY-16' => 'Uruguay: San Jose',
'UY-17' => 'Uruguay: Soriano',
'UY-18' => 'Uruguay: Tacuarembo',
'UY-19' => 'Uruguay: Treinta y Tres',

'--UZ' => '','-UZ' =>
'Uzbekistan',
'UZ-01' => 'Uzbekistan: Andijon',
'UZ-02' => 'Uzbekistan: Bukhoro',
'UZ-03' => 'Uzbekistan: Farghona',
'UZ-04' => 'Uzbekistan: Jizzakh',
'UZ-05' => 'Uzbekistan: Khorazm',
'UZ-06' => 'Uzbekistan: Namangan',
'UZ-07' => 'Uzbekistan: Nawoiy',
'UZ-08' => 'Uzbekistan: Qashqadaryo',
'UZ-09' => 'Uzbekistan: Qoraqalpoghiston',
'UZ-10' => 'Uzbekistan: Samarqand',
'UZ-11' => 'Uzbekistan: Sirdaryo',
'UZ-12' => 'Uzbekistan: Surkhondaryo',
'UZ-13' => 'Uzbekistan: Toshkent',
'UZ-14' => 'Uzbekistan: Toshkent',

'--VU' => '','-VU' =>
'Vanuatu',
'VU-05' => 'Vanuatu: Ambrym',
'VU-06' => 'Vanuatu: Aoba',
'VU-08' => 'Vanuatu: Efate',
'VU-09' => 'Vanuatu: Epi',
'VU-10' => 'Vanuatu: Malakula',
'VU-16' => 'Vanuatu: Malampa',
'VU-11' => 'Vanuatu: Paama',
'VU-17' => 'Vanuatu: Penama',
'VU-12' => 'Vanuatu: Pentecote',
'VU-13' => 'Vanuatu: Sanma',
'VU-18' => 'Vanuatu: Shefa',
'VU-14' => 'Vanuatu: Shepherd',
'VU-15' => 'Vanuatu: Tafea',
'VU-07' => 'Vanuatu: Torba',

'--VE' => '','-VE' =>
'Venezuela',
'VE-01' => 'Venezuela: Amazonas',
'VE-02' => 'Venezuela: Anzoategui',
'VE-03' => 'Venezuela: Apure',
'VE-04' => 'Venezuela: Aragua',
'VE-05' => 'Venezuela: Barinas',
'VE-06' => 'Venezuela: Bolivar',
'VE-07' => 'Venezuela: Carabobo',
'VE-08' => 'Venezuela: Cojedes',
'VE-09' => 'Venezuela: Delta Amacuro',
'VE-24' => 'Venezuela: Dependencias Federales',
'VE-25' => 'Venezuela: Distrito Federal',
'VE-11' => 'Venezuela: Falcon',
'VE-12' => 'Venezuela: Guarico',
'VE-13' => 'Venezuela: Lara',
'VE-14' => 'Venezuela: Merida',
'VE-15' => 'Venezuela: Miranda',
'VE-16' => 'Venezuela: Monagas',
'VE-17' => 'Venezuela: Nueva Esparta',
'VE-18' => 'Venezuela: Portuguesa',
'VE-19' => 'Venezuela: Sucre',
'VE-20' => 'Venezuela: Tachira',
'VE-21' => 'Venezuela: Trujillo',
'VE-26' => 'Venezuela: Vargas',
'VE-22' => 'Venezuela: Yaracuy',
'VE-23' => 'Venezuela: Zulia',

'--VN' => '','-VN' =>
'Vietnam',
'VN-43' => 'Vietnam: An Giang',
'VN-53' => 'Vietnam: Ba Ria-Vung Tau',
'VN-02' => 'Vietnam: Bac Thai',
'VN-03' => 'Vietnam: Ben Tre',
'VN-54' => 'Vietnam: Binh Dinh',
'VN-55' => 'Vietnam: Binh Thuan',
'VN-56' => 'Vietnam: Can Tho',
'VN-05' => 'Vietnam: Cao Bang',
'VN-44' => 'Vietnam: Dac Lac',
'VN-45' => 'Vietnam: Dong Nai',
'VN-20' => 'Vietnam: Dong Nam Bo',
'VN-46' => 'Vietnam: Dong Thap',
'VN-57' => 'Vietnam: Gia Lai',
'VN-11' => 'Vietnam: Ha Bac',
'VN-58' => 'Vietnam: Ha Giang',
'VN-51' => 'Vietnam: Ha Noi',
'VN-59' => 'Vietnam: Ha Tay',
'VN-60' => 'Vietnam: Ha Tinh',
'VN-12' => 'Vietnam: Hai Hung',
'VN-13' => 'Vietnam: Hai Phong',
'VN-52' => 'Vietnam: Ho Chi Minh',
'VN-61' => 'Vietnam: Hoa Binh',
'VN-62' => 'Vietnam: Khanh Hoa',
'VN-47' => 'Vietnam: Kien Giang',
'VN-63' => 'Vietnam: Kon Tum',
'VN-22' => 'Vietnam: Lai Chau',
'VN-23' => 'Vietnam: Lam Dong',
'VN-39' => 'Vietnam: Lang Son',
'VN-64' => 'Vietnam: Lao Cai',
'VN-24' => 'Vietnam: Long An',
'VN-48' => 'Vietnam: Minh Hai',
'VN-65' => 'Vietnam: Nam Ha',
'VN-66' => 'Vietnam: Nghe An',
'VN-67' => 'Vietnam: Ninh Binh',
'VN-68' => 'Vietnam: Ninh Thuan',
'VN-69' => 'Vietnam: Phu Yen',
'VN-70' => 'Vietnam: Quang Binh',
'VN-29' => 'Vietnam: Quang Nam-Da Nang',
'VN-71' => 'Vietnam: Quang Ngai',
'VN-30' => 'Vietnam: Quang Ninh',
'VN-72' => 'Vietnam: Quang Tri',
'VN-73' => 'Vietnam: Soc Trang',
'VN-32' => 'Vietnam: Son La',
'VN-49' => 'Vietnam: Song Be',
'VN-33' => 'Vietnam: Tay Ninh',
'VN-35' => 'Vietnam: Thai Binh',
'VN-34' => 'Vietnam: Thanh Hoa',
'VN-74' => 'Vietnam: Thua Thien',
'VN-37' => 'Vietnam: Tien Giang',
'VN-75' => 'Vietnam: Tra Vinh',
'VN-76' => 'Vietnam: Tuyen Quang',
'VN-77' => 'Vietnam: Vinh Long',
'VN-50' => 'Vietnam: Vinh Phu',
'VN-78' => 'Vietnam: Yen Bai',

'--YE' => '','-YE' =>
'Yemen',
'YE-01' => 'Yemen: Abyan',
'YE-20' => 'Yemen: Al Bayda\'',
'YE-08' => 'Yemen: Al Hudaydah',
'YE-21' => 'Yemen: Al Jawf',
'YE-03' => 'Yemen: Al Mahrah',
'YE-10' => 'Yemen: Al Mahwit',
'YE-11' => 'Yemen: Dhamar',
'YE-04' => 'Yemen: Hadramawt',
'YE-22' => 'Yemen: Hajjah',
'YE-23' => 'Yemen: Ibb',
'YE-24' => 'Yemen: Lahij',
'YE-14' => 'Yemen: Ma\'rib',
'YE-15' => 'Yemen: Sa',
'YE-16' => 'Yemen: San',
'YE-05' => 'Yemen: Shabwah',
'YE-25' => 'Yemen: Ta',

'--ZM' => '','-ZM' =>
'Zambia',
'ZM-02' => 'Zambia: Central',
'ZM-08' => 'Zambia: Copperbelt',
'ZM-03' => 'Zambia: Eastern',
'ZM-04' => 'Zambia: Luapula',
'ZM-09' => 'Zambia: Lusaka',
'ZM-05' => 'Zambia: Northern',
'ZM-06' => 'Zambia: North-Western',
'ZM-07' => 'Zambia: Southern',
'ZM-01' => 'Zambia: Western',

'--ZW' => '','-ZW' =>
'Zimbabwe',
'ZW-09' => 'Zimbabwe: Bulawayo',
'ZW-10' => 'Zimbabwe: Harare',
'ZW-01' => 'Zimbabwe: Manicaland',
'ZW-03' => 'Zimbabwe: Mashonaland Central',
'ZW-04' => 'Zimbabwe: Mashonaland East',
'ZW-05' => 'Zimbabwe: Mashonaland West',
'ZW-08' => 'Zimbabwe: Masvingo',
'ZW-06' => 'Zimbabwe: Matabeleland North',
'ZW-07' => 'Zimbabwe: Matabeleland South',
'ZW-02' => 'Zimbabwe: Midlands\'

showon.php000064400000002115151155626710006602 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use RegularLabs\Library\ShowOn as RL_ShowOn;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_ShowOn extends \RegularLabs\Library\Field
{
	public $type = 'ShowOn';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$value       = (string) $this->get('value');
		$class       = $this->get('class', '');
		$formControl = $this->get('form', $this->formControl);
		$formControl = $formControl == 'root' ? '' :
$formControl;

		if ( ! $value)
		{
			return RL_ShowOn::close();
		}

		return '</div></div>'
			. RL_ShowOn::open($value, $formControl, $this->group, $class)
			. '<div><div>';
	}
}
simplecategories.php000064400000005732151155626710010634 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\ShowOn as RL_ShowOn;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_SimpleCategories extends \RegularLabs\Library\Field
{
	public $type = 'SimpleCategories';

	protected function getInput()
	{
		$size = (int) $this->get('size');
		$attr = $this->get('onchange') ? '
onchange="' . $this->get('onchange') .
'"' : '';

		$categories = $this->getOptions();
		$options    = parent::getOptions();

		if ($this->get('show_none', 1))
		{
			$options[] = JHtml::_('select.option', '', '-
' . JText::_('JNONE') . ' -');
		}

		if ($this->get('show_new', 1))
		{
			$options[] = JHtml::_('select.option', '-1', '-
' . JText::_('RL_NEW_CATEGORY') . ' -');
		}

		$options = array_merge($options, $categories);

		if ( ! $this->get('show_new', 1))
		{
			return JHtml::_('select.genericlist',
				$options,
				$this->name,
				trim($attr),
				'value',
				'text',
				$this->value,
				$this->id
			);
		}

		JHtml::_('jquery.framework');
		RL_Document::script('regularlabs/simplecategories.min.js');

		$selectlist = $this->selectListSimple(
			$options,
			$this->getName($this->fieldname . '_select'),
			$this->value,
			$this->getId('', $this->fieldname .
'_select'),
			$size,
			false
		);

		$html = [];

		$html[] = '<div class="rl_simplecategory">';

		$html[] = '<div
class="rl_simplecategory_select">' . $selectlist .
'</div>';

		$html[] = RL_ShowOn::show(
			'<div class="rl_simplecategory_new">'
			. '<input type="text" id="' . $this->id .
'_new" value="" placeholder="' .
JText::_('RL_NEW_CATEGORY_ENTER') . '">'
			. '</div>',
			$this->fieldname . '_select:-1', $this->formControl
		);

		$html[] = '<input type="hidden"
class="rl_simplecategory_value" id="' . $this->id .
'" name="' . $this->name . '"
value="' . $this->value . '" />';

		$html[] = '</div>';

		return implode('', $html);
	}

	protected function getOptions()
	{
		$table = $this->get('table');

		if ( ! $table)
		{
			return [];
		}

		// Get the user groups from the database.
		$query = $this->db->getQuery(true)
			->select([
				$this->db->quoteName('category', 'value'),
				$this->db->quoteName('category', 'text'),
			])
			->from($this->db->quoteName('#__' . $table))
			->where($this->db->quoteName('category') . ' !=
' . $this->db->quote(''))
			->group($this->db->quoteName('category'))
			->order($this->db->quoteName('category') . '
ASC');
		$this->db->setQuery($query);

		return $this->db->loadObjectList();
	}
}
subform.php000064400000022173151155626720006751 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Form\Form;

jimport('joomla.filesystem.path');

/**
 * The Field to load the form inside current form
 *
 * @Example with all attributes:
 * 	<field name="field-name" type="subform"
 * 		formsource="path/to/form.xml" min="1"
max="3" multiple="true"
buttons="add,remove,move"
 * 		layout="joomla.form.field.subform.repeatable-table"
groupByFieldset="false" component="com_example"
client="site"
 * 		label="Field Label" description="Field
Description" />
 *
 * @since  3.6
 */
class JFormFieldSubform extends JFormField
{
	/**
	 * The form field type.
	 * @var    string
	 */
	protected $type = 'Subform';

	/**
	 * Form source
	 * @var string
	 */
	protected $formsource;

	/**
	 * Minimum items in repeat mode
	 * @var int
	 */
	protected $min = 0;

	/**
	 * Maximum items in repeat mode
	 * @var int
	 */
	protected $max = 1000;

	/**
	 * Layout to render the form
	 * @var  string
	 */
	protected $layout = 'joomla.form.field.subform.default';

	/**
	 * Whether group subform fields by it`s fieldset
	 * @var boolean
	 */
	protected $groupByFieldset = false;

	/**
	 * Which buttons to show in miltiple mode
	 * @var array $buttons
	 */
	protected $buttons = array('add' => true, 'remove'
=> true, 'move' => true);

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.6
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'formsource':
			case 'min':
			case 'max':
			case 'layout':
			case 'groupByFieldset':
			case 'buttons':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.6
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'formsource':
				$this->formsource = (string) $value;

				// Add root path if we have a path to XML file
				if (strrpos($this->formsource, '.xml') ===
strlen($this->formsource) - 4)
				{
					$this->formsource = JPath::clean(JPATH_ROOT . '/' .
$this->formsource);
				}

				break;

			case 'min':
				$this->min = (int) $value;
				break;

			case 'max':
				if ($value)
				{
					$this->max = max(1, (int) $value);
				}
				break;

			case 'groupByFieldset':
				if ($value !== null)
				{
					$value = (string) $value;
					$this->groupByFieldset = !($value === 'false' || $value
=== 'off' || $value === '0');
				}
				break;

			case 'layout':
				$this->layout = (string) $value;

				// Make sure the layout is not empty.
				if (!$this->layout)
				{
					// Set default value depend from "multiple" mode
					$this->layout = !$this->multiple ?
'joomla.form.field.subform.default' :
'joomla.form.field.subform.repeatable';
				}

				break;

			case 'buttons':

				if (!$this->multiple)
				{
					$this->buttons = array();
					break;
				}

				if ($value && !is_array($value))
				{
					$value = explode(',', (string) $value);
					$value = array_fill_keys(array_filter($value), true);
				}

				if ($value)
				{
					$value = array_merge(array('add' => false,
'remove' => false, 'move' => false), $value);
					$this->buttons = $value;
				}

				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the <field /> tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value.
	 *
	 * @return  boolean  True on success.
	 *
	 * @since   3.6
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		if (!parent::setup($element, $value, $group))
		{
			return false;
		}

		foreach (array('formsource', 'min', 'max',
'layout', 'groupByFieldset', 'buttons') as
$attributeName)
		{
			$this->__set($attributeName, $element[$attributeName]);
		}

		if ($this->value && is_string($this->value))
		{
			// Guess here is the JSON string from 'default' attribute
			$this->value = json_decode($this->value, true);
		}

		if (!$this->formsource && $element->form)
		{
			// Set the formsource parameter from the content of the node
			$this->formsource = $element->form->saveXML();
		}

		return true;
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.6
	 */
	protected function getInput()
	{
		// Prepare data for renderer
		$data    = parent::getLayoutData();
		$tmpl    = null;
		$control = $this->name;

		try
		{
			$tmpl  = $this->loadSubForm();
			$forms = $this->loadSubFormData($tmpl);
		}
		catch (Exception $e)
		{
			return $e->getMessage();
		}

		$data['tmpl']      = $tmpl;
		$data['forms']     = $forms;
		$data['min']       = $this->min;
		$data['max']       = $this->max;
		$data['control']   = $control;
		$data['buttons']   = $this->buttons;
		$data['fieldname'] = $this->fieldname;
		$data['groupByFieldset'] = $this->groupByFieldset;

		/**
		 * For each rendering process of a subform element, we want to have a
		 * separate unique subform id present to could distinguish the
eventhandlers
		 * regarding adding/moving/removing rows from nested subforms from their
parents.
		 */
		static $unique_subform_id = 0;
		$data['unique_subform_id'] = ('sr-' .
($unique_subform_id++));

		// Prepare renderer
		$renderer = $this->getRenderer($this->layout);

		// Allow to define some JLayout options as attribute of the element
		if ($this->element['component'])
		{
			$renderer->setComponent((string)
$this->element['component']);
		}

		if ($this->element['client'])
		{
			$renderer->setClient((string) $this->element['client']);
		}

		// Render
		$html = $renderer->render($data);

		// Add hidden input on front of the subform inputs, in multiple mode
		// for allow to submit an empty value
		if ($this->multiple)
		{
			$html = '<input name="' . $this->name .
'" type="hidden" value="" />' .
$html;
		}

		return $html;
	}

	/**
	 * Method to get the name used for the field input tag.
	 *
	 * @param   string  $fieldName  The field element name.
	 *
	 * @return  string  The name to be used for the field input tag.
	 *
	 * @since   3.6
	 */
	protected function getName($fieldName)
	{
		$name = '';

		// If there is a form control set for the attached form add it first.
		if ($this->formControl)
		{
			$name .= $this->formControl;
		}

		// If the field is in a group add the group control to the field name.
		if ($this->group)
		{
			// If we already have a name segment add the group control as another
level.
			$groups = explode('.', $this->group);

			if ($name)
			{
				foreach ($groups as $group)
				{
					$name .= '[' . $group . ']';
				}
			}
			else
			{
				$name .= array_shift($groups);

				foreach ($groups as $group)
				{
					$name .= '[' . $group . ']';
				}
			}
		}

		// If we already have a name segment add the field name as another level.
		if ($name)
		{
			$name .= '[' . $fieldName . ']';
		}
		else
		{
			$name .= $fieldName;
		}

		return $name;
	}

	/**
	 * Loads the form instance for the subform.
	 *
	 * @return  Form  The form instance.
	 *
	 * @throws  InvalidArgumentException if no form provided.
	 * @throws  RuntimeException if the form could not be loaded.
	 *
	 * @since   3.9.7
	 */
	public function loadSubForm()
	{
		$control = $this->name;

		if ($this->multiple)
		{
			$control .= '[' . $this->fieldname . 'X]';
		}

		// Prepare the form template
		$formname = 'subform.' . str_replace(array('jform[',
'[', ']'), array('', '.',
''), $this->name);
		$tmpl     = Form::getInstance($formname, $this->formsource,
array('control' => $control));

		return $tmpl;
	}

	/**
	 * Binds given data to the subform and its elements.
	 *
	 * @param   Form  &$subForm  Form instance of the subform.
	 *
	 * @return  Form[]  Array of Form instances for the rows.
	 *
	 * @since   3.9.7
	 */
	private function loadSubFormData(Form &$subForm)
	{
		$value = $this->value ? (array) $this->value : array();
		
		// Simple form, just bind the data and return one row.
		if (!$this->multiple)
		{
			$subForm->bind($value);
			return array($subForm);
		}
		
		// Multiple rows possible: Construct array and bind values to their
respective forms.
		$forms = array();
		$value = array_values($value);
		
		// Show as many rows as we have values, but at least min and at most max.
		$c = max($this->min, min(count($value), $this->max));

		for ($i = 0; $i < $c; $i++)
		{
			$control  = $this->name . '[' . $this->fieldname . $i .
']';
			$itemForm = Form::getInstance($subForm->getName() . $i,
$this->formsource, array('control' => $control));

			if (!empty($value[$i]))
			{
				$itemForm->bind($value[$i]);
			}

			$forms[] = $itemForm;
		}

		return $forms;
	}
}
tags.php000064400000005062151155626720006230 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use Joomla\Registry\Registry;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Tags extends \RegularLabs\Library\Field
{
	public $type = 'Tags';

	protected function getInput()
	{
		$size        = (int) $this->get('size');
		$simple      = (int) $this->get('simple');
		$show_ignore = $this->get('show_ignore');
		$use_names   = $this->get('use_names');

		if ($show_ignore && in_array('-1', $this->value))
		{
			$this->value = ['-1'];
		}

		return $this->selectListAjax(
			$this->type, $this->name, $this->value, $this->id,
			compact('size', 'simple', 'show_ignore',
'use_names'),
			$simple
		);
	}

	function getAjaxRaw(Registry $attributes)
	{
		$name   = $attributes->get('name', $this->type);
		$id     = $attributes->get('id', strtolower($name));
		$value  = $attributes->get('value', []);
		$size   = $attributes->get('size');
		$simple = $attributes->get('simple');

		$options = $this->getOptions(
			(bool) $attributes->get('show_all'),
			(bool) $attributes->get('use_names')
		);

		return $this->selectList($options, $name, $value, $id, $size, true,
$simple);
	}

	protected function getOptions($show_ignore = false, $use_names = false,
$value = [])
	{
		// assemble items to the array
		$options = [];

		if ($show_ignore)
		{
			$options[] = JHtml::_('select.option', '-1', '-
' . JText::_('RL_IGNORE') . ' -');
			$options[] = JHtml::_('select.option', '-',
'&nbsp;', 'value', 'text', true);
		}

		$options = array_merge($options, $this->getTags($use_names));

		return $options;
	}

	protected function getTags($use_names)
	{
		$value = $use_names ? 'a.title' : 'a.id';

		$query = $this->db->getQuery(true)
			->select($value . ' as value, a.title as text, a.parent_id AS
parent')
			->from('#__tags AS a')
			->select('COUNT(DISTINCT b.id) - 1 AS level')
			->join('LEFT', '#__tags AS b ON a.lft > b.lft AND
a.rgt < b.rgt')
			->where('a.alias <> ' .
$this->db->quote('root'))
			->where('a.published IN (0,1)')
			->group('a.id')
			->order('a.lft ASC');
		$this->db->setQuery($query);

		return $this->db->loadObjectList();
	}
}
templates.php000064400000006152151155626720007271 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use Joomla\Registry\Registry;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Templates extends \RegularLabs\Library\Field
{
	public $type = 'Templates';

	protected function getInput()
	{
		// fix old '::' separator and change it to '--'
		$value = json_encode($this->value);
		$value = str_replace('::', '--', $value);
		$value = (array) json_decode($value, true);

		$size     = (int) $this->get('size');
		$multiple = $this->get('multiple');

		return $this->selectListAjax(
			$this->type, $this->name, $value, $this->id,
			compact('size', 'multiple')
		);
	}

	function getAjaxRaw(Registry $attributes)
	{
		$name     = $attributes->get('name', $this->type);
		$id       = $attributes->get('id', strtolower($name));
		$value    = $attributes->get('value', []);
		$size     = $attributes->get('size');
		$multiple = $attributes->get('multiple');

		$options = $this->getOptions();

		return $this->selectList($options, $name, $value, $id, $size,
$multiple);
	}

	protected function getOptions()
	{
		$options = [];

		$templates = $this->getTemplates();

		foreach ($templates as $styles)
		{
			$level = 0;
			foreach ($styles as $style)
			{
				$style->level = $level;
				$options[]    = $style;

				if (count($styles) <= 2)
				{
					break;
				}

				$level = 1;
			}
		}

		return $options;
	}

	protected function getTemplates()
	{
		$groups = [];
		$lang   = JFactory::getLanguage();

		// Get the database object and a new query object.
		$db    = JFactory::getDbo();
		$query = $db->getQuery(true)
			->select('s.id, s.title, e.name as name, s.template')
			->from('#__template_styles as s')
			->where('s.client_id = 0')
			->join('LEFT', '#__extensions as e on
e.element=s.template')
			->where('e.enabled=1')
			->where($db->quoteName('e.type') . '=' .
$db->quote('template'))
			->order('s.template')
			->order('s.title');

		// Set the query and load the styles.
		$db->setQuery($query);
		$styles = $db->loadObjectList();

		// Build the grouped list array.
		if ($styles)
		{
			foreach ($styles as $style)
			{
				$template = $style->template;
				$lang->load('tpl_' . $template . '.sys',
JPATH_SITE)
				|| $lang->load('tpl_' . $template . '.sys',
JPATH_SITE . '/templates/' . $template);
				$name = JText::_($style->name);

				// Initialize the group if necessary.
				if ( ! isset($groups[$template]))
				{
					$groups[$template]   = [];
					$groups[$template][] = JHtml::_('select.option', $template,
$name);
				}

				$groups[$template][] = JHtml::_('select.option', $template .
'--' . $style->id, $style->title);
			}
		}

		return $groups;
	}
}
text.php000064400000015255151155626720006263 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Supports a one line text field.
 *
 * @link   http://www.w3.org/TR/html-markup/input.text.html#input.text
 * @since  1.7.0
 */
class JFormFieldText extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Text';

	/**
	 * The allowable maxlength of the field.
	 *
	 * @var    integer
	 * @since  3.2
	 */
	protected $maxLength;

	/**
	 * The mode of input associated with the field.
	 *
	 * @var    mixed
	 * @since  3.2
	 */
	protected $inputmode;

	/**
	 * The name of the form field direction (ltr or rtl).
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $dirname;

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.text';

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'maxLength':
			case 'dirname':
			case 'inputmode':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'maxLength':
				$this->maxLength = (int) $value;
				break;

			case 'dirname':
				$value = (string) $value;
				$this->dirname = ($value == $name || $value == 'true' ||
$value == '1');
				break;

			case 'inputmode':
				$this->inputmode = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$result = parent::setup($element, $value, $group);

		if ($result == true)
		{
			$inputmode = (string) $this->element['inputmode'];
			$dirname = (string) $this->element['dirname'];

			$this->inputmode = '';
			$inputmode = preg_replace('/\s+/', ' ',
trim($inputmode));
			$inputmode = explode(' ', $inputmode);

			if (!empty($inputmode))
			{
				$defaultInputmode = in_array('default', $inputmode) ?
JText::_('JLIB_FORM_INPUTMODE') . ' ' : '';

				foreach (array_keys($inputmode, 'default') as $key)
				{
					unset($inputmode[$key]);
				}

				$this->inputmode = $defaultInputmode . implode(' ',
$inputmode);
			}

			// Set the dirname.
			$dirname = ((string) $dirname == 'dirname' || $dirname ==
'true' || $dirname == '1');
			$this->dirname = $dirname ? $this->getName($this->fieldname .
'_dir') : false;

			$this->maxLength = (int) $this->element['maxlength'];
		}

		return $result;
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		if ($this->element['useglobal'])
		{
			$component =
JFactory::getApplication()->input->getCmd('option');

			// Get correct component for menu items
			if ($component == 'com_menus')
			{
				$link      = $this->form->getData()->get('link');
				$uri       = new JUri($link);
				$component = $uri->getVar('option',
'com_menus');
			}

			$params = JComponentHelper::getParams($component);
			$value  = $params->get($this->fieldname);

			// Try with global configuration
			if (is_null($value))
			{
				$value = JFactory::getConfig()->get($this->fieldname);
			}

			// Try with menu configuration
			if (is_null($value) &&
JFactory::getApplication()->input->getCmd('option') ==
'com_menus')
			{
				$value =
JComponentHelper::getParams('com_menus')->get($this->fieldname);
			}

			if (!is_null($value))
			{
				$value = (string) $value;

				$this->hint = JText::sprintf('JGLOBAL_USE_GLOBAL_VALUE',
$value);
			}
		}

		return
$this->getRenderer($this->layout)->render($this->getLayoutData());
	}

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   3.4
	 */
	protected function getOptions()
	{
		$options = array();

		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			// Create a new option object based on the <option /> element.
			$options[] = JHtml::_(
				'select.option', (string) $option['value'],
				JText::alt(trim((string) $option),
preg_replace('/[^a-zA-Z0-9_\-]/', '_',
$this->fieldname)), 'value', 'text'
			);
		}

		return $options;
	}

	/**
	 * Method to get the field suggestions.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since       3.2
	 * @deprecated  4.0  Use getOptions instead
	 */
	protected function getSuggestions()
	{
		return $this->getOptions();
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.7
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Initialize some field attributes.
		$maxLength    = !empty($this->maxLength) ? '
maxlength="' . $this->maxLength . '"' :
'';
		$inputmode    = !empty($this->inputmode) ? '
inputmode="' . $this->inputmode . '"' :
'';
		$dirname      = !empty($this->dirname) ? ' dirname="' .
$this->dirname . '"' : '';

		/* Get the field options for the datalist.
			Note: getSuggestions() is deprecated and will be changed to getOptions()
with 4.0. */
		$options  = (array) $this->getSuggestions();

		$extraData = array(
			'maxLength' => $maxLength,
			'pattern'   => $this->pattern,
			'inputmode' => $inputmode,
			'dirname'   => $dirname,
			'options'   => $options,
		);

		return array_merge($data, $extraData);
	}
}
textareaplus.php000064400000006626151155626720010022 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Date\Date as JDate;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\StringHelper as RL_String;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_TextAreaPlus extends \RegularLabs\Library\Field
{
	public $type = 'TextAreaPlus';

	protected function getLabel()
	{
		$resize                = $this->get('resize', 0);
		$show_insert_date_name = $this->get('show_insert_date_name',
0);
		$add_separator         = $this->get('add_separator', 1);

		$label =
RL_String::html_entity_decoder(JText::_($this->get('label')));

		$attribs = 'id="' . $this->id . '-lbl"
for="' . $this->id . '"';

		if ($this->description)
		{
			$attribs .= ' class="hasPopover" title="' .
$label . '"'
				. ' data-content="' . JText::_($this->description) .
'"';
		}

		$html = '<label ' . $attribs . '>' . $label;

		if ($show_insert_date_name)
		{
			$date_name = JDate::getInstance()->format('[Y-m-d]') .
' ' . JFactory::getUser()->name . ' : ';
			$separator = $add_separator ? '---' : 'none';
			$onclick   = "RegularLabsForm.prependTextarea('" .
$this->id . "', '" . addslashes($date_name) .
"', '" . $separator . "');";

			$html .= '<br><span role="button"
class="btn btn-mini rl_insert_date" onclick="' .
$onclick . '">'
				. JText::_('RL_INSERT_DATE_NAME')
				. '</span>';
		}

		if ($resize)
		{
			$html .= '<br><span role="button"
class="rl_resize_textarea rl_maximize"'
				. ' data-id="' . $this->id . '" 
data-min="' . $this->get('height', 80) .
'" data-max="' . $resize . '">'
				. '<span
class="rl_resize_textarea_maximize">'
				. '[ + ]'
				. '</span>'
				. '<span
class="rl_resize_textarea_minimize">'
				. '[ - ]'
				. '</span>'
				. '</span>';
		}

		$html .= '</label>';

		return $html;
	}

	protected function getInput()
	{
		$width  = $this->get('width', 600);
		$height = $this->get('height', 80);
		$class  = ' class="' . trim('rl_textarea ' .
$this->get('class')) . '"';
		$type   = $this->get('texttype');
		$hint   = $this->get('hint');

		if (is_array($this->value))
		{
			$this->value = trim(implode("\n", $this->value));
		}

		if ($type == 'html')
		{
			// Convert <br> tags so they are not visible when editing
			$this->value = str_replace('<br>', "\n",
$this->value);
		}
		else if ($type == 'regex')
		{
			// Protects the special characters
			$this->value = str_replace('[:REGEX_ENTER:]',
'\n', $this->value);
		}

		if ($this->get('translate') &&
$this->get('translate') !== 'false')
		{
			$this->value = JText::_($this->value);
			$hint        = JText::_($hint);
		}

		$this->value = htmlspecialchars($this->value, ENT_COMPAT,
'UTF-8');

		$hint = $hint ? ' placeholder="' . $hint .
'"' : '';

		return
			'<textarea name="' . $this->name . '"
cols="' . (round($width / 7.5)) . '" rows="'
. (round($height / 15)) . '"'
			. ' style="width:' . (($width == '600') ?
'100%' : $width . 'px') . ';height:' .
$height . 'px"'
			. ' id="' . $this->id . '"' . $class .
$hint . '>' . $this->value . '</textarea>';
	}
}
toggler.php000064400000006077151155626730006745 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Form\FormField as JFormField;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\RegEx as RL_RegEx;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

/**
 * @deprecated  2018-10-30  Use ShowOn instead
 */

/**
 * To use this, make a start xml param tag with the param and value set
 * And an end xml param tag without the param and value set
 * Everything between those tags will be included in the slide
 *
 * Available extra parameters:
 * param            The name of the reference parameter
 * value            a comma separated list of value on which to show the
framework
 */
class JFormFieldRL_Toggler extends JFormField
{
	public $type = 'Toggler';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
		{
			return null;
		}

		$field = new RLFieldToggler;

		return $field->getInput($this->element->attributes());
	}
}

class RLFieldToggler
{
	function getInput($params)
	{
		$this->params = $params;

		$option =
JFactory::getApplication()->input->get('option');

		// do not place toggler stuff on JoomFish pages
		if ($option == 'com_joomfish')
		{
			return '';
		}

		$param  = $this->get('param');
		$value  = $this->get('value');
		$nofx   = $this->get('nofx');
		$method = $this->get('method');
		$div    = $this->get('div', 0);

		RL_Document::script('regularlabs/toggler.min.js');

		$param = RL_RegEx::replace('^\s*(.*?)\s*$', '\1',
$param);
		$param = RL_RegEx::replace('\s*\|\s*', '|', $param);

		$html = [];
		if ( ! $param)
		{
			return '</div>';
		}

		$param      = RL_RegEx::replace('[^a-z0-9-\.\|\@]',
'_', $param);
		$param      = str_replace('@', '_', $param);
		$set_groups = explode('|', $param);
		$set_values = explode('|', $value);
		$ids        = [];
		foreach ($set_groups as $i => $group)
		{
			$count = $i;
			if ($count >= count($set_values))
			{
				$count = 0;
			}
			$value = explode(',', $set_values[$count]);
			foreach ($value as $val)
			{
				$ids[] = $group . '.' . $val;
			}
		}

		if ( ! $div)
		{
			$html[] = '</div></div>';
		}

		$html[] = '<div id="' . rand(1000000, 9999999) .
'___' . implode('___', $ids) . '"
class="rl_toggler';
		if ($nofx)
		{
			$html[] = ' rl_toggler_nofx';
		}
		if ($method == 'and')
		{
			$html[] = ' rl_toggler_and';
		}
		$html[] = '">';

		if ( ! $div)
		{
			$html[] = '<div><div>';
		}

		return implode('', $html);
	}

	private function get($val, $default = '')
	{
		if ( ! isset($this->params[$val]) || (string) $this->params[$val]
== '')
		{
			return $default;
		}

		return (string) $this->params[$val];
	}
}
users.php000064400000004525151155626730006437 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use Joomla\Registry\Registry;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Users extends \RegularLabs\Library\Field
{
	public $type = 'Users';

	protected function getInput()
	{
		if ( ! is_array($this->value))
		{
			$this->value = explode(',', $this->value);
		}

		$size         = (int) $this->get('size');
		$multiple     = $this->get('multiple');
		$show_current = $this->get('show_current');

		return $this->selectListSimpleAjax(
			$this->type, $this->name, $this->value, $this->id,
			compact('size', 'multiple',
'show_current')
		);
	}

	function getAjaxRaw(Registry $attributes)
	{
		$name         = $attributes->get('name', $this->type);
		$id           = $attributes->get('id', strtolower($name));
		$value        = $attributes->get('value', []);
		$size         = $attributes->get('size');
		$multiple     = $attributes->get('multiple');
		$show_current = $attributes->get('show_current');

		$options = $this->getUsers();

		if (is_array($options) && $show_current)
		{
			array_unshift($options, JHtml::_('select.option',
'current', '- ' . JText::_('RL_CURRENT_USER')
. ' -'));
		}

		return $this->selectListSimple($options, $name, $value, $id, $size,
$multiple);
	}

	function getUsers()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__users AS u');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear('select')
			->select('u.name, u.username, u.id, u.block as disabled')
			->order('name');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		$list = array_map(function ($item) {
			if ($item->disabled)
			{
				$item->name .= ' (' . JText::_('JDISABLED') .
')';
			}

			return $item;
		}, $list);

		return $this->getOptionsByList($list, ['username',
'id']);
	}
}
version.php000064400000003014151155626730006753 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory as JFactory;
use RegularLabs\Library\Version as RL_Version;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Version extends \RegularLabs\Library\Field
{
	public $type = 'Version';

	protected function getLabel()
	{
		return '';
	}

	protected function getInput()
	{
		$extension = $this->get('extension');
		$xml       = $this->get('xml');

		if ( ! $xml && $this->form->getValue('element'))
		{
			if ($this->form->getValue('folder'))
			{
				$xml = 'plugins/' .
$this->form->getValue('folder') . '/' .
$this->form->getValue('element') . '/' .
$this->form->getValue('element') . '.xml';
			}
			else
			{
				$xml = 'administrator/modules/' .
$this->form->getValue('element') . '/' .
$this->form->getValue('element') . '.xml';
			}
			if ( ! file_exists(JPATH_SITE . '/' . $xml))
			{
				return '';
			}
		}

		if (empty($extension) || empty($xml))
		{
			return '';
		}

		if ( ! JFactory::getUser()->authorise('core.manage',
'com_installer'))
		{
			return '';
		}

		return '</div><div class="hide">' .
RL_Version::getMessage($extension);
	}
}
virtuemart.php000064400000007125151155626730007477 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_VirtueMart extends \RegularLabs\Library\FieldGroup
{
	public $type     = 'VirtueMart';
	public $language = null;

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['categories',
'products']))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getCategories()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__virtuemart_categories AS c')
			->where('c.published > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear()
			->select('c.virtuemart_category_id as id, cc.category_parent_id
AS parent_id, l.category_name AS title, c.published')
			->from('#__virtuemart_categories_' .
$this->getActiveLanguage() . ' AS l')
			->join('', '#__virtuemart_categories AS c using
(virtuemart_category_id)')
			->join('LEFT', '#__virtuemart_category_categories AS
cc ON l.virtuemart_category_id = cc.category_child_id')
			->where('c.published > -1')
			->group('c.virtuemart_category_id')
			->order('c.ordering, l.category_name');
		$this->db->setQuery($query);
		$items = $this->db->loadObjectList();

		return $this->getOptionsTreeByList($items);
	}

	function getProducts()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__virtuemart_products AS p')
			->where('p.published > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear('select')
			->select('p.virtuemart_product_id as id, l.product_name AS name,
p.product_sku as sku, cl.category_name AS cat, p.published')
			->join('LEFT', '#__virtuemart_products_' .
$this->getActiveLanguage() . ' AS l ON l.virtuemart_product_id =
p.virtuemart_product_id')
			->join('LEFT', '#__virtuemart_product_categories AS x
ON x.virtuemart_product_id = p.virtuemart_product_id')
			->join('LEFT', '#__virtuemart_categories AS c ON
c.virtuemart_category_id = x.virtuemart_category_id')
			->join('LEFT', '#__virtuemart_categories_' .
$this->getActiveLanguage() . ' AS cl ON cl.virtuemart_category_id =
c.virtuemart_category_id')
			->group('p.virtuemart_product_id')
			->order('l.product_name, p.product_sku');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list, ['sku',
'cat', 'id']);
	}

	private function getActiveLanguage()
	{
		if (isset($this->language))
		{
			return $this->language;
		}

		$this->language = 'en_gb';

		if ( ! class_exists('VmConfig'))
		{
			require_once JPATH_ROOT .
'/administrator/components/com_virtuemart/helpers/config.php';
		}

		if ( ! class_exists('VmConfig'))
		{
			return $this->language;
		}

		VmConfig::loadConfig();

		if ( ! empty(VmConfig::$vmlang))
		{
			$this->language = str_replace('-', '_',
strtolower(VmConfig::$vmlang));

			return $this->language;
		}

		$active_languages = VmConfig::get('active_languages', []);

		if ( ! isset($active_languages[0]))
		{
			return $this->language;
		}

		$this->language = str_replace('-', '_',
strtolower($active_languages[0]));

		return $this->language;
	}
}
zoo.php000064400000007226151155626730006106 0ustar00<?php
/**
 * @package         Regular Labs Library
 * @version         21.2.19653
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://www.regularlabs.com
 * @copyright       Copyright © 2021 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use RegularLabs\Library\Form as RL_Form;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
	return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_Zoo extends \RegularLabs\Library\FieldGroup
{
	public $type = 'Zoo';

	protected function getInput()
	{
		if ($error = $this->missingFilesOrTables(['applications'
=> 'application', 'categories' =>
'category', 'items' => 'item']))
		{
			return $error;
		}

		return $this->getSelectList();
	}

	function getCategories()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__zoo_category AS c')
			->where('c.published > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$options = [];
		if ($this->get('show_ignore'))
		{
			if (in_array('-1', $this->value))
			{
				$this->value = ['-1'];
			}
			$options[] = JHtml::_('select.option', '-1', '-
' . JText::_('RL_IGNORE') . ' -');
			$options[] = JHtml::_('select.option', '-',
'&nbsp;', 'value', 'text', true);
		}

		$query->clear()
			->select('a.id, a.name')
			->from('#__zoo_application AS a')
			->order('a.name, a.id');
		$this->db->setQuery($query);
		$apps = $this->db->loadObjectList();

		foreach ($apps as $i => $app)
		{
			$query->clear()
				->select('c.id, c.parent AS parent_id, c.name AS title,
c.published')
				->from('#__zoo_category AS c')
				->where('c.application_id = ' . (int) $app->id)
				->where('c.published > -1')
				->order('c.ordering, c.name');
			$this->db->setQuery($query);
			$items = $this->db->loadObjectList();

			if ($i)
			{
				$options[] = JHtml::_('select.option', '-',
'&nbsp;', 'value', 'text', true);
			}

			// establish the hierarchy of the menu
			// TODO: use node model
			$children = [];

			if ($items)
			{
				// first pass - collect children
				foreach ($items as $v)
				{
					$pt   = $v->parent_id;
					$list = @$children[$pt] ? $children[$pt] : [];
					array_push($list, $v);
					$children[$pt] = $list;
				}
			}

			// second pass - get an indent list of the items
			$list = JHtml::_('menu.treerecurse', 0, '', [],
$children, 9999, 0, 0);

			// assemble items to the array
			$options[] = JHtml::_('select.option', 'app' .
$app->id, '[' . $app->name . ']');
			foreach ($list as $item)
			{
				$item->treename = '  ' .
str_replace('&#160;&#160;- ', '  ',
$item->treename);
				$item->treename = RL_Form::prepareSelectItem($item->treename,
$item->published);
				$option         = JHtml::_('select.option', $item->id,
$item->treename);
				$option->level  = 1;
				$options[]      = $option;
			}
		}

		return $options;
	}

	function getItems()
	{
		$query = $this->db->getQuery(true)
			->select('COUNT(*)')
			->from('#__zoo_item AS i')
			->where('i.state > -1');
		$this->db->setQuery($query);
		$total = $this->db->loadResult();

		if ($total > $this->max_list_count)
		{
			return -1;
		}

		$query->clear('select')
			->select('i.id, i.name, a.name as cat, i.state as
published')
			->join('LEFT', '#__zoo_application AS a ON a.id =
i.application_id')
			->group('i.id')
			->order('i.name, i.priority, i.id');
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();

		return $this->getOptionsByList($list, ['cat',
'id']);
	}
}
aliastag.php000064400000003217151156422250007050 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Framework.
 *
 * @since  2.5.0
 */
class JFormFieldAliastag extends JFormFieldList
{
	/**
	 * The field type.
	 *
	 * @var    string
	 * @since  3.6
	 */
	protected $type = 'Aliastag';

	/**
	 * Method to get a list of options for a list input.
	 *
	 * @return	array  An array of JHtml options.
	 *
	 * @since   3.6
	 */
	protected function getOptions()
	{
			// Get list of tag type alias
			$db    = JFactory::getDbo();
			$query = $db->getQuery(true)
				->select('Distinct type_alias AS value, type_alias AS
text')
				->from('#__contentitem_tag_map');
			$db->setQuery($query);

			$options = $db->loadObjectList();

			$lang = JFactory::getLanguage();

			foreach ($options as $i => $item)
			{
				$parts     = explode('.', $item->value);
				$extension = $parts[0];
				$lang->load($extension . '.sys', JPATH_ADMINISTRATOR,
null, false, true)
				|| $lang->load($extension, JPath::clean(JPATH_ADMINISTRATOR .
'/components/' . $extension), null, false, true);
				$options[$i]->text = JText::_(strtoupper($extension) .
'_TAGS_' . strtoupper($parts[1]));
			}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		// Sort by language value
		usort(
			$options,
			function($a, $b)
			{
				return strcmp($a->text, $b->text);
			}
		);

		return $options;
	}
}
cachehandler.php000064400000002062151156422250007661 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Provides a list of available cache handlers
 *
 * @see    JCache
 * @since  1.7.0
 */
class JFormFieldCacheHandler extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'CacheHandler';

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.0
	 */
	protected function getOptions()
	{
		$options = array();

		// Convert to name => name array.
		foreach (JCache::getStores() as $store)
		{
			$options[] = JHtml::_('select.option', $store,
JText::_('JLIB_FORM_VALUE_CACHE_' . $store), 'value',
'text');
		}

		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}
}
calendar.php000064400000022150151156422250007031 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 *
 * Provides a pop up date picker linked to a button.
 * Optionally may be filtered to use user's or server's time
zone.
 *
 * @since  1.7.0
 */
class JFormFieldCalendar extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Calendar';

	/**
	 * The allowable maxlength of calendar field.
	 *
	 * @var    integer
	 * @since  3.2
	 */
	protected $maxlength;

	/**
	 * The format of date and time.
	 *
	 * @var    integer
	 * @since  3.2
	 */
	protected $format;

	/**
	 * The filter.
	 *
	 * @var    integer
	 * @since  3.2
	 */
	protected $filter;

	/**
	 * The minimum year number to subtract/add from the current year
	 *
	 * @var    integer
	 * @since  3.7.0
	 */
	protected $minyear;

	/**
	 * The maximum year number to subtract/add from the current year
	 *
	 * @var    integer
	 * @since  3.7.0
	 */
	protected $maxyear;

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7.0
	 */
	protected $layout = 'joomla.form.field.calendar';

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'maxlength':
			case 'format':
			case 'filter':
			case 'timeformat':
			case 'todaybutton':
			case 'singleheader':
			case 'weeknumbers':
			case 'showtime':
			case 'filltable':
			case 'minyear':
			case 'maxyear':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'maxlength':
			case 'timeformat':
				$this->$name = (int) $value;
				break;
			case 'todaybutton':
			case 'singleheader':
			case 'weeknumbers':
			case 'showtime':
			case 'filltable':
			case 'format':
			case 'filter':
			case 'minyear':
			case 'maxyear':
				$this->$name = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->maxlength    = (int) $this->element['maxlength']
? (int) $this->element['maxlength'] : 45;
			$this->format       = (string) $this->element['format']
? (string) $this->element['format'] : '%Y-%m-%d';
			$this->filter       = (string) $this->element['filter']
? (string) $this->element['filter'] : 'USER_UTC';
			$this->todaybutton  = (string)
$this->element['todaybutton'] ? (string)
$this->element['todaybutton'] : 'true';
			$this->weeknumbers  = (string)
$this->element['weeknumbers'] ? (string)
$this->element['weeknumbers'] : 'true';
			$this->showtime     = (string)
$this->element['showtime'] ? (string)
$this->element['showtime'] : 'false';
			$this->filltable    = (string)
$this->element['filltable'] ? (string)
$this->element['filltable'] : 'true';
			$this->timeformat   = (int) $this->element['timeformat']
? (int) $this->element['timeformat'] : 24;
			$this->singleheader = (string)
$this->element['singleheader'] ? (string)
$this->element['singleheader'] : 'false';
			$this->minyear      = strlen((string)
$this->element['minyear']) ? (string)
$this->element['minyear'] : null;
			$this->maxyear      = strlen((string)
$this->element['maxyear']) ? (string)
$this->element['maxyear'] : null;

			if ($this->maxyear < 0 || $this->minyear > 0)
			{
				$this->todaybutton = 'false';
			}
		}

		return $return;
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		$config    = JFactory::getConfig();
		$user      = JFactory::getUser();

		// Translate the format if requested
		$translateFormat = (string)
$this->element['translateformat'];

		if ($translateFormat && $translateFormat != 'false')
		{
			$showTime = (string) $this->element['showtime'];

			$lang  = \JFactory::getLanguage();
			$debug = $lang->setDebug(false);

			if ($showTime && $showTime != 'false')
			{
				$this->format = JText::_('DATE_FORMAT_CALENDAR_DATETIME');
			}
			else
			{
				$this->format = JText::_('DATE_FORMAT_CALENDAR_DATE');
			}

			$lang->setDebug($debug);
		}

		// If a known filter is given use it.
		switch (strtoupper($this->filter))
		{
			case 'SERVER_UTC':
				// Convert a date to UTC based on the server timezone.
				if ($this->value && $this->value !=
JFactory::getDbo()->getNullDate())
				{
					// Get a date object based on the correct timezone.
					$date = JFactory::getDate($this->value, 'UTC');
					$date->setTimezone(new
DateTimeZone($config->get('offset')));

					// Transform the date string.
					$this->value = $date->format('Y-m-d H:i:s', true,
false);
				}
				break;
			case 'USER_UTC':
				// Convert a date to UTC based on the user timezone.
				if ($this->value && $this->value !=
JFactory::getDbo()->getNullDate())
				{
					// Get a date object based on the correct timezone.
					$date = JFactory::getDate($this->value, 'UTC');
					$date->setTimezone($user->getTimezone());

					// Transform the date string.
					$this->value = $date->format('Y-m-d H:i:s', true,
false);
				}
				break;
		}

		// Format value when not nulldate ('0000-00-00 00:00:00'),
otherwise blank it as it would result in 1970-01-01.
		if ($this->value && $this->value !=
JFactory::getDbo()->getNullDate() && strtotime($this->value)
!== false)
		{
			$tz = date_default_timezone_get();
			date_default_timezone_set('UTC');
			$this->value = strftime($this->format,
strtotime($this->value));
			date_default_timezone_set($tz);
		}
		else
		{
			$this->value = '';
		}

		return
$this->getRenderer($this->layout)->render($this->getLayoutData());
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since  3.7.0
	 */
	protected function getLayoutData()
	{
		$data      = parent::getLayoutData();
		$tag       = JFactory::getLanguage()->getTag();
		$calendar  = JFactory::getLanguage()->getCalendar();
		$direction = strtolower(JFactory::getDocument()->getDirection());

		// Get the appropriate file for the current language date helper
		$helperPath =
'system/fields/calendar-locales/date/gregorian/date-helper.min.js';

		if (!empty($calendar) && is_dir(JPATH_ROOT .
'/media/system/js/fields/calendar-locales/date/' .
strtolower($calendar)))
		{
			$helperPath = 'system/fields/calendar-locales/date/' .
strtolower($calendar) . '/date-helper.min.js';
		}

		// Get the appropriate locale file for the current language
		$localesPath = 'system/fields/calendar-locales/en.js';

		if (is_file(JPATH_ROOT .
'/media/system/js/fields/calendar-locales/' . strtolower($tag) .
'.js'))
		{
			$localesPath = 'system/fields/calendar-locales/' .
strtolower($tag) . '.js';
		}
		elseif (is_file(JPATH_ROOT .
'/media/system/js/fields/calendar-locales/' . $tag .
'.js'))
		{
			$localesPath = 'system/fields/calendar-locales/' . $tag .
'.js';
		}
		elseif (is_file(JPATH_ROOT .
'/media/system/js/fields/calendar-locales/' .
strtolower(substr($tag, 0, -3)) . '.js'))
		{
			$localesPath = 'system/fields/calendar-locales/' .
strtolower(substr($tag, 0, -3)) . '.js';
		}

		$extraData = array(
			'value'        => $this->value,
			'maxLength'    => $this->maxlength,
			'format'       => $this->format,
			'filter'       => $this->filter,
			'todaybutton'  => ($this->todaybutton ===
'true') ? 1 : 0,
			'weeknumbers'  => ($this->weeknumbers ===
'true') ? 1 : 0,
			'showtime'     => ($this->showtime === 'true')
? 1 : 0,
			'filltable'    => ($this->filltable ===
'true') ? 1 : 0,
			'timeformat'   => $this->timeformat,
			'singleheader' => ($this->singleheader ===
'true') ? 1 : 0,
			'helperPath'   => $helperPath,
			'localesPath'  => $localesPath,
			'minYear'      => $this->minyear,
			'maxYear'      => $this->maxyear,
			'direction'    => $direction,
		);

		return array_merge($data, $extraData);
	}
}
checkboxes.php000064400000007757151156422250007416 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Displays options as a list of checkboxes.
 * Multiselect may be forced to be true.
 *
 * @see    JFormFieldCheckbox
 * @since  1.7.0
 */
class JFormFieldCheckboxes extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Checkboxes';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.5
	 */
	protected $layout = 'joomla.form.field.checkboxes';

	/**
	 * Flag to tell the field to always be in multiple values mode.
	 *
	 * @var    boolean
	 * @since  1.7.0
	 */
	protected $forceMultiple = true;

	/**
	 * The comma separated list of checked checkboxes value.
	 *
	 * @var    mixed
	 * @since  3.2
	 */
	public $checkedOptions;

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'forceMultiple':
			case 'checkedOptions':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'checkedOptions':
				$this->checkedOptions = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to get the radio button field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		if (empty($this->layout))
		{
			throw new UnexpectedValueException(sprintf('%s has no layout
assigned.', $this->name));
		}

		return
$this->getRenderer($this->layout)->render($this->getLayoutData());
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->checkedOptions = (string)
$this->element['checked'];
		}

		return $return;
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since   3.5
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// True if the field has 'value' set. In other words, it has
been stored, don't use the default values.
		$hasValue = (isset($this->value) && !empty($this->value));

		// If a value has been stored, use it. Otherwise, use the defaults.
		$checkedOptions = $hasValue ? $this->value : $this->checkedOptions;

		$extraData = array(
			'checkedOptions' => is_array($checkedOptions) ?
$checkedOptions : explode(',', (string) $checkedOptions),
			'hasValue'       => $hasValue,
			'options'        => $this->getOptions(),
		);

		return array_merge($data, $extraData);
	}
}
combo.php000064400000002677151156422250006373 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Implements a combo box field.
 *
 * @since  1.7.0
 */
class JFormFieldCombo extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Combo';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.8.0
	 */
	protected $layout = 'joomla.form.field.combo';

	/**
	 * Method to get the field input markup for a combo box field.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		if (empty($this->layout))
		{
			throw new UnexpectedValueException(sprintf('%s has no layout
assigned.', $this->name));
		}

		return
$this->getRenderer($this->layout)->render($this->getLayoutData());
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since   3.8.0
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Get the field options.
		$options = $this->getOptions();

		$extraData = array(
			'options' => $options,
		);

		return array_merge($data, $extraData);
	}
}
databaseconnection.php000064400000004011151156422250011100 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Provides a list of available database connections, optionally limiting
to
 * a given list.
 *
 * @see    JDatabaseDriver
 * @since  1.7.3
 */
class JFormFieldDatabaseConnection extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.3
	 */
	protected $type = 'DatabaseConnection';

	/**
	 * Method to get the list of database options.
	 *
	 * This method produces a drop down list of available databases supported
	 * by JDatabaseDriver classes that are also supported by the application.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.3
	 * @see     JDatabaseDriver::getConnectors()
	 */
	protected function getOptions()
	{
		// This gets the connectors available in the platform and supported by
the server.
		$available = JDatabaseDriver::getConnectors();

		/**
		 * This gets the list of database types supported by the application.
		 * This should be entered in the form definition as a comma separated
list.
		 * If no supported databases are listed, it is assumed all available
databases
		 * are supported.
		 */
		$supported = $this->element['supported'];

		if (!empty($supported))
		{
			$supported = explode(',', $supported);

			foreach ($supported as $support)
			{
				if (in_array($support, $available))
				{
					$options[$support] = JText::_(ucfirst($support));
				}
			}
		}
		else
		{
			foreach ($available as $support)
			{
				$options[$support] = JText::_(ucfirst($support));
			}
		}

		// This will come into play if an application is installed that requires
		// a database that is not available on the server.
		if (empty($options))
		{
			$options[''] = JText::_('JNONE');
		}

		return $options;
	}
}
email.php000064400000002727151156422250006357 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('text');

/**
 * Form Field class for the Joomla Platform.
 * Provides and input field for email addresses
 *
 * @link   http://www.w3.org/TR/html-markup/input.email.html#input.email
 * @see    JFormRuleEmail
 * @since  1.7.0
 */
class JFormFieldEMail extends JFormFieldText
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Email';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.email';

	/**
	 * Method to get the field input markup for email addresses.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}
	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.5
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		$extraData = array(
			'maxLength'  => $this->maxLength,
			'multiple'   => $this->multiple,
		);

		return array_merge($data, $extraData);
	}
}
file.php000064400000006534151156422250006207 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Provides an input field for files
 *
 * @link   http://www.w3.org/TR/html-markup/input.file.html#input.file
 * @since  1.7.0
 */
class JFormFieldFile extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'File';

	/**
	 * The accepted file type list.
	 *
	 * @var    mixed
	 * @since  3.2
	 */
	protected $accept;

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.6
	 */
	protected $layout = 'joomla.form.field.file';

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'accept':
				return $this->accept;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'accept':
				$this->accept = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->accept = (string) $this->element['accept'];
		}

		return $return;
	}

	/**
	 * Method to get the field input markup for the file field.
	 * Field attributes allow specification of a maximum file size and a
string
	 * of accepted file extensions.
	 *
	 * @return  string  The field input markup.
	 *
	 * @note    The field does not include an upload mechanism.
	 * @see     JFormFieldMedia
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		return
$this->getRenderer($this->layout)->render($this->getLayoutData());
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since   3.6
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		$extraData = array(
			'accept'   => $this->accept,
			'multiple' => $this->multiple,
		);

		return array_merge($data, $extraData);
	}
}
folderlist.php000064400000012601151156422250007427 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.path');

JFormHelper::loadFieldClass('list');

/**
 * Supports an HTML select list of folder
 *
 * @since  1.7.0
 */
class JFormFieldFolderList extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'FolderList';

	/**
	 * The filter.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $filter;

	/**
	 * The exclude.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $exclude;

	/**
	 * The recursive.
	 *
	 * @var    string
	 * @since  3.6
	 */
	protected $recursive;

	/**
	 * The hideNone.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $hideNone = false;

	/**
	 * The hideDefault.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $hideDefault = false;

	/**
	 * The directory.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $directory;

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'filter':
			case 'exclude':
			case 'recursive':
			case 'hideNone':
			case 'hideDefault':
			case 'directory':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'filter':
			case 'directory':
			case 'exclude':
			case 'recursive':
				$this->$name = (string) $value;
				break;

			case 'hideNone':
			case 'hideDefault':
				$value = (string) $value;
				$this->$name = ($value === 'true' || $value === $name ||
$value === '1');
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->filter  = (string) $this->element['filter'];
			$this->exclude = (string) $this->element['exclude'];

			$recursive       = (string) $this->element['recursive'];
			$this->recursive = ($recursive == 'true' || $recursive ==
'recursive' || $recursive == '1');

			$hideNone       = (string) $this->element['hide_none'];
			$this->hideNone = ($hideNone == 'true' || $hideNone ==
'hideNone' || $hideNone == '1');

			$hideDefault       = (string)
$this->element['hide_default'];
			$this->hideDefault = ($hideDefault == 'true' ||
$hideDefault == 'hideDefault' || $hideDefault == '1');

			// Get the path in which to search for file options.
			$this->directory = (string) $this->element['directory'];
		}

		return $return;
	}

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.0
	 */
	protected function getOptions()
	{
		$options = array();

		$path = $this->directory;

		if (!is_dir($path))
		{
			if (is_dir(JPATH_ROOT . '/' . $path))
			{
				$path = JPATH_ROOT . '/' . $path;
			}
			else 
			{
				return;
			}
		}

		$path = JPath::clean($path);

		// Prepend some default options based on field attributes.
		if (!$this->hideNone)
		{
			$options[] = JHtml::_('select.option', '-1',
JText::alt('JOPTION_DO_NOT_USE',
preg_replace('/[^a-zA-Z0-9_\-]/', '_',
$this->fieldname)));
		}

		if (!$this->hideDefault)
		{
			$options[] = JHtml::_('select.option', '',
JText::alt('JOPTION_USE_DEFAULT',
preg_replace('/[^a-zA-Z0-9_\-]/', '_',
$this->fieldname)));
		}

		// Get a list of folders in the search path with the given filter.
		$folders = JFolder::folders($path, $this->filter, $this->recursive,
true);

		// Build the options list from the list of folders.
		if (is_array($folders))
		{
			foreach ($folders as $folder)
			{
				// Remove the root part and the leading /
				$folder = trim(str_replace($path, '', $folder),
'/');

				// Check to see if the file is in the exclude mask.
				if ($this->exclude)
				{
					if (preg_match(chr(1) . $this->exclude . chr(1), $folder))
					{
						continue;
					}
				}

				$options[] = JHtml::_('select.option', $folder, $folder);
			}
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}
}
groupedlist.php000064400000012577151156422250007635 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Provides a grouped list select field.
 *
 * @since  1.7.0
 */
class JFormFieldGroupedList extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'GroupedList';

	/**
	 * Method to get the field option groups.
	 *
	 * @return  array  The field option objects as a nested array in groups.
	 *
	 * @since   1.7.0
	 * @throws  UnexpectedValueException
	 */
	protected function getGroups()
	{
		$groups = array();
		$label = 0;

		foreach ($this->element->children() as $element)
		{
			switch ($element->getName())
			{
				// The element is an <option />
				case 'option':
					// Initialize the group if necessary.
					if (!isset($groups[$label]))
					{
						$groups[$label] = array();
					}

					$disabled = (string) $element['disabled'];
					$disabled = ($disabled == 'true' || $disabled ==
'disabled' || $disabled == '1');

					// Create a new option object based on the <option /> element.
					$tmp = JHtml::_(
						'select.option', ($element['value']) ? (string)
$element['value'] : trim((string) $element),
						JText::alt(trim((string) $element),
preg_replace('/[^a-zA-Z0-9_\-]/', '_',
$this->fieldname)), 'value', 'text',
						$disabled
					);

					// Set some option attributes.
					$tmp->class = (string) $element['class'];

					// Set some JavaScript option attributes.
					$tmp->onclick = (string) $element['onclick'];

					// Add the option.
					$groups[$label][] = $tmp;
					break;

				// The element is a <group />
				case 'group':
					// Get the group label.
					if ($groupLabel = (string) $element['label'])
					{
						$label = JText::_($groupLabel);
					}

					// Initialize the group if necessary.
					if (!isset($groups[$label]))
					{
						$groups[$label] = array();
					}

					// Iterate through the children and build an array of options.
					foreach ($element->children() as $option)
					{
						// Only add <option /> elements.
						if ($option->getName() != 'option')
						{
							continue;
						}

						$disabled = (string) $option['disabled'];
						$disabled = ($disabled == 'true' || $disabled ==
'disabled' || $disabled == '1');

						// Create a new option object based on the <option /> element.
						$tmp = JHtml::_(
							'select.option', ($option['value']) ? (string)
$option['value'] : JText::_(trim((string) $option)),
							JText::_(trim((string) $option)), 'value',
'text', $disabled
						);

						// Set some option attributes.
						$tmp->class = (string) $option['class'];

						// Set some JavaScript option attributes.
						$tmp->onclick = (string) $option['onclick'];

						// Add the option.
						$groups[$label][] = $tmp;
					}

					if ($groupLabel)
					{
						$label = count($groups);
					}
					break;

				// Unknown element type.
				default:
					throw new UnexpectedValueException(sprintf('Unsupported element
%s in JFormFieldGroupedList', $element->getName()), 500);
			}
		}

		reset($groups);

		return $groups;
	}

	/**
	 * Method to get the field input markup fora grouped list.
	 * Multiselect is enabled by using the multiple attribute.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		$html = array();
		$attr = '';

		// Initialize some field attributes.
		$attr .= !empty($this->class) ? ' class="' .
$this->class . '"' : '';
		$attr .= !empty($this->size) ? ' size="' .
$this->size . '"' : '';
		$attr .= $this->multiple ? ' multiple' : '';
		$attr .= $this->required ? ' required
aria-required="true"' : '';
		$attr .= $this->autofocus ? ' autofocus' : '';

		// To avoid user's confusion, readonly="true" should imply
disabled="true".
		if ($this->readonly || $this->disabled)
		{
			$attr .= ' disabled="disabled"';
		}

		// Initialize JavaScript field attributes.
		$attr .= !empty($this->onchange) ? ' onchange="' .
$this->onchange . '"' : '';

		// Get the field groups.
		$groups = (array) $this->getGroups();

		// Create a read-only list (no name) with a hidden input to store the
value.
		if ($this->readonly)
		{
			$html[] = JHtml::_(
				'select.groupedlist', $groups, null,
				array(
					'list.attr' => $attr, 'id' => $this->id,
'list.select' => $this->value, 'group.items'
=> null, 'option.key.toHtml' => false,
					'option.text.toHtml' => false,
				)
			);

			// E.g. form field type tag sends $this->value as array
			if ($this->multiple && is_array($this->value))
			{
				if (!count($this->value))
				{
					$this->value[] = '';
				}

				foreach ($this->value as $value)
				{
					$html[] = '<input type="hidden" name="' .
$this->name . '" value="' . htmlspecialchars($value,
ENT_COMPAT, 'UTF-8') . '"/>';
				}
			}
			else
			{
				$html[] = '<input type="hidden" name="' .
$this->name . '" value="' .
htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') .
'"/>';
			}
		}

		// Create a regular list.
		else
		{
			$html[] = JHtml::_(
				'select.groupedlist', $groups, $this->name,
				array(
					'list.attr' => $attr, 'id' => $this->id,
'list.select' => $this->value, 'group.items'
=> null, 'option.key.toHtml' => false,
					'option.text.toHtml' => false,
				)
			);
		}

		return implode($html);
	}
}
hidden.php000064400000002340151156422250006512 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Provides a hidden field
 *
 * @link   http://www.w3.org/TR/html-markup/input.hidden.html#input.hidden
 * @since  1.7.0
 */
class JFormFieldHidden extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Hidden';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.hidden';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.7
	 */
	protected function getLayoutData()
	{
		return parent::getLayoutData();
	}
}
imagelist.php000064400000001706151156422250007242 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('filelist');

/**
 * Supports an HTML select list of image
 *
 * @since  1.7.0
 */
class JFormFieldImageList extends JFormFieldFileList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'ImageList';

	/**
	 * Method to get the list of images field options.
	 * Use the filter attribute to specify allowable file extensions.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.0
	 */
	protected function getOptions()
	{
		// Define the image file type filter.
		$this->filter =
'\.png$|\.gif$|\.jpg$|\.bmp$|\.ico$|\.jpeg$|\.psd$|\.eps$';

		// Get the field options.
		return parent::getOptions();
	}
}
integer.php000064400000003370151156422250006720 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Provides a select list of integers with specified first, last and step
values.
 *
 * @since  1.7.0
 */
class JFormFieldInteger extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Integer';

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.0
	 */
	protected function getOptions()
	{
		$options = array();

		// Initialize some field attributes.
		$first = (int) $this->element['first'];
		$last = (int) $this->element['last'];
		$step = (int) $this->element['step'];

		// Sanity checks.
		if ($step == 0)
		{
			// Step of 0 will create an endless loop.
			return $options;
		}
		elseif ($first < $last && $step < 0)
		{
			// A negative step will never reach the last number.
			return $options;
		}
		elseif ($first > $last && $step > 0)
		{
			// A position step will never reach the last number.
			return $options;
		}
		elseif ($step < 0)
		{
			// Build the options array backwards.
			for ($i = $first; $i >= $last; $i += $step)
			{
				$options[] = JHtml::_('select.option', $i);
			}
		}
		else
		{
			// Build the options array.
			for ($i = $first; $i <= $last; $i += $step)
			{
				$options[] = JHtml::_('select.option', $i);
			}
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}
}
language.php000064400000004043151156422250007044 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Supports a list of installed application languages
 *
 * @see    JFormFieldContentLanguage for a select list of content
languages.
 * @since  1.7.0
 */
class JFormFieldLanguage extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Language';

	/**
	 * Method to get the field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.0
	 */
	protected function getOptions()
	{
		// Initialize some field attributes.
		$client = (string) $this->element['client'];

		if ($client != 'site' && $client !=
'administrator')
		{
			$client = 'site';
		}

		// Make sure the languages are sorted base on locale instead of random
sorting
		$languages = JLanguageHelper::createLanguageList($this->value,
constant('JPATH_' . strtoupper($client)), true, true);
		if (count($languages) > 1)
		{
			usort(
				$languages,
				function ($a, $b)
				{
					return strcmp($a['value'], $b['value']);
				}
			);
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(
			parent::getOptions(),
			$languages
		);

		// Set the default value active language
		if ($langParams = JComponentHelper::getParams('com_languages'))
		{
			switch ((string) $this->value)
			{
				case 'site':
				case 'frontend':
				case '0':
					$this->value = $langParams->get('site',
'en-GB');
					break;
				case 'admin':
				case 'administrator':
				case 'backend':
				case '1':
					$this->value = $langParams->get('administrator',
'en-GB');
					break;
				case 'active':
				case 'auto':
					$lang = JFactory::getLanguage();
					$this->value = $lang->getTag();
					break;
				default:
				break;
			}
		}

		return $options;
	}
}
meter.php000064400000011010151156422250006365 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('number');

/**
 * Form Field class for the Joomla Platform.
 * Provides a meter to show value in a range.
 *
 * @link   http://www.w3.org/TR/html-markup/input.text.html#input.text
 * @since  3.2
 */
class JFormFieldMeter extends JFormFieldNumber
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $type = 'Meter';

	/**
	 * The width of the field increased or decreased.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $width;

	/**
	 * Whether the field is active or not.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $active = false;

	/**
	 * Whether the field is animated or not.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $animated = true;

	/**
	 * The color of the field
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $color;

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.meter';

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'active':
			case 'width':
			case 'animated':
			case 'color':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'width':
			case 'color':
				$this->$name = (string) $value;
				break;

			case 'active':
				$value = (string) $value;
				$this->active = ($value === 'true' || $value === $name ||
$value === '1');
				break;

			case 'animated':
				$value = (string) $value;
				$this->animated = !($value === 'false' || $value ===
'off' || $value === '0');
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->width = isset($this->element['width']) ? (string)
$this->element['width'] : '';
			$this->color = isset($this->element['color']) ? (string)
$this->element['color'] : '';

			$active       = (string) $this->element['active'];
			$this->active = ($active == 'true' || $active ==
'on' || $active == '1');

			$animated       = (string) $this->element['animated'];
			$this->animated = !($animated == 'false' || $animated ==
'off' || $animated == '0');
		}

		return $return;
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.2
	 */
	protected function getInput()
	{
		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.5
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Initialize some field attributes.
		$extraData = array(
			'width'    => $this->width,
			'color'    => $this->color,
			'animated' => $this->animated,
			'active'   => $this->active,
			'max'      => $this->max,
			'min'      => $this->min,
			'step'     => $this->step,
		);

		return array_merge($data, $extraData);
	}
}
number.php000064400000011463151156422250006555 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Provides a one line text box with up-down handles to set a number in the
field.
 *
 * @link   http://www.w3.org/TR/html-markup/input.text.html#input.text
 * @since  3.2
 */
class JFormFieldNumber extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $type = 'Number';

	/**
	 * The allowable maximum value of the field.
	 *
	 * @var    float
	 * @since  3.2
	 */
	protected $max = null;

	/**
	 * The allowable minimum value of the field.
	 *
	 * @var    float
	 * @since  3.2
	 */
	protected $min = null;

	/**
	 * The step by which value of the field increased or decreased.
	 *
	 * @var    float
	 * @since  3.2
	 */
	protected $step = 0;

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.number';

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'max':
			case 'min':
			case 'step':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'step':
			case 'min':
			case 'max':
				$this->$name = (float) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			// It is better not to force any default limits if none is specified
			$this->max  = isset($this->element['max']) ? (float)
$this->element['max'] : null;
			$this->min  = isset($this->element['min']) ? (float)
$this->element['min'] : null;
			$this->step = isset($this->element['step']) ? (float)
$this->element['step'] : 1;
		}

		return $return;
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.2
	 */
	protected function getInput()
	{
		if ($this->element['useglobal'])
		{
			$component =
JFactory::getApplication()->input->getCmd('option');

			// Get correct component for menu items
			if ($component == 'com_menus')
			{
				$link      = $this->form->getData()->get('link');
				$uri       = new JUri($link);
				$component = $uri->getVar('option',
'com_menus');
			}

			$params = JComponentHelper::getParams($component);
			$value  = $params->get($this->fieldname);

			// Try with global configuration
			if (is_null($value))
			{
				$value = JFactory::getConfig()->get($this->fieldname);
			}

			// Try with menu configuration
			if (is_null($value) &&
JFactory::getApplication()->input->getCmd('option') ==
'com_menus')
			{
				$value =
JComponentHelper::getParams('com_menus')->get($this->fieldname);
			}

			if (!is_null($value))
			{
				$value = (string) $value;

				$this->hint = JText::sprintf('JGLOBAL_USE_GLOBAL_VALUE',
$value);
			}
		}

		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.7
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Initialize some field attributes.
		$extraData = array(
			'max'   => $this->max,
			'min'   => $this->min,
			'step'  => $this->step,
			'value' => $this->value,
		);

		return array_merge($data, $extraData);
	}
}
password.php000064400000010655151156422250007131 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Text field for passwords
 *
 * @link  
http://www.w3.org/TR/html-markup/input.password.html#input.password
 * @note   Two password fields may be validated as matching using
JFormRuleEquals
 * @since  1.7.0
 */
class JFormFieldPassword extends JFormField
{
	/**
	 * Attach an unlock button and disable the input field,
	 * also remove the value from the output.
	 *
	 * @var    boolean
	 * @since  3.9.24
	 */
	protected $lock = false;

	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Password';

	/**
	 * The threshold of password field.
	 *
	 * @var    integer
	 * @since  3.2
	 */
	protected $threshold = 66;

	/**
	 * The allowable maxlength of password.
	 *
	 * @var    integer
	 * @since  3.2
	 */
	protected $maxLength;

	/**
	 * Whether to attach a password strength meter or not.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $meter = false;

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.password';

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'lock':
			case 'threshold':
			case 'maxLength':
			case 'meter':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		$value = (string) $value;

		switch ($name)
		{
			case 'maxLength':
			case 'threshold':
				$this->$name = $value;
				break;

			case 'lock':
			case 'meter':
				$this->$name = ($value === 'true' || $value === $name ||
$value === '1');
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$lock       = (string) $this->element['lock'];
			$this->lock = ($lock == 'true' || $lock == 'on'
|| $lock == '1');

			$this->maxLength = $this->element['maxlength'] ? (int)
$this->element['maxlength'] : 99;
			$this->threshold = $this->element['threshold'] ? (int)
$this->element['threshold'] : 66;

			$meter       = (string) $this->element['strengthmeter'];
			$this->meter = ($meter == 'true' || $meter ==
'on' || $meter == '1');
		}

		return $return;
	}

	/**
	 * Method to get the field input markup for password.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.7
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Initialize some field attributes.
		$extraData = array(
			'lock'      => $this->lock,
			'maxLength' => $this->maxLength,
			'meter'     => $this->meter,
			'threshold' => $this->threshold,
		);

		return array_merge($data, $extraData);
	}
}
plugins.php000064400000010344151156422250006743 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Framework.
 *
 * @since  2.5.0
 */
class JFormFieldPlugins extends JFormFieldList
{
	/**
	 * The field type.
	 *
	 * @var    string
	 * @since  2.5.0
	 */
	protected $type = 'Plugins';

	/**
	 * The path to folder for plugins.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $folder;

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'folder':
				return $this->folder;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'folder':
				$this->folder = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->folder = (string) $this->element['folder'];
		}

		return $return;
	}

	/**
	 * Method to get a list of options for a list input.
	 *
	 * @return	array  An array of JHtml options.
	 *
	 * @since   2.5.0
	 */
	protected function getOptions()
	{
		$folder        = $this->folder;
		$parentOptions = parent::getOptions();

		if (!empty($folder))
		{
			// Get list of plugins
			$db    = JFactory::getDbo();
			$query = $db->getQuery(true)
				->select('element AS value, name AS text')
				->from('#__extensions')
				->where('folder = ' . $db->quote($folder))
				->where('enabled = 1')
				->order('ordering, name');

			if ((string) $this->element['useaccess'] ===
'true')
			{
				$groups = implode(',',
JFactory::getUser()->getAuthorisedViewLevels());
				$query->where($db->quoteName('access') . ' IN
(' . $groups . ')');
			}

			$options   = $db->setQuery($query)->loadObjectList();
			$lang      = JFactory::getLanguage();
			$useGlobal = $this->element['useglobal'];

			if ($useGlobal)
			{
				$globalValue = JFactory::getConfig()->get($this->fieldname);
			}

			foreach ($options as $i => $item)
			{
				$source    = JPATH_PLUGINS . '/' . $folder . '/' .
$item->value;
				$extension = 'plg_' . $folder . '_' .
$item->value;
				$lang->load($extension . '.sys', JPATH_ADMINISTRATOR,
null, false, true) || $lang->load($extension . '.sys',
$source, null, false, true);
				$options[$i]->text = JText::_($item->text);

				// If we are using useglobal update the use global value text with the
plugin text.
				if ($useGlobal && isset($parentOptions[0]) &&
$item->value === $globalValue)
				{
					$text                   = JText::_($extension);
					$parentOptions[0]->text =
JText::sprintf('JGLOBAL_USE_GLOBAL_VALUE', ($text ===
'' || $text === $extension ? $item->value : $text));
				}
			}
		}
		else
		{
			JLog::add(JText::_('JFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY'),
JLog::WARNING, 'jerror');
		}

		return array_merge($parentOptions, $options);
	}
}
predefinedlist.php000064400000003651151156422250010266 0ustar00<?php
/**
 * @package     Joomla.Libraries
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field to load a list of predefined values
 *
 * @since  3.2
 */
abstract class JFormFieldPredefinedList extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $type = 'PredefinedList';

	/**
	 * Cached array of the category items.
	 *
	 * @var    array
	 * @since  3.2
	 */
	protected static $options = array();

	/**
	 * Available predefined options
	 *
	 * @var  array
	 * @since  3.2
	 */
	protected $predefinedOptions = array();

	/**
	 * Translate options labels ?
	 *
	 * @var  boolean
	 * @since  3.2
	 */
	protected $translate = true;

	/**
	 * Method to get the options to populate list
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   3.2
	 */
	protected function getOptions()
	{
		// Hash for caching
		$hash = md5($this->element);
		$type = strtolower($this->type);

		if (!isset(static::$options[$type][$hash]) &&
!empty($this->predefinedOptions))
		{
			static::$options[$type][$hash] = parent::getOptions();

			$options = array();

			// Allow to only use specific values of the predefined list
			$filter = isset($this->element['filter']) ?
explode(',', $this->element['filter']) : array();

			foreach ($this->predefinedOptions as $value => $text)
			{
				$val = (string) $value;
	
				if (empty($filter) || in_array($val, $filter, true))
				{
					$text = $this->translate ? JText::_($text) : $text;

					$options[] = (object) array(
						'value' => $value,
						'text'  => $text,
					);
				}
			}

			static::$options[$type][$hash] =
array_merge(static::$options[$type][$hash], $options);
		}

		return static::$options[$type][$hash];
	}
}
radio.php000064400000002761151156422250006364 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Provides radio button inputs
 *
 * @link  
http://www.w3.org/TR/html-markup/command.radio.html#command.radio
 * @since  1.7.0
 */
class JFormFieldRadio extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Radio';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.5
	 */
	protected $layout = 'joomla.form.field.radio';

	/**
	 * Method to get the radio button field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		if (empty($this->layout))
		{
			throw new UnexpectedValueException(sprintf('%s has no layout
assigned.', $this->name));
		}

		return
$this->getRenderer($this->layout)->render($this->getLayoutData());
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since   3.5
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		$extraData = array(
			'options' => $this->getOptions(),
			'value'   => (string) $this->value,
		);

		return array_merge($data, $extraData);
	}
}
repeatable.php000064400000013154151156422250007370 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Display a JSON loaded window with a repeatable set of sub fields
 *
 * @since       3.2
 *
 * @deprecated  4.0  Use JFormFieldSubform
 */
class JFormFieldRepeatable extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $type = 'Repeatable';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.2
	 */
	protected function getInput()
	{
		JLog::add('JFormFieldRepeatable is deprecated. Use JFormFieldSubform
instead.', JLog::WARNING, 'deprecated');

		// Initialize variables.
		$subForm = new JForm($this->name, array('control' =>
'jform'));
		$xml = $this->element->children()->asXml();
		$subForm->load($xml);

		// Needed for repeating modals in gmaps
		// @TODO: what and where???
		$subForm->repeatCounter = (int) @$this->form->repeatCounter;

		$children = $this->element->children();
		$subForm->setFields($children);

		// If a maximum value isn't set then we'll make the maximum
amount of cells a large number
		$maximum = $this->element['maximum'] ? (int)
$this->element['maximum'] : '999';

		// Build a Table
		$head_row_str = array();
		$body_row_str = array();
		$head_row_str[] = '<th></th>';
		$body_row_str[] = '<td><span class="sortable-handler
" style="cursor: move;"><span
class="icon-menu"
aria-hidden="true"></span></span></td>';
		foreach ($subForm->getFieldset() as $field)
		{
			// Reset name to simple
			$field->name = (string) $field->element['name'];

			// Build heading
			$head_row_str[] = '<th>' .
strip_tags($field->getLabel($field->name));
			$head_row_str[] = '<br /><small
style="font-weight:normal">' .
JText::_($field->description) . '</small>';
			$head_row_str[] = '</th>';

			// Build body
			$body_row_str[] = '<td>' . $field->getInput() .
'</td>';
		}

		// Append buttons
		$head_row_str[] = '<th><div
class="btn-group"><a href="#" class="add btn
button btn-success" aria-label="' .
JText::_('JGLOBAL_FIELD_ADD') . '">';
		$head_row_str[] = '<span class="icon-plus"
aria-hidden="true"></span>
</a></div></th>';
		$body_row_str[] = '<td><div
class="btn-group">';
		$body_row_str[] = '<a class="add btn button
btn-success" aria-label="' .
JText::_('JGLOBAL_FIELD_ADD') . '">';
		$body_row_str[] = '<span class="icon-plus"
aria-hidden="true"></span> </a>';
		$body_row_str[] = '<a class="remove btn button
btn-danger" aria-label="' .
JText::_('JGLOBAL_FIELD_REMOVE') . '">';
		$body_row_str[] = '<span class="icon-minus"
aria-hidden="true"></span> </a>';
		$body_row_str[] = '</div></td>';

		// Put all table parts together
		$table = '<table id="' . $this->id .
'_table" class="adminlist ' .
$this->element['class'] . ' table
table-striped">'
					. '<thead><tr>' . implode("\n",
$head_row_str) . '</tr></thead>'
					. '<tbody><tr>' . implode("\n",
$body_row_str) . '</tr></tbody>'
				. '</table>';

		// And finally build a main container
		$str = array();
		$str[] = '<div id="' . $this->id .
'_container">';

		// Add the table to modal
		$str[] = '<div id="' . $this->id .
'_modal" class="modal hide">';
		$str[] = $table;
		$str[] = '<div class="modal-footer">';
		$str[] = '<button class="close-modal btn button
btn-link">' . JText::_('JCANCEL') .
'</button>';
		$str[] = '<button class="save-modal-data btn button
btn-primary">' . JText::_('JAPPLY') .
'</button>';
		$str[] = '</div>';

		// Close modal container
		$str[] = '</div>';

		// Close main container
		$str[] = '</div>';

		// Button for display the modal window
		$select = (string) $this->element['select'] ?
JText::_((string) $this->element['select']) :
JText::_('JLIB_FORM_BUTTON_SELECT');
		$icon = $this->element['icon'] ? '<span
class="icon-' . $this->element['icon'] .
'"></span> ' : '';
		$str[] = '<button class="open-modal btn"
id="' . $this->id . '_button" >' . $icon .
$select . '</button>';

		if (is_array($this->value))
		{
			$this->value = array_shift($this->value);
		}

		// Script params
		$data = array();
		$data[] = 'data-container="#' . $this->id .
'_container"';
		$data[] = 'data-modal-element="#' . $this->id .
'_modal"';
		$data[] = 'data-repeatable-element="table tbody tr"';
		$data[] = 'data-bt-add="a.add"';
		$data[] = 'data-bt-remove="a.remove"';
		$data[] = 'data-bt-modal-open="#' . $this->id .
'_button"';
		$data[] = 'data-bt-modal-close="button.close-modal"';
		$data[] =
'data-bt-modal-save-data="button.save-modal-data"';
		$data[] = 'data-maximum="' . $maximum .
'"';
		$data[] = 'data-input="#' . $this->id .
'"';

		// Hidden input, where the main value is
		$value = htmlspecialchars($this->value, ENT_COMPAT,
'UTF-8');
		$str[] = '<input type="hidden" name="' .
$this->name . '" id="' . $this->id . '"
value="' . $value
				. '"  class="form-field-repeatable" ' .
implode(' ', $data) . ' />';

		// Add scripts
		JHtml::_('bootstrap.framework');

		// Depends on jQuery UI
		JHtml::_('jquery.ui', array('core',
'sortable'));

		JHtml::_('script', 'jui/sortablelist.js',
array('version' => 'auto', 'relative'
=> true));
		JHtml::_('stylesheet', 'jui/sortablelist.css',
array('version' => 'auto', 'relative'
=> true));
		JHtml::_('script', 'system/repeatable.js',
array('framework' => true, 'version' =>
'auto', 'relative' => true));

		$javascript = 'jQuery(document).ready(function($) { $("#'
. $this->id . '_table tbody").sortable(); });';

		JFactory::getDocument()->addScriptDeclaration($javascript);

		return implode("\n", $str);
	}
}
rules.php000064400000034473151156422250006425 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Field for assigning permissions to groups for a given asset
 *
 * @see    JAccess
 * @since  1.7.0
 */
class JFormFieldRules extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Rules';

	/**
	 * The section.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $section;

	/**
	 * The component.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $component;

	/**
	 * The assetField.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $assetField;

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'section':
			case 'component':
			case 'assetField':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'section':
			case 'component':
			case 'assetField':
				$this->$name = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->section    = $this->element['section'] ? (string)
$this->element['section'] : '';
			$this->component  = $this->element['component'] ?
(string) $this->element['component'] : '';
			$this->assetField = $this->element['asset_field'] ?
(string) $this->element['asset_field'] : 'asset_id';
		}

		return $return;
	}

	/**
	 * Method to get the field input markup for Access Control Lists.
	 * Optionally can be associated with a specific component and section.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 * @todo:   Add access check.
	 */
	protected function getInput()
	{
		JHtml::_('bootstrap.tooltip');

		// Add Javascript for permission change
		JHtml::_('script', 'system/permissions.js',
array('version' => 'auto', 'relative'
=> true));

		// Load JavaScript message titles
		JText::script('ERROR');
		JText::script('WARNING');
		JText::script('NOTICE');
		JText::script('MESSAGE');

		// Add strings for JavaScript error translations.
		JText::script('JLIB_JS_AJAX_ERROR_CONNECTION_ABORT');
		JText::script('JLIB_JS_AJAX_ERROR_NO_CONTENT');
		JText::script('JLIB_JS_AJAX_ERROR_OTHER');
		JText::script('JLIB_JS_AJAX_ERROR_PARSE');
		JText::script('JLIB_JS_AJAX_ERROR_TIMEOUT');

		// Initialise some field attributes.
		$section    = $this->section;
		$assetField = $this->assetField;
		$component  = empty($this->component) ? 'root.1' :
$this->component;

		// Current view is global config?
		$isGlobalConfig = $component === 'root.1';

		// Get the actions for the asset.
		$actions = JAccess::getActions($component, $section);

		// Iterate over the children and add to the actions.
		foreach ($this->element->children() as $el)
		{
			if ($el->getName() == 'action')
			{
				$actions[] = (object) array(
					'name' => (string) $el['name'],
					'title' => (string) $el['title'],
					'description' => (string) $el['description'],
				);
			}
		}

		// Get the asset id.
		// Note that for global configuration, com_config injects asset_id = 1
into the form.
		$assetId       = $this->form->getValue($assetField);
		$newItem       = empty($assetId) && $isGlobalConfig === false
&& $section !== 'component';
		$parentAssetId = null;

		// If the asset id is empty (component or new item).
		if (empty($assetId))
		{
			// Get the component asset id as fallback.
			$db = JFactory::getDbo();
			$query = $db->getQuery(true)
				->select($db->quoteName('id'))
				->from($db->quoteName('#__assets'))
				->where($db->quoteName('name') . ' = ' .
$db->quote($component));

			$db->setQuery($query);

			$assetId = (int) $db->loadResult();

			/**
			 * @to do: incorrect info
			 * When creating a new item (not saving) it uses the calculated
permissions from the component (item <-> component <-> global
config).
			 * But if we have a section too (item <-> section(s) <->
component <-> global config) this is not correct.
			 * Also, currently it uses the component permission, but should use the
calculated permissions for achild of the component/section.
			 */
		}

		// If not in global config we need the parent_id asset to calculate
permissions.
		if (!$isGlobalConfig)
		{
			// In this case we need to get the component rules too.
			$db = JFactory::getDbo();

			$query = $db->getQuery(true)
				->select($db->quoteName('parent_id'))
				->from($db->quoteName('#__assets'))
				->where($db->quoteName('id') . ' = ' .
$assetId);

			$db->setQuery($query);

			$parentAssetId = (int) $db->loadResult();
		}

		// Full width format.

		// Get the rules for just this asset (non-recursive).
		$assetRules = JAccess::getAssetRules($assetId, false, false);

		// Get the available user groups.
		$groups = $this->getUserGroups();

		// Ajax request data.
		$ajaxUri =
JRoute::_('index.php?option=com_config&task=config.store&format=json&'
. JSession::getFormToken() . '=1');

		// Prepare output
		$html = array();

		// Description
		$html[] = '<p class="rule-desc">' .
JText::_('JLIB_RULES_SETTINGS_DESC') . '</p>';

		// Begin tabs
		$html[] = '<div class="tabbable tabs-left"
data-ajaxuri="' . $ajaxUri . '"
id="permissions-sliders">';

		// Building tab nav
		$html[] = '<ul class="nav nav-tabs">';

		foreach ($groups as $group)
		{
			// Initial Active Tab
			$active = (int) $group->value === 1 ? '
class="active"' : '';

			$html[] = '<li' . $active . '>';
			$html[] = '<a href="#permission-' . $group->value .
'" data-toggle="tab">';
			$html[] = JLayoutHelper::render('joomla.html.treeprefix',
array('level' => $group->level + 1)) . $group->text;
			$html[] = '</a>';
			$html[] = '</li>';
		}

		$html[] = '</ul>';

		$html[] = '<div class="tab-content">';

		// Start a row for each user group.
		foreach ($groups as $group)
		{
			// Initial Active Pane
			$active = (int) $group->value === 1 ? ' active' :
'';

			$html[] = '<div class="tab-pane' . $active .
'" id="permission-' . $group->value .
'">';
			$html[] = '<table class="table
table-striped">';
			$html[] = '<thead>';
			$html[] = '<tr>';

			$html[] = '<th class="actions"
id="actions-th' . $group->value . '">';
			$html[] = '<span class="acl-action">' .
JText::_('JLIB_RULES_ACTION') . '</span>';
			$html[] = '</th>';

			$html[] = '<th class="settings"
id="settings-th' . $group->value . '">';
			$html[] = '<span class="acl-action">' .
JText::_('JLIB_RULES_SELECT_SETTING') .
'</span>';
			$html[] = '</th>';

			$html[] = '<th id="aclactionth' . $group->value .
'">';
			$html[] = '<span class="acl-action">' .
JText::_('JLIB_RULES_CALCULATED_SETTING') .
'</span>';
			$html[] = '</th>';

			$html[] = '</tr>';
			$html[] = '</thead>';
			$html[] = '<tbody>';

			// Check if this group has super user permissions
			$isSuperUserGroup = JAccess::checkGroup($group->value,
'core.admin');

			foreach ($actions as $action)
			{
				$html[] = '<tr>';
				$html[] = '<td headers="actions-th' .
$group->value . '">';
				$html[] = '<label for="' . $this->id .
'_' . $action->name . '_' . $group->value .
'" class="hasTooltip" title="'
					. JHtml::_('tooltipText', $action->title,
$action->description) . '">';
				$html[] = JText::_($action->title);
				$html[] = '</label>';
				$html[] = '</td>';

				$html[] = '<td headers="settings-th' .
$group->value . '">';

				$html[] = '<select onchange="sendPermissions.call(this,
event)" data-chosen="true" class="input-small
novalidate"'
					. ' name="' . $this->name . '[' .
$action->name . '][' . $group->value . ']"'
					. ' id="' . $this->id . '_' .
$action->name	. '_' . $group->value . '"'
					. ' title="' .
strip_tags(JText::sprintf('JLIB_RULES_SELECT_ALLOW_DENY_GROUP',
JText::_($action->title), trim($group->text))) .
'">';

				/**
				 * Possible values:
				 * null = not set means inherited
				 * false = denied
				 * true = allowed
				 */

				// Get the actual setting for the action for this group.
				$assetRule = $newItem === false ?
$assetRules->allow($action->name, $group->value) : null;

				// Build the dropdowns for the permissions sliders

				// The parent group has "Not Set", all children can rightly
"Inherit" from that.
				$html[] = '<option value=""' . ($assetRule ===
null ? ' selected="selected"' : '') .
'>'
					. JText::_(empty($group->parent_id) && $isGlobalConfig ?
'JLIB_RULES_NOT_SET' : 'JLIB_RULES_INHERITED') .
'</option>';
				$html[] = '<option value="1"' . ($assetRule ===
true ? ' selected="selected"' : '') .
'>' . JText::_('JLIB_RULES_ALLOWED')
					. '</option>';
				$html[] = '<option value="0"' . ($assetRule ===
false ? ' selected="selected"' : '') .
'>' . JText::_('JLIB_RULES_DENIED')
					. '</option>';

				$html[] = '</select>&#160; ';

				$html[] = '<span id="icon_' . $this->id .
'_' . $action->name . '_' . $group->value .
'"' . '></span>';
				$html[] = '</td>';

				// Build the Calculated Settings column.
				$html[] = '<td headers="aclactionth' .
$group->value . '">';

				$result = array();

				// Get the group, group parent id, and group global config recursive
calculated permission for the chosen action.
				$inheritedGroupRule            = JAccess::checkGroup((int)
$group->value, $action->name, $assetId);
				$inheritedGroupParentAssetRule = !empty($parentAssetId) ?
JAccess::checkGroup($group->value, $action->name, $parentAssetId) :
null;
				$inheritedParentGroupRule      = !empty($group->parent_id) ?
JAccess::checkGroup($group->parent_id, $action->name, $assetId) :
null;

				// Current group is a Super User group, so calculated setting is
"Allowed (Super User)".
				if ($isSuperUserGroup)
				{
					$result['class'] = 'label label-success';
					$result['text'] = '<span class="icon-lock
icon-white"></span>' .
JText::_('JLIB_RULES_ALLOWED_ADMIN');
				}
				// Not super user.
				else
				{
					// First get the real recursive calculated setting and add (Inherited)
to it.

					// If recursive calculated setting is "Denied" or null.
Calculated permission is "Not Allowed (Inherited)".
					if ($inheritedGroupRule === null || $inheritedGroupRule === false)
					{
						$result['class'] = 'label label-important';
						$result['text']  =
JText::_('JLIB_RULES_NOT_ALLOWED_INHERITED');
					}
					// If recursive calculated setting is "Allowed". Calculated
permission is "Allowed (Inherited)".
					else
					{
						$result['class'] = 'label label-success';
						$result['text']  =
JText::_('JLIB_RULES_ALLOWED_INHERITED');
					}

					// Second part: Overwrite the calculated permissions labels if there
is an explicit permission in the current group.

					/**
					 * @to do: incorrect info
					 * If a component has a permission that doesn't exists in global
config (ex: frontend editing in com_modules) by default
					 * we get "Not Allowed (Inherited)" when we should get
"Not Allowed (Default)".
					 */

					// If there is an explicit permission "Not Allowed".
Calculated permission is "Not Allowed".
					if ($assetRule === false)
					{
						$result['class'] = 'label label-important';
						$result['text']  =
JText::_('JLIB_RULES_NOT_ALLOWED');
					}
					// If there is an explicit permission is "Allowed".
Calculated permission is "Allowed".
					elseif ($assetRule === true)
					{
						$result['class'] = 'label label-success';
						$result['text']  =
JText::_('JLIB_RULES_ALLOWED');
					}

					// Third part: Overwrite the calculated permissions labels for special
cases.

					// Global configuration with "Not Set" permission.
Calculated permission is "Not Allowed (Default)".
					if (empty($group->parent_id) && $isGlobalConfig === true
&& $assetRule === null)
					{
						$result['class'] = 'label label-important';
						$result['text']  =
JText::_('JLIB_RULES_NOT_ALLOWED_DEFAULT');
					}

					/**
					 * Component/Item with explicit "Denied" permission at
parent Asset (Category, Component or Global config) configuration.
					 * Or some parent group has an explicit "Denied".
					 * Calculated permission is "Not Allowed (Locked)".
					 */
					elseif ($inheritedGroupParentAssetRule === false ||
$inheritedParentGroupRule === false)
					{
						$result['class'] = 'label label-important';
						$result['text']  = '<span class="icon-lock
icon-white"></span>' .
JText::_('JLIB_RULES_NOT_ALLOWED_LOCKED');
					}
				}

				$html[] = '<span class="' .
$result['class'] . '">' .
$result['text'] . '</span>';
				$html[] = '</td>';
				$html[] = '</tr>';
			}

			$html[] = '</tbody>';
			$html[] = '</table></div>';
		}

		$html[] = '</div></div>';
		$html[] = '<div class="clr"></div>';
		$html[] = '<div class="alert">';

		if ($section === 'component' || !$section)
		{
			$html[] = JText::_('JLIB_RULES_SETTING_NOTES');
		}
		else
		{
			$html[] = JText::_('JLIB_RULES_SETTING_NOTES_ITEM');
		}

		$html[] = '</div>';

		return implode("\n", $html);
	}

	/**
	 * Get a list of the user groups.
	 *
	 * @return  array
	 *
	 * @since   1.7.0
	 */
	protected function getUserGroups()
	{
		$options = JHelperUsergroups::getInstance()->getAll();

		foreach ($options as &$option)
		{
			$option->value = $option->id;
			$option->text  = $option->title;
		}

		return array_values($options);
	}
}
sessionhandler.php000064400000002170151156422250010301 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Form Field class for the Joomla Platform.
 * Provides a select list of session handler options.
 *
 * @since  1.7.0
 */
class JFormFieldSessionHandler extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'SessionHandler';

	/**
	 * Method to get the session handler field options.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.0
	 */
	protected function getOptions()
	{
		$options = array();

		// Get the options from JSession.
		foreach (JSession::getStores() as $store)
		{
			$options[] = JHtml::_('select.option', $store,
JText::_('JLIB_FORM_VALUE_SESSION_' . $store), 'value',
'text');
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}
}
spacer.php000064400000006403151156422250006540 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Provides spacer markup to be used in form layouts.
 *
 * @since  1.7.0
 */
class JFormFieldSpacer extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Spacer';

	/**
	 * Method to get the field input markup for a spacer.
	 * The spacer does not have accept input.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		return ' ';
	}

	/**
	 * Method to get the field label markup for a spacer.
	 * Use the label text or name from the XML element as the spacer or
	 * Use a hr="true" to automatically generate plain hr markup
	 *
	 * @return  string  The field label markup.
	 *
	 * @since   1.7.0
	 */
	protected function getLabel()
	{
		$html = array();
		$class = !empty($this->class) ? ' class="' .
$this->class . '"' : '';
		$html[] = '<span class="spacer">';
		$html[] = '<span class="before"></span>';
		$html[] = '<span' . $class . '>';

		if ((string) $this->element['hr'] == 'true')
		{
			$html[] = '<hr' . $class . ' />';
		}
		else
		{
			$label = '';

			// Get the label text from the XML element, defaulting to the element
name.
			$text = $this->element['label'] ? (string)
$this->element['label'] : (string)
$this->element['name'];
			$text = $this->translateLabel ? JText::_($text) : $text;

			// Build the class for the label.
			$class = !empty($this->description) ? 'hasPopover' :
'';
			$class = $this->required == true ? $class . ' required' :
$class;

			// Add the opening label tag and main attributes attributes.
			$label .= '<label id="' . $this->id .
'-lbl" class="' . $class . '"';

			// If a description is specified, use it to build a tooltip.
			if (!empty($this->description))
			{
				JHtml::_('bootstrap.popover');
				$label .= ' title="' . htmlspecialchars(trim($text,
':'), ENT_COMPAT, 'UTF-8') . '"';
				$label .= ' data-content="' . htmlspecialchars(
					$this->translateDescription ? JText::_($this->description) :
$this->description,
					ENT_COMPAT,
					'UTF-8'
				) . '"';

				if (JFactory::getLanguage()->isRtl())
				{
					$label .= ' data-placement="left"';
				}
			}

			// Add the label text and closing tag.
			$label .= '>' . $text . '</label>';
			$html[] = $label;
		}

		$html[] = '</span>';
		$html[] = '<span class="after"></span>';
		$html[] = '</span>';

		return implode('', $html);
	}

	/**
	 * Method to get the field title.
	 *
	 * @return  string  The field title.
	 *
	 * @since   1.7.0
	 */
	protected function getTitle()
	{
		return $this->getLabel();
	}

	/**
	 * Method to get a control group with label and input.
	 *
	 * @param   array  $options  Options to be passed into the rendering of
the field
	 *
	 * @return  string  A string containing the html for the control group
	 *
	 * @since   3.7.3
	 */
	public function renderField($options = array())
	{
		$options['class'] = empty($options['class']) ?
'field-spacer' : $options['class'] . '
field-spacer';

		return parent::renderField($options);
	}
}
sql.php000064400000016204151156422250006062 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('list');

/**
 * Supports a custom SQL select list
 *
 * @since  1.7.0
 */
class JFormFieldSQL extends JFormFieldList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	public $type = 'SQL';

	/**
	 * The keyField.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $keyField;

	/**
	 * The valueField.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $valueField;

	/**
	 * The translate.
	 *
	 * @var    boolean
	 * @since  3.2
	 */
	protected $translate = false;

	/**
	 * The query.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $query;

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'keyField':
			case 'valueField':
			case 'translate':
			case 'query':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'keyField':
			case 'valueField':
			case 'translate':
			case 'query':
				$this->$name = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			// Check if its using the old way
			$this->query = (string) $this->element['query'];

			if (empty($this->query))
			{
				// Get the query from the form
				$query    = array();
				$defaults = array();

				$sql_select = (string) $this->element['sql_select'];
				$sql_from   = (string) $this->element['sql_from'];

				if ($sql_select && $sql_from)
				{
					$query['select'] = $sql_select;
					$query['from']   = $sql_from;
					$query['join']   = (string)
$this->element['sql_join'];
					$query['where']  = (string)
$this->element['sql_where'];
					$query['group']  = (string)
$this->element['sql_group'];
					$query['order']  = (string)
$this->element['sql_order'];

					// Get the filters
					$filters = isset($this->element['sql_filter']) ?
explode(',', $this->element['sql_filter']) :
'';

					// Get the default value for query if empty
					if (is_array($filters))
					{
						foreach ($filters as $filter)
						{
							$name   = "sql_default_{$filter}";
							$attrib = (string) $this->element[$name];

							if (!empty($attrib))
							{
								$defaults[$filter] = $attrib;
							}
						}
					}

					// Process the query
					$this->query = $this->processQuery($query, $filters, $defaults);
				}
			}

			$this->keyField   = (string) $this->element['key_field']
?: 'value';
			$this->valueField = (string)
$this->element['value_field'] ?: (string)
$this->element['name'];
			$this->translate  = (string) $this->element['translate']
?: false;
			$this->header     = (string) $this->element['header'] ?:
false;
		}

		return $return;
	}

	/**
	 * Method to process the query from form.
	 *
	 * @param   array   $conditions  The conditions from the form.
	 * @param   string  $filters     The columns to filter.
	 * @param   array   $defaults    The defaults value to set if condition is
empty.
	 *
	 * @return  JDatabaseQuery  The query object.
	 *
	 * @since   3.5
	 */
	protected function processQuery($conditions, $filters, $defaults)
	{
		// Get the database object.
		$db = JFactory::getDbo();

		// Get the query object
		$query = $db->getQuery(true);

		// Select fields
		$query->select($conditions['select']);

		// From selected table
		$query->from($conditions['from']);

		// Join over the groups
		if (!empty($conditions['join']))
		{
			$query->join('LEFT', $conditions['join']);
		}

		// Where condition
		if (!empty($conditions['where']))
		{
			$query->where($conditions['where']);
		}

		// Group by
		if (!empty($conditions['group']))
		{
			$query->group($conditions['group']);
		}

		// Process the filters
		if (is_array($filters))
		{
			$html_filters =
JFactory::getApplication()->getUserStateFromRequest($this->context .
'.filter', 'filter', array(), 'array');

			foreach ($filters as $k => $value)
			{
				if (!empty($html_filters[$value]))
				{
					$escape = $db->quote($db->escape($html_filters[$value]), false);

					$query->where("{$value} = {$escape}");
				}
				elseif (!empty($defaults[$value]))
				{
					$escape = $db->quote($db->escape($defaults[$value]), false);

					$query->where("{$value} = {$escape}");
				}
			}
		}

		// Add order to query
		if (!empty($conditions['order']))
		{
			$query->order($conditions['order']);
		}

		return $query;
	}

	/**
	 * Method to get the custom field options.
	 * Use the query attribute to supply a query to generate the list.
	 *
	 * @return  array  The field option objects.
	 *
	 * @since   1.7.0
	 */
	protected function getOptions()
	{
		$options = array();

		// Initialize some field attributes.
		$key   = $this->keyField;
		$value = $this->valueField;
		$header = $this->header;

		if ($this->query)
		{
			// Get the database object.
			$db = JFactory::getDbo();

			// Set the query and get the result list.
			$db->setQuery($this->query);

			try
			{
				$items = $db->loadObjectlist();
			}
			catch (JDatabaseExceptionExecuting $e)
			{
				JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'),
'error');
			}
		}

		// Add header.
		if (!empty($header))
		{
			$header_title = JText::_($header);
			$options[] = JHtml::_('select.option', '',
$header_title);
		}

		// Build the field options.
		if (!empty($items))
		{
			foreach ($items as $item)
			{
				if ($this->translate == true)
				{
					$options[] = JHtml::_('select.option', $item->$key,
JText::_($item->$value));
				}
				else
				{
					$options[] = JHtml::_('select.option', $item->$key,
$item->$value);
				}
			}
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}
}
tel.php000064400000003133151156422250006044 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('text');

/**
 * Form Field class for the Joomla Platform.
 * Supports a text field telephone numbers.
 *
 * @link   http://www.w3.org/TR/html-markup/input.tel.html
 * @see    JFormRuleTel for telephone number validation
 * @see    JHtmlTel for rendering of telephone numbers
 * @since  1.7.0
 */
class JFormFieldTel extends JFormFieldText
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Tel';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7.0
	 */
	protected $layout = 'joomla.form.field.tel';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.2
	 */
	protected function getInput()
	{
		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.7.0
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Initialize some field attributes.
		$maxLength    = !empty($this->maxLength) ? '
maxlength="' . $this->maxLength . '"' :
'';

		$extraData = array(
			'maxLength' => $maxLength,
		);

		return array_merge($data, $extraData);
	}
}
textarea.php000064400000010150151156422250007072 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Supports a multi line area for entry of plain text
 *
 * @link   http://www.w3.org/TR/html-markup/textarea.html#textarea
 * @since  1.7.0
 */
class JFormFieldTextarea extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Textarea';

	/**
	 * The number of rows in textarea.
	 *
	 * @var    mixed
	 * @since  3.2
	 */
	protected $rows;

	/**
	 * The number of columns in textarea.
	 *
	 * @var    mixed
	 * @since  3.2
	 */
	protected $columns;

	/**
	 * The maximum number of characters in textarea.
	 *
	 * @var    mixed
	 * @since  3.4
	 */
	protected $maxlength;

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.textarea';

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'rows':
			case 'columns':
			case 'maxlength':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'rows':
			case 'columns':
			case 'maxlength':
				$this->$name = (int) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->rows      = isset($this->element['rows']) ? (int)
$this->element['rows'] : false;
			$this->columns   = isset($this->element['cols']) ? (int)
$this->element['cols'] : false;
			$this->maxlength = isset($this->element['maxlength']) ?
(int) $this->element['maxlength'] : false;
		}

		return $return;
	}

	/**
	 * Method to get the textarea field input markup.
	 * Use the rows and columns attributes to specify the dimensions of the
area.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.7
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Initialize some field attributes.
		$columns      = $this->columns ? ' cols="' .
$this->columns . '"' : '';
		$rows         = $this->rows ? ' rows="' .
$this->rows . '"' : '';
		$maxlength    = $this->maxlength ? ' maxlength="' .
$this->maxlength . '"' : '';

		$extraData = array(
			'maxlength'    => $maxlength,
			'rows'         => $rows,
			'columns'      => $columns
		);

		return array_merge($data, $extraData);
	}
}
timezone.php000064400000007531151156422250007120 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('groupedlist');

/**
 * Form Field class for the Joomla Platform.
 *
 * @since  1.7.0
 */
class JFormFieldTimezone extends JFormFieldGroupedList
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Timezone';

	/**
	 * The list of available timezone groups to use.
	 *
	 * @var    array
	 * @since  1.7.0
	 */
	protected static $zones = array('Africa', 'America',
'Antarctica', 'Arctic', 'Asia',
'Atlantic', 'Australia', 'Europe',
'Indian', 'Pacific');

	/**
	 * The keyField of timezone field.
	 *
	 * @var    integer
	 * @since  3.2
	 */
	protected $keyField;

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.2
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'keyField':
				return $this->keyField;
		}

		return parent::__get($name);
	}

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'keyField':
				$this->keyField = (string) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.2
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->keyField = (string) $this->element['key_field'];
		}

		return $return;
	}

	/**
	 * Method to get the time zone field option groups.
	 *
	 * @return  array  The field option objects as a nested array in groups.
	 *
	 * @since   1.7.0
	 */
	protected function getGroups()
	{
		$groups = array();

		// Get the list of time zones from the server.
		$zones = DateTimeZone::listIdentifiers();

		// Build the group lists.
		foreach ($zones as $zone)
		{
			// Time zones not in a group we will ignore.
			if (strpos($zone, '/') === false)
			{
				continue;
			}

			// Get the group/locale from the timezone.
			list ($group, $locale) = explode('/', $zone, 2);

			// Only use known groups.
			if (in_array($group, self::$zones))
			{
				// Initialize the group if necessary.
				if (!isset($groups[$group]))
				{
					$groups[$group] = array();
				}

				// Only add options where a locale exists.
				if (!empty($locale))
				{
					$groups[$group][$zone] = JHtml::_('select.option', $zone,
str_replace('_', ' ', $locale), 'value',
'text', false);
				}
			}
		}

		// Sort the group lists.
		ksort($groups);

		foreach ($groups as &$location)
		{
			sort($location);
		}

		// Merge any additional groups in the XML definition.
		$groups = array_merge(parent::getGroups(), $groups);

		return $groups;
	}
}
url.php000064400000003446151156422250006071 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

JFormHelper::loadFieldClass('text');

/**
 * Form Field class for the Joomla Platform.
 * Supports a URL text field
 *
 * @link   http://www.w3.org/TR/html-markup/input.url.html#input.url
 * @see    JFormRuleUrl for validation of full urls
 * @since  1.7.0
 */
class JFormFieldUrl extends JFormFieldText
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Url';

	/**
	 * Name of the layout being used to render the field
	 *
	 * @var    string
	 * @since  3.7
	 */
	protected $layout = 'joomla.form.field.url';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.1.2 (CMS)
	 */
	protected function getInput()
	{
		// Trim the trailing line in the layout file
		return
rtrim($this->getRenderer($this->layout)->render($this->getLayoutData()),
PHP_EOL);
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since 3.7
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		// Initialize some field attributes.
		$maxLength    = !empty($this->maxLength) ? '
maxlength="' . $this->maxLength . '"' :
'';

		// Note that the input type "url" is suitable only for external
URLs, so if internal URLs are allowed
		// we have to use the input type "text" instead.
		$inputType    = $this->element['relative'] ?
'type="text"' : 'type="url"';

		$extraData = array(
			'maxLength' => $maxLength,
			'inputType' => $inputType,
		);

		return array_merge($data, $extraData);
	}
}
usergroup.php000064400000004572151156422250007323 0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Form
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Form Field class for the Joomla Platform.
 * Supports a nested checkbox field listing user groups.
 * Multiselect is available by default.
 *
 * @since       1.7.0
 * @deprecated  3.5
 */
class JFormFieldUsergroup extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.7.0
	 */
	protected $type = 'Usergroup';

	/**
	 * Method to get the user group field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.7.0
	 */
	protected function getInput()
	{
		JLog::add('JFormFieldUsergroup is deprecated. Use
JFormFieldUserGroupList instead.', JLog::WARNING,
'deprecated');

		$options = array();
		$attr = '';

		// Initialize some field attributes.
		$attr .= !empty($this->class) ? ' class="' .
$this->class . '"' : '';
		$attr .= $this->disabled ? ' disabled' : '';
		$attr .= $this->size ? ' size="' . $this->size .
'"' : '';
		$attr .= $this->multiple ? ' multiple' : '';
		$attr .= $this->required ? ' required
aria-required="true"' : '';
		$attr .= $this->autofocus ? ' autofocus' : '';

		// Initialize JavaScript field attributes.
		$attr .= !empty($this->onchange) ? ' onchange="' .
$this->onchange . '"' : '';
		$attr .= !empty($this->onclick) ? ' onclick="' .
$this->onclick . '"' : '';

		// Iterate through the children and build an array of options.
		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			$disabled = (string) $option['disabled'];
			$disabled = ($disabled == 'true' || $disabled ==
'disabled' || $disabled == '1');

			// Create a new option object based on the <option /> element.
			$tmp = JHtml::_(
				'select.option', (string) $option['value'],
trim((string) $option), 'value', 'text',
				$disabled
			);

			// Set some option attributes.
			$tmp->class = (string) $option['class'];

			// Set some JavaScript option attributes.
			$tmp->onclick = (string) $option['onclick'];

			// Add the option object to the result set.
			$options[] = $tmp;
		}

		return JHtml::_('access.usergroup', $this->name,
$this->value, $attr, $options, $this->id);
	}
}
filterfields.php000064400000014253151157550260007745 0ustar00<?php
/*
 *
------------------------------------------------------------------------
 * JA Filter Plugin - Reservation
 *
------------------------------------------------------------------------
 * Copyright (C) 2004-2016 J.O.O.M Solutions Co., Ltd. All Rights
Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites: http://www.joomlart.com - http://www.joomlancers.com
 * This file may not be redistributed in whole or significant part.
 *
------------------------------------------------------------------------
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

class JFormFieldFilterfields extends JFormFieldJaMegafilter_filterfields {

	protected $type = 'filterfields';
	protected $catOrdering = true;

	function getFieldGroups()
	{
		$class_methods = get_class_methods($this);
		$fl_array	  = preg_grep('/getJaMegafilterField(.*?)/',
$class_methods);

		$fieldgroups = array();
		foreach ($fl_array as $value) {
			$array_key			   = strtolower(substr($value, 20));
			$fieldgroups[$array_key] = $this->{$value}();
		}
		return $fieldgroups;
	}

	function getJaMegafilterFieldBaseField()
	{
		$basefield = array(
			array(
				"published" => 0,
				"sort" => 0,
				"field" => "name",
				"title" => JText::_("COM_JAMEGAFILTER_TITLE"),
				"name" => JText::_("COM_JAMEGAFILTER_TITLE"),
				"filter_type" => array(
					"value"
				)
			),

			array(
				"published" => 0,
				"sort" => 0,
				"field" => "attr.cat.value",
				"title" =>
JText::_("COM_JAMEGAFILTER_CATEGORY"),
				"name" =>
JText::_("COM_JAMEGAFILTER_CATEGORY"),
				"filter_type" => array(
					"single",
					"dropdown", "select",
					"multiple"
				)
			),

			array(
				"published" => 0,
				"sort" => 0,
				"field" => "hits",
				"title" => JText::_("COM_JAMEGAFILTER_HITS"),
				"name" => JText::_("COM_JAMEGAFILTER_HITS"),
				"filter_type" => array(
					"range"
				)
			),

			array(
				"published" => 0,
				"sort" => 0,
				"field" => "rating",
				"title" => JText::_("COM_JAMEGAFILTER_RATING"),
				"name" => JText::_("COM_JAMEGAFILTER_RATING"),
				"filter_type" => array(
					'rating', 'range'
				)
			),

			array(
				"published" => 0,
				"sort" => 0,
				"field" => "attr.tag.value",
				"title" => JText::_("COM_JAMEGAFILTER_TAG"),
				"name" => JText::_("COM_JAMEGAFILTER_TAG"),
				"filter_type" => array(
					"single",
					"dropdown", "select",
					"multiple"
				)
			),

			array(
				"published" => 0,
				"sort" => 0,
				"field" => "published_date",
				"title" =>
JText::_("COM_JAMEGAFILTER_PUBLISHED_DATE"),
				"name" =>
JText::_("COM_JAMEGAFILTER_PUBLISHED_DATE"),
				"filter_type" => array(
					"date"
				)
			),

			array(
				"published"=>0,
				"sort" => 0,
				"field"=> "created_date",
				"title"=>JText::_("COM_JAMEGAFILTER_CREATED_DATE"),
				"name"=>JText::_("COM_JAMEGAFILTER_CREATED_DATE"),
				"filter_type"=>array("date")
			),
			array(
				"published" => 0,
				"sort" => 0,
				"field" => "attr.author.value",
				"title" => JText::_("COM_JAMEGAFILTER_AUTHOR"),
				"name" => JText::_("COM_JAMEGAFILTER_AUTHOR"),
				"filter_type" => array(
					"single",
					"dropdown", "select",
					"multiple"
				)
			),
			array(
				"published"=>0,
				"sort" => 0,
				"field"=> "modified_date",
				"title"=>JText::_("COM_JAMEGAFILTER_MODIFIED_DATE"),
				"name"=>JText::_("COM_JAMEGAFILTER_MODIFIED_DATE"),
				"filter_type"=>array("date")
			),
			array(
				"published" => 0,
				"sort" => 0,
				"field" => "attr.featured.value",
				"title" =>
JText::_("COM_JAMEGAFILTER_FEATURED"),
				"name" =>
JText::_("COM_JAMEGAFILTER_FEATURED"),
				"filter_type" => array("single",
"dropdown", "select", "multiple")
			),
			array(
				"published" => 0,
				"sort" => 0,
				"field" => "attr.fulltext.value",
				"title" =>
JText::_('COM_JAMEGAFILTER_FULLTEXT'),
				"name" =>
JText::_('COM_JAMEGAFILTER_FULLTEXT'),
				"filter_type" => array("value")
			),
		);

		return $basefield;
	}

	function getJaMegafilterFieldCustomFields() {
		if (version_compare(JVERSION, '3.7', '<'))
			return;
		$customFields = array();
		require_once(JPATH_PLUGINS .
'/jamegafilter/reservation/helper.php');
		$helper = new ReservationFilterHelper();
		$fields = $helper->getCustomFields();
		if ($fields) {
			foreach ($fields as $field) {
				if ($field->type === 'repeatable') {

				} else {
					$customField = array(
						"published" => 0,
						"sort" => 0,
						"field" =>
'attr.ct'.$field->id.'.value',
						"title" => $field->title,
						"name" => $field->title,
					);

					switch ($field->type) {
						case 'text':
							$customField['filter_type'] = array('value',
'range', 'latlong', 'numberrange');
							break;
						case 'editor' :
						case 'textarea' :
						case 'url' :
							$customField['filter_type'] = array('value',
'range');
							break;
						case 'color' :
							$customField['filter_type'] = array('color');
							break;
						case 'calendar' :
							$customField['filter_type'] = array('date');
							break;
						case 'integer' :
							$customField['filter_type'] = array(
								'range',
								'single',
								'dropdown',
								'multiple',
								"size"
							);
							break;
						case 'media':
						case 'imagelist':
							$customField['filter_type'] = array('media');
							break;
						default :
							$customField['filter_type'] = array(
								"single",
								"dropdown",
								"select",
								"multiple",
								"size"
							);
							break;
					}
					$customFields[] = $customField;
				}
			}
		}

		return $customFields;
	}

	function hasCustomOrdering($field) {
		if ($field['field'] === 'attr.cat.value') {
			return true;
		}

		preg_match('/\d+/', $field['field'], $matches);
		if (!count($matches)) {
			return false;
		}

		$id = $matches[0];
		$db = JFactory::getDbo();
		$query = "SELECT `id` 
				FROM `#__fields` 
				WHERE `id` = $id
				AND `type` IN ('list', 'checkboxes')
				AND `state` = 1";
		$result = $db->setQuery($query)->loadResult();
		return !!$result;
	}
}
index.html000064400000000054151157550260006547 0ustar00<html><body
bgcolor="#FFFFFF"></body></html>reservationcat.php000064400000003120151157550260010311
0ustar00<?php
/**
 *
------------------------------------------------------------------------
 * JA Filter Plugin - Reservation
 *
------------------------------------------------------------------------
 * Copyright (C) 2004-2016 J.O.O.M Solutions Co., Ltd. All Rights
Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites: http://www.joomlart.com - http://www.joomlancers.com
 * This file may not be redistributed in whole or significant part.
 *
------------------------------------------------------------------------
 */
 
defined('_JEXEC') or die();
JLoader::register('ReservationFilterHelper', JPATH_PLUGINS .
'/jamegafilter/reservation/helper.php');

class JFormFieldreservationcat extends JFormField
{
    protected $type = 'reservationcat';

    protected function getInput()
    {
        $value = 0;
		if (!empty($this->value)) {
			$value = $this->value;
		}

		$helper = new ReservationFilterHelper;
		$items = $helper->getChildCategories();
		
		$html = '';
		$html = '<select class="form-select form-select-color-state
form-select-success valid form-control-success" name="'
      .$this->name.'">';
		$html .= '<option
value="0">'.JText::_('COM_JAMEGAFILTER_ALL_CATEGORIES').'</option>';
		foreach ($items as $item) {
			if ($item->published != '1')
				continue;
			$html .= '<option '.($value == $item->id ? '
selected="selected" ' : '').'
value="'.$item->id.'">'.str_repeat('.&nbsp;&nbsp;',
($item->level)).'|_.&nbsp;'.$item->title.'</option>';
		}
		$html.='</select>';
		return $html;
    }
}
fields.php000064400000010155151157655130006536 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.Fields
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die();

/**
 * Plug-in to show a custom field in eg an article
 * This uses the {fields ID} syntax
 *
 * @since  3.7.0
 */
class PlgContentFields extends JPlugin
{
	/**
	 * Plugin that shows a custom field
	 *
	 * @param   string  $context  The context of the content being passed to
the plugin.
	 * @param   object  &$item    The item object.  Note $article->text
is also available
	 * @param   object  &$params  The article params
	 * @param   int     $page     The 'page' number
	 *
	 * @return void
	 *
	 * @since  3.7.0
	 */
	public function onContentPrepare($context, &$item, &$params, $page
= 0)
	{
		// If the item has a context, overwrite the existing one
		if ($context == 'com_finder.indexer' &&
!empty($item->context))
		{
			$context = $item->context;
		}
		elseif ($context == 'com_finder.indexer')
		{
			// Don't run this plugin when the content is being indexed and we
have no real context
			return;
		}

		// Don't run if there is no text property (in case of bad calls) or
it is empty
		if (empty($item->text))
		{
			return;
		}

		// Simple performance check to determine whether bot should process
further
		if (strpos($item->text, 'field') === false)
		{
			return;
		}

		// Register FieldsHelper
		JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR .
'/components/com_fields/helpers/fields.php');

		// Prepare the text
		if (isset($item->text))
		{
			$item->text = $this->prepare($item->text, $context, $item);
		}

		// Prepare the intro text
		if (isset($item->introtext))
		{
			$item->introtext = $this->prepare($item->introtext, $context,
$item);
		}
	}

	/**
	 * Prepares the given string by parsing {field} and {fieldgroup} groups
and replacing them.
	 *
	 * @param   string  $string   The text to prepare
	 * @param   string  $context  The context of the content
	 * @param   object  $item     The item object
	 *
	 * @return string
	 *
	 * @since  3.8.1
	 */
	private function prepare($string, $context, $item)
	{
		// Search for {field ID} or {fieldgroup ID} tags and put the results into
$matches.
		$regex = '/{(field|fieldgroup)\s+(.*?)}/i';
		preg_match_all($regex, $string, $matches, PREG_SET_ORDER);

		if (!$matches)
		{
			return $string;
		}

		$parts = FieldsHelper::extract($context);

		if (count($parts) < 2)
		{
			return $string;
		}

		$context    = $parts[0] . '.' . $parts[1];
		$fields     = FieldsHelper::getFields($context, $item, true);
		$fieldsById = array();
		$groups     = array();

		// Rearranging fields in arrays for easier lookup later.
		foreach ($fields as $field)
		{
			$fieldsById[$field->id]     = $field;
			$groups[$field->group_id][] = $field;
		}

		foreach ($matches as $i => $match)
		{
			// $match[0] is the full pattern match, $match[1] is the type (field or
fieldgroup) and $match[2] the ID and optional the layout
			$explode = explode(',', $match[2]);
			$id      = (int) $explode[0];
			$output  = '';

			if ($match[1] == 'field' && $id)
			{
				if (isset($fieldsById[$id]))
				{
					$layout = !empty($explode[1]) ? trim($explode[1]) :
$fieldsById[$id]->params->get('layout',
'render');
					$output = FieldsHelper::render(
						$context,
						'field.' . $layout,
						array(
							'item'    => $item,
							'context' => $context,
							'field'   => $fieldsById[$id]
						)
					);
				}
			}
			else
			{
				if ($match[2] === '*')
				{
					$match[0]     = str_replace('*', '\*', $match[0]);
					$renderFields = $fields;
				}
				else
				{
					$renderFields = isset($groups[$id]) ? $groups[$id] : '';
				}

				if ($renderFields)
				{
					$layout = !empty($explode[1]) ? trim($explode[1]) :
'render';
					$output = FieldsHelper::render(
						$context,
						'fields.' . $layout,
						array(
							'item'    => $item,
							'context' => $context,
							'fields'  => $renderFields
						)
					);
				}
			}

			$string = preg_replace("|$match[0]|", addcslashes($output,
'\\$'), $string, 1);
		}

		return $string;
	}
}
fields.xml000064400000001622151157655130006546 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.7.0" type="plugin"
group="content" method="upgrade">
	<name>plg_content_fields</name>
	<author>Joomla! Project</author>
	<creationDate>February 2017</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_CONTENT_FIELDS_XML_DESCRIPTION</description>
	<files>
		<filename plugin="fields">fields.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_content_fields.ini</language>
		<language
tag="en-GB">en-GB.plg_content_fields.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
			</fieldset>
		</fields>
	</config>
</extension>
consentbox.php000064400000015201151160361750007443 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Content.confirmconsent
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

JFormHelper::loadFieldClass('Checkboxes');

/**
 * Consentbox Field class for the Confirm Consent Plugin.
 *
 * @since  3.9.1
 */
class JFormFieldConsentBox extends JFormFieldCheckboxes
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.9.1
	 */
	protected $type = 'ConsentBox';

	/**
	 * Flag to tell the field to always be in multiple values mode.
	 *
	 * @var    boolean
	 * @since  3.9.1
	 */
	protected $forceMultiple = false;

	/**
	 * The article ID.
	 *
	 * @var    integer
	 * @since  3.9.1
	 */
	protected $articleid;

	/**
	 * Method to set certain otherwise inaccessible properties of the form
field object.
	 *
	 * @param   string  $name   The property name for which to set the value.
	 * @param   mixed   $value  The value of the property.
	 *
	 * @return  void
	 *
	 * @since   3.9.1
	 */
	public function __set($name, $value)
	{
		switch ($name)
		{
			case 'articleid':
				$this->articleid = (int) $value;
				break;

			default:
				parent::__set($name, $value);
		}
	}

	/**
	 * Method to get certain otherwise inaccessible properties from the form
field object.
	 *
	 * @param   string  $name  The property name for which to get the value.
	 *
	 * @return  mixed  The property value or null.
	 *
	 * @since   3.9.1
	 */
	public function __get($name)
	{
		switch ($name)
		{
			case 'articleid':
				return $this->$name;
		}

		return parent::__get($name);
	}

	/**
	 * Method to attach a JForm object to the field.
	 *
	 * @param   SimpleXMLElement  $element  The SimpleXMLElement object
representing the `<field>` tag for the form field object.
	 * @param   mixed             $value    The form field value to validate.
	 * @param   string            $group    The field name group control
value. This acts as an array container for the field.
	 *                                      For example if the field has
name="foo" and the group value is set to "bar" then the
	 *                                      full field name would end up being
"bar[foo]".
	 *
	 * @return  boolean  True on success.
	 *
	 * @see     JFormField::setup()
	 * @since   3.9.1
	 */
	public function setup(SimpleXMLElement $element, $value, $group = null)
	{
		$return = parent::setup($element, $value, $group);

		if ($return)
		{
			$this->articleid = (int) $this->element['articleid'];
		}

		return $return;
	}

	/**
	 * Method to get the field label markup.
	 *
	 * @return  string  The field label markup.
	 *
	 * @since   3.9.1
	 */
	protected function getLabel()
	{
		if ($this->hidden)
		{
			return '';
		}

		$data = $this->getLayoutData();

		// Forcing the Alias field to display the tip below
		$position = $this->element['name'] == 'alias' ?
' data-placement="bottom" ' : '';

		// When we have an article let's add the modal and make the title
clickable
		if ($data['articleid'])
		{
			$attribs['data-toggle'] = 'modal';

			$data['label'] = HTMLHelper::_(
				'link',
				'#modal-' . $this->id,
				$data['label'],
				$attribs
			);
		}

		// Here mainly for B/C with old layouts. This can be done in the layouts
directly
		$extraData = array(
			'text'     => $data['label'],
			'for'      => $this->id,
			'classes'  => explode(' ',
$data['labelclass']),
			'position' => $position,
		);

		return
$this->getRenderer($this->renderLabelLayout)->render(array_merge($data,
$extraData));
	}

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   3.9.2
	 */
	protected function getInput()
	{
		$modalHtml  = '';
		$layoutData = $this->getLayoutData();

		if ($this->articleid)
		{
			$modalParams['title']  = $layoutData['label'];
			$modalParams['url']    = $this->getAssignedArticleUrl();
			$modalParams['height'] = 800;
			$modalParams['width']  = '100%';
			$modalHtml = HTMLHelper::_('bootstrap.renderModal',
'modal-' . $this->id, $modalParams);
		}

		return $modalHtml . parent::getInput();
	}

	/**
	 * Method to get the data to be passed to the layout for rendering.
	 *
	 * @return  array
	 *
	 * @since   3.9.1
	 */
	protected function getLayoutData()
	{
		$data = parent::getLayoutData();

		$extraData = array(
			'articleid' => (integer) $this->articleid,
		);

		return array_merge($data, $extraData);
	}

	/**
	 * Return the url of the assigned article based on the current user
language
	 *
	 * @return  string  Returns the link to the article
	 *
	 * @since   3.9.1
	 */
	private function getAssignedArticleUrl()
	{
		$db = Factory::getDbo();

		// Get the info from the article
		$query = $db->getQuery(true)
			->select($db->quoteName(array('id', 'catid',
'language')))
			->from($db->quoteName('#__content'))
			->where($db->quoteName('id') . ' = ' . (int)
$this->articleid);
		$db->setQuery($query);

		try
		{
			$article = $db->loadObject();
		}
		catch (JDatabaseExceptionExecuting $e)
		{
			// Something at the database layer went wrong
			return Route::_(
				'index.php?option=com_content&view=article&id='
				. $this->articleid . '&tmpl=component'
			);
		}

		if (!is_object($article))
		{
			// We have not found the article object lets show a 404 to the user
			return Route::_(
				'index.php?option=com_content&view=article&id='
				. $this->articleid . '&tmpl=component'
			);
		}

		// Register ContentHelperRoute
		JLoader::register('ContentHelperRoute', JPATH_BASE .
'/components/com_content/helpers/route.php');

		if (!Associations::isEnabled())
		{
			return Route::_(
				ContentHelperRoute::getArticleRoute(
					$article->id,
					$article->catid,
					$article->language
				) . '&tmpl=component'
			);
		}

		$associatedArticles =
Associations::getAssociations('com_content',
'#__content', 'com_content.item', $article->id);
		$currentLang        = Factory::getLanguage()->getTag();

		if (isset($associatedArticles) && $currentLang !==
$article->language && array_key_exists($currentLang,
$associatedArticles))
		{
			return Route::_(
				ContentHelperRoute::getArticleRoute(
					$associatedArticles[$currentLang]->id,
					$associatedArticles[$currentLang]->catid,
					$associatedArticles[$currentLang]->language
				) . '&tmpl=component'
			);
		}

		// Association is enabled but this article is not associated
		return Route::_(
			'index.php?option=com_content&view=article&id='
				. $article->id . '&catid=' . $article->catid
				. '&tmpl=component&lang=' . $article->language
		);
	}
}
calendar-locales/af.js000064400000001156151160614770010674
0ustar00window.JoomlaCalLocale = {
	today : "Vandag",
	weekend : [0, 6],
	wk : "wk",
	time : "Tyd:",
	days : ["Sondag", "Maandag", "Dinsdag",
"Woensdag", "Donnerdag", "Vrydag",
"Saterdag"],
	shortDays : ["So", "Ma", "Di",
"Wo", "Do", "Vr", "Sa"],
	months : ["Januarie", "Februarie", "Maart",
"April", "Mei", "Junie", "Julie",
"Augustus", "September", "Oktober",
"November", "Desember"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "Mei", "Jun", "Jul",
"Aug", "Sep", "Okt", "Nov",
"Des"],
	AM : "VM",
	PM : "NM",
	am : "vm",
	pm : "nm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Sluit",
	clear: "Stoor"
};
calendar-locales/ar.js000064400000001764151160614770010715
0ustar00window.JoomlaCalLocale = {
	today : "اليوم",
	weekend : [6, 5],
	wk : "الأسبوع",
	time : "الساعة:",
	days : ["الأحد", "الإثنين",
"الثلاثاء", "الأربعاء",
"الخميس", "الجمعة",
"السبت"],
	shortDays : ["الأحد", "الإثنين",
"الثلاثاء", "الأربعاء",
"الخميس", "الجمعة",
"السبت"],
	months : ["كانون الثّاني", "شباط",
"آذار", "نيسان", "أيّار",
"حزيران", "تمّوز", "آب",
"أيلول", "تشرين الأوّل",
"تشرين الثّاني", "كانون
الأوّل"],
	shortMonths : ["كانون الثّاني",
"شباط", "آذار", "نيسان",
"أيّار", "حزيران", "تمّوز",
"آب", "أيلول", "تشرين
الأوّل", "تشرين الثّاني", "كانون
الأوّل"],
	AM : "ق‌ظ",
	PM :  "ب‌ظ",
	am : "ق‌ظ",
	pm : "ب‌ظ",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "إغلاق",
	clear: "الغاء"
};calendar-locales/bg.js000064400000001462151160614770010676
0ustar00window.JoomlaCalLocale = {
	today : "Днес",
	weekend : [0, 6],
	wk : "седм",
	time : "Време:",
	days : ["Неделя", "Понеделник",
"Вторник", "Сряда",
"Четвъртък", "Петък",
"Събота"],
	shortDays : ["Нед", "Пон", "Вт",
"Ср", "Чет", "Пет",
"Съб"],
	months : ["Януари", "Февруари",
"Март", "Април", "Май",
"Юни", "Юли", "Август",
"Септември", "Октомври",
"Ноември", "Декември"],
	shortMonths : ["Ян", "Фев", "Мар",
"Апр", "Май", "Юни",
"Юли", "Авг", "Сеп",
"Окт", "Ное", "Дек"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Затвори",
	clear: "Изчисти"
};calendar-locales/bn.js000064400000002423151160614770010703
0ustar00window.JoomlaCalLocale = {
	today : "আজ",
	weekend : [0, 6],
	wk : "সপ্তাহ",
	time : "সময়:",
	days : ["রবিবার", "সোমবার",
"মঙ্গলবার", "বুধবার",
"বৃহস্পতিবার",
"শুক্রবার", "শনিবার"],
	shortDays : ["রবি", "সোম",
"মঙ্গল", "বুধ",
"বৃহস্পতি", "শুক্র",
"শনি"],
	months : ["জানুয়ারি",
"ফেব্রুয়ারি", "মার্চ",
"এপ্রিল", "মে", "জুন",
"জুলাই", "আগস্ট",
"সেপ্টেম্বর",
"অক্টোবর", "নভেম্বর",
"ডিসেম্বর"],
	shortMonths : ["জানুয়ারি",
"ফেব্রুয়ারি", "মার্চ",
"এপ্রিল", "মে", "জুন",
"জুলাই", "আগস্ট",
"সেপ্টেম্বর",
"অক্টোবর", "নভেম্বর",
"ডিসেম্বর"],
	AM : "পূর্বাহ্ণ",
	PM : "অপরাহ্ন",
	am : "পূর্বাহ্ণ",
	pm : "অপরাহ্ন",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "প্রস্থান",
	clear: "সংরক্ষণ"
};calendar-locales/bs.js000064400000001163151160614770010710
0ustar00window.JoomlaCalLocale = {
	today : "Danas",
	weekend : [0, 6],
	wk : "se",
	time : "Vrijeme:",
	days : ["Nedjelja", "Ponedjeljak", "Utorak",
"Srijeda", "Četvrtak", "Petak",
"Subota"],
	shortDays : ["Ned", "Pon", "Uto",
"Sri", "Čet", "Pet", "Sub"],
	months : ["Januar", "Februar", "Mart",
"April", "Maj", "Juni", "Juli",
"Avgust", "Septembar", "Oktobar",
"Novembar", "Decembar"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "Maj", "Jun", "Jul",
"Avg", "Sep", "Okt", "Nov",
"Dec"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Zatvori",
	clear: "Snimi"
};calendar-locales/ca.js000064400000001152151160614770010665
0ustar00window.JoomlaCalLocale = {
	today : "Avui",
	weekend : [0, 6],
	wk : "Setm",
	time : "Hora:",
	days : ["Diumenge", "Dilluns", "Dimarts",
"Dimecres", "Dijous", "Divendres",
"Dissabte"],
	shortDays : ["Du", "Dl", "Dm",
"Dx", "Dj", "Dv", "Ds"],
	months : ["Gener", "Febrer", "Març",
"Abril", "Maig", "Juny", "Juliol",
"Agost", "Setembre", "Octubre",
"Novembre", "Desembre"],
	shortMonths : ["Gen", "Feb", "Mar",
"Abr", "Mai", "Jun", "Jul",
"Ago", "Set", "Oct", "Nov",
"Des"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Tancar",
	clear: "Desar"
};
calendar-locales/cs.js000064400000001175151160614770010714
0ustar00window.JoomlaCalLocale = {
	today : "dnes",
	weekend : [0, 6],
	wk : "kt",
	time : "čas:",
	days : ["neděle", "pondělí", "úterý",
"středa", "čtvrtek", "pátek",
"sobota"],
	shortDays : ["ne", "po", "út",
"st", "čt", "pá", "so"],
	months : ["leden", "únor", "březen",
"duben", "květen", "červen",
"červenec", "srpen", "září",
"říjen", "listopad", "prosinec"],
	shortMonths : ["led", "úno", "bře",
"dub", "kvě", "čen", "čec",
"srp", "zář", "říj", "lis",
"pro"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "zavřít",
	clear: "vymazat"
};calendar-locales/cy.js000064400000001212151160614770010712
0ustar00window.JoomlaCalLocale = {
	today : "Heddiw",
	weekend : [0, 6],
	wk : "wy",
	time : "Amser:",
	days : ["Dydd Sul", "Dydd llun", "Dydd
Mawrth", "Dydd Mercher", "Dydd Iau", "Dydd
Gwener", "Dydd Sadwrn"],
	shortDays : ["Sul", "Llun", "Maw",
"Mer", "Iau", "Gwen", "Sad"],
	months : ["Ionawr", "Chwefror", "Mawrth",
"Ebrill", "Mai", "Mehefin",
"Gorffennaf", "Awst", "Medi",
"Hydref", "Tachwedd", "Rhagfyr"],
	shortMonths : ["Ion", "Chw", "Maw",
"Ebr", "Mai", "Meh", "Gor",
"Awst", "Medi", "Hyd", "Tach",
"Rhag"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Cau",
	clear: "Clirio"
};calendar-locales/da.js000064400000001152151160614770010666
0ustar00window.JoomlaCalLocale = {
	today : "I dag",
	weekend : [0, 6],
	wk : "uge",
	time : "Tid:",
	days : ["Søndag", "Mandag", "Tirsdag",
"Onsdag", "Torsdag", "Fredag",
"Lørdag"],
	shortDays : ["Søn", "Man", "Tir",
"Ons", "Tor", "Fre", "Lør"],
	months : ["Januar", "Februar", "Marts",
"April", "Maj", "Juni", "Juli",
"August", "September", "Oktober",
"November", "December"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "Maj", "Jun", "Jul",
"Aug", "Sep", "Okt", "Nov",
"Dec"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Luk",
	clear: "Nulstil"
};calendar-locales/date/gregorian/date-helper.js000064400000032004151160614770015366
0ustar00!(function(Date){
	'use strict';

	/****************** Gregorian dates ********************/
	/** Constants used for time computations */
	Date.SECOND = 1000 /* milliseconds */;
	Date.MINUTE = 60 * Date.SECOND;
	Date.HOUR   = 60 * Date.MINUTE;
	Date.DAY    = 24 * Date.HOUR;
	Date.WEEK   =  7 * Date.DAY;

	/** MODIFY ONLY THE MARKED PARTS OF THE METHODS **/
	/************ START *************/
	/** INTERFACE METHODS FOR THE CALENDAR PICKER **/

	/********************** *************************/
	/**************** SETTERS ***********************/
	/********************** *************************/

	/** Sets the date for the current date without h/m/s. */
	Date.prototype.setLocalDateOnly = function (dateType, date) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			var tmp = new Date(date);
			this.setDate(1);
			this.setFullYear(tmp.getFullYear());
			this.setMonth(tmp.getMonth());
			this.setDate(tmp.getDate());
		}
	};

	/** Sets the full date for the current date. */
	Date.prototype.setLocalDate = function (dateType, d) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			return this.setDate(d);
		}
	};

	/** Sets the month for the current date. */
	Date.prototype.setLocalMonth = function (dateType, m, d) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			if (d == undefined) this.getDate();
			return this.setMonth(m);
		}
	};

	/** Sets the year for the current date. */
	Date.prototype.setOtherFullYear = function(dateType, y) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			var date = new Date(this);
			date.setFullYear(y);
			if (date.getMonth() != this.getMonth()) this.setDate(28);
			return this.setUTCFullYear(y);
		}
	};

	/** Sets the year for the current date. */
	Date.prototype.setLocalFullYear = function (dateType, y) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			var date = new Date(this);
			date.setFullYear(y);
			if (date.getMonth() != this.getMonth()) this.setDate(28);
			return this.setFullYear(y);
		}
	};

	/********************** *************************/
	/**************** GETTERS ***********************/
	/********************** *************************/

	/** The number of days per week **/
	Date.prototype.getLocalWeekDays = function (dateType, y) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return 6;
		} else {
			return 6; // 7 days per week
		}
	};

	/** Returns the year for the current date. */
	Date.prototype.getOtherFullYear = function (dateType) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			return this.getFullYear();
		}
	};

	/** Returns the year for the current date. */
	Date.prototype.getLocalFullYear = function (dateType) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			return this.getFullYear();
		}
	};

	/** Returns the month the date. */
	Date.prototype.getLocalMonth = function (dateType) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			return this.getMonth();
		}
	};

	/** Returns the date. */
	Date.prototype.getLocalDate = function (dateType) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			return this.getDate();
		}
	};

	/** Returns the number of day in the year. */
	Date.prototype.getLocalDay = function(dateType) {
		if (dateType  != 'gregorian') {
			return '';
		} else {
			return this.getDay();
		}
	};

	/** Returns the number of days in the current month */
	Date.prototype.getLocalMonthDays = function(dateType, month) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			var year = this.getFullYear();
			if (typeof month == "undefined") {
				month = this.getMonth();
			}
			if (((0 == (year%4)) && ( (0 != (year%100)) || (0 ==
(year%400)))) && month == 1) {
				return 29;
			} else {
				return [31,28,31,30,31,30,31,31,30,31,30,31][month];
			}
		}
	};

	/** Returns the week number for the current date. */
	Date.prototype.getLocalWeekNumber = function(dateType) {
		if (dateType != 'gregorian') {
			/** Modify to match the current calendar when overriding **/
			return '';
		} else {
			var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0,
0, 0);
			var DoW = d.getDay();
			d.setDate(d.getDate() - (DoW + 6) % 7 + 3);                             
       // Nearest Thu
			var ms = d.valueOf();                                                   
       // GMT
			d.setMonth(0);
			d.setDate(4);                                                           
       // Thu in Week 1
			return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
		}
	};

	/** Returns the number of day in the year. */
	Date.prototype.getLocalDayOfYear = function(dateType) {
		if (dateType  != 'gregorian') {
			return '';
		} else {
			var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(),
0, 0, 0);
			var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
			var time = now - then;
			return Math.floor(time / Date.DAY);
		}
	};

	/** Checks date and time equality */
	Date.prototype.equalsTo = function(date) {
		return ((this.getFullYear() == date.getFullYear()) &&
		(this.getMonth() == date.getMonth()) &&
		(this.getDate() == date.getDate()) &&
		(this.getHours() == date.getHours()) &&
		(this.getMinutes() == date.getMinutes()));
	};

	/** Converts foreign date to gregorian date. */
	Date.localCalToGregorian = function(y, m, d) {
		/** Modify to match the current calendar when overriding **/
		return'';
	};

	/** Converts gregorian date to foreign date. */
	Date.gregorianToLocalCal = function(y, m, d) {
		/** Modify to match the current calendar when overriding **/
		return '';
	};

	/** INTERFACE METHODS FOR THE CALENDAR PICKER **/
	/************* END **************/

	/** Method to parse a string and return a date. **/
	Date.parseFieldDate = function(str, fmt, dateType) {
		if (dateType != 'gregorian')
			str = Date.toEnglish(str);

		var today = new Date();
		var y = 0;
		var m = -1;
		var d = 0;
		var a = str.split(/\W+/);
		var b = fmt.match(/%./g);
		var i = 0, j = 0;
		var hr = 0;
		var min = 0;
		var sec = 0;
		for (i = 0; i < a.length; ++i) {
			if (!a[i])
				continue;
			switch (b[i]) {
				case "%d":
				case "%e":
					d = parseInt(a[i], 10);
					break;

				case "%m":
					m = parseInt(a[i], 10) - 1;
					break;

				case "%Y":
				case "%y":
					y = parseInt(a[i], 10);
					(y < 100) && (y += (y > 29) ? 1900 : 2000);
					break;

				case "%b":
				case "%B":
					for (j = 0; j < 12; ++j) {
						if (JoomlaCalLocale.months[j].substr(0, a[i].length).toLowerCase() ==
a[i].toLowerCase()) { m = j; break; }
					}
					break;

				case "%H":
				case "%I":
				case "%k":
				case "%l":
					hr = parseInt(a[i], 10);
					break;

				case "%P":
				case "%p":
					if (/pm/i.test(a[i]) && hr < 12)
						hr += 12;
					else if (/am/i.test(a[i]) && hr >= 12)
						hr -= 12;
					break;

				case "%M":
					min = parseInt(a[i], 10);
					break;
				case "%S":
					sec = parseInt(a[i], 10);
					break;
			}
		}
		if (isNaN(y)) y = today.getFullYear();
		if (isNaN(m)) m = today.getMonth();
		if (isNaN(d)) d = today.getDate();
		if (isNaN(hr)) hr = today.getHours();
		if (isNaN(min)) min = today.getMinutes();
		if (isNaN(sec)) sec = today.getSeconds();
		if (y != 0 && m != -1 && d != 0)
			return new Date(y, m, d, hr, min, sec);
		y = 0; m = -1; d = 0;
		for (i = 0; i < a.length; ++i) {
			if (a[i].search(/[a-zA-Z]+/) != -1) {
				var t = -1;
				for (j = 0; j < 12; ++j) {
					if (JoomlaCalLocale.months[j].substr(0, a[i].length).toLowerCase() ==
a[i].toLowerCase()) { t = j; break; }
				}
				if (t != -1) {
					if (m != -1) {
						d = m+1;
					}
					m = t;
				}
			} else if (parseInt(a[i], 10) <= 12 && m == -1) {
				m = a[i]-1;
			} else if (parseInt(a[i], 10) > 31 && y == 0) {
				y = parseInt(a[i], 10);
				(y < 100) && (y += (y > 29) ? 1900 : 2000);
			} else if (d == 0) {
				d = a[i];
			}
		}
		if (y == 0)
			y = today.getFullYear();
		if (m != -1 && d != 0)
			return new Date(y, m, d, hr, min, sec);
		return today;
	};

	/** Prints the date in a string according to the given format. */
	Date.prototype.print = function (str, dateType, translate) {
		/** Handle calendar type **/
		if (typeof dateType !== 'string') str = '';
		if (!dateType) dateType = 'gregorian';

		/** Handle wrong format **/
		if (typeof str !== 'string') str = '';
		if (!str) return '';

		if (this.getLocalDate(dateType) == 'NaN' ||
!this.getLocalDate(dateType)) return '';
		var m = this.getLocalMonth(dateType);
		var d = this.getLocalDate(dateType);
		var y = this.getLocalFullYear(dateType);
		var wn = this.getLocalWeekNumber(dateType);
		var w = this.getDay();
		var s = {};
		var hr = this.getHours();
		var pm = (hr >= 12);
		var ir = (pm) ? (hr - 12) : hr;
		var dy = this.getLocalDayOfYear(dateType);
		if (ir == 0)
			ir = 12;
		var min = this.getMinutes();
		var sec = this.getSeconds();
		s["%a"] = JoomlaCalLocale.shortDays[w];                        
                            // abbreviated weekday name
		s["%A"] = JoomlaCalLocale.days[w];                             
                            // full weekday name
		s["%b"] = JoomlaCalLocale.shortMonths[m];                      
                            // abbreviated month name
		s["%B"] = JoomlaCalLocale.months[m];                           
                            // full month name
		// FIXME: %c : preferred date and time representation for the current
locale
		s["%C"] = 1 + Math.floor(y / 100);                             
                            // the century number
		s["%d"] = (d < 10) ? ("0" + d) : d;               
                                         // the day of the month (range 01
to 31)
		s["%e"] = d;                                                   
                            // the day of the month (range 1 to 31)
		// FIXME: %D : american date style: %m/%d/%y
		// FIXME: %E, %F, %G, %g, %h (man strftime)
		s["%H"] = (hr < 10) ? ("0" + hr) : hr;            
                                         // hour, range 00 to 23 (24h
format)
		s["%I"] = (ir < 10) ? ("0" + ir) : ir;            
                                         // hour, range 01 to 12 (12h
format)
		s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy)
: ("0" + dy)) : dy;                         // day of the year
(range 001 to 366)
		s["%k"] = hr;                                                  
                            // hour, range 0 to 23 (24h format)
		s["%l"] = ir;                                                  
                            // hour, range 1 to 12 (12h format)
		s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m);        
                                         // month, range 01 to 12
		s["%M"] = (min < 10) ? ("0" + min) : min;         
                                         // minute, range 00 to 59
		s["%n"] = "\n";                                      
                                      // a newline character
		s["%p"] = pm ? JoomlaCalLocale.PM : JoomlaCalLocale.AM;
		s["%P"] = pm ? JoomlaCalLocale.pm : JoomlaCalLocale.am;
		// FIXME: %r : the time in am/pm notation %I:%M:%S %p
		// FIXME: %R : the time in 24-hour notation %H:%M
		s["%s"] = Math.floor(this.getTime() / 1000);
		s["%S"] = (sec < 10) ? ("0" + sec) : sec;         
                                         // seconds, range 00 to 59
		s["%t"] = "\t";                                      
                                      // a tab character
		// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
		s["%U"] = s["%W"] = s["%V"] = (wn < 10)
? ("0" + wn) : wn;
		s["%u"] = w + 1;                                               
                            // the day of the week (range 1 to 7, 1 = MON)
		s["%w"] = w;                                                   
                            // the day of the week (range 0 to 6, 0 = SUN)
		// FIXME: %x : preferred date representation for the current locale
without the time
		// FIXME: %X : preferred time representation for the current locale
without the date
		s["%y"] = ('' + y).substr(2, 2);                     
                                      // year without the century (range 00
to 99)
		s["%Y"] = y;                                                   
                            // year with the century
		s["%%"] = "%";                                       
                                      // a literal '%' character

		var re = /%./g;

		var tmpDate = str.replace(re, function (par) { return s[par] || par; });
		if (Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers) ===
'[object Array]' && dateType != 'gregorian'
&& translate)
			tmpDate = Date.convertNumbers(tmpDate);

		return tmpDate;
	};
})(Date);
calendar-locales/date/gregorian/date-helper.min.js000064400000011434151160614770016154
0ustar00!function(t){"use
strict";t.SECOND=1e3,t.MINUTE=60*t.SECOND,t.HOUR=60*t.MINUTE,t.DAY=24*t.HOUR,t.WEEK=7*t.DAY,t.prototype.setLocalDateOnly=function(e,a){if("gregorian"!=e)return"";var
r=new
t(a);this.setDate(1),this.setFullYear(r.getFullYear()),this.setMonth(r.getMonth()),this.setDate(r.getDate())},t.prototype.setLocalDate=function(t,e){return"gregorian"!=t?"":this.setDate(e)},t.prototype.setLocalMonth=function(t,e,a){return"gregorian"!=t?"":(void
0==a&&this.getDate(),this.setMonth(e))},t.prototype.setOtherFullYear=function(e,a){if("gregorian"!=e)return"";var
r=new t(this);return
r.setFullYear(a),r.getMonth()!=this.getMonth()&&this.setDate(28),this.setUTCFullYear(a)},t.prototype.setLocalFullYear=function(e,a){if("gregorian"!=e)return"";var
r=new t(this);return
r.setFullYear(a),r.getMonth()!=this.getMonth()&&this.setDate(28),this.setFullYear(a)},t.prototype.getLocalWeekDays=function(t,e){return
6},t.prototype.getOtherFullYear=function(t){return"gregorian"!=t?"":this.getFullYear()},t.prototype.getLocalFullYear=function(t){return"gregorian"!=t?"":this.getFullYear()},t.prototype.getLocalMonth=function(t){return"gregorian"!=t?"":this.getMonth()},t.prototype.getLocalDate=function(t){return"gregorian"!=t?"":this.getDate()},t.prototype.getLocalDay=function(t){return"gregorian"!=t?"":this.getDay()},t.prototype.getLocalMonthDays=function(t,e){if("gregorian"!=t)return"";var
a=this.getFullYear();return void
0===e&&(e=this.getMonth()),0!=a%4||0==a%100&&0!=a%400||1!=e?[31,28,31,30,31,30,31,31,30,31,30,31][e]:29},t.prototype.getLocalWeekNumber=function(e){if("gregorian"!=e)return"";var
a=new
t(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),r=a.getDay();a.setDate(a.getDate()-(r+6)%7+3);var
o=a.valueOf();return
a.setMonth(0),a.setDate(4),Math.round((o-a.valueOf())/6048e5)+1},t.prototype.getLocalDayOfYear=function(e){if("gregorian"!=e)return"";var
a=new t(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0)-new
t(this.getFullYear(),0,0,0,0,0);return
Math.floor(a/t.DAY)},t.prototype.equalsTo=function(t){return
this.getFullYear()==t.getFullYear()&&this.getMonth()==t.getMonth()&&this.getDate()==t.getDate()&&this.getHours()==t.getHours()&&this.getMinutes()==t.getMinutes()},t.localCalToGregorian=function(t,e,a){return""},t.gregorianToLocalCal=function(t,e,a){return""},t.parseFieldDate=function(e,a,r){"gregorian"!=r&&(e=t.toEnglish(e));var
o=new
t,n=0,s=-1,i=0,l=e.split(/\W+/),g=a.match(/%./g),u=0,h=0,c=0,p=0,f=0;for(u=0;u<l.length;++u)if(l[u])switch(g[u]){case"%d":case"%e":i=parseInt(l[u],10);break;case"%m":s=parseInt(l[u],10)-1;break;case"%Y":case"%y":(n=parseInt(l[u],10))<100&&(n+=n>29?1900:2e3);break;case"%b":case"%B":for(h=0;h<12;++h)if(JoomlaCalLocale.months[h].substr(0,l[u].length).toLowerCase()==l[u].toLowerCase()){s=h;break}break;case"%H":case"%I":case"%k":case"%l":c=parseInt(l[u],10);break;case"%P":case"%p":/pm/i.test(l[u])&&c<12?c+=12:/am/i.test(l[u])&&c>=12&&(c-=12);break;case"%M":p=parseInt(l[u],10);break;case"%S":f=parseInt(l[u],10)}if(isNaN(n)&&(n=o.getFullYear()),isNaN(s)&&(s=o.getMonth()),isNaN(i)&&(i=o.getDate()),isNaN(c)&&(c=o.getHours()),isNaN(p)&&(p=o.getMinutes()),isNaN(f)&&(f=o.getSeconds()),0!=n&&-1!=s&&0!=i)return
new
t(n,s,i,c,p,f);for(n=0,s=-1,i=0,u=0;u<l.length;++u)if(-1!=l[u].search(/[a-zA-Z]+/)){var
D=-1;for(h=0;h<12;++h)if(JoomlaCalLocale.months[h].substr(0,l[u].length).toLowerCase()==l[u].toLowerCase()){D=h;break}-1!=D&&(-1!=s&&(i=s+1),s=D)}else
parseInt(l[u],10)<=12&&-1==s?s=l[u]-1:parseInt(l[u],10)>31&&0==n?(n=parseInt(l[u],10))<100&&(n+=n>29?1900:2e3):0==i&&(i=l[u]);return
0==n&&(n=o.getFullYear()),-1!=s&&0!=i?new
t(n,s,i,c,p,f):o},t.prototype.print=function(e,a,r){if("string"!=typeof
a&&(e=""),a||(a="gregorian"),"string"!=typeof
e&&(e=""),!e)return"";if("NaN"==this.getLocalDate(a)||!this.getLocalDate(a))return"";var
o=this.getLocalMonth(a),n=this.getLocalDate(a),s=this.getLocalFullYear(a),i=this.getLocalWeekNumber(a),l=this.getDay(),g={},u=this.getHours(),h=u>=12,c=h?u-12:u,p=this.getLocalDayOfYear(a);0==c&&(c=12);var
f=this.getMinutes(),D=this.getSeconds();g["%a"]=JoomlaCalLocale.shortDays[l],g["%A"]=JoomlaCalLocale.days[l],g["%b"]=JoomlaCalLocale.shortMonths[o],g["%B"]=JoomlaCalLocale.months[o],g["%C"]=1+Math.floor(s/100),g["%d"]=n<10?"0"+n:n,g["%e"]=n,g["%H"]=u<10?"0"+u:u,g["%I"]=c<10?"0"+c:c,g["%j"]=p<100?p<10?"00"+p:"0"+p:p,g["%k"]=u,g["%l"]=c,g["%m"]=o<9?"0"+(1+o):1+o,g["%M"]=f<10?"0"+f:f,g["%n"]="\n",g["%p"]=h?JoomlaCalLocale.PM:JoomlaCalLocale.AM,g["%P"]=h?JoomlaCalLocale.pm:JoomlaCalLocale.am,g["%s"]=Math.floor(this.getTime()/1e3),g["%S"]=D<10?"0"+D:D,g["%t"]="\t",g["%U"]=g["%W"]=g["%V"]=i<10?"0"+i:i,g["%u"]=l+1,g["%w"]=l,g["%y"]=(""+s).substr(2,2),g["%Y"]=s,g["%%"]="%";var
L=/%./g,M=e.replace(L,function(t){return g[t]||t});return"[object
Array]"===Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers)&&"gregorian"!=a&&r&&(M=t.convertNumbers(M)),M}}(Date);
calendar-locales/date/jalali/date-helper.js000064400000047065151160614770014662
0ustar00/** BEGIN: DATE OBJECT PATCHES **/
/** Adds the number of days array to the Date object. */
Date.gregorian_MD = [31,28,31,30,31,30,31,31,30,31,30,31];
Date.local_MD     = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29];

/** Constants used for time computations */
Date.SECOND = 1000 /* milliseconds */;
Date.MINUTE = 60 * Date.SECOND;
Date.HOUR   = 60 * Date.MINUTE;
Date.DAY    = 24 * Date.HOUR;
Date.WEEK   =  7 * Date.DAY;

/** MODIFY ONLY THE MARKED PARTS OF THE METHODS **/
/************ START *************/
/** INTERFACE METHODS FOR THE CALENDAR PICKER **/

/********************** *************************/
/**************** SETTERS ***********************/
/********************** *************************/

/** Sets the date for the current date without h/m/s. */
Date.prototype.setLocalDateOnly = function (dateType, date) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return '';
	} else {
		var tmp = new Date(date);
		this.setDate(1);
		this.setFullYear(tmp.getFullYear());
		this.setMonth(tmp.getMonth());
		this.setDate(tmp.getDate());
	}
};

/** Sets the full date for the current date. */
Date.prototype.setLocalDate = function (dateType, d) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return this.setJalaliDate(d);
	} else {
		return this.setDate(d);
	}
};

/** Sets the month for the current date. */
Date.prototype.setLocalMonth = function (dateType, m, d) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return this.setJalaliMonth(m, d);
	} else {
		if (d == undefined) this.getDate();
		return this.setMonth(m);
	}
};

/** Sets the year for the current date. */
Date.prototype.setOtherFullYear = function(dateType, y) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		var date = new Date(this);
		date.setLocalFullYear(y);
		if (date.getLocalMonth('jalali') !=
this.getLocalMonth('jalali'))
this.setLocalDate('jalali', 29);
		return this.setLocalFullYear('jalali', y);
	} else {
		var date = new Date(this);
		date.setFullYear(y);
		if (date.getMonth() != this.getMonth()) this.setDate(28);
		return this.setUTCFullYear(y);
	}
};

/** Sets the year for the current date. */
Date.prototype.setLocalFullYear = function (dateType, y) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return this.setJalaliFullYear(y);
	} else {
		var date = new Date(this);
		date.setFullYear(y);
		if (date.getMonth() != this.getMonth()) this.setDate(28);
		return this.setFullYear(y);
	}
};

/********************** *************************/
/**************** GETTERS ***********************/
/********************** *************************/

/** The number of days per week **/
Date.prototype.getLocalWeekDays = function (dateType, y) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return 6;
	} else {
		return 6; // 7 days per week
	}
};

/** Returns the year for the current date. */
Date.prototype.getOtherFullYear = function (dateType) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return this.getJalaliFullYear();
	} else {
		return this.getFullYear();
	}
};

/** Returns the year for the current date. */
Date.prototype.getLocalFullYear = function (dateType) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return this.getJalaliFullYear();
	} else {
		return this.getFullYear();
	}
};

/** Returns the month the date. */
Date.prototype.getLocalMonth = function (dateType) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return this.getJalaliMonth();
	} else {
		return this.getMonth();
	}
};

/** Returns the date. */
Date.prototype.getLocalDate = function (dateType) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		return this.getJalaliDate();
	} else {
		return this.getDate();
	}
};

/** Returns the number of day in the year. */
Date.prototype.getLocalDay = function(dateType) {
	if (dateType  != 'gregorian') {
		return this.getJalaliDay();
	} else {
		return this.getDay();
	}
};

/** Returns the number of days in the current month */
Date.prototype.getLocalMonthDays = function(dateType, month) {
	if (dateType != 'gregorian') {
		/** Modify to match the current calendar when overriding **/
		var year = this.getLocalFullYear('jalali');
		if (typeof month == "undefined") {
			month = this.getLocalMonth('jalali');
		}
		if (((0 == (year%4)) && ( (0 != (year%100)) || (0 ==
(year%400)))) && month == 1) {
			return 29;
		} else {
			Date.local_MD[month];
		}
	} else {
		var year = this.getFullYear();
		if (typeof month == "undefined") {
			month = this.getMonth();
		}
		if (((0 == (year%4)) && ( (0 != (year%100)) || (0 ==
(year%400)))) && month == 1) {
			return 29;
		} else {
			return Date.gregorian_MD[month];
		}
	}
};

/** Returns the week number for the current date. */
Date.prototype.getLocalWeekNumber = function(dateType) {
	if (dateType != 'gregorian') {
		var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0,
0, 0);
		var DoW = d.getDay();
		d.setDate(d.getDate() - (DoW + 6) % 7 + 3);                              
      // Nearest Thu
		var ms = d.valueOf();                                                    
      // GMT
		d.setMonth(0);
		d.setDate(4);                                                            
      // Thu in Week 1
		return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
	} else {
		var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0,
0, 0);
		var DoW = d.getDay();
		d.setDate(d.getDate() - (DoW + 6) % 7 + 3);                              
      // Nearest Thu
		var ms = d.valueOf();                                                    
      // GMT
		d.setMonth(0);
		d.setDate(4);                                                            
      // Thu in Week 1
		return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
	}
};

/** Returns the number of day in the year. */
Date.prototype.getLocalDayOfYear = function(dateType) {
	if (dateType  != 'gregorian') {
		var now = new Date(this.getOtherFullYear(dateType),
this.getLocalMonth(dateType), this.getLocalDate(dateType), 0, 0, 0);
		var then = new Date(this.getOtherFullYear(dateType), 0, 0, 0, 0, 0);
		var time = now - then;
		return Math.floor(time / Date.DAY);
	} else {
		var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(),
0, 0, 0);
		var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
		var time = now - then;
		return Math.floor(time / Date.DAY);
	}
};

/** Returns the number of days in the current month */
Date.prototype.getMonthDays = function(month) {
	var year = this.getFullYear();
	if (typeof month == "undefined") {
		month = this.getMonth();
	}
	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400))))
&& month == 1) {
		return 29;
	} else {
		if (Date.dateType != 'gregorian') {
			Date.local_MD[month];
		} else {
			return Date.gregorian_MD[month];
		}
	}
};

/** Checks date and time equality */
Date.prototype.equalsTo = function(date) {
	return ((this.getFullYear() == date.getFullYear()) &&
	(this.getMonth() == date.getMonth()) &&
	(this.getDate() == date.getDate()) &&
	(this.getHours() == date.getHours()) &&
	(this.getMinutes() == date.getMinutes()));
};

/** Converts foreign date to gregorian date. */
Date.localCalToGregorian = function(y, m, d) {
	/** Modify to match the current calendar when overriding **/
	return JalaliDate.jalaliToGregorian(y, m, d);
};

/** Converts gregorian date to foreign date. */
Date.gregorianToLocalCal = function(y, m, d) {
	/** Modify to match the current calendar when overriding **/
	return JalaliDate.gregorianToJalali(y, m, d);
};

/** Method to convert numbers from local symbols to English numbers. */
Date.numbersToIso = function(str) {
	var i, nums =[0,1,2,3,4,5,6,7,8,9];
	str = str.toString();

	if (Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers) ===
'[object Array]') {
		for (i = 0; i < nums.length; i++) {
			str = str.replace(new RegExp(JoomlaCalLocale.localLangNumbers[i],
'g'), nums[i]);
		}
	}
	return str;
};
/** INTERFACE METHODS FOR THE CALENDAR PICKER **/
/************* END **************/

/** Prints the date in a string according to the given format. */
Date.prototype.print = function (str, dateType, translate) {
	/** Handle calendar type **/
	if (typeof dateType !== 'string') str = '';
	if (!dateType) dateType = 'gregorian';

	/** Handle wrong format **/
	if (typeof str !== 'string') str = '';
	if (!str) return '';


	if (this.getLocalDate(dateType) == 'NaN' ||
!this.getLocalDate(dateType)) return '';
	var m = this.getLocalMonth(dateType);
	var d = this.getLocalDate(dateType);
	var y = this.getLocalFullYear(dateType);
	var wn = this.getLocalWeekNumber(dateType);
	var w = this.getLocalDay(dateType);
	var s = {};
	var hr = this.getHours();
	var pm = (hr >= 12);
	var ir = (pm) ? (hr - 12) : hr;
	var dy = this.getLocalDayOfYear(dateType);
	if (ir == 0)
		ir = 12;
	var min = this.getMinutes();
	var sec = this.getSeconds();
	s["%a"] = JoomlaCalLocale.shortDays[w];                         
                           // abbreviated weekday name
	s["%A"] = JoomlaCalLocale.days[w];                              
                           // full weekday name
	s["%b"] = JoomlaCalLocale.shortMonths[m];                       
                           // abbreviated month name
	s["%B"] = JoomlaCalLocale.months[m];                            
                           // full month name
	// FIXME: %c : preferred date and time representation for the current
locale
	s["%C"] = 1 + Math.floor(y / 100);                              
                           // the century number
	s["%d"] = (d < 10) ? ("0" + d) : d;                
                                        // the day of the month (range 01
to 31)
	s["%e"] = d;                                                    
                           // the day of the month (range 1 to 31)
	// FIXME: %D : american date style: %m/%d/%y
	// FIXME: %E, %F, %G, %g, %h (man strftime)
	s["%H"] = (hr < 10) ? ("0" + hr) : hr;             
                                        // hour, range 00 to 23 (24h
format)
	s["%I"] = (ir < 10) ? ("0" + ir) : ir;             
                                        // hour, range 01 to 12 (12h
format)
	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy)
: ("0" + dy)) : dy;                         // day of the year
(range 001 to 366)
	s["%k"] = hr;                                                   
                           // hour, range 0 to 23 (24h format)
	s["%l"] = ir;                                                   
                           // hour, range 1 to 12 (12h format)
	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m);         
                                        // month, range 01 to 12
	s["%M"] = (min < 10) ? ("0" + min) : min;          
                                        // minute, range 00 to 59
	s["%n"] = "\n";                                       
                                     // a newline character
	s["%p"] = pm ? JoomlaCalLocale.PM : JoomlaCalLocale.AM;
	s["%P"] = pm ? JoomlaCalLocale.pm : JoomlaCalLocale.am;
	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
	// FIXME: %R : the time in 24-hour notation %H:%M
	s["%s"] = Math.floor(this.getTime() / 1000);
	s["%S"] = (sec < 10) ? ("0" + sec) : sec;          
                                        // seconds, range 00 to 59
	s["%t"] = "\t";                                       
                                     // a tab character
	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ?
("0" + wn) : wn;
	s["%u"] = w + 1;                                                
                           // the day of the week (range 1 to 7, 1 = MON)
	s["%w"] = w;                                                    
                           // the day of the week (range 0 to 6, 0 = SUN)
	// FIXME: %x : preferred date representation for the current locale
without the time
	// FIXME: %X : preferred time representation for the current locale
without the date
	s["%y"] = ('' + y).substr(2, 2);                      
                                     // year without the century (range 00
to 99)
	s["%Y"] = y;                                                    
                           // year with the century
	s["%%"] = "%";                                        
                                     // a literal '%' character

	var re = /%./g;

	var tmpDate = str.replace(re, function (par) { return s[par] || par; });
	if (Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers) ===
'[object Array]' && translate)
		tmpDate = Date.convertNumbers(tmpDate);

	return tmpDate;
};

Date.parseFieldDate = function(str, fmt, dateType) {
	str = Date.numbersToIso(str);

	var today = new Date();
	var y = 0;
	var m = -1;
	var d = 0;
	var a = str.split(/\W+/);
	var b = fmt.match(/%./g);
	var i = 0, j = 0;
	var hr = 0;
	var min = 0;
	for (i = 0; i < a.length; ++i) {
		if (!a[i])
			continue;
		switch (b[i]) {
			case "%d":
			case "%e":
				d = parseInt(a[i], 10);
				break;

			case "%m":
				m = parseInt(a[i], 10) - 1;
				break;

			case "%Y":
			case "%y":
				y = parseInt(a[i], 10);
				(y < 100) && (y += (y > 29) ? 1900 : 2000);
				break;

			case "%b":
			case "%B":
				for (j = 0; j < 12; ++j) {
					if (dateType != 'gregorian') {
						if (JoomlaCalLocale.months[j].substr(0, a[i].length).toLowerCase() ==
a[i].toLowerCase()) { m = j; break; }
					} else {
						if (JoomlaCalLocale.months[j].substr(0, a[i].length).toLowerCase() ==
a[i].toLowerCase()) { m = j; break; }
					}
				}
				break;

			case "%H":
			case "%I":
			case "%k":
			case "%l":
				hr = parseInt(a[i], 10);
				break;

			case "%P":
			case "%p":
				if (/pm/i.test(a[i]) && hr < 12)
					hr += 12;
				else if (/am/i.test(a[i]) && hr >= 12)
					hr -= 12;
				break;

			case "%M":
				min = parseInt(a[i], 10);
				break;
			case "%S":
				sec = parseInt(a[i], 10);
				break;
		}
	}
	if (isNaN(y)) y = today.getFullYear();
	if (isNaN(m)) m = today.getMonth();
	if (isNaN(d)) d = today.getDate();
	if (isNaN(hr)) hr = today.getHours();
	if (isNaN(min)) min = today.getMinutes();
	if (y != 0 && m != -1 && d != 0)
		return new Date(y, m, d, hr, min, 0);
	y = 0; m = -1; d = 0;
	for (i = 0; i < a.length; ++i) {
		if (a[i].search(/[a-zA-Z]+/) != -1) {
			var t = -1;
			for (j = 0; j < 12; ++j) {
				if (dateType != 'gregorian') {
					if (JoomlaCalLocale.months[j].substr(0, a[i].length).toLowerCase() ==
a[i].toLowerCase()) { t = j; break; }
				} else {
					if (JoomlaCalLocale.months[j].substr(0, a[i].length).toLowerCase() ==
a[i].toLowerCase()) { t = j; break; }
				}
			}
			if (t != -1) {
				if (m != -1) {
					d = m+1;
				}
				m = t;
			}
		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
			m = a[i]-1;
		} else if (parseInt(a[i], 10) > 31 && y == 0) {
			y = parseInt(a[i], 10);
			(y < 100) && (y += (y > 29) ? 1900 : 2000);
		} else if (d == 0) {
			d = a[i];
		}
	}
	if (y == 0)
		y = today.getFullYear();
	if (m != -1 && d != 0)
		return new Date(y, m, d, hr, min, 0);
	return today;
};

/*
 * JalaliJSCalendar - Jalali Extension for Date Object
 * Copyright (c) 2008 Ali Farhadi (http://farhadi.ir/)
 * Released under the terms of the GNU General Public License.
 * See the GPL for details (http://www.gnu.org/licenses/gpl.html).
 *
 * Based on code from http://farsiweb.info
 */

JalaliDate = {
	g_days_in_month: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
	j_days_in_month: [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29]
};

JalaliDate.jalaliToGregorian = function(j_y, j_m, j_d)
{
	j_y = parseInt(j_y);
	j_m = parseInt(j_m);
	j_d = parseInt(j_d);
	var jy = j_y-979;
	var jm = j_m-1;
	var jd = j_d-1;

	var j_day_no = 365*jy + parseInt(jy / 33)*8 + parseInt((jy%33+3) / 4);
	for (var i=0; i < jm; ++i) j_day_no += JalaliDate.j_days_in_month[i];

	j_day_no += jd;

	var g_day_no = j_day_no+79;

	var gy = 1600 + 400 * parseInt(g_day_no / 146097); /* 146097 = 365*400 +
400/4 - 400/100 + 400/400 */
	g_day_no = g_day_no % 146097;

	var leap = true;
	if (g_day_no >= 36525) /* 36525 = 365*100 + 100/4 */
	{
		g_day_no--;
		gy += 100*parseInt(g_day_no/  36524); /* 36524 = 365*100 + 100/4 -
100/100 */
		g_day_no = g_day_no % 36524;

		if (g_day_no >= 365)
			g_day_no++;
		else
			leap = false;
	}

	gy += 4*parseInt(g_day_no/ 1461); /* 1461 = 365*4 + 4/4 */
	g_day_no %= 1461;

	if (g_day_no >= 366) {
		leap = false;

		g_day_no--;
		gy += parseInt(g_day_no/ 365);
		g_day_no = g_day_no % 365;
	}

	for (var i = 0; g_day_no >= JalaliDate.g_days_in_month[i] + (i == 1
&& leap); i++)
		g_day_no -= JalaliDate.g_days_in_month[i] + (i == 1 && leap);
	var gm = i+1;
	var gd = g_day_no+1;

	return [gy, gm, gd];
};

JalaliDate.checkDate = function(j_y, j_m, j_d)
{
	return !(j_y < 0 || j_y > 32767 || j_m < 1 || j_m > 12 || j_d
< 1 || j_d >
	(JalaliDate.j_days_in_month[j_m-1] + (j_m == 12 &&
!((j_y-979)%33%4))));
};

JalaliDate.gregorianToJalali = function(g_y, g_m, g_d)
{
	g_y = parseInt(g_y);
	g_m = parseInt(g_m);
	g_d = parseInt(g_d);
	var gy = g_y-1600;
	var gm = g_m-1;
	var gd = g_d-1;

	var g_day_no = 365*gy+parseInt((gy+3) /
4)-parseInt((gy+99)/100)+parseInt((gy+399)/400);

	for (var i=0; i < gm; ++i)
		g_day_no += JalaliDate.g_days_in_month[i];
	if (gm>1 && ((gy%4==0 && gy%100!=0) || (gy%400==0)))
	/* leap and after Feb */
		++g_day_no;
	g_day_no += gd;

	var j_day_no = g_day_no-79;

	var j_np = parseInt(j_day_no/ 12053);
	j_day_no %= 12053;

	var jy = 979+33*j_np+4*parseInt(j_day_no/1461);

	j_day_no %= 1461;

	if (j_day_no >= 366) {
		jy += parseInt((j_day_no-1)/ 365);
		j_day_no = (j_day_no-1)%365;
	}

	for (var i = 0; i < 11 && j_day_no >=
JalaliDate.j_days_in_month[i]; ++i) {
		j_day_no -= JalaliDate.j_days_in_month[i];
	}
	var jm = i+1;
	var jd = j_day_no+1;


	return [jy, jm, jd];
};

Date.prototype.setJalaliFullYear = function(y, m, d) {
	var gd = this.getDate();
	var gm = this.getMonth();
	var gy = this.getFullYear();
	var j = JalaliDate.gregorianToJalali(gy, gm+1, gd);
	if (y < 100) y += 1300;
	j[0] = y;
	if (m != undefined) {
		if (m > 11) {
			j[0] += Math.floor(m / 12);
			m = m % 12;
		}
		j[1] = m + 1;
	}
	if (d != undefined) j[2] = d;
	var g = JalaliDate.jalaliToGregorian(j[0], j[1], j[2]);
	return this.setFullYear(g[0], g[1]-1, g[2]);
};

Date.prototype.setJalaliMonth = function(m, d) {
	var gd = this.getDate();
	var gm = this.getMonth();
	var gy = this.getFullYear();
	var j = JalaliDate.gregorianToJalali(gy, gm+1, gd);
	if (m > 11) {
		j[0] += Math.floor(m / 12);
		m = m % 12;
	}
	j[1] = m+1;
	if (d != undefined) j[2] = d;
	var g = JalaliDate.jalaliToGregorian(j[0], j[1], j[2]);
	return this.setFullYear(g[0], g[1]-1, g[2]);
};

Date.prototype.setJalaliDate = function(d) {
	var gd = this.getDate();
	var gm = this.getMonth();
	var gy = this.getFullYear();
	var j = JalaliDate.gregorianToJalali(gy, gm+1, gd);
	j[2] = d;
	var g = JalaliDate.jalaliToGregorian(j[0], j[1], j[2]);
	return this.setFullYear(g[0], g[1]-1, g[2]);
};

Date.prototype.getJalaliFullYear = function() {
	var gd = this.getDate();
	var gm = this.getMonth();
	var gy = this.getFullYear();
	var j = JalaliDate.gregorianToJalali(gy, gm+1, gd);
	return j[0];
};

Date.prototype.getJalaliMonth = function() {
	var gd = this.getDate();
	var gm = this.getMonth();
	var gy = this.getFullYear();
	var j = JalaliDate.gregorianToJalali(gy, gm+1, gd);
	return j[1]-1;
};

Date.prototype.getJalaliDate = function() {
	var gd = this.getDate();
	var gm = this.getMonth();
	var gy = this.getFullYear();
	var j = JalaliDate.gregorianToJalali(gy, gm+1, gd);
	return j[2];
};

Date.prototype.getJalaliDay = function() {
	var day = this.getDay();
	day = (day) % 7;
	return day;
};
calendar-locales/date/jalali/date-helper.min.js000064400000022146151160614770015435
0ustar00Date.gregorian_MD=[31,28,31,30,31,30,31,31,30,31,30,31],Date.local_MD=[31,31,31,31,31,31,30,30,30,30,30,29],Date.SECOND=1e3,Date.MINUTE=60*Date.SECOND,Date.HOUR=60*Date.MINUTE,Date.DAY=24*Date.HOUR,Date.WEEK=7*Date.DAY,Date.prototype.setLocalDateOnly=function(t,e){if("gregorian"!=t)return"";var
a=new
Date(e);this.setDate(1),this.setFullYear(a.getFullYear()),this.setMonth(a.getMonth()),this.setDate(a.getDate())},Date.prototype.setLocalDate=function(t,e){return"gregorian"!=t?this.setJalaliDate(e):this.setDate(e)},Date.prototype.setLocalMonth=function(t,e,a){return"gregorian"!=t?this.setJalaliMonth(e,a):(void
0==a&&this.getDate(),this.setMonth(e))},Date.prototype.setOtherFullYear=function(t,e){if("gregorian"!=t)return(a=new
Date(this)).setLocalFullYear(e),a.getLocalMonth("jalali")!=this.getLocalMonth("jalali")&&this.setLocalDate("jalali",29),this.setLocalFullYear("jalali",e);var
a=new Date(this);return
a.setFullYear(e),a.getMonth()!=this.getMonth()&&this.setDate(28),this.setUTCFullYear(e)},Date.prototype.setLocalFullYear=function(t,e){if("gregorian"!=t)return
this.setJalaliFullYear(e);var a=new Date(this);return
a.setFullYear(e),a.getMonth()!=this.getMonth()&&this.setDate(28),this.setFullYear(e)},Date.prototype.getLocalWeekDays=function(t,e){return
6},Date.prototype.getOtherFullYear=function(t){return"gregorian"!=t?this.getJalaliFullYear():this.getFullYear()},Date.prototype.getLocalFullYear=function(t){return"gregorian"!=t?this.getJalaliFullYear():this.getFullYear()},Date.prototype.getLocalMonth=function(t){return"gregorian"!=t?this.getJalaliMonth():this.getMonth()},Date.prototype.getLocalDate=function(t){return"gregorian"!=t?this.getJalaliDate():this.getDate()},Date.prototype.getLocalDay=function(t){return"gregorian"!=t?this.getJalaliDay():this.getDay()},Date.prototype.getLocalMonthDays=function(t,e){if("gregorian"==t){a=this.getFullYear();return
void
0===e&&(e=this.getMonth()),0!=a%4||0==a%100&&0!=a%400||1!=e?Date.gregorian_MD[e]:29}var
a=this.getLocalFullYear("jalali");if(void
0===e&&(e=this.getLocalMonth("jalali")),0==a%4&&(0!=a%100||0==a%400)&&1==e)return
29;Date.local_MD[e]},Date.prototype.getLocalWeekNumber=function(t){if("gregorian"!=t){a=(e=new
Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0)).getDay();e.setDate(e.getDate()-(a+6)%7+3);r=e.valueOf();return
e.setMonth(0),e.setDate(4),Math.round((r-e.valueOf())/6048e5)+1}var e=new
Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),a=e.getDay();e.setDate(e.getDate()-(a+6)%7+3);var
r=e.valueOf();return
e.setMonth(0),e.setDate(4),Math.round((r-e.valueOf())/6048e5)+1},Date.prototype.getLocalDayOfYear=function(t){if("gregorian"!=t){r=(e=new
Date(this.getOtherFullYear(t),this.getLocalMonth(t),this.getLocalDate(t),0,0,0))-(a=new
Date(this.getOtherFullYear(t),0,0,0,0,0));return Math.floor(r/Date.DAY)}var
e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),a=new
Date(this.getFullYear(),0,0,0,0,0),r=e-a;return
Math.floor(r/Date.DAY)},Date.prototype.getMonthDays=function(t){var
e=this.getFullYear();return void
0===t&&(t=this.getMonth()),0!=e%4||0==e%100&&0!=e%400||1!=t?"gregorian"==Date.dateType?Date.gregorian_MD[t]:void
Date.local_MD[t]:29},Date.prototype.equalsTo=function(t){return
this.getFullYear()==t.getFullYear()&&this.getMonth()==t.getMonth()&&this.getDate()==t.getDate()&&this.getHours()==t.getHours()&&this.getMinutes()==t.getMinutes()},Date.localCalToGregorian=function(t,e,a){return
JalaliDate.jalaliToGregorian(t,e,a)},Date.gregorianToLocalCal=function(t,e,a){return
JalaliDate.gregorianToJalali(t,e,a)},Date.numbersToIso=function(t){var
e,a=[0,1,2,3,4,5,6,7,8,9];if(t=t.toString(),"[object
Array]"===Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers))for(e=0;e<a.length;e++)t=t.replace(new
RegExp(JoomlaCalLocale.localLangNumbers[e],"g"),a[e]);return
t},Date.prototype.print=function(t,e,a){if("string"!=typeof
e&&(t=""),e||(e="gregorian"),"string"!=typeof
t&&(t=""),!t)return"";if("NaN"==this.getLocalDate(e)||!this.getLocalDate(e))return"";var
r=this.getLocalMonth(e),o=this.getLocalDate(e),l=this.getLocalFullYear(e),i=this.getLocalWeekNumber(e),n=this.getLocalDay(e),s={},g=this.getHours(),h=g>=12,D=h?g-12:g,u=this.getLocalDayOfYear(e);0==D&&(D=12);var
c=this.getMinutes(),p=this.getSeconds();s["%a"]=JoomlaCalLocale.shortDays[n],s["%A"]=JoomlaCalLocale.days[n],s["%b"]=JoomlaCalLocale.shortMonths[r],s["%B"]=JoomlaCalLocale.months[r],s["%C"]=1+Math.floor(l/100),s["%d"]=o<10?"0"+o:o,s["%e"]=o,s["%H"]=g<10?"0"+g:g,s["%I"]=D<10?"0"+D:D,s["%j"]=u<100?u<10?"00"+u:"0"+u:u,s["%k"]=g,s["%l"]=D,s["%m"]=r<9?"0"+(1+r):1+r,s["%M"]=c<10?"0"+c:c,s["%n"]="\n",s["%p"]=h?JoomlaCalLocale.PM:JoomlaCalLocale.AM,s["%P"]=h?JoomlaCalLocale.pm:JoomlaCalLocale.am,s["%s"]=Math.floor(this.getTime()/1e3),s["%S"]=p<10?"0"+p:p,s["%t"]="\t",s["%U"]=s["%W"]=s["%V"]=i<10?"0"+i:i,s["%u"]=n+1,s["%w"]=n,s["%y"]=(""+l).substr(2,2),s["%Y"]=l,s["%%"]="%";var
f=/%./g,M=t.replace(f,function(t){return s[t]||t});return"[object
Array]"===Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers)&&a&&(M=Date.convertNumbers(M)),M},Date.parseFieldDate=function(t,e,a){t=Date.numbersToIso(t);var
r=new
Date,o=0,l=-1,i=0,n=t.split(/\W+/),s=e.match(/%./g),g=0,h=0,D=0,u=0;for(g=0;g<n.length;++g)if(n[g])switch(s[g]){case"%d":case"%e":i=parseInt(n[g],10);break;case"%m":l=parseInt(n[g],10)-1;break;case"%Y":case"%y":(o=parseInt(n[g],10))<100&&(o+=o>29?1900:2e3);break;case"%b":case"%B":for(h=0;h<12;++h)if("gregorian"!=a){if(JoomlaCalLocale.months[h].substr(0,n[g].length).toLowerCase()==n[g].toLowerCase()){l=h;break}}else
if(JoomlaCalLocale.months[h].substr(0,n[g].length).toLowerCase()==n[g].toLowerCase()){l=h;break}break;case"%H":case"%I":case"%k":case"%l":D=parseInt(n[g],10);break;case"%P":case"%p":/pm/i.test(n[g])&&D<12?D+=12:/am/i.test(n[g])&&D>=12&&(D-=12);break;case"%M":u=parseInt(n[g],10);break;case"%S":sec=parseInt(n[g],10)}if(isNaN(o)&&(o=r.getFullYear()),isNaN(l)&&(l=r.getMonth()),isNaN(i)&&(i=r.getDate()),isNaN(D)&&(D=r.getHours()),isNaN(u)&&(u=r.getMinutes()),0!=o&&-1!=l&&0!=i)return
new
Date(o,l,i,D,u,0);for(o=0,l=-1,i=0,g=0;g<n.length;++g)if(-1!=n[g].search(/[a-zA-Z]+/)){var
c=-1;for(h=0;h<12;++h)if("gregorian"!=a){if(JoomlaCalLocale.months[h].substr(0,n[g].length).toLowerCase()==n[g].toLowerCase()){c=h;break}}else
if(JoomlaCalLocale.months[h].substr(0,n[g].length).toLowerCase()==n[g].toLowerCase()){c=h;break}-1!=c&&(-1!=l&&(i=l+1),l=c)}else
parseInt(n[g],10)<=12&&-1==l?l=n[g]-1:parseInt(n[g],10)>31&&0==o?(o=parseInt(n[g],10))<100&&(o+=o>29?1900:2e3):0==i&&(i=n[g]);return
0==o&&(o=r.getFullYear()),-1!=l&&0!=i?new
Date(o,l,i,D,u,0):r},JalaliDate={g_days_in_month:[31,28,31,30,31,30,31,31,30,31,30,31],j_days_in_month:[31,31,31,31,31,31,30,30,30,30,30,29]},JalaliDate.jalaliToGregorian=function(t,e,a){for(var
r=(t=parseInt(t))-979,o=(e=parseInt(e))-1,l=(a=parseInt(a))-1,i=365*r+8*parseInt(r/33)+parseInt((r%33+3)/4),n=0;n<o;++n)i+=JalaliDate.j_days_in_month[n];var
s=(i+=l)+79,g=1600+400*parseInt(s/146097),h=!0;(s%=146097)>=36525&&(s--,g+=100*parseInt(s/36524),(s%=36524)>=365?s++:h=!1),g+=4*parseInt(s/1461),(s%=1461)>=366&&(h=!1,s--,g+=parseInt(s/365),s%=365);for(n=0;s>=JalaliDate.g_days_in_month[n]+(1==n&&h);n++)s-=JalaliDate.g_days_in_month[n]+(1==n&&h);return[g,n+1,s+1]},JalaliDate.checkDate=function(t,e,a){return!(t<0||t>32767||e<1||e>12||a<1||a>JalaliDate.j_days_in_month[e-1]+(12==e&&!((t-979)%33%4)))},JalaliDate.gregorianToJalali=function(t,e,a){for(var
r=(t=parseInt(t))-1600,o=(e=parseInt(e))-1,l=(a=parseInt(a))-1,i=365*r+parseInt((r+3)/4)-parseInt((r+99)/100)+parseInt((r+399)/400),n=0;n<o;++n)i+=JalaliDate.g_days_in_month[n];o>1&&(r%4==0&&r%100!=0||r%400==0)&&++i;var
s=(i+=l)-79,g=parseInt(s/12053);s%=12053;var
h=979+33*g+4*parseInt(s/1461);(s%=1461)>=366&&(h+=parseInt((s-1)/365),s=(s-1)%365);for(n=0;n<11&&s>=JalaliDate.j_days_in_month[n];++n)s-=JalaliDate.j_days_in_month[n];return[h,n+1,s+1]},Date.prototype.setJalaliFullYear=function(t,e,a){var
r=this.getDate(),o=this.getMonth(),l=this.getFullYear(),i=JalaliDate.gregorianToJalali(l,o+1,r);t<100&&(t+=1300),i[0]=t,void
0!=e&&(e>11&&(i[0]+=Math.floor(e/12),e%=12),i[1]=e+1),void
0!=a&&(i[2]=a);var
n=JalaliDate.jalaliToGregorian(i[0],i[1],i[2]);return
this.setFullYear(n[0],n[1]-1,n[2])},Date.prototype.setJalaliMonth=function(t,e){var
a=this.getDate(),r=this.getMonth(),o=this.getFullYear(),l=JalaliDate.gregorianToJalali(o,r+1,a);t>11&&(l[0]+=Math.floor(t/12),t%=12),l[1]=t+1,void
0!=e&&(l[2]=e);var
i=JalaliDate.jalaliToGregorian(l[0],l[1],l[2]);return
this.setFullYear(i[0],i[1]-1,i[2])},Date.prototype.setJalaliDate=function(t){var
e=this.getDate(),a=this.getMonth(),r=this.getFullYear(),o=JalaliDate.gregorianToJalali(r,a+1,e);o[2]=t;var
l=JalaliDate.jalaliToGregorian(o[0],o[1],o[2]);return
this.setFullYear(l[0],l[1]-1,l[2])},Date.prototype.getJalaliFullYear=function(){var
t=this.getDate(),e=this.getMonth(),a=this.getFullYear();return
JalaliDate.gregorianToJalali(a,e+1,t)[0]},Date.prototype.getJalaliMonth=function(){var
t=this.getDate(),e=this.getMonth(),a=this.getFullYear();return
JalaliDate.gregorianToJalali(a,e+1,t)[1]-1},Date.prototype.getJalaliDate=function(){var
t=this.getDate(),e=this.getMonth(),a=this.getFullYear();return
JalaliDate.gregorianToJalali(a,e+1,t)[2]},Date.prototype.getJalaliDay=function(){var
t=this.getDay();return t%=7};
calendar-locales/de.js000064400000001172151160614770010674
0ustar00window.JoomlaCalLocale = {
	today : "Heute",
	weekend : [0, 6],
	wk : "KW",
	time : "Uhrzeit:",
	days : ["Sonntag", "Montag", "Dienstag",
"Mittwoch", "Donnerstag", "Freitag",
"Samstag"],
	shortDays : ["Son", "Mon", "Die",
"Mit", "Don", "Fre", "Sam"],
	months : ["Januar", "Februar", "März",
"April", "Mai", "Juni", "Juli",
"August", "September", "Oktober",
"November", "Dezember"],
	shortMonths : ["Jan", "Feb", "Mär",
"Apr", "Mai", "Jun", "Jul",
"Aug", "Sep", "Okt", "Nov",
"Dez"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Schließen",
	clear: "Leeren"
};
calendar-locales/el.js000064400000001615151160614770010706
0ustar00window.JoomlaCalLocale = {
	today : "Σήμερα",
	weekend : [0, 6],
	wk : "εβδ.",
	time : "Ώρα:",
	days : ["Κυριακή", "Δευτέρα",
"Τρίτη", "Τετάρτη",
"Πέμπτη", "Παρασκευή",
"Σάββατο"],
	shortDays : ["Κυρ", "Δευ", "Τρι",
"Τετ", "Πεμ", "Παρ",
"Σαβ"],
	months : ["Ιανουάριος",
"Φεβρουάριος", "Μάρτιος",
"Απρίλιος", "Μάιος",
"Ιούνιος", "Ιούλιος",
"Αύγουστος", "Σεπτέμβριος",
"Οκτώβριος", "Νοέμβριος",
"Δεκέμβριος"],
	shortMonths : ["Ιαν", "Φεβ", "Μαρ",
"Απρ", "Μαϊ", "Ιουν",
"Ιουλ", "Αυγ", "Σεπ",
"Οκτ", "Νοε", "Δεκ"],
	AM : "ΠΜ",
	PM :  "ΜΜ",
	am : "πμ",
	pm : "μμ",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Κλείσιμο",
	clear: "Καθαρισμός"
};calendar-locales/en.js000064400000001156151160614770010710
0ustar00window.JoomlaCalLocale = {
	today : "Today",
	weekend : [0, 6],
	wk : "wk",
	time : "Time:",
	days : ["Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday",
"Saturday"],
	shortDays : ["Sun", "Mon", "Tue",
"Wed", "Thu", "Fri", "Sat"],
	months : ["January", "February", "March",
"April", "May", "June", "July",
"August", "September", "October",
"November", "December"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov",
"Dec"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Close",
	clear: "Clear"
};calendar-locales/es.js000064400000001154151160614770010713
0ustar00window.JoomlaCalLocale = {
	today : "Hoy",
	weekend : [0, 6],
	wk : "Sem",
	time : "Hora:",
	days : ["Domingo", "Lunes", "Martes",
"Miércoles", "Jueves", "Viernes",
"Sábado"],
	shortDays : ["Do", "Lu", "Ma",
"Mi", "Ju", "Vi", "Sá"],
	months : ["Enero", "Febrero", "Marzo",
"Abril", "Mayo", "Junio", "Julio",
"Agosto", "Septiembre", "Octubre",
"Noviembre", "Diciembre"],
	shortMonths : ["Ene", "Feb", "Mar",
"Abr", "May", "Jun", "Jul",
"Ago", "Sep", "Oct", "Nov",
"Dic"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Cerrar",
	clear: "Limpiar"
};
calendar-locales/eu.js000064400000001220151160614770010707
0ustar00window.JoomlaCalLocale = {
	today : "Gaur",
	weekend : [0, 6],
	wk : "ast.",
	time : "Ordua:",
	days : ["Igandea", "Astelehena",
"Asteartea", "Asteazkena", "Osteguna",
"Ostirala", "Larunbata"],
	shortDays : ["ig.", "al.", "as.",
"az.", "og.", "or.", "lr."],
	months : ["Urtarrila", "Otsaila", "Martxoa",
"Apirila", "Maiatza", "Ekaina",
"Uztaila", "Abuztua", "Iraila",
"Urria", "Azaroa", "Abendua"],
	shortMonths : ["urt.", "ots.", "mar.",
"api.", "mai.", "eka.", "uzt.",
"abu.", "ira.", "urr.", "aza.",
"abe."],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Itxi",
	clear: "Garbitu"
};
calendar-locales/fa-ir.js000064400000001524151160614770011303
0ustar00window.JoomlaCalLocale = {
	today : "امروز",
	weekend : [5],
	wk : "هفته",
	time : "زمان",
	days : ["یکشنبه","دوشنبه","سه
شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
	shortDays :
["یک","دو","سه","چهار","پنج","جمعه","شنبه"],
	months :
["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],
	shortMonths :
["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],
	AM : "ق.ظ.",
	PM :  "ب.ظ.",
	am : "ق.ظ.",
	pm : "ب.ظ.",
	dateType : "jalali",
	minYear : 1268,
	maxYear : 1458,
	exit: "بستن",
	clear: "پاک",
	localLangNumbers:
["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"]
};calendar-locales/fi.js000064400000001245151160614770010703
0ustar00window.JoomlaCalLocale = {
	today : "Tänään",
	weekend : [0, 6],
	wk : "vk",
	time : "Aika:",
	days : ["Sunnuntai", "Maanantai", "Tiistai",
"Keskiviikko", "Torstai", "Perjantai",
"Lauantai"],
	shortDays : ["Su", "Ma", "Ti",
"Ke", "To", "Pe", "La"],
	months : ["Tammikuu", "Helmikuu",
"Maaliskuu", "Huhtikuu", "Toukokuu",
"Kesäkuu", "Heinäkuu", "Elokuu",
"Syyskuu", "Lokakuu", "Marraskuu",
"Joulukuu"],
	shortMonths : ["Tammi", "Helmi", "Maalis",
"Huhti", "Touko", "Kesä",
"Heinä", "Elo", "Syys", "Loka",
"Marras", "Joulu"],
	AM : "AP",
	PM :  "IP",
	am : "ap",
	pm : "ip",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Sulje",
	clear: "Tyhjennä"
};calendar-locales/fr.js000064400000001177151160614770010720
0ustar00window.JoomlaCalLocale = {
	today : "Aujourd'hui",
	weekend : [0, 6],
	wk : "wk",
	time : "Heure&nbsp;:",
	days : ["Dimanche", "Lundi", "Mardi",
"Mercredi", "Jeudi", "Vendredi",
"Samedi"],
	shortDays : ["Dim", "Lun", "Mar",
"Mer", "Jeu", "Ven", "Sam"],
	months : ["Janvier", "Février", "Mars",
"Avril", "Mai", "Juin", "Juillet",
"Août", "Septembre", "Octobre",
"Novembre", "Décembre"],
	shortMonths : ["Jan", "Fév", "Mar",
"Avr", "Mai", "Jui", "Juol",
"Aoû", "Sep", "Oct", "Nov",
"Déc"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Fermer",
	clear: "Effacer"
};calendar-locales/ga.js000064400000001302151160614770010666
0ustar00window.JoomlaCalLocale = {
	today : "Inniu",
	weekend : [0, 6],
	wk : "7n",
	time : "Am:",
	days : ["Dé Domhnaigh", "Dé Luain", "Dé
Máirt", "Dé Céadaoin", "Déardaoin", "Dé
hAoine", "Dé Sathairn"],
	shortDays : ["Domh", "Luan", "Máirt",
"Céad", "Déar", "Aoine", "Sath"],
	months : ["Eanáir", "Feabhra", "Márta",
"Aibreán", "Bealtaine", "Meitheamh",
"Iúil", "Lúnasa", "Meán Fómhair",
"Deireadh Fómhair", "Samhain", "Nollaig"],
	shortMonths : ["Ean", "Feabh", "Márta",
"Aib", "Beal", "Meith", "Iúil",
"Lún", "MFómh", "DFómh", "Samh",
"Noll"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Dún",
	clear: "Glan"
};
calendar-locales/hr.js000064400000001205151160614770010712
0ustar00window.JoomlaCalLocale = {
	today : "Danas",
	weekend : [0, 6],
	wk : "tj",
	time : "Vrijeme:",
	days : ["Nedjelja", "Ponedjeljak", "Utorak",
"Srijeda", "Četvrtak", "Petak",
"Subota"],
	shortDays : ["Ned", "Pon", "Uto",
"Sri", "Čet", "Pet", "Sub"],
	months : ["Siječanj", "Veljača",
"Ožujak", "Travanj", "Svibanj",
"Lipanj", "Srpanj", "Kolovoz",
"Rujan", "Listopad", "Studeni",
"Prosinac"],
	shortMonths : ["Sij", "Velj", "Ožu",
"Tra", "Svi", "Lip", "Srp",
"Kol", "Ruj", "Lis", "Stu",
"Pro"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Zatvori",
	clear: "Otkaži"
};calendar-locales/hu.js000064400000001222151160614770010714
0ustar00window.JoomlaCalLocale = {
	today : "Ma",
	weekend : [0, 6],
	wk : "hét",
	time : "Időpont:",
	days : ["vasárnap", "hétfő", "kedd",
"szerda", "csütörtök", "péntek",
"szombat"],
	shortDays : ["V", "H", "K", "Sze",
"Cs", "P", "Szo"],
	months : ["január", "február", "március",
"április", "május", "június",
"július", "augusztus", "szeptember",
"október", "november", "december"],
	shortMonths : ["jan", "febr", "márc",
"ápr", "máj", "jún", "júl",
"aug", "szept", "okt", "nov",
"dec"],
	AM : "de.",
	PM :  "du.",
	am : "de.",
	pm : "du.",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Bezárás",
	clear: "Törlés"
};calendar-locales/it.js000064400000001175151160614770010723
0ustar00window.JoomlaCalLocale = {
	today : "Oggi",
	weekend : [0, 6],
	wk : "set",
	time : "Ora:",
	days : ["Domenica", "Lunedì", "Martedì",
"Mercoledì", "Giovedì", "Venerdì",
"Sabato"],
	shortDays : ["Dom", "Lun", "Mar",
"Mer", "Gio", "Ven", "Sab"],
	months : ["Gennaio", "Febbraio", "Marzo",
"Aprile", "Maggio", "Giugno",
"Luglio", "Agosto", "Settembre",
"Ottobre", "Novembre", "Dicembre"],
	shortMonths : ["Gen", "Feb", "Mar",
"Apr", "Mag", "Giu", "Lug",
"Ago", "Set", "Ott", "Nov",
"Dic"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Chiudi",
	clear: "Annulla"
};calendar-locales/ja.js000064400000001217151160614770010676
0ustar00window.JoomlaCalLocale = {
	today : "今日",
	weekend : [0, 6],
	wk : "週",
	time : "時間:",
	days : ["日曜日", "月曜日",
"火曜日", "水曜日", "木曜日",
"金曜日", "土曜日"],
	shortDays : ["日", "月", "火",
"水", "木", "金", "土"],
	months : ["1月", "2月", "3月",
"4月", "5月", "6月", "7月",
"8月", "9月", "10月", "11月",
"12月"],
	shortMonths : ["1月", "2月", "3月",
"4月", "5月", "6月", "7月",
"8月", "9月", "10月", "11月",
"12月"],
	AM : "午前",
	PM :  "午後",
	am : "午前",
	pm : "午後",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "閉じる",
	clear: "クリア"
};calendar-locales/ka.js000064400000002120151160614770010671
0ustar00window.JoomlaCalLocale = {
	today : "დღეს",
	weekend : [0, 6],
	wk : "კვ",
	time : "დრო:",
	days : ["კვირა", "ორშაბათი",
"სამშაბათი",
"ოთხშაბათი",
"ხუთშაბათი",
"პარასკევი", "შაბათი"],
	shortDays : ["კვ", "ორშ",
"სამშ", "ოთხშ",
"ხუთშ", "პარ", "შაბ"],
	months : ["იანვარი",
"თებერვალი", "მარტი",
"აპრილი", "მაისი",
"ივნისი", "ივლისი",
"აგვისტო",
"სექტემბერი",
"ოქტომბერი",
"ნოემბერი",
"დეკემბერი"],
	shortMonths : ["იან", "თებ",
"მარ", "აპრ", "მაი",
"ივნ", "ივლ", "აგვ",
"სექ", "ოქტ", "ნოე",
"დეკ"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "დახურვა",
	clear: "გასუფთავება"
};calendar-locales/kk.js000064400000001506151160614770010712
0ustar00window.JoomlaCalLocale = {
	today : "Бүгін",
	weekend : [0, 6],
	wk : "апта",
	time : "Уақыт:",
	days : ["Жексенбі", "Дүйсенбі",
"Сейсенбі", "Сәрсенбі",
"Бейсенбі", "Жұма",
"Сенбі"],
	shortDays : ["Жекс", "Дүйс",
"Сейс", "Сәрс", "Бейс",
"Жұма", "Сенбі"],
	months : ["Қаңтар", "Ақпан",
"Наурыз", "Сәуір", "Мамыр",
"Маусым", "Шілде", "Тамыз",
"Қыркүйек", "Қазан",
"Қараша", "Желтоқсан"],
	shortMonths : ["Қаң", "Ақп", "Нау",
"Сәу", "Мам", "Мау",
"Шіл", "Там", "Қырк",
"Қаз", "Қар", "Жел"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Жабу",
	clear: "Өшіру"
};calendar-locales/ko.js000064400000001207151160614770010714
0ustar00window.JoomlaCalLocale = {
	today : "오늘",
	weekend : [0, 6],
	wk : "wk",
	time : "시간:",
	days : ["일요일", "월요일",
"화요일", "수요일", "목요일",
"금요일", "토요일"],
	shortDays : ["일", "월", "화",
"수", "목", "금", "토"],
	months : ["1월", "2월", "3월",
"4월", "5월", "6월", "7월",
"8월", "9월", "10월", "11월",
"12월"],
	shortMonths : ["1월", "2월", "3월",
"4월", "5월", "6월", "7월",
"8월", "9월", "10월", "11월",
"12월"],
	AM : "오전",
	PM :  "오후",
	am : "오전",
	pm : "오후",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "닫기",
	clear: "Clear"
};calendar-locales/lt.js000064400000001260151160614770010721
0ustar00window.JoomlaCalLocale = {
	today : "Šiandien",
	weekend : [0, 6],
	wk : "wk",
	time : "Laikas:",
	days : ["Sekmadienis", "Pirmadienis",
"Antradienis", "Trečiadienis",
"Ketvirtadienis", "Penktadienis",
"Šeštadienis"],
	shortDays : ["Sek", "Pir", "Ant",
"Tre", "Ket", "Pen", "Šeš"],
	months : ["Sausis", "Vasaris", "Kovas",
"Balandis", "Gegužė", "Birželis",
"Liepa", "Rugpjūtis", "Rugsšjis",
"Spalis", "Lapkritis", "Gruodis"],
	shortMonths : ["Sau", "Vas", "Kov",
"Bal", "Geg", "Bir", "Lie",
"Rug", "Rgs", "Spa", "Lap",
"Grd"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Uždaryti",
	clear: "Išvalyti"
};calendar-locales/mk.js000064400000001474151160614770010720
0ustar00window.JoomlaCalLocale = {
	today : "Денес",
	weekend : [0, 6],
	wk : "нед",
	time : "Време:",
	days : ["Недела", "Понеделник",
"Вторник", "Среда",
"Четврток", "Петок",
"Сабота"],
	shortDays : ["Нед", "Пон", "Вто",
"Сре", "Чет", "Пет",
"Саб"],
	months : ["Јануари", "Февруари",
"Март", "Април", "Мај",
"Јуни", "Јули", "Август",
"Септември", "Октомври",
"Ноември", "Декември"],
	shortMonths : ["Јан", "Фев", "Мар",
"Апр", "Мај", "Јун",
"Јул", "Авг", "Сеп",
"Окт", "Ное", "Дек"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Затвори",
	clear: "Зачувај"
};calendar-locales/nb.js000064400000001156151160614770010705
0ustar00window.JoomlaCalLocale = {
	today : "Dagens dato",
	weekend : [0, 6],
	wk : "Uke",
	time : "Tid:",
	days : ["Søndag", "Mandag", "Tirsdag",
"Onsdag", "Torsdag", "Fredag",
"Lørdag"],
	shortDays : ["Søn", "Man", "Tir",
"Ons", "Tor", "Fre", "Lør"],
	months : ["Januar", "Februar", "Mars",
"April", "Mai", "Juni", "Juli",
"August", "September", "Oktober",
"November", "Desember"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "Mai", "Jun", "Jul",
"Aug", "Sep", "Okt", "Nov",
"Des"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Lukk",
	clear: "Tøm"
};
calendar-locales/nl.js000064400000001166151160614770010720
0ustar00window.JoomlaCalLocale = {
	today : "Vandaag",
	weekend : [0, 6],
	wk : "wk",
	time : "Tijd:",
	days : ["Zondag", "Maandag", "Dinsdag",
"Woensdag", "Donderdag", "Vrijdag",
"Zaterdag"],
	shortDays : ["Zon", "Maa", "Din",
"Woe", "Don", "Vri", "Zat"],
	months : ["Januari", "Februari", "Maart",
"April", "Mei", "Juni", "Juli",
"Augustus", "September", "Oktober",
"November", "December"],
	shortMonths : ["Jan", "Feb", "Maa",
"Apr", "Mei", "Jun", "Jul",
"Aug", "Sep", "Okt", "Nov",
"Dec"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Sluiten",
	clear: "Legen"
};calendar-locales/pl.js000064400000001227151160614770010720
0ustar00window.JoomlaCalLocale = {
	today : "Dzisiaj",
	weekend : [0, 6],
	wk : "tydz",
	time : "Godzina:",
	days : ["Niedziela", "Poniedziałek",
"Wtorek", "Środa", "Czwartek",
"Piątek", "Sobota"],
	shortDays : ["nie.", "pon.", "wt.",
"śr.", "czw.", "pt.", "sob."],
	months : ["Styczeń", "Luty", "Marzec",
"Kwiecień", "Maj", "Czerwiec",
"Lipiec", "Sierpień", "Wrzesień",
"Październik", "Listopad", "Grudzień"],
	shortMonths : ["Sty", "Lut", "Mar",
"Kwi", "Maj", "Cze", "Lip",
"Sie", "Wrz", "Paź", "Lis",
"Gru"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Zamknij",
	clear: "Wyczyść"
};calendar-locales/prs-af.js000064400000001524151160614770011475
0ustar00window.JoomlaCalLocale = {
	today : "امروز",
	weekend : [5],
	wk : "هفته",
	time : "زمان",
	days : ["یکشنبه","دوشنبه","سه
شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
	shortDays :
["یک","دو","سه","چهار","پنج","جمعه","شنبه"],
	months :
["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],
	shortMonths :
["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],
	AM : "ق.ظ.",
	PM :  "ب.ظ.",
	am : "ق.ظ.",
	pm : "ب.ظ.",
	dateType : "jalali",
	minYear : 1268,
	maxYear : 1458,
	exit: "بستن",
	clear: "پاک",
	localLangNumbers:
["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"]
};calendar-locales/pt.js000064400000001215151160614770010725
0ustar00window.JoomlaCalLocale = {
	today : "Hoje",
	weekend : [0, 6],
	wk : "sem",
	time : "Hora:",
	days : ["Domingo", "Segunda-feira",
"Terça-feira", "Quarta-feira",
"Quinta-feira", "Sexta-feira", "Sábado"],
	shortDays : ["Dom", "Seg", "Ter",
"Qua", "Qui", "Sex", "Sab"],
	months : ["Janeiro", "Fevereiro", "Março",
"Abril", "Maio", "Junho", "Julho",
"Agosto", "Setembro", "Outubro",
"Novembro", "Dezembro"],
	shortMonths : ["Jan", "Fev", "Mar",
"Abr", "Mai", "Jun", "Jul",
"Ago", "Set", "Out", "Nov",
"Dez"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Fechar",
	clear: "Limpar"
};
calendar-locales/ru.js000064400000001473151160614770010736
0ustar00window.JoomlaCalLocale = {
	today : "Сегодня",
	weekend : [0, 6],
	wk : "нед",
	time : "Время:",
	days : ["Воскресенье",
"Понедельник", "Вторник",
"Среда", "Четверг",
"Пятница", "Суббота"],
	shortDays : ["Вс", "Пн", "Вт",
"Ср", "Чт", "Пт", "Сб"],
	months : ["Январь", "Февраль",
"Март", "Апрель", "Май",
"Июнь", "Июль", "Август",
"Сентябрь", "Октябрь",
"Ноябрь", "Декабрь"],
	shortMonths : ["Янв", "Фев", "Мар",
"Апр", "Май", "Июн",
"Июл", "Авг", "Сен",
"Окт", "Ноя", "Дек"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Закрыть",
	clear: "Очистить"
};
calendar-locales/sk.js000064400000001214151160614770010716
0ustar00window.JoomlaCalLocale = {
	today : "Dnes",
	weekend : [0, 6],
	wk : "týž.",
	time : "Čas:",
	days : ["Nedeľa", "Pondelok", "Utorok",
"Streda", "Štvrtok", "Piatok",
"Sobota"],
	shortDays : ["Ned", "Pon", "Uto",
"Str", "Štv", "Pia", "Sob"],
	months : ["Január", "Február", "Marec",
"Apríl", "Máj", "Jún", "Júl",
"August", "September", "Október",
"November", "December"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "Máj", "Jún", "Júl",
"Aug", "Sep", "Okt", "Nov",
"Dec"],
	AM : "DOPOL.",
	PM :  "POPOL.",
	am : "dopol.",
	pm : "popol.",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Zavrieť",
	clear: "Vymazať"
};
calendar-locales/sl.js000064400000001156151160614770010724
0ustar00window.JoomlaCalLocale = {
	today : "Danes",
	weekend : [0, 6],
	wk : "td",
	time : "Čas:",
	days : ["Nedelja", "Ponedeljek", "Torek",
"Sreda", "Četrtek", "Petek",
"Sobota"],
	shortDays : ["Ned", "Pon", "Tor",
"Sre", "Čet", "Pet", "Sob"],
	months : ["Januar", "Februar", "Marec",
"April", "Maj", "Junij", "Julij",
"Avgust", "September", "Oktober",
"November", "December"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "Maj", "Jun", "Jul",
"Avg", "Sep", "Okt", "Nov",
"Dec"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Zapri",
	clear: "Počisti"
};calendar-locales/sr-rs.js000064400000001464151160614770011356
0ustar00window.JoomlaCalLocale = {
	today : "Данас",
	weekend : [0, 6],
	wk : "нед",
	time : "Време:",
	days : ["Недеља", "Понедељак",
"Уторак", "Среда",
"Четвртак", "Петак",
"Субота"],
	shortDays : ["Нед", "Пон", "Уто",
"Сре", "Чет", "Пет",
"Суб"],
	months : ["Јануар", "Фенруар",
"Март", "Април", "Мај",
"Јуни", "Јули", "Август",
"Септембар", "Октобар",
"Новембар", "Децембар"],
	shortMonths : ["Јан", "Феб", "Мар",
"Апр", "Мај", "Јун",
"Јул", "Авг", "Сеп",
"Окт", "Нов", "Дец"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Затвори",
	clear: "Зачувај"
};calendar-locales/sr-yu.js000064400000001162151160614770011362
0ustar00window.JoomlaCalLocale = {
	today : "Danas",
	weekend : [0, 6],
	wk : "ned",
	time : "Vreme:",
	days : ["Nedelja", "Ponedeljak", "Utorak",
"Sreda", "Četvrtak", "Petak",
"Subota"],
	shortDays : ["Ned", "Pon", "Uto",
"Sre", "Čet", "Pet", "Sub"],
	months : ["Januar", "Fenruar", "Mart",
"April", "Maj", "Juni", "Juli",
"Avgust", "Septembar", "Oktobar",
"Novembar", "Decembar"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "Maj", "Jun", "Jul",
"Avg", "Sep", "Okt", "Nov",
"Dec"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Zatvori",
	clear: "Sačuvaj"
};
calendar-locales/sv.js000064400000001154151160614770010734
0ustar00window.JoomlaCalLocale = {
	today : "Idag",
	weekend : [0, 6],
	wk : "vk",
	time : "Tid:",
	days : ["Söndag", "Måndag", "Tisdag",
"Onsdag", "Torsdag", "Fredag",
"Lördag"],
	shortDays : ["Sön", "Mån", "Tis",
"Ons", "Tor", "Fre", "Lör"],
	months : ["Januari", "Februari", "Mars",
"April", "Maj", "Juni", "Juli",
"Augusti", "September", "Oktober",
"November", "December"],
	shortMonths : ["Jan", "Feb", "Mar",
"Apr", "Maj", "Jun", "Jul",
"Aug", "Sep", "Okt", "Nov",
"Dec"],
	AM : "FM",
	PM :  "EM",
	am : "fm",
	pm : "em",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Stäng",
	clear: "Rensa"
};calendar-locales/sw.js000064400000001163151160614770010735
0ustar00window.JoomlaCalLocale = {
	today : "Leo",
	weekend : [0, 6],
	wk : "wk",
	time : "Saa:",
	days : ["Jumapili", "Jumatatu", "Jumanne",
"Jumatano", "Alhamisi", "Ijumaa",
"Jumamosi"],
	shortDays : ["Jmp", "Jmt", "Jmn",
"Jtn", "Alh", "Ijm", "Jmm"],
	months : ["Januari", "Februari", "Machi",
"Aprili", "Mai", "Juni", "Julai",
"Augosti", "Septemba", "Oktoba",
"Novemba", "Desemba"],
	shortMonths : ["Jan", "Feb", "Mach",
"Apr", "Mai", "Jun", "Jul",
"Ago", "Sep", "Okt", "Nov",
"Des"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Funga",
	clear: "Safisha"
};calendar-locales/ta.js000064400000001771151160614770010715
0ustar00window.JoomlaCalLocale = {
	today : "இன்று",
	weekend : [0, 6],
	wk : "வா",
	time : "நேரம்:",
	days : ["ஞாயிறு", "திங்கள்",
"செவ்வாய்", "புதன்",
"வியாழன்", "வெள்ளி",
"சனி"],
	shortDays : ["ஞா", "தி", "செ",
"பு", "வி", "வெ",
"ச"],
	months : ["ஜனவரி",
"பிப்ரவரி", "மார்ச்",
"ஏப்ரல்", "மே",
"ஜூன்", "ஜூலை",
"ஆகஸ்ட்", "செப்டம்பர்",
"அக்டோபர்", "நவம்பர்",
"டிசம்பர்"],
	shortMonths : ["ஜன", "பிப்",
"மார்", "ஏப்", "மே",
"ஜூன்", "ஜூலை", "ஆக",
"செப்", "அக்", "நவ",
"டிச"],
	AM : "முப",
	PM : "பிப",
	am : "முப",
	pm : "பிப",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "மூடுக",
	clear: "துடைக்க"
};calendar-locales/th.js000064400000001761151160614770010723
0ustar00window.JoomlaCalLocale = {
	today : "วันนี้",
	weekend : [0, 6],
	wk : "สัปดาห์",
	time : "เวลา:",
	days : ["อาทิตย์", "จันทร์",
"อังคาร", "พุธ",
"พฤหัสบดี", "ศุกร์",
"เสาร์"],
	shortDays : ["อา.", "จ.", "อ.",
"พ.", "พฤ.", "ศ.", "ส."],
	months : ["มกราคม",
"กุมภาพันธ์", "มีนาคม",
"เมษายน", "พฤษภาคม",
"มิถุนายน", "กรกฏาคม",
"สิงหาคม", "กันยายน",
"ตุลาคม", "พฤศจิกายน",
"ธันวาคม"],
	shortMonths : ["ม.ค.", "ก.พ.",
"มี.ค.", "เม.ย.", "พ.ค.",
"มิ.ย.", "ก.ค.", "ส.ค.",
"ก.ย.", "ต.ค.", "พ.ย.",
"ธ.ค."],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "ปิด",
	clear: "ล้าง"
};calendar-locales/uk.js000064400000001555151160614770010730
0ustar00window.JoomlaCalLocale = {
	today : "Сьогодні",
	weekend : [0, 6],
	wk : "тждн.",
	time : "Час:",
	days : ["Неділя", "Понеділок",
"Вівторок", "Середа",
"Четвер", "П'ятниця",
"Субота"],
	shortDays : ["Нд.", "Пн.", "Вт.",
"Ср.", "Чт.", "Пт.",
"Сб."],
	months : ["Січень", "Лютий",
"Березень", "Квітень",
"Травень", "Червень",
"Липень", "Серпень",
"Вересень", "Жовтень",
"Листопад", "Грудень"],
	shortMonths : ["Січ.", "Лют.",
"Бер.", "Квіт.", "Трав.",
"Черв.", "Лип.", "Серп.",
"Вер.", "Жовт.", "Лист.",
"Груд."],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "Закрити",
	clear: "Очистити"
};calendar-locales/zh-CN.js000064400000001235151160614770011223
0ustar00window.JoomlaCalLocale = {
	today : "今天",
	weekend : [0, 6],
	wk : "星期",
	time : "时间",
	days : ["星期日", "星期一",
"星期二", "星期三", "星期四",
"星期五", "星期六"],
	shortDays : ["日", "一", "二",
"三", "四", "五", "六"],
	months : ["一月", "二月", "三月",
"四月", "五月", "六月",
"七月", "八月", "九月",
"十月", "十一月", "十二月"],
	shortMonths : ["一", "二", "三",
"四", "五", "六", "七",
"八", "九", "十", "十一",
"十二"],
	AM : "上午",
	PM :  "下午",
	am : "上午",
	pm : "下午",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "关闭",
	clear: "清除"
};calendar-locales/zh-TW.js000064400000001142151160614770011252
0ustar00window.JoomlaCalLocale = {
	today : "今天",
	weekend : [0, 6],
	wk : "週",
	time : "時間:",
	days : ["日", "一", "二",
"三", "四", "五", "六"],
	shortDays : ["日", "一", "二",
"三", "四", "五", "六"],
	months : ["一月", "二月", "三月",
"四月", "五月", "六月",
"七月", "八月", "九月",
"十月", "十一月", "十二月"],
	shortMonths : ["一", "二", "三",
"四", "五", "六", "七",
"八", "九", "十", "十一",
"十二"],
	AM : "AM",
	PM :  "PM",
	am : "am",
	pm : "pm",
	dateType : "gregorian",
	minYear : 1900,
	maxYear : 2100,
	exit: "關閉",
	clear: "清除"
};
calendar.js000064400000124065151160614770006673 0ustar00/**
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */
!(function(window, document){
	'use strict';

	/** Method to convert numbers to local symbols. */
	Date.convertNumbers = function(str) {
		var str = str.toString();

		if (Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers) ===
'[object Array]') {
			for (var i = 0; i < JoomlaCalLocale.localLangNumbers.length; i++) {
				str = str.replace(new RegExp(i, 'g'),
JoomlaCalLocale.localLangNumbers[i]);
			}
		}
		return str;
	};

	/** Translates to english numbers a string. */
	Date.toEnglish = function(str) {
		str = this.toString();
		var nums = [0,1,2,3,4,5,6,7,8,9];
		for (var i = 0; i < 10; i++) {
			str = str.replace(new RegExp(nums[i], 'g'), i);
		}
		return str;
	};

	var JoomlaCalendar = function (element) {

		// Initialize only if the element exists
		if (!element) {
			throw new Error("Calendar setup failed:\n  No valid element found,
Please check your code");
		}

		if (typeof Date.parseFieldDate !== 'function') {
			throw new Error("Calendar setup failed:\n  No valid date helper,
Please check your code");
		}

		if (element._joomlaCalendar) {
			throw new Error('JoomlaCalendar instance already exists for the
element');
		}

		element._joomlaCalendar = this;

		this.writable   = true;
		this.hidden     = true;
		this.params     = {};
		this.element    = element;
		this.inputField = element.getElementsByTagName('input')[0];
		this.button     = element.getElementsByTagName('button')[0];

		if (!this.inputField) {
			throw new Error("Calendar setup failed:\n  No valid input found,
Please check your code");
		}

		// Prepare the parameters
		this.params = {
			debug: false,
			clicked: false,
			element: {style: {display: "none"}},
			writable: true
		};

		var self = this,
			btn  = this.button,
			instanceParams = {
				inputField      : this.inputField,
				dateType        : JoomlaCalLocale.dateType ? JoomlaCalLocale.dateType :
'gregorian',
				direction       : (document.dir !== undefined) ? document.dir :
document.getElementsByTagName("html")[0].getAttribute("dir"),
				firstDayOfWeek  : btn.getAttribute("data-firstday") ?
parseInt(btn.getAttribute("data-firstday")) : 0,
				dateFormat      : "%Y-%m-%d %H:%M:%S",
				weekend         : JoomlaCalLocale.weekend ? JoomlaCalLocale.weekend :
[0,6],
				minYear         : JoomlaCalLocale.minYear ? JoomlaCalLocale.minYear :
1900,
				maxYear         : JoomlaCalLocale.maxYear ? JoomlaCalLocale.maxYear :
2100,
				minYearTmp      : btn.getAttribute("data-min-year"),
				maxYearTmp      : btn.getAttribute("data-max-year"),
				weekendTmp      : btn.getAttribute("data-weekend"),
				time24          : true,
				showsOthers     :
(parseInt(btn.getAttribute("data-show-others")) === 1) ? true :
false,
				showsTime       : true,
				weekNumbers     :
(parseInt(btn.getAttribute("data-week-numbers")) === 1) ? true :
false,
				showsTodayBtn   : true,
				compressedHeader:
(parseInt(btn.getAttribute("data-only-months-nav")) === 1) ? true
: false,
			};

		// Keep B/C
		if (btn.getAttribute("data-dayformat")) {
			instanceParams.dateFormat = btn.getAttribute("data-dayformat")
? btn.getAttribute("data-dayformat") : "%Y-%m-%d
%H:%M:%S";
		}

		if (btn.getAttribute("data-time-24")) {
			instanceParams.time24 =
parseInt(btn.getAttribute("data-time-24")) === 24 ? true : false;
		}

		if (btn.getAttribute("data-show-time")) {
			instanceParams.showsTime =
parseInt(btn.getAttribute("data-show-time")) === 1 ? true :
false;
		}

		if (btn.getAttribute("data-today-btn")) {
			instanceParams.showsTodayBtn =
parseInt(btn.getAttribute("data-today-btn")) === 1 ? true :
false;
		}

		// Merge the parameters
		for (var param in instanceParams) {
			this.params[param] = instanceParams[param];
		}

		// Evaluate the min year
		if (isInt(self.params.minYearTmp)) {
			self.params.minYear = getBoundary(parseInt(self.params.minYearTmp),
self.params.dateType);
		}
		// Evaluate the max year
		if (isInt(self.params.maxYearTmp)) {
			self.params.maxYear = getBoundary(parseInt(self.params.maxYearTmp),
self.params.dateType);
		}
		// Evaluate the weekend days
		if (self.params.weekendTmp !== "undefined") {
			self.params.weekend =
self.params.weekendTmp.split(',').map(function(item) { return
parseInt(item, 10); });
		}

		// Event handler need to define here, to be able access in current
context
		this._dayMouseDown = function(event) {
			return self._handleDayMouseDown(event);
		};
		this._calKeyEvent = function(event) {
			return self._handleCalKeyEvent(event);
		};
		this._documentClick = function(event) {
			return self._handleDocumentClick(event);
		};

		// Set it up
		this.checkInputs();

		// For the fields with readonly tag calendar will not initiate fully
		if (this.inputField.getAttribute('readonly')) {
			return;
		}

		this._create();
		this._bindEvents();
	};

	JoomlaCalendar.prototype.checkInputs = function () {
		// Get the date from the input
		var inputAltValueDate =
Date.parseFieldDate(this.inputField.getAttribute('data-alt-value'),
this.params.dateFormat, 'gregorian');

		if (this.inputField.value !== '') {
			this.date = inputAltValueDate;
			this.inputField.value = inputAltValueDate.print(this.params.dateFormat,
this.params.dateType, true);
		} else {
			this.date = new Date();
		}
	};

	/** Removes the calendar object from the DOM tree and destroys it and then
recreates it. */
	JoomlaCalendar.prototype.recreate = function () {
		var element = this.element, el =
element.querySelector('.js-calendar');
		if (el) {
			element._joomlaCalendar = null;
			el.parentNode.removeChild(el);
			new JoomlaCalendar(element);
		}
	};

	/** Time Control */
	JoomlaCalendar.prototype.updateTime = function (hours, mins, secs) {
		var self = this,
			date = self.date;

		var d = self.date.getLocalDate(self.params.dateType),
			m = self.date.getLocalMonth(self.params.dateType),
			y = self.date.getLocalFullYear(self.params.dateType),
			ampm =
this.inputField.parentNode.parentNode.querySelectorAll('.time-ampm')[0];

		if (!self.params.time24) {
			if (/pm/i.test(ampm.value) && hours < 12) {
				hours = parseInt(hours) + 12;
			} else if (/am/i.test(ampm.value) && hours == 12) {
				hours = 0;
			}
		}

		date.setHours(hours);
		date.setMinutes(parseInt(mins, 10));
		date.setSeconds(date.getSeconds());
		date.setLocalFullYear(self.params.dateType, y);
		date.setLocalMonth(self.params.dateType, m);
		date.setLocalDate(self.params.dateType, d);
		self.dateClicked = false;

		this.callHandler();
	};

	/** Method to set the date to the given date object */
	JoomlaCalendar.prototype.setDate = function (date) {
		if (!date.equalsTo(this.date)) {
			this.date = date;
			this.processCalendar(this.params.firstDayOfWeek, date);
		}
	};

	/** Method to set the current date by a number, step */
	JoomlaCalendar.prototype.moveCursorBy = function (step) {
		var date = new Date(this.date);
		date.setDate(date.getDate() - step);
		this.setDate(date);
	};

	/** Reset select element */
	JoomlaCalendar.prototype.resetSelected = function (element) {
		var options = element.options;
		var i = options.length;
		while (i--) {
			var current = options[i];
			if (current.selected) {
				current.selected = false;
			}
		}
	};

	/** Method to set the value for the input field */
	JoomlaCalendar.prototype.callHandler = function () {
		/** Output the date **/
		this.inputField.setAttribute('data-alt-value',
this.date.print(this.params.dateFormat, 'gregorian', false));

		if (this.inputField.getAttribute('data-alt-value') &&
this.inputField.getAttribute('data-alt-value') !==
'0000-00-00 00:00:00') {
			this.inputField.value = this.date.print(this.params.dateFormat,
this.params.dateType, true);
			if (this.params.dateType !== 'gregorian') {
				this.inputField.setAttribute('data-local-value',
this.date.print(this.params.dateFormat, this.params.dateType, true));
			}
		}
		this.inputField.value = this.date.print(this.params.dateFormat,
this.params.dateType, true);

		if (typeof this.inputField.onchange == "function") {
			this.inputField.onchange();
		}

		if (this.dateClicked && typeof this.params.onUpdate ===
"function") {
			this.params.onUpdate(this);
		}

		if (this.dateClicked) {
			this.close();
		} else {
			this.processCalendar();
		}
	};

	/** Method to close/hide the calendar */
	JoomlaCalendar.prototype.close = function () {
		this.hide();
	};

	/** Method to show the calendar. */
	JoomlaCalendar.prototype.show = function () {
		/** This is needed for IE8 */
		if (navigator.appName.indexOf("Internet Explorer")!==-1) {
			var badBrowser = (
				navigator.appVersion.indexOf("MSIE 9")===-1 &&
				navigator.appVersion.indexOf("MSIE 1")===-1
			);

			if (badBrowser) {
				if (window.jQuery && jQuery().chosen) {
					var selItems = this.element.getElementsByTagName('select');
					for (var i = 0; i < selItems.length; i++) {
						jQuery(selItems[i]).chosen('destroy');
					}
				}
			}
		}

		this.checkInputs();
		this.inputField.focus();
		this.dropdownElement.style.display = "block";
		this.hidden = false;

		document.addEventListener("keydown", this._calKeyEvent, true);
		document.addEventListener("keypress", this._calKeyEvent, true);
		document.addEventListener("mousedown", this._documentClick,
true);

		/** Move the calendar to top position if it doesn't fit below. */
		var containerTmp = this.element.querySelector('.js-calendar');

		if (window.innerHeight < containerTmp.getBoundingClientRect().bottom +
20) {
			containerTmp.style.marginTop = -
(containerTmp.getBoundingClientRect().height +
this.inputField.getBoundingClientRect().height) + "px";
		}

		this.processCalendar();
	};

	/** Method to hide the calendar. */
	JoomlaCalendar.prototype.hide = function () {
		document.removeEventListener("keydown", this._calKeyEvent,
true);
		document.removeEventListener("keypress", this._calKeyEvent,
true);
		document.removeEventListener("mousedown", this._documentClick,
true);

		this.dropdownElement.style.display = "none";
		this.hidden = true;
	};

	/** Method to catch clicks outside of the calendar (used as close call) */
	JoomlaCalendar.prototype._handleDocumentClick = function (ev) {
		var el = ev.target;

		if (el !== null && !el.classList.contains('time')) {
			for (; el !== null && el !== this.element; el = el.parentNode);
		}

		if (el === null) {
			document.activeElement.blur();
			this.hide();
			return stopCalEvent(ev);
		}
	};

	/** Method to handle mouse click events (menus, buttons) **/
	JoomlaCalendar.prototype._handleDayMouseDown = function (ev) {
		var self = this,
			el = ev.currentTarget,
			target = ev.target || ev.srcElement;

		if (target && target.hasAttribute('data-action')) {
			return;
		}

		if (el.nodeName !== 'TD') {                         // A
bootstrap inner button was pressed?
			var testel = el.getParent('TD');
			if (testel.nodeName === 'TD') {                 // Yes so use
that element's td
				el = testel;
			} else {                                        // No - try to find the
table this way
				el = el.getParent('TD');
				if (el.classList.contains('js-calendar')) {
					el = el.getElementsByTagName('table')[0];
				}
			}
		} else {                                            // Check that
doesn't have a button and is not a day td
			if (!(target.classList.contains('js-btn')) &&
!el.classList.contains('day') &&
!el.classList.contains('title')) {
				return;
			}
		}

		if (!el || el.disabled) {
			return false;
		}

		if (typeof el.navtype === "undefined" || el.navtype !== 300) {
			if (el.navtype === 50) { el._current = el.innerHTML; }

			if (target === el || target.parentNode === el) { self.cellClick(el, ev);
}

			var mon = null;
			if (typeof el.month !== "undefined") {
				mon = el;
			}
			if (typeof el.parentNode.month !== "undefined") {
				mon = el.parentNode;
			}
			var date = null;
			if (mon) {
				date = new Date(self.date);
				if (mon.month !== date.getLocalMonth(self.params.dateType)) {
					date.setLocalMonth(self.params.dateType, mon.month);
					self.setDate(date);
					self.dateClicked = false;
					this.callHandler();
				}
			} else {
				var year = null;
				if (typeof el.year !== "undefined") {
					year = target;
				}
				if (typeof el.parentNode.year !== "undefined") {
					year = target.parentNode;
				}
				if (year) {
					date = new Date(self.date);
					if (year.year !== date.getLocalFullYear(self.params.dateType)) {
						date.setFullYear(self.params.dateType, year.year);
						self.setDate(date);
						self.dateClicked = false;
						this.callHandler();
					}
				}
			}
		}

		return stopCalEvent(ev);
	};

	/** Method to handle mouse click events (dates) **/
	JoomlaCalendar.prototype.cellClick = function (el, ev) {
		var self = this,
			closing = false,
			newdate = false,
			date = null;

		if (typeof el.navtype === "undefined") {
			if (self.currentDateEl) {
				el.classList.add("selected");
				self.currentDateEl = el.caldate;
				closing = (self.currentDateEl === el.caldate);
				if (!closing) {
					self.currentDateEl = el.caldate;
				}
			}
			self.date.setLocalDateOnly('gregorian', el.caldate);
			var other_month = !(self.dateClicked = !el.otherMonth);
			if (self.currentDateEl) { newdate = !el.disabled; }
			if (other_month) {
				this.processCalendar();
			}
		} else {
			date = new Date(self.date);
			self.dateClicked = false;
			var year = date.getOtherFullYear(self.params.dateType), mon =
date.getLocalMonth(self.params.dateType);
			switch (el.navtype) {
				case 400:
					break;
				case -2:                                                               
             // Prev year
					if (!self.params.compressedHeader) {
						if (year > self.params.minYear) {
							date.setOtherFullYear(self.params.dateType, year - 1);
						}
					}
					break;
				case -1:                                                               
             // Prev month
					var day = date.getLocalDate(self.params.dateType);
					if (mon > 0) {
						var max = date.getLocalMonthDays(self.params.dateType, mon - 1);
						if (day > max) {
							date.setLocalDate(self.params.dateType, max);
						}
						date.setLocalMonth(self.params.dateType, mon - 1);
					} else if (year-- > self.params.minYear) {
						date.setOtherFullYear(self.params.dateType, year);
						var max = date.getLocalMonthDays(self.params.dateType, 11);
						if (day > max) {
							date.setLocalDate(self.params.dateType, max);
						}
						date.setLocalMonth(self.params.dateType, 11);
					}
					break;
				case 1:                                                                
            // Next month
					var day = date.getLocalDate(self.params.dateType);
					if (mon < 11) {
						var max = date.getLocalMonthDays(self.params.dateType, mon + 1);
						if (day > max) {
							date.setLocalDate(self.params.dateType, max);
						}
						date.setLocalMonth(self.params.dateType, mon + 1);
					} else if (year < self.params.maxYear) {
						date.setOtherFullYear(self.params.dateType, year + 1);
						var max = date.getLocalMonthDays(self.params.dateType, 0);
						if (day > max) {
							date.setLocalDate(self.params.dateType, max);
						}
						date.setLocalMonth(self.params.dateType, 0);
					}
					break;
				case 2:                                                                
            // Next year
					if (!self.params.compressedHeader)
						if (year < self.params.maxYear) {
							date.setOtherFullYear(self.params.dateType, year + 1);
						}
					break;
				case 0:                                                                
            // Today
					break;
			}

			if (!date.equalsTo(self.date)) {
				this.setDate(date);
				newdate = true;
			} else if (el.navtype === 0) {
				newdate = closing = true;
			}
		}

		if (newdate) {
			if (self.params.showsTime) {
				this.dateClicked = false;
			}
			ev && this.callHandler();
		}

		el.classList.remove("hilite");

		if (closing && !self.params.showsTime) {
			self.dateClicked = false;
			ev && this.close();
		}
	};

	/** Method to handle keyboard click events **/
	JoomlaCalendar.prototype._handleCalKeyEvent = function (ev) {
		var self = this,
			K = ev.keyCode;

		// Get value from input
		if (ev.target === this.inputField && (K === 13 || K === 9)) {
			this.close();
		}

		if (self.params.direction === 'rtl') {
			if (K === 37) {
				K = 39;
			} else if (K === 39) {
				K = 37;
			}
		}

		if (K === 32) {                                // KEY Shift + space (now)
			if (ev.shiftKey) {
				ev.preventDefault();
				this.cellClick(self._nav_now, ev);
				self.close();
			}
		}
		if (K === 27) {                                // KEY esc (close);
			this.close();
		}
		if (K === 38) {                                // KEY up (previous week)
			this.moveCursorBy(7);
		}
		if (K === 40) {                                // KEY down (next week)
			this.moveCursorBy( -7);
		}
		if (K === 37) {                                // KEY left (previous day)
			this.moveCursorBy(1);
		}
		if (K === 39) {                                // KEY right (next day)
			this.moveCursorBy( -1);
		}
		if (ev.target === this.inputField && !(K>48 || K<57 ||
K===186 || K===189 || K===190 || K===32)) {
			return stopCalEvent(ev);
		}
	};

	/** Method to create the html structure of the calendar */
	JoomlaCalendar.prototype._create = function () {
		var self   = this,
			parent = this.element,
			table  = createElement("table"),
			div    = createElement("div");

		this.table = table;
		table.className = 'table';
		table.cellSpacing = 0;
		table.cellPadding = 0;
		table.style.marginBottom = 0;

		this.dropdownElement = div;
		parent.appendChild(div);

		if (this.params.direction) {
			div.style.direction = this.params.direction;
		}

		div.className = 'js-calendar';
		div.style.position = "absolute";
		div.style.boxShadow = "0px 0px 70px 0px rgba(0,0,0,0.67)";
		div.style.minWidth = this.inputField.width;
		div.style.padding = '0';
		div.style.display = "none";
		div.style.left = "auto";
		div.style.top = "auto";
		div.style.zIndex = 1060;
		div.style.borderRadius = "20px";

		this.wrapper = createElement('div');
		this.wrapper.className = 'calendar-container';
		div.appendChild(this.wrapper);
		this.wrapper.appendChild(table);

		var thead = createElement("thead", table);
		thead.className = 'calendar-header';

		var cell = null,
			row  = null,
			cal  = this,
			hh   = function (text, cs, navtype, node, styles, classes, attributes) {
				node = node ? node : "td";
				styles = styles ? styles : {};
				cell = createElement(node, row);
				if (cs) {
					classes = classes ? 'class="' + classes +
'"' : '';
				cell.colSpan = cs;
				}

				for (var key in styles) {
					cell.style[key] = styles[key];
				}
				for (var key in attributes) {
					cell.setAttribute(key, attributes[key]);
				}
				if (navtype !== 0 && Math.abs(navtype) <= 2) {
					cell.className += " nav";
				}

				if (cs) {
					cell.addEventListener("mousedown", self._dayMouseDown,
true);
				}

				cell.calendar = cal;
				cell.navtype = navtype;
				if (navtype !== 0 && Math.abs(navtype) <= 2) {
					cell.innerHTML = "<a " + classes + "
style='display:inline;padding:2px
6px;cursor:pointer;text-decoration:none;'
unselectable='on'>" + text + "</a>";
				} else {
					cell.innerHTML = cs ? "<div unselectable='on'"
+ classes + ">" + text + "</div>" : text;
					if (!cs && classes) {
						cell.className = classes;
					}
				}
				return cell;
			};

		if (this.params.compressedHeader === false) {                            
                           // Head - year
			row = createElement("tr", thead);
			row.className = "calendar-head-row";
			this._nav_py = hh("&lsaquo;", 1, -2, '',
{"text-align": "center", "font-size":
"18px", "line-height": "18px"}, 'js-btn
btn-prev-year');                   // Previous year button
			this.title = hh('<div
style="text-align:center;font-size:18px"><span></span></div>',
this.params.weekNumbers ? 6 : 5, 300);
			this.title.className = "title";
			this._nav_ny = hh(" &rsaquo;", 1, 2, '',
{"text-align": "center", "font-size":
"18px", "line-height": "18px"}, 'js-btn
btn-next-year');                   // Next year button
		}

		row = createElement("tr", thead);                              
                                    // Head - month
		row.className = "calendar-head-row";
		this._nav_pm = hh("&lsaquo;", 1, -1, '',
{"text-align": "center", "font-size":
"2em", "line-height": "1em"}, 'js-btn
btn-prev-month');                       // Previous month button
		this._nav_month = hh('<div
style="text-align:center;font-size:1.2em"><span></span></div>',
this.params.weekNumbers ? 6 : 5, 888, 'td',
{'textAlign': 'center'});
		this._nav_month.className = "title";
		this._nav_nm = hh(" &rsaquo;", 1, 1, '',
{"text-align": "center", "font-size":
"2em", "line-height": "1em"}, 'js-btn
btn-next-month');                       // Next month button

		row = createElement("tr", thead);                              
                                    // day names
		row.className = self.params.weekNumbers ? "daynames wk" :
"daynames";
		if (this.params.weekNumbers) {
			cell = createElement("td", row);
			cell.className = "day-name wn";
			cell.innerHTML = JoomlaCalLocale.wk;
		}
		for (var i = 7; i > 0; --i) {
			cell = createElement("td", row);
			if (!i) {
				cell.calendar = self;
			}
		}
		this.firstdayname = (this.params.weekNumbers) ?
row.firstChild.nextSibling : row.firstChild;

		var fdow = this.params.firstDayOfWeek,
			cell = this.firstdayname,
			weekend = JoomlaCalLocale.weekend;

		for (var i = 0; i < 7; ++i) {
			var realday = (i + fdow) % 7;
			cell.classList.add("day-name");
			this.params.weekNumbers ? cell.classList.add('day-name-week')
: '';

			if (i) {
				cell.calendar = self;
				cell.fdow = realday;
			}
			if (weekend.indexOf(weekend) !== -1) {
				cell.classList.add("weekend");
			}

			cell.innerHTML = JoomlaCalLocale.shortDays[(i + fdow) % 7];
			cell = cell.nextSibling;
		}

		var tbody = createElement("tbody", table);
		this.tbody = tbody;
		for (i = 6; i > 0; --i) {
			row = createElement("tr", tbody);
			if (this.params.weekNumbers) {
				cell = createElement("td", row);
			}

			for (var j = 7; j > 0; --j) {
				cell = createElement("td", row);
				cell.calendar = this;
				cell.addEventListener("mousedown", this._dayMouseDown, true);
			}
		}

		if (this.params.showsTime) {
			row = createElement("tr", tbody);
			row.className = "time";

			cell = createElement("td", row);
			cell.className = "time time-title";
			cell.colSpan = 1;
			cell.style.verticalAlign = 'middle';
			cell.innerHTML = " ";

			var cell1 = createElement("td", row);
			cell1.className = "time hours-select";
			cell1.colSpan = 2;

			var cell2 = createElement("td", row);
			cell2.className = "time minutes-select";
			cell2.colSpan = 2;

			(function () {
				function makeTimePart(className, selected, range_start, range_end,
cellTml) {
					var part = createElement("select", cellTml), num;
					part.calendar  = self;
					part.className =  className;
					part.setAttribute('data-chosen', true); // avoid Chosen,
hack
					part.style.width = '100%';
					part.navtype = 50;
					part._range = [];
					for (var i = range_start; i <= range_end; ++i) {
						var txt, selAttr = '';
						if (i === selected) {
							selAttr = true;
						}
						if (i < 10 && range_end >= 10) {
							num = '0' + i;
							txt = Date.convertNumbers('0') + Date.convertNumbers(i);
						} else {
							num = '' + i;
							txt = '' + Date.convertNumbers(i);
						}
						part.options.add(new Option(txt, num, selAttr, selAttr));
					}
					return part;
				}
				var hrs  = self.date.getHours(),
					mins = self.date.getMinutes(),
					t12  = !self.params.time24,
					pm   = (self.date.getHours() > 12);

				if (t12 && pm) {
					hrs -= 12;
				}

				var H = makeTimePart("time time-hours", hrs, t12 ? 1 : 0, t12
? 12 : 23, cell1),
					M = makeTimePart("time time-minutes", mins, 0, 59, cell2),
					AP = null;

				cell = createElement("td", row);
				cell.className = "time ampm-select";
				cell.colSpan = self.params.weekNumbers ? 1 : 2;

				if (t12) {
					var selAttr = true,
						altDate =
Date.parseFieldDate(self.inputField.getAttribute('data-alt-value'),
self.params.dateFormat, 'gregorian');
					pm = (altDate.getHours() >= 12);

					var part = createElement("select", cell);
					part.className = "time-ampm";
					part.style.width = '100%';
					part.options.add(new Option(JoomlaCalLocale.PM, "pm", pm ?
selAttr : '', pm ? selAttr : ''));
					part.options.add(new Option(JoomlaCalLocale.AM, "am", pm ?
'' : selAttr, pm ? '' : selAttr));
					AP = part;

					// Event listener for the am/pm select
					AP.addEventListener("change", function (event) {
						self.updateTime(event.target.parentNode.parentNode.childNodes[1].childNodes[0].value,
							event.target.parentNode.parentNode.childNodes[2].childNodes[0].value,
							event.target.parentNode.parentNode.childNodes[3].childNodes[0].value);
					}, false);
				} else {
					cell.innerHTML = "&#160;";
					cell.colSpan = self.params.weekNumbers ? 3 : 2;
				}

				H.addEventListener("change", function (event) {
					self.updateTime(event.target.parentNode.parentNode.childNodes[1].childNodes[0].value,
						event.target.parentNode.parentNode.childNodes[2].childNodes[0].value,
						event.target.parentNode.parentNode.childNodes[3].childNodes[0].value);
				}, false);
				M.addEventListener("change", function (event) {
					self.updateTime(event.target.parentNode.parentNode.childNodes[1].childNodes[0].value,
						event.target.parentNode.parentNode.childNodes[2].childNodes[0].value,
						event.target.parentNode.parentNode.childNodes[3].childNodes[0].value);
				}, false);
			})();
		}

		row = createElement("div", this.wrapper);
		row.className = "buttons-wrapper btn-group";

		this._nav_clear = hh(JoomlaCalLocale.clear, '', 100,
'button', '', 'js-btn btn btn-clear',
{"type": "button", "data-action":
"clear"});

			var cleara =
row.querySelector('[data-action="clear"]');
			cleara.addEventListener("click", function (e) {
				e.preventDefault();
				var days = self.table.querySelectorAll('td');
				for (var i = 0; i < days.length; i++) {
					if (days[i].classList.contains('selected')) {
						days[i].classList.remove('selected');
						break;
					}
				}
				self.inputField.setAttribute('data-alt-value',
"0000-00-00 00:00:00");
				self.inputField.setAttribute('value', '');
				self.inputField.value = '';
				if (self.inputField.onchange) {
					self.inputField.onchange();
				}
			});

		if (this.params.showsTodayBtn) {
			this._nav_now = hh(JoomlaCalLocale.today, '', 0,
'button', '', 'js-btn btn btn-today',
{"type": "button", "data-action":
"today"});

			var todaya =
this.wrapper.querySelector('[data-action="today"]');
			todaya.addEventListener('click', function (e) {
				e.preventDefault();
				self.date.setLocalDateOnly('gregorian', new Date());         
                        // TODAY
				self.dateClicked = true;
				self.callHandler();
				self.close();
			});
		}

		this._nav_exit = hh(JoomlaCalLocale.exit, '', 999,
'button', '', 'js-btn btn btn-exit',
{"type": "button", "data-action":
"exit"});
		var exita =
this.wrapper.querySelector('[data-action="exit"]');
		exita.addEventListener('click', function (e) {
			e.preventDefault();
			if (!self.dateClicked) {
				if (self.inputField.value) {
					if (self.params.dateType !== 'gregorian') {
						self.inputField.setAttribute('data-local-value',
self.inputField.value);
					}
					if (typeof self.dateClicked === 'undefined') {
						// value needs to be validated
						self.inputField.setAttribute('data-alt-value',
Date.parseFieldDate(self.inputField.value, self.params.dateFormat,
self.params.dateType)
							.print(self.params.dateFormat, 'gregorian', false));
					} else {
						self.inputField.setAttribute('data-alt-value',
self.date.print(self.params.dateFormat, 'gregorian', false));
					}
				} else {
					self.inputField.setAttribute('data-alt-value',
'0000-00-00 00:00:00');
				}
				self.date =
Date.parseFieldDate(self.inputField.getAttribute('data-alt-value'),
self.params.dateFormat, self.params.dateType);
			}
			self.close();
		});

		this.processCalendar();
	};

	/** Method to append numbers to the calendar table */
	JoomlaCalendar.prototype.processCalendar = function () {
		this.table.style.visibility = "hidden";

		var firstDayOfWeek = this.params.firstDayOfWeek,
			date  = this.date,
			today = new Date(),
			TY    = today.getLocalFullYear(this.params.dateType),
			TM    = today.getLocalMonth(this.params.dateType),
			TD    = today.getLocalDate(this.params.dateType),
			year  = date.getOtherFullYear(this.params.dateType),
			hrs   = date.getHours(),
			mins  = date.getMinutes(),
			secs  = date.getSeconds(),
			t12   = !this.params.time24;

		if (year < this.params.minYear) {                                     
                             // Check min,max year
			year = this.params.minYear;
			date.setOtherFullYear(this.params.dateType, year);
		} else if (year > this.params.maxYear) {
			year = this.params.maxYear;
			date.setOtherFullYear(this.params.dateType, year);
		}

		this.params.firstDayOfWeek = firstDayOfWeek;
		this.date = new Date(date);

		var month = date.getLocalMonth(this.params.dateType);
		var mday  = date.getLocalDate(this.params.dateType);

		// Compute the first day that would actually be displayed in the
calendar, even if it's from the previous month.
		date.setLocalDate(this.params.dateType, 1);
		var day1 = (date.getLocalDay(this.params.dateType) -
this.params.firstDayOfWeek) % 7;

		if (day1 < 0) {
			day1 += 7;
		}

		date.setLocalDate(this.params.dateType, - day1);
		date.setLocalDate(this.params.dateType,
date.getLocalDate(this.params.dateType) + 1);

		var row = this.tbody.firstChild,
			ar_days = this.ar_days = new Array(),
			weekend = JoomlaCalLocale.weekend,
			monthDays = parseInt(date.getLocalWeekDays(this.params.dateType));

		/** Fill the table **/
		for (var i = 0; i < monthDays; ++i, row = row.nextSibling) {
			var cell = row.firstChild;
			if (this.params.weekNumbers) {
				cell.className = "day wn";
				cell.innerHTML = date.getLocalWeekNumber(this.params.dateType);
//date.convertNumbers();
				cell = cell.nextSibling;
			}

			row.className = this.params.weekNumbers ? "daysrow wk" :
"daysrow";
			var hasdays = false, iday,
				dpos = ar_days[i] = [],
				totalDays = monthDays + 1;

			for (var j = 0; j < totalDays; ++j, cell = cell.nextSibling,
date.setLocalDate(this.params.dateType, iday + 1)) {
				cell.className = "day";
				cell.style['textAlign'] = 'center';
				iday = date.getLocalDate(this.params.dateType);
				var wday = date.getLocalDay(this.params.dateType);
				cell.pos = i << 4 | j;
				dpos[j] = cell;
				var current_month = (date.getLocalMonth(this.params.dateType) ===
month);
				if (!current_month) {
					if (this.params.showsOthers) {
						cell.className += " disabled othermonth ";
						cell.otherMonth = true;
					} else {
						cell.className += " emptycell";
						cell.innerHTML = "&#160;";
						cell.disabled = true;
						continue;
					}
				} else {
					cell.otherMonth = false;
					hasdays = true;
					cell.style.cursor = "pointer";
				}
				cell.disabled = false;
				cell.innerHTML = this.params.debug ? iday : Date.convertNumbers(iday); 
        // translated day number for each cell
				if (!cell.disabled) {
					cell.caldate = new Date(date);
					if (current_month && iday === mday) {
						cell.className += " selected";
						this.currentDateEl = cell;
					}
					if (date.getLocalFullYear(this.params.dateType) === TY &&
date.getLocalMonth(this.params.dateType) === TM && iday === TD) {
						cell.className += " today";
					}
					if (weekend.indexOf(wday) !== -1)
						cell.className += " weekend";
				}
			}
			if (!(hasdays || this.params.showsOthers)) {
				row.style.display = 'none';
				row.className = "emptyrow";
			} else {
				row.style.display = '';
			}
		}

		/* Set the time */
		if (this.params.showsTime) {
			if (hrs > 12 && t12) {
				hrs -= 12;
			}

			hrs = (hrs < 10) ? "0" + hrs : hrs;
			mins = (mins < 10) ? "0" + mins : mins;

			var hoursEl = this.table.querySelector('.time-hours'),
				minsEl = this.table.querySelector('.time-minutes');

			/* remove the selected class  for the hours*/
			this.resetSelected(hoursEl);
			if (!this.params.time24) 
			{ 
				hoursEl.value = (hrs == "00") ? "12" : hrs; 
			} 
			else 
			{ 
				hoursEl.value = hrs; 
			}

			/* remove the selected class  for the minutes*/
			this.resetSelected(minsEl);
			minsEl.value = mins;

			if (!this.params.time24)
			{
				var dateAlt = new
Date(this.inputField.getAttribute('data-alt-value')),
					ampmEl = this.table.querySelector('.time-ampm'),
					hrsAlt = dateAlt.getHours();

				if (hrsAlt > 12) {
					/* remove the selected class  for the am-pm*/
					this.resetSelected(ampmEl);
					ampmEl.value = 'pm';
				}
			}
		}

		if (!this.params.compressedHeader) {
			this._nav_month.getElementsByTagName('span')[0].innerHTML =
this.params.debug ? month + ' ' + JoomlaCalLocale.months[month] :
JoomlaCalLocale.months[month];
			this.title.getElementsByTagName('span')[0].innerHTML =
this.params.debug ? year + ' ' + 
Date.convertNumbers(year.toString()) :
Date.convertNumbers(year.toString());
		} else {
			var tmpYear = Date.convertNumbers(year.toString());
			this._nav_month.getElementsByTagName('span')[0].innerHTML =
!this.params.monthBefore  ? JoomlaCalLocale.months[month] + ' - '
+ tmpYear : tmpYear + ' - ' + JoomlaCalLocale.months[month] ;
		}
		this.table.style.visibility = "visible";
	};

	/** Method to listen for the click event on the input button. **/
	JoomlaCalendar.prototype._bindEvents = function () {
		var self = this;
		this.inputField.addEventListener('blur', function(event) {
			var calObj = JoomlaCalendar.getCalObject(this)._joomlaCalendar;

			// If calendar is open we will handle the event elsewhere
			if (calObj.dropdownElement.style.display === 'block') {
				event.preventDefault();
				return;
			}

			if (calObj) {
				if (calObj.inputField.value) {
					if (typeof calObj.params.dateClicked === 'undefined') {
						calObj.inputField.setAttribute('data-local-value',
calObj.inputField.value);

						if (calObj.params.dateType !== 'gregorian') {
							// We need to transform the date for the data-alt-value
							var ndate, date = Date.parseFieldDate(calObj.inputField.value,
calObj.params.dateFormat, calObj.params.dateType);
							ndate = Date.localCalToGregorian(date.getFullYear(),
date.getMonth(), date.getDate());
							date.setFullYear(ndate[0]);
							date.setMonth(ndate[1]);
							date.setDate(ndate[2]);
							calObj.inputField.setAttribute('data-alt-value',
date.print(calObj.params.dateFormat, 'gregorian', false));
						} else {
							calObj.inputField.setAttribute('data-alt-value',
Date.parseFieldDate(calObj.inputField.value, calObj.params.dateFormat,
calObj.params.dateType)
								.print(calObj.params.dateFormat, 'gregorian', false));
						}
					} else {
						calObj.inputField.setAttribute('data-alt-value',
calObj.date.print(calObj.params.dateFormat, 'gregorian', false));
					}
				} else {
					calObj.inputField.setAttribute('data-alt-value',
'0000-00-00 00:00:00');
				}
				calObj.date =
Date.parseFieldDate(calObj.inputField.getAttribute('data-alt-value'),
calObj.params.dateFormat, calObj.params.dateType);
			}

			self.close();
		}, true);
		this.button.addEventListener('click', function() {
			self.show();
		}, false);
	};

	/** Helpers **/
	var stopCalEvent = function (ev) { ev || (ev = window.event); 
ev.preventDefault(); ev.stopPropagation(); return false; };
	var createElement = function (type, parent) { var el = null; el =
document.createElement(type); if (typeof parent !== "undefined")
{ parent.appendChild(el); } return el; };
	var isInt = function (input) { return !isNaN(input) &&
(function(x) { return (x | 0) === x; })(parseFloat(input)) };
	var getBoundary = function (input, type) { var date = new Date(); var y =
date.getLocalFullYear(type); return y + input; };
	/**
	 * IE8 polyfill for indexOf()
	 */
	if (!Array.prototype.indexOf) {
		Array.prototype.indexOf = function(elt) {
			var len = this.length >>> 0,
				from = Number(arguments[1]) || 0;

			from = (from < 0) ? Math.ceil(from) : Math.floor(from);

			if (from < 0) {
				from += len;
			}

			for (; from < len; from++) {
				if (from in this && this[from] === elt) {
					return from;
				}
			}
			return -1;
		};
	}

	/** Method to get the active calendar element through any descendant
element. */
	JoomlaCalendar.getCalObject = function(element) {
		if (!element) {
			return false;
		}
		while (element.parentNode) {
			element = element.parentNode;
			if (element.classList.contains('field-calendar')) {
				return element;
			}
		}
		return false;
	};

	/** Method to change input values with the data-alt-value values. **/
	JoomlaCalendar.prototype.setAltValue = function() {
		var input = this.inputField;
		if (input.getAttribute('disabled')) return;
		input.value = input.getAttribute('data-alt-value') ?
input.getAttribute('data-alt-value') : '';
	};

	/** Method to change the inputs before submit. **/
	JoomlaCalendar.onSubmit = function() {
		Joomla = window.Joomla || {};
		if (!Joomla.calendarProcessed) {
			Joomla.calendarProcessed = true;
			var elements = document.querySelectorAll(".field-calendar");

			for (var i = 0; i < elements.length; i++) {
				var element  = elements[i],
				    instance = element._joomlaCalendar;

				if (instance) {
					instance.setAltValue();
				}
			}
		}
	};

	/**
	 * Init the Calendars on the page
	 *
	 * @param {Node}        element    The element node
	 * @param {HTMLElement} container  The field container (optional)
	 */
	JoomlaCalendar.init = function (element, container) {

		// Fall back for translation strings
		window.JoomlaCalLocale           = window.JoomlaCalLocale ?
JoomlaCalLocale : {};
		JoomlaCalLocale.today            = JoomlaCalLocale.today ?
JoomlaCalLocale.today : 'today';
		JoomlaCalLocale.weekend          = JoomlaCalLocale.weekend ?
JoomlaCalLocale.weekend : [0, 6];
		JoomlaCalLocale.localLangNumbers = JoomlaCalLocale.localLangNumbers ?
JoomlaCalLocale.localLangNumbers : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
		JoomlaCalLocale.wk               = JoomlaCalLocale.wk ?
JoomlaCalLocale.wk : 'wk';
		JoomlaCalLocale.AM               = JoomlaCalLocale.AM ?
JoomlaCalLocale.AM : 'AM';
		JoomlaCalLocale.PM               = JoomlaCalLocale.PM ?
JoomlaCalLocale.PM : 'PM';
		JoomlaCalLocale.am               = JoomlaCalLocale.am ?
JoomlaCalLocale.am : 'am';
		JoomlaCalLocale.pm               = JoomlaCalLocale.pm ?
JoomlaCalLocale.pm : 'pm';
		JoomlaCalLocale.dateType         = JoomlaCalLocale.dateType ?
JoomlaCalLocale.dateType : 'gregorian';
		JoomlaCalLocale.time             = JoomlaCalLocale.time ?
JoomlaCalLocale.time : 'time';
		JoomlaCalLocale.days             = JoomlaCalLocale.days ?
JoomlaCalLocale.days : '["Sunday", "Monday",
"Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday"]';
		JoomlaCalLocale.shortDays        = JoomlaCalLocale.shortDays ?
JoomlaCalLocale.shortDays : ["Sun", "Mon",
"Tue", "Wed", "Thu", "Fri",
"Sat", "Sun"];
		JoomlaCalLocale.months           = JoomlaCalLocale.months ?
JoomlaCalLocale.months : ["January", "February",
"March", "April", "May", "June",
"July", "August", "September",
"October", "November", "December"];
		JoomlaCalLocale.shortMonths      = JoomlaCalLocale.shortMonths ?
JoomlaCalLocale.shortMonths : ["Jan", "Feb",
"Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct",
"Nov", "Dec"];
		JoomlaCalLocale.minYear          = JoomlaCalLocale.minYear ?
JoomlaCalLocale.minYear : 1900;
		JoomlaCalLocale.maxYear          = JoomlaCalLocale.maxYear ?
JoomlaCalLocale.maxYear : 2100;
		JoomlaCalLocale.exit             = JoomlaCalLocale.exit ?
JoomlaCalLocale.exit : 'Cancel';
		JoomlaCalLocale.clear            = JoomlaCalLocale.clear ?
JoomlaCalLocale.clear : 'Clear';

		var instance = element._joomlaCalendar;
		if (!instance) {
			new JoomlaCalendar(element);
		} else {
			instance.recreate();
		}

		if (element && element.getElementsByTagName('input')[0]
&& element.getElementsByTagName('input')[0].form
&& !element.getElementsByTagName('input')[0].disabled) {
			element.getElementsByTagName('input')[0].form.addEventListener('submit',
JoomlaCalendar.onSubmit);
		}
	};

	window.JoomlaCalendar = JoomlaCalendar;

	/** Instantiate all the calendar fields when the document is ready */
	document.addEventListener("DOMContentLoaded", function() {
		var elements, i;

		elements = document.querySelectorAll(".field-calendar");

		for (i = 0; i < elements.length; i++) {
			JoomlaCalendar.init(elements[i]);
		}

		window.jQuery && jQuery(document).on("subform-row-add",
function (event, row) {
			elements = row.querySelectorAll(".field-calendar");

			for (i = 0; i < elements.length; i++) {
				JoomlaCalendar.init(elements[i]);
			}
		});

		/** B/C related code
		 *  @deprecated 4.0
		 */
		window.Calendar = {};

		/** B/C related code
		 *  @deprecated 4.0
		 */
		Calendar.setup = function(obj) {

			if (obj.inputField && document.getElementById(obj.inputField)) {
				var element = document.getElementById(obj.inputField),
					cal = element.parentNode.querySelectorAll('button')[0];

				for (var property in obj) {
					if (obj.hasOwnProperty(property)) {
						switch (property) {
							case 'ifFormat':
								if (cal) cal.setAttribute('data-dayformat',
obj.ifFormat);
								break;

							case 'firstDay':
								if (cal) cal.setAttribute('data-firstday',
parseInt(obj.firstDay));
								break;

							case 'weekNumbers':
								if (cal) cal.setAttribute('data-week-numbers',
(obj.weekNumbers === "true" || obj.weekNumbers === true) ?
'1' : '0');
								break;

							case 'showOthers':
								if (cal) cal.setAttribute('data-show-others',
(obj.showOthers === "true" || obj.showOthers === true) ?
'1' : '0');
								break;

							case 'showsTime':
								if (cal) cal.setAttribute('data-show-time',
(obj.showsTime === "true" || obj.showsTime === true) ?
'1' : '0');
								break;

							case 'timeFormat':
								if (cal) cal.setAttribute('data-time-24',
parseInt(obj.timeFormat));
								break;

							case 'displayArea':
							case 'inputField':
							case 'button':
							case 'eventName':
							case 'daFormat':
							case 'disableFunc':
							case 'dateStatusFunc':
							case 'dateTooltipFunc':
							case 'dateText':
							case 'align':
							case 'range':
							case 'flat':
							case 'flatCallback':
							case 'onSelect':
							case 'onClose':
							case 'onUpdate':
							case 'date':
							case 'electric':
							case 'step':
							case 'position':
							case 'cache':
							case 'multiple':
								break;
						}


					}
				}
				JoomlaCalendar.init(element.parentNode.parentNode);
			}
			return null;
		};
	});
})(window, document);
calendar.min.js000064400000061435151160614770007456
0ustar00!function(e,a){"use
strict";Date.convertNumbers=function(e){e=e.toString();if("[object
Array]"===Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers))for(var
a=0;a<JoomlaCalLocale.localLangNumbers.length;a++)e=e.replace(new
RegExp(a,"g"),JoomlaCalLocale.localLangNumbers[a]);return
e},Date.toEnglish=function(e){e=this.toString();for(var
a=[0,1,2,3,4,5,6,7,8,9],t=0;t<10;t++)e=e.replace(new
RegExp(a[t],"g"),t);return e};var t=function(e){if(!e)throw new
Error("Calendar setup failed:\n  No valid element found, Please check
your code");if("function"!=typeof Date.parseFieldDate)throw
new Error("Calendar setup failed:\n  No valid date helper, Please
check your code");if(e._joomlaCalendar)throw new
Error("JoomlaCalendar instance already exists for the
element");if(e._joomlaCalendar=this,this.writable=!0,this.hidden=!0,this.params={},this.element=e,this.inputField=e.getElementsByTagName("input")[0],this.button=e.getElementsByTagName("button")[0],!this.inputField)throw
new Error("Calendar setup failed:\n  No valid input found, Please
check your
code");this.params={debug:!1,clicked:!1,element:{style:{display:"none"}},writable:!0};var
t=this,s=this.button,r={inputField:this.inputField,dateType:JoomlaCalLocale.dateType?JoomlaCalLocale.dateType:"gregorian",direction:void
0!==a.dir?a.dir:a.getElementsByTagName("html")[0].getAttribute("dir"),firstDayOfWeek:s.getAttribute("data-firstday")?parseInt(s.getAttribute("data-firstday")):0,dateFormat:"%Y-%m-%d
%H:%M:%S",weekend:JoomlaCalLocale.weekend?JoomlaCalLocale.weekend:[0,6],minYear:JoomlaCalLocale.minYear?JoomlaCalLocale.minYear:1900,maxYear:JoomlaCalLocale.maxYear?JoomlaCalLocale.maxYear:2100,minYearTmp:s.getAttribute("data-min-year"),maxYearTmp:s.getAttribute("data-max-year"),weekendTmp:s.getAttribute("data-weekend"),time24:!0,showsOthers:1===parseInt(s.getAttribute("data-show-others")),showsTime:!0,weekNumbers:1===parseInt(s.getAttribute("data-week-numbers")),showsTodayBtn:!0,compressedHeader:1===parseInt(s.getAttribute("data-only-months-nav"))};for(var
o in
s.getAttribute("data-dayformat")&&(r.dateFormat=s.getAttribute("data-dayformat")?s.getAttribute("data-dayformat"):"%Y-%m-%d
%H:%M:%S"),s.getAttribute("data-time-24")&&(r.time24=24===parseInt(s.getAttribute("data-time-24"))),s.getAttribute("data-show-time")&&(r.showsTime=1===parseInt(s.getAttribute("data-show-time"))),s.getAttribute("data-today-btn")&&(r.showsTodayBtn=1===parseInt(s.getAttribute("data-today-btn"))),r)this.params[o]=r[o];i(t.params.minYearTmp)&&(t.params.minYear=l(parseInt(t.params.minYearTmp),t.params.dateType)),i(t.params.maxYearTmp)&&(t.params.maxYear=l(parseInt(t.params.maxYearTmp),t.params.dateType)),"undefined"!==t.params.weekendTmp&&(t.params.weekend=t.params.weekendTmp.split(",").map(function(e){return
parseInt(e,10)})),this._dayMouseDown=function(e){return
t._handleDayMouseDown(e)},this._calKeyEvent=function(e){return
t._handleCalKeyEvent(e)},this._documentClick=function(e){return
t._handleDocumentClick(e)},this.checkInputs(),this.inputField.getAttribute("readonly")||(this._create(),this._bindEvents())};t.prototype.checkInputs=function(){var
e=Date.parseFieldDate(this.inputField.getAttribute("data-alt-value"),this.params.dateFormat,"gregorian");""!==this.inputField.value?(this.date=e,this.inputField.value=e.print(this.params.dateFormat,this.params.dateType,!0)):this.date=new
Date},t.prototype.recreate=function(){var
e=this.element,a=e.querySelector(".js-calendar");a&&(e._joomlaCalendar=null,a.parentNode.removeChild(a),new
t(e))},t.prototype.updateTime=function(e,a,t){var
s=this.date,r=this.date.getLocalDate(this.params.dateType),i=this.date.getLocalMonth(this.params.dateType),l=this.date.getLocalFullYear(this.params.dateType),o=this.inputField.parentNode.parentNode.querySelectorAll(".time-ampm")[0];this.params.time24||(/pm/i.test(o.value)&&e<12?e=parseInt(e)+12:/am/i.test(o.value)&&12==e&&(e=0)),s.setHours(e),s.setMinutes(parseInt(a,10)),s.setSeconds(s.getSeconds()),s.setLocalFullYear(this.params.dateType,l),s.setLocalMonth(this.params.dateType,i),s.setLocalDate(this.params.dateType,r),this.dateClicked=!1,this.callHandler()},t.prototype.setDate=function(e){e.equalsTo(this.date)||(this.date=e,this.processCalendar(this.params.firstDayOfWeek,e))},t.prototype.moveCursorBy=function(e){var
a=new
Date(this.date);a.setDate(a.getDate()-e),this.setDate(a)},t.prototype.resetSelected=function(e){for(var
a=e.options,t=a.length;t--;){var
s=a[t];s.selected&&(s.selected=!1)}},t.prototype.callHandler=function(){this.inputField.setAttribute("data-alt-value",this.date.print(this.params.dateFormat,"gregorian",!1)),this.inputField.getAttribute("data-alt-value")&&"0000-00-00
00:00:00"!==this.inputField.getAttribute("data-alt-value")&&(this.inputField.value=this.date.print(this.params.dateFormat,this.params.dateType,!0),"gregorian"!==this.params.dateType&&this.inputField.setAttribute("data-local-value",this.date.print(this.params.dateFormat,this.params.dateType,!0))),this.inputField.value=this.date.print(this.params.dateFormat,this.params.dateType,!0),"function"==typeof
this.inputField.onchange&&this.inputField.onchange(),this.dateClicked&&"function"==typeof
this.params.onUpdate&&this.params.onUpdate(this),this.dateClicked?this.close():this.processCalendar()},t.prototype.close=function(){this.hide()},t.prototype.show=function(){if(-1!==navigator.appName.indexOf("Internet
Explorer")&&(-1===navigator.appVersion.indexOf("MSIE
9")&&-1===navigator.appVersion.indexOf("MSIE
1")&&e.jQuery&&jQuery().chosen))for(var
t=this.element.getElementsByTagName("select"),s=0;s<t.length;s++)jQuery(t[s]).chosen("destroy");this.checkInputs(),this.inputField.focus(),this.dropdownElement.style.display="block",this.hidden=!1,a.addEventListener("keydown",this._calKeyEvent,!0),a.addEventListener("keypress",this._calKeyEvent,!0),a.addEventListener("mousedown",this._documentClick,!0);var
r=this.element.querySelector(".js-calendar");e.innerHeight<r.getBoundingClientRect().bottom+20&&(r.style.marginTop=-(r.getBoundingClientRect().height+this.inputField.getBoundingClientRect().height)+"px"),this.processCalendar()},t.prototype.hide=function(){a.removeEventListener("keydown",this._calKeyEvent,!0),a.removeEventListener("keypress",this._calKeyEvent,!0),a.removeEventListener("mousedown",this._documentClick,!0),this.dropdownElement.style.display="none",this.hidden=!0},t.prototype._handleDocumentClick=function(e){var
t=e.target;if(null!==t&&!t.classList.contains("time"))for(;null!==t&&t!==this.element;t=t.parentNode);if(null===t)return
a.activeElement.blur(),this.hide(),s(e)},t.prototype._handleDayMouseDown=function(e){var
a=e.currentTarget,t=e.target||e.srcElement;if(!t||!t.hasAttribute("data-action")){if("TD"!==a.nodeName){var
r=a.getParent("TD");"TD"===r.nodeName?a=r:(a=a.getParent("TD")).classList.contains("js-calendar")&&(a=a.getElementsByTagName("table")[0])}else
if(!t.classList.contains("js-btn")&&!a.classList.contains("day")&&!a.classList.contains("title"))return;if(!a||a.disabled)return!1;if(void
0===a.navtype||300!==a.navtype){50===a.navtype&&(a._current=a.innerHTML),t!==a&&t.parentNode!==a||this.cellClick(a,e);var
i=null;void 0!==a.month&&(i=a),void
0!==a.parentNode.month&&(i=a.parentNode);var l=null;if(i)l=new
Date(this.date),i.month!==l.getLocalMonth(this.params.dateType)&&(l.setLocalMonth(this.params.dateType,i.month),this.setDate(l),this.dateClicked=!1,this.callHandler());else{var
o=null;void 0!==a.year&&(o=t),void
0!==a.parentNode.year&&(o=t.parentNode),o&&(l=new
Date(this.date),o.year!==l.getLocalFullYear(this.params.dateType)&&(l.setFullYear(this.params.dateType,o.year),this.setDate(l),this.dateClicked=!1,this.callHandler()))}}return
s(e)}},t.prototype.cellClick=function(e,a){var t=!1,s=!1,r=null;if(void
0===e.navtype){this.currentDateEl&&(e.classList.add("selected"),this.currentDateEl=e.caldate,(t=this.currentDateEl===e.caldate)||(this.currentDateEl=e.caldate)),this.date.setLocalDateOnly("gregorian",e.caldate);var
i=!(this.dateClicked=!e.otherMonth);this.currentDateEl&&(s=!e.disabled),i&&this.processCalendar()}else{r=new
Date(this.date),this.dateClicked=!1;var
l=r.getOtherFullYear(this.params.dateType),o=r.getLocalMonth(this.params.dateType);switch(e.navtype){case
400:break;case-2:this.params.compressedHeader||l>this.params.minYear&&r.setOtherFullYear(this.params.dateType,l-1);break;case-1:var
n=r.getLocalDate(this.params.dateType);if(o>0)n>(d=r.getLocalMonthDays(this.params.dateType,o-1))&&r.setLocalDate(this.params.dateType,d),r.setLocalMonth(this.params.dateType,o-1);else
if(l--
>this.params.minYear){r.setOtherFullYear(this.params.dateType,l),n>(d=r.getLocalMonthDays(this.params.dateType,11))&&r.setLocalDate(this.params.dateType,d),r.setLocalMonth(this.params.dateType,11)}break;case
1:n=r.getLocalDate(this.params.dateType);if(o<11)n>(d=r.getLocalMonthDays(this.params.dateType,o+1))&&r.setLocalDate(this.params.dateType,d),r.setLocalMonth(this.params.dateType,o+1);else
if(l<this.params.maxYear){var
d;r.setOtherFullYear(this.params.dateType,l+1),n>(d=r.getLocalMonthDays(this.params.dateType,0))&&r.setLocalDate(this.params.dateType,d),r.setLocalMonth(this.params.dateType,0)}break;case
2:this.params.compressedHeader||l<this.params.maxYear&&r.setOtherFullYear(this.params.dateType,l+1)}r.equalsTo(this.date)?0===e.navtype&&(s=t=!0):(this.setDate(r),s=!0)}s&&(this.params.showsTime&&(this.dateClicked=!1),a&&this.callHandler()),e.classList.remove("hilite"),t&&!this.params.showsTime&&(this.dateClicked=!1,a&&this.close())},t.prototype._handleCalKeyEvent=function(e){var
a=e.keyCode;if(e.target!==this.inputField||13!==a&&9!==a||this.close(),"rtl"===this.params.direction&&(37===a?a=39:39===a&&(a=37)),32===a&&e.shiftKey&&(e.preventDefault(),this.cellClick(this._nav_now,e),this.close()),27===a&&this.close(),38===a&&this.moveCursorBy(7),40===a&&this.moveCursorBy(-7),37===a&&this.moveCursorBy(1),39===a&&this.moveCursorBy(-1),e.target===this.inputField&&!(a>48||a<57||186===a||189===a||190===a||32===a))return
s(e)},t.prototype._create=function(){var
e=this,a=this.element,t=r("table"),s=r("div");this.table=t,t.className="table",t.cellSpacing=0,t.cellPadding=0,t.style.marginBottom=0,this.dropdownElement=s,a.appendChild(s),this.params.direction&&(s.style.direction=this.params.direction),s.className="js-calendar",s.style.position="absolute",s.style.boxShadow="0px
0px 70px 0px
rgba(0,0,0,0.67)",s.style.minWidth=this.inputField.width,s.style.padding="0",s.style.display="none",s.style.left="auto",s.style.top="auto",s.style.zIndex=1060,s.style.borderRadius="20px",this.wrapper=r("div"),this.wrapper.className="calendar-container",s.appendChild(this.wrapper),this.wrapper.appendChild(t);var
i=r("thead",t);i.className="calendar-header";var
l=null,o=null,n=this,d=function(a,t,s,i,d,m,p){for(var c in
d=d||{},l=r(i=i||"td",o),t&&(m=m?'class="'+m+'"':"",l.colSpan=t),d)l.style[c]=d[c];for(var
c in p)l.setAttribute(c,p[c]);return
0!==s&&Math.abs(s)<=2&&(l.className+="
nav"),t&&l.addEventListener("mousedown",e._dayMouseDown,!0),l.calendar=n,l.navtype=s,0!==s&&Math.abs(s)<=2?l.innerHTML="<a
"+m+" style='display:inline;padding:2px
6px;cursor:pointer;text-decoration:none;'
unselectable='on'>"+a+"</a>":(l.innerHTML=t?"<div
unselectable='on'"+m+">"+a+"</div>":a,!t&&m&&(l.className=m)),l};!1===this.params.compressedHeader&&((o=r("tr",i)).className="calendar-head-row",this._nav_py=d("&lsaquo;",1,-2,"",{"text-align":"center","font-size":"18px","line-height":"18px"},"js-btn
btn-prev-year"),this.title=d('<div
style="text-align:center;font-size:18px"><span></span></div>',this.params.weekNumbers?6:5,300),this.title.className="title",this._nav_ny=d("
&rsaquo;",1,2,"",{"text-align":"center","font-size":"18px","line-height":"18px"},"js-btn
btn-next-year")),(o=r("tr",i)).className="calendar-head-row",this._nav_pm=d("&lsaquo;",1,-1,"",{"text-align":"center","font-size":"2em","line-height":"1em"},"js-btn
btn-prev-month"),this._nav_month=d('<div
style="text-align:center;font-size:1.2em"><span></span></div>',this.params.weekNumbers?6:5,888,"td",{textAlign:"center"}),this._nav_month.className="title",this._nav_nm=d("
&rsaquo;",1,1,"",{"text-align":"center","font-size":"2em","line-height":"1em"},"js-btn
btn-next-month"),(o=r("tr",i)).className=e.params.weekNumbers?"daynames
wk":"daynames",this.params.weekNumbers&&((l=r("td",o)).className="day-name
wn",l.innerHTML=JoomlaCalLocale.wk);for(var
m=7;m>0;--m)l=r("td",o),m||(l.calendar=e);this.firstdayname=this.params.weekNumbers?o.firstChild.nextSibling:o.firstChild;var
p=this.params.firstDayOfWeek,c=(l=this.firstdayname,JoomlaCalLocale.weekend);for(m=0;m<7;++m){var
h=(m+p)%7;l.classList.add("day-name"),this.params.weekNumbers&&l.classList.add("day-name-week"),m&&(l.calendar=e,l.fdow=h),-1!==c.indexOf(c)&&l.classList.add("weekend"),l.innerHTML=JoomlaCalLocale.shortDays[(m+p)%7],l=l.nextSibling}var
u=r("tbody",t);for(this.tbody=u,m=6;m>0;--m){o=r("tr",u),this.params.weekNumbers&&(l=r("td",o));for(var
y=7;y>0;--y)(l=r("td",o)).calendar=this,l.addEventListener("mousedown",this._dayMouseDown,!0)}if(this.params.showsTime){(o=r("tr",u)).className="time",(l=r("td",o)).className="time
time-title",l.colSpan=1,l.style.verticalAlign="middle",l.innerHTML="
";var v=r("td",o);v.className="time
hours-select",v.colSpan=2;var
g=r("td",o);g.className="time
minutes-select",g.colSpan=2,function(){function a(a,t,s,i,l){var
o,n=r("select",l);n.calendar=e,n.className=a,n.setAttribute("data-chosen",!0),n.style.width="100%",n.navtype=50,n._range=[];for(var
d=s;d<=i;++d){var
m,p="";d===t&&(p=!0),d<10&&i>=10?(o="0"+d,m=Date.convertNumbers("0")+Date.convertNumbers(d)):(o=""+d,m=""+Date.convertNumbers(d)),n.options.add(new
Option(m,o,p,p))}return n}var
t=e.date.getHours(),s=e.date.getMinutes(),i=!e.params.time24,n=e.date.getHours()>12;i&&n&&(t-=12);var
d=a("time time-hours",t,i?1:0,i?12:23,v),m=a("time
time-minutes",s,0,59,g);if((l=r("td",o)).className="time
ampm-select",l.colSpan=e.params.weekNumbers?1:2,i){n=Date.parseFieldDate(e.inputField.getAttribute("data-alt-value"),e.params.dateFormat,"gregorian").getHours()>=12;var
p=r("select",l);p.className="time-ampm",p.style.width="100%",p.options.add(new
Option(JoomlaCalLocale.PM,"pm",!!n||"",!!n||"")),p.options.add(new
Option(JoomlaCalLocale.AM,"am",!n||"",!n||"")),p.addEventListener("change",function(a){e.updateTime(a.target.parentNode.parentNode.childNodes[1].childNodes[0].value,a.target.parentNode.parentNode.childNodes[2].childNodes[0].value,a.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1)}else
l.innerHTML="&#160;",l.colSpan=e.params.weekNumbers?3:2;d.addEventListener("change",function(a){e.updateTime(a.target.parentNode.parentNode.childNodes[1].childNodes[0].value,a.target.parentNode.parentNode.childNodes[2].childNodes[0].value,a.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1),m.addEventListener("change",function(a){e.updateTime(a.target.parentNode.parentNode.childNodes[1].childNodes[0].value,a.target.parentNode.parentNode.childNodes[2].childNodes[0].value,a.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1)}()}((o=r("div",this.wrapper)).className="buttons-wrapper
btn-group",this._nav_clear=d(JoomlaCalLocale.clear,"",100,"button","","js-btn
btn
btn-clear",{type:"button","data-action":"clear"}),o.querySelector('[data-action="clear"]').addEventListener("click",function(a){a.preventDefault();for(var
t=e.table.querySelectorAll("td"),s=0;s<t.length;s++)if(t[s].classList.contains("selected")){t[s].classList.remove("selected");break}e.inputField.setAttribute("data-alt-value","0000-00-00
00:00:00"),e.inputField.setAttribute("value",""),e.inputField.value="",e.inputField.onchange&&e.inputField.onchange()}),this.params.showsTodayBtn)&&(this._nav_now=d(JoomlaCalLocale.today,"",0,"button","","js-btn
btn
btn-today",{type:"button","data-action":"today"}),this.wrapper.querySelector('[data-action="today"]').addEventListener("click",function(a){a.preventDefault(),e.date.setLocalDateOnly("gregorian",new
Date),e.dateClicked=!0,e.callHandler(),e.close()}));this._nav_exit=d(JoomlaCalLocale.exit,"",999,"button","","js-btn
btn
btn-exit",{type:"button","data-action":"exit"}),this.wrapper.querySelector('[data-action="exit"]').addEventListener("click",function(a){a.preventDefault(),e.dateClicked||(e.inputField.value?("gregorian"!==e.params.dateType&&e.inputField.setAttribute("data-local-value",e.inputField.value),void
0===e.dateClicked?e.inputField.setAttribute("data-alt-value",Date.parseFieldDate(e.inputField.value,e.params.dateFormat,e.params.dateType).print(e.params.dateFormat,"gregorian",!1)):e.inputField.setAttribute("data-alt-value",e.date.print(e.params.dateFormat,"gregorian",!1))):e.inputField.setAttribute("data-alt-value","0000-00-00
00:00:00"),e.date=Date.parseFieldDate(e.inputField.getAttribute("data-alt-value"),e.params.dateFormat,e.params.dateType)),e.close()}),this.processCalendar()},t.prototype.processCalendar=function(){this.table.style.visibility="hidden";var
e=this.params.firstDayOfWeek,a=this.date,t=new
Date,s=t.getLocalFullYear(this.params.dateType),r=t.getLocalMonth(this.params.dateType),i=t.getLocalDate(this.params.dateType),l=a.getOtherFullYear(this.params.dateType),o=a.getHours(),n=a.getMinutes(),d=(a.getSeconds(),!this.params.time24);l<this.params.minYear?(l=this.params.minYear,a.setOtherFullYear(this.params.dateType,l)):l>this.params.maxYear&&(l=this.params.maxYear,a.setOtherFullYear(this.params.dateType,l)),this.params.firstDayOfWeek=e,this.date=new
Date(a);var
m=a.getLocalMonth(this.params.dateType),p=a.getLocalDate(this.params.dateType);a.setLocalDate(this.params.dateType,1);var
c=(a.getLocalDay(this.params.dateType)-this.params.firstDayOfWeek)%7;c<0&&(c+=7),a.setLocalDate(this.params.dateType,-c),a.setLocalDate(this.params.dateType,a.getLocalDate(this.params.dateType)+1);for(var
h=this.tbody.firstChild,u=this.ar_days=new
Array,y=JoomlaCalLocale.weekend,v=parseInt(a.getLocalWeekDays(this.params.dateType)),g=0;g<v;++g,h=h.nextSibling){var
b=h.firstChild;this.params.weekNumbers&&(b.className="day
wn",b.innerHTML=a.getLocalWeekNumber(this.params.dateType),b=b.nextSibling),h.className=this.params.weekNumbers?"daysrow
wk":"daysrow";for(var
f,L=!1,C=u[g]=[],w=v+1,T=0;T<w;++T,b=b.nextSibling,a.setLocalDate(this.params.dateType,f+1)){b.className="day",b.style.textAlign="center",f=a.getLocalDate(this.params.dateType);var
N=a.getLocalDay(this.params.dateType);b.pos=g<<4|T,C[T]=b;var
D=a.getLocalMonth(this.params.dateType)===m;if(D)b.otherMonth=!1,L=!0,b.style.cursor="pointer";else{if(!this.params.showsOthers){b.className+="
emptycell",b.innerHTML="&#160;",b.disabled=!0;continue}b.className+="
disabled othermonth
",b.otherMonth=!0}b.disabled=!1,b.innerHTML=this.params.debug?f:Date.convertNumbers(f),b.disabled||(b.caldate=new
Date(a),D&&f===p&&(b.className+="
selected",this.currentDateEl=b),a.getLocalFullYear(this.params.dateType)===s&&a.getLocalMonth(this.params.dateType)===r&&f===i&&(b.className+="
today"),-1!==y.indexOf(N)&&(b.className+="
weekend"))}L||this.params.showsOthers?h.style.display="":(h.style.display="none",h.className="emptyrow")}if(this.params.showsTime){o>12&&d&&(o-=12),o=o<10?"0"+o:o,n=n<10?"0"+n:n;var
F=this.table.querySelector(".time-hours"),k=this.table.querySelector(".time-minutes");if(this.resetSelected(F),this.params.time24?F.value=o:F.value="00"==o?"12":o,this.resetSelected(k),k.value=n,!this.params.time24){var
J=new
Date(this.inputField.getAttribute("data-alt-value")),A=this.table.querySelector(".time-ampm");J.getHours()>12&&(this.resetSelected(A),A.value="pm")}}if(this.params.compressedHeader){var
M=Date.convertNumbers(l.toString());this._nav_month.getElementsByTagName("span")[0].innerHTML=this.params.monthBefore?M+"
- "+JoomlaCalLocale.months[m]:JoomlaCalLocale.months[m]+" -
"+M}else
this._nav_month.getElementsByTagName("span")[0].innerHTML=this.params.debug?m+"
"+JoomlaCalLocale.months[m]:JoomlaCalLocale.months[m],this.title.getElementsByTagName("span")[0].innerHTML=this.params.debug?l+"
"+Date.convertNumbers(l.toString()):Date.convertNumbers(l.toString());this.table.style.visibility="visible"},t.prototype._bindEvents=function(){var
e=this;this.inputField.addEventListener("blur",function(a){var
s=t.getCalObject(this)._joomlaCalendar;if("block"!==s.dropdownElement.style.display){if(s){if(s.inputField.value)if(void
0===s.params.dateClicked)if(s.inputField.setAttribute("data-local-value",s.inputField.value),"gregorian"!==s.params.dateType){var
r,i=Date.parseFieldDate(s.inputField.value,s.params.dateFormat,s.params.dateType);r=Date.localCalToGregorian(i.getFullYear(),i.getMonth(),i.getDate()),i.setFullYear(r[0]),i.setMonth(r[1]),i.setDate(r[2]),s.inputField.setAttribute("data-alt-value",i.print(s.params.dateFormat,"gregorian",!1))}else
s.inputField.setAttribute("data-alt-value",Date.parseFieldDate(s.inputField.value,s.params.dateFormat,s.params.dateType).print(s.params.dateFormat,"gregorian",!1));else
s.inputField.setAttribute("data-alt-value",s.date.print(s.params.dateFormat,"gregorian",!1));else
s.inputField.setAttribute("data-alt-value","0000-00-00
00:00:00");s.date=Date.parseFieldDate(s.inputField.getAttribute("data-alt-value"),s.params.dateFormat,s.params.dateType)}e.close()}else
a.preventDefault()},!0),this.button.addEventListener("click",function(){e.show()},!1)};var
s=function(a){return
a||(a=e.event),a.preventDefault(),a.stopPropagation(),!1},r=function(e,t){var
s;return s=a.createElement(e),void
0!==t&&t.appendChild(s),s},i=function(e){return!isNaN(e)&&(0|(a=parseFloat(e)))===a;var
a},l=function(e,a){return(new
Date).getLocalFullYear(a)+e};Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var
a=this.length>>>0,t=Number(arguments[1])||0;for((t=t<0?Math.ceil(t):Math.floor(t))<0&&(t+=a);t<a;t++)if(t
in this&&this[t]===e)return
t;return-1}),t.getCalObject=function(e){if(!e)return!1;for(;e.parentNode;)if((e=e.parentNode).classList.contains("field-calendar"))return
e;return!1},t.prototype.setAltValue=function(){var
e=this.inputField;e.getAttribute("disabled")||(e.value=e.getAttribute("data-alt-value")?e.getAttribute("data-alt-value"):"")},t.onSubmit=function(){if(Joomla=e.Joomla||{},!Joomla.calendarProcessed){Joomla.calendarProcessed=!0;for(var
t=a.querySelectorAll(".field-calendar"),s=0;s<t.length;s++){var
r=t[s]._joomlaCalendar;r&&r.setAltValue()}}},t.init=function(a,s){e.JoomlaCalLocale=e.JoomlaCalLocale?JoomlaCalLocale:{},JoomlaCalLocale.today=JoomlaCalLocale.today?JoomlaCalLocale.today:"today",JoomlaCalLocale.weekend=JoomlaCalLocale.weekend?JoomlaCalLocale.weekend:[0,6],JoomlaCalLocale.localLangNumbers=JoomlaCalLocale.localLangNumbers?JoomlaCalLocale.localLangNumbers:[0,1,2,3,4,5,6,7,8,9],JoomlaCalLocale.wk=JoomlaCalLocale.wk?JoomlaCalLocale.wk:"wk",JoomlaCalLocale.AM=JoomlaCalLocale.AM?JoomlaCalLocale.AM:"AM",JoomlaCalLocale.PM=JoomlaCalLocale.PM?JoomlaCalLocale.PM:"PM",JoomlaCalLocale.am=JoomlaCalLocale.am?JoomlaCalLocale.am:"am",JoomlaCalLocale.pm=JoomlaCalLocale.pm?JoomlaCalLocale.pm:"pm",JoomlaCalLocale.dateType=JoomlaCalLocale.dateType?JoomlaCalLocale.dateType:"gregorian",JoomlaCalLocale.time=JoomlaCalLocale.time?JoomlaCalLocale.time:"time",JoomlaCalLocale.days=JoomlaCalLocale.days?JoomlaCalLocale.days:'["Sunday",
"Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday",
"Sunday"]',JoomlaCalLocale.shortDays=JoomlaCalLocale.shortDays?JoomlaCalLocale.shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],JoomlaCalLocale.months=JoomlaCalLocale.months?JoomlaCalLocale.months:["January","February","March","April","May","June","July","August","September","October","November","December"],JoomlaCalLocale.shortMonths=JoomlaCalLocale.shortMonths?JoomlaCalLocale.shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],JoomlaCalLocale.minYear=JoomlaCalLocale.minYear?JoomlaCalLocale.minYear:1900,JoomlaCalLocale.maxYear=JoomlaCalLocale.maxYear?JoomlaCalLocale.maxYear:2100,JoomlaCalLocale.exit=JoomlaCalLocale.exit?JoomlaCalLocale.exit:"Cancel",JoomlaCalLocale.clear=JoomlaCalLocale.clear?JoomlaCalLocale.clear:"Clear";var
r=a._joomlaCalendar;r?r.recreate():new
t(a),a&&a.getElementsByTagName("input")[0]&&a.getElementsByTagName("input")[0].form&&!a.getElementsByTagName("input")[0].disabled&&a.getElementsByTagName("input")[0].form.addEventListener("submit",t.onSubmit)},e.JoomlaCalendar=t,a.addEventListener("DOMContentLoaded",function(){var
s,r;for(s=a.querySelectorAll(".field-calendar"),r=0;r<s.length;r++)t.init(s[r]);e.jQuery&&jQuery(a).on("subform-row-add",function(e,a){for(s=a.querySelectorAll(".field-calendar"),r=0;r<s.length;r++)t.init(s[r])}),e.Calendar={},Calendar.setup=function(e){if(e.inputField&&a.getElementById(e.inputField)){var
s=a.getElementById(e.inputField),r=s.parentNode.querySelectorAll("button")[0];for(var
i in
e)if(e.hasOwnProperty(i))switch(i){case"ifFormat":r&&r.setAttribute("data-dayformat",e.ifFormat);break;case"firstDay":r&&r.setAttribute("data-firstday",parseInt(e.firstDay));break;case"weekNumbers":r&&r.setAttribute("data-week-numbers","true"===e.weekNumbers||!0===e.weekNumbers?"1":"0");break;case"showOthers":r&&r.setAttribute("data-show-others","true"===e.showOthers||!0===e.showOthers?"1":"0");break;case"showsTime":r&&r.setAttribute("data-show-time","true"===e.showsTime||!0===e.showsTime?"1":"0");break;case"timeFormat":r&&r.setAttribute("data-time-24",parseInt(e.timeFormat))}t.init(s.parentNode.parentNode)}return
null}})}(window,document);warning.php000064400000001207151161712430006723
0ustar00<?php
/**
 * @package   Gantry 5 Theme
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2017 RocketTheme, LLC
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */

class JFormFieldWarning extends JFormField
{
    protected $type = 'Warning';

    protected function getInput()
    {
        $app = JFactory::getApplication();
        if ($app->isAdmin()) {
           
$app->enqueueMessage(JText::_('GANTRY5_THEME_INSTALL_GANTRY'),
'error');
        } else {
           
$app->enqueueMessage(JText::_('GANTRY5_THEME_FRONTEND_SETTINGS_DISABLED'),
'warning');
        }
    }
}
pagebuilder.php000064400000010423151162021250007533 0ustar00<?php

/**
 * @package SP Page Builder
 * @author JoomShaper http://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2023 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
 */
//no direct access
defined('_JEXEC') or die('restricted access');

use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormField;
use Joomla\CMS\Language\Multilanguage;

JLoader::register('SppagebuilderHelperRoute', JPATH_ROOT .
'/components/com_sppagebuilder/helpers/route.php');
JLoader::register('SppagebuilderHelper', JPATH_ADMINISTRATOR .
'/components/com_sppagebuilder/helpers/sppagebuilder.php');

class JFormFieldPagebuilder extends FormField
{
	protected	$type = 'Pagebuilder';

	protected function getInput()
	{
		$output = '';
		$id = (int) Factory::getApplication()->input->get('id',
0, 'INT');

		if ($id)
		{
			$pageData = $this->pageData($id);

			if (isset($pageData->id) && $pageData->id)
			{
				$view_id = $pageData->id;
				$language = $pageData->language;
			}
			else
			{
				$data = $this->form->getData();
				$title = $data->get('title');
				$language = $data->get('language');
				$access = $data->get('access');
				$published = $data->get('published');

				$view_id = $this->insertData($id, $title, '[]', $language,
$access, $published);
			}

			$front_link =
'index.php?option=com_sppagebuilder&view=form&tmpl=component&layout=edit&extension=mod_sppagebuilder&extension_view=module&id='
. $view_id;
			$backend_link =
'index.php?option=com_sppagebuilder&view=editor&extension=com_content&extension_view=module&module_id='
. $id . '&tmpl=component#/editor/' . $view_id;

			if ($language && $language !== '*' &&
Multilanguage::isEnabled())
			{
				$front_link .= '&lang=' . $language;
				$backend_link .= '&lang=' . $language;
			}

			$front_link = str_replace('/administrator', '',
SppagebuilderHelperRoute::buildRoute($front_link));

			$output = '<div style="display: flex; justify-content:
center; gap: 10px; margin-top: 1rem;"><a
class="builder-edit-btn btn btn-outline btn-large"
style="border: 2px solid var(--template-bg-dark-60)"
href="' . $backend_link . '"
target="_blank">Edit with Backend Editor</a><a
class="builder-edit-btn btn btn-primary btn-large"
href="' . $front_link . '"
target="_blank">Edit with Frontend
Editor</a></div>';

			$output .= '<input type="hidden" name="' .
$this->name . '" id="' . $this->id . '"
value="">';
			$output .= '<input type="hidden"
name="jform[content]" id="jform_content"
value="">';
			$output .= '<input type="hidden"
id="sppagebuilder_module_id" value="' . $id .
'">';
		}
		else
		{
			$output .= '<div class="alert alert-info">Please
save this module to activate Page Builder</div>';
		}

		$output .= '<style>#general .builder-edit-btn::before
{content: "";} #general .control-group .control-label {display:
none;} #general .control-group .controls {margin-left:
0;}</style>';

		return $output;
	}

	private function pageData($id)
	{
		$db = Factory::getDbo();
		$query = $db->getQuery(true);
		$query->select('*');
		$query->from($db->quoteName('#__sppagebuilder'));
		$query->where($db->quoteName('extension') . ' =
' . $db->quote('mod_sppagebuilder'));
		$query->where($db->quoteName('extension_view') . ' =
' . $db->quote('module'));
		$query->where($db->quoteName('view_id') . ' = '
. $db->quote($id));
		$db->setQuery($query);
		$result = $db->loadObject();

		return $result;
	}

	private function insertData($id, $title, $content, $language, $access,
$published)
	{
		$user = Factory::getUser();
		$date = Factory::getDate();
		$db = Factory::getDbo();
		$page = new stdClass();
		$page->title = $title;
		$page->text = '';
		$page->content = $content;
		$page->extension = 'mod_sppagebuilder';
		$page->extension_view = 'module';
		$page->view_id = $id;
		$page->published = $published;
		$page->created_by = (int) $user->id;
		$page->created_on = $date->toSql();
		$page->modified = $date->toSql();
		$page->language = $language;
		$page->access = $access;
		$page->css = '';
		$page->active = 1;
		$page->version = SppagebuilderHelper::getVersion();

		$db->insertObject('#__sppagebuilder', $page);

		return $db->insertid();
	}

	function isJson($string)
	{
		json_decode($string);
		return (json_last_error() == JSON_ERROR_NONE);
	}
}
contentcategories.php000064400000003106151162104230010770 0ustar00<?php
/**
 *
------------------------------------------------------------------------
 * JA Filter Plugin - Content
 *
------------------------------------------------------------------------
 * Copyright (C) 2004-2016 J.O.O.M Solutions Co., Ltd. All Rights
Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites: http://www.joomlart.com - http://www.joomlancers.com
 * This file may not be redistributed in whole or significant part.
 *
------------------------------------------------------------------------
 */
 
defined('_JEXEC') or die();
JLoader::register('ContentFilterHelper', JPATH_PLUGINS .
'/jamegafilter/content/helper.php');

class JFormFieldContentcategories extends JFormField
{
    protected $type = 'Contentcategories';

    protected function getInput()
    {
        $value = 0;
		if (!empty($this->value)) {
			$value = $this->value;
		}

		$helper = new ContentFilterHelper;
		$items = $helper->getChildCategories();
		
		$html = '';
		$html = '<select class="form-select form-select-color-state
form-select-success valid form-control-success" name="'
      .$this->name.'">';
		$html .= '<option
value="0">'.JText::_('COM_JAMEGAFILTER_ALL_CATEGORIES').'</option>';
		foreach ($items as $item) {
			if ($item->published != '1')
				continue;
			$html .= '<option '.($value == $item->id ? '
selected="selected" ' : '').'
value="'.$item->id.'">'.str_repeat('.&nbsp;&nbsp;',
($item->level)).'|_.&nbsp;'.$item->title.'</option>';
		}
		$html.='</select>';
		return $html;
    }
}
calendar/calendar.php000064400000002376151162436570010621 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Calendar
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Calendar Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsCalendar extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		// Set filter to user UTC
		$fieldNode->setAttribute('filter', 'USER_UTC');

		// Set field to use translated formats
		$fieldNode->setAttribute('translateformat', '1');
		$fieldNode->setAttribute('showtime',
$field->fieldparams->get('showtime', 0) ? 'true'
: 'false');

		return $fieldNode;
	}
}
calendar/calendar.xml000064400000001545151162436570010627 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_calendar</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_CALENDAR_XML_DESCRIPTION</description>
	<files>
		<filename plugin="calendar">calendar.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_calendar.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_calendar.sys.ini</language>
	</languages>
</extension>
calendar/params/calendar.xml000064400000000720151162436570012104
0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="showtime"
				type="radio"
				label="PLG_FIELDS_CALENDAR_PARAMS_SHOWTIME_LABEL"
				description="PLG_FIELDS_CALENDAR_PARAMS_SHOWTIME_DESC"
				class="btn-group btn-group-yesno"
				default="0"
				filter="integer"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
		</fieldset>
	</fields>
</form>
calendar/tmpl/calendar.php000064400000001061151162436570011563
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Calendar
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

if (is_array($value))
{
	$value = implode(', ', $value);
}

$formatString =  $field->fieldparams->get('showtime', 0) ?
'DATE_FORMAT_LC5' : 'DATE_FORMAT_LC4';

echo htmlentities(JHtml::_('date', $value,
JText::_($formatString)));
checkboxes/checkboxes.php000064400000000737151162436570011532
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Checkboxes
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldslistplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Checkboxes Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsCheckboxes extends FieldsListPlugin
{
}
checkboxes/checkboxes.xml000064400000003134151162436570011535
0ustar00<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_checkboxes</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_CHECKBOXES_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="checkboxes">checkboxes.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_checkboxes.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_checkboxes.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="options"
					type="subform"
					label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_LABEL"
					description="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_DESC"
					layout="joomla.form.field.subform.repeatable-table"
					icon="list"
					multiple="true"
					>
					<form hidden="true" name="list_templates_modal"
repeat="true">
						<field
							name="name"
							type="text"
							label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_NAME_LABEL"
							size="30"
						/>

						<field
							name="value"
							type="text"
							label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_VALUE_LABEL"
							size="30"
						/>
					</form>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
checkboxes/params/checkboxes.xml000064400000001373151162436570013023
0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="options"
				type="subform"
				label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_LABEL"
				description="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_DESC"
				layout="joomla.form.field.subform.repeatable-table"
				icon="list"
				multiple="true"
				>
				<form hidden="true" name="list_templates_modal"
repeat="true">
					<field
						name="name"
						type="text"
						label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_NAME_LABEL"
						size="30"
					/>

					<field
						name="value"
						type="text"
						label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_VALUE_LABEL"
						size="30"
					/>
				</form>
			</field>
		</fieldset>
	</fields>
</form>
checkboxes/tmpl/checkboxes.php000064400000001203151162436570012473
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Checkboxes
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$fieldValue = $field->value;

if ($fieldValue === '' || $fieldValue === null)
{
	return;
}

$fieldValue = (array) $fieldValue;
$texts      = array();
$options    = $this->getOptionsFromField($field);

foreach ($options as $value => $name)
{
	if (in_array((string) $value, $fieldValue))
	{
		$texts[] = JText::_($name);
	}
}

echo htmlentities(implode(', ', $texts));
color/color.php000064400000002026151162436600007515 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Color
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Color Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsColor extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('validate', 'color');

		return $fieldNode;
	}
}
color/color.xml000064400000001471151162436600007531 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_color</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_COLOR_XML_DESCRIPTION</description>
	<files>
		<filename plugin="color">color.php</filename>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_color.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_color.sys.ini</language>
	</languages>
</extension>
color/tmpl/color.php000064400000000640151162436600010471 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Color
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

if (is_array($value))
{
	$value = implode(', ', $value);
}

echo htmlentities($value);
editor/editor.php000064400000002306151162436600010036 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Editor Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsEditor extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('buttons',
$field->fieldparams->get('buttons',
$this->params->get('buttons', 0)) ? 'true' :
'false');
		$fieldNode->setAttribute('hide', implode(',',
$field->fieldparams->get('hide', array())));

		return $fieldNode;
	}
}
editor/editor.xml000064400000004542151162436600010053 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_editor</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_EDITOR_XML_DESCRIPTION</description>
	<files>
		<filename plugin="editor">editor.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_editor.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_editor.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="buttons"
					type="radio"
					label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="hide"
					type="plugins"
					label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL"
					description="JGLOBAL_SELECT_SOME_OPTIONS"
					folder="editors-xtd"
					multiple="true"
				/>

				<field
					name="width"
					type="text"
					label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC"
					default="100%"
					size="5"
				/>

				<field
					name="height"
					type="text"
					label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC"
					default="250px"
					size="5"
				/>

				<field
					name="filter"
					type="list"
					label="PLG_FIELDS_EDITOR_PARAMS_FILTER_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_FILTER_DESC"
					class="btn-group"
					default="JComponentHelper::filterText"
					validate="options"
					>
					<option value="0">JNO</option>
					<option
value="raw">JLIB_FILTER_PARAMS_RAW</option>
					<option
value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
					<option
value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
editor/params/editor.xml000064400000002746151162436600011342
0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="buttons"
				type="list"
				label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="hide"
				type="plugins"
				label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL"
				description="JGLOBAL_SELECT_SOME_OPTIONS"
				folder="editors-xtd"
				multiple="true"
			/>

			<field
				name="width"
				type="text"
				label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC"
				size="5"
			/>

			<field
				name="height"
				type="text"
				label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC"
				size="5"
			/>

			<field
				name="filter"
				type="list"
				label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL"
				description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC"
				class="btn-group"
				validate="options"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="0">JNO</option>
				<option
value="raw">JLIB_FILTER_PARAMS_RAW</option>
				<option
value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
				<option
value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
			</field>
		</fieldset>
	</fields>
</form>
editor/tmpl/editor.php000064400000000563151162436600011015 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

echo JHtml::_('content.prepare', $value);
imagelist/imagelist.php000064400000002202151162436600011211
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Imagelist
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Imagelist Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsImagelist extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('hide_default', 'true');
		$fieldNode->setAttribute('directory', '/images/' .
$fieldNode->getAttribute('directory'));

		return $fieldNode;
	}
}
imagelist/imagelist.xml000064400000003477151162436600011241
0ustar00<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_imagelist</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_IMAGELIST_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="imagelist">imagelist.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_imagelist.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_imagelist.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="directory"
					type="folderlist"
					label="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL"
					description="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC"
					directory="images"
					hide_none="true"
					hide_default="true"
					recursive="true"
					default="/"
					>
					<option value="/">/</option>
				</field>

				<field
					name="multiple"
					type="radio"
					label="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL"
					description="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="image_class"
					type="textarea"
					label="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL"
					description="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_DESC"
					size="40"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
imagelist/params/imagelist.xml000064400000002011151162436600012503
0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="directory"
				type="folderlist"
				label="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL"
				description="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC"
				directory="images"
				hide_none="true"
				hide_default="true"
				recursive="true"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="/">/</option>
			</field>

			<field
				name="multiple"
				type="list"
				label="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL"
				description="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="image_class"
				type="textarea"
				label="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL"
				description="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_DESC"
				size="40"
			/>
		</fieldset>
	</fields>
</form>
imagelist/tmpl/imagelist.php000064400000001726151162436600012177
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Imagelist
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

if ($field->value == '')
{
	return;
}

$class = $fieldParams->get('image_class');

if ($class)
{
	// space before, so if no class sprintf below works
	$class = ' class="' . htmlentities($class, ENT_COMPAT,
'UTF-8', true) . '"';
}

$value  = (array) $field->value;
$buffer = '';

foreach ($value as $path)
{
	if (!$path || $path == '-1')
	{
		continue;
	}

	if ($fieldParams->get('directory', '/') !==
'/')
	{
		$buffer .= sprintf('<img
src="images/%s/%s"%s>',
			$fieldParams->get('directory'),
			htmlentities($path, ENT_COMPAT, 'UTF-8', true),
			$class
		);
	}
	else
	{
		$buffer .= sprintf('<img src="images/%s"%s>',
			htmlentities($path, ENT_COMPAT, 'UTF-8', true),
			$class
		);
	}
}

echo $buffer;
integer/integer.php000064400000000716151162436600010357 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Integer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Integer Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsInteger extends FieldsPlugin
{
}
integer/integer.xml000064400000003625151162436600010372 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_integer</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_INTEGER_XML_DESCRIPTION</description>
	<files>
		<filename plugin="integer">integer.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_integer.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_integer.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="multiple"
					type="radio"
					label="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_LABEL"
					description="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="first"
					type="number"
					label="PLG_FIELDS_INTEGER_PARAMS_FIRST_LABEL"
					description="PLG_FIELDS_INTEGER_PARAMS_FIRST_DESC"
					default="1"
					filter="integer"
					size="5"
				/>

				<field
					name="last"
					type="number"
					label="PLG_FIELDS_INTEGER_PARAMS_LAST_LABEL"
					description="PLG_FIELDS_INTEGER_PARAMS_LAST_DESC"
					default="100"
					filter="integer"
					size="5"
				/>

				<field
					name="step"
					type="number"
					label="PLG_FIELDS_INTEGER_PARAMS_STEP_LABEL"
					description="PLG_FIELDS_INTEGER_PARAMS_STEP_DESC"
					default="1"
					filter="integer"
					size="5"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
integer/params/integer.xml000064400000002010151162436600011640
0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="multiple"
				type="list"
				label="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_LABEL"
				description="PLG_FIELDS_INTEGER_PARAMS_MULTIPLE_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="first"
				type="number"
				label="PLG_FIELDS_INTEGER_PARAMS_FIRST_LABEL"
				description="PLG_FIELDS_INTEGER_PARAMS_FIRST_DESC"
				filter="integer"
				size="5"
			/>

			<field
				name="last"
				type="number"
				label="PLG_FIELDS_INTEGER_PARAMS_LAST_LABEL"
				description="PLG_FIELDS_INTEGER_PARAMS_LAST_DESC"
				filter="integer"
				size="5"
			/>

			<field
				name="step"
				type="number"
				label="PLG_FIELDS_INTEGER_PARAMS_STEP_LABEL"
				description="PLG_FIELDS_INTEGER_PARAMS_STEP_DESC"
				filter="integer"
				size="5"
			/>
		</fieldset>
	</fields>
</form>
integer/tmpl/integer.php000064400000000712151162436600011327
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Integer
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

if (is_array($value))
{
	$value = implode(', ', array_map('intval', $value));
}
else
{
	$value = (int) $value;
}

echo $value;
list/list.php000064400000002055151162436600007211 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.List
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldslistplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields list Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsList extends FieldsListPlugin
{
	/**
	 * Prepares the field
	 *
	 * @param   string    $context  The context.
	 * @param   stdclass  $item     The item.
	 * @param   stdclass  $field    The field.
	 *
	 * @return  object
	 *
	 * @since   3.9.2
	 */
	public function onCustomFieldsPrepareField($context, $item, $field)
	{
		// Check if the field should be processed
		if (!$this->isTypeSupported($field->type))
		{
			return;
		}

		// The field's rawvalue should be an array
		if (!is_array($field->rawvalue))
		{
			$field->rawvalue = (array) $field->rawvalue;
		}

		return parent::onCustomFieldsPrepareField($context, $item, $field);
	}
}
list/list.xml000064400000003467151162436600007232 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_list</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_LIST_XML_DESCRIPTION</description>
	<files>
		<filename plugin="list">list.php</filename>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_list.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_list.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="multiple"
					type="radio"
					label="PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL"
					description="PLG_FIELDS_LIST_PARAMS_MULTIPLE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="options"
					type="subform"
					label="PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL"
					description="PLG_FIELDS_LIST_PARAMS_OPTIONS_DESC"
					layout="joomla.form.field.subform.repeatable-table"
					icon="list"
					multiple="true"
					>
					<form hidden="true" name="list_templates_modal"
repeat="true">
						<field
							name="name"
							type="text"
							label="PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL"
							size="30"
						/>

						<field
							name="value"
							type="text"
							label="PLG_FIELDS_LIST_PARAMS_OPTIONS_VALUE_LABEL"
							size="30"
						/>
					</form>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
list/params/list.xml000064400000002043151162436600010502 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="multiple"
				type="list"
				label="PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL"
				description="PLG_FIELDS_LIST_PARAMS_MULTIPLE_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="options"
				type="subform"
				label="PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL"
				description="PLG_FIELDS_LIST_PARAMS_OPTIONS_DESC"
				layout="joomla.form.field.subform.repeatable-table"
				icon="list"
				multiple="true"
				>
				<form hidden="true" name="list_templates_modal"
repeat="true">
					<field
						name="name"
						type="text"
						label="PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL"
						size="30"
					/>

					<field
						name="value"
						type="text"
						label="PLG_FIELDS_LIST_PARAMS_OPTIONS_VALUE_LABEL"
						size="30"
					/>
				</form>
			</field>
		</fieldset>
	</fields>
</form>
list/tmpl/list.php000064400000001145151162436600010164 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.List
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$fieldValue = $field->value;

if ($fieldValue == '')
{
	return;
}

$fieldValue = (array) $fieldValue;
$texts      = array();
$options    = $this->getOptionsFromField($field);

foreach ($options as $value => $name)
{
	if (in_array((string) $value, $fieldValue))
	{
		$texts[] = JText::_($name);
	}
}


echo htmlentities(implode(', ', $texts));
media/media.php000064400000002031151162436600007413 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Media
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Media Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsMedia extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('hide_default', 'true');

		return $fieldNode;
	}
}
media/media.xml000064400000003411151162436600007427 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_media</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_MEDIA_XML_DESCRIPTION</description>
	<files>
		<filename plugin="media">media.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_media.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_media.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="directory"
					type="folderlist"
					label="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_LABEL"
					description="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_DESC"
					directory="images"
					hide_none="true"
					recursive="true"
				/>

				<field
					name="preview"
					type="list"
					label="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_LABEL"
					description="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_DESC"
					class="btn-group"
					default="tooltip"
					>
					<option
value="tooltip">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_TOOLTIP</option>
					<option
value="true">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_INLINE</option>
					<option value="false">JNO</option>
				</field>

				<field
					name="image_class"
					type="textarea"
					label="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_LABEL"
					description="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_DESC"
					size="40"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
media/params/media.xml000064400000001720151162436600010713 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="directory"
				type="folderlist"
				label="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_LABEL"
				description="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_DESC"
				directory="images"
				hide_none="true"
				recursive="true"
			/>

			<field
				name="preview"
				type="list"
				label="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_LABEL"
				description="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_DESC"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option
value="tooltip">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_TOOLTIP</option>
				<option
value="true">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_INLINE</option>
				<option value="false">JNO</option>
			</field>

			<field
				name="image_class"
				type="textarea"
				label="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_LABEL"
				description="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_DESC"
				size="40"
			/>
		</fieldset>
	</fields>
</form>
media/tmpl/media.php000064400000001245151162436600010375 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Media
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

if ($field->value == '')
{
	return;
}

$class = $fieldParams->get('image_class');

if ($class)
{
	$class = ' class="' . htmlentities($class, ENT_COMPAT,
'UTF-8', true) . '"';
}

$value  = (array) $field->value;
$buffer = '';

foreach ($value as $path)
{
	if (!$path)
	{
		continue;
	}

	$buffer .= sprintf('<img src="%s"%s>',
		htmlentities($path, ENT_COMPAT, 'UTF-8', true),
		$class
	);
}

echo $buffer;
radio/params/radio.xml000064400000001777151162436600010765 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="options"
				type="subform"
				label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL"
				description="PLG_FIELDS_RADIO_PARAMS_OPTIONS_DESC"
				layout="joomla.form.field.subform.repeatable-table"
				icon="list"
				multiple="true"
				>
				<form hidden="true" name="list_templates_modal"
repeat="true">
					<field
						name="name"
						type="text"
						label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL"
						size="30"
					/>

					<field
						name="value"
						type="text"
						label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL"
						size="30"
					/>
				</form>
			</field>
		</fieldset>
	</fields>

	<fields name="params">
		<fieldset name="basic">
			<field
				name="class"
				type="textarea"
				label="COM_FIELDS_FIELD_CLASS_LABEL"
				description="COM_FIELDS_FIELD_CLASS_DESC"
				class="input-xxlarge"
				size="40"
				default="btn-group"
			/>
		</fieldset>
	</fields>
</form>
radio/radio.php000064400000000720151162436600007454 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Radio
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldslistplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Radio Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsRadio extends FieldsListPlugin
{
}
radio/radio.xml000064400000003052151162436600007466 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_radio</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_RADIO_XML_DESCRIPTION</description>
	<files>
		<filename plugin="radio">radio.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_radio.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_radio.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="options"
					type="subform"
					label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL"
					description="PLG_FIELDS_RADIO_PARAMS_OPTIONS_DESC"
					layout="joomla.form.field.subform.repeatable-table"
					icon="list"
					multiple="true"
					>
					<form hidden="true" name="list_templates_modal"
repeat="true">
						<field
							name="name"
							type="text"
							label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL"
							size="30"
						/>

						<field
							name="value"
							type="text"
							label="PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL"
							size="30"
						/>
					</form>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
radio/tmpl/radio.php000064400000001141151162436600010426 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Radio
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

$value   = (array) $value;
$texts   = array();
$options = $this->getOptionsFromField($field);

foreach ($options as $optionValue => $optionText)
{
	if (in_array((string) $optionValue, $value))
	{
		$texts[] = JText::_($optionText);
	}
}


echo htmlentities(implode(', ', $texts));
repeatable/params/repeatable.xml000064400000004710151162436600012767
0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="fields"
				type="subform"
				label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDS_LABEL"
				description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDS_DESC"
				multiple="true">
				<form>
					<fields>
						<fieldset>
							<field
								name="fieldname"
								type="text"
								label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_NAME_LABEL"
								description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_NAME_DESC"
								required="true"
							/>
							<field
								name="fieldtype"
								type="list"
								label="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_LABEL"
								description="PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_DESC"
								>
								<option
value="editor">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_EDITOR</option>
								<option
value="media">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_MEDIA</option>
								<option
value="number">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_NUMBER</option>
								<option
value="text">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_TEXT</option>
								<option
value="textarea">PLG_FIELDS_REPEATABLE_PARAMS_FIELDNAME_TYPE_TEXTAREA</option>
							</field>
							<field
								name="fieldfilter"
								type="list"
								label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL"
								description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC"
								class="btn-group"
								validate="options"
								showon="fieldtype!:media,number"
								>
								<option value="0">JNO</option>
								<option
									showon="fieldtype:editor,text,textarea"
									value="raw">JLIB_FILTER_PARAMS_RAW</option>
								<option
									showon="fieldtype:editor,text,textarea"
									value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
								<option
									showon="fieldtype:editor,text,textarea"
									value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
								<option
									showon="fieldtype:text,textarea"
									value="alnum">JLIB_FILTER_PARAMS_ALNUM</option>
								<option
									showon="fieldtype:text,textarea"
									value="integer">JLIB_FILTER_PARAMS_INTEGER</option>
								<option
									showon="fieldtype:text,textarea"
									value="float">JLIB_FILTER_PARAMS_FLOAT</option>
								<option
									showon="fieldtype:text,textarea"
									value="tel">JLIB_FILTER_PARAMS_TEL</option>
							</field>
						</fieldset>
					</fields>
				</form>
			</field>
		</fieldset>
	</fields>
</form>
repeatable/repeatable.php000064400000007350151162436600011476
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Repeatable
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

use Joomla\CMS\MVC\Model\BaseDatabaseModel;

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Repeatable plugin.
 *
 * @since  3.9.0
 */
class PlgFieldsRepeatable extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.9.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$readonly = false;

		if (!FieldsHelper::canEditFieldValue($field))
		{
			$readonly = true;
		}

		$fieldNode->setAttribute('type', 'subform');
		$fieldNode->setAttribute('multiple', 'true');
		$fieldNode->setAttribute('layout',
'joomla.form.field.subform.repeatable-table');

		// Build the form source
		$fieldsXml = new SimpleXMLElement('<form/>');
		$fields    = $fieldsXml->addChild('fields');

		// Get the form settings
		$formFields = $field->fieldparams->get('fields');

		// Add the fields to the form
		foreach ($formFields as $index => $formField)
		{
			$child = $fields->addChild('field');
			$child->addAttribute('name', $formField->fieldname);
			$child->addAttribute('type', $formField->fieldtype);
			$child->addAttribute('readonly', $readonly);

			if (isset($formField->fieldfilter))
			{
				$child->addAttribute('filter',
$formField->fieldfilter);
			}
		}

		$fieldNode->setAttribute('formsource',
$fieldsXml->asXML());

		// Return the node
		return $fieldNode;
	}

	/**
	 * The save event.
	 *
	 * @param   string   $context  The context
	 * @param   JTable   $item     The article data
	 * @param   boolean  $isNew    Is new item
	 * @param   array    $data     The validated data
	 *
	 * @return  boolean
	 *
	 * @since   3.9.0
	 */
	public function onContentAfterSave($context, $item, $isNew, $data =
array())
	{
		// Create correct context for category
		if ($context == 'com_categories.category')
		{
			$context = $item->get('extension') .
'.categories';

			// Set the catid on the category to get only the fields which belong to
this category
			$item->set('catid', $item->get('id'));
		}

		// Check the context
		$parts = FieldsHelper::extract($context, $item);

		if (!$parts)
		{
			return true;
		}

		// Compile the right context for the fields
		$context = $parts[0] . '.' . $parts[1];

		// Loading the fields
		$fields = FieldsHelper::getFields($context, $item);

		if (!$fields)
		{
			return true;
		}

		// Get the fields data
		$fieldsData = !empty($data['com_fields']) ?
$data['com_fields'] : array();

		// Loading the model
		/** @var FieldsModelField $model */
		$model = BaseDatabaseModel::getInstance('Field',
'FieldsModel', array('ignore_request' => true));

		// Loop over the fields
		foreach ($fields as $field)
		{
			// Find the field of this type repeatable
			if ($field->type !== $this->_name)
			{
				continue;
			}

			// Determine the value if it is available from the data
			$value = key_exists($field->name, $fieldsData) ?
$fieldsData[$field->name] : null;

			// Handle json encoded values
			if (!is_array($value))
			{
				$value = json_decode($value, true);
			}

			// Setting the value for the field and the item
			$model->setFieldValue($field->id, $item->get('id'),
json_encode($value));
		}

		return true;
	}
}
repeatable/repeatable.xml000064400000001617151162436600011507
0ustar00<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.8.0"
group="fields" method="upgrade">
	<name>plg_fields_repeatable</name>
	<author>Joomla! Project</author>
	<creationDate>April 2018</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.9.0</version>
	<description>PLG_FIELDS_REPEATABLE_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="repeatable">repeatable.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages folder="language">
		<language
tag="en-GB">en-GB/en-GB.plg_fields_repeatable.ini</language>
		<language
tag="en-GB">en-GB/en-GB.plg_fields_repeatable.sys.ini</language>
	</languages>
</extension>
repeatable/tmpl/repeatable.php000064400000001114151162436600012442
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Repeatable
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$fieldValue = $field->value;

if ($fieldValue === '')
{
	return;
}

// Get the values
$fieldValues = json_decode($fieldValue, true);

if (empty($fieldValues))
{
	return;
}

$html = '<ul>';

foreach ($fieldValues as $value)
{
	$html .= '<li>' . implode(', ', $value) .
'</li>';
}

$html .= '</ul>';

echo $html;
sql/params/sql.xml000064400000001223151162436600010151 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="query"
				type="textarea"
				label="PLG_FIELDS_SQL_PARAMS_QUERY_LABEL"
				description="PLG_FIELDS_SQL_PARAMS_QUERY_DESC"
				filter="raw"
				rows="10"
				required="true"
			/>

			<field
				name="multiple"
				type="list"
				label="PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL"
				description="PLG_FIELDS_SQL_PARAMS_MULTIPLE_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
		</fieldset>
	</fields>
</form>
sql/sql.php000064400000003533151162436600006663 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Sql
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldslistplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Sql Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsSql extends FieldsListPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('value_field', 'text');
		$fieldNode->setAttribute('key_field', 'value');

		return $fieldNode;
	}

	/**
	 * The save event.
	 *
	 * @param   string   $context  The context
	 * @param   JTable   $item     The table
	 * @param   boolean  $isNew    Is new item
	 * @param   array    $data     The validated data
	 *
	 * @return  boolean
	 *
	 * @since   3.7.0
	 */
	public function onContentBeforeSave($context, $item, $isNew, $data =
array())
	{
		// Only work on new SQL fields
		if ($context != 'com_fields.field' || !isset($item->type) ||
$item->type != 'sql')
		{
			return true;
		}

		// If we are not a super admin, don't let the user create or update
a SQL field
		if (!JAccess::getAssetRules(1)->allow('core.admin',
JFactory::getUser()->getAuthorisedGroups()))
		{
			$item->setError(JText::_('PLG_FIELDS_SQL_CREATE_NOT_POSSIBLE'));

			return false;
		}

		return true;
	}
}
sql/sql.xml000064400000002704151162436600006673 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_sql</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_SQL_XML_DESCRIPTION</description>
	<files>
		<filename plugin="sql">sql.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_sql.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_sql.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="query"
					type="textarea"
					label="PLG_FIELDS_SQL_PARAMS_QUERY_LABEL"
					description="PLG_FIELDS_SQL_PARAMS_QUERY_DESC"
					rows="10"
					filter="raw"
					required="true"
				/>

				<field
					name="multiple"
					type="radio"
					label="PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL"
					description="PLG_FIELDS_SQL_PARAMS_MULTIPLE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
sql/tmpl/sql.php000064400000001771151162436600007641 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Sql
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

$db        = JFactory::getDbo();
$value     = (array) $value;
$condition = '';

foreach ($value as $v)
{
	if (!$v)
	{
		continue;
	}

	$condition .= ', ' . $db->q($v);
}

$query = $fieldParams->get('query', '');

// Run the query with a having condition because it supports aliases
$db->setQuery($query . ' having value in (' . trim($condition,
',') . ')');

try
{
	$items = $db->loadObjectlist();
}
catch (Exception $e)
{
	// If the query failed, we fetch all elements
	$db->setQuery($query);
	$items = $db->loadObjectlist();
}

$texts = array();

foreach ($items as $item)
{
	if (in_array($item->value, $value))
	{
		$texts[] = $item->text;
	}
}

echo htmlentities(implode(', ', $texts));
text/params/text.xml000064400000002055151162436600010527 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="filter"
				type="list"
				label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL"
				description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC"
				class="btn-group"
				validate="options"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="0">JNO</option>
				<option
value="raw">JLIB_FILTER_PARAMS_RAW</option>
				<option
value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
				<option
value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
				<option
value="alnum">JLIB_FILTER_PARAMS_ALNUM</option>
				<option
value="integer">JLIB_FILTER_PARAMS_INTEGER</option>
				<option
value="float">JLIB_FILTER_PARAMS_FLOAT</option>
				<option
value="tel">JLIB_FILTER_PARAMS_TEL</option>
			</field>

			<field
				name="maxlength"
				type="number"
				label="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_LABEL"
				description="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_DESC"
				filter="integer"
			/>
		</fieldset>
	</fields>
</form>
text/text.php000064400000000705151162436600007233 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Text
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Text Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsText extends FieldsPlugin
{
}
text/text.xml000064400000003534151162436600007247 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_text</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_TEXT_XML_DESCRIPTION</description>
	<files>
		<filename plugin="text">text.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_text.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_text.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="filter"
					type="list"
					label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL"
					description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC"
					class="btn-group"
					default="JComponentHelper::filterText"
					validate="options"
					>
					<option value="0">JNO</option>
					<option
value="raw">JLIB_FILTER_PARAMS_RAW</option>
					<option
value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
					<option
value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
					<option
value="alnum">JLIB_FILTER_PARAMS_ALNUM</option>
					<option
value="integer">JLIB_FILTER_PARAMS_INTEGER</option>
					<option
value="float">JLIB_FILTER_PARAMS_FLOAT</option>
					<option
value="tel">JLIB_FILTER_PARAMS_TEL</option>
				</field>

				<field
					name="maxlength"
					type="number"
					label="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_LABEL"
					description="PLG_FIELDS_TEXT_PARAMS_MAXLENGTH_DESC"
					filter="integer"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
text/tmpl/text.php000064400000000637151162436600010213 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Text
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

if (is_array($value))
{
	$value = implode(', ', $value);
}

echo htmlentities($value);
textarea/params/textarea.xml000064400000002671151162436600012215
0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="rows"
				type="number"
				label="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_LABEL"
				description="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_DESC"
				filter="integer"
				size="5"
			/>

			<field
				name="cols"
				type="number"
				label="PLG_FIELDS_TEXTAREA_PARAMS_COLS_LABEL"
				description="PLG_FIELDS_TEXTAREA_PARAMS_COLS_DESC"
				filter="integer"
				size="5"
			/>

			<field
				name="maxlength"
				type="number"
				label="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_LABEL"
				description="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_DESC"
				filter="integer"
			/>

			<field
				name="filter"
				type="list"
				label="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_LABEL"
				description="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_DESC"
				class="btn-group"
				validate="options"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="0">JNO</option>
				<option
value="raw">JLIB_FILTER_PARAMS_RAW</option>
				<option
value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
				<option
value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
				<option
value="alnum">JLIB_FILTER_PARAMS_ALNUM</option>
				<option
value="integer">JLIB_FILTER_PARAMS_INTEGER</option>
				<option
value="float">JLIB_FILTER_PARAMS_FLOAT</option>
				<option
value="tel">JLIB_FILTER_PARAMS_TEL</option>
			</field>
		</fieldset>
	</fields>
</form>
textarea/textarea.php000064400000000721151162436600010713 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Textarea
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Textarea Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsTextarea extends FieldsPlugin
{
}
textarea/textarea.xml000064400000004464151162436600010734 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_textarea</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_TEXTAREA_XML_DESCRIPTION</description>
	<files>
		<filename plugin="textarea">textarea.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_textarea.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_textarea.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="rows"
					type="number"
					label="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_LABEL"
					description="PLG_FIELDS_TEXTAREA_PARAMS_ROWS_DESC"
					default="10"
					filter="integer"
					size="5"
				/>

				<field
					name="cols"
					type="number"
					label="PLG_FIELDS_TEXTAREA_PARAMS_COLS_LABEL"
					description="PLG_FIELDS_TEXTAREA_PARAMS_COLS_DESC"
					default="10"
					filter="integer"
					size="5"
				/>

				<field
					name="maxlength"
					type="number"
					label="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_LABEL"
					description="PLG_FIELDS_TEXTAREA_PARAMS_MAXLENGTH_DESC"
					filter="integer"
				/>

				<field
					name="filter"
					type="list"
					label="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_LABEL"
					description="PLG_FIELDS_TEXTAREA_PARAMS_FILTER_DESC"
					class="btn-group"
					default="JComponentHelper::filterText"
					validate="options"
					>
					<option value="0">JNO</option>
					<option
value="raw">JLIB_FILTER_PARAMS_RAW</option>
					<option
value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
					<option
value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
					<option
value="alnum">JLIB_FILTER_PARAMS_ALNUM</option>
					<option
value="integer">JLIB_FILTER_PARAMS_INTEGER</option>
					<option
value="float">JLIB_FILTER_PARAMS_FLOAT</option>
					<option
value="tel">JLIB_FILTER_PARAMS_TEL</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
textarea/tmpl/textarea.php000064400000000565151162436600011675
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Textarea
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

echo JHtml::_('content.prepare', $value);
url/params/url.xml000064400000001560151162436600010163 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="schemes"
				type="list"
				label="PLG_FIELDS_URL_PARAMS_SCHEMES_LABEL"
				description="PLG_FIELDS_URL_PARAMS_SCHEMES_DESC"
				multiple="true"
				>
				<option value="http">HTTP</option>
				<option value="https">HTTPS</option>
				<option value="ftp">FTP</option>
				<option value="ftps">FTPS</option>
				<option value="file">FILE</option>
				<option value="mailto">MAILTO</option>
			</field>

			<field
				name="relative"
				type="list"
				label="PLG_FIELDS_URL_PARAMS_RELATIVE_LABEL"
				description="PLG_FIELDS_URL_PARAMS_RELATIVE_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
		</fieldset>
	</fields>
</form>
url/tmpl/url.php000064400000001057151162436600007644 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.URL
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

$attributes = '';

if (!JUri::isInternal($value))
{
	$attributes = ' rel="nofollow noopener noreferrer"
target="_blank"';
}

echo sprintf('<a href="%s"%s>%s</a>',
	htmlspecialchars($value),
	$attributes,
	htmlspecialchars($value)
);
url/url.php000064400000002161151162436600006665 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.URL
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields URL Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsUrl extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('validate', 'url');

		if (! $fieldNode->getAttribute('relative'))
		{
			$fieldNode->removeAttribute('relative');
		}

		return $fieldNode;
	}
}
url/url.xml000064400000003246151162436600006703 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_url</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_URL_XML_DESCRIPTION</description>
	<files>
		<filename plugin="url">url.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_url.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_url.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="schemes"
					type="list"
					label="PLG_FIELDS_URL_PARAMS_SCHEMES_LABEL"
					description="PLG_FIELDS_URL_PARAMS_SCHEMES_DESC"
					multiple="true"
					>
					<option value="http">HTTP</option>
					<option value="https">HTTPS</option>
					<option value="ftp">FTP</option>
					<option value="ftps">FTPS</option>
					<option value="file">FILE</option>
					<option value="mailto">MAILTO</option>
				</field>

				<field
					name="relative"
					type="radio"
					label="PLG_FIELDS_URL_PARAMS_RELATIVE_LABEL"
					description="PLG_FIELDS_URL_PARAMS_RELATIVE_DESC"
					class="btn-group btn-group-yesno"
					default="1"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
user/params/user.xml000064400000000600151162436600010505 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<form>
	<field
		name="default_value"
		type="user"
		label="PLG_FIELDS_USER_DEFAULT_VALUE_LABEL"
		description="PLG_FIELDS_USER_DEFAULT_VALUE_DESC"
	/>
	<fields name="params"
label="COM_FIELDS_FIELD_BASIC_LABEL">
		<fieldset name="basic">
			<field
				name="show_on"
				type="hidden"
				filter="unset"
			/>
		</fieldset>
	</fields>
</form>
user/tmpl/user.php000064400000001245151162436600010173 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.User
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

$value = (array) $value;
$texts = array();

foreach ($value as $userId)
{
	if (!$userId)
	{
		continue;
	}

	$user = JFactory::getUser($userId);

	if ($user)
	{
		// Use the Username
		$texts[] = $user->name;
		continue;
	}

	// Fallback and add the User ID if we get no JUser Object
	$texts[] = $userId;
}

echo htmlentities(implode(', ', $texts));
user/user.php000064400000002021151162436600007210 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.User
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields User Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsUser extends FieldsPlugin
{

	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		if (JFactory::getApplication()->isClient('site'))
		{
			// The user field is not working on the front end
			return;
		}

		return parent::onCustomFieldsPrepareDom($field, $parent, $form);
	}
}
user/user.xml000064400000001463151162436600007232 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_user</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_USER_XML_DESCRIPTION</description>
	<files>
		<filename plugin="user">user.php</filename>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_user.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_user.sys.ini</language>
	</languages>
</extension>
usergrouplist/params/usergrouplist.xml000064400000000735151162436600014440
0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="multiple"
				type="list"
				label="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_LABEL"
				description="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
		</fieldset>
	</fields>
</form>
usergrouplist/tmpl/usergrouplist.php000064400000001262151162436600014114
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Usergrouplist
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

JLoader::register('UsersHelper', JPATH_ADMINISTRATOR .
'/components/com_users/helpers/users.php');

$value  = (array) $value;
$texts  = array();
$groups = UsersHelper::getGroups();

foreach ($groups as $group)
{
	if (in_array($group->value, $value))
	{
		$texts[] = htmlentities(trim($group->text, '- '));
	}
}

echo htmlentities(implode(', ', $texts));
usergrouplist/usergrouplist.php000064400000000740151162436600013140
0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Usergrouplist
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Usergrouplist Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsUsergrouplist extends FieldsPlugin
{
}
usergrouplist/usergrouplist.xml000064400000002501151162436600013146
0ustar00<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_usergrouplist</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_USERGROUPLIST_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="usergrouplist">usergrouplist.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_usergrouplist.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_usergrouplist.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="multiple"
					type="radio"
					label="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_LABEL"
					description="PLG_FIELDS_USERGROUPLIST_PARAMS_MULTIPLE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>