; (function ($){
'use strict';
jQuery(document).ready(function (){
var $this=false;
uacf7_cf_handler_this($this);
jQuery(document).on('keyup', '.wpcf7-form input:not(.wpcf7-uacf7_country_dropdown, .wpcf7-uacf7_city, .wpcf7-uacf7_state, .wpcf7-uacf7_zip), .wpcf7-form textarea', function (){
var $this=$(this);
uacf7_cf_handler_this($this);
});
jQuery(document).on('change', '.wpcf7-form select:not(.wpcf7-uacf7_product_dropdown), .wpcf7-form input[type="radio"]:not(.uacf7-rating input[type="radio"]), .wpcf7-form input[type="date"]', function (){
var $this=$(this);
uacf7_cf_handler_this($this);
});
jQuery(document).on('change', 'input[type="checkbox"]', function (){
var $this=$(this);
uacf7_cf_handler_this($this);
});
});
function uacf7_cf_handler_this($this){
jQuery('form.wpcf7-form').each(function (){
var contactFormId=jQuery('input[name="_wpcf7"]', this).val();
var repeater_count=jQuery('.uacf7-repeater-count', this).val();
var form=uacf7_cf_object[contactFormId];
var $i=0;
if(typeof repeater_count==='undefined'){
var repeater_weapper='.uacf7_conditional';
}else{
if($this==false){
var repeater_weapper='.uacf7_conditional';
}else{
if(typeof $this.attr('uacf-original-name')==='undefined'||$this.attr('uacf-original-name').length==0){
var repeater_weapper='.uacf7_conditional';
}else{
var repeater_weapper=$this.closest('.uacf7_repeater_sub_field');
}}
}
var tag_name_array=[];
var count=0;
var count_2=0;
jQuery(form).each(function (){
var $uacf7_cf_conditions=form[count_2]['uacf7_cf_conditions'];
var $conditionsLength=$uacf7_cf_conditions['uacf7_cf_tn'].length;
var x;
if(typeof repeater_count!=='undefined'){
for (x=0; x < $conditionsLength; x++){
tag_name_array.push($uacf7_cf_conditions['uacf7_cf_tn'][x]);
count++;
}}
count_2++
});
if(typeof repeater_count!=='undefined'){
if($this!=false){
if(typeof $this.attr('uacf-original-name')!=='undefined'){
if(jQuery.inArray($this.attr('uacf-original-name'), tag_name_array)==-1){
return false;
}}
}}
jQuery(form).each(function (){
var $uacf7_cf_conditions=form[$i]['uacf7_cf_conditions'];
var $conditionsLength=$uacf7_cf_conditions['uacf7_cf_tn'].length;
if($conditionsLength > 0&&form[$i]['uacf7_cf_group']!=''){
var vaL=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'] + '"]').val();
if(jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'] + '"]').is("input[type='radio']")){
var vaL=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'] + '"]:checked').val();
}
if(form[$i]['uacf7_cf_hs']=='show'){
if(typeof repeater_count==='undefined'){
jQuery('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '').hide().addClass('uacf7-hidden');
}else{
if($this==false){
jQuery('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '').hide().addClass('uacf7-hidden');
}else{
if(typeof $this.attr('uacf-original-name')==='undefined'||$this.attr('uacf-original-name').length==0){
jQuery('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '').hide().addClass('uacf7-hidden');
}else{
$this.closest('.uacf7_repeater_sub_field').find('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '').hide().addClass('uacf7-hidden');
}}
}}
var $conditionRule='';
var x;
var $conditions=[];
for (x=0; x < $conditionsLength; x++){
var $tag_name=$uacf7_cf_conditions['uacf7_cf_tn'][x];
if(typeof $tag_name==='undefined'){
var $tag_name=$uacf7_cf_conditions['uacf7_cf_tn'][x];
}
if($tag_name==$uacf7_cf_conditions['uacf7_cf_tn'][x]){
var maybeChecked='';
var maybeMultiple='';
var checkedItem='';
if(jQuery('.wpcf7-form [name="' + $tag_name + '"]').is("input[type='radio']")){
var maybeChecked=':checked';
}
if(jQuery('.wpcf7-form [name="' + $tag_name + '"]').is("input[type='checkbox']")){
var maybeChecked=':checked';
var maybeMultiple='[]';
var checked_values=[];
jQuery('.wpcf7-form [name="' + $tag_name + '"]:checked').each(function (){
checked_values.push(jQuery(this).val());
});
var index=checked_values.indexOf($uacf7_cf_conditions['uacf7_cf_val'][x]);
var checkedItem=checked_values[index];
}
var tagName=$tag_name.replace('[]', '');
if(jQuery('.wpcf7-form [uacf-original-name="' + $tag_name + '"]').is("input[type='checkbox']")||jQuery('.wpcf7-form [uacf-original-name="' + $tag_name + '"]').is("input[type='radio']")){
var maybeChecked=':checked';
var maybeMultiple='[]';
var checked_values=[];
jQuery('.wpcf7-form-control-wrap.' + tagName + ' input:checked').each(function (){
checked_values.push(jQuery(this).val());
});
var index=checked_values.indexOf($uacf7_cf_conditions['uacf7_cf_val'][x]);
var checkedItem=checked_values[index];
}
if(typeof repeater_count==='undefined'){
var currentValue=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]' + maybeChecked + '').val();
}else{
var current_field=jQuery('.wpcf7-form [uacf-original-name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]');
if($this==false){
if(typeof current_field==='undefined'){
var current_field=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]');
}else{
var currentValue=jQuery('.wpcf7-form [uacf-original-name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]' + maybeChecked + '').val();
}}else{
if(typeof current_field==='undefined'||current_field.length==0){
var currentValue=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]' + maybeChecked + '').val();
}else{
var currentValue=repeater_weapper.find('[uacf-original-name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]' + maybeChecked + '').val();
}}
}
if(jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]').is("input[type='checkbox']")){
if(typeof checkedItem==='undefined'){
var currentValue='';
}else{
var currentValue=checkedItem;
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='equal'){
if(currentValue==$uacf7_cf_conditions['uacf7_cf_val'][x]){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='not_equal'){
if(currentValue!=$uacf7_cf_conditions['uacf7_cf_val'][x]){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='greater_than'){
if(parseInt(currentValue) > parseInt($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='less_than'){
if(parseInt(currentValue) < parseInt($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='greater_than_or_equal_to'){
if(parseInt(currentValue) >=parseInt($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='less_than_or_equal_to'){
if(parseInt(currentValue) <=parseInt($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='starts_with'){
if(currentValue.startsWith($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='ends_with'){
if(currentValue.endsWith($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='contains'){
if(currentValue.includes($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='does_not_contain'){
if(!currentValue.includes($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
}}
if(typeof repeater_count==='undefined'){
var $this_condition=jQuery(repeater_weapper + '.' + form[$i]['uacf7_cf_group'] + '');
}else{
if($this==false){
var $this_condition=jQuery('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '');
}else{
if(typeof $this.attr('uacf-original-name')==='undefined'||$this.attr('uacf-original-name').length==0){
var $this_condition=jQuery(repeater_weapper + '.' + form[$i]['uacf7_cf_group'] + '');
}else{
var $this_condition=repeater_weapper.find('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '');
}}
}
if(form[$i]['uacf7_cf_condition_for']==='all'){
var equalResult=$conditions.indexOf("false");
if(form[$i]['uacf7_cf_hs']=='show'){
if(equalResult==-1){
$this_condition.show().removeClass('uacf7-hidden');
$this_condition.attr('data-condition', 'true');
}else{
$this_condition.hide().addClass('uacf7-hidden');
$this_condition.attr('data-condition', 'false');
}}else{
if(equalResult==-1){
$this_condition.hide().addClass('uacf7-hidden');
$this_condition.attr('data-condition', 'true');
}else{
$this_condition.show().removeClass('uacf7-hidden');
$this_condition.attr('data-condition', 'false');
}}
}else{
var orResult=$conditions.indexOf("true");
if(form[$i]['uacf7_cf_hs']=='show'){
if(orResult!=-1){
$this_condition.show().removeClass('uacf7-hidden');
$this_condition.attr('data-condition', 'true');
}else{
$this_condition.hide().addClass('uacf7-hidden');
$this_condition.attr('data-condition', 'false');
}}else{
if(orResult==-1){
$this_condition.show().removeClass('uacf7-hidden');
$this_condition.attr('data-condition', 'true');
}else{
$this_condition.hide().addClass('uacf7-hidden');
$this_condition.attr('data-condition', 'false');
}}
}}
$i++;
});
});
uacf7_skip_validation();
}
function uacf7_skip_validation(){
jQuery('form.wpcf7-form').each(function (){
var $form=jQuery(this);
var hidden_fields=[];
jQuery('.uacf7_conditional', $form).each(function (){
var $this=jQuery(this);
if($this.hasClass('uacf7-hidden')){
$this.find('input,select,textarea').each(function (){
hidden_fields.push(jQuery(this).attr('name'));
});
}});
$form.find('[name="_uacf7_hidden_conditional_fields"]').val(JSON.stringify(hidden_fields));
$form.on('submit', function (){
uacf7_skip_validation();
});
});
}})(jQuery);
;(function (factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], factory);
}else if(typeof module==='object'&&module.exports){
module.exports=function (root, jQuery){
if(jQuery===undefined){
if(typeof window!=='undefined'){
jQuery=require('jquery');
}else{
jQuery=require('jquery')(root);
}}
factory(jQuery);
return jQuery;
};}else{
factory(jQuery);
}} (function (jQuery){
var S2=(function (){
if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd){
var S2=jQuery.fn.select2.amd;
}
var S2;(function (){ if(!S2||!S2.requirejs){
if(!S2){ S2={};}else{ require=S2; }
var requirejs, require, define;
(function (undef){
var main, req, makeMap, handlers,
defined={},
waiting={},
config={},
defining={},
hasOwn=Object.prototype.hasOwnProperty,
aps=[].slice,
jsSuffixRegExp=/\.js$/;
function hasProp(obj, prop){
return hasOwn.call(obj, prop);
}
function normalize(name, baseName){
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
baseParts=baseName&&baseName.split("/"),
map=config.map,
starMap=(map&&map['*'])||{};
if(name){
name=name.split('/');
lastIndex=name.length - 1;
if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){
name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp, '');
}
if(name[0].charAt(0)==='.'&&baseParts){
normalizedBaseParts=baseParts.slice(0, baseParts.length - 1);
name=normalizedBaseParts.concat(name);
}
for (i=0; i < name.length; i++){
part=name[i];
if(part==='.'){
name.splice(i, 1);
i -=1;
}else if(part==='..'){
if(i===0||(i===1&&name[2]==='..')||name[i - 1]==='..'){
continue;
}else if(i > 0){
name.splice(i - 1, 2);
i -=2;
}}
}
name=name.join('/');
}
if((baseParts||starMap)&&map){
nameParts=name.split('/');
for (i=nameParts.length; i > 0; i -=1){
nameSegment=nameParts.slice(0, i).join("/");
if(baseParts){
for (j=baseParts.length; j > 0; j -=1){
mapValue=map[baseParts.slice(0, j).join('/')];
if(mapValue){
mapValue=mapValue[nameSegment];
if(mapValue){
foundMap=mapValue;
foundI=i;
break;
}}
}}
if(foundMap){
break;
}
if(!foundStarMap&&starMap&&starMap[nameSegment]){
foundStarMap=starMap[nameSegment];
starI=i;
}}
if(!foundMap&&foundStarMap){
foundMap=foundStarMap;
foundI=starI;
}
if(foundMap){
nameParts.splice(0, foundI, foundMap);
name=nameParts.join('/');
}}
return name;
}
function makeRequire(relName, forceSync){
return function (){
var args=aps.call(arguments, 0);
if(typeof args[0]!=='string'&&args.length===1){
args.push(null);
}
return req.apply(undef, args.concat([relName, forceSync]));
};}
function makeNormalize(relName){
return function (name){
return normalize(name, relName);
};}
function makeLoad(depName){
return function (value){
defined[depName]=value;
};}
function callDep(name){
if(hasProp(waiting, name)){
var args=waiting[name];
delete waiting[name];
defining[name]=true;
main.apply(undef, args);
}
if(!hasProp(defined, name)&&!hasProp(defining, name)){
throw new Error('No ' + name);
}
return defined[name];
}
function splitPrefix(name){
var prefix,
index=name ? name.indexOf('!'):-1;
if(index > -1){
prefix=name.substring(0, index);
name=name.substring(index + 1, name.length);
}
return [prefix, name];
}
function makeRelParts(relName){
return relName ? splitPrefix(relName):[];
}
makeMap=function (name, relParts){
var plugin,
parts=splitPrefix(name),
prefix=parts[0],
relResourceName=relParts[1];
name=parts[1];
if(prefix){
prefix=normalize(prefix, relResourceName);
plugin=callDep(prefix);
}
if(prefix){
if(plugin&&plugin.normalize){
name=plugin.normalize(name, makeNormalize(relResourceName));
}else{
name=normalize(name, relResourceName);
}}else{
name=normalize(name, relResourceName);
parts=splitPrefix(name);
prefix=parts[0];
name=parts[1];
if(prefix){
plugin=callDep(prefix);
}}
return {
f: prefix ? prefix + '!' + name:name,
n: name,
pr: prefix,
p: plugin
};};
function makeConfig(name){
return function (){
return (config&&config.config&&config.config[name])||{};};
}
handlers={
require: function (name){
return makeRequire(name);
},
exports: function (name){
var e=defined[name];
if(typeof e!=='undefined'){
return e;
}else{
return (defined[name]={});
}},
module: function (name){
return {
id: name,
uri: '',
exports: defined[name],
config: makeConfig(name)
};}};
main=function (name, deps, callback, relName){
var cjsModule, depName, ret, map, i, relParts,
args=[],
callbackType=typeof callback,
usingExports;
relName=relName||name;
relParts=makeRelParts(relName);
if(callbackType==='undefined'||callbackType==='function'){
deps = !deps.length&&callback.length ? ['require', 'exports', 'module']:deps;
for (i=0; i < deps.length; i +=1){
map=makeMap(deps[i], relParts);
depName=map.f;
if(depName==="require"){
args[i]=handlers.require(name);
}else if(depName==="exports"){
args[i]=handlers.exports(name);
usingExports=true;
}else if(depName==="module"){
cjsModule=args[i]=handlers.module(name);
}else if(hasProp(defined, depName) ||
hasProp(waiting, depName) ||
hasProp(defining, depName)){
args[i]=callDep(depName);
}else if(map.p){
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
args[i]=defined[depName];
}else{
throw new Error(name + ' missing ' + depName);
}}
ret=callback ? callback.apply(defined[name], args):undefined;
if(name){
if(cjsModule&&cjsModule.exports!==undef &&
cjsModule.exports!==defined[name]){
defined[name]=cjsModule.exports;
}else if(ret!==undef||!usingExports){
defined[name]=ret;
}}
}else if(name){
defined[name]=callback;
}};
requirejs=require=req=function (deps, callback, relName, forceSync, alt){
if(typeof deps==="string"){
if(handlers[deps]){
return handlers[deps](callback);
}
return callDep(makeMap(deps, makeRelParts(callback)).f);
}else if(!deps.splice){
config=deps;
if(config.deps){
req(config.deps, config.callback);
}
if(!callback){
return;
}
if(callback.splice){
deps=callback;
callback=relName;
relName=null;
}else{
deps=undef;
}}
callback=callback||function (){};
if(typeof relName==='function'){
relName=forceSync;
forceSync=alt;
}
if(forceSync){
main(undef, deps, callback, relName);
}else{
setTimeout(function (){
main(undef, deps, callback, relName);
}, 4);
}
return req;
};
req.config=function (cfg){
return req(cfg);
};
requirejs._defined=defined;
define=function (name, deps, callback){
if(typeof name!=='string'){
throw new Error('See almond README: incorrect module build, no module name');
}
if(!deps.splice){
callback=deps;
deps=[];
}
if(!hasProp(defined, name)&&!hasProp(waiting, name)){
waiting[name]=[name, deps, callback];
}};
define.amd={
jQuery: true
};}());
S2.requirejs=requirejs;S2.require=require;S2.define=define;
}}());
S2.define("almond", function(){});
S2.define('jquery',[],function (){
var _$=jQuery||$;
if(_$==null&&console&&console.error){
console.error('Select2: An instance of jQuery or a jQuery-compatible library was not ' +
'found. Make sure that you are including jQuery before Select2 on your ' +
'web page.'
);
}
return _$;
});
S2.define('select2/utils',[
'jquery'
], function ($){
var Utils={};
Utils.Extend=function (ChildClass, SuperClass){
var __hasProp={}.hasOwnProperty;
function BaseConstructor (){
this.constructor=ChildClass;
}
for (var key in SuperClass){
if(__hasProp.call(SuperClass, key)){
ChildClass[key]=SuperClass[key];
}}
BaseConstructor.prototype=SuperClass.prototype;
ChildClass.prototype=new BaseConstructor();
ChildClass.__super__=SuperClass.prototype;
return ChildClass;
};
function getMethods (theClass){
var proto=theClass.prototype;
var methods=[];
for (var methodName in proto){
var m=proto[methodName];
if(typeof m!=='function'){
continue;
}
if(methodName==='constructor'){
continue;
}
methods.push(methodName);
}
return methods;
}
Utils.Decorate=function (SuperClass, DecoratorClass){
var decoratedMethods=getMethods(DecoratorClass);
var superMethods=getMethods(SuperClass);
function DecoratedClass (){
var unshift=Array.prototype.unshift;
var argCount=DecoratorClass.prototype.constructor.length;
var calledConstructor=SuperClass.prototype.constructor;
if(argCount > 0){
unshift.call(arguments, SuperClass.prototype.constructor);
calledConstructor=DecoratorClass.prototype.constructor;
}
calledConstructor.apply(this, arguments);
}
DecoratorClass.displayName=SuperClass.displayName;
function ctr (){
this.constructor=DecoratedClass;
}
DecoratedClass.prototype=new ctr();
for (var m=0; m < superMethods.length; m++){
var superMethod=superMethods[m];
DecoratedClass.prototype[superMethod] =
SuperClass.prototype[superMethod];
}
var calledMethod=function (methodName){
var originalMethod=function (){};
if(methodName in DecoratedClass.prototype){
originalMethod=DecoratedClass.prototype[methodName];
}
var decoratedMethod=DecoratorClass.prototype[methodName];
return function (){
var unshift=Array.prototype.unshift;
unshift.call(arguments, originalMethod);
return decoratedMethod.apply(this, arguments);
};};
for (var d=0; d < decoratedMethods.length; d++){
var decoratedMethod=decoratedMethods[d];
DecoratedClass.prototype[decoratedMethod]=calledMethod(decoratedMethod);
}
return DecoratedClass;
};
var Observable=function (){
this.listeners={};};
Observable.prototype.on=function (event, callback){
this.listeners=this.listeners||{};
if(event in this.listeners){
this.listeners[event].push(callback);
}else{
this.listeners[event]=[callback];
}};
Observable.prototype.trigger=function (event){
var slice=Array.prototype.slice;
var params=slice.call(arguments, 1);
this.listeners=this.listeners||{};
if(params==null){
params=[];
}
if(params.length===0){
params.push({});
}
params[0]._type=event;
if(event in this.listeners){
this.invoke(this.listeners[event], slice.call(arguments, 1));
}
if('*' in this.listeners){
this.invoke(this.listeners['*'], arguments);
}};
Observable.prototype.invoke=function (listeners, params){
for (var i=0, len=listeners.length; i < len; i++){
listeners[i].apply(this, params);
}};
Utils.Observable=Observable;
Utils.generateChars=function (length){
var chars='';
for (var i=0; i < length; i++){
var randomChar=Math.floor(Math.random() * 36);
chars +=randomChar.toString(36);
}
return chars;
};
Utils.bind=function (func, context){
return function (){
func.apply(context, arguments);
};};
Utils._convertData=function (data){
for (var originalKey in data){
var keys=originalKey.split('-');
var dataLevel=data;
if(keys.length===1){
continue;
}
for (var k=0; k < keys.length; k++){
var key=keys[k];
key=key.substring(0, 1).toLowerCase() + key.substring(1);
if(!(key in dataLevel)){
dataLevel[key]={};}
if(k==keys.length - 1){
dataLevel[key]=data[originalKey];
}
dataLevel=dataLevel[key];
}
delete data[originalKey];
}
return data;
};
Utils.hasScroll=function (index, el){
var $el=$(el);
var overflowX=el.style.overflowX;
var overflowY=el.style.overflowY;
if(overflowX===overflowY &&
(overflowY==='hidden'||overflowY==='visible')){
return false;
}
if(overflowX==='scroll'||overflowY==='scroll'){
return true;
}
return ($el.innerHeight() < el.scrollHeight ||
$el.innerWidth() < el.scrollWidth);
};
Utils.escapeMarkup=function (markup){
var replaceMap={
'\\': '&#92;',
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
'\'': '&#39;',
'/': '&#47;'
};
if(typeof markup!=='string'){
return markup;
}
return String(markup).replace(/[&<>"'\/\\]/g, function (match){
return replaceMap[match];
});
};
Utils.__cache={};
var id=0;
Utils.GetUniqueElementId=function (element){
var select2Id=element.getAttribute('data-select2-id');
if(select2Id!=null){
return select2Id;
}
if(element.id){
select2Id='select2-data-' + element.id;
}else{
select2Id='select2-data-' + (++id).toString() +
'-' + Utils.generateChars(4);
}
element.setAttribute('data-select2-id', select2Id);
return select2Id;
};
Utils.StoreData=function (element, name, value){
var id=Utils.GetUniqueElementId(element);
if(!Utils.__cache[id]){
Utils.__cache[id]={};}
Utils.__cache[id][name]=value;
};
Utils.GetData=function (element, name){
var id=Utils.GetUniqueElementId(element);
if(name){
if(Utils.__cache[id]){
if(Utils.__cache[id][name]!=null){
return Utils.__cache[id][name];
}
return $(element).data(name);
}
return $(element).data(name);
}else{
return Utils.__cache[id];
}};
Utils.RemoveData=function (element){
var id=Utils.GetUniqueElementId(element);
if(Utils.__cache[id]!=null){
delete Utils.__cache[id];
}
element.removeAttribute('data-select2-id');
};
Utils.copyNonInternalCssClasses=function (dest, src){
var classes;
var destinationClasses=dest.getAttribute('class').trim().split(/\s+/);
destinationClasses=destinationClasses.filter(function (clazz){
return clazz.indexOf('select2-')===0;
});
var sourceClasses=src.getAttribute('class').trim().split(/\s+/);
sourceClasses=sourceClasses.filter(function (clazz){
return clazz.indexOf('select2-')!==0;
});
var replacements=destinationClasses.concat(sourceClasses);
dest.setAttribute('class', replacements.join(' '));
};
return Utils;
});
S2.define('select2/results',[
'jquery',
'./utils'
], function ($, Utils){
function Results ($element, options, dataAdapter){
this.$element=$element;
this.data=dataAdapter;
this.options=options;
Results.__super__.constructor.call(this);
}
Utils.Extend(Results, Utils.Observable);
Results.prototype.render=function (){
var $results=$(
'<ul class="select2-results__options" role="listbox"></ul>'
);
if(this.options.get('multiple')){
$results.attr('aria-multiselectable', 'true');
}
this.$results=$results;
return $results;
};
Results.prototype.clear=function (){
this.$results.empty();
};
Results.prototype.displayMessage=function (params){
var escapeMarkup=this.options.get('escapeMarkup');
this.clear();
this.hideLoading();
var $message=$(
'<li role="alert" aria-live="assertive"' +
' class="select2-results__option"></li>'
);
var message=this.options.get('translations').get(params.message);
$message.append(escapeMarkup(
message(params.args)
)
);
$message[0].className +=' select2-results__message';
this.$results.append($message);
};
Results.prototype.hideMessages=function (){
this.$results.find('.select2-results__message').remove();
};
Results.prototype.append=function (data){
this.hideLoading();
var $options=[];
if(data.results==null||data.results.length===0){
if(this.$results.children().length===0){
this.trigger('results:message', {
message: 'noResults'
});
}
return;
}
data.results=this.sort(data.results);
for (var d=0; d < data.results.length; d++){
var item=data.results[d];
var $option=this.option(item);
$options.push($option);
}
this.$results.append($options);
};
Results.prototype.position=function ($results, $dropdown){
var $resultsContainer=$dropdown.find('.select2-results');
$resultsContainer.append($results);
};
Results.prototype.sort=function (data){
var sorter=this.options.get('sorter');
return sorter(data);
};
Results.prototype.highlightFirstItem=function (){
var $options=this.$results
.find('.select2-results__option--selectable');
var $selected=$options.filter('.select2-results__option--selected');
if($selected.length > 0){
$selected.first().trigger('mouseenter');
}else{
$options.first().trigger('mouseenter');
}
this.ensureHighlightVisible();
};
Results.prototype.setClasses=function (){
var self=this;
this.data.current(function (selected){
var selectedIds=selected.map(function (s){
return s.id.toString();
});
var $options=self.$results
.find('.select2-results__option--selectable');
$options.each(function (){
var $option=$(this);
var item=Utils.GetData(this, 'data');
var id='' + item.id;
if((item.element!=null&&item.element.selected) ||
(item.element==null&&selectedIds.indexOf(id) > -1)){
this.classList.add('select2-results__option--selected');
$option.attr('aria-selected', 'true');
}else{
this.classList.remove('select2-results__option--selected');
$option.attr('aria-selected', 'false');
}});
});
};
Results.prototype.showLoading=function (params){
this.hideLoading();
var loadingMore=this.options.get('translations').get('searching');
var loading={
disabled: true,
loading: true,
text: loadingMore(params)
};
var $loading=this.option(loading);
$loading.className +=' loading-results';
this.$results.prepend($loading);
};
Results.prototype.hideLoading=function (){
this.$results.find('.loading-results').remove();
};
Results.prototype.option=function (data){
var option=document.createElement('li');
option.classList.add('select2-results__option');
option.classList.add('select2-results__option--selectable');
var attrs={
'role': 'option'
};
var matches=window.Element.prototype.matches ||
window.Element.prototype.msMatchesSelector ||
window.Element.prototype.webkitMatchesSelector;
if((data.element!=null&&matches.call(data.element, ':disabled')) ||
(data.element==null&&data.disabled)){
attrs['aria-disabled']='true';
option.classList.remove('select2-results__option--selectable');
option.classList.add('select2-results__option--disabled');
}
if(data.id==null){
option.classList.remove('select2-results__option--selectable');
}
if(data._resultId!=null){
option.id=data._resultId;
}
if(data.title){
option.title=data.title;
}
if(data.children){
attrs.role='group';
attrs['aria-label']=data.text;
option.classList.remove('select2-results__option--selectable');
option.classList.add('select2-results__option--group');
}
for (var attr in attrs){
var val=attrs[attr];
option.setAttribute(attr, val);
}
if(data.children){
var $option=$(option);
var label=document.createElement('strong');
label.className='select2-results__group';
this.template(data, label);
var $children=[];
for (var c=0; c < data.children.length; c++){
var child=data.children[c];
var $child=this.option(child);
$children.push($child);
}
var $childrenContainer=$('<ul></ul>', {
'class': 'select2-results__options select2-results__options--nested',
'role': 'none'
});
$childrenContainer.append($children);
$option.append(label);
$option.append($childrenContainer);
}else{
this.template(data, option);
}
Utils.StoreData(option, 'data', data);
return option;
};
Results.prototype.bind=function (container, $container){
var self=this;
var id=container.id + '-results';
this.$results.attr('id', id);
container.on('results:all', function (params){
self.clear();
self.append(params.data);
if(container.isOpen()){
self.setClasses();
self.highlightFirstItem();
}});
container.on('results:append', function (params){
self.append(params.data);
if(container.isOpen()){
self.setClasses();
}});
container.on('query', function (params){
self.hideMessages();
self.showLoading(params);
});
container.on('select', function (){
if(!container.isOpen()){
return;
}
self.setClasses();
if(self.options.get('scrollAfterSelect')){
self.highlightFirstItem();
}});
container.on('unselect', function (){
if(!container.isOpen()){
return;
}
self.setClasses();
if(self.options.get('scrollAfterSelect')){
self.highlightFirstItem();
}});
container.on('open', function (){
self.$results.attr('aria-expanded', 'true');
self.$results.attr('aria-hidden', 'false');
self.setClasses();
self.ensureHighlightVisible();
});
container.on('close', function (){
self.$results.attr('aria-expanded', 'false');
self.$results.attr('aria-hidden', 'true');
self.$results.removeAttr('aria-activedescendant');
});
container.on('results:toggle', function (){
var $highlighted=self.getHighlightedResults();
if($highlighted.length===0){
return;
}
$highlighted.trigger('mouseup');
});
container.on('results:select', function (){
var $highlighted=self.getHighlightedResults();
if($highlighted.length===0){
return;
}
var data=Utils.GetData($highlighted[0], 'data');
if($highlighted.hasClass('select2-results__option--selected')){
self.trigger('close', {});
}else{
self.trigger('select', {
data: data
});
}});
container.on('results:previous', function (){
var $highlighted=self.getHighlightedResults();
var $options=self.$results.find('.select2-results__option--selectable');
var currentIndex=$options.index($highlighted);
if(currentIndex <=0){
return;
}
var nextIndex=currentIndex - 1;
if($highlighted.length===0){
nextIndex=0;
}
var $next=$options.eq(nextIndex);
$next.trigger('mouseenter');
var currentOffset=self.$results.offset().top;
var nextTop=$next.offset().top;
var nextOffset=self.$results.scrollTop() + (nextTop - currentOffset);
if(nextIndex===0){
self.$results.scrollTop(0);
}else if(nextTop - currentOffset < 0){
self.$results.scrollTop(nextOffset);
}});
container.on('results:next', function (){
var $highlighted=self.getHighlightedResults();
var $options=self.$results.find('.select2-results__option--selectable');
var currentIndex=$options.index($highlighted);
var nextIndex=currentIndex + 1;
if(nextIndex >=$options.length){
return;
}
var $next=$options.eq(nextIndex);
$next.trigger('mouseenter');
var currentOffset=self.$results.offset().top +
self.$results.outerHeight(false);
var nextBottom=$next.offset().top + $next.outerHeight(false);
var nextOffset=self.$results.scrollTop() + nextBottom - currentOffset;
if(nextIndex===0){
self.$results.scrollTop(0);
}else if(nextBottom > currentOffset){
self.$results.scrollTop(nextOffset);
}});
container.on('results:focus', function (params){
params.element[0].classList.add('select2-results__option--highlighted');
params.element[0].setAttribute('aria-selected', 'true');
});
container.on('results:message', function (params){
self.displayMessage(params);
});
if($.fn.mousewheel){
this.$results.on('mousewheel', function (e){
var top=self.$results.scrollTop();
var bottom=self.$results.get(0).scrollHeight - top + e.deltaY;
var isAtTop=e.deltaY > 0&&top - e.deltaY <=0;
var isAtBottom=e.deltaY < 0&&bottom <=self.$results.height();
if(isAtTop){
self.$results.scrollTop(0);
e.preventDefault();
e.stopPropagation();
}else if(isAtBottom){
self.$results.scrollTop(self.$results.get(0).scrollHeight - self.$results.height()
);
e.preventDefault();
e.stopPropagation();
}});
}
this.$results.on('mouseup', '.select2-results__option--selectable',
function (evt){
var $this=$(this);
var data=Utils.GetData(this, 'data');
if($this.hasClass('select2-results__option--selected')){
if(self.options.get('multiple')){
self.trigger('unselect', {
originalEvent: evt,
data: data
});
}else{
self.trigger('close', {});
}
return;
}
self.trigger('select', {
originalEvent: evt,
data: data
});
});
this.$results.on('mouseenter', '.select2-results__option--selectable',
function (evt){
var data=Utils.GetData(this, 'data');
self.getHighlightedResults()
.removeClass('select2-results__option--highlighted')
.attr('aria-selected', 'false');
self.trigger('results:focus', {
data: data,
element: $(this)
});
});
};
Results.prototype.getHighlightedResults=function (){
var $highlighted=this.$results
.find('.select2-results__option--highlighted');
return $highlighted;
};
Results.prototype.destroy=function (){
this.$results.remove();
};
Results.prototype.ensureHighlightVisible=function (){
var $highlighted=this.getHighlightedResults();
if($highlighted.length===0){
return;
}
var $options=this.$results.find('.select2-results__option--selectable');
var currentIndex=$options.index($highlighted);
var currentOffset=this.$results.offset().top;
var nextTop=$highlighted.offset().top;
var nextOffset=this.$results.scrollTop() + (nextTop - currentOffset);
var offsetDelta=nextTop - currentOffset;
nextOffset -=$highlighted.outerHeight(false) * 2;
if(currentIndex <=2){
this.$results.scrollTop(0);
}else if(offsetDelta > this.$results.outerHeight()||offsetDelta < 0){
this.$results.scrollTop(nextOffset);
}};
Results.prototype.template=function (result, container){
var template=this.options.get('templateResult');
var escapeMarkup=this.options.get('escapeMarkup');
var content=template(result, container);
if(content==null){
container.style.display='none';
}else if(typeof content==='string'){
container.innerHTML=escapeMarkup(content);
}else{
$(container).append(content);
}};
return Results;
});
S2.define('select2/keys',[
], function (){
var KEYS={
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
ESC: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
DELETE: 46
};
return KEYS;
});
S2.define('select2/selection/base',[
'jquery',
'../utils',
'../keys'
], function ($, Utils, KEYS){
function BaseSelection ($element, options){
this.$element=$element;
this.options=options;
BaseSelection.__super__.constructor.call(this);
}
Utils.Extend(BaseSelection, Utils.Observable);
BaseSelection.prototype.render=function (){
var $selection=$(
'<span class="select2-selection" role="combobox" ' +
' aria-haspopup="true" aria-expanded="false">' +
'</span>'
);
this._tabindex=0;
if(Utils.GetData(this.$element[0], 'old-tabindex')!=null){
this._tabindex=Utils.GetData(this.$element[0], 'old-tabindex');
}else if(this.$element.attr('tabindex')!=null){
this._tabindex=this.$element.attr('tabindex');
}
$selection.attr('title', this.$element.attr('title'));
$selection.attr('tabindex', this._tabindex);
$selection.attr('aria-disabled', 'false');
this.$selection=$selection;
return $selection;
};
BaseSelection.prototype.bind=function (container, $container){
var self=this;
var resultsId=container.id + '-results';
this.container=container;
this.$selection.on('focus', function (evt){
self.trigger('focus', evt);
});
this.$selection.on('blur', function (evt){
self._handleBlur(evt);
});
this.$selection.on('keydown', function (evt){
self.trigger('keypress', evt);
if(evt.which===KEYS.SPACE){
evt.preventDefault();
}});
container.on('results:focus', function (params){
self.$selection.attr('aria-activedescendant', params.data._resultId);
});
container.on('selection:update', function (params){
self.update(params.data);
});
container.on('open', function (){
self.$selection.attr('aria-expanded', 'true');
self.$selection.attr('aria-owns', resultsId);
self._attachCloseHandler(container);
});
container.on('close', function (){
self.$selection.attr('aria-expanded', 'false');
self.$selection.removeAttr('aria-activedescendant');
self.$selection.removeAttr('aria-owns');
self.$selection.trigger('focus');
self._detachCloseHandler(container);
});
container.on('enable', function (){
self.$selection.attr('tabindex', self._tabindex);
self.$selection.attr('aria-disabled', 'false');
});
container.on('disable', function (){
self.$selection.attr('tabindex', '-1');
self.$selection.attr('aria-disabled', 'true');
});
};
BaseSelection.prototype._handleBlur=function (evt){
var self=this;
window.setTimeout(function (){
if((document.activeElement==self.$selection[0]) ||
($.contains(self.$selection[0], document.activeElement))
){
return;
}
self.trigger('blur', evt);
}, 1);
};
BaseSelection.prototype._attachCloseHandler=function (container){
$(document.body).on('mousedown.select2.' + container.id, function (e){
var $target=$(e.target);
var $select=$target.closest('.select2');
var $all=$('.select2.select2-container--open');
$all.each(function (){
if(this==$select[0]){
return;
}
var $element=Utils.GetData(this, 'element');
$element.select2('close');
});
});
};
BaseSelection.prototype._detachCloseHandler=function (container){
$(document.body).off('mousedown.select2.' + container.id);
};
BaseSelection.prototype.position=function ($selection, $container){
var $selectionContainer=$container.find('.selection');
$selectionContainer.append($selection);
};
BaseSelection.prototype.destroy=function (){
this._detachCloseHandler(this.container);
};
BaseSelection.prototype.update=function (data){
throw new Error('The `update` method must be defined in child classes.');
};
BaseSelection.prototype.isEnabled=function (){
return !this.isDisabled();
};
BaseSelection.prototype.isDisabled=function (){
return this.options.get('disabled');
};
return BaseSelection;
});
S2.define('select2/selection/single',[
'jquery',
'./base',
'../utils',
'../keys'
], function ($, BaseSelection, Utils, KEYS){
function SingleSelection (){
SingleSelection.__super__.constructor.apply(this, arguments);
}
Utils.Extend(SingleSelection, BaseSelection);
SingleSelection.prototype.render=function (){
var $selection=SingleSelection.__super__.render.call(this);
$selection[0].classList.add('select2-selection--single');
$selection.html('<span class="select2-selection__rendered"></span>' +
'<span class="select2-selection__arrow" role="presentation">' +
'<b role="presentation"></b>' +
'</span>'
);
return $selection;
};
SingleSelection.prototype.bind=function (container, $container){
var self=this;
SingleSelection.__super__.bind.apply(this, arguments);
var id=container.id + '-container';
this.$selection.find('.select2-selection__rendered')
.attr('id', id)
.attr('role', 'textbox')
.attr('aria-readonly', 'true');
this.$selection.attr('aria-labelledby', id);
this.$selection.attr('aria-controls', id);
this.$selection.on('mousedown', function (evt){
if(evt.which!==1){
return;
}
self.trigger('toggle', {
originalEvent: evt
});
});
this.$selection.on('focus', function (evt){
});
this.$selection.on('blur', function (evt){
});
container.on('focus', function (evt){
if(!container.isOpen()){
self.$selection.trigger('focus');
}});
};
SingleSelection.prototype.clear=function (){
var $rendered=this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title');
};
SingleSelection.prototype.display=function (data, container){
var template=this.options.get('templateSelection');
var escapeMarkup=this.options.get('escapeMarkup');
return escapeMarkup(template(data, container));
};
SingleSelection.prototype.selectionContainer=function (){
return $('<span></span>');
};
SingleSelection.prototype.update=function (data){
if(data.length===0){
this.clear();
return;
}
var selection=data[0];
var $rendered=this.$selection.find('.select2-selection__rendered');
var formatted=this.display(selection, $rendered);
$rendered.empty().append(formatted);
var title=selection.title||selection.text;
if(title){
$rendered.attr('title', title);
}else{
$rendered.removeAttr('title');
}};
return SingleSelection;
});
S2.define('select2/selection/multiple',[
'jquery',
'./base',
'../utils'
], function ($, BaseSelection, Utils){
function MultipleSelection ($element, options){
MultipleSelection.__super__.constructor.apply(this, arguments);
}
Utils.Extend(MultipleSelection, BaseSelection);
MultipleSelection.prototype.render=function (){
var $selection=MultipleSelection.__super__.render.call(this);
$selection[0].classList.add('select2-selection--multiple');
$selection.html('<ul class="select2-selection__rendered"></ul>'
);
return $selection;
};
MultipleSelection.prototype.bind=function (container, $container){
var self=this;
MultipleSelection.__super__.bind.apply(this, arguments);
var id=container.id + '-container';
this.$selection.find('.select2-selection__rendered').attr('id', id);
this.$selection.on('click', function (evt){
self.trigger('toggle', {
originalEvent: evt
});
});
this.$selection.on('click',
'.select2-selection__choice__remove',
function (evt){
if(self.isDisabled()){
return;
}
var $remove=$(this);
var $selection=$remove.parent();
var data=Utils.GetData($selection[0], 'data');
self.trigger('unselect', {
originalEvent: evt,
data: data
});
}
);
this.$selection.on('keydown',
'.select2-selection__choice__remove',
function (evt){
if(self.isDisabled()){
return;
}
evt.stopPropagation();
}
);
};
MultipleSelection.prototype.clear=function (){
var $rendered=this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title');
};
MultipleSelection.prototype.display=function (data, container){
var template=this.options.get('templateSelection');
var escapeMarkup=this.options.get('escapeMarkup');
return escapeMarkup(template(data, container));
};
MultipleSelection.prototype.selectionContainer=function (){
var $container=$(
'<li class="select2-selection__choice">' +
'<button type="button" class="select2-selection__choice__remove" ' +
'tabindex="-1">' +
'<span aria-hidden="true">&times;</span>' +
'</button>' +
'<span class="select2-selection__choice__display"></span>' +
'</li>'
);
return $container;
};
MultipleSelection.prototype.update=function (data){
this.clear();
if(data.length===0){
return;
}
var $selections=[];
var selectionIdPrefix=this.$selection.find('.select2-selection__rendered')
.attr('id') + '-choice-';
for (var d=0; d < data.length; d++){
var selection=data[d];
var $selection=this.selectionContainer();
var formatted=this.display(selection, $selection);
var selectionId=selectionIdPrefix + Utils.generateChars(4) + '-';
if(selection.id){
selectionId +=selection.id;
}else{
selectionId +=Utils.generateChars(4);
}
$selection.find('.select2-selection__choice__display')
.append(formatted)
.attr('id', selectionId);
var title=selection.title||selection.text;
if(title){
$selection.attr('title', title);
}
var removeItem=this.options.get('translations').get('removeItem');
var $remove=$selection.find('.select2-selection__choice__remove');
$remove.attr('title', removeItem());
$remove.attr('aria-label', removeItem());
$remove.attr('aria-describedby', selectionId);
Utils.StoreData($selection[0], 'data', selection);
$selections.push($selection);
}
var $rendered=this.$selection.find('.select2-selection__rendered');
$rendered.append($selections);
};
return MultipleSelection;
});
S2.define('select2/selection/placeholder',[
], function (){
function Placeholder (decorated, $element, options){
this.placeholder=this.normalizePlaceholder(options.get('placeholder'));
decorated.call(this, $element, options);
}
Placeholder.prototype.normalizePlaceholder=function (_, placeholder){
if(typeof placeholder==='string'){
placeholder={
id: '',
text: placeholder
};}
return placeholder;
};
Placeholder.prototype.createPlaceholder=function (decorated, placeholder){
var $placeholder=this.selectionContainer();
$placeholder.html(this.display(placeholder));
$placeholder[0].classList.add('select2-selection__placeholder');
$placeholder[0].classList.remove('select2-selection__choice');
var placeholderTitle=placeholder.title ||
placeholder.text ||
$placeholder.text();
this.$selection.find('.select2-selection__rendered').attr('title',
placeholderTitle
);
return $placeholder;
};
Placeholder.prototype.update=function (decorated, data){
var singlePlaceholder=(
data.length==1&&data[0].id!=this.placeholder.id
);
var multipleSelections=data.length > 1;
if(multipleSelections||singlePlaceholder){
return decorated.call(this, data);
}
this.clear();
var $placeholder=this.createPlaceholder(this.placeholder);
this.$selection.find('.select2-selection__rendered').append($placeholder);
};
return Placeholder;
});
S2.define('select2/selection/allowClear',[
'jquery',
'../keys',
'../utils'
], function ($, KEYS, Utils){
function AllowClear (){ }
AllowClear.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
if(this.placeholder==null){
if(this.options.get('debug')&&window.console&&console.error){
console.error('Select2: The `allowClear` option should be used in combination ' +
'with the `placeholder` option.'
);
}}
this.$selection.on('mousedown', '.select2-selection__clear',
function (evt){
self._handleClear(evt);
});
container.on('keypress', function (evt){
self._handleKeyboardClear(evt, container);
});
};
AllowClear.prototype._handleClear=function (_, evt){
if(this.isDisabled()){
return;
}
var $clear=this.$selection.find('.select2-selection__clear');
if($clear.length===0){
return;
}
evt.stopPropagation();
var data=Utils.GetData($clear[0], 'data');
var previousVal=this.$element.val();
this.$element.val(this.placeholder.id);
var unselectData={
data: data
};
this.trigger('clear', unselectData);
if(unselectData.prevented){
this.$element.val(previousVal);
return;
}
for (var d=0; d < data.length; d++){
unselectData={
data: data[d]
};
this.trigger('unselect', unselectData);
if(unselectData.prevented){
this.$element.val(previousVal);
return;
}}
this.$element.trigger('input').trigger('change');
this.trigger('toggle', {});
};
AllowClear.prototype._handleKeyboardClear=function (_, evt, container){
if(container.isOpen()){
return;
}
if(evt.which==KEYS.DELETE||evt.which==KEYS.BACKSPACE){
this._handleClear(evt);
}};
AllowClear.prototype.update=function (decorated, data){
decorated.call(this, data);
this.$selection.find('.select2-selection__clear').remove();
this.$selection[0].classList.remove('select2-selection--clearable');
if(this.$selection.find('.select2-selection__placeholder').length > 0 ||
data.length===0){
return;
}
var selectionId=this.$selection.find('.select2-selection__rendered')
.attr('id');
var removeAll=this.options.get('translations').get('removeAllItems');
var $remove=$(
'<button type="button" class="select2-selection__clear" tabindex="-1">' +
'<span aria-hidden="true">&times;</span>' +
'</button>'
);
$remove.attr('title', removeAll());
$remove.attr('aria-label', removeAll());
$remove.attr('aria-describedby', selectionId);
Utils.StoreData($remove[0], 'data', data);
this.$selection.prepend($remove);
this.$selection[0].classList.add('select2-selection--clearable');
};
return AllowClear;
});
S2.define('select2/selection/search',[
'jquery',
'../utils',
'../keys'
], function ($, Utils, KEYS){
function Search (decorated, $element, options){
decorated.call(this, $element, options);
}
Search.prototype.render=function (decorated){
var searchLabel=this.options.get('translations').get('search');
var $search=$(
'<span class="select2-search select2-search--inline">' +
'<textarea class="select2-search__field"'+
' type="search" tabindex="-1"' +
' autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="searchbox" aria-autocomplete="list" >' +
'</textarea>' +
'</span>'
);
this.$searchContainer=$search;
this.$search=$search.find('textarea');
this.$search.prop('autocomplete', this.options.get('autocomplete'));
this.$search.attr('aria-label', searchLabel());
var $rendered=decorated.call(this);
this._transferTabIndex();
$rendered.append(this.$searchContainer);
return $rendered;
};
Search.prototype.bind=function (decorated, container, $container){
var self=this;
var resultsId=container.id + '-results';
var selectionId=container.id + '-container';
decorated.call(this, container, $container);
self.$search.attr('aria-describedby', selectionId);
container.on('open', function (){
self.$search.attr('aria-controls', resultsId);
self.$search.trigger('focus');
});
container.on('close', function (){
self.$search.val('');
self.resizeSearch();
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.trigger('focus');
});
container.on('enable', function (){
self.$search.prop('disabled', false);
self._transferTabIndex();
});
container.on('disable', function (){
self.$search.prop('disabled', true);
});
container.on('focus', function (evt){
self.$search.trigger('focus');
});
container.on('results:focus', function (params){
if(params.data._resultId){
self.$search.attr('aria-activedescendant', params.data._resultId);
}else{
self.$search.removeAttr('aria-activedescendant');
}});
this.$selection.on('focusin', '.select2-search--inline', function (evt){
self.trigger('focus', evt);
});
this.$selection.on('focusout', '.select2-search--inline', function (evt){
self._handleBlur(evt);
});
this.$selection.on('keydown', '.select2-search--inline', function (evt){
evt.stopPropagation();
self.trigger('keypress', evt);
self._keyUpPrevented=evt.isDefaultPrevented();
var key=evt.which;
if(key===KEYS.BACKSPACE&&self.$search.val()===''){
var $previousChoice=self.$selection
.find('.select2-selection__choice').last();
if($previousChoice.length > 0){
var item=Utils.GetData($previousChoice[0], 'data');
self.searchRemoveChoice(item);
evt.preventDefault();
}}
});
this.$selection.on('click', '.select2-search--inline', function (evt){
if(self.$search.val()){
evt.stopPropagation();
}});
var msie=document.documentMode;
var disableInputEvents=msie&&msie <=11;
this.$selection.on('input.searchcheck',
'.select2-search--inline',
function (evt){
if(disableInputEvents){
self.$selection.off('input.search input.searchcheck');
return;
}
self.$selection.off('keyup.search');
}
);
this.$selection.on('keyup.search input.search',
'.select2-search--inline',
function (evt){
if(disableInputEvents&&evt.type==='input'){
self.$selection.off('input.search input.searchcheck');
return;
}
var key=evt.which;
if(key==KEYS.SHIFT||key==KEYS.CTRL||key==KEYS.ALT){
return;
}
if(key==KEYS.TAB){
return;
}
self.handleSearch(evt);
}
);
};
Search.prototype._transferTabIndex=function (decorated){
this.$search.attr('tabindex', this.$selection.attr('tabindex'));
this.$selection.attr('tabindex', '-1');
};
Search.prototype.createPlaceholder=function (decorated, placeholder){
this.$search.attr('placeholder', placeholder.text);
};
Search.prototype.update=function (decorated, data){
var searchHadFocus=this.$search[0]==document.activeElement;
this.$search.attr('placeholder', '');
decorated.call(this, data);
this.resizeSearch();
if(searchHadFocus){
this.$search.trigger('focus');
}};
Search.prototype.handleSearch=function (){
this.resizeSearch();
if(!this._keyUpPrevented){
var input=this.$search.val();
this.trigger('query', {
term: input
});
}
this._keyUpPrevented=false;
};
Search.prototype.searchRemoveChoice=function (decorated, item){
this.trigger('unselect', {
data: item
});
this.$search.val(item.text);
this.handleSearch();
};
Search.prototype.resizeSearch=function (){
this.$search.css('width', '25px');
var width='100%';
if(this.$search.attr('placeholder')===''){
var minimumWidth=this.$search.val().length + 1;
width=(minimumWidth * 0.75) + 'em';
}
this.$search.css('width', width);
};
return Search;
});
S2.define('select2/selection/selectionCss',[
'../utils'
], function (Utils){
function SelectionCSS (){ }
SelectionCSS.prototype.render=function (decorated){
var $selection=decorated.call(this);
var selectionCssClass=this.options.get('selectionCssClass')||'';
if(selectionCssClass.indexOf(':all:')!==-1){
selectionCssClass=selectionCssClass.replace(':all:', '');
Utils.copyNonInternalCssClasses($selection[0], this.$element[0]);
}
$selection.addClass(selectionCssClass);
return $selection;
};
return SelectionCSS;
});
S2.define('select2/selection/eventRelay',[
'jquery'
], function ($){
function EventRelay (){ }
EventRelay.prototype.bind=function (decorated, container, $container){
var self=this;
var relayEvents=[
'open', 'opening',
'close', 'closing',
'select', 'selecting',
'unselect', 'unselecting',
'clear', 'clearing'
];
var preventableEvents=[
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
];
decorated.call(this, container, $container);
container.on('*', function (name, params){
if(relayEvents.indexOf(name)===-1){
return;
}
params=params||{};
var evt=$.Event('select2:' + name, {
params: params
});
self.$element.trigger(evt);
if(preventableEvents.indexOf(name)===-1){
return;
}
params.prevented=evt.isDefaultPrevented();
});
};
return EventRelay;
});
S2.define('select2/translation',[
'jquery',
'require'
], function ($, require){
function Translation (dict){
this.dict=dict||{};}
Translation.prototype.all=function (){
return this.dict;
};
Translation.prototype.get=function (key){
return this.dict[key];
};
Translation.prototype.extend=function (translation){
this.dict=$.extend({}, translation.all(), this.dict);
};
Translation._cache={};
Translation.loadPath=function (path){
if(!(path in Translation._cache)){
var translations=require(path);
Translation._cache[path]=translations;
}
return new Translation(Translation._cache[path]);
};
return Translation;
});
S2.define('select2/diacritics',[
], function (){
var diacritics={
'\u24B6': 'A',
'\uFF21': 'A',
'\u00C0': 'A',
'\u00C1': 'A',
'\u00C2': 'A',
'\u1EA6': 'A',
'\u1EA4': 'A',
'\u1EAA': 'A',
'\u1EA8': 'A',
'\u00C3': 'A',
'\u0100': 'A',
'\u0102': 'A',
'\u1EB0': 'A',
'\u1EAE': 'A',
'\u1EB4': 'A',
'\u1EB2': 'A',
'\u0226': 'A',
'\u01E0': 'A',
'\u00C4': 'A',
'\u01DE': 'A',
'\u1EA2': 'A',
'\u00C5': 'A',
'\u01FA': 'A',
'\u01CD': 'A',
'\u0200': 'A',
'\u0202': 'A',
'\u1EA0': 'A',
'\u1EAC': 'A',
'\u1EB6': 'A',
'\u1E00': 'A',
'\u0104': 'A',
'\u023A': 'A',
'\u2C6F': 'A',
'\uA732': 'AA',
'\u00C6': 'AE',
'\u01FC': 'AE',
'\u01E2': 'AE',
'\uA734': 'AO',
'\uA736': 'AU',
'\uA738': 'AV',
'\uA73A': 'AV',
'\uA73C': 'AY',
'\u24B7': 'B',
'\uFF22': 'B',
'\u1E02': 'B',
'\u1E04': 'B',
'\u1E06': 'B',
'\u0243': 'B',
'\u0182': 'B',
'\u0181': 'B',
'\u24B8': 'C',
'\uFF23': 'C',
'\u0106': 'C',
'\u0108': 'C',
'\u010A': 'C',
'\u010C': 'C',
'\u00C7': 'C',
'\u1E08': 'C',
'\u0187': 'C',
'\u023B': 'C',
'\uA73E': 'C',
'\u24B9': 'D',
'\uFF24': 'D',
'\u1E0A': 'D',
'\u010E': 'D',
'\u1E0C': 'D',
'\u1E10': 'D',
'\u1E12': 'D',
'\u1E0E': 'D',
'\u0110': 'D',
'\u018B': 'D',
'\u018A': 'D',
'\u0189': 'D',
'\uA779': 'D',
'\u01F1': 'DZ',
'\u01C4': 'DZ',
'\u01F2': 'Dz',
'\u01C5': 'Dz',
'\u24BA': 'E',
'\uFF25': 'E',
'\u00C8': 'E',
'\u00C9': 'E',
'\u00CA': 'E',
'\u1EC0': 'E',
'\u1EBE': 'E',
'\u1EC4': 'E',
'\u1EC2': 'E',
'\u1EBC': 'E',
'\u0112': 'E',
'\u1E14': 'E',
'\u1E16': 'E',
'\u0114': 'E',
'\u0116': 'E',
'\u00CB': 'E',
'\u1EBA': 'E',
'\u011A': 'E',
'\u0204': 'E',
'\u0206': 'E',
'\u1EB8': 'E',
'\u1EC6': 'E',
'\u0228': 'E',
'\u1E1C': 'E',
'\u0118': 'E',
'\u1E18': 'E',
'\u1E1A': 'E',
'\u0190': 'E',
'\u018E': 'E',
'\u24BB': 'F',
'\uFF26': 'F',
'\u1E1E': 'F',
'\u0191': 'F',
'\uA77B': 'F',
'\u24BC': 'G',
'\uFF27': 'G',
'\u01F4': 'G',
'\u011C': 'G',
'\u1E20': 'G',
'\u011E': 'G',
'\u0120': 'G',
'\u01E6': 'G',
'\u0122': 'G',
'\u01E4': 'G',
'\u0193': 'G',
'\uA7A0': 'G',
'\uA77D': 'G',
'\uA77E': 'G',
'\u24BD': 'H',
'\uFF28': 'H',
'\u0124': 'H',
'\u1E22': 'H',
'\u1E26': 'H',
'\u021E': 'H',
'\u1E24': 'H',
'\u1E28': 'H',
'\u1E2A': 'H',
'\u0126': 'H',
'\u2C67': 'H',
'\u2C75': 'H',
'\uA78D': 'H',
'\u24BE': 'I',
'\uFF29': 'I',
'\u00CC': 'I',
'\u00CD': 'I',
'\u00CE': 'I',
'\u0128': 'I',
'\u012A': 'I',
'\u012C': 'I',
'\u0130': 'I',
'\u00CF': 'I',
'\u1E2E': 'I',
'\u1EC8': 'I',
'\u01CF': 'I',
'\u0208': 'I',
'\u020A': 'I',
'\u1ECA': 'I',
'\u012E': 'I',
'\u1E2C': 'I',
'\u0197': 'I',
'\u24BF': 'J',
'\uFF2A': 'J',
'\u0134': 'J',
'\u0248': 'J',
'\u24C0': 'K',
'\uFF2B': 'K',
'\u1E30': 'K',
'\u01E8': 'K',
'\u1E32': 'K',
'\u0136': 'K',
'\u1E34': 'K',
'\u0198': 'K',
'\u2C69': 'K',
'\uA740': 'K',
'\uA742': 'K',
'\uA744': 'K',
'\uA7A2': 'K',
'\u24C1': 'L',
'\uFF2C': 'L',
'\u013F': 'L',
'\u0139': 'L',
'\u013D': 'L',
'\u1E36': 'L',
'\u1E38': 'L',
'\u013B': 'L',
'\u1E3C': 'L',
'\u1E3A': 'L',
'\u0141': 'L',
'\u023D': 'L',
'\u2C62': 'L',
'\u2C60': 'L',
'\uA748': 'L',
'\uA746': 'L',
'\uA780': 'L',
'\u01C7': 'LJ',
'\u01C8': 'Lj',
'\u24C2': 'M',
'\uFF2D': 'M',
'\u1E3E': 'M',
'\u1E40': 'M',
'\u1E42': 'M',
'\u2C6E': 'M',
'\u019C': 'M',
'\u24C3': 'N',
'\uFF2E': 'N',
'\u01F8': 'N',
'\u0143': 'N',
'\u00D1': 'N',
'\u1E44': 'N',
'\u0147': 'N',
'\u1E46': 'N',
'\u0145': 'N',
'\u1E4A': 'N',
'\u1E48': 'N',
'\u0220': 'N',
'\u019D': 'N',
'\uA790': 'N',
'\uA7A4': 'N',
'\u01CA': 'NJ',
'\u01CB': 'Nj',
'\u24C4': 'O',
'\uFF2F': 'O',
'\u00D2': 'O',
'\u00D3': 'O',
'\u00D4': 'O',
'\u1ED2': 'O',
'\u1ED0': 'O',
'\u1ED6': 'O',
'\u1ED4': 'O',
'\u00D5': 'O',
'\u1E4C': 'O',
'\u022C': 'O',
'\u1E4E': 'O',
'\u014C': 'O',
'\u1E50': 'O',
'\u1E52': 'O',
'\u014E': 'O',
'\u022E': 'O',
'\u0230': 'O',
'\u00D6': 'O',
'\u022A': 'O',
'\u1ECE': 'O',
'\u0150': 'O',
'\u01D1': 'O',
'\u020C': 'O',
'\u020E': 'O',
'\u01A0': 'O',
'\u1EDC': 'O',
'\u1EDA': 'O',
'\u1EE0': 'O',
'\u1EDE': 'O',
'\u1EE2': 'O',
'\u1ECC': 'O',
'\u1ED8': 'O',
'\u01EA': 'O',
'\u01EC': 'O',
'\u00D8': 'O',
'\u01FE': 'O',
'\u0186': 'O',
'\u019F': 'O',
'\uA74A': 'O',
'\uA74C': 'O',
'\u0152': 'OE',
'\u01A2': 'OI',
'\uA74E': 'OO',
'\u0222': 'OU',
'\u24C5': 'P',
'\uFF30': 'P',
'\u1E54': 'P',
'\u1E56': 'P',
'\u01A4': 'P',
'\u2C63': 'P',
'\uA750': 'P',
'\uA752': 'P',
'\uA754': 'P',
'\u24C6': 'Q',
'\uFF31': 'Q',
'\uA756': 'Q',
'\uA758': 'Q',
'\u024A': 'Q',
'\u24C7': 'R',
'\uFF32': 'R',
'\u0154': 'R',
'\u1E58': 'R',
'\u0158': 'R',
'\u0210': 'R',
'\u0212': 'R',
'\u1E5A': 'R',
'\u1E5C': 'R',
'\u0156': 'R',
'\u1E5E': 'R',
'\u024C': 'R',
'\u2C64': 'R',
'\uA75A': 'R',
'\uA7A6': 'R',
'\uA782': 'R',
'\u24C8': 'S',
'\uFF33': 'S',
'\u1E9E': 'S',
'\u015A': 'S',
'\u1E64': 'S',
'\u015C': 'S',
'\u1E60': 'S',
'\u0160': 'S',
'\u1E66': 'S',
'\u1E62': 'S',
'\u1E68': 'S',
'\u0218': 'S',
'\u015E': 'S',
'\u2C7E': 'S',
'\uA7A8': 'S',
'\uA784': 'S',
'\u24C9': 'T',
'\uFF34': 'T',
'\u1E6A': 'T',
'\u0164': 'T',
'\u1E6C': 'T',
'\u021A': 'T',
'\u0162': 'T',
'\u1E70': 'T',
'\u1E6E': 'T',
'\u0166': 'T',
'\u01AC': 'T',
'\u01AE': 'T',
'\u023E': 'T',
'\uA786': 'T',
'\uA728': 'TZ',
'\u24CA': 'U',
'\uFF35': 'U',
'\u00D9': 'U',
'\u00DA': 'U',
'\u00DB': 'U',
'\u0168': 'U',
'\u1E78': 'U',
'\u016A': 'U',
'\u1E7A': 'U',
'\u016C': 'U',
'\u00DC': 'U',
'\u01DB': 'U',
'\u01D7': 'U',
'\u01D5': 'U',
'\u01D9': 'U',
'\u1EE6': 'U',
'\u016E': 'U',
'\u0170': 'U',
'\u01D3': 'U',
'\u0214': 'U',
'\u0216': 'U',
'\u01AF': 'U',
'\u1EEA': 'U',
'\u1EE8': 'U',
'\u1EEE': 'U',
'\u1EEC': 'U',
'\u1EF0': 'U',
'\u1EE4': 'U',
'\u1E72': 'U',
'\u0172': 'U',
'\u1E76': 'U',
'\u1E74': 'U',
'\u0244': 'U',
'\u24CB': 'V',
'\uFF36': 'V',
'\u1E7C': 'V',
'\u1E7E': 'V',
'\u01B2': 'V',
'\uA75E': 'V',
'\u0245': 'V',
'\uA760': 'VY',
'\u24CC': 'W',
'\uFF37': 'W',
'\u1E80': 'W',
'\u1E82': 'W',
'\u0174': 'W',
'\u1E86': 'W',
'\u1E84': 'W',
'\u1E88': 'W',
'\u2C72': 'W',
'\u24CD': 'X',
'\uFF38': 'X',
'\u1E8A': 'X',
'\u1E8C': 'X',
'\u24CE': 'Y',
'\uFF39': 'Y',
'\u1EF2': 'Y',
'\u00DD': 'Y',
'\u0176': 'Y',
'\u1EF8': 'Y',
'\u0232': 'Y',
'\u1E8E': 'Y',
'\u0178': 'Y',
'\u1EF6': 'Y',
'\u1EF4': 'Y',
'\u01B3': 'Y',
'\u024E': 'Y',
'\u1EFE': 'Y',
'\u24CF': 'Z',
'\uFF3A': 'Z',
'\u0179': 'Z',
'\u1E90': 'Z',
'\u017B': 'Z',
'\u017D': 'Z',
'\u1E92': 'Z',
'\u1E94': 'Z',
'\u01B5': 'Z',
'\u0224': 'Z',
'\u2C7F': 'Z',
'\u2C6B': 'Z',
'\uA762': 'Z',
'\u24D0': 'a',
'\uFF41': 'a',
'\u1E9A': 'a',
'\u00E0': 'a',
'\u00E1': 'a',
'\u00E2': 'a',
'\u1EA7': 'a',
'\u1EA5': 'a',
'\u1EAB': 'a',
'\u1EA9': 'a',
'\u00E3': 'a',
'\u0101': 'a',
'\u0103': 'a',
'\u1EB1': 'a',
'\u1EAF': 'a',
'\u1EB5': 'a',
'\u1EB3': 'a',
'\u0227': 'a',
'\u01E1': 'a',
'\u00E4': 'a',
'\u01DF': 'a',
'\u1EA3': 'a',
'\u00E5': 'a',
'\u01FB': 'a',
'\u01CE': 'a',
'\u0201': 'a',
'\u0203': 'a',
'\u1EA1': 'a',
'\u1EAD': 'a',
'\u1EB7': 'a',
'\u1E01': 'a',
'\u0105': 'a',
'\u2C65': 'a',
'\u0250': 'a',
'\uA733': 'aa',
'\u00E6': 'ae',
'\u01FD': 'ae',
'\u01E3': 'ae',
'\uA735': 'ao',
'\uA737': 'au',
'\uA739': 'av',
'\uA73B': 'av',
'\uA73D': 'ay',
'\u24D1': 'b',
'\uFF42': 'b',
'\u1E03': 'b',
'\u1E05': 'b',
'\u1E07': 'b',
'\u0180': 'b',
'\u0183': 'b',
'\u0253': 'b',
'\u24D2': 'c',
'\uFF43': 'c',
'\u0107': 'c',
'\u0109': 'c',
'\u010B': 'c',
'\u010D': 'c',
'\u00E7': 'c',
'\u1E09': 'c',
'\u0188': 'c',
'\u023C': 'c',
'\uA73F': 'c',
'\u2184': 'c',
'\u24D3': 'd',
'\uFF44': 'd',
'\u1E0B': 'd',
'\u010F': 'd',
'\u1E0D': 'd',
'\u1E11': 'd',
'\u1E13': 'd',
'\u1E0F': 'd',
'\u0111': 'd',
'\u018C': 'd',
'\u0256': 'd',
'\u0257': 'd',
'\uA77A': 'd',
'\u01F3': 'dz',
'\u01C6': 'dz',
'\u24D4': 'e',
'\uFF45': 'e',
'\u00E8': 'e',
'\u00E9': 'e',
'\u00EA': 'e',
'\u1EC1': 'e',
'\u1EBF': 'e',
'\u1EC5': 'e',
'\u1EC3': 'e',
'\u1EBD': 'e',
'\u0113': 'e',
'\u1E15': 'e',
'\u1E17': 'e',
'\u0115': 'e',
'\u0117': 'e',
'\u00EB': 'e',
'\u1EBB': 'e',
'\u011B': 'e',
'\u0205': 'e',
'\u0207': 'e',
'\u1EB9': 'e',
'\u1EC7': 'e',
'\u0229': 'e',
'\u1E1D': 'e',
'\u0119': 'e',
'\u1E19': 'e',
'\u1E1B': 'e',
'\u0247': 'e',
'\u025B': 'e',
'\u01DD': 'e',
'\u24D5': 'f',
'\uFF46': 'f',
'\u1E1F': 'f',
'\u0192': 'f',
'\uA77C': 'f',
'\u24D6': 'g',
'\uFF47': 'g',
'\u01F5': 'g',
'\u011D': 'g',
'\u1E21': 'g',
'\u011F': 'g',
'\u0121': 'g',
'\u01E7': 'g',
'\u0123': 'g',
'\u01E5': 'g',
'\u0260': 'g',
'\uA7A1': 'g',
'\u1D79': 'g',
'\uA77F': 'g',
'\u24D7': 'h',
'\uFF48': 'h',
'\u0125': 'h',
'\u1E23': 'h',
'\u1E27': 'h',
'\u021F': 'h',
'\u1E25': 'h',
'\u1E29': 'h',
'\u1E2B': 'h',
'\u1E96': 'h',
'\u0127': 'h',
'\u2C68': 'h',
'\u2C76': 'h',
'\u0265': 'h',
'\u0195': 'hv',
'\u24D8': 'i',
'\uFF49': 'i',
'\u00EC': 'i',
'\u00ED': 'i',
'\u00EE': 'i',
'\u0129': 'i',
'\u012B': 'i',
'\u012D': 'i',
'\u00EF': 'i',
'\u1E2F': 'i',
'\u1EC9': 'i',
'\u01D0': 'i',
'\u0209': 'i',
'\u020B': 'i',
'\u1ECB': 'i',
'\u012F': 'i',
'\u1E2D': 'i',
'\u0268': 'i',
'\u0131': 'i',
'\u24D9': 'j',
'\uFF4A': 'j',
'\u0135': 'j',
'\u01F0': 'j',
'\u0249': 'j',
'\u24DA': 'k',
'\uFF4B': 'k',
'\u1E31': 'k',
'\u01E9': 'k',
'\u1E33': 'k',
'\u0137': 'k',
'\u1E35': 'k',
'\u0199': 'k',
'\u2C6A': 'k',
'\uA741': 'k',
'\uA743': 'k',
'\uA745': 'k',
'\uA7A3': 'k',
'\u24DB': 'l',
'\uFF4C': 'l',
'\u0140': 'l',
'\u013A': 'l',
'\u013E': 'l',
'\u1E37': 'l',
'\u1E39': 'l',
'\u013C': 'l',
'\u1E3D': 'l',
'\u1E3B': 'l',
'\u017F': 'l',
'\u0142': 'l',
'\u019A': 'l',
'\u026B': 'l',
'\u2C61': 'l',
'\uA749': 'l',
'\uA781': 'l',
'\uA747': 'l',
'\u01C9': 'lj',
'\u24DC': 'm',
'\uFF4D': 'm',
'\u1E3F': 'm',
'\u1E41': 'm',
'\u1E43': 'm',
'\u0271': 'm',
'\u026F': 'm',
'\u24DD': 'n',
'\uFF4E': 'n',
'\u01F9': 'n',
'\u0144': 'n',
'\u00F1': 'n',
'\u1E45': 'n',
'\u0148': 'n',
'\u1E47': 'n',
'\u0146': 'n',
'\u1E4B': 'n',
'\u1E49': 'n',
'\u019E': 'n',
'\u0272': 'n',
'\u0149': 'n',
'\uA791': 'n',
'\uA7A5': 'n',
'\u01CC': 'nj',
'\u24DE': 'o',
'\uFF4F': 'o',
'\u00F2': 'o',
'\u00F3': 'o',
'\u00F4': 'o',
'\u1ED3': 'o',
'\u1ED1': 'o',
'\u1ED7': 'o',
'\u1ED5': 'o',
'\u00F5': 'o',
'\u1E4D': 'o',
'\u022D': 'o',
'\u1E4F': 'o',
'\u014D': 'o',
'\u1E51': 'o',
'\u1E53': 'o',
'\u014F': 'o',
'\u022F': 'o',
'\u0231': 'o',
'\u00F6': 'o',
'\u022B': 'o',
'\u1ECF': 'o',
'\u0151': 'o',
'\u01D2': 'o',
'\u020D': 'o',
'\u020F': 'o',
'\u01A1': 'o',
'\u1EDD': 'o',
'\u1EDB': 'o',
'\u1EE1': 'o',
'\u1EDF': 'o',
'\u1EE3': 'o',
'\u1ECD': 'o',
'\u1ED9': 'o',
'\u01EB': 'o',
'\u01ED': 'o',
'\u00F8': 'o',
'\u01FF': 'o',
'\u0254': 'o',
'\uA74B': 'o',
'\uA74D': 'o',
'\u0275': 'o',
'\u0153': 'oe',
'\u01A3': 'oi',
'\u0223': 'ou',
'\uA74F': 'oo',
'\u24DF': 'p',
'\uFF50': 'p',
'\u1E55': 'p',
'\u1E57': 'p',
'\u01A5': 'p',
'\u1D7D': 'p',
'\uA751': 'p',
'\uA753': 'p',
'\uA755': 'p',
'\u24E0': 'q',
'\uFF51': 'q',
'\u024B': 'q',
'\uA757': 'q',
'\uA759': 'q',
'\u24E1': 'r',
'\uFF52': 'r',
'\u0155': 'r',
'\u1E59': 'r',
'\u0159': 'r',
'\u0211': 'r',
'\u0213': 'r',
'\u1E5B': 'r',
'\u1E5D': 'r',
'\u0157': 'r',
'\u1E5F': 'r',
'\u024D': 'r',
'\u027D': 'r',
'\uA75B': 'r',
'\uA7A7': 'r',
'\uA783': 'r',
'\u24E2': 's',
'\uFF53': 's',
'\u00DF': 's',
'\u015B': 's',
'\u1E65': 's',
'\u015D': 's',
'\u1E61': 's',
'\u0161': 's',
'\u1E67': 's',
'\u1E63': 's',
'\u1E69': 's',
'\u0219': 's',
'\u015F': 's',
'\u023F': 's',
'\uA7A9': 's',
'\uA785': 's',
'\u1E9B': 's',
'\u24E3': 't',
'\uFF54': 't',
'\u1E6B': 't',
'\u1E97': 't',
'\u0165': 't',
'\u1E6D': 't',
'\u021B': 't',
'\u0163': 't',
'\u1E71': 't',
'\u1E6F': 't',
'\u0167': 't',
'\u01AD': 't',
'\u0288': 't',
'\u2C66': 't',
'\uA787': 't',
'\uA729': 'tz',
'\u24E4': 'u',
'\uFF55': 'u',
'\u00F9': 'u',
'\u00FA': 'u',
'\u00FB': 'u',
'\u0169': 'u',
'\u1E79': 'u',
'\u016B': 'u',
'\u1E7B': 'u',
'\u016D': 'u',
'\u00FC': 'u',
'\u01DC': 'u',
'\u01D8': 'u',
'\u01D6': 'u',
'\u01DA': 'u',
'\u1EE7': 'u',
'\u016F': 'u',
'\u0171': 'u',
'\u01D4': 'u',
'\u0215': 'u',
'\u0217': 'u',
'\u01B0': 'u',
'\u1EEB': 'u',
'\u1EE9': 'u',
'\u1EEF': 'u',
'\u1EED': 'u',
'\u1EF1': 'u',
'\u1EE5': 'u',
'\u1E73': 'u',
'\u0173': 'u',
'\u1E77': 'u',
'\u1E75': 'u',
'\u0289': 'u',
'\u24E5': 'v',
'\uFF56': 'v',
'\u1E7D': 'v',
'\u1E7F': 'v',
'\u028B': 'v',
'\uA75F': 'v',
'\u028C': 'v',
'\uA761': 'vy',
'\u24E6': 'w',
'\uFF57': 'w',
'\u1E81': 'w',
'\u1E83': 'w',
'\u0175': 'w',
'\u1E87': 'w',
'\u1E85': 'w',
'\u1E98': 'w',
'\u1E89': 'w',
'\u2C73': 'w',
'\u24E7': 'x',
'\uFF58': 'x',
'\u1E8B': 'x',
'\u1E8D': 'x',
'\u24E8': 'y',
'\uFF59': 'y',
'\u1EF3': 'y',
'\u00FD': 'y',
'\u0177': 'y',
'\u1EF9': 'y',
'\u0233': 'y',
'\u1E8F': 'y',
'\u00FF': 'y',
'\u1EF7': 'y',
'\u1E99': 'y',
'\u1EF5': 'y',
'\u01B4': 'y',
'\u024F': 'y',
'\u1EFF': 'y',
'\u24E9': 'z',
'\uFF5A': 'z',
'\u017A': 'z',
'\u1E91': 'z',
'\u017C': 'z',
'\u017E': 'z',
'\u1E93': 'z',
'\u1E95': 'z',
'\u01B6': 'z',
'\u0225': 'z',
'\u0240': 'z',
'\u2C6C': 'z',
'\uA763': 'z',
'\u0386': '\u0391',
'\u0388': '\u0395',
'\u0389': '\u0397',
'\u038A': '\u0399',
'\u03AA': '\u0399',
'\u038C': '\u039F',
'\u038E': '\u03A5',
'\u03AB': '\u03A5',
'\u038F': '\u03A9',
'\u03AC': '\u03B1',
'\u03AD': '\u03B5',
'\u03AE': '\u03B7',
'\u03AF': '\u03B9',
'\u03CA': '\u03B9',
'\u0390': '\u03B9',
'\u03CC': '\u03BF',
'\u03CD': '\u03C5',
'\u03CB': '\u03C5',
'\u03B0': '\u03C5',
'\u03CE': '\u03C9',
'\u03C2': '\u03C3',
'\u2019': '\''
};
return diacritics;
});
S2.define('select2/data/base',[
'../utils'
], function (Utils){
function BaseAdapter ($element, options){
BaseAdapter.__super__.constructor.call(this);
}
Utils.Extend(BaseAdapter, Utils.Observable);
BaseAdapter.prototype.current=function (callback){
throw new Error('The `current` method must be defined in child classes.');
};
BaseAdapter.prototype.query=function (params, callback){
throw new Error('The `query` method must be defined in child classes.');
};
BaseAdapter.prototype.bind=function (container, $container){
};
BaseAdapter.prototype.destroy=function (){
};
BaseAdapter.prototype.generateResultId=function (container, data){
var id=container.id + '-result-';
id +=Utils.generateChars(4);
if(data.id!=null){
id +='-' + data.id.toString();
}else{
id +='-' + Utils.generateChars(4);
}
return id;
};
return BaseAdapter;
});
S2.define('select2/data/select',[
'./base',
'../utils',
'jquery'
], function (BaseAdapter, Utils, $){
function SelectAdapter ($element, options){
this.$element=$element;
this.options=options;
SelectAdapter.__super__.constructor.call(this);
}
Utils.Extend(SelectAdapter, BaseAdapter);
SelectAdapter.prototype.current=function (callback){
var self=this;
var data=Array.prototype.map.call(this.$element[0].querySelectorAll(':checked'),
function (selectedElement){
return self.item($(selectedElement));
}
);
callback(data);
};
SelectAdapter.prototype.select=function (data){
var self=this;
data.selected=true;
if(data.element!=null&&data.element.tagName.toLowerCase()==='option'
){
data.element.selected=true;
this.$element.trigger('input').trigger('change');
return;
}
if(this.$element.prop('multiple')){
this.current(function (currentData){
var val=[];
data=[data];
data.push.apply(data, currentData);
for (var d=0; d < data.length; d++){
var id=data[d].id;
if(val.indexOf(id)===-1){
val.push(id);
}}
self.$element.val(val);
self.$element.trigger('input').trigger('change');
});
}else{
var val=data.id;
this.$element.val(val);
this.$element.trigger('input').trigger('change');
}};
SelectAdapter.prototype.unselect=function (data){
var self=this;
if(!this.$element.prop('multiple')){
return;
}
data.selected=false;
if(data.element!=null &&
data.element.tagName.toLowerCase()==='option'
){
data.element.selected=false;
this.$element.trigger('input').trigger('change');
return;
}
this.current(function (currentData){
var val=[];
for (var d=0; d < currentData.length; d++){
var id=currentData[d].id;
if(id!==data.id&&val.indexOf(id)===-1){
val.push(id);
}}
self.$element.val(val);
self.$element.trigger('input').trigger('change');
});
};
SelectAdapter.prototype.bind=function (container, $container){
var self=this;
this.container=container;
container.on('select', function (params){
self.select(params.data);
});
container.on('unselect', function (params){
self.unselect(params.data);
});
};
SelectAdapter.prototype.destroy=function (){
this.$element.find('*').each(function (){
Utils.RemoveData(this);
});
};
SelectAdapter.prototype.query=function (params, callback){
var data=[];
var self=this;
var $options=this.$element.children();
$options.each(function (){
if(this.tagName.toLowerCase()!=='option' &&
this.tagName.toLowerCase()!=='optgroup'
){
return;
}
var $option=$(this);
var option=self.item($option);
var matches=self.matches(params, option);
if(matches!==null){
data.push(matches);
}});
callback({
results: data
});
};
SelectAdapter.prototype.addOptions=function ($options){
this.$element.append($options);
};
SelectAdapter.prototype.option=function (data){
var option;
if(data.children){
option=document.createElement('optgroup');
option.label=data.text;
}else{
option=document.createElement('option');
if(option.textContent!==undefined){
option.textContent=data.text;
}else{
option.innerText=data.text;
}}
if(data.id!==undefined){
option.value=data.id;
}
if(data.disabled){
option.disabled=true;
}
if(data.selected){
option.selected=true;
}
if(data.title){
option.title=data.title;
}
var normalizedData=this._normalizeItem(data);
normalizedData.element=option;
Utils.StoreData(option, 'data', normalizedData);
return $(option);
};
SelectAdapter.prototype.item=function ($option){
var data={};
data=Utils.GetData($option[0], 'data');
if(data!=null){
return data;
}
var option=$option[0];
if(option.tagName.toLowerCase()==='option'){
data={
id: $option.val(),
text: $option.text(),
disabled: $option.prop('disabled'),
selected: $option.prop('selected'),
title: $option.prop('title')
};}else if(option.tagName.toLowerCase()==='optgroup'){
data={
text: $option.prop('label'),
children: [],
title: $option.prop('title')
};
var $children=$option.children('option');
var children=[];
for (var c=0; c < $children.length; c++){
var $child=$($children[c]);
var child=this.item($child);
children.push(child);
}
data.children=children;
}
data=this._normalizeItem(data);
data.element=$option[0];
Utils.StoreData($option[0], 'data', data);
return data;
};
SelectAdapter.prototype._normalizeItem=function (item){
if(item!==Object(item)){
item={
id: item,
text: item
};}
item=$.extend({}, {
text: ''
}, item);
var defaults={
selected: false,
disabled: false
};
if(item.id!=null){
item.id=item.id.toString();
}
if(item.text!=null){
item.text=item.text.toString();
}
if(item._resultId==null&&item.id&&this.container!=null){
item._resultId=this.generateResultId(this.container, item);
}
return $.extend({}, defaults, item);
};
SelectAdapter.prototype.matches=function (params, data){
var matcher=this.options.get('matcher');
return matcher(params, data);
};
return SelectAdapter;
});
S2.define('select2/data/array',[
'./select',
'../utils',
'jquery'
], function (SelectAdapter, Utils, $){
function ArrayAdapter ($element, options){
this._dataToConvert=options.get('data')||[];
ArrayAdapter.__super__.constructor.call(this, $element, options);
}
Utils.Extend(ArrayAdapter, SelectAdapter);
ArrayAdapter.prototype.bind=function (container, $container){
ArrayAdapter.__super__.bind.call(this, container, $container);
this.addOptions(this.convertToOptions(this._dataToConvert));
};
ArrayAdapter.prototype.select=function (data){
var $option=this.$element.find('option').filter(function (i, elm){
return elm.value==data.id.toString();
});
if($option.length===0){
$option=this.option(data);
this.addOptions($option);
}
ArrayAdapter.__super__.select.call(this, data);
};
ArrayAdapter.prototype.convertToOptions=function (data){
var self=this;
var $existing=this.$element.find('option');
var existingIds=$existing.map(function (){
return self.item($(this)).id;
}).get();
var $options=[];
function onlyItem (item){
return function (){
return $(this).val()==item.id;
};}
for (var d=0; d < data.length; d++){
var item=this._normalizeItem(data[d]);
if(existingIds.indexOf(item.id) >=0){
var $existingOption=$existing.filter(onlyItem(item));
var existingData=this.item($existingOption);
var newData=$.extend(true, {}, item, existingData);
var $newOption=this.option(newData);
$existingOption.replaceWith($newOption);
continue;
}
var $option=this.option(item);
if(item.children){
var $children=this.convertToOptions(item.children);
$option.append($children);
}
$options.push($option);
}
return $options;
};
return ArrayAdapter;
});
S2.define('select2/data/ajax',[
'./array',
'../utils',
'jquery'
], function (ArrayAdapter, Utils, $){
function AjaxAdapter ($element, options){
this.ajaxOptions=this._applyDefaults(options.get('ajax'));
if(this.ajaxOptions.processResults!=null){
this.processResults=this.ajaxOptions.processResults;
}
AjaxAdapter.__super__.constructor.call(this, $element, options);
}
Utils.Extend(AjaxAdapter, ArrayAdapter);
AjaxAdapter.prototype._applyDefaults=function (options){
var defaults={
data: function (params){
return $.extend({}, params, {
q: params.term
});
},
transport: function (params, success, failure){
var $request=$.ajax(params);
$request.then(success);
$request.fail(failure);
return $request;
}};
return $.extend({}, defaults, options, true);
};
AjaxAdapter.prototype.processResults=function (results){
return results;
};
AjaxAdapter.prototype.query=function (params, callback){
var matches=[];
var self=this;
if(this._request!=null){
if(typeof this._request.abort==='function'){
this._request.abort();
}
this._request=null;
}
var options=$.extend({
type: 'GET'
}, this.ajaxOptions);
if(typeof options.url==='function'){
options.url=options.url.call(this.$element, params);
}
if(typeof options.data==='function'){
options.data=options.data.call(this.$element, params);
}
function request (){
var $request=options.transport(options, function (data){
var results=self.processResults(data, params);
if(self.options.get('debug')&&window.console&&console.error){
if(!results||!results.results||!Array.isArray(results.results)){
console.error('Select2: The AJAX results did not return an array in the ' +
'`results` key of the response.'
);
}}
callback(results);
}, function (){
if('status' in $request &&
($request.status===0||$request.status==='0')){
return;
}
self.trigger('results:message', {
message: 'errorLoading'
});
});
self._request=$request;
}
if(this.ajaxOptions.delay&&params.term!=null){
if(this._queryTimeout){
window.clearTimeout(this._queryTimeout);
}
this._queryTimeout=window.setTimeout(request, this.ajaxOptions.delay);
}else{
request();
}};
return AjaxAdapter;
});
S2.define('select2/data/tags',[
'jquery'
], function ($){
function Tags (decorated, $element, options){
var tags=options.get('tags');
var createTag=options.get('createTag');
if(createTag!==undefined){
this.createTag=createTag;
}
var insertTag=options.get('insertTag');
if(insertTag!==undefined){
this.insertTag=insertTag;
}
decorated.call(this, $element, options);
if(Array.isArray(tags)){
for (var t=0; t < tags.length; t++){
var tag=tags[t];
var item=this._normalizeItem(tag);
var $option=this.option(item);
this.$element.append($option);
}}
}
Tags.prototype.query=function (decorated, params, callback){
var self=this;
this._removeOldTags();
if(params.term==null||params.page!=null){
decorated.call(this, params, callback);
return;
}
function wrapper (obj, child){
var data=obj.results;
for (var i=0; i < data.length; i++){
var option=data[i];
var checkChildren=(
option.children!=null &&
!wrapper({
results: option.children
}, true)
);
var optionText=(option.text||'').toUpperCase();
var paramsTerm=(params.term||'').toUpperCase();
var checkText=optionText===paramsTerm;
if(checkText||checkChildren){
if(child){
return false;
}
obj.data=data;
callback(obj);
return;
}}
if(child){
return true;
}
var tag=self.createTag(params);
if(tag!=null){
var $option=self.option(tag);
$option.attr('data-select2-tag', 'true');
self.addOptions([$option]);
self.insertTag(data, tag);
}
obj.results=data;
callback(obj);
}
decorated.call(this, params, wrapper);
};
Tags.prototype.createTag=function (decorated, params){
if(params.term==null){
return null;
}
var term=params.term.trim();
if(term===''){
return null;
}
return {
id: term,
text: term
};};
Tags.prototype.insertTag=function (_, data, tag){
data.unshift(tag);
};
Tags.prototype._removeOldTags=function (_){
var $options=this.$element.find('option[data-select2-tag]');
$options.each(function (){
if(this.selected){
return;
}
$(this).remove();
});
};
return Tags;
});
S2.define('select2/data/tokenizer',[
'jquery'
], function ($){
function Tokenizer (decorated, $element, options){
var tokenizer=options.get('tokenizer');
if(tokenizer!==undefined){
this.tokenizer=tokenizer;
}
decorated.call(this, $element, options);
}
Tokenizer.prototype.bind=function (decorated, container, $container){
decorated.call(this, container, $container);
this.$search=container.dropdown.$search||container.selection.$search ||
$container.find('.select2-search__field');
};
Tokenizer.prototype.query=function (decorated, params, callback){
var self=this;
function createAndSelect (data){
var item=self._normalizeItem(data);
var $existingOptions=self.$element.find('option').filter(function (){
return $(this).val()===item.id;
});
if(!$existingOptions.length){
var $option=self.option(item);
$option.attr('data-select2-tag', true);
self._removeOldTags();
self.addOptions([$option]);
}
select(item);
}
function select (data){
self.trigger('select', {
data: data
});
}
params.term=params.term||'';
var tokenData=this.tokenizer(params, this.options, createAndSelect);
if(tokenData.term!==params.term){
if(this.$search.length){
this.$search.val(tokenData.term);
this.$search.trigger('focus');
}
params.term=tokenData.term;
}
decorated.call(this, params, callback);
};
Tokenizer.prototype.tokenizer=function (_, params, options, callback){
var separators=options.get('tokenSeparators')||[];
var term=params.term;
var i=0;
var createTag=this.createTag||function (params){
return {
id: params.term,
text: params.term
};};
while (i < term.length){
var termChar=term[i];
if(separators.indexOf(termChar)===-1){
i++;
continue;
}
var part=term.substr(0, i);
var partParams=$.extend({}, params, {
term: part
});
var data=createTag(partParams);
if(data==null){
i++;
continue;
}
callback(data);
term=term.substr(i + 1)||'';
i=0;
}
return {
term: term
};};
return Tokenizer;
});
S2.define('select2/data/minimumInputLength',[
], function (){
function MinimumInputLength (decorated, $e, options){
this.minimumInputLength=options.get('minimumInputLength');
decorated.call(this, $e, options);
}
MinimumInputLength.prototype.query=function (decorated, params, callback){
params.term=params.term||'';
if(params.term.length < this.minimumInputLength){
this.trigger('results:message', {
message: 'inputTooShort',
args: {
minimum: this.minimumInputLength,
input: params.term,
params: params
}});
return;
}
decorated.call(this, params, callback);
};
return MinimumInputLength;
});
S2.define('select2/data/maximumInputLength',[
], function (){
function MaximumInputLength (decorated, $e, options){
this.maximumInputLength=options.get('maximumInputLength');
decorated.call(this, $e, options);
}
MaximumInputLength.prototype.query=function (decorated, params, callback){
params.term=params.term||'';
if(this.maximumInputLength > 0 &&
params.term.length > this.maximumInputLength){
this.trigger('results:message', {
message: 'inputTooLong',
args: {
maximum: this.maximumInputLength,
input: params.term,
params: params
}});
return;
}
decorated.call(this, params, callback);
};
return MaximumInputLength;
});
S2.define('select2/data/maximumSelectionLength',[
], function (){
function MaximumSelectionLength (decorated, $e, options){
this.maximumSelectionLength=options.get('maximumSelectionLength');
decorated.call(this, $e, options);
}
MaximumSelectionLength.prototype.bind =
function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('select', function (){
self._checkIfMaximumSelected();
});
};
MaximumSelectionLength.prototype.query =
function (decorated, params, callback){
var self=this;
this._checkIfMaximumSelected(function (){
decorated.call(self, params, callback);
});
};
MaximumSelectionLength.prototype._checkIfMaximumSelected =
function (_, successCallback){
var self=this;
this.current(function (currentData){
var count=currentData!=null ? currentData.length:0;
if(self.maximumSelectionLength > 0 &&
count >=self.maximumSelectionLength){
self.trigger('results:message', {
message: 'maximumSelected',
args: {
maximum: self.maximumSelectionLength
}});
return;
}
if(successCallback){
successCallback();
}});
};
return MaximumSelectionLength;
});
S2.define('select2/dropdown',[
'jquery',
'./utils'
], function ($, Utils){
function Dropdown ($element, options){
this.$element=$element;
this.options=options;
Dropdown.__super__.constructor.call(this);
}
Utils.Extend(Dropdown, Utils.Observable);
Dropdown.prototype.render=function (){
var $dropdown=$(
'<span class="select2-dropdown">' +
'<span class="select2-results"></span>' +
'</span>'
);
$dropdown.attr('dir', this.options.get('dir'));
this.$dropdown=$dropdown;
return $dropdown;
};
Dropdown.prototype.bind=function (){
};
Dropdown.prototype.position=function ($dropdown, $container){
};
Dropdown.prototype.destroy=function (){
this.$dropdown.remove();
};
return Dropdown;
});
S2.define('select2/dropdown/search',[
'jquery'
], function ($){
function Search (){ }
Search.prototype.render=function (decorated){
var $rendered=decorated.call(this);
var searchLabel=this.options.get('translations').get('search');
var $search=$(
'<span class="select2-search select2-search--dropdown">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
'</span>'
);
this.$searchContainer=$search;
this.$search=$search.find('input');
this.$search.prop('autocomplete', this.options.get('autocomplete'));
this.$search.attr('aria-label', searchLabel());
$rendered.prepend($search);
return $rendered;
};
Search.prototype.bind=function (decorated, container, $container){
var self=this;
var resultsId=container.id + '-results';
decorated.call(this, container, $container);
this.$search.on('keydown', function (evt){
self.trigger('keypress', evt);
self._keyUpPrevented=evt.isDefaultPrevented();
});
this.$search.on('input', function (evt){
$(this).off('keyup');
});
this.$search.on('keyup input', function (evt){
self.handleSearch(evt);
});
container.on('open', function (){
self.$search.attr('tabindex', 0);
self.$search.attr('aria-controls', resultsId);
self.$search.trigger('focus');
window.setTimeout(function (){
self.$search.trigger('focus');
}, 0);
});
container.on('close', function (){
self.$search.attr('tabindex', -1);
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.val('');
self.$search.trigger('blur');
});
container.on('focus', function (){
if(!container.isOpen()){
self.$search.trigger('focus');
}});
container.on('results:all', function (params){
if(params.query.term==null||params.query.term===''){
var showSearch=self.showSearch(params);
if(showSearch){
self.$searchContainer[0].classList.remove('select2-search--hide');
}else{
self.$searchContainer[0].classList.add('select2-search--hide');
}}
});
container.on('results:focus', function (params){
if(params.data._resultId){
self.$search.attr('aria-activedescendant', params.data._resultId);
}else{
self.$search.removeAttr('aria-activedescendant');
}});
};
Search.prototype.handleSearch=function (evt){
if(!this._keyUpPrevented){
var input=this.$search.val();
this.trigger('query', {
term: input
});
}
this._keyUpPrevented=false;
};
Search.prototype.showSearch=function (_, params){
return true;
};
return Search;
});
S2.define('select2/dropdown/hidePlaceholder',[
], function (){
function HidePlaceholder (decorated, $element, options, dataAdapter){
this.placeholder=this.normalizePlaceholder(options.get('placeholder'));
decorated.call(this, $element, options, dataAdapter);
}
HidePlaceholder.prototype.append=function (decorated, data){
data.results=this.removePlaceholder(data.results);
decorated.call(this, data);
};
HidePlaceholder.prototype.normalizePlaceholder=function (_, placeholder){
if(typeof placeholder==='string'){
placeholder={
id: '',
text: placeholder
};}
return placeholder;
};
HidePlaceholder.prototype.removePlaceholder=function (_, data){
var modifiedData=data.slice(0);
for (var d=data.length - 1; d >=0; d--){
var item=data[d];
if(this.placeholder.id===item.id){
modifiedData.splice(d, 1);
}}
return modifiedData;
};
return HidePlaceholder;
});
S2.define('select2/dropdown/infiniteScroll',[
'jquery'
], function ($){
function InfiniteScroll (decorated, $element, options, dataAdapter){
this.lastParams={};
decorated.call(this, $element, options, dataAdapter);
this.$loadingMore=this.createLoadingMore();
this.loading=false;
}
InfiniteScroll.prototype.append=function (decorated, data){
this.$loadingMore.remove();
this.loading=false;
decorated.call(this, data);
if(this.showLoadingMore(data)){
this.$results.append(this.$loadingMore);
this.loadMoreIfNeeded();
}};
InfiniteScroll.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('query', function (params){
self.lastParams=params;
self.loading=true;
});
container.on('query:append', function (params){
self.lastParams=params;
self.loading=true;
});
this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
};
InfiniteScroll.prototype.loadMoreIfNeeded=function (){
var isLoadMoreVisible=$.contains(document.documentElement,
this.$loadingMore[0]
);
if(this.loading||!isLoadMoreVisible){
return;
}
var currentOffset=this.$results.offset().top +
this.$results.outerHeight(false);
var loadingMoreOffset=this.$loadingMore.offset().top +
this.$loadingMore.outerHeight(false);
if(currentOffset + 50 >=loadingMoreOffset){
this.loadMore();
}};
InfiniteScroll.prototype.loadMore=function (){
this.loading=true;
var params=$.extend({}, {page: 1}, this.lastParams);
params.page++;
this.trigger('query:append', params);
};
InfiniteScroll.prototype.showLoadingMore=function (_, data){
return data.pagination&&data.pagination.more;
};
InfiniteScroll.prototype.createLoadingMore=function (){
var $option=$(
'<li ' +
'class="select2-results__option select2-results__option--load-more"' +
'role="option" aria-disabled="true"></li>'
);
var message=this.options.get('translations').get('loadingMore');
$option.html(message(this.lastParams));
return $option;
};
return InfiniteScroll;
});
S2.define('select2/dropdown/attachBody',[
'jquery',
'../utils'
], function ($, Utils){
function AttachBody (decorated, $element, options){
this.$dropdownParent=$(options.get('dropdownParent')||document.body);
decorated.call(this, $element, options);
}
AttachBody.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('open', function (){
self._showDropdown();
self._attachPositioningHandler(container);
self._bindContainerResultHandlers(container);
});
container.on('close', function (){
self._hideDropdown();
self._detachPositioningHandler(container);
});
this.$dropdownContainer.on('mousedown', function (evt){
evt.stopPropagation();
});
};
AttachBody.prototype.destroy=function (decorated){
decorated.call(this);
this.$dropdownContainer.remove();
};
AttachBody.prototype.position=function (decorated, $dropdown, $container){
$dropdown.attr('class', $container.attr('class'));
$dropdown[0].classList.remove('select2');
$dropdown[0].classList.add('select2-container--open');
$dropdown.css({
position: 'absolute',
top: -999999
});
this.$container=$container;
};
AttachBody.prototype.render=function (decorated){
var $container=$('<span></span>');
var $dropdown=decorated.call(this);
$container.append($dropdown);
this.$dropdownContainer=$container;
return $container;
};
AttachBody.prototype._hideDropdown=function (decorated){
this.$dropdownContainer.detach();
};
AttachBody.prototype._bindContainerResultHandlers =
function (decorated, container){
if(this._containerResultsHandlersBound){
return;
}
var self=this;
container.on('results:all', function (){
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:append', function (){
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:message', function (){
self._positionDropdown();
self._resizeDropdown();
});
container.on('select', function (){
self._positionDropdown();
self._resizeDropdown();
});
container.on('unselect', function (){
self._positionDropdown();
self._resizeDropdown();
});
this._containerResultsHandlersBound=true;
};
AttachBody.prototype._attachPositioningHandler =
function (decorated, container){
var self=this;
var scrollEvent='scroll.select2.' + container.id;
var resizeEvent='resize.select2.' + container.id;
var orientationEvent='orientationchange.select2.' + container.id;
var $watchers=this.$container.parents().filter(Utils.hasScroll);
$watchers.each(function (){
Utils.StoreData(this, 'select2-scroll-position', {
x: $(this).scrollLeft(),
y: $(this).scrollTop()
});
});
$watchers.on(scrollEvent, function (ev){
var position=Utils.GetData(this, 'select2-scroll-position');
$(this).scrollTop(position.y);
});
$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
function (e){
self._positionDropdown();
self._resizeDropdown();
});
};
AttachBody.prototype._detachPositioningHandler =
function (decorated, container){
var scrollEvent='scroll.select2.' + container.id;
var resizeEvent='resize.select2.' + container.id;
var orientationEvent='orientationchange.select2.' + container.id;
var $watchers=this.$container.parents().filter(Utils.hasScroll);
$watchers.off(scrollEvent);
$(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
};
AttachBody.prototype._positionDropdown=function (){
var $window=$(window);
var isCurrentlyAbove=this.$dropdown[0].classList
.contains('select2-dropdown--above');
var isCurrentlyBelow=this.$dropdown[0].classList
.contains('select2-dropdown--below');
var newDirection=null;
var offset=this.$container.offset();
offset.bottom=offset.top + this.$container.outerHeight(false);
var container={
height: this.$container.outerHeight(false)
};
container.top=offset.top;
container.bottom=offset.top + container.height;
var dropdown={
height: this.$dropdown.outerHeight(false)
};
var viewport={
top: $window.scrollTop(),
bottom: $window.scrollTop() + $window.height()
};
var enoughRoomAbove=viewport.top < (offset.top - dropdown.height);
var enoughRoomBelow=viewport.bottom > (offset.bottom + dropdown.height);
var css={
left: offset.left,
top: container.bottom
};
var $offsetParent=this.$dropdownParent;
if($offsetParent.css('position')==='static'){
$offsetParent=$offsetParent.offsetParent();
}
var parentOffset={
top: 0,
left: 0
};
if($.contains(document.body, $offsetParent[0]) ||
$offsetParent[0].isConnected
){
parentOffset=$offsetParent.offset();
}
css.top -=parentOffset.top;
css.left -=parentOffset.left;
if(!isCurrentlyAbove&&!isCurrentlyBelow){
newDirection='below';
}
if(!enoughRoomBelow&&enoughRoomAbove&&!isCurrentlyAbove){
newDirection='above';
}else if(!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove){
newDirection='below';
}
if(newDirection=='above' ||
(isCurrentlyAbove&&newDirection!=='below')){
css.top=container.top - parentOffset.top - dropdown.height;
}
if(newDirection!=null){
this.$dropdown[0].classList.remove('select2-dropdown--below');
this.$dropdown[0].classList.remove('select2-dropdown--above');
this.$dropdown[0].classList.add('select2-dropdown--' + newDirection);
this.$container[0].classList.remove('select2-container--below');
this.$container[0].classList.remove('select2-container--above');
this.$container[0].classList.add('select2-container--' + newDirection);
}
this.$dropdownContainer.css(css);
};
AttachBody.prototype._resizeDropdown=function (){
var css={
width: this.$container.outerWidth(false) + 'px'
};
if(this.options.get('dropdownAutoWidth')){
css.minWidth=css.width;
css.position='relative';
css.width='auto';
}
this.$dropdown.css(css);
};
AttachBody.prototype._showDropdown=function (decorated){
this.$dropdownContainer.appendTo(this.$dropdownParent);
this._positionDropdown();
this._resizeDropdown();
};
return AttachBody;
});
S2.define('select2/dropdown/minimumResultsForSearch',[
], function (){
function countResults (data){
var count=0;
for (var d=0; d < data.length; d++){
var item=data[d];
if(item.children){
count +=countResults(item.children);
}else{
count++;
}}
return count;
}
function MinimumResultsForSearch (decorated, $element, options, dataAdapter){
this.minimumResultsForSearch=options.get('minimumResultsForSearch');
if(this.minimumResultsForSearch < 0){
this.minimumResultsForSearch=Infinity;
}
decorated.call(this, $element, options, dataAdapter);
}
MinimumResultsForSearch.prototype.showSearch=function (decorated, params){
if(countResults(params.data.results) < this.minimumResultsForSearch){
return false;
}
return decorated.call(this, params);
};
return MinimumResultsForSearch;
});
S2.define('select2/dropdown/selectOnClose',[
'../utils'
], function (Utils){
function SelectOnClose (){ }
SelectOnClose.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('close', function (params){
self._handleSelectOnClose(params);
});
};
SelectOnClose.prototype._handleSelectOnClose=function (_, params){
if(params&&params.originalSelect2Event!=null){
var event=params.originalSelect2Event;
if(event._type==='select'||event._type==='unselect'){
return;
}}
var $highlightedResults=this.getHighlightedResults();
if($highlightedResults.length < 1){
return;
}
var data=Utils.GetData($highlightedResults[0], 'data');
if((data.element!=null&&data.element.selected) ||
(data.element==null&&data.selected)
){
return;
}
this.trigger('select', {
data: data
});
};
return SelectOnClose;
});
S2.define('select2/dropdown/closeOnSelect',[
], function (){
function CloseOnSelect (){ }
CloseOnSelect.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('select', function (evt){
self._selectTriggered(evt);
});
container.on('unselect', function (evt){
self._selectTriggered(evt);
});
};
CloseOnSelect.prototype._selectTriggered=function (_, evt){
var originalEvent=evt.originalEvent;
if(originalEvent&&(originalEvent.ctrlKey||originalEvent.metaKey)){
return;
}
this.trigger('close', {
originalEvent: originalEvent,
originalSelect2Event: evt
});
};
return CloseOnSelect;
});
S2.define('select2/dropdown/dropdownCss',[
'../utils'
], function (Utils){
function DropdownCSS (){ }
DropdownCSS.prototype.render=function (decorated){
var $dropdown=decorated.call(this);
var dropdownCssClass=this.options.get('dropdownCssClass')||'';
if(dropdownCssClass.indexOf(':all:')!==-1){
dropdownCssClass=dropdownCssClass.replace(':all:', '');
Utils.copyNonInternalCssClasses($dropdown[0], this.$element[0]);
}
$dropdown.addClass(dropdownCssClass);
return $dropdown;
};
return DropdownCSS;
});
S2.define('select2/dropdown/tagsSearchHighlight',[
'../utils'
], function (Utils){
function TagsSearchHighlight (){ }
TagsSearchHighlight.prototype.highlightFirstItem=function (decorated){
var $options=this.$results
.find('.select2-results__option--selectable' +
':not(.select2-results__option--selected)'
);
if($options.length > 0){
var $firstOption=$options.first();
var data=Utils.GetData($firstOption[0], 'data');
var firstElement=data.element;
if(firstElement&&firstElement.getAttribute){
if(firstElement.getAttribute('data-select2-tag')==='true'){
$firstOption.trigger('mouseenter');
return;
}}
}
decorated.call(this);
};
return TagsSearchHighlight;
});
S2.define('select2/i18n/en',[],function (){
return {
errorLoading: function (){
return 'The results could not be loaded.';
},
inputTooLong: function (args){
var overChars=args.input.length - args.maximum;
var message='Please delete ' + overChars + ' character';
if(overChars!=1){
message +='s';
}
return message;
},
inputTooShort: function (args){
var remainingChars=args.minimum - args.input.length;
var message='Please enter ' + remainingChars + ' or more characters';
return message;
},
loadingMore: function (){
return 'Loading more results…';
},
maximumSelected: function (args){
var message='You can only select ' + args.maximum + ' item';
if(args.maximum!=1){
message +='s';
}
return message;
},
noResults: function (){
return 'No results found';
},
searching: function (){
return 'Searching…';
},
removeAllItems: function (){
return 'Remove all items';
},
removeItem: function (){
return 'Remove item';
},
search: function(){
return 'Search';
}};});
S2.define('select2/defaults',[
'jquery',
'./results',
'./selection/single',
'./selection/multiple',
'./selection/placeholder',
'./selection/allowClear',
'./selection/search',
'./selection/selectionCss',
'./selection/eventRelay',
'./utils',
'./translation',
'./diacritics',
'./data/select',
'./data/array',
'./data/ajax',
'./data/tags',
'./data/tokenizer',
'./data/minimumInputLength',
'./data/maximumInputLength',
'./data/maximumSelectionLength',
'./dropdown',
'./dropdown/search',
'./dropdown/hidePlaceholder',
'./dropdown/infiniteScroll',
'./dropdown/attachBody',
'./dropdown/minimumResultsForSearch',
'./dropdown/selectOnClose',
'./dropdown/closeOnSelect',
'./dropdown/dropdownCss',
'./dropdown/tagsSearchHighlight',
'./i18n/en'
], function ($,
ResultsList,
SingleSelection, MultipleSelection, Placeholder, AllowClear,
SelectionSearch, SelectionCSS, EventRelay,
Utils, Translation, DIACRITICS,
SelectData, ArrayData, AjaxData, Tags, Tokenizer,
MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
DropdownCSS, TagsSearchHighlight,
EnglishTranslation){
function Defaults (){
this.reset();
}
Defaults.prototype.apply=function (options){
options=$.extend(true, {}, this.defaults, options);
if(options.dataAdapter==null){
if(options.ajax!=null){
options.dataAdapter=AjaxData;
}else if(options.data!=null){
options.dataAdapter=ArrayData;
}else{
options.dataAdapter=SelectData;
}
if(options.minimumInputLength > 0){
options.dataAdapter=Utils.Decorate(options.dataAdapter,
MinimumInputLength
);
}
if(options.maximumInputLength > 0){
options.dataAdapter=Utils.Decorate(options.dataAdapter,
MaximumInputLength
);
}
if(options.maximumSelectionLength > 0){
options.dataAdapter=Utils.Decorate(options.dataAdapter,
MaximumSelectionLength
);
}
if(options.tags){
options.dataAdapter=Utils.Decorate(options.dataAdapter, Tags);
}
if(options.tokenSeparators!=null||options.tokenizer!=null){
options.dataAdapter=Utils.Decorate(options.dataAdapter,
Tokenizer
);
}}
if(options.resultsAdapter==null){
options.resultsAdapter=ResultsList;
if(options.ajax!=null){
options.resultsAdapter=Utils.Decorate(options.resultsAdapter,
InfiniteScroll
);
}
if(options.placeholder!=null){
options.resultsAdapter=Utils.Decorate(options.resultsAdapter,
HidePlaceholder
);
}
if(options.selectOnClose){
options.resultsAdapter=Utils.Decorate(options.resultsAdapter,
SelectOnClose
);
}
if(options.tags){
options.resultsAdapter=Utils.Decorate(options.resultsAdapter,
TagsSearchHighlight
);
}}
if(options.dropdownAdapter==null){
if(options.multiple){
options.dropdownAdapter=Dropdown;
}else{
var SearchableDropdown=Utils.Decorate(Dropdown, DropdownSearch);
options.dropdownAdapter=SearchableDropdown;
}
if(options.minimumResultsForSearch!==0){
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,
MinimumResultsForSearch
);
}
if(options.closeOnSelect){
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,
CloseOnSelect
);
}
if(options.dropdownCssClass!=null){
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,
DropdownCSS
);
}
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,
AttachBody
);
}
if(options.selectionAdapter==null){
if(options.multiple){
options.selectionAdapter=MultipleSelection;
}else{
options.selectionAdapter=SingleSelection;
}
if(options.placeholder!=null){
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
Placeholder
);
}
if(options.allowClear){
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
AllowClear
);
}
if(options.multiple){
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
SelectionSearch
);
}
if(options.selectionCssClass!=null){
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
SelectionCSS
);
}
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
EventRelay
);
}
options.language=this._resolveLanguage(options.language);
options.language.push('en');
var uniqueLanguages=[];
for (var l=0; l < options.language.length; l++){
var language=options.language[l];
if(uniqueLanguages.indexOf(language)===-1){
uniqueLanguages.push(language);
}}
options.language=uniqueLanguages;
options.translations=this._processTranslations(options.language,
options.debug
);
return options;
};
Defaults.prototype.reset=function (){
function stripDiacritics (text){
function match(a){
return DIACRITICS[a]||a;
}
return text.replace(/[^\u0000-\u007E]/g, match);
}
function matcher (params, data){
if(params.term==null||params.term.trim()===''){
return data;
}
if(data.children&&data.children.length > 0){
var match=$.extend(true, {}, data);
for (var c=data.children.length - 1; c >=0; c--){
var child=data.children[c];
var matches=matcher(params, child);
if(matches==null){
match.children.splice(c, 1);
}}
if(match.children.length > 0){
return match;
}
return matcher(params, match);
}
var original=stripDiacritics(data.text).toUpperCase();
var term=stripDiacritics(params.term).toUpperCase();
if(original.indexOf(term) > -1){
return data;
}
return null;
}
this.defaults={
amdLanguageBase: './i18n/',
autocomplete: 'off',
closeOnSelect: true,
debug: false,
dropdownAutoWidth: false,
escapeMarkup: Utils.escapeMarkup,
language: {},
matcher: matcher,
minimumInputLength: 0,
maximumInputLength: 0,
maximumSelectionLength: 0,
minimumResultsForSearch: 0,
selectOnClose: false,
scrollAfterSelect: false,
sorter: function (data){
return data;
},
templateResult: function (result){
return result.text;
},
templateSelection: function (selection){
return selection.text;
},
theme: 'default',
width: 'resolve'
};};
Defaults.prototype.applyFromElement=function (options, $element){
var optionLanguage=options.language;
var defaultLanguage=this.defaults.language;
var elementLanguage=$element.prop('lang');
var parentLanguage=$element.closest('[lang]').prop('lang');
var languages=Array.prototype.concat.call(this._resolveLanguage(elementLanguage),
this._resolveLanguage(optionLanguage),
this._resolveLanguage(defaultLanguage),
this._resolveLanguage(parentLanguage)
);
options.language=languages;
return options;
};
Defaults.prototype._resolveLanguage=function (language){
if(!language){
return [];
}
if($.isEmptyObject(language)){
return [];
}
if($.isPlainObject(language)){
return [language];
}
var languages;
if(!Array.isArray(language)){
languages=[language];
}else{
languages=language;
}
var resolvedLanguages=[];
for (var l=0; l < languages.length; l++){
resolvedLanguages.push(languages[l]);
if(typeof languages[l]==='string'&&languages[l].indexOf('-') > 0){
var languageParts=languages[l].split('-');
var baseLanguage=languageParts[0];
resolvedLanguages.push(baseLanguage);
}}
return resolvedLanguages;
};
Defaults.prototype._processTranslations=function (languages, debug){
var translations=new Translation();
for (var l=0; l < languages.length; l++){
var languageData=new Translation();
var language=languages[l];
if(typeof language==='string'){
try {
languageData=Translation.loadPath(language);
} catch (e){
try {
language=this.defaults.amdLanguageBase + language;
languageData=Translation.loadPath(language);
} catch (ex){
if(debug&&window.console&&console.warn){
console.warn('Select2: The language file for "' + language + '" could ' +
'not be automatically loaded. A fallback will be used instead.'
);
}}
}}else if($.isPlainObject(language)){
languageData=new Translation(language);
}else{
languageData=language;
}
translations.extend(languageData);
}
return translations;
};
Defaults.prototype.set=function (key, value){
var camelKey=$.camelCase(key);
var data={};
data[camelKey]=value;
var convertedData=Utils._convertData(data);
$.extend(true, this.defaults, convertedData);
};
var defaults=new Defaults();
return defaults;
});
S2.define('select2/options',[
'jquery',
'./defaults',
'./utils'
], function ($, Defaults, Utils){
function Options (options, $element){
this.options=options;
if($element!=null){
this.fromElement($element);
}
if($element!=null){
this.options=Defaults.applyFromElement(this.options, $element);
}
this.options=Defaults.apply(this.options);
}
Options.prototype.fromElement=function ($e){
var excludedData=['select2'];
if(this.options.multiple==null){
this.options.multiple=$e.prop('multiple');
}
if(this.options.disabled==null){
this.options.disabled=$e.prop('disabled');
}
if(this.options.autocomplete==null&&$e.prop('autocomplete')){
this.options.autocomplete=$e.prop('autocomplete');
}
if(this.options.dir==null){
if($e.prop('dir')){
this.options.dir=$e.prop('dir');
}else if($e.closest('[dir]').prop('dir')){
this.options.dir=$e.closest('[dir]').prop('dir');
}else{
this.options.dir='ltr';
}}
$e.prop('disabled', this.options.disabled);
$e.prop('multiple', this.options.multiple);
if(Utils.GetData($e[0], 'select2Tags')){
if(this.options.debug&&window.console&&console.warn){
console.warn('Select2: The `data-select2-tags` attribute has been changed to ' +
'use the `data-data` and `data-tags="true"` attributes and will be ' +
'removed in future versions of Select2.'
);
}
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
Utils.StoreData($e[0], 'tags', true);
}
if(Utils.GetData($e[0], 'ajaxUrl')){
if(this.options.debug&&window.console&&console.warn){
console.warn('Select2: The `data-ajax-url` attribute has been changed to ' +
'`data-ajax--url` and support for the old attribute will be removed' +
' in future versions of Select2.'
);
}
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
}
var dataset={};
function upperCaseLetter(_, letter){
return letter.toUpperCase();
}
for (var attr=0; attr < $e[0].attributes.length; attr++){
var attributeName=$e[0].attributes[attr].name;
var prefix='data-';
if(attributeName.substr(0, prefix.length)==prefix){
var dataName=attributeName.substring(prefix.length);
var dataValue=Utils.GetData($e[0], dataName);
var camelDataName=dataName.replace(/-([a-z])/g, upperCaseLetter);
dataset[camelDataName]=dataValue;
}}
if($.fn.jquery&&$.fn.jquery.substr(0, 2)=='1.'&&$e[0].dataset){
dataset=$.extend(true, {}, $e[0].dataset, dataset);
}
var data=$.extend(true, {}, Utils.GetData($e[0]), dataset);
data=Utils._convertData(data);
for (var key in data){
if(excludedData.indexOf(key) > -1){
continue;
}
if($.isPlainObject(this.options[key])){
$.extend(this.options[key], data[key]);
}else{
this.options[key]=data[key];
}}
return this;
};
Options.prototype.get=function (key){
return this.options[key];
};
Options.prototype.set=function (key, val){
this.options[key]=val;
};
return Options;
});
S2.define('select2/core',[
'jquery',
'./options',
'./utils',
'./keys'
], function ($, Options, Utils, KEYS){
var Select2=function ($element, options){
if(Utils.GetData($element[0], 'select2')!=null){
Utils.GetData($element[0], 'select2').destroy();
}
this.$element=$element;
this.id=this._generateId($element);
options=options||{};
this.options=new Options(options, $element);
Select2.__super__.constructor.call(this);
var tabindex=$element.attr('tabindex')||0;
Utils.StoreData($element[0], 'old-tabindex', tabindex);
$element.attr('tabindex', '-1');
var DataAdapter=this.options.get('dataAdapter');
this.dataAdapter=new DataAdapter($element, this.options);
var $container=this.render();
this._placeContainer($container);
var SelectionAdapter=this.options.get('selectionAdapter');
this.selection=new SelectionAdapter($element, this.options);
this.$selection=this.selection.render();
this.selection.position(this.$selection, $container);
var DropdownAdapter=this.options.get('dropdownAdapter');
this.dropdown=new DropdownAdapter($element, this.options);
this.$dropdown=this.dropdown.render();
this.dropdown.position(this.$dropdown, $container);
var ResultsAdapter=this.options.get('resultsAdapter');
this.results=new ResultsAdapter($element, this.options, this.dataAdapter);
this.$results=this.results.render();
this.results.position(this.$results, this.$dropdown);
var self=this;
this._bindAdapters();
this._registerDomEvents();
this._registerDataEvents();
this._registerSelectionEvents();
this._registerDropdownEvents();
this._registerResultsEvents();
this._registerEvents();
this.dataAdapter.current(function (initialData){
self.trigger('selection:update', {
data: initialData
});
});
$element[0].classList.add('select2-hidden-accessible');
$element.attr('aria-hidden', 'true');
this._syncAttributes();
Utils.StoreData($element[0], 'select2', this);
$element.data('select2', this);
};
Utils.Extend(Select2, Utils.Observable);
Select2.prototype._generateId=function ($element){
var id='';
if($element.attr('id')!=null){
id=$element.attr('id');
}else if($element.attr('name')!=null){
id=$element.attr('name') + '-' + Utils.generateChars(2);
}else{
id=Utils.generateChars(4);
}
id=id.replace(/(:|\.|\[|\]|,)/g, '');
id='select2-' + id;
return id;
};
Select2.prototype._placeContainer=function ($container){
$container.insertAfter(this.$element);
var width=this._resolveWidth(this.$element, this.options.get('width'));
if(width!=null){
$container.css('width', width);
}};
Select2.prototype._resolveWidth=function ($element, method){
var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
if(method=='resolve'){
var styleWidth=this._resolveWidth($element, 'style');
if(styleWidth!=null){
return styleWidth;
}
return this._resolveWidth($element, 'element');
}
if(method=='element'){
var elementWidth=$element.outerWidth(false);
if(elementWidth <=0){
return 'auto';
}
return elementWidth + 'px';
}
if(method=='style'){
var style=$element.attr('style');
if(typeof(style)!=='string'){
return null;
}
var attrs=style.split(';');
for (var i=0, l=attrs.length; i < l; i=i + 1){
var attr=attrs[i].replace(/\s/g, '');
var matches=attr.match(WIDTH);
if(matches!==null&&matches.length >=1){
return matches[1];
}}
return null;
}
if(method=='computedstyle'){
var computedStyle=window.getComputedStyle($element[0]);
return computedStyle.width;
}
return method;
};
Select2.prototype._bindAdapters=function (){
this.dataAdapter.bind(this, this.$container);
this.selection.bind(this, this.$container);
this.dropdown.bind(this, this.$container);
this.results.bind(this, this.$container);
};
Select2.prototype._registerDomEvents=function (){
var self=this;
this.$element.on('change.select2', function (){
self.dataAdapter.current(function (data){
self.trigger('selection:update', {
data: data
});
});
});
this.$element.on('focus.select2', function (evt){
self.trigger('focus', evt);
});
this._syncA=Utils.bind(this._syncAttributes, this);
this._syncS=Utils.bind(this._syncSubtree, this);
this._observer=new window.MutationObserver(function (mutations){
self._syncA();
self._syncS(mutations);
});
this._observer.observe(this.$element[0], {
attributes: true,
childList: true,
subtree: false
});
};
Select2.prototype._registerDataEvents=function (){
var self=this;
this.dataAdapter.on('*', function (name, params){
self.trigger(name, params);
});
};
Select2.prototype._registerSelectionEvents=function (){
var self=this;
var nonRelayEvents=['toggle', 'focus'];
this.selection.on('toggle', function (){
self.toggleDropdown();
});
this.selection.on('focus', function (params){
self.focus(params);
});
this.selection.on('*', function (name, params){
if(nonRelayEvents.indexOf(name)!==-1){
return;
}
self.trigger(name, params);
});
};
Select2.prototype._registerDropdownEvents=function (){
var self=this;
this.dropdown.on('*', function (name, params){
self.trigger(name, params);
});
};
Select2.prototype._registerResultsEvents=function (){
var self=this;
this.results.on('*', function (name, params){
self.trigger(name, params);
});
};
Select2.prototype._registerEvents=function (){
var self=this;
this.on('open', function (){
self.$container[0].classList.add('select2-container--open');
});
this.on('close', function (){
self.$container[0].classList.remove('select2-container--open');
});
this.on('enable', function (){
self.$container[0].classList.remove('select2-container--disabled');
});
this.on('disable', function (){
self.$container[0].classList.add('select2-container--disabled');
});
this.on('blur', function (){
self.$container[0].classList.remove('select2-container--focus');
});
this.on('query', function (params){
if(!self.isOpen()){
self.trigger('open', {});
}
this.dataAdapter.query(params, function (data){
self.trigger('results:all', {
data: data,
query: params
});
});
});
this.on('query:append', function (params){
this.dataAdapter.query(params, function (data){
self.trigger('results:append', {
data: data,
query: params
});
});
});
this.on('keypress', function (evt){
var key=evt.which;
if(self.isOpen()){
if(key===KEYS.ESC||(key===KEYS.UP&&evt.altKey)){
self.close(evt);
evt.preventDefault();
}else if(key===KEYS.ENTER||key===KEYS.TAB){
self.trigger('results:select', {});
evt.preventDefault();
}else if((key===KEYS.SPACE&&evt.ctrlKey)){
self.trigger('results:toggle', {});
evt.preventDefault();
}else if(key===KEYS.UP){
self.trigger('results:previous', {});
evt.preventDefault();
}else if(key===KEYS.DOWN){
self.trigger('results:next', {});
evt.preventDefault();
}}else{
if(key===KEYS.ENTER||key===KEYS.SPACE ||
(key===KEYS.DOWN&&evt.altKey)){
self.open();
evt.preventDefault();
}}
});
};
Select2.prototype._syncAttributes=function (){
this.options.set('disabled', this.$element.prop('disabled'));
if(this.isDisabled()){
if(this.isOpen()){
this.close();
}
this.trigger('disable', {});
}else{
this.trigger('enable', {});
}};
Select2.prototype._isChangeMutation=function (mutations){
var self=this;
if(mutations.addedNodes&&mutations.addedNodes.length > 0){
for (var n=0; n < mutations.addedNodes.length; n++){
var node=mutations.addedNodes[n];
if(node.selected){
return true;
}}
}else if(mutations.removedNodes&&mutations.removedNodes.length > 0){
return true;
}else if(Array.isArray(mutations)){
return mutations.some(function (mutation){
return self._isChangeMutation(mutation);
});
}
return false;
};
Select2.prototype._syncSubtree=function (mutations){
var changed=this._isChangeMutation(mutations);
var self=this;
if(changed){
this.dataAdapter.current(function (currentData){
self.trigger('selection:update', {
data: currentData
});
});
}};
Select2.prototype.trigger=function (name, args){
var actualTrigger=Select2.__super__.trigger;
var preTriggerMap={
'open': 'opening',
'close': 'closing',
'select': 'selecting',
'unselect': 'unselecting',
'clear': 'clearing'
};
if(args===undefined){
args={};}
if(name in preTriggerMap){
var preTriggerName=preTriggerMap[name];
var preTriggerArgs={
prevented: false,
name: name,
args: args
};
actualTrigger.call(this, preTriggerName, preTriggerArgs);
if(preTriggerArgs.prevented){
args.prevented=true;
return;
}}
actualTrigger.call(this, name, args);
};
Select2.prototype.toggleDropdown=function (){
if(this.isDisabled()){
return;
}
if(this.isOpen()){
this.close();
}else{
this.open();
}};
Select2.prototype.open=function (){
if(this.isOpen()){
return;
}
if(this.isDisabled()){
return;
}
this.trigger('query', {});
};
Select2.prototype.close=function (evt){
if(!this.isOpen()){
return;
}
this.trigger('close', { originalEvent:evt });
};
Select2.prototype.isEnabled=function (){
return !this.isDisabled();
};
Select2.prototype.isDisabled=function (){
return this.options.get('disabled');
};
Select2.prototype.isOpen=function (){
return this.$container[0].classList.contains('select2-container--open');
};
Select2.prototype.hasFocus=function (){
return this.$container[0].classList.contains('select2-container--focus');
};
Select2.prototype.focus=function (data){
if(this.hasFocus()){
return;
}
this.$container[0].classList.add('select2-container--focus');
this.trigger('focus', {});
};
Select2.prototype.enable=function (args){
if(this.options.get('debug')&&window.console&&console.warn){
console.warn('Select2: The `select2("enable")` method has been deprecated and will' +
' be removed in later Select2 versions. Use $element.prop("disabled")' +
' instead.'
);
}
if(args==null||args.length===0){
args=[true];
}
var disabled = !args[0];
this.$element.prop('disabled', disabled);
};
Select2.prototype.data=function (){
if(this.options.get('debug') &&
arguments.length > 0&&window.console&&console.warn){
console.warn('Select2: Data can no longer be set using `select2("data")`. You ' +
'should consider setting the value instead using `$element.val()`.'
);
}
var data=[];
this.dataAdapter.current(function (currentData){
data=currentData;
});
return data;
};
Select2.prototype.val=function (args){
if(this.options.get('debug')&&window.console&&console.warn){
console.warn('Select2: The `select2("val")` method has been deprecated and will be' +
' removed in later Select2 versions. Use $element.val() instead.'
);
}
if(args==null||args.length===0){
return this.$element.val();
}
var newVal=args[0];
if(Array.isArray(newVal)){
newVal=newVal.map(function (obj){
return obj.toString();
});
}
this.$element.val(newVal).trigger('input').trigger('change');
};
Select2.prototype.destroy=function (){
Utils.RemoveData(this.$container[0]);
this.$container.remove();
this._observer.disconnect();
this._observer=null;
this._syncA=null;
this._syncS=null;
this.$element.off('.select2');
this.$element.attr('tabindex',
Utils.GetData(this.$element[0], 'old-tabindex'));
this.$element[0].classList.remove('select2-hidden-accessible');
this.$element.attr('aria-hidden', 'false');
Utils.RemoveData(this.$element[0]);
this.$element.removeData('select2');
this.dataAdapter.destroy();
this.selection.destroy();
this.dropdown.destroy();
this.results.destroy();
this.dataAdapter=null;
this.selection=null;
this.dropdown=null;
this.results=null;
};
Select2.prototype.render=function (){
var $container=$(
'<span class="select2 select2-container">' +
'<span class="selection"></span>' +
'<span class="dropdown-wrapper" aria-hidden="true"></span>' +
'</span>'
);
$container.attr('dir', this.options.get('dir'));
this.$container=$container;
this.$container[0].classList
.add('select2-container--' + this.options.get('theme'));
Utils.StoreData($container[0], 'element', this.$element);
return $container;
};
return Select2;
});
S2.define('jquery-mousewheel',[
'jquery'
], function ($){
return $;
});
S2.define('jquery.select2',[
'jquery',
'jquery-mousewheel',
'./select2/core',
'./select2/defaults',
'./select2/utils'
], function ($, _, Select2, Defaults, Utils){
if($.fn.select2==null){
var thisMethods=['open', 'close', 'destroy'];
$.fn.select2=function (options){
options=options||{};
if(typeof options==='object'){
this.each(function (){
var instanceOptions=$.extend(true, {}, options);
var instance=new Select2($(this), instanceOptions);
});
return this;
}else if(typeof options==='string'){
var ret;
var args=Array.prototype.slice.call(arguments, 1);
this.each(function (){
var instance=Utils.GetData(this, 'select2');
if(instance==null&&window.console&&console.error){
console.error('The select2(\'' + options + '\') method was called on an ' +
'element that is not using Select2.'
);
}
ret=instance[options].apply(instance, args);
});
if(thisMethods.indexOf(options) > -1){
return this;
}
return ret;
}else{
throw new Error('Invalid arguments for Select2: ' + options);
}};}
if($.fn.select2.defaults==null){
$.fn.select2.defaults=Defaults;
}
return Select2;
});
return {
define: S2.define,
require: S2.require
};}());
var select2=S2.require('jquery.select2');
jQuery.fn.select2.amd=S2;
return select2;
}));
jQuery(document).ready(function(){
jQuery(".uacf7_post_taxonomy").select2();
if(typeof tinyMCE!=='undefined'&&tinyMCE.get('uacf7_post_content')){
tinymce.get('uacf7_post_content').on('keyup input blur click paste',function(e){
var tiny=tinyMCE.get('uacf7_post_content').getContent();
if(jQuery('#uacf7_post_content').length > 0&&typeof tiny==='string'){
jQuery('#uacf7_post_content').val(tiny);
}});
}});
jQuery(document).ready(function($){
$(document).on('click', '.uacf7-preview-btn', function(e){
e.preventDefault();
var form=$(this).closest('form');
var formData='';
var processedFieldNames=[];
formData +='<table border="1" style="width: 100%; margin-top: 10px;">';
formData +='<thead><tr><th>Label</th><th>Value</th></tr></thead><tbody>';
form.find('input:not([type="hidden"]:not(#uacf7-amount)), textarea, select').each(function(){
var field=$(this);
var fieldId=field.attr('id');
var label='';
if(fieldId){
label=$('label[for="' + fieldId + '"]').text();
}
if(!label&&field.attr('type')!=='submit'){
if(field.is(':checkbox')||field.is(':radio')){
label=$(this).closest('.wpcf7-form-control-wrap').parent('label').clone().children().remove().end().text().trim()||field.attr('name')||field.attr('id');
label=label.replace('[]', '');
}else{
label=$(this).closest('label').clone().children().remove().end().text().trim()||field.attr('name')||field.attr('id');
}}
fieldValue=escapeHtml(field.val());
if(field.closest('.quicktags-toolbar').length > 0){
return true;
}
if(field.closest('label').find('canvas').length){
var canvas=field.closest('label').find('canvas')[0];
if(canvas&&canvas.toDataURL){
var canvasData=canvas.toDataURL();
fieldValue='<img src="' + canvasData + '" alt="' + escapeHtml("Signature") + '" style="max-width: 300px; max-height: 100px;">';
}}
if(field.hasClass('flatpickr-monthDropdown-months')||field.hasClass('cur-year')){
return true;
}
if(field.attr('type')==='radio'&&field.closest('.wpcf7-form-control').hasClass('uacf7-rating')){
var selectedRating=0;
var ratingHtml='';
var fieldName=field.attr('name');
if(processedFieldNames.indexOf(fieldName)===-1){
field.closest('.wpcf7-form-control').find('input[type="radio"]:checked').each(function(){
var value=$(this).val();
if(parseInt(value) > selectedRating){
selectedRating=parseInt(value);
}});
for (var i=1; i <=5; i++){
ratingHtml +='<span class="icon">'+ $(this).siblings('span').html() +'</span>';
if(i===selectedRating) break;
}
fieldValue=ratingHtml;
processedFieldNames.push(fieldName);
}else{
return true;
}}
if(field.is(':checkbox')){
if(field.prop('checked')){
var fieldName=field.attr('name').replace('[]', '');
if(true){
var selectedValues=[];
var checkboxValue=$(this).val();
selectedValues.push(escapeHtml(checkboxValue));
fieldValue=selectedValues.join(', ');
processedFieldNames.push(fieldName);
}else{
return true;
}}else{
return true;
}}
if(field.is(':radio')&&!field.closest('.wpcf7-form-control').hasClass('uacf7-rating')){
if(field.prop('checked')){
var fieldName=field.attr('name');
if(processedFieldNames.indexOf(fieldName)===-1){
var selectedRadio=field.filter(':checked').val();
fieldValue=escapeHtml(selectedRadio);
processedFieldNames.push(fieldName);
}else{
return true;
}}else{
return true;
}}
if(fieldValue!==undefined&&fieldValue!==""&&field.attr('type')!=='submit'){
formData +='<tr><td>' + escapeHtml(label) + '</td><td>' + fieldValue + '</td></tr>';
}});
formData +='</tbody></table>';
let formType=$('#uacf7-conversational-form').attr('form-type');
let previewSubmitBtn='<button class="uacf7-submit-btn">Submit <i class="far fa-paper-plane"></i></button>';
if(formType==='uacf7-conversational'){
previewSubmitBtn='';
}
var modalHTML='<div class="uacf7-preview-modal">' +
'<div class="uacf7-preview-modal-content">' +
'<span class="uacf7-close-btn">&times;</span>' +
'<h2>Form Preview</h2>' +
formData +
'<div class="uacf7-modal-buttons">' +
'<button class="uacf7-back-btn"><i class="fas fa-undo"></i> Back</button>' + previewSubmitBtn +
'</div>' +
'</div>' +
'</div>';
$('body').append(modalHTML);
$('.uacf7-preview-modal').fadeIn();
$('.uacf7-close-btn, .uacf7-back-btn').on('click', function(){
$('.uacf7-preview-modal').fadeOut(function(){
$(this).remove();
});
});
$('.uacf7-submit-btn').on('click', function(){
form.find('.wpcf7-submit').click();
$('.uacf7-preview-modal').fadeOut(function(){
$(this).remove();
});
});
function escapeHtml(unsafe){
return unsafe
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
$(window).on('click', function(event){
if($(event.target).hasClass('uacf7-preview-modal')){
$('.uacf7-preview-modal').fadeOut(function(){
$(this).remove();
});
}});
});
});
jQuery(document).ready(function (){
jQuery('.wpcf7-form input[type="range"], .wpcf7-form input.wpcf7-uacf7_country_dropdown').on('input', function (){
var $this=jQuery(this);
uacf7_cf_pro_handler($this);
});
jQuery('.wpcf7-form input.wpcf7-uacf7_city, .wpcf7-form input.wpcf7-uacf7_state, .wpcf7-form input.wpcf7-uacf7_zip').on('keyup', function (){
var $this=jQuery(this);
uacf7_cf_pro_handler($this);
});
jQuery('.wpcf7-form input.wpcf7-uacf7_country_dropdown').on('change paste keydown keyup blur', function (){
var $this=jQuery(this);
uacf7_cf_pro_handler($this);
});
jQuery('#uacf7-slider-range, #range_slider').on('click', function (){
var $this=jQuery(this);
uacf7_cf_pro_handler($this);
});
jQuery('.wpcf7-form .uacf7-rating input[type="radio"]').on('change', function (){
var $this=jQuery(this);
uacf7_cf_pro_handler($this);
});
jQuery('.wpcf7-form select.wpcf7-uacf7_product_dropdown').on('change', function (){
var $this=jQuery(this);
uacf7_cf_pro_handler($this);
});
jQuery(document).on('input', '.uacf7-slider.uacf7-range', function (){
jQuery(this).trigger('keyup');
})
jQuery(document).on('click', '.uacf7-icon', function (){
jQuery(this).parent().find('input').trigger('keyup');
});
function uacf7_skip_cf_pro_validation(){
jQuery('form.wpcf7-form').each(function (){
var $form=jQuery(this);
var hidden_fields=[];
jQuery('.uacf7_conditional', $form).each(function (){
var $this=jQuery(this);
if($this.hasClass('uacf7-hidden')){
$this.find('input,select,textarea').each(function (){
hidden_fields.push(jQuery(this).attr('name'));
});
}});
$form.find('[name="_uacf7_hidden_conditional_fields"]').val(JSON.stringify(hidden_fields));
$form.on('submit', function (){
uacf7_skip_cf_pro_validation();
});
});
}
function uacf7_cf_pro_handler($this){
jQuery('form.wpcf7-form').each(function (){
var contactFormId=jQuery('input[name="_wpcf7"]', this).val();
var repeater_count=jQuery('.uacf7-repeater-count', this).val();
var form=uacf7_cf_object[contactFormId];
if(typeof repeater_count==='undefined'){
var repeater_weapper='.uacf7_conditional';
}else{
if($this==false){
var repeater_weapper='.uacf7_conditional';
}else{
if(typeof $this.attr('uacf-original-name')==='undefined'||$this.attr('uacf-original-name').length==0){
var repeater_weapper='.uacf7_conditional';
}else{
var repeater_weapper=$this.closest('.uacf7_repeater_sub_field');
}}
}
var $i=0;
var tag_name_array=[];
var count=0;
var count_2=0;
jQuery(form).each(function (){
var $uacf7_cf_conditions=form[count_2]['uacf7_cf_conditions'];
var $conditionsLength=$uacf7_cf_conditions['uacf7_cf_tn'].length;
var x;
if(typeof repeater_count!=='undefined'){
for (x=0; x < $conditionsLength; x++){
tag_name_array.push($uacf7_cf_conditions['uacf7_cf_tn'][x]);
count++;
}}
count_2++
});
if(typeof repeater_count!=='undefined'){
if($this!=false){
if(typeof $this.attr('uacf-original-name')!=='undefined'){
if(jQuery.inArray($this.attr('uacf-original-name'), tag_name_array)==-1){
return false;
}}
}}
jQuery(form).each(function (){
var $uacf7_cf_conditions=form[$i]['uacf7_cf_conditions'];
var $conditionsLength=$uacf7_cf_conditions['uacf7_cf_tn'].length;
if($conditionsLength > 0&&form[$i]['uacf7_cf_group']!=''){ 
var vaL=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'] + '"]').val();
if(jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'] + '"]').is("input[type='radio']")){
var vaL=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'] + '"]:checked').val();
}
if(form[$i]['uacf7_cf_hs']=='show'){ 
if(typeof repeater_count==='undefined'){
jQuery('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '').hide().addClass('uacf7-hidden');
}else{
if($this==false){
jQuery('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '').hide().addClass('uacf7-hidden');
}else{
if(typeof $this.attr('uacf-original-name')==='undefined'||$this.attr('uacf-original-name').length==0){
jQuery('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '').hide().addClass('uacf7-hidden');
}else{
$this.closest('.uacf7_repeater_sub_field').find('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '').hide().addClass('uacf7-hidden');
}}
}}
var $conditionRule='';
var x;
var $conditions=[];
for (x=0; x < $conditionsLength; x++){
var $tag_name=$uacf7_cf_conditions['uacf7_cf_tn'][x];
if(typeof $tag_name==='undefined'){
var $tag_name=$uacf7_cf_conditions['uacf7_cf_tn'][x];
}
if($tag_name==$uacf7_cf_conditions['uacf7_cf_tn'][x]){
var maybeChecked='';
var maybeMultiple='';
if(jQuery('.wpcf7-form [name="' + $tag_name + '"]').is("input[type='radio']")){
var maybeChecked=':checked';
}
var checkedItem='';
if(jQuery('.wpcf7-form [name="' + $tag_name + '"]').is("input[type='checkbox']")){
var maybeChecked=':checked';
var maybeMultiple='[]';
var checked_values=[];
jQuery('.wpcf7-form [name="' + $tag_name + '"]:checked').each(function (){
checked_values.push(jQuery(this).val());
});
var index=checked_values.indexOf($uacf7_cf_conditions['uacf7_cf_val'][x]);
var checkedItem=checked_values[index];
}
var tagName=$tag_name.replace('[]', '');
if(jQuery('.wpcf7-form [uacf-original-name="' + $tag_name + '"]').is("input[type='checkbox']")||jQuery('.wpcf7-form [uacf-original-name="' + $tag_name + '"]').is("input[type='radio']")){
var maybeChecked=':checked';
var maybeMultiple='[]';
var checked_values=[];
jQuery('.wpcf7-form-control-wrap.' + tagName + ' input:checked').each(function (){
checked_values.push(jQuery(this).val());
});
var index=checked_values.indexOf($uacf7_cf_conditions['uacf7_cf_val'][x]);
var checkedItem=checked_values[index];
}
if(typeof repeater_count==='undefined'){
var currentValue=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]' + maybeChecked + '').val();
}else{
var current_field=jQuery('.wpcf7-form [uacf-original-name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]');
if($this==false){
if(typeof current_field==='undefined'){
var current_field=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]');
}else{
var currentValue=jQuery('.wpcf7-form [uacf-original-name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]' + maybeChecked + '').val();
}}else{
if(typeof current_field==='undefined'||current_field.length==0){
var currentValue=jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]' + maybeChecked + '').val();
}else{
var currentValue=repeater_weapper.find('[uacf-original-name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]' + maybeChecked + '').val();
}}
}
if(jQuery('.wpcf7-form [name="' + $uacf7_cf_conditions['uacf7_cf_tn'][x] + '"]').is("input[type='checkbox']")){
if(typeof checkedItem==='undefined'){
var currentValue='';
}else{
var currentValue=checkedItem;
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='equal'){
if(currentValue==$uacf7_cf_conditions['uacf7_cf_val'][x]){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='not_equal'){
if(currentValue!=$uacf7_cf_conditions['uacf7_cf_val'][x]){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='greater_than'){
if(parseInt(currentValue) > parseInt($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='less_than'){
if(parseInt(currentValue) < parseInt($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='greater_than_or_equal_to'){
if(parseInt(currentValue) >=parseInt($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='less_than_or_equal_to'){
if(parseInt(currentValue) <=parseInt($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='starts_with'){
if(currentValue.startsWith($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='ends_with'){
if(currentValue.endsWith($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='contains'){
if(currentValue.includes($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
if($uacf7_cf_conditions['uacf7_cf_operator'][x]=='does_not_contain'){
if(!currentValue.includes($uacf7_cf_conditions['uacf7_cf_val'][x])){
$conditions.push('true');
}else{
$conditions.push('false');
}}
}}
if(typeof repeater_count==='undefined'){
var $this_condition=jQuery(repeater_weapper + '.' + form[$i]['uacf7_cf_group'] + '');
}else{
if($this==false){
var $this_condition=jQuery('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '');
}else{
if(typeof $this.attr('uacf-original-name')==='undefined'||$this.attr('uacf-original-name').length==0){
var $this_condition=jQuery(repeater_weapper + '.' + form[$i]['uacf7_cf_group'] + '');
}else{
var $this_condition=repeater_weapper.find('.uacf7_conditional.' + form[$i]['uacf7_cf_group'] + '');
}}
}
if(form[$i]['uacf_cf_condition_for']==='all'){
var equalResult=$conditions.indexOf("false");
if(form[$i]['uacf7_cf_hs']=='show'){
if(equalResult==-1){
$this_condition.show().removeClass('uacf7-hidden');
}else{
$this_condition.hide().addClass('uacf7-hidden');
}}else{
if(equalResult==-1){
$this_condition.hide().addClass('uacf7-hidden');
}else{
$this_condition.show().removeClass('uacf7-hidden');
}}
}else{
var orResult=$conditions.indexOf("true");
if(form[$i]['uacf7_cf_hs']=='show'){
if(orResult!=-1){
$this_condition.show().removeClass('uacf7-hidden');
}else{
$this_condition.hide().addClass('uacf7-hidden');
}}else{
if(orResult==-1){
$this_condition.show().removeClass('uacf7-hidden');
}else{
$this_condition.hide().addClass('uacf7-hidden');
}}
}}
$i++;
});
});
uacf7_skip_cf_pro_validation();
}});
(()=>{"use strict";var e,r,_,t,a,n={},i={};function __webpack_require__(e){var r=i[e];if(void 0!==r)return r.exports;var _=i[e]={exports:{}};return n[e].call(_.exports,_,_.exports,__webpack_require__),_.exports}__webpack_require__.m=n,e=[],__webpack_require__.O=(r,_,t,a)=>{if(!_){var n=1/0;for(b=0;b<e.length;b++){for(var[_,t,a]=e[b],i=!0,c=0;c<_.length;c++)(!1&a||n>=a)&&Object.keys(__webpack_require__.O).every(e=>__webpack_require__.O[e](_[c]))?_.splice(c--,1):(i=!1,a<n&&(n=a));if(i){e.splice(b--,1);var o=t();void 0!==o&&(r=o)}}return r}a=a||0;for(var b=e.length;b>0&&e[b-1][2]>a;b--)e[b]=e[b-1];e[b]=[_,t,a]},_=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var a=Object.create(null);__webpack_require__.r(a);var n={};r=r||[null,_({}),_([]),_(_)];for(var i=2&t&&e;("object"==typeof i||"function"==typeof i)&&!~r.indexOf(i);i=_(i))Object.getOwnPropertyNames(i).forEach(r=>n[r]=()=>e[r]);return n.default=()=>e,__webpack_require__.d(a,n),a},__webpack_require__.d=(e,r)=>{for(var _ in r)__webpack_require__.o(r,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:r[_]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((r,_)=>(__webpack_require__.f[_](e,r),r),[])),__webpack_require__.u=e=>786===e?"397f2d183c19202777d6.bundle.min.js":216===e?"lightbox.570c05c5a283cfb6b223.bundle.min.js":30===e?"text-path.a67c1f3a78d208bc7e1b.bundle.min.js":131===e?"accordion.8b0db5058afeb74622f5.bundle.min.js":707===e?"alert.42cc1d522ef5c60bf874.bundle.min.js":457===e?"counter.12335f45aaa79d244f24.bundle.min.js":234===e?"progress.0ea083b809812c0e3aa1.bundle.min.js":575===e?"tabs.18344b05d8d1ea0702bc.bundle.min.js":775===e?"toggle.2a177a3ef4785d3dfbc5.bundle.min.js":180===e?"video.86d44e46e43d0807e708.bundle.min.js":177===e?"image-carousel.6167d20b95b33386757b.bundle.min.js":212===e?"text-editor.45609661e409413f1cef.bundle.min.js":211===e?"wp-audio.c9624cb6e5dc9de86abd.bundle.min.js":215===e?"nested-tabs.a2401356d329f179475e.bundle.min.js":915===e?"nested-accordion.294d40984397351fd0f5.bundle.min.js":1===e?"contact-buttons.e98d0220ce8c38404e7e.bundle.min.js":336===e?"floating-bars.740d06d17cea5cebdb61.bundle.min.js":557===e?"shared-frontend-handlers.03caa53373b56d3bab67.bundle.min.js":396===e?"shared-editor-handlers.cacdcbed391abf4b48b0.bundle.min.js":768===e?"container-editor-handlers.a2e8e48d28c5544fb183.bundle.min.js":77===e?"section-frontend-handlers.d85ab872da118940910d.bundle.min.js":220===e?"section-editor-handlers.53ffedef32043348b99b.bundle.min.js":304===e?"nested-title-keyboard-handler.2a67d3cc630e11815acc.bundle.min.js":void 0,__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},a="elementorFrontend:",__webpack_require__.l=(e,r,_,n)=>{if(t[e])t[e].push(r);else{var i,c;if(void 0!==_)for(var o=document.getElementsByTagName("script"),b=0;b<o.length;b++){var u=o[b];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==a+_){i=u;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",a+_),i.src=e),t[e]=[r];var onScriptComplete=(r,_)=>{i.onerror=i.onload=null,clearTimeout(d);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(_)),r)return r(_)},d=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=onScriptComplete.bind(null,i.onerror),i.onload=onScriptComplete.bind(null,i.onload),c&&document.head.appendChild(i)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var r=__webpack_require__.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var _=r.getElementsByTagName("script");if(_.length)for(var t=_.length-1;t>-1&&(!e||!/^http(s?):/.test(e));)e=_[t--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={76:0};__webpack_require__.f.j=(r,_)=>{var t=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==t)if(t)_.push(t[2]);else if(76!=r){var a=new Promise((_,a)=>t=e[r]=[_,a]);_.push(t[2]=a);var n=__webpack_require__.p+__webpack_require__.u(r),i=new Error;__webpack_require__.l(n,_=>{if(__webpack_require__.o(e,r)&&(0!==(t=e[r])&&(e[r]=void 0),t)){var a=_&&("load"===_.type?"missing":_.type),n=_&&_.target&&_.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+n+")",i.name="ChunkLoadError",i.type=a,i.request=n,t[1](i)}},"chunk-"+r,r)}else e[r]=0},__webpack_require__.O.j=r=>0===e[r];var webpackJsonpCallback=(r,_)=>{var t,a,[n,i,c]=_,o=0;if(n.some(r=>0!==e[r])){for(t in i)__webpack_require__.o(i,t)&&(__webpack_require__.m[t]=i[t]);if(c)var b=c(__webpack_require__)}for(r&&r(_);o<n.length;o++)a=n[o],__webpack_require__.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return __webpack_require__.O(b)},r=self.webpackChunkelementorFrontend=self.webpackChunkelementorFrontend||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))})()})();
(self.webpackChunkelementorFrontend=self.webpackChunkelementorFrontend||[]).push([[941],{1:(e,t,r)=>{"use strict";var n=r(5578),i=r(7255),s=r(5755),o=r(1866),a=r(6029),c=r(5022),l=n.Symbol,u=i("wks"),p=c?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return s(u,e)||(u[e]=a&&s(l,e)?l[e]:p("Symbol."+e)),u[e]}},41:e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},169:(e,t,r)=>{"use strict";var n=r(4762),i=r(8473),s=r(1483),o=r(5755),a=r(382),c=r(2048).CONFIGURABLE,l=r(7268),u=r(4483),p=u.enforce,d=u.get,h=String,f=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),y=a&&!i(function(){return 8!==f(function(){},"length",{value:8}).length}),w=String(String).split("String"),b=e.exports=function(e,t,r){"Symbol("===g(h(t),0,7)&&(t="["+m(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!o(e,"name")||c&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&o(r,"arity")&&e.length!==r.arity&&f(e,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=p(e);return o(n,"source")||(n.source=v(w,"string"==typeof t?t:"")),e};Function.prototype.toString=b(function toString(){return s(this)&&d(this).source||l(this)},"toString")},274:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},348:(e,t,r)=>{"use strict";var n=r(1807),i=r(1483),s=r(1704),o=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&i(r=e.toString)&&!s(a=n(r,e)))return a;if(i(r=e.valueOf)&&!s(a=n(r,e)))return a;if("string"!==t&&i(r=e.toString)&&!s(a=n(r,e)))return a;throw new o("Can't convert object to primitive value")}},382:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},641:(e,t,r)=>{"use strict";r(5724),r(4846),r(7458),r(9655);const Module=function(){const e=jQuery,t=arguments,r=this,n={};let i;this.getItems=function(e,t){if(t){const r=t.split("."),n=r.splice(0,1);if(!r.length)return e[n];if(!e[n])return;return this.getItems(e[n],r.join("."))}return e},this.getSettings=function(e){return this.getItems(i,e)},this.setSettings=function(t,n,s){if(s||(s=i),"object"==typeof t)return e.extend(s,t),r;const o=t.split("."),a=o.splice(0,1);return o.length?(s[a]||(s[a]={}),r.setSettings(o.join("."),n,s[a])):(s[a]=n,r)},this.getErrorMessage=function(e,t){let r;if("forceMethodImplementation"===e)r=`The method '${t}' must to be implemented in the inheritor child.`;else r="An error occurs";return r},this.forceMethodImplementation=function(e){throw new Error(this.getErrorMessage("forceMethodImplementation",e))},this.on=function(t,i){if("object"==typeof t)return e.each(t,function(e){r.on(e,this)}),r;return t.split(" ").forEach(function(e){n[e]||(n[e]=[]),n[e].push(i)}),r},this.off=function(e,t){if(!n[e])return r;if(!t)return delete n[e],r;const i=n[e].indexOf(t);return-1!==i&&(delete n[e][i],n[e]=n[e].filter(e=>e)),r},this.trigger=function(t){const i="on"+t[0].toUpperCase()+t.slice(1),s=Array.prototype.slice.call(arguments,1);r[i]&&r[i].apply(r,s);const o=n[t];return o?(e.each(o,function(e,t){t.apply(r,s)}),r):r},r.__construct.apply(r,t),e.each(r,function(e){const t=r[e];"function"==typeof t&&(r[e]=function(){return t.apply(r,arguments)})}),function(){i=r.getDefaultSettings();const n=t[0];n&&e.extend(!0,i,n)}(),r.trigger("init")};Module.prototype.__construct=function(){},Module.prototype.getDefaultSettings=function(){return{}},Module.prototype.getConstructorID=function(){return this.constructor.name},Module.extend=function(e){const t=jQuery,r=this,child=function(){return r.apply(this,arguments)};return t.extend(child,r),(child.prototype=Object.create(t.extend({},r.prototype,e))).constructor=child,child.__super__=r.prototype,child},e.exports=Module},670:(e,t,r)=>{"use strict";var n=r(382),i=r(5835),s=r(7738);e.exports=function(e,t,r){n?i.f(e,t,s(0,r)):e[t]=r}},751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724),r(4846),r(9655);class InstanceType{static[Symbol.hasInstance](e){let t=super[Symbol.hasInstance](e);if(e&&!e.constructor.getInstanceType)return t;if(e&&(e.instanceTypes||(e.instanceTypes=[]),t||this.getInstanceType()===e.constructor.getInstanceType()&&(t=!0),t)){const t=this.getInstanceType===InstanceType.getInstanceType?"BaseInstanceType":this.getInstanceType();-1===e.instanceTypes.indexOf(t)&&e.instanceTypes.push(t)}return!t&&e&&(t=e.instanceTypes&&Array.isArray(e.instanceTypes)&&-1!==e.instanceTypes.indexOf(this.getInstanceType())),t}static getInstanceType(){elementorModules.ForceMethodImplementation()}constructor(){let e=new.target;const t=[];for(;e.__proto__&&e.__proto__.name;)t.push(e.__proto__),e=e.__proto__;t.reverse().forEach(e=>this instanceof e)}}t.default=InstanceType},1091:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},1265:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(641)),s=n(r(2425)),o=n(r(2946)),a=n(r(3980)),c=n(r(2970)),l=n(r(8685)),u=r(9031),p=r(1462);const d={Module:i.default,ViewModule:s.default,ArgsObject:o.default,ForceMethodImplementation:l.default,utils:{Masonry:a.default,Scroll:c.default},importExport:{createGetInitialState:u.createGetInitialState,customizationDialogsRegistry:p.customizationDialogsRegistry}};window.elementorModules?Object.assign(window.elementorModules,d):window.elementorModules=d;t.default=window.elementorModules},1278:(e,t,r)=>{"use strict";var n=r(4762),i=n({}.toString),s=n("".slice);e.exports=function(e){return s(i(e),8,-1)}},1409:(e,t,r)=>{"use strict";var n=r(5578),i=r(1483);e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t];var r}},1423:(e,t,r)=>{"use strict";var n=r(1409),i=r(1483),s=r(4815),o=r(5022),a=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&s(t.prototype,a(e))}},1462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customizationDialogsRegistry=void 0;var n=r(7958);t.customizationDialogsRegistry=new n.BaseRegistry},1483:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},1506:(e,t,r)=>{"use strict";var n=r(2914),i=r(1807),s=r(2293),o=r(8761),a=r(5299),c=r(6960),l=r(4815),u=r(4887),p=r(6665),d=r(6721),h=TypeError,Result=function(e,t){this.stopped=e,this.result=t},f=Result.prototype;e.exports=function(e,t,r){var g,m,v,y,w,b,S,x=r&&r.that,E=!(!r||!r.AS_ENTRIES),I=!(!r||!r.IS_RECORD),_=!(!r||!r.IS_ITERATOR),C=!(!r||!r.INTERRUPTED),O=n(t,x),stop=function(e){return g&&d(g,"normal"),new Result(!0,e)},callFn=function(e){return E?(s(e),C?O(e[0],e[1],stop):O(e[0],e[1])):C?O(e,stop):O(e)};if(I)g=e.iterator;else if(_)g=e;else{if(!(m=p(e)))throw new h(o(e)+" is not iterable");if(a(m)){for(v=0,y=c(e);y>v;v++)if((w=callFn(e[v]))&&l(f,w))return w;return new Result(!1)}g=u(e,m)}for(b=I?e.next:g.next;!(S=i(b,g)).done;){try{w=callFn(S.value)}catch(e){d(g,"throw",e)}if("object"==typeof w&&w&&l(f,w))return w}return new Result(!1)}},1507:e=>{"use strict";e.exports={}},1703:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function trunc(e){var n=+e;return(n>0?r:t)(n)}},1704:(e,t,r)=>{"use strict";var n=r(1483);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},1799:(e,t,r)=>{"use strict";var n=r(382),i=r(8473),s=r(3145);e.exports=!n&&!i(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},1807:(e,t,r)=>{"use strict";var n=r(274),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},1831:(e,t,r)=>{"use strict";var n=r(9557),i=r(5578),s=r(2095),o="__core-js_shared__",a=e.exports=i[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.46.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},1851:(e,t,r)=>{"use strict";var n,i,s,o=r(8473),a=r(1483),c=r(1704),l=r(5290),u=r(3181),p=r(7914),d=r(1),h=r(9557),f=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(i=u(u(s)))!==Object.prototype&&(n=i):g=!0),!c(n)||o(function(){var e={};return n[f].call(e)!==e})?n={}:h&&(n=l(n)),a(n[f])||p(n,f,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},1866:(e,t,r)=>{"use strict";var n=r(4762),i=0,s=Math.random(),o=n(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+s,36)}},1975:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(8120),o=r(2293),a=r(41),c=r(8660),l=r(8901),u=r(9557),p=r(6721),d=r(7486),h=r(5267),f=!u&&!d("filter",function(){}),g=!u&&!f&&h("filter",TypeError),m=u||f||g,v=c(function(){for(var e,t,r=this.iterator,n=this.predicate,s=this.next;;){if(e=o(i(s,r)),this.done=!!e.done)return;if(t=e.value,l(r,n,[t,this.counter++],!0))return t}});n({target:"Iterator",proto:!0,real:!0,forced:m},{filter:function filter(e){o(this);try{s(e)}catch(e){p(this,"throw",e)}return g?i(g,this,e):new v(a(this),{predicate:e})}})},1983:(e,t,r)=>{"use strict";var n=r(6721);e.exports=function(e,t,r){for(var i=e.length-1;i>=0;i--)if(void 0!==e[i])try{r=n(e[i].iterator,t,r)}catch(e){t="throw",r=e}if("throw"===t)throw r;return r}},2048:(e,t,r)=>{"use strict";var n=r(382),i=r(5755),s=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,a=i(s,"name"),c=a&&"something"===function something(){}.name,l=a&&(!n||n&&o(s,"name").configurable);e.exports={EXISTS:a,PROPER:c,CONFIGURABLE:l}},2095:(e,t,r)=>{"use strict";var n=r(5578),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},2121:(e,t,r)=>{"use strict";var n=r(4762),i=r(8473),s=r(1278),o=Object,a=n("".split);e.exports=i(function(){return!o("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?a(e,""):o(e)}:o},2278:(e,t,r)=>{"use strict";var n=r(6742),i=r(4741).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return n(e,i)}},2293:(e,t,r)=>{"use strict";var n=r(1704),i=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not an object")}},2313:(e,t,r)=>{"use strict";var n=r(7914);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},2347:(e,t,r)=>{"use strict";var n=r(3312),i=Object;e.exports=function(e){return i(n(e))}},2355:(e,t,r)=>{"use strict";var n=r(1807),i=r(1704),s=r(1423),o=r(2564),a=r(348),c=r(1),l=TypeError,u=c("toPrimitive");e.exports=function(e,t){if(!i(e)||s(e))return e;var r,c=o(e,u);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!i(r)||s(r))return r;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},2425:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(641));t.default=i.default.extend({elements:null,getDefaultElements:()=>({}),bindEvents(){},onInit(){this.initElements(),this.bindEvents()},initElements(){this.elements=this.getDefaultElements()}})},2564:(e,t,r)=>{"use strict";var n=r(8120),i=r(5983);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},2811:(e,t,r)=>{"use strict";var n=r(1409);e.exports=n("document","documentElement")},2890:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211);class _default extends elementorModules.ViewModule{getDefaultSettings(){return{selectors:{elements:".elementor-element",nestedDocumentElements:".elementor .elementor-element"},classes:{editMode:"elementor-edit-mode"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$elements:this.$element.find(e.elements).not(this.$element.find(e.nestedDocumentElements))}}getDocumentSettings(e){let t;if(this.isEdit){t={};const e=elementor.settings.page.model;jQuery.each(e.getActiveControls(),r=>{t[r]=e.attributes[r]})}else t=this.$element.data("elementor-settings")||{};return this.getItems(t,e)}runElementsHandlers(){this.elements.$elements.each((e,t)=>setTimeout(()=>elementorFrontend.elementsHandler.runReadyTrigger(t)))}onInit(){this.$element=this.getSettings("$element"),super.onInit(),this.isEdit=this.$element.hasClass(this.getSettings("classes.editMode")),this.isEdit?elementor.on("document:loaded",()=>{elementor.settings.page.model.on("change",this.onSettingsChange.bind(this))}):this.runElementsHandlers()}onSettingsChange(){}}t.default=_default},2914:(e,t,r)=>{"use strict";var n=r(3786),i=r(8120),s=r(274),o=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:s?o(e,t):function(){return e.apply(t,arguments)}}},2946:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(751)),s=n(r(5213));class ArgsObject extends i.default{static getInstanceType(){return"ArgsObject"}constructor(e){super(),this.args=e}requireArgument(e,t=this.args){if(!Object.prototype.hasOwnProperty.call(t,e))throw Error(`${e} is required.`)}requireArgumentType(e,t,r=this.args){if(this.requireArgument(e,r),typeof r[e]!==t)throw Error(`${e} invalid type: ${t}.`)}requireArgumentInstance(e,t,r=this.args){if(this.requireArgument(e,r),!(r[e]instanceof t||(0,s.default)(r[e],t)))throw Error(`${e} invalid instance.`)}requireArgumentConstructor(e,t,r=this.args){if(this.requireArgument(e,r),r[e].constructor.toString()!==t.prototype.constructor.toString())throw Error(`${e} invalid constructor type.`)}}t.default=ArgsObject},2970:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724);t.default=class Scroll{static scrollObserver(e){let t=0;const r={root:e.root||null,rootMargin:e.offset||"0px",threshold:((e=0)=>{const t=[];if(e>0&&e<=100){const r=100/e;for(let e=0;e<=100;e+=r)t.push(e/100)}else t.push(0);return t})(e.sensitivity)};return new IntersectionObserver(function handleIntersect(r){const n=r[0].boundingClientRect.y,i=r[0].isIntersecting,s=n<t?"down":"up",o=Math.abs(parseFloat((100*r[0].intersectionRatio).toFixed(2)));e.callback({sensitivity:e.sensitivity,isInViewport:i,scrollPercentage:o,intersectionScrollDirection:s}),t=n},r)}static getElementViewportPercentage(e,t={}){const r=e[0].getBoundingClientRect(),n=t.start||0,i=t.end||0,s=window.innerHeight*n/100,o=window.innerHeight*i/100,a=r.top-window.innerHeight,c=0-a+s,l=r.top+s+e.height()-a+o,u=Math.max(0,Math.min(c/l,1));return parseFloat((100*u).toFixed(2))}static getPageScrollPercentage(e={},t){const r=e.start||0,n=e.end||0,i=t||document.documentElement.scrollHeight-document.documentElement.clientHeight,s=i*r/100,o=i+s+i*n/100;return(document.documentElement.scrollTop+document.body.scrollTop+s)/o*100}}},3005:(e,t,r)=>{"use strict";var n=r(1703);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},3145:(e,t,r)=>{"use strict";var n=r(5578),i=r(1704),s=n.document,o=i(s)&&i(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},3181:(e,t,r)=>{"use strict";var n=r(5755),i=r(1483),s=r(2347),o=r(5409),a=r(9441),c=o("IE_PROTO"),l=Object,u=l.prototype;e.exports=a?l.getPrototypeOf:function(e){var t=s(e);if(n(t,c))return t[c];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof l?u:null}},3242:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(1506),o=r(8120),a=r(2293),c=r(41),l=r(6721),u=r(5267)("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:u},{find:function find(e){a(this);try{o(e)}catch(e){l(this,"throw",e)}if(u)return i(u,this,e);var t=c(this),r=0;return s(t,function(t,n){if(e(t,r++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},3312:(e,t,r)=>{"use strict";var n=r(5983),i=TypeError;e.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},3392:(e,t,r)=>{"use strict";var n=r(3005),i=Math.max,s=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):s(r,t)}},3617:(e,t,r)=>{"use strict";var n=r(8612),i=r(5578),s=r(6021),o=r(2293),a=r(1483),c=r(3181),l=r(3864),u=r(670),p=r(8473),d=r(5755),h=r(1),f=r(1851).IteratorPrototype,g=r(382),m=r(9557),v="constructor",y="Iterator",w=h("toStringTag"),b=TypeError,S=i[y],x=m||!a(S)||S.prototype!==f||!p(function(){S({})}),E=function Iterator(){if(s(this,f),c(this)===f)throw new b("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(e,t){g?l(f,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===f)throw new b("You can't redefine this property");d(this,e)?this[e]=t:u(this,e,t)}}):f[e]=t};d(f,w)||defineIteratorPrototypeAccessor(w,y),!x&&d(f,v)&&f[v]!==Object||defineIteratorPrototypeAccessor(v,E),E.prototype=f,n({global:!0,constructor:!0,forced:x},{Iterator:E})},3658:(e,t,r)=>{"use strict";var n=r(6742),i=r(4741);e.exports=Object.keys||function keys(e){return n(e,i)}},3786:(e,t,r)=>{"use strict";var n=r(1278),i=r(4762);e.exports=function(e){if("Function"===n(e))return i(e)}},3815:(e,t,r)=>{"use strict";var n=r(2355),i=r(1423);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},3864:(e,t,r)=>{"use strict";var n=r(169),i=r(5835);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},3896:(e,t,r)=>{"use strict";var n=r(382),i=r(8473);e.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},3980:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724);var i=n(r(2425));t.default=i.default.extend({getDefaultSettings:()=>({container:null,items:null,columnsCount:3,verticalSpaceBetween:30}),getDefaultElements(){return{$container:jQuery(this.getSettings("container")),$items:jQuery(this.getSettings("items"))}},run(){var e=[],t=this.elements.$container.position().top,r=this.getSettings(),n=r.columnsCount;t+=parseInt(this.elements.$container.css("margin-top"),10),this.elements.$items.each(function(i){var s=Math.floor(i/n),o=jQuery(this),a=o[0].getBoundingClientRect().height+r.verticalSpaceBetween;if(s){var c=o.position(),l=i%n,u=c.top-t-e[l];u-=parseInt(o.css("margin-top"),10),u*=-1,o.css("margin-top",u+"px"),e[l]+=a}else e.push(a)})}})},3991:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(8120),o=r(2293),a=r(41),c=r(8660),l=r(8901),u=r(6721),p=r(7486),d=r(5267),h=r(9557),f=!h&&!p("map",function(){}),g=!h&&!f&&d("map",TypeError),m=h||f||g,v=c(function(){var e=this.iterator,t=o(i(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:m},{map:function map(e){o(this);try{s(e)}catch(e){u(this,"throw",e)}return g?i(g,this,e):new v(a(this),{mapper:e})}})},4338:(e,t,r)=>{"use strict";var n={};n[r(1)("toStringTag")]="z",e.exports="[object z]"===String(n)},4347:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},4364:(e,t,r)=>{"use strict";r(3991)},4483:(e,t,r)=>{"use strict";var n,i,s,o=r(4644),a=r(5578),c=r(1704),l=r(9037),u=r(5755),p=r(1831),d=r(5409),h=r(1507),f="Object already initialized",g=a.TypeError,m=a.WeakMap;if(o||p.state){var v=p.state||(p.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new g(f);return t.facade=e,v.set(e,t),t},i=function(e){return v.get(e)||{}},s=function(e){return v.has(e)}}else{var y=d("state");h[y]=!0,n=function(e,t){if(u(e,y))throw new g(f);return t.facade=e,l(e,y,t),t},i=function(e){return u(e,y)?e[y]:{}},s=function(e){return u(e,y)}}e.exports={set:n,get:i,has:s,enforce:function(e){return s(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=i(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return r}}}},4644:(e,t,r)=>{"use strict";var n=r(5578),i=r(1483),s=n.WeakMap;e.exports=i(s)&&/native code/.test(String(s))},4741:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4762:(e,t,r)=>{"use strict";var n=r(274),i=Function.prototype,s=i.call,o=n&&i.bind.bind(s,s);e.exports=n?o:function(e){return function(){return s.apply(e,arguments)}}},4815:(e,t,r)=>{"use strict";var n=r(4762);e.exports=n({}.isPrototypeOf)},4846:(e,t,r)=>{"use strict";r(3617)},4887:(e,t,r)=>{"use strict";var n=r(1807),i=r(8120),s=r(2293),o=r(8761),a=r(6665),c=TypeError;e.exports=function(e,t){var r=arguments.length<2?a(e):t;if(i(r))return s(n(r,e));throw new c(o(e)+" is not iterable")}},4914:(e,t,r)=>{"use strict";var n=r(1278);e.exports=Array.isArray||function isArray(e){return"Array"===n(e)}},4946:(e,t,r)=>{"use strict";var n=r(6784),i=n(r(1265)),s=n(r(2890)),o=n(r(7955)),a=n(r(8140)),c=n(r(7224)),l=n(r(5633)),u=n(r(9603));i.default.frontend={Document:s.default,tools:{StretchElement:o.default},handlers:{Base:c.default,StretchedElement:a.default,SwiperBase:l.default,CarouselBase:u.default}}},4961:(e,t,r)=>{"use strict";var n=r(382),i=r(1807),s=r(7611),o=r(7738),a=r(5599),c=r(3815),l=r(5755),u=r(1799),p=Object.getOwnPropertyDescriptor;t.f=n?p:function getOwnPropertyDescriptor(e,t){if(e=a(e),t=c(t),u)try{return p(e,t)}catch(e){}if(l(e,t))return o(!i(s.f,e,t),e[t])}},5022:(e,t,r)=>{"use strict";var n=r(6029);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5213:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=(e,t)=>{t=Array.isArray(t)?t:[t];for(const r of t)if(e.constructor.name===r.prototype[Symbol.toStringTag])return!0;return!1}},5247:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},5267:(e,t,r)=>{"use strict";var n=r(5578);e.exports=function(e,t){var r=n.Iterator,i=r&&r.prototype,s=i&&i[e],o=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(e){e instanceof t||(o=!1)}if(!o)return s}},5290:(e,t,r)=>{"use strict";var n,i=r(2293),s=r(5799),o=r(4741),a=r(1507),c=r(2811),l=r(3145),u=r(5409),p="prototype",d="script",h=u("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<"+d+">"+e+"</"+d+">"},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObject=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;NullProtoObject="undefined"!=typeof document?document.domain&&n?NullProtoObjectViaActiveX(n):(t=l("iframe"),r="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F):NullProtoObjectViaActiveX(n);for(var i=o.length;i--;)delete NullProtoObject[p][o[i]];return NullProtoObject()};a[h]=!0,e.exports=Object.create||function create(e,t){var r;return null!==e?(EmptyConstructor[p]=i(e),r=new EmptyConstructor,EmptyConstructor[p]=null,r[h]=e):r=NullProtoObject(),void 0===t?r:s.f(r,t)}},5299:(e,t,r)=>{"use strict";var n=r(1),i=r(6775),s=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[s]===e)}},5409:(e,t,r)=>{"use strict";var n=r(7255),i=r(1866),s=n("keys");e.exports=function(e){return s[e]||(s[e]=i(e))}},5578:function(e,t,r){"use strict";var check=function(e){return e&&e.Math===Math&&e};e.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r.g&&r.g)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5599:(e,t,r)=>{"use strict";var n=r(2121),i=r(3312);e.exports=function(e){return n(i(e))}},5633:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(7224));class SwiperHandlerBase extends i.default{getInitialSlide(){const e=this.getEditSettings();return e.activeItemIndex?e.activeItemIndex-1:0}getSlidesCount(){return this.elements.$slides.length}togglePauseOnHover(e){e?this.elements.$swiperContainer.on({mouseenter:()=>{this.swiper.autoplay.stop()},mouseleave:()=>{this.swiper.autoplay.start()}}):this.elements.$swiperContainer.off("mouseenter mouseleave")}handleKenBurns(){const e=this.getSettings();this.$activeImageBg&&this.$activeImageBg.removeClass(e.classes.kenBurnsActive),this.activeItemIndex=this.swiper?this.swiper.activeIndex:this.getInitialSlide(),this.swiper?this.$activeImageBg=jQuery(this.swiper.slides[this.activeItemIndex]).children("."+e.classes.slideBackground):this.$activeImageBg=jQuery(this.elements.$slides[0]).children("."+e.classes.slideBackground),this.$activeImageBg.addClass(e.classes.kenBurnsActive)}}t.default=SwiperHandlerBase},5724:(e,t,r)=>{"use strict";var n=r(8612),i=r(2347),s=r(6960),o=r(9273),a=r(1091);n({target:"Array",proto:!0,arity:1,forced:r(8473)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function push(e){var t=i(this),r=s(t),n=arguments.length;a(r+n);for(var c=0;c<n;c++)t[r]=arguments[c],r++;return o(t,r),r}})},5755:(e,t,r)=>{"use strict";var n=r(4762),i=r(2347),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return s(i(e),t)}},5799:(e,t,r)=>{"use strict";var n=r(382),i=r(3896),s=r(5835),o=r(2293),a=r(5599),c=r(3658);t.f=n&&!i?Object.defineProperties:function defineProperties(e,t){o(e);for(var r,n=a(t),i=c(t),l=i.length,u=0;l>u;)s.f(e,r=i[u++],n[r]);return e}},5835:(e,t,r)=>{"use strict";var n=r(382),i=r(1799),s=r(3896),o=r(2293),a=r(3815),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p="enumerable",d="configurable",h="writable";t.f=n?s?function defineProperty(e,t,r){if(o(e),t=a(t),o(r),"function"==typeof e&&"prototype"===t&&"value"in r&&h in r&&!r[h]){var n=u(e,t);n&&n[h]&&(e[t]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:p in r?r[p]:n[p],writable:!1})}return l(e,t,r)}:l:function defineProperty(e,t,r){if(o(e),t=a(t),o(r),i)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},5983:e=>{"use strict";e.exports=function(e){return null==e}},6021:(e,t,r)=>{"use strict";var n=r(4815),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},6029:(e,t,r)=>{"use strict";var n=r(6477),i=r(8473),s=r(5578).String;e.exports=!!Object.getOwnPropertySymbols&&!i(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},6145:(e,t,r)=>{"use strict";var n=r(4338),i=r(1483),s=r(1278),o=r(1)("toStringTag"),a=Object,c="Arguments"===s(function(){return arguments}());e.exports=n?s:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),o))?r:c?s(t):"Object"===(n=s(t))&&i(t.callee)?"Arguments":n}},6211:(e,t,r)=>{"use strict";r(3242)},6477:(e,t,r)=>{"use strict";var n,i,s=r(5578),o=r(9461),a=s.process,c=s.Deno,l=a&&a.versions||c&&c.version,u=l&&l.v8;u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},6651:(e,t,r)=>{"use strict";var n=r(5599),i=r(3392),s=r(6960),createMethod=function(e){return function(t,r,o){var a=n(t),c=s(a);if(0===c)return!e&&-1;var l,u=i(o,c);if(e&&r!=r){for(;c>u;)if((l=a[u++])!=l)return!0}else for(;c>u;u++)if((e||u in a)&&a[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},6665:(e,t,r)=>{"use strict";var n=r(6145),i=r(2564),s=r(5983),o=r(6775),a=r(1)("iterator");e.exports=function(e){if(!s(e))return i(e,a)||i(e,"@@iterator")||o[n(e)]}},6721:(e,t,r)=>{"use strict";var n=r(1807),i=r(2293),s=r(2564);e.exports=function(e,t,r){var o,a;i(e);try{if(!(o=s(e,"return"))){if("throw"===t)throw r;return r}o=n(o,e)}catch(e){a=!0,o=e}if("throw"===t)throw r;if(a)throw o;return i(o),r}},6726:(e,t,r)=>{"use strict";var n=r(5755),i=r(9497),s=r(4961),o=r(5835);e.exports=function(e,t,r){for(var a=i(t),c=o.f,l=s.f,u=0;u<a.length;u++){var p=a[u];n(e,p)||r&&n(r,p)||c(e,p,l(t,p))}}},6742:(e,t,r)=>{"use strict";var n=r(4762),i=r(5755),s=r(5599),o=r(6651).indexOf,a=r(1507),c=n([].push);e.exports=function(e,t){var r,n=s(e),l=0,u=[];for(r in n)!i(a,r)&&i(n,r)&&c(u,r);for(;t.length>l;)i(n,r=t[l++])&&(~o(u,r)||c(u,r));return u}},6775:e=>{"use strict";e.exports={}},6784:e=>{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},6960:(e,t,r)=>{"use strict";var n=r(8324);e.exports=function(e){return n(e.length)}},7224:(e,t,r)=>{"use strict";r(5724),r(4846),r(7458),r(6211),r(9655),e.exports=elementorModules.ViewModule.extend({$element:null,editorListeners:null,onElementChange:null,onEditSettingsChange:null,onPageSettingsChange:null,isEdit:null,__construct(e){this.isActive(e)&&(this.$element=e.$element,this.isEdit=this.$element.hasClass("elementor-element-edit-mode"),this.isEdit&&this.addEditorListeners())},isActive:()=>!0,isElementInTheCurrentDocument(){return!!elementorFrontend.isEditMode()&&elementor.documents.currentDocument.id.toString()===this.$element[0].closest(".elementor").dataset.elementorId},findElement(e){var t=this.$element;return t.find(e).filter(function(){return jQuery(this).parent().closest(".elementor-element").is(t)})},getUniqueHandlerID(e,t){return e||(e=this.getModelCID()),t||(t=this.$element),e+t.attr("data-element_type")+this.getConstructorID()},initEditorListeners(){var e=this;if(e.editorListeners=[{event:"element:destroy",to:elementor.channels.data,callback(t){t.cid===e.getModelCID()&&e.onDestroy()}}],e.onElementChange){const t=e.getWidgetType()||e.getElementType();let r="change";"global"!==t&&(r+=":"+t),e.editorListeners.push({event:r,to:elementor.channels.editor,callback(t,r){e.getUniqueHandlerID(r.model.cid,r.$el)===e.getUniqueHandlerID()&&e.onElementChange(t.model.get("name"),t,r)}})}e.onEditSettingsChange&&e.editorListeners.push({event:"change:editSettings",to:elementor.channels.editor,callback(t,r){if(r.model.cid!==e.getModelCID())return;const n=Object.keys(t.changed)[0];e.onEditSettingsChange(n,t.changed[n])}}),["page"].forEach(function(t){var r="on"+t[0].toUpperCase()+t.slice(1)+"SettingsChange";e[r]&&e.editorListeners.push({event:"change",to:elementor.settings[t].model,callback(t){e[r](t.changed)}})})},getEditorListeners(){return this.editorListeners||this.initEditorListeners(),this.editorListeners},addEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.addListenerOnce(e,t.event,t.callback,t.to)})},removeEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.removeListeners(e,t.event,null,t.to)})},getElementType(){return this.$element.data("element_type")},getWidgetType(){const e=this.$element.data("widget_type");if(e)return e.split(".")[0]},getID(){return this.$element.data("id")},getModelCID(){return this.$element.data("model-cid")},getElementSettings(e){let t={};const r=this.getModelCID();if(this.isEdit&&r){const e=elementorFrontend.config.elements.data[r],n=e.attributes;let i=n.widgetType||n.elType;n.isInner&&(i="inner-"+i);let s=elementorFrontend.config.elements.keys[i];s||(s=elementorFrontend.config.elements.keys[i]=[],jQuery.each(e.controls,(e,t)=>{(t.frontend_available||t.editor_available)&&s.push(e)})),jQuery.each(e.getActiveControls(),function(e){if(-1!==s.indexOf(e)){let r=n[e];r.toJSON&&(r=r.toJSON()),t[e]=r}})}else t=this.$element.data("settings")||{};return this.getItems(t,e)},getEditSettings(e){var t={};return this.isEdit&&(t=elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes),this.getItems(t,e)},getCurrentDeviceSetting(e){return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(),e)},onInit(){this.isActive(this.getSettings())&&elementorModules.ViewModule.prototype.onInit.apply(this,arguments)},onDestroy(){this.isEdit&&this.removeEditorListeners(),this.unbindEvents&&this.unbindEvents()}})},7255:(e,t,r)=>{"use strict";var n=r(1831);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},7268:(e,t,r)=>{"use strict";var n=r(4762),i=r(1483),s=r(1831),o=n(Function.toString);i(s.inspectSource)||(s.inspectSource=function(e){return o(e)}),e.exports=s.inspectSource},7458:(e,t,r)=>{"use strict";r(1975)},7486:e=>{"use strict";e.exports=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}}},7611:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:r},7738:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7914:(e,t,r)=>{"use strict";var n=r(1483),i=r(5835),s=r(169),o=r(2095);e.exports=function(e,t,r,a){a||(a={});var c=a.enumerable,l=void 0!==a.name?a.name:t;if(n(r)&&s(r,l,a),a.global)c?e[t]=r:o(t,r);else{try{a.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},7955:e=>{"use strict";e.exports=elementorModules.ViewModule.extend({getDefaultSettings:()=>({element:null,direction:elementorFrontend.config.is_rtl?"right":"left",selectors:{container:window},considerScrollbar:!1,cssOutput:"inline"}),getDefaultElements(){return{$element:jQuery(this.getSettings("element"))}},stretch(){const e=this.getSettings();let t;try{t=jQuery(e.selectors.container)}catch(e){}t&&t.length||(t=jQuery(this.getDefaultSettings().selectors.container)),this.reset();var r=this.elements.$element,n=t.innerWidth(),i=r.offset().left,s="fixed"===r.css("position"),o=s?0:i,a=window===t[0];if(!a){var c=t.offset().left;s&&(o=c),i>c&&(o=i-c)}if(e.considerScrollbar&&a){o-=window.innerWidth-n}s||(elementorFrontend.config.is_rtl&&(o=n-(r.outerWidth()+o)),o=-o),e.margin&&(o+=e.margin);var l={};let u=n;e.margin&&(u-=2*e.margin),l.width=u+"px",l[e.direction]=o+"px","variables"!==e.cssOutput?r.css(l):this.applyCssVariables(r,l)},reset(){const e={},t=this.getSettings(),r=this.elements.$element;"variables"!==t.cssOutput?(e.width="",e[t.direction]="",r.css(e)):this.resetCssVariables(r)},applyCssVariables(e,t){e.css("--stretch-width",t.width),t.left?e.css("--stretch-left",t.left):e.css("--stretch-right",t.right)},resetCssVariables(e){e.css({"--stretch-width":"","--stretch-left":"","--stretch-right":""})}})},7958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRegistry=void 0,r(4846),r(7458),r(9655),r(4364);t.BaseRegistry=class BaseRegistry{constructor(){this.sections=new Map}register(e){if(!e.key||!e.title)throw new Error("Template type must have key and title");const t=this.get(e.key)||this.formatSection(e);if(e.children)if(t.children){const r=new Map(t.children.map(e=>[e.key,e]));e.children.forEach(e=>{const t=this.formatSection(e);r.set(e.key,t)}),t.children=Array.from(r.values())}else t.children=e.children.map(e=>this.formatSection(e));this.sections.set(e.key,t)}formatSection({children:e,...t}){return{key:t.key,title:t.title,description:t.description||"",useParentDefault:!1!==t.useParentDefault,getInitialState:t.getInitialState||null,component:t.component||null,order:t.order||10,isAvailable:t.isAvailable||(()=>!0),...t}}getAll(){return Array.from(this.sections.values()).filter(e=>e.isAvailable()).map(e=>e.children?{...e,children:[...e.children].sort((e,t)=>e.order-t.order)}:e).sort((e,t)=>e.order-t.order)}get(e){return this.sections.get(e)}}},8120:(e,t,r)=>{"use strict";var n=r(1483),i=r(8761),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not a function")}},8140:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211);var i=n(r(7224));class StretchedElement extends i.default{getStretchedClass(){return"e-stretched"}getStretchSettingName(){return"stretch_element"}getStretchActiveValue(){return"yes"}bindEvents(){const e=this.getUniqueHandlerID();elementorFrontend.addListenerOnce(e,"resize",this.stretch),elementorFrontend.addListenerOnce(e,"sticky:stick",this.stretch,this.$element),elementorFrontend.addListenerOnce(e,"sticky:unstick",this.stretch,this.$element),elementorFrontend.isEditMode()&&(this.onKitChangeStretchContainerChange=this.onKitChangeStretchContainerChange.bind(this),elementor.channels.editor.on("kit:change:stretchContainer",this.onKitChangeStretchContainerChange))}unbindEvents(){elementorFrontend.removeListeners(this.getUniqueHandlerID(),"resize",this.stretch),elementorFrontend.isEditMode()&&elementor.channels.editor.off("kit:change:stretchContainer",this.onKitChangeStretchContainerChange)}isActive(e){return elementorFrontend.isEditMode()||e.$element.hasClass(this.getStretchedClass())}getStretchElementForConfig(e=null){return e?this.$element.find(e):this.$element}getStretchElementConfig(){return{element:this.getStretchElementForConfig(),selectors:{container:this.getStretchContainer()},considerScrollbar:elementorFrontend.isEditMode()&&elementorFrontend.config.is_rtl}}initStretch(){this.stretch=this.stretch.bind(this),this.stretchElement=new elementorModules.frontend.tools.StretchElement(this.getStretchElementConfig())}getStretchContainer(){return elementorFrontend.getKitSettings("stretched_section_container")||window}isStretchSettingEnabled(){return this.getElementSettings(this.getStretchSettingName())===this.getStretchActiveValue()}stretch(){this.isStretchSettingEnabled()&&this.stretchElement.stretch()}onInit(...e){this.isActive(this.getSettings())&&(this.initStretch(),super.onInit(...e),this.stretch())}onElementChange(e){this.getStretchSettingName()===e&&(this.isStretchSettingEnabled()?this.stretch():this.stretchElement.reset())}onKitChangeStretchContainerChange(){this.stretchElement.setSettings("selectors.container",this.getStretchContainer()),this.stretch()}}t.default=StretchedElement},8324:(e,t,r)=>{"use strict";var n=r(3005),i=Math.min;e.exports=function(e){var t=n(e);return t>0?i(t,9007199254740991):0}},8473:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},8612:(e,t,r)=>{"use strict";var n=r(5578),i=r(4961).f,s=r(9037),o=r(7914),a=r(2095),c=r(6726),l=r(8730);e.exports=function(e,t){var r,u,p,d,h,f=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[f]||a(f,{}):n[f]&&n[f].prototype)for(u in t){if(d=t[u],p=e.dontCallGetSet?(h=i(r,u))&&h.value:r[u],!l(g?u:f+(m?".":"#")+u,e.forced)&&void 0!==p){if(typeof d==typeof p)continue;c(d,p)}(e.sham||p&&p.sham)&&s(d,"sham",!0),o(r,u,d,e)}}},8660:(e,t,r)=>{"use strict";var n=r(1807),i=r(5290),s=r(9037),o=r(2313),a=r(1),c=r(4483),l=r(2564),u=r(1851).IteratorPrototype,p=r(5247),d=r(6721),h=r(1983),f=a("toStringTag"),g="IteratorHelper",m="WrapForValidIterator",v="normal",y="throw",w=c.set,createIteratorProxyPrototype=function(e){var t=c.getterFor(e?m:g);return o(i(u),{next:function next(){var r=t(this);if(e)return r.nextHandler();if(r.done)return p(void 0,!0);try{var n=r.nextHandler();return r.returnHandlerResult?n:p(n,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),i=r.iterator;if(r.done=!0,e){var s=l(i,"return");return s?n(s,i):p(void 0,!0)}if(r.inner)try{d(r.inner.iterator,v)}catch(e){return d(i,y,e)}if(r.openIters)try{h(r.openIters,v)}catch(e){return d(i,y,e)}return i&&d(i,v),p(void 0,!0)}})},b=createIteratorProxyPrototype(!0),S=createIteratorProxyPrototype(!1);s(S,f,"Iterator Helper"),e.exports=function(e,t,r){var n=function Iterator(n,i){i?(i.iterator=n.iterator,i.next=n.next):i=n,i.type=t?m:g,i.returnHandlerResult=!!r,i.nextHandler=e,i.counter=0,i.done=!1,w(this,i)};return n.prototype=t?b:S,n}},8685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ForceMethodImplementation=void 0;class ForceMethodImplementation extends Error{constructor(e={},t={}){super(`${e.isStatic?"static ":""}${e.fullName}() should be implemented, please provide '${e.functionName||e.fullName}' functionality.`,t),Object.keys(t).length&&console.error(t),Error.captureStackTrace(this,ForceMethodImplementation)}}t.ForceMethodImplementation=ForceMethodImplementation;t.default=e=>{const t=Error().stack.split("\n")[2].trim(),r=t.startsWith("at new")?"constructor":t.split(" ")[1],n={};if(n.functionName=r,n.fullName=r,n.functionName.includes(".")){const e=n.functionName.split(".");n.className=e[0],n.functionName=e[1]}else n.isStatic=!0;throw new ForceMethodImplementation(n,e)}},8730:(e,t,r)=>{"use strict";var n=r(8473),i=r(1483),s=/#|\.prototype\./,isForced=function(e,t){var r=a[o(e)];return r===l||r!==c&&(i(t)?n(t):!!t)},o=isForced.normalize=function(e){return String(e).replace(s,".").toLowerCase()},a=isForced.data={},c=isForced.NATIVE="N",l=isForced.POLYFILL="P";e.exports=isForced},8761:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},8901:(e,t,r)=>{"use strict";var n=r(2293),i=r(6721);e.exports=function(e,t,r,s){try{return s?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},9031:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGetInitialState=function createGetInitialState(e,t={}){return(r,n)=>{let i=n;if(r.hasOwnProperty("uploadedData")){i=!1;const t=r.uploadedData.manifest.templates,n=elementorAppConfig?.["import-export-customization"]?.exportGroups||{};for(const r in t){if(n[t[r].doc_type]===e){i=!0;break}}}return{enabled:i,...t}}}},9037:(e,t,r)=>{"use strict";var n=r(382),i=r(5835),s=r(7738);e.exports=n?function(e,t,r){return i.f(e,t,s(1,r))}:function(e,t,r){return e[t]=r,e}},9273:(e,t,r)=>{"use strict";var n=r(382),i=r(4914),s=TypeError,o=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!o(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},9441:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})},9461:(e,t,r)=>{"use strict";var n=r(5578).navigator,i=n&&n.userAgent;e.exports=i?String(i):""},9497:(e,t,r)=>{"use strict";var n=r(1409),i=r(4762),s=r(2278),o=r(4347),a=r(2293),c=i([].concat);e.exports=n("Reflect","ownKeys")||function ownKeys(e){var t=s.f(a(e)),r=o.f;return r?c(t,r(e)):t}},9557:e=>{"use strict";e.exports=!1},9603:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211),r(9655);var i=n(r(5633));class CarouselHandlerBase extends i.default{getDefaultSettings(){return{selectors:{carousel:".swiper",swiperWrapper:".swiper-wrapper",slideContent:".swiper-slide",swiperArrow:".elementor-swiper-button",paginationWrapper:".swiper-pagination",paginationBullet:".swiper-pagination-bullet",paginationBulletWrapper:".swiper-pagination-bullets"}}}getDefaultElements(){const e=this.getSettings("selectors"),t={$swiperContainer:this.$element.find(e.carousel),$swiperWrapper:this.$element.find(e.swiperWrapper),$swiperArrows:this.$element.find(e.swiperArrow),$paginationWrapper:this.$element.find(e.paginationWrapper),$paginationBullets:this.$element.find(e.paginationBullet),$paginationBulletWrapper:this.$element.find(e.paginationBulletWrapper)};return t.$slides=t.$swiperContainer.find(e.slideContent),t}getSwiperSettings(){const e=this.getElementSettings(),t=+e.slides_to_show||3,r=1===t,n=elementorFrontend.config.responsive.activeBreakpoints,i={mobile:1,tablet:r?1:2},s={slidesPerView:t,loop:"yes"===e.infinite,speed:e.speed,handleElementorBreakpoints:!0,breakpoints:{}};let o=t;Object.keys(n).reverse().forEach(t=>{const r=i[t]?i[t]:o;s.breakpoints[n[t].value]={slidesPerView:+e["slides_to_show_"+t]||r,slidesPerGroup:+e["slides_to_scroll_"+t]||1},e.image_spacing_custom&&(s.breakpoints[n[t].value].spaceBetween=this.getSpaceBetween(t)),o=+e["slides_to_show_"+t]||r}),"yes"===e.autoplay&&(s.autoplay={delay:e.autoplay_speed,disableOnInteraction:"yes"===e.pause_on_interaction}),r?(s.effect=e.effect,"fade"===e.effect&&(s.fadeEffect={crossFade:!0})):s.slidesPerGroup=+e.slides_to_scroll||1,e.image_spacing_custom&&(s.spaceBetween=this.getSpaceBetween());const a="arrows"===e.navigation||"both"===e.navigation,c="dots"===e.navigation||"both"===e.navigation||e.pagination;return a&&(s.navigation={prevEl:".elementor-swiper-button-prev",nextEl:".elementor-swiper-button-next"}),c&&(s.pagination={el:`.elementor-element-${this.getID()} .swiper-pagination`,type:e.pagination?e.pagination:"bullets",clickable:!0,renderBullet:(e,t)=>`<span class="${t}" role="button" tabindex="0" data-bullet-index="${e}" aria-label="${elementorFrontend.config.i18n.a11yCarouselPaginationBulletMessage} ${e+1}"></span>`}),"yes"===e.lazyload&&(s.lazy={loadPrevNext:!0,loadPrevNextAmount:1}),s.a11y={enabled:!0,prevSlideMessage:elementorFrontend.config.i18n.a11yCarouselPrevSlideMessage,nextSlideMessage:elementorFrontend.config.i18n.a11yCarouselNextSlideMessage,firstSlideMessage:elementorFrontend.config.i18n.a11yCarouselFirstSlideMessage,lastSlideMessage:elementorFrontend.config.i18n.a11yCarouselLastSlideMessage},s.on={slideChange:()=>{this.a11ySetPaginationTabindex(),this.handleElementHandlers(),this.a11ySetSlideAriaHidden()},init:()=>{this.a11ySetPaginationTabindex(),this.a11ySetSlideAriaHidden("initialisation")}},this.applyOffsetSettings(e,s,t),s}getOffsetWidth(){const e=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"offset_width","size",e)||0}applyOffsetSettings(e,t,r){const n=e.offset_sides;if(!(elementorFrontend.isEditMode()&&"NestedCarousel"===this.constructor.name)&&n&&"none"!==n)switch(n){case"right":this.forceSliderToShowNextSlideWhenOnLast(t,r),this.addClassToSwiperContainer("offset-right");break;case"left":this.addClassToSwiperContainer("offset-left");break;case"both":this.forceSliderToShowNextSlideWhenOnLast(t,r),this.addClassToSwiperContainer("offset-both")}}forceSliderToShowNextSlideWhenOnLast(e,t){e.slidesPerView=t+.001}addClassToSwiperContainer(e){this.getDefaultElements().$swiperContainer[0].classList.add(e)}async onInit(...e){if(super.onInit(...e),!this.elements.$swiperContainer.length||2>this.elements.$slides.length)return;await this.initSwiper();"yes"===this.getElementSettings().pause_on_hover&&this.togglePauseOnHover(!0)}async initSwiper(){const e=elementorFrontend.utils.swiper;this.swiper=await new e(this.elements.$swiperContainer,this.getSwiperSettings()),this.elements.$swiperContainer.data("swiper",this.swiper)}bindEvents(){this.elements.$swiperArrows.on("keydown",this.onDirectionArrowKeydown.bind(this)),this.elements.$paginationWrapper.on("keydown",".swiper-pagination-bullet",this.onDirectionArrowKeydown.bind(this)),this.elements.$swiperContainer.on("keydown",".swiper-slide",this.onDirectionArrowKeydown.bind(this)),this.$element.find(":focusable").on("focus",this.onFocusDisableAutoplay.bind(this)),elementorFrontend.elements.$window.on("resize",this.getSwiperSettings.bind(this))}unbindEvents(){this.elements.$swiperArrows.off(),this.elements.$paginationWrapper.off(),this.elements.$swiperContainer.off(),this.$element.find(":focusable").off(),elementorFrontend.elements.$window.off("resize")}onDirectionArrowKeydown(e){const t=elementorFrontend.config.is_rtl,r=e.originalEvent.code,n=t?"ArrowLeft":"ArrowRight";if(!(-1!==["ArrowLeft","ArrowRight"].indexOf(r)))return!0;(t?"ArrowRight":"ArrowLeft")===r?this.swiper.slidePrev():n===r&&this.swiper.slideNext()}onFocusDisableAutoplay(){this.swiper.autoplay.stop()}updateSwiperOption(e){const t=this.getElementSettings()[e],r=this.swiper.params;switch(e){case"autoplay_speed":r.autoplay.delay=t;break;case"speed":r.speed=t}this.swiper.update()}getChangeableProperties(){return{pause_on_hover:"pauseOnHover",autoplay_speed:"delay",speed:"speed",arrows_position:"arrows_position"}}onElementChange(e){if(0===e.indexOf("image_spacing_custom"))return void this.updateSpaceBetween(e);if(this.getChangeableProperties()[e])if("pause_on_hover"===e){const e=this.getElementSettings("pause_on_hover");this.togglePauseOnHover("yes"===e)}else this.updateSwiperOption(e)}onEditSettingsChange(e){"activeItemIndex"===e&&this.swiper.slideToLoop(this.getEditSettings("activeItemIndex")-1)}getSpaceBetween(e=null){const t=elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"image_spacing_custom","size",e);return Number(t)||0}updateSpaceBetween(e){const t=e.match("image_spacing_custom_(.*)"),r=t?t[1]:"desktop",n=this.getSpaceBetween(r);"desktop"!==r&&(this.swiper.params.breakpoints[elementorFrontend.config.responsive.activeBreakpoints[r].value].spaceBetween=n),this.swiper.params.spaceBetween=n,this.swiper.update()}getPaginationBullets(e="array"){const t=this.$element.find(this.getSettings("selectors").paginationBullet);return"array"===e?Array.from(t):t}a11ySetPaginationTabindex(){const e=this.swiper?.params?.pagination.bulletClass,t=this.swiper?.params?.pagination.bulletActiveClass;this.getPaginationBullets().forEach(e=>{e.classList?.contains(t)||e.removeAttribute("tabindex")});const r="ArrowLeft"===event?.code||"ArrowRight"===event?.code;event?.target?.classList?.contains(e)&&r&&this.$element.find(`.${t}`).trigger("focus")}getSwiperWrapperTranformXValue(){let e=this.elements.$swiperWrapper[0]?.style.transform;return e=e.replace("translate3d(",""),e=e.split(","),e=parseInt(e[0].replace("px","")),e||0}a11ySetSlideAriaHidden(e=""){if("number"!=typeof("initialisation"===e?0:this.swiper?.activeIndex))return;const t=this.getSwiperWrapperTranformXValue(),r=this.elements.$swiperWrapper[0].clientWidth;this.elements.$swiperContainer.find(this.getSettings("selectors").slideContent).each((e,n)=>{0<=n.offsetLeft+t&&r>n.offsetLeft+t?(n.removeAttribute("aria-hidden"),n.removeAttribute("inert")):(n.setAttribute("aria-hidden",!0),n.setAttribute("inert",""))})}handleElementHandlers(){}}t.default=CarouselHandlerBase},9655:(e,t,r)=>{"use strict";r(9930)},9930:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(1506),o=r(8120),a=r(2293),c=r(41),l=r(6721),u=r(5267)("forEach",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function forEach(e){a(this);try{o(e)}catch(e){l(this,"throw",e)}if(u)return i(u,this,e);var t=c(this),r=0;s(t,function(t){e(t,r++)},{IS_RECORD:!0})}})}},e=>{var t;t=4946,e(e.s=t)}]);
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});