PageSourceSearch

https://www.hhaccueil.de/local/cache-js/347cebf31b51e14e7b4f75f135ad2b46.js?1790959678

js hhaccueil.de collected 2026-10-02 18:38:57 UTC 775,058 bytes, 29,098 lines download raw bytes

vendor: 145,639 bytes, lines 1-6645
1/* compact [
2	prive/javascript/jquery.js?1790327464
3	prive/javascript/jquery.form.js?1790327464
4	prive/javascript/jquery.autosave.js?1790327464
5	prive/javascript/jquery.placeholder-label.js?1790327464
6	prive/javascript/ajaxCallback.js?1790327464
7	prive/javascript/js.cookie.js?1790327464
8	plugins/auto/jqueryui/v1.15.5/prive/javascript/ui/jquery-ui.js?1730746760
9	plugins/auto/uploadhtml5/v2.1.0/lib/dropzone/dropzone.js?1751664454
10	plugins/auto/zblobul_core/v6.9.30/javascript/zblobul.js?1790763342
11	plugins/auto/zblobul_core/v6.9.30/javascript/menu_visiteur.js?1790763342
12	plugins/auto/zblobul_core/v6.9.30/javascript/jquery.smooth-scroll.js?1790763342
13	plugins/auto/zblobul_core/v6.9.30/plugins/jquery/jquery.easing.1.3.js?1790763342
14	plugins/auto/zblobul_core/v6.9.30/plugins/flexnav/jquery.flexnav.js?1790763342
15	plugins/auto/zblobul_core/v6.9.30/plugins/liquidslider/js/jquery.touchSwipe.min.js?1790763342
16	plugins/auto/zblobul_core/v6.9.30/plugins/liquidslider/js/jquery.liquid-slider.min.js?1790763342
17	plugins/auto/zblobul_core/v6.9.30/plugins/masonry/imagesloaded.pkgd.min.js?1790763342
18	plugins/auto/zblobul_core/v6.9.30/plugins/masonry/masonry.pkgd.min.js?1790763342
19	plugins/auto/zblobul_core/v6.9.30/plugins/accordion/js/jquery.accordion.js?1790763342
20	plugins/auto/association/v6.10.2.3/javascript/inscription-evenement-tarifs.js?1790948514
21	plugins-dist/mediabox/lib/lity/lity.js?1790327464
22	plugins-dist/mediabox/lity/js/lity.mediabox.js?1790327464
23	plugins-dist/mediabox/javascript/spip.mediabox.js?1790327464
24	plugins-dist/porte_plume/javascript/jquery.markitup_pour_spip.js?1790327464
25	plugins-dist/porte_plume/javascript/jquery.previsu_spip.js?1790327464
26	local/cache-js/jsdyn-javascript_porte_plume_start_js-6f94d35e.js?1790959678
27	local/couteau-suisse/header.js
28] 61.7% */
29
30/* prive/javascript/jquery.js?1790327464 */
31
32(function(global,factory){
33"use strict";
34if(typeof module==="object"&&typeof module.exports==="object"){
35module.exports=global.document?
36factory(global,true):
37function(w){
38if(!w.document){
39throw new Error("jQuery requires a window with a document");
40}
41return factory(w);
42};
43}else{
44factory(global);
45}
46})(typeof window!=="undefined"?window:this,function(window,noGlobal){
47"use strict";
48var arr=[];
49var getProto=Object.getPrototypeOf;
50var slice=arr.slice;
51var flat=arr.flat?function(array){
52return arr.flat.call(array);
53}:function(array){
54return arr.concat.apply([],array);
55};
56var push=arr.push;
57var indexOf=arr.indexOf;
58var class2type={};
59var toString=class2type.toString;
60var hasOwn=class2type.hasOwnProperty;
61var fnToString=hasOwn.toString;
62var ObjectFunctionString=fnToString.call(Object);
63var support={};
64var isFunction=function isFunction(obj){
65return typeof obj==="function"&&typeof obj.nodeType!=="number"&&
66typeof obj.item!=="function";
67};
68var isWindow=function isWindow(obj){
69return obj!=null&&obj===obj.window;
70};
71var document=window.document;
72var preservedScriptAttributes={
73type:true,
74src:true,
75nonce:true,
76noModule:true
77};
78function DOMEval(code,node,doc){
79doc=doc||document;
80var i,val,
81script=doc.createElement("script");
82script.text=code;
83if(node){
84for(i in preservedScriptAttributes){
85val=node[i]||node.getAttribute&&node.getAttribute(i);
86if(val){
87script.setAttribute(i,val);
88}
89}
90}
91doc.head.appendChild(script).parentNode.removeChild(script);
92}
93function toType(obj){
94if(obj==null){
95return obj+"";
96}
97return typeof obj==="object"||typeof obj==="function"?
98class2type[toString.call(obj)]||"object":
99typeof obj;
100}
101var version="3.7.1",
102rhtmlSuffix=/HTML$/i,
103jQuery=function(selector,context){
104return new jQuery.fn.init(selector,context);
105};
106jQuery.fn=jQuery.prototype={
107jquery:version,
108constructor:jQuery,
109length:0,
110toArray:function(){
111return slice.call(this);
112},
113get:function(num){
114if(num==null){
115return slice.call(this);
116}
117return num<0?this[num+this.length]:this[num];
118},
119pushStack:function(elems){
120var ret=jQuery.merge(this.constructor(),elems);
121ret.prevObject=this;
122return ret;
123},
124each:function(callback){
125return jQuery.each(this,callback);
126},
127map:function(callback){
128return this.pushStack(jQuery.map(this,function(elem,i){
129return callback.call(elem,i,elem);
130}));
131},
132slice:function(){
133return this.pushStack(slice.apply(this,arguments));
134},
135first:function(){
136return this.eq(0);
137},
138last:function(){
139return this.eq(-1);
140},
141even:function(){
142return this.pushStack(jQuery.grep(this,function(_elem,i){
143return(i+1)%2;
144}));
145},
146odd:function(){
147return this.pushStack(jQuery.grep(this,function(_elem,i){
148return i%2;
149}));
150},
151eq:function(i){
152var len=this.length,
153j=+i+(i<0?len:0);
154return this.pushStack(j>=0&&j<len?[this[j]]:[]);
155},
156end:function(){
157return this.prevObject||this.constructor();
158},
159push:push,
160sort:arr.sort,
161splice:arr.splice
162};
163jQuery.extend=jQuery.fn.extend=function(){
164var options,name,src,copy,copyIsArray,clone,
165target=arguments[0]||{},
166i=1,
167length=arguments.length,
168deep=false;
169if(typeof target==="boolean"){
170deep=target;
171target=arguments[i]||{};
172i++;
173}
174if(typeof target!=="object"&&!isFunction(target)){
175target={};
176}
177if(i===length){
178target=this;
179i--;
180}
181for(;i<length;i++){
182if((options=arguments[i])!=null){
183for(name in options){
184copy=options[name];
185if(name==="__proto__"||target===copy){
186continue;
187}
188if(deep&&copy&&(jQuery.isPlainObject(copy)||
189(copyIsArray=Array.isArray(copy)))){
190src=target[name];
191if(copyIsArray&&!Array.isArray(src)){
192clone=[];
193}else if(!copyIsArray&&!jQuery.isPlainObject(src)){
194clone={};
195}else{
196clone=src;
197}
198copyIsArray=false;
199target[name]=jQuery.extend(deep,clone,copy);
200}else if(copy!==undefined){
201target[name]=copy;
202}
203}
204}
205}
206return target;
207};
208jQuery.extend({
209expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),
210isReady:true,
211error:function(msg){
212throw new Error(msg);
213},
214noop:function(){},
215isPlainObject:function(obj){
216var proto,Ctor;
217if(!obj||toString.call(obj)!=="[object Object]"){
218return false;
219}
220proto=getProto(obj);
221if(!proto){
222return true;
223}
224Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;
225return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;
226},
227isEmptyObject:function(obj){
228var name;
229for(name in obj){
230return false;
231}
232return true;
233},
234globalEval:function(code,options,doc){
235DOMEval(code,{nonce:options&&options.nonce},doc);
236},
237each:function(obj,callback){
238var length,i=0;
239if(isArrayLike(obj)){
240length=obj.length;
241for(;i<length;i++){
242if(callback.call(obj[i],i,obj[i])===false){
243break;
244}
245}
246}else{
247for(i in obj){
248if(callback.call(obj[i],i,obj[i])===false){
249break;
250}
251}
252}
253return obj;
254},
255text:function(elem){
256var node,
257ret="",
258i=0,
259nodeType=elem.nodeType;
260if(!nodeType){
261while((node=elem[i++])){
262ret+=jQuery.text(node);
263}
264}
265if(nodeType===1||nodeType===11){
266return elem.textContent;
267}
268if(nodeType===9){
269return elem.documentElement.textContent;
270}
271if(nodeType===3||nodeType===4){
272return elem.nodeValue;
273}
274return ret;
275},
276makeArray:function(arr,results){
277var ret=results||[];
278if(arr!=null){
279if(isArrayLike(Object(arr))){
280jQuery.merge(ret,
281typeof arr==="string"?
282[arr]:arr
283);
284}else{
285push.call(ret,arr);
286}
287}
288return ret;
289},
290inArray:function(elem,arr,i){
291return arr==null?-1:indexOf.call(arr,elem,i);
292},
293isXMLDoc:function(elem){
294var namespace=elem&&elem.namespaceURI,
295docElem=elem&&(elem.ownerDocument||elem).documentElement;
296return!rhtmlSuffix.test(namespace||docElem&&docElem.nodeName||"HTML");
297},
298merge:function(first,second){
299var len=+second.length,
300j=0,
301i=first.length;
302for(;j<len;j++){
303first[i++]=second[j];
304}
305first.length=i;
306return first;
307},
308grep:function(elems,callback,invert){
309var callbackInverse,
310matches=[],
311i=0,
312length=elems.length,
313callbackExpect=!invert;
314for(;i<length;i++){
315callbackInverse=!callback(elems[i],i);
316if(callbackInverse!==callbackExpect){
317matches.push(elems[i]);
318}
319}
320return matches;
321},
322map:function(elems,callback,arg){
323var length,value,
324i=0,
325ret=[];
326if(isArrayLike(elems)){
327length=elems.length;
328for(;i<length;i++){
329value=callback(elems[i],i,arg);
330if(value!=null){
331ret.push(value);
332}
333}
334}else{
335for(i in elems){
336value=callback(elems[i],i,arg);
337if(value!=null){
338ret.push(value);
339}
340}
341}
342return flat(ret);
343},
344guid:1,
345support:support
346});
347if(typeof Symbol==="function"){
348jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];
349}
350jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
351function(_i,name){
352class2type["[object "+name+"]"]=name.toLowerCase();
353});
354function isArrayLike(obj){
355var length=!!obj&&"length"in obj&&obj.length,
356type=toType(obj);
357if(isFunction(obj)||isWindow(obj)){
358return false;
359}
360return type==="array"||length===0||
361typeof length==="number"&&length>0&&(length-1)in obj;
362}
363function nodeName(elem,name){
364return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();
365}
366var pop=arr.pop;
367var sort=arr.sort;
368var splice=arr.splice;
369var whitespace="[\\x20\\t\\r\\n\\f]";
370var rtrimCSS=new RegExp(
371"^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$",
372"g"
373);
374jQuery.contains=function(a,b){
375var bup=b&&b.parentNode;
376return a===bup||!!(bup&&bup.nodeType===1&&(
377a.contains?
378a.contains(bup):
379a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16
380));
381};
382var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
383function fcssescape(ch,asCodePoint){
384if(asCodePoint){
385if(ch==="\0"){
386return"\uFFFD";
387}
388return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";
389}
390return"\\"+ch;
391}
392jQuery.escapeSelector=function(sel){
393return(sel+"").replace(rcssescape,fcssescape);
394};
395var preferredDoc=document,
396pushNative=push;
397(function(){
398var i,
399Expr,
400outermostContext,
401sortInput,
402hasDuplicate,
403push=pushNative,
404document,
405documentElement,
406documentIsHTML,
407rbuggyQSA,
408matches,
409expando=jQuery.expando,
410dirruns=0,
411done=0,
412classCache=createCache(),
413tokenCache=createCache(),
414compilerCache=createCache(),
415nonnativeSelectorCache=createCache(),
416sortOrder=function(a,b){
417if(a===b){
418hasDuplicate=true;
419}
420return 0;
421},
422booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|"+
423"loop|multiple|open|readonly|required|scoped",
424identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+
425"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
426attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+
427"*([*^$|!~]?=)"+whitespace+
428"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+
429whitespace+"*\\]",
430pseudos=":("+identifier+")(?:\\(("+
431"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+
432"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+
433".*"+
434")\\)|)",
435rwhitespace=new RegExp(whitespace+"+","g"),
436rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),
437rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+
438whitespace+"*"),
439rdescend=new RegExp(whitespace+"|>"),
440rpseudo=new RegExp(pseudos),
441ridentifier=new RegExp("^"+identifier+"$"),
442matchExpr={
443ID:new RegExp("^#("+identifier+")"),
444CLASS:new RegExp("^\\.("+identifier+")"),
445TAG:new RegExp("^("+identifier+"|[*])"),
446ATTR:new RegExp("^"+attributes),
447PSEUDO:new RegExp("^"+pseudos),
448CHILD:new RegExp(
449"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+
450whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+
451whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),
452bool:new RegExp("^(?:"+booleans+")$","i"),
453needsContext:new RegExp("^"+whitespace+
454"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+
455"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")
456},
457rinputs=/^(?:input|select|textarea|button)$/i,
458rheader=/^h\d$/i,
459rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
460rsibling=/[+~]/,
461runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+
462"?|\\\\([^\\r\\n\\f])","g"),
463funescape=function(escape,nonHex){
464var high="0x"+escape.slice(1)-0x10000;
465if(nonHex){
466return nonHex;
467}
468return high<0?
469String.fromCharCode(high+0x10000):
470String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);
471},
472unloadHandler=function(){
473setDocument();
474},
475inDisabledFieldset=addCombinator(
476function(elem){
477return elem.disabled===true&&nodeName(elem,"fieldset");
478},
479{dir:"parentNode",next:"legend"}
480);
481function safeActiveElement(){
482try{
483return document.activeElement;
484}catch(err){}
485}
486try{
487push.apply(
488(arr=slice.call(preferredDoc.childNodes)),
489preferredDoc.childNodes
490);
491arr[preferredDoc.childNodes.length].nodeType;
492}catch(e){
493push={
494apply:function(target,els){
495pushNative.apply(target,slice.call(els));
496},
497call:function(target){
498pushNative.apply(target,slice.call(arguments,1));
499}
500};
501}
502function find(selector,context,results,seed){
503var m,i,elem,nid,match,groups,newSelector,
504newContext=context&&context.ownerDocument,
505nodeType=context?context.nodeType:9;
506results=results||[];
507if(typeof selector!=="string"||!selector||
508nodeType!==1&&nodeType!==9&&nodeType!==11){
509return results;
510}
511if(!seed){
512setDocument(context);
513context=context||document;
514if(documentIsHTML){
515if(nodeType!==11&&(match=rquickExpr.exec(selector))){
516if((m=match[1])){
517if(nodeType===9){
518if((elem=context.getElementById(m))){
519if(elem.id===m){
520push.call(results,elem);
521return results;
522}
523}else{
524return results;
525}
526}else{
527if(newContext&&(elem=newContext.getElementById(m))&&
528find.contains(context,elem)&&
529elem.id===m){
530push.call(results,elem);
531return results;
532}
533}
534}else if(match[2]){
535push.apply(results,context.getElementsByTagName(selector));
536return results;
537}else if((m=match[3])&&context.getElementsByClassName){
538push.apply(results,context.getElementsByClassName(m));
539return results;
540}
541}
542if(!nonnativeSelectorCache[selector+" "]&&
543(!rbuggyQSA||!rbuggyQSA.test(selector))){
544newSelector=selector;
545newContext=context;
546if(nodeType===1&&
547(rdescend.test(selector)||rleadingCombinator.test(selector))){
548newContext=rsibling.test(selector)&&testContext(context.parentNode)||
549context;
550if(newContext!=context||!support.scope){
551if((nid=context.getAttribute("id"))){
552nid=jQuery.escapeSelector(nid);
553}else{
554context.setAttribute("id",(nid=expando));
555}
556}
557groups=tokenize(selector);
558i=groups.length;
559while(i--){
560groups[i]=(nid?"#"+nid:":scope")+" "+
561toSelector(groups[i]);
562}
563newSelector=groups.join(",");
564}
565try{
566push.apply(results,
567newContext.querySelectorAll(newSelector)
568);
569return results;
570}catch(qsaError){
571nonnativeSelectorCache(selector,true);
572}finally{
573if(nid===expando){
574context.removeAttribute("id");
575}
576}
577}
578}
579}
580return select(selector.replace(rtrimCSS,"$1"),context,results,seed);
581}
582function createCache(){
583var keys=[];
584function cache(key,value){
585if(keys.push(key+" ")>Expr.cacheLength){
586delete cache[keys.shift()];
587}
588return(cache[key+" "]=value);
589}
590return cache;
591}
592function markFunction(fn){
593fn[expando]=true;
594return fn;
595}
596function assert(fn){
597var el=document.createElement("fieldset");
598try{
599return!!fn(el);
600}catch(e){
601return false;
602}finally{
603if(el.parentNode){
604el.parentNode.removeChild(el);
605}
606el=null;
607}
608}
609function createInputPseudo(type){
610return function(elem){
611return nodeName(elem,"input")&&elem.type===type;
612};
613}
614function createButtonPseudo(type){
615return function(elem){
616return(nodeName(elem,"input")||nodeName(elem,"button"))&&
617elem.type===type;
618};
619}
620function createDisabledPseudo(disabled){
621return function(elem){
622if("form"in elem){
623if(elem.parentNode&&elem.disabled===false){
624if("label"in elem){
625if("label"in elem.parentNode){
626return elem.parentNode.disabled===disabled;
627}else{
628return elem.disabled===disabled;
629}
630}
631return elem.isDisabled===disabled||
632elem.isDisabled!==!disabled&&
633inDisabledFieldset(elem)===disabled;
634}
635return elem.disabled===disabled;
636}else if("label"in elem){
637return elem.disabled===disabled;
638}
639return false;
640};
641}
642function createPositionalPseudo(fn){
643return markFunction(function(argument){
644argument=+argument;
645return markFunction(function(seed,matches){
646var j,
647matchIndexes=fn([],seed.length,argument),
648i=matchIndexes.length;
649while(i--){
650if(seed[(j=matchIndexes[i])]){
651seed[j]=!(matches[j]=seed[j]);
652}
653}
654});
655});
656}
657function testContext(context){
658return context&&typeof context.getElementsByTagName!=="undefined"&&context;
659}
660function setDocument(node){
661var subWindow,
662doc=node?node.ownerDocument||node:preferredDoc;
663if(doc==document||doc.nodeType!==9||!doc.documentElement){
664return document;
665}
666document=doc;
667documentElement=document.documentElement;
668documentIsHTML=!jQuery.isXMLDoc(document);
669matches=documentElement.matches||
670documentElement.webkitMatchesSelector||
671documentElement.msMatchesSelector;
672if(documentElement.msMatchesSelector&&
673preferredDoc!=document&&
674(subWindow=document.defaultView)&&subWindow.top!==subWindow){
675subWindow.addEventListener("unload",unloadHandler);
676}
677support.getById=assert(function(el){
678documentElement.appendChild(el).id=jQuery.expando;
679return!document.getElementsByName||
680!document.getElementsByName(jQuery.expando).length;
681});
682support.disconnectedMatch=assert(function(el){
683return matches.call(el,"*");
684});
685support.scope=assert(function(){
686return document.querySelectorAll(":scope");
687});
688support.cssHas=assert(function(){
689try{
690document.querySelector(":has(*,:jqfake)");
691return false;
692}catch(e){
693return true;
694}
695});
696if(support.getById){
697Expr.filter.ID=function(id){
698var attrId=id.replace(runescape,funescape);
699return function(elem){
700return elem.getAttribute("id")===attrId;
701};
702};
703Expr.find.ID=function(id,context){
704if(typeof context.getElementById!=="undefined"&&documentIsHTML){
705var elem=context.getElementById(id);
706return elem?[elem]:[];
707}
708};
709}else{
710Expr.filter.ID=function(id){
711var attrId=id.replace(runescape,funescape);
712return function(elem){
713var node=typeof elem.getAttributeNode!=="undefined"&&
714elem.getAttributeNode("id");
715return node&&node.value===attrId;
716};
717};
718Expr.find.ID=function(id,context){
719if(typeof context.getElementById!=="undefined"&&documentIsHTML){
720var node,i,elems,
721elem=context.getElementById(id);
722if(elem){
723node=elem.getAttributeNode("id");
724if(node&&node.value===id){
725return[elem];
726}
727elems=context.getElementsByName(id);
728i=0;
729while((elem=elems[i++])){
730node=elem.getAttributeNode("id");
731if(node&&node.value===id){
732return[elem];
733}
734}
735}
736return[];
737}
738};
739}
740Expr.find.TAG=function(tag,context){
741if(typeof context.getElementsByTagName!=="undefined"){
742return context.getElementsByTagName(tag);
743}else{
744return context.querySelectorAll(tag);
745}
746};
747Expr.find.CLASS=function(className,context){
748if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){
749return context.getElementsByClassName(className);
750}
751};
752rbuggyQSA=[];
753assert(function(el){
754var input;
755documentElement.appendChild(el).innerHTML=
756"<a id='"+expando+"' href='' disabled='disabled'></a>"+
757"<select id='"+expando+"-\r\\' disabled='disabled'>"+
758"<option selected=''></option></select>";
759if(!el.querySelectorAll("[selected]").length){
760rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");
761}
762if(!el.querySelectorAll("[id~="+expando+"-]").length){
763rbuggyQSA.push("~=");
764}
765if(!el.querySelectorAll("a#"+expando+"+*").length){
766rbuggyQSA.push(".#.+[+~]");
767}
768if(!el.querySelectorAll(":checked").length){
769rbuggyQSA.push(":checked");
770}
771input=document.createElement("input");
772input.setAttribute("type","hidden");
773el.appendChild(input).setAttribute("name","D");
774documentElement.appendChild(el).disabled=true;
775if(el.querySelectorAll(":disabled").length!==2){
776rbuggyQSA.push(":enabled",":disabled");
777}
778input=document.createElement("input");
779input.setAttribute("name","");
780el.appendChild(input);
781if(!el.querySelectorAll("[name='']").length){
782rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+
783whitespace+"*(?:''|\"\")");
784}
785});
786if(!support.cssHas){
787rbuggyQSA.push(":has");
788}
789rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));
790sortOrder=function(a,b){
791if(a===b){
792hasDuplicate=true;
793return 0;
794}
795var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;
796if(compare){
797return compare;
798}
799compare=(a.ownerDocument||a)==(b.ownerDocument||b)?
800a.compareDocumentPosition(b):
8011;
802if(compare&1||
803(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){
804if(a===document||a.ownerDocument==preferredDoc&&
805find.contains(preferredDoc,a)){
806return-1;
807}
808if(b===document||b.ownerDocument==preferredDoc&&
809find.contains(preferredDoc,b)){
810return 1;
811}
812return sortInput?
813(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):
8140;
815}
816return compare&4?-1:1;
817};
818return document;
819}
820find.matches=function(expr,elements){
821return find(expr,null,null,elements);
822};
823find.matchesSelector=function(elem,expr){
824setDocument(elem);
825if(documentIsHTML&&
826!nonnativeSelectorCache[expr+" "]&&
827(!rbuggyQSA||!rbuggyQSA.test(expr))){
828try{
829var ret=matches.call(elem,expr);
830if(ret||support.disconnectedMatch||
831elem.document&&elem.document.nodeType!==11){
832return ret;
833}
834}catch(e){
835nonnativeSelectorCache(expr,true);
836}
837}
838return find(expr,document,null,[elem]).length>0;
839};
840find.contains=function(context,elem){
841if((context.ownerDocument||context)!=document){
842setDocument(context);
843}
844return jQuery.contains(context,elem);
845};
846find.attr=function(elem,name){
847if((elem.ownerDocument||elem)!=document){
848setDocument(elem);
849}
850var fn=Expr.attrHandle[name.toLowerCase()],
851val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?
852fn(elem,name,!documentIsHTML):
853undefined;
854if(val!==undefined){
855return val;
856}
857return elem.getAttribute(name);
858};
859find.error=function(msg){
860throw new Error("Syntax error, unrecognized expression: "+msg);
861};
862jQuery.uniqueSort=function(results){
863var elem,
864duplicates=[],
865j=0,
866i=0;
867hasDuplicate=!support.sortStable;
868sortInput=!support.sortStable&&slice.call(results,0);
869sort.call(results,sortOrder);
870if(hasDuplicate){
871while((elem=results[i++])){
872if(elem===results[i]){
873j=duplicates.push(i);
874}
875}
876while(j--){
877splice.call(results,duplicates[j],1);
878}
879}
880sortInput=null;
881return results;
882};
883jQuery.fn.uniqueSort=function(){
884return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
885};
886Expr=jQuery.expr={
887cacheLength:50,
888createPseudo:markFunction,
889match:matchExpr,
890attrHandle:{},
891find:{},
892relative:{
893">":{dir:"parentNode",first:true},
894" ":{dir:"parentNode"},
895"+":{dir:"previousSibling",first:true},
896"~":{dir:"previousSibling"}
897},
898preFilter:{
899ATTR:function(match){
900match[1]=match[1].replace(runescape,funescape);
901match[3]=(match[3]||match[4]||match[5]||"")
902.replace(runescape,funescape);
903if(match[2]==="~="){
904match[3]=" "+match[3]+" ";
905}
906return match.slice(0,4);
907},
908CHILD:function(match){
909match[1]=match[1].toLowerCase();
910if(match[1].slice(0,3)==="nth"){
911if(!match[3]){
912find.error(match[0]);
913}
914match[4]=+(match[4]?
915match[5]+(match[6]||1):
9162*(match[3]==="even"||match[3]==="odd")
917);
918match[5]=+((match[7]+match[8])||match[3]==="odd");
919}else if(match[3]){
920find.error(match[0]);
921}
922return match;
923},
924PSEUDO:function(match){
925var excess,
926unquoted=!match[6]&&match[2];
927if(matchExpr.CHILD.test(match[0])){
928return null;
929}
930if(match[3]){
931match[2]=match[4]||match[5]||"";
932}else if(unquoted&&rpseudo.test(unquoted)&&
933(excess=tokenize(unquoted,true))&&
934(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){
935match[0]=match[0].slice(0,excess);
936match[2]=unquoted.slice(0,excess);
937}
938return match.slice(0,3);
939}
940},
941filter:{
942TAG:function(nodeNameSelector){
943var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();
944return nodeNameSelector==="*"?
945function(){
946return true;
947}:
948function(elem){
949return nodeName(elem,expectedNodeName);
950};
951},
952CLASS:function(className){
953var pattern=classCache[className+" "];
954return pattern||
955(pattern=new RegExp("(^|"+whitespace+")"+className+
956"("+whitespace+"|$)"))&&
957classCache(className,function(elem){
958return pattern.test(
959typeof elem.className==="string"&&elem.className||
960typeof elem.getAttribute!=="undefined"&&
961elem.getAttribute("class")||
962""
963);
964});
965},
966ATTR:function(name,operator,check){
967return function(elem){
968var result=find.attr(elem,name);
969if(result==null){
970return operator==="!=";
971}
972if(!operator){
973return true;
974}
975result+="";
976if(operator==="="){
977return result===check;
978}
979if(operator==="!="){
980return result!==check;
981}
982if(operator==="^="){
983return check&&result.indexOf(check)===0;
984}
985if(operator==="*="){
986return check&&result.indexOf(check)>-1;
987}
988if(operator==="$="){
989return check&&result.slice(-check.length)===check;
990}
991if(operator==="~="){
992return(" "+result.replace(rwhitespace," ")+" ")
993.indexOf(check)>-1;
994}
995if(operator==="|="){
996return result===check||result.slice(0,check.length+1)===check+"-";
997}
998return false;
999};
1000},
1001CHILD:function(type,what,_argument,first,last){
1002var simple=type.slice(0,3)!=="nth",
1003forward=type.slice(-4)!=="last",
1004ofType=what==="of-type";
1005return first===1&&last===0?
1006function(elem){
1007return!!elem.parentNode;
1008}:
1009function(elem,_context,xml){
1010var cache,outerCache,node,nodeIndex,start,
1011dir=simple!==forward?"nextSibling":"previousSibling",
1012parent=elem.parentNode,
1013name=ofType&&elem.nodeName.toLowerCase(),
1014useCache=!xml&&!ofType,
1015diff=false;
1016if(parent){
1017if(simple){
1018while(dir){
1019node=elem;
1020while((node=node[dir])){
1021if(ofType?
1022nodeName(node,name):
1023node.nodeType===1){
1024return false;
1025}
1026}
1027start=dir=type==="only"&&!start&&"nextSibling";
1028}
1029return true;
1030}
1031start=[forward?parent.firstChild:parent.lastChild];
1032if(forward&&useCache){
1033outerCache=parent[expando]||(parent[expando]={});
1034cache=outerCache[type]||[];
1035nodeIndex=cache[0]===dirruns&&cache[1];
1036diff=nodeIndex&&cache[2];
1037node=nodeIndex&&parent.childNodes[nodeIndex];
1038while((node=++nodeIndex&&node&&node[dir]||
1039(diff=nodeIndex=0)||start.pop())){
1040if(node.nodeType===1&&++diff&&node===elem){
1041outerCache[type]=[dirruns,nodeIndex,diff];
1042break;
1043}
1044}
1045}else{
1046if(useCache){
1047outerCache=elem[expando]||(elem[expando]={});
1048cache=outerCache[type]||[];
1049nodeIndex=cache[0]===dirruns&&cache[1];
1050diff=nodeIndex;
1051}
1052if(diff===false){
1053while((node=++nodeIndex&&node&&node[dir]||
1054(diff=nodeIndex=0)||start.pop())){
1055if((ofType?
1056nodeName(node,name):
1057node.nodeType===1)&&
1058++diff){
1059if(useCache){
1060outerCache=node[expando]||
1061(node[expando]={});
1062outerCache[type]=[dirruns,diff];
1063}
1064if(node===elem){
1065break;
1066}
1067}
1068}
1069}
1070}
1071diff-=last;
1072return diff===first||(diff%first===0&&diff/first>=0);
1073}
1074};
1075},
1076PSEUDO:function(pseudo,argument){
1077var args,
1078fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||
1079find.error("unsupported pseudo: "+pseudo);
1080if(fn[expando]){
1081return fn(argument);
1082}
1083if(fn.length>1){
1084args=[pseudo,pseudo,"",argument];
1085return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?
1086markFunction(function(seed,matches){
1087var idx,
1088matched=fn(seed,argument),
1089i=matched.length;
1090while(i--){
1091idx=indexOf.call(seed,matched[i]);
1092seed[idx]=!(matches[idx]=matched[i]);
1093}
1094}):
1095function(elem){
1096return fn(elem,0,args);
1097};
1098}
1099return fn;
1100}
1101},
1102pseudos:{
1103not:markFunction(function(selector){
1104var input=[],
1105results=[],
1106matcher=compile(selector.replace(rtrimCSS,"$1"));
1107return matcher[expando]?
1108markFunction(function(seed,matches,_context,xml){
1109var elem,
1110unmatched=matcher(seed,null,xml,[]),
1111i=seed.length;
1112while(i--){
1113if((elem=unmatched[i])){
1114seed[i]=!(matches[i]=elem);
1115}
1116}
1117}):
1118function(elem,_context,xml){
1119input[0]=elem;
1120matcher(input,null,xml,results);
1121input[0]=null;
1122return!results.pop();
1123};
1124}),
1125has:markFunction(function(selector){
1126return function(elem){
1127return find(selector,elem).length>0;
1128};
1129}),
1130contains:markFunction(function(text){
1131text=text.replace(runescape,funescape);
1132return function(elem){
1133return(elem.textContent||jQuery.text(elem)).indexOf(text)>-1;
1134};
1135}),
1136lang:markFunction(function(lang){
1137if(!ridentifier.test(lang||"")){
1138find.error("unsupported lang: "+lang);
1139}
1140lang=lang.replace(runescape,funescape).toLowerCase();
1141return function(elem){
1142var elemLang;
1143do{
1144if((elemLang=documentIsHTML?
1145elem.lang:
1146elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){
1147elemLang=elemLang.toLowerCase();
1148return elemLang===lang||elemLang.indexOf(lang+"-")===0;
1149}
1150}while((elem=elem.parentNode)&&elem.nodeType===1);
1151return false;
1152};
1153}),
1154target:function(elem){
1155var hash=window.location&&window.location.hash;
1156return hash&&hash.slice(1)===elem.id;
1157},
1158root:function(elem){
1159return elem===documentElement;
1160},
1161focus:function(elem){
1162return elem===safeActiveElement()&&
1163document.hasFocus()&&
1164!!(elem.type||elem.href||~elem.tabIndex);
1165},
1166enabled:createDisabledPseudo(false),
1167disabled:createDisabledPseudo(true),
1168checked:function(elem){
1169return(nodeName(elem,"input")&&!!elem.checked)||
1170(nodeName(elem,"option")&&!!elem.selected);
1171},
1172selected:function(elem){
1173if(elem.parentNode){
1174elem.parentNode.selectedIndex;
1175}
1176return elem.selected===true;
1177},
1178empty:function(elem){
1179for(elem=elem.firstChild;elem;elem=elem.nextSibling){
1180if(elem.nodeType<6){
1181return false;
1182}
1183}
1184return true;
1185},
1186parent:function(elem){
1187return!Expr.pseudos.empty(elem);
1188},
1189header:function(elem){
1190return rheader.test(elem.nodeName);
1191},
1192input:function(elem){
1193return rinputs.test(elem.nodeName);
1194},
1195button:function(elem){
1196return nodeName(elem,"input")&&elem.type==="button"||
1197nodeName(elem,"button");
1198},
1199text:function(elem){
1200var attr;
1201return nodeName(elem,"input")&&elem.type==="text"&&
1202((attr=elem.getAttribute("type"))==null||
1203attr.toLowerCase()==="text");
1204},
1205first:createPositionalPseudo(function(){
1206return[0];
1207}),
1208last:createPositionalPseudo(function(_matchIndexes,length){
1209return[length-1];
1210}),
1211eq:createPositionalPseudo(function(_matchIndexes,length,argument){
1212return[argument<0?argument+length:argument];
1213}),
1214even:createPositionalPseudo(function(matchIndexes,length){
1215var i=0;
1216for(;i<length;i+=2){
1217matchIndexes.push(i);
1218}
1219return matchIndexes;
1220}),
1221odd:createPositionalPseudo(function(matchIndexes,length){
1222var i=1;
1223for(;i<length;i+=2){
1224matchIndexes.push(i);
1225}
1226return matchIndexes;
1227}),
1228lt:createPositionalPseudo(function(matchIndexes,length,argument){
1229var i;
1230if(argument<0){
1231i=argument+length;
1232}else if(argument>length){
1233i=length;
1234}else{
1235i=argument;
1236}
1237for(;--i>=0;){
1238matchIndexes.push(i);
1239}
1240return matchIndexes;
1241}),
1242gt:createPositionalPseudo(function(matchIndexes,length,argument){
1243var i=argument<0?argument+length:argument;
1244for(;++i<length;){
1245matchIndexes.push(i);
1246}
1247return matchIndexes;
1248})
1249}
1250};
1251Expr.pseudos.nth=Expr.pseudos.eq;
1252for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){
1253Expr.pseudos[i]=createInputPseudo(i);
1254}
1255for(i in{submit:true,reset:true}){
1256Expr.pseudos[i]=createButtonPseudo(i);
1257}
1258function setFilters(){}
1259setFilters.prototype=Expr.filters=Expr.pseudos;
1260Expr.setFilters=new setFilters();
1261function tokenize(selector,parseOnly){
1262var matched,match,tokens,type,
1263soFar,groups,preFilters,
1264cached=tokenCache[selector+" "];
1265if(cached){
1266return parseOnly?0:cached.slice(0);
1267}
1268soFar=selector;
1269groups=[];
1270preFilters=Expr.preFilter;
1271while(soFar){
1272if(!matched||(match=rcomma.exec(soFar))){
1273if(match){
1274soFar=soFar.slice(match[0].length)||soFar;
1275}
1276groups.push((tokens=[]));
1277}
1278matched=false;
1279if((match=rleadingCombinator.exec(soFar))){
1280matched=match.shift();
1281tokens.push({
1282value:matched,
1283type:match[0].replace(rtrimCSS," ")
1284});
1285soFar=soFar.slice(matched.length);
1286}
1287for(type in Expr.filter){
1288if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||
1289(match=preFilters[type](match)))){
1290matched=match.shift();
1291tokens.push({
1292value:matched,
1293type:type,
1294matches:match
1295});
1296soFar=soFar.slice(matched.length);
1297}
1298}
1299if(!matched){
1300break;
1301}
1302}
1303if(parseOnly){
1304return soFar.length;
1305}
1306return soFar?
1307find.error(selector):
1308tokenCache(selector,groups).slice(0);
1309}
1310function toSelector(tokens){
1311var i=0,
1312len=tokens.length,
1313selector="";
1314for(;i<len;i++){
1315selector+=tokens[i].value;
1316}
1317return selector;
1318}
1319function addCombinator(matcher,combinator,base){
1320var dir=combinator.dir,
1321skip=combinator.next,
1322key=skip||dir,
1323checkNonElements=base&&key==="parentNode",
1324doneName=done++;
1325return combinator.first?
1326function(elem,context,xml){
1327while((elem=elem[dir])){
1328if(elem.nodeType===1||checkNonElements){
1329return matcher(elem,context,xml);
1330}
1331}
1332return false;
1333}:
1334function(elem,context,xml){
1335var oldCache,outerCache,
1336newCache=[dirruns,doneName];
1337if(xml){
1338while((elem=elem[dir])){
1339if(elem.nodeType===1||checkNonElements){
1340if(matcher(elem,context,xml)){
1341return true;
1342}
1343}
1344}
1345}else{
1346while((elem=elem[dir])){
1347if(elem.nodeType===1||checkNonElements){
1348outerCache=elem[expando]||(elem[expando]={});
1349if(skip&&nodeName(elem,skip)){
1350elem=elem[dir]||elem;
1351}else if((oldCache=outerCache[key])&&
1352oldCache[0]===dirruns&&oldCache[1]===doneName){
1353return(newCache[2]=oldCache[2]);
1354}else{
1355outerCache[key]=newCache;
1356if((newCache[2]=matcher(elem,context,xml))){
1357return true;
1358}
1359}
1360}
1361}
1362}
1363return false;
1364};
1365}
1366function elementMatcher(matchers){
1367return matchers.length>1?
1368function(elem,context,xml){
1369var i=matchers.length;
1370while(i--){
1371if(!matchers[i](elem,context,xml)){
1372return false;
1373}
1374}
1375return true;
1376}:
1377matchers[0];
1378}
1379function multipleContexts(selector,contexts,results){
1380var i=0,
1381len=contexts.length;
1382for(;i<len;i++){
1383find(selector,contexts[i],results);
1384}
1385return results;
1386}
1387function condense(unmatched,map,filter,context,xml){
1388var elem,
1389newUnmatched=[],
1390i=0,
1391len=unmatched.length,
1392mapped=map!=null;
1393for(;i<len;i++){
1394if((elem=unmatched[i])){
1395if(!filter||filter(elem,context,xml)){
1396newUnmatched.push(elem);
1397if(mapped){
1398map.push(i);
1399}
1400}
1401}
1402}
1403return newUnmatched;
1404}
1405function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){
1406if(postFilter&&!postFilter[expando]){
1407postFilter=setMatcher(postFilter);
1408}
1409if(postFinder&&!postFinder[expando]){
1410postFinder=setMatcher(postFinder,postSelector);
1411}
1412return markFunction(function(seed,results,context,xml){
1413var temp,i,elem,matcherOut,
1414preMap=[],
1415postMap=[],
1416preexisting=results.length,
1417elems=seed||
1418multipleContexts(selector||"*",
1419context.nodeType?[context]:context,[]),
1420matcherIn=preFilter&&(seed||!selector)?
1421condense(elems,preMap,preFilter,context,xml):
1422elems;
1423if(matcher){
1424matcherOut=postFinder||(seed?preFilter:preexisting||postFilter)?
1425[]:
1426results;
1427matcher(matcherIn,matcherOut,context,xml);
1428}else{
1429matcherOut=matcherIn;
1430}
1431if(postFilter){
1432temp=condense(matcherOut,postMap);
1433postFilter(temp,[],context,xml);
1434i=temp.length;
1435while(i--){
1436if((elem=temp[i])){
1437matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);
1438}
1439}
1440}
1441if(seed){
1442if(postFinder||preFilter){
1443if(postFinder){
1444temp=[];
1445i=matcherOut.length;
1446while(i--){
1447if((elem=matcherOut[i])){
1448temp.push((matcherIn[i]=elem));
1449}
1450}
1451postFinder(null,(matcherOut=[]),temp,xml);
1452}
1453i=matcherOut.length;
1454while(i--){
1455if((elem=matcherOut[i])&&
1456(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1){
1457seed[temp]=!(results[temp]=elem);
1458}
1459}
1460}
1461}else{
1462matcherOut=condense(
1463matcherOut===results?
1464matcherOut.splice(preexisting,matcherOut.length):
1465matcherOut
1466);
1467if(postFinder){
1468postFinder(null,results,matcherOut,xml);
1469}else{
1470push.apply(results,matcherOut);
1471}
1472}
1473});
1474}
1475function matcherFromTokens(tokens){
1476var checkContext,matcher,j,
1477len=tokens.length,
1478leadingRelative=Expr.relative[tokens[0].type],
1479implicitRelative=leadingRelative||Expr.relative[" "],
1480i=leadingRelative?1:0,
1481matchContext=addCombinator(function(elem){
1482return elem===checkContext;
1483},implicitRelative,true),
1484matchAnyContext=addCombinator(function(elem){
1485return indexOf.call(checkContext,elem)>-1;
1486},implicitRelative,true),
1487matchers=[function(elem,context,xml){
1488var ret=(!leadingRelative&&(xml||context!=outermostContext))||(
1489(checkContext=context).nodeType?
1490matchContext(elem,context,xml):
1491matchAnyContext(elem,context,xml));
1492checkContext=null;
1493return ret;
1494}];
1495for(;i<len;i++){
1496if((matcher=Expr.relative[tokens[i].type])){
1497matchers=[addCombinator(elementMatcher(matchers),matcher)];
1498}else{
1499matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);
1500if(matcher[expando]){
1501j=++i;
1502for(;j<len;j++){
1503if(Expr.relative[tokens[j].type]){
1504break;
1505}
1506}
1507return setMatcher(
1508i>1&&elementMatcher(matchers),
1509i>1&&toSelector(
1510tokens.slice(0,i-1)
1511.concat({value:tokens[i-2].type===" "?"*":""})
1512).replace(rtrimCSS,"$1"),
1513matcher,
1514i<j&&matcherFromTokens(tokens.slice(i,j)),
1515j<len&&matcherFromTokens((tokens=tokens.slice(j))),
1516j<len&&toSelector(tokens)
1517);
1518}
1519matchers.push(matcher);
1520}
1521}
1522return elementMatcher(matchers);
1523}
1524function matcherFromGroupMatchers(elementMatchers,setMatchers){
1525var bySet=setMatchers.length>0,
1526byElement=elementMatchers.length>0,
1527superMatcher=function(seed,context,xml,results,outermost){
1528var elem,j,matcher,
1529matchedCount=0,
1530i="0",
1531unmatched=seed&&[],
1532setMatched=[],
1533contextBackup=outermostContext,
1534elems=seed||byElement&&Expr.find.TAG("*",outermost),
1535dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),
1536len=elems.length;
1537if(outermost){
1538outermostContext=context==document||context||outermost;
1539}
1540for(;i!==len&&(elem=elems[i])!=null;i++){
1541if(byElement&&elem){
1542j=0;
1543if(!context&&elem.ownerDocument!=document){
1544setDocument(elem);
1545xml=!documentIsHTML;
1546}
1547while((matcher=elementMatchers[j++])){
1548if(matcher(elem,context||document,xml)){
1549push.call(results,elem);
1550break;
1551}
1552}
1553if(outermost){
1554dirruns=dirrunsUnique;
1555}
1556}
1557if(bySet){
1558if((elem=!matcher&&elem)){
1559matchedCount--;
1560}
1561if(seed){
1562unmatched.push(elem);
1563}
1564}
1565}
1566matchedCount+=i;
1567if(bySet&&i!==matchedCount){
1568j=0;
1569while((matcher=setMatchers[j++])){
1570matcher(unmatched,setMatched,context,xml);
1571}
1572if(seed){
1573if(matchedCount>0){
1574while(i--){
1575if(!(unmatched[i]||setMatched[i])){
1576setMatched[i]=pop.call(results);
1577}
1578}
1579}
1580setMatched=condense(setMatched);
1581}
1582push.apply(results,setMatched);
1583if(outermost&&!seed&&setMatched.length>0&&
1584(matchedCount+setMatchers.length)>1){
1585jQuery.uniqueSort(results);
1586}
1587}
1588if(outermost){
1589dirruns=dirrunsUnique;
1590outermostContext=contextBackup;
1591}
1592return unmatched;
1593};
1594return bySet?
1595markFunction(superMatcher):
1596superMatcher;
1597}
1598function compile(selector,match){
1599var i,
1600setMatchers=[],
1601elementMatchers=[],
1602cached=compilerCache[selector+" "];
1603if(!cached){
1604if(!match){
1605match=tokenize(selector);
1606}
1607i=match.length;
1608while(i--){
1609cached=matcherFromTokens(match[i]);
1610if(cached[expando]){
1611setMatchers.push(cached);
1612}else{
1613elementMatchers.push(cached);
1614}
1615}
1616cached=compilerCache(selector,
1617matcherFromGroupMatchers(elementMatchers,setMatchers));
1618cached.selector=selector;
1619}
1620return cached;
1621}
1622function select(selector,context,results,seed){
1623var i,tokens,token,type,find,
1624compiled=typeof selector==="function"&&selector,
1625match=!seed&&tokenize((selector=compiled.selector||selector));
1626results=results||[];
1627if(match.length===1){
1628tokens=match[0]=match[0].slice(0);
1629if(tokens.length>2&&(token=tokens[0]).type==="ID"&&
1630context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){
1631context=(Expr.find.ID(
1632token.matches[0].replace(runescape,funescape),
1633context
1634)||[])[0];
1635if(!context){
1636return results;
1637}else if(compiled){
1638context=context.parentNode;
1639}
1640selector=selector.slice(tokens.shift().value.length);
1641}
1642i=matchExpr.needsContext.test(selector)?0:tokens.length;
1643while(i--){
1644token=tokens[i];
1645if(Expr.relative[(type=token.type)]){
1646break;
1647}
1648if((find=Expr.find[type])){
1649if((seed=find(
1650token.matches[0].replace(runescape,funescape),
1651rsibling.test(tokens[0].type)&&
1652testContext(context.parentNode)||context
1653))){
1654tokens.splice(i,1);
1655selector=seed.length&&toSelector(tokens);
1656if(!selector){
1657push.apply(results,seed);
1658return results;
1659}
1660break;
1661}
1662}
1663}
1664}
1665(compiled||compile(selector,match))(
1666seed,
1667context,
1668!documentIsHTML,
1669results,
1670!context||rsibling.test(selector)&&testContext(context.parentNode)||context
1671);
1672return results;
1673}
1674support.sortStable=expando.split("").sort(sortOrder).join("")===expando;
1675setDocument();
1676support.sortDetached=assert(function(el){
1677return el.compareDocumentPosition(document.createElement("fieldset"))&1;
1678});
1679jQuery.find=find;
1680jQuery.expr[":"]=jQuery.expr.pseudos;
1681jQuery.unique=jQuery.uniqueSort;
1682find.compile=compile;
1683find.select=select;
1684find.setDocument=setDocument;
1685find.tokenize=tokenize;
1686find.escape=jQuery.escapeSelector;
1687find.getText=jQuery.text;
1688find.isXML=jQuery.isXMLDoc;
1689find.selectors=jQuery.expr;
1690find.support=jQuery.support;
1691find.uniqueSort=jQuery.uniqueSort;
1692})();
1693var dir=function(elem,dir,until){
1694var matched=[],
1695truncate=until!==undefined;
1696while((elem=elem[dir])&&elem.nodeType!==9){
1697if(elem.nodeType===1){
1698if(truncate&&jQuery(elem).is(until)){
1699break;
1700}
1701matched.push(elem);
1702}
1703}
1704return matched;
1705};
1706var siblings=function(n,elem){
1707var matched=[];
1708for(;n;n=n.nextSibling){
1709if(n.nodeType===1&&n!==elem){
1710matched.push(n);
1711}
1712}
1713return matched;
1714};
1715var rneedsContext=jQuery.expr.match.needsContext;
1716var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);
1717function winnow(elements,qualifier,not){
1718if(isFunction(qualifier)){
1719return jQuery.grep(elements,function(elem,i){
1720return!!qualifier.call(elem,i,elem)!==not;
1721});
1722}
1723if(qualifier.nodeType){
1724return jQuery.grep(elements,function(elem){
1725return(elem===qualifier)!==not;
1726});
1727}
1728if(typeof qualifier!=="string"){
1729return jQuery.grep(elements,function(elem){
1730return(indexOf.call(qualifier,elem)>-1)!==not;
1731});
1732}
1733return jQuery.filter(qualifier,elements,not);
1734}
1735jQuery.filter=function(expr,elems,not){
1736var elem=elems[0];
1737if(not){
1738expr=":not("+expr+")";
1739}
1740if(elems.length===1&&elem.nodeType===1){
1741return jQuery.find.matchesSelector(elem,expr)?[elem]:[];
1742}
1743return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){
1744return elem.nodeType===1;
1745}));
1746};
1747jQuery.fn.extend({
1748find:function(selector){
1749var i,ret,
1750len=this.length,
1751self=this;
1752if(typeof selector!=="string"){
1753return this.pushStack(jQuery(selector).filter(function(){
1754for(i=0;i<len;i++){
1755if(jQuery.contains(self[i],this)){
1756return true;
1757}
1758}
1759}));
1760}
1761ret=this.pushStack([]);
1762for(i=0;i<len;i++){
1763jQuery.find(selector,self[i],ret);
1764}
1765return len>1?jQuery.uniqueSort(ret):ret;
1766},
1767filter:function(selector){
1768return this.pushStack(winnow(this,selector||[],false));
1769},
1770not:function(selector){
1771return this.pushStack(winnow(this,selector||[],true));
1772},
1773is:function(selector){
1774return!!winnow(
1775this,
1776typeof selector==="string"&&rneedsContext.test(selector)?
1777jQuery(selector):
1778selector||[],
1779false
1780).length;
1781}
1782});
1783var rootjQuery,
1784rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
1785init=jQuery.fn.init=function(selector,context,root){
1786var match,elem;
1787if(!selector){
1788return this;
1789}
1790root=root||rootjQuery;
1791if(typeof selector==="string"){
1792if(selector[0]==="<"&&
1793selector[selector.length-1]===">"&&
1794selector.length>=3){
1795match=[null,selector,null];
1796}else{
1797match=rquickExpr.exec(selector);
1798}
1799if(match&&(match[1]||!context)){
1800if(match[1]){
1801context=context instanceof jQuery?context[0]:context;
1802jQuery.merge(this,jQuery.parseHTML(
1803match[1],
1804context&&context.nodeType?context.ownerDocument||context:document,
1805true
1806));
1807if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){
1808for(match in context){
1809if(isFunction(this[match])){
1810this[match](context[match]);
1811}else{
1812this.attr(match,context[match]);
1813}
1814}
1815}
1816return this;
1817}else{
1818elem=document.getElementById(match[2]);
1819if(elem){
1820this[0]=elem;
1821this.length=1;
1822}
1823return this;
1824}
1825}else if(!context||context.jquery){
1826return(context||root).find(selector);
1827}else{
1828return this.constructor(context).find(selector);
1829}
1830}else if(selector.nodeType){
1831this[0]=selector;
1832this.length=1;
1833return this;
1834}else if(isFunction(selector)){
1835return root.ready!==undefined?
1836root.ready(selector):
1837selector(jQuery);
1838}
1839return jQuery.makeArray(selector,this);
1840};
1841init.prototype=jQuery.fn;
1842rootjQuery=jQuery(document);
1843var rparentsprev=/^(?:parents|prev(?:Until|All))/,
1844guaranteedUnique={
1845children:true,
1846contents:true,
1847next:true,
1848prev:true
1849};
1850jQuery.fn.extend({
1851has:function(target){
1852var targets=jQuery(target,this),
1853l=targets.length;
1854return this.filter(function(){
1855var i=0;
1856for(;i<l;i++){
1857if(jQuery.contains(this,targets[i])){
1858return true;
1859}
1860}
1861});
1862},
1863closest:function(selectors,context){
1864var cur,
1865i=0,
1866l=this.length,
1867matched=[],
1868targets=typeof selectors!=="string"&&jQuery(selectors);
1869if(!rneedsContext.test(selectors)){
1870for(;i<l;i++){
1871for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){
1872if(cur.nodeType<11&&(targets?
1873targets.index(cur)>-1:
1874cur.nodeType===1&&
1875jQuery.find.matchesSelector(cur,selectors))){
1876matched.push(cur);
1877break;
1878}
1879}
1880}
1881}
1882return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);
1883},
1884index:function(elem){
1885if(!elem){
1886return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;
1887}
1888if(typeof elem==="string"){
1889return indexOf.call(jQuery(elem),this[0]);
1890}
1891return indexOf.call(this,
1892elem.jquery?elem[0]:elem
1893);
1894},
1895add:function(selector,context){
1896return this.pushStack(
1897jQuery.uniqueSort(
1898jQuery.merge(this.get(),jQuery(selector,context))
1899)
1900);
1901},
1902addBack:function(selector){
1903return this.add(selector==null?
1904this.prevObject:this.prevObject.filter(selector)
1905);
1906}
1907});
1908function sibling(cur,dir){
1909while((cur=cur[dir])&&cur.nodeType!==1){}
1910return cur;
1911}
1912jQuery.each({
1913parent:function(elem){
1914var parent=elem.parentNode;
1915return parent&&parent.nodeType!==11?parent:null;
1916},
1917parents:function(elem){
1918return dir(elem,"parentNode");
1919},
1920parentsUntil:function(elem,_i,until){
1921return dir(elem,"parentNode",until);
1922},
1923next:function(elem){
1924return sibling(elem,"nextSibling");
1925},
1926prev:function(elem){
1927return sibling(elem,"previousSibling");
1928},
1929nextAll:function(elem){
1930return dir(elem,"nextSibling");
1931},
1932prevAll:function(elem){
1933return dir(elem,"previousSibling");
1934},
1935nextUntil:function(elem,_i,until){
1936return dir(elem,"nextSibling",until);
1937},
1938prevUntil:function(elem,_i,until){
1939return dir(elem,"previousSibling",until);
1940},
1941siblings:function(elem){
1942return siblings((elem.parentNode||{}).firstChild,elem);
1943},
1944children:function(elem){
1945return siblings(elem.firstChild);
1946},
1947contents:function(elem){
1948if(elem.contentDocument!=null&&
1949getProto(elem.contentDocument)){
1950return elem.contentDocument;
1951}
1952if(nodeName(elem,"template")){
1953elem=elem.content||elem;
1954}
1955return jQuery.merge([],elem.childNodes);
1956}
1957},function(name,fn){
1958jQuery.fn[name]=function(until,selector){
1959var matched=jQuery.map(this,fn,until);
1960if(name.slice(-5)!=="Until"){
1961selector=until;
1962}
1963if(selector&&typeof selector==="string"){
1964matched=jQuery.filter(selector,matched);
1965}
1966if(this.length>1){
1967if(!guaranteedUnique[name]){
1968jQuery.uniqueSort(matched);
1969}
1970if(rparentsprev.test(name)){
1971matched.reverse();
1972}
1973}
1974return this.pushStack(matched);
1975};
1976});
1977var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g);
1978function createOptions(options){
1979var object={};
1980jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){
1981object[flag]=true;
1982});
1983return object;
1984}
1985jQuery.Callbacks=function(options){
1986options=typeof options==="string"?
1987createOptions(options):
1988jQuery.extend({},options);
1989var
1990firing,
1991memory,
1992fired,
1993locked,
1994list=[],
1995queue=[],
1996firingIndex=-1,
1997fire=function(){
1998locked=locked||options.once;
1999fired=firing=true;
2000for(;queue.length;firingIndex=-1){
2001memory=queue.shift();
2002while(++firingIndex<list.length){
2003if(list[firingIndex].apply(memory[0],memory[1])===false&&
2004options.stopOnFalse){
2005firingIndex=list.length;
2006memory=false;
2007}
2008}
2009}
2010if(!options.memory){
2011memory=false;
2012}
2013firing=false;
2014if(locked){
2015if(memory){
2016list=[];
2017}else{
2018list="";
2019}
2020}
2021},
2022self={
2023add:function(){
2024if(list){
2025if(memory&&!firing){
2026firingIndex=list.length-1;
2027queue.push(memory);
2028}
2029(function add(args){
2030jQuery.each(args,function(_,arg){
2031if(isFunction(arg)){
2032if(!options.unique||!self.has(arg)){
2033list.push(arg);
2034}
2035}else if(arg&&arg.length&&toType(arg)!=="string"){
2036add(arg);
2037}
2038});
2039})(arguments);
2040if(memory&&!firing){
2041fire();
2042}
2043}
2044return this;
2045},
2046remove:function(){
2047jQuery.each(arguments,function(_,arg){
2048var index;
2049while((index=jQuery.inArray(arg,list,index))>-1){
2050list.splice(index,1);
2051if(index<=firingIndex){
2052firingIndex--;
2053}
2054}
2055});
2056return this;
2057},
2058has:function(fn){
2059return fn?
2060jQuery.inArray(fn,list)>-1:
2061list.length>0;
2062},
2063empty:function(){
2064if(list){
2065list=[];
2066}
2067return this;
2068},
2069disable:function(){
2070locked=queue=[];
2071list=memory="";
2072return this;
2073},
2074disabled:function(){
2075return!list;
2076},
2077lock:function(){
2078locked=queue=[];
2079if(!memory&&!firing){
2080list=memory="";
2081}
2082return this;
2083},
2084locked:function(){
2085return!!locked;
2086},
2087fireWith:function(context,args){
2088if(!locked){
2089args=args||[];
2090args=[context,args.slice?args.slice():args];
2091queue.push(args);
2092if(!firing){
2093fire();
2094}
2095}
2096return this;
2097},
2098fire:function(){
2099self.fireWith(this,arguments);
2100return this;
2101},
2102fired:function(){
2103return!!fired;
2104}
2105};
2106return self;
2107};
2108function Identity(v){
2109return v;
2110}
2111function Thrower(ex){
2112throw ex;
2113}
2114function adoptValue(value,resolve,reject,noValue){
2115var method;
2116try{
2117if(value&&isFunction((method=value.promise))){
2118method.call(value).done(resolve).fail(reject);
2119}else if(value&&isFunction((method=value.then))){
2120method.call(value,resolve,reject);
2121}else{
2122resolve.apply(undefined,[value].slice(noValue));
2123}
2124}catch(value){
2125reject.apply(undefined,[value]);
2126}
2127}
2128jQuery.extend({
2129Deferred:function(func){
2130var tuples=[
2131["notify","progress",jQuery.Callbacks("memory"),
2132jQuery.Callbacks("memory"),2],
2133["resolve","done",jQuery.Callbacks("once memory"),
2134jQuery.Callbacks("once memory"),0,"resolved"],
2135["reject","fail",jQuery.Callbacks("once memory"),
2136jQuery.Callbacks("once memory"),1,"rejected"]
2137],
2138state="pending",
2139promise={
2140state:function(){
2141return state;
2142},
2143always:function(){
2144deferred.done(arguments).fail(arguments);
2145return this;
2146},
2147"catch":function(fn){
2148return promise.then(null,fn);
2149},
2150pipe:function(){
2151var fns=arguments;
2152return jQuery.Deferred(function(newDefer){
2153jQuery.each(tuples,function(_i,tuple){
2154var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];
2155deferred[tuple[1]](function(){
2156var returned=fn&&fn.apply(this,arguments);
2157if(returned&&isFunction(returned.promise)){
2158returned.promise()
2159.progress(newDefer.notify)
2160.done(newDefer.resolve)
2161.fail(newDefer.reject);
2162}else{
2163newDefer[tuple[0]+"With"](
2164this,
2165fn?[returned]:arguments
2166);
2167}
2168});
2169});
2170fns=null;
2171}).promise();
2172},
2173then:function(onFulfilled,onRejected,onProgress){
2174var maxDepth=0;
2175function resolve(depth,deferred,handler,special){
2176return function(){
2177var that=this,
2178args=arguments,
2179mightThrow=function(){
2180var returned,then;
2181if(depth<maxDepth){
2182return;
2183}
2184returned=handler.apply(that,args);
2185if(returned===deferred.promise()){
2186throw new TypeError("Thenable self-resolution");
2187}
2188then=returned&&
2189(typeof returned==="object"||
2190typeof returned==="function")&&
2191returned.then;
2192if(isFunction(then)){
2193if(special){
2194then.call(
2195returned,
2196resolve(maxDepth,deferred,Identity,special),
2197resolve(maxDepth,deferred,Thrower,special)
2198);
2199}else{
2200maxDepth++;
2201then.call(
2202returned,
2203resolve(maxDepth,deferred,Identity,special),
2204resolve(maxDepth,deferred,Thrower,special),
2205resolve(maxDepth,deferred,Identity,
2206deferred.notifyWith)
2207);
2208}
2209}else{
2210if(handler!==Identity){
2211that=undefined;
2212args=[returned];
2213}
2214(special||deferred.resolveWith)(that,args);
2215}
2216},
2217process=special?
2218mightThrow:
2219function(){
2220try{
2221mightThrow();
2222}catch(e){
2223if(jQuery.Deferred.exceptionHook){
2224jQuery.Deferred.exceptionHook(e,
2225process.error);
2226}
2227if(depth+1>=maxDepth){
2228if(handler!==Thrower){
2229that=undefined;
2230args=[e];
2231}
2232deferred.rejectWith(that,args);
2233}
2234}
2235};
2236if(depth){
2237process();
2238}else{
2239if(jQuery.Deferred.getErrorHook){
2240process.error=jQuery.Deferred.getErrorHook();
2241}else if(jQuery.Deferred.getStackHook){
2242process.error=jQuery.Deferred.getStackHook();
2243}
2244window.setTimeout(process);
2245}
2246};
2247}
2248return jQuery.Deferred(function(newDefer){
2249tuples[0][3].add(
2250resolve(
22510,
2252newDefer,
2253isFunction(onProgress)?
2254onProgress:
2255Identity,
2256newDefer.notifyWith
2257)
2258);
2259tuples[1][3].add(
2260resolve(
22610,
2262newDefer,
2263isFunction(onFulfilled)?
2264onFulfilled:
2265Identity
2266)
2267);
2268tuples[2][3].add(
2269resolve(
22700,
2271newDefer,
2272isFunction(onRejected)?
2273onRejected:
2274Thrower
2275)
2276);
2277}).promise();
2278},
2279promise:function(obj){
2280return obj!=null?jQuery.extend(obj,promise):promise;
2281}
2282},
2283deferred={};
2284jQuery.each(tuples,function(i,tuple){
2285var list=tuple[2],
2286stateString=tuple[5];
2287promise[tuple[1]]=list.add;
2288if(stateString){
2289list.add(
2290function(){
2291state=stateString;
2292},
2293tuples[3-i][2].disable,
2294tuples[3-i][3].disable,
2295tuples[0][2].lock,
2296tuples[0][3].lock
2297);
2298}
2299list.add(tuple[3].fire);
2300deferred[tuple[0]]=function(){
2301deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);
2302return this;
2303};
2304deferred[tuple[0]+"With"]=list.fireWith;
2305});
2306promise.promise(deferred);
2307if(func){
2308func.call(deferred,deferred);
2309}
2310return deferred;
2311},
2312when:function(singleValue){
2313var
2314remaining=arguments.length,
2315i=remaining,
2316resolveContexts=Array(i),
2317resolveValues=slice.call(arguments),
2318primary=jQuery.Deferred(),
2319updateFunc=function(i){
2320return function(value){
2321resolveContexts[i]=this;
2322resolveValues[i]=arguments.length>1?slice.call(arguments):value;
2323if(!(--remaining)){
2324primary.resolveWith(resolveContexts,resolveValues);
2325}
2326};
2327};
2328if(remaining<=1){
2329adoptValue(singleValue,primary.done(updateFunc(i)).resolve,primary.reject,
2330!remaining);
2331if(primary.state()==="pending"||
2332isFunction(resolveValues[i]&&resolveValues[i].then)){
2333return primary.then();
2334}
2335}
2336while(i--){
2337adoptValue(resolveValues[i],updateFunc(i),primary.reject);
2338}
2339return primary.promise();
2340}
2341});
2342var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
2343jQuery.Deferred.exceptionHook=function(error,asyncError){
2344if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){
2345window.console.warn("jQuery.Deferred exception: "+error.message,
2346error.stack,asyncError);
2347}
2348};
2349jQuery.readyException=function(error){
2350window.setTimeout(function(){
2351throw error;
2352});
2353};
2354var readyList=jQuery.Deferred();
2355jQuery.fn.ready=function(fn){
2356readyList
2357.then(fn)
2358.catch(function(error){
2359jQuery.readyException(error);
2360});
2361return this;
2362};
2363jQuery.extend({
2364isReady:false,
2365readyWait:1,
2366ready:function(wait){
2367if(wait===true?--jQuery.readyWait:jQuery.isReady){
2368return;
2369}
2370jQuery.isReady=true;
2371if(wait!==true&&--jQuery.readyWait>0){
2372return;
2373}
2374readyList.resolveWith(document,[jQuery]);
2375}
2376});
2377jQuery.ready.then=readyList.then;
2378function completed(){
2379document.removeEventListener("DOMContentLoaded",completed);
2380window.removeEventListener("load",completed);
2381jQuery.ready();
2382}
2383if(document.readyState==="complete"||
2384(document.readyState!=="loading"&&!document.documentElement.doScroll)){
2385window.setTimeout(jQuery.ready);
2386}else{
2387document.addEventListener("DOMContentLoaded",completed);
2388window.addEventListener("load",completed);
2389}
2390var access=function(elems,fn,key,value,chainable,emptyGet,raw){
2391var i=0,
2392len=elems.length,
2393bulk=key==null;
2394if(toType(key)==="object"){
2395chainable=true;
2396for(i in key){
2397access(elems,fn,i,key[i],true,emptyGet,raw);
2398}
2399}else if(value!==undefined){
2400chainable=true;
2401if(!isFunction(value)){
2402raw=true;
2403}
2404if(bulk){
2405if(raw){
2406fn.call(elems,value);
2407fn=null;
2408}else{
2409bulk=fn;
2410fn=function(elem,_key,value){
2411return bulk.call(jQuery(elem),value);
2412};
2413}
2414}
2415if(fn){
2416for(;i<len;i++){
2417fn(
2418elems[i],key,raw?
2419value:
2420value.call(elems[i],i,fn(elems[i],key))
2421);
2422}
2423}
2424}
2425if(chainable){
2426return elems;
2427}
2428if(bulk){
2429return fn.call(elems);
2430}
2431return len?fn(elems[0],key):emptyGet;
2432};
2433var rmsPrefix=/^-ms-/,
2434rdashAlpha=/-([a-z])/g;
2435function fcamelCase(_all,letter){
2436return letter.toUpperCase();
2437}
2438function camelCase(string){
2439return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);
2440}
2441var acceptData=function(owner){
2442return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType);
2443};
2444function Data(){
2445this.expando=jQuery.expando+Data.uid++;
2446}
2447Data.uid=1;
2448Data.prototype={
2449cache:function(owner){
2450var value=owner[this.expando];
2451if(!value){
2452value={};
2453if(acceptData(owner)){
2454if(owner.nodeType){
2455owner[this.expando]=value;
2456}else{
2457Object.defineProperty(owner,this.expando,{
2458value:value,
2459configurable:true
2460});
2461}
2462}
2463}
2464return value;
2465},
2466set:function(owner,data,value){
2467var prop,
2468cache=this.cache(owner);
2469if(typeof data==="string"){
2470cache[camelCase(data)]=value;
2471}else{
2472for(prop in data){
2473cache[camelCase(prop)]=data[prop];
2474}
2475}
2476return cache;
2477},
2478get:function(owner,key){
2479return key===undefined?
2480this.cache(owner):
2481owner[this.expando]&&owner[this.expando][camelCase(key)];
2482},
2483access:function(owner,key,value){
2484if(key===undefined||
2485((key&&typeof key==="string")&&value===undefined)){
2486return this.get(owner,key);
2487}
2488this.set(owner,key,value);
2489return value!==undefined?value:key;
2490},
2491remove:function(owner,key){
2492var i,
2493cache=owner[this.expando];
2494if(cache===undefined){
2495return;
2496}
2497if(key!==undefined){
2498if(Array.isArray(key)){
2499key=key.map(camelCase);
2500}else{
2501key=camelCase(key);
2502key=key in cache?
2503[key]:
2504(key.match(rnothtmlwhite)||[]);
2505}
2506i=key.length;
2507while(i--){
2508delete cache[key[i]];
2509}
2510}
2511if(key===undefined||jQuery.isEmptyObject(cache)){
2512if(owner.nodeType){
2513owner[this.expando]=undefined;
2514}else{
2515delete owner[this.expando];
2516}
2517}
2518},
2519hasData:function(owner){
2520var cache=owner[this.expando];
2521return cache!==undefined&&!jQuery.isEmptyObject(cache);
2522}
2523};
2524var dataPriv=new Data();
2525var dataUser=new Data();
2526var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
2527rmultiDash=/[A-Z]/g;
2528function getData(data){
2529if(data==="true"){
2530return true;
2531}
2532if(data==="false"){
2533return false;
2534}
2535if(data==="null"){
2536return null;
2537}
2538if(data===+data+""){
2539return+data;
2540}
2541if(rbrace.test(data)){
2542return JSON.parse(data);
2543}
2544return data;
2545}
2546function dataAttr(elem,key,data){
2547var name;
2548if(data===undefined&&elem.nodeType===1){
2549name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();
2550data=elem.getAttribute(name);
2551if(typeof data==="string"){
2552try{
2553data=getData(data);
2554}catch(e){}
2555dataUser.set(elem,key,data);
2556}else{
2557data=undefined;
2558}
2559}
2560return data;
2561}
2562jQuery.extend({
2563hasData:function(elem){
2564return dataUser.hasData(elem)||dataPriv.hasData(elem);
2565},
2566data:function(elem,name,data){
2567return dataUser.access(elem,name,data);
2568},
2569removeData:function(elem,name){
2570dataUser.remove(elem,name);
2571},
2572_data:function(elem,name,data){
2573return dataPriv.access(elem,name,data);
2574},
2575_removeData:function(elem,name){
2576dataPriv.remove(elem,name);
2577}
2578});
2579jQuery.fn.extend({
2580data:function(key,value){
2581var i,name,data,
2582elem=this[0],
2583attrs=elem&&elem.attributes;
2584if(key===undefined){
2585if(this.length){
2586data=dataUser.get(elem);
2587if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){
2588i=attrs.length;
2589while(i--){
2590if(attrs[i]){
2591name=attrs[i].name;
2592if(name.indexOf("data-")===0){
2593name=camelCase(name.slice(5));
2594dataAttr(elem,name,data[name]);
2595}
2596}
2597}
2598dataPriv.set(elem,"hasDataAttrs",true);
2599}
2600}
2601return data;
2602}
2603if(typeof key==="object"){
2604return this.each(function(){
2605dataUser.set(this,key);
2606});
2607}
2608return access(this,function(value){
2609var data;
2610if(elem&&value===undefined){
2611data=dataUser.get(elem,key);
2612if(data!==undefined){
2613return data;
2614}
2615data=dataAttr(elem,key);
2616if(data!==undefined){
2617return data;
2618}
2619return;
2620}
2621this.each(function(){
2622dataUser.set(this,key,value);
2623});
2624},null,value,arguments.length>1,null,true);
2625},
2626removeData:function(key){
2627return this.each(function(){
2628dataUser.remove(this,key);
2629});
2630}
2631});
2632jQuery.extend({
2633queue:function(elem,type,data){
2634var queue;
2635if(elem){
2636type=(type||"fx")+"queue";
2637queue=dataPriv.get(elem,type);
2638if(data){
2639if(!queue||Array.isArray(data)){
2640queue=dataPriv.access(elem,type,jQuery.makeArray(data));
2641}else{
2642queue.push(data);
2643}
2644}
2645return queue||[];
2646}
2647},
2648dequeue:function(elem,type){
2649type=type||"fx";
2650var queue=jQuery.queue(elem,type),
2651startLength=queue.length,
2652fn=queue.shift(),
2653hooks=jQuery._queueHooks(elem,type),
2654next=function(){
2655jQuery.dequeue(elem,type);
2656};
2657if(fn==="inprogress"){
2658fn=queue.shift();
2659startLength--;
2660}
2661if(fn){
2662if(type==="fx"){
2663queue.unshift("inprogress");
2664}
2665delete hooks.stop;
2666fn.call(elem,next,hooks);
2667}
2668if(!startLength&&hooks){
2669hooks.empty.fire();
2670}
2671},
2672_queueHooks:function(elem,type){
2673var key=type+"queueHooks";
2674return dataPriv.get(elem,key)||dataPriv.access(elem,key,{
2675empty:jQuery.Callbacks("once memory").add(function(){
2676dataPriv.remove(elem,[type+"queue",key]);
2677})
2678});
2679}
2680});
2681jQuery.fn.extend({
2682queue:function(type,data){
2683var setter=2;
2684if(typeof type!=="string"){
2685data=type;
2686type="fx";
2687setter--;
2688}
2689if(arguments.length<setter){
2690return jQuery.queue(this[0],type);
2691}
2692return data===undefined?
2693this:
2694this.each(function(){
2695var queue=jQuery.queue(this,type,data);
2696jQuery._queueHooks(this,type);
2697if(type==="fx"&&queue[0]!=="inprogress"){
2698jQuery.dequeue(this,type);
2699}
2700});
2701},
2702dequeue:function(type){
2703return this.each(function(){
2704jQuery.dequeue(this,type);
2705});
2706},
2707clearQueue:function(type){
2708return this.queue(type||"fx",[]);
2709},
2710promise:function(type,obj){
2711var tmp,
2712count=1,
2713defer=jQuery.Deferred(),
2714elements=this,
2715i=this.length,
2716resolve=function(){
2717if(!(--count)){
2718defer.resolveWith(elements,[elements]);
2719}
2720};
2721if(typeof type!=="string"){
2722obj=type;
2723type=undefined;
2724}
2725type=type||"fx";
2726while(i--){
2727tmp=dataPriv.get(elements[i],type+"queueHooks");
2728if(tmp&&tmp.empty){
2729count++;
2730tmp.empty.add(resolve);
2731}
2732}
2733resolve();
2734return defer.promise(obj);
2735}
2736});
2737var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
2738var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");
2739var cssExpand=["Top","Right","Bottom","Left"];
2740var documentElement=document.documentElement;
2741var isAttached=function(elem){
2742return jQuery.contains(elem.ownerDocument,elem);
2743},
2744composed={composed:true};
2745if(documentElement.getRootNode){
2746isAttached=function(elem){
2747return jQuery.contains(elem.ownerDocument,elem)||
2748elem.getRootNode(composed)===elem.ownerDocument;
2749};
2750}
2751var isHiddenWithinTree=function(elem,el){
2752elem=el||elem;
2753return elem.style.display==="none"||
2754elem.style.display===""&&
2755isAttached(elem)&&
2756jQuery.css(elem,"display")==="none";
2757};
2758function adjustCSS(elem,prop,valueParts,tween){
2759var adjusted,scale,
2760maxIterations=20,
2761currentValue=tween?
2762function(){
2763return tween.cur();
2764}:
2765function(){
2766return jQuery.css(elem,prop,"");
2767},
2768initial=currentValue(),
2769unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),
2770initialInUnit=elem.nodeType&&
2771(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&
2772rcssNum.exec(jQuery.css(elem,prop));
2773if(initialInUnit&&initialInUnit[3]!==unit){
2774initial=initial/2;
2775unit=unit||initialInUnit[3];
2776initialInUnit=+initial||1;
2777while(maxIterations--){
2778jQuery.style(elem,prop,initialInUnit+unit);
2779if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){
2780maxIterations=0;
2781}
2782initialInUnit=initialInUnit/scale;
2783}
2784initialInUnit=initialInUnit*2;
2785jQuery.style(elem,prop,initialInUnit+unit);
2786valueParts=valueParts||[];
2787}
2788if(valueParts){
2789initialInUnit=+initialInUnit||+initial||0;
2790adjusted=valueParts[1]?
2791initialInUnit+(valueParts[1]+1)*valueParts[2]:
2792+valueParts[2];
2793if(tween){
2794tween.unit=unit;
2795tween.start=initialInUnit;
2796tween.end=adjusted;
2797}
2798}
2799return adjusted;
2800}
2801var defaultDisplayMap={};
2802function getDefaultDisplay(elem){
2803var temp,
2804doc=elem.ownerDocument,
2805nodeName=elem.nodeName,
2806display=defaultDisplayMap[nodeName];
2807if(display){
2808return display;
2809}
2810temp=doc.body.appendChild(doc.createElement(nodeName));
2811display=jQuery.css(temp,"display");
2812temp.parentNode.removeChild(temp);
2813if(display==="none"){
2814display="block";
2815}
2816defaultDisplayMap[nodeName]=display;
2817return display;
2818}
2819function showHide(elements,show){
2820var display,elem,
2821values=[],
2822index=0,
2823length=elements.length;
2824for(;index<length;index++){
2825elem=elements[index];
2826if(!elem.style){
2827continue;
2828}
2829display=elem.style.display;
2830if(show){
2831if(display==="none"){
2832values[index]=dataPriv.get(elem,"display")||null;
2833if(!values[index]){
2834elem.style.display="";
2835}
2836}
2837if(elem.style.display===""&&isHiddenWithinTree(elem)){
2838values[index]=getDefaultDisplay(elem);
2839}
2840}else{
2841if(display!=="none"){
2842values[index]="none";
2843dataPriv.set(elem,"display",display);
2844}
2845}
2846}
2847for(index=0;index<length;index++){
2848if(values[index]!=null){
2849elements[index].style.display=values[index];
2850}
2851}
2852return elements;
2853}
2854jQuery.fn.extend({
2855show:function(){
2856return showHide(this,true);
2857},
2858hide:function(){
2859return showHide(this);
2860},
2861toggle:function(state){
2862if(typeof state==="boolean"){
2863return state?this.show():this.hide();
2864}
2865return this.each(function(){
2866if(isHiddenWithinTree(this)){
2867jQuery(this).show();
2868}else{
2869jQuery(this).hide();
2870}
2871});
2872}
2873});
2874var rcheckableType=(/^(?:checkbox|radio)$/i);
2875var rtagName=(/<([a-z][^\/\0>\x20\t\r\n\f]*)/i);
2876var rscriptType=(/^$|^module$|\/(?:java|ecma)script/i);
2877(function(){
2878var fragment=document.createDocumentFragment(),
2879div=fragment.appendChild(document.createElement("div")),
2880input=document.createElement("input");
2881input.setAttribute("type","radio");
2882input.setAttribute("checked","checked");
2883input.setAttribute("name","t");
2884div.appendChild(input);
2885support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;
2886div.innerHTML="<textarea>x</textarea>";
2887support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;
2888div.innerHTML="<option></option>";
2889support.option=!!div.lastChild;
2890})();
2891var wrapMap={
2892thead:[1,"<table>","</table>"],
2893col:[2,"<table><colgroup>","</colgroup></table>"],
2894tr:[2,"<table><tbody>","</tbody></table>"],
2895td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
2896_default:[0,"",""]
2897};
2898wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;
2899wrapMap.th=wrapMap.td;
2900if(!support.option){
2901wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"];
2902}
2903function getAll(context,tag){
2904var ret;
2905if(typeof context.getElementsByTagName!=="undefined"){
2906ret=context.getElementsByTagName(tag||"*");
2907}else if(typeof context.querySelectorAll!=="undefined"){
2908ret=context.querySelectorAll(tag||"*");
2909}else{
2910ret=[];
2911}
2912if(tag===undefined||tag&&nodeName(context,tag)){
2913return jQuery.merge([context],ret);
2914}
2915return ret;
2916}
2917function setGlobalEval(elems,refElements){
2918var i=0,
2919l=elems.length;
2920for(;i<l;i++){
2921dataPriv.set(
2922elems[i],
2923"globalEval",
2924!refElements||dataPriv.get(refElements[i],"globalEval")
2925);
2926}
2927}
2928var rhtml=/<|&#?\w+;/;
2929function buildFragment(elems,context,scripts,selection,ignored){
2930var elem,tmp,tag,wrap,attached,j,
2931fragment=context.createDocumentFragment(),
2932nodes=[],
2933i=0,
2934l=elems.length;
2935for(;i<l;i++){
2936elem=elems[i];
2937if(elem||elem===0){
2938if(toType(elem)==="object"){
2939jQuery.merge(nodes,elem.nodeType?[elem]:elem);
2940}else if(!rhtml.test(elem)){
2941nodes.push(context.createTextNode(elem));
2942}else{
2943tmp=tmp||fragment.appendChild(context.createElement("div"));
2944tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();
2945wrap=wrapMap[tag]||wrapMap._default;
2946tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];
2947j=wrap[0];
2948while(j--){
2949tmp=tmp.lastChild;
2950}
2951jQuery.merge(nodes,tmp.childNodes);
2952tmp=fragment.firstChild;
2953tmp.textContent="";
2954}
2955}
2956}
2957fragment.textContent="";
2958i=0;
2959while((elem=nodes[i++])){
2960if(selection&&jQuery.inArray(elem,selection)>-1){
2961if(ignored){
2962ignored.push(elem);
2963}
2964continue;
2965}
2966attached=isAttached(elem);
2967tmp=getAll(fragment.appendChild(elem),"script");
2968if(attached){
2969setGlobalEval(tmp);
2970}
2971if(scripts){
2972j=0;
2973while((elem=tmp[j++])){
2974if(rscriptType.test(elem.type||"")){
2975scripts.push(elem);
2976}
2977}
2978}
2979}
2980return fragment;
2981}
2982var rtypenamespace=/^([^.]*)(?:\.(.+)|)/;
2983function returnTrue(){
2984return true;
2985}
2986function returnFalse(){
2987return false;
2988}
2989function on(elem,types,selector,data,fn,one){
2990var origFn,type;
2991if(typeof types==="object"){
2992if(typeof selector!=="string"){
2993data=data||selector;
2994selector=undefined;
2995}
2996for(type in types){
2997on(elem,type,selector,data,types[type],one);
2998}
2999return elem;
3000}
3001if(data==null&&fn==null){
3002fn=selector;
3003data=selector=undefined;
3004}else if(fn==null){
3005if(typeof selector==="string"){
3006fn=data;
3007data=undefined;
3008}else{
3009fn=data;
3010data=selector;
3011selector=undefined;
3012}
3013}
3014if(fn===false){
3015fn=returnFalse;
3016}else if(!fn){
3017return elem;
3018}
3019if(one===1){
3020origFn=fn;
3021fn=function(event){
3022jQuery().off(event);
3023return origFn.apply(this,arguments);
3024};
3025fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);
3026}
3027return elem.each(function(){
3028jQuery.event.add(this,types,fn,data,selector);
3029});
3030}
3031jQuery.event={
3032global:{},
3033add:function(elem,types,handler,data,selector){
3034var handleObjIn,eventHandle,tmp,
3035events,t,handleObj,
3036special,handlers,type,namespaces,origType,
3037elemData=dataPriv.get(elem);
3038if(!acceptData(elem)){
3039return;
3040}
3041if(handler.handler){
3042handleObjIn=handler;
3043handler=handleObjIn.handler;
3044selector=handleObjIn.selector;
3045}
3046if(selector){
3047jQuery.find.matchesSelector(documentElement,selector);
3048}
3049if(!handler.guid){
3050handler.guid=jQuery.guid++;
3051}
3052if(!(events=elemData.events)){
3053events=elemData.events=Object.create(null);
3054}
3055if(!(eventHandle=elemData.handle)){
3056eventHandle=elemData.handle=function(e){
3057return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?
3058jQuery.event.dispatch.apply(elem,arguments):undefined;
3059};
3060}
3061types=(types||"").match(rnothtmlwhite)||[""];
3062t=types.length;
3063while(t--){
3064tmp=rtypenamespace.exec(types[t])||[];
3065type=origType=tmp[1];
3066namespaces=(tmp[2]||"").split(".").sort();
3067if(!type){
3068continue;
3069}
3070special=jQuery.event.special[type]||{};
3071type=(selector?special.delegateType:special.bindType)||type;
3072special=jQuery.event.special[type]||{};
3073handleObj=jQuery.extend({
3074type:type,
3075origType:origType,
3076data:data,
3077handler:handler,
3078guid:handler.guid,
3079selector:selector,
3080needsContext:selector&&jQuery.expr.match.needsContext.test(selector),
3081namespace:namespaces.join(".")
3082},handleObjIn);
3083if(!(handlers=events[type])){
3084handlers=events[type]=[];
3085handlers.delegateCount=0;
3086if(!special.setup||
3087special.setup.call(elem,data,namespaces,eventHandle)===false){
3088if(elem.addEventListener){
3089elem.addEventListener(type,eventHandle);
3090}
3091}
3092}
3093if(special.add){
3094special.add.call(elem,handleObj);
3095if(!handleObj.handler.guid){
3096handleObj.handler.guid=handler.guid;
3097}
3098}
3099if(selector){
3100handlers.splice(handlers.delegateCount++,0,handleObj);
3101}else{
3102handlers.push(handleObj);
3103}
3104jQuery.event.global[type]=true;
3105}
3106},
3107remove:function(elem,types,handler,selector,mappedTypes){
3108var j,origCount,tmp,
3109events,t,handleObj,
3110special,handlers,type,namespaces,origType,
3111elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);
3112if(!elemData||!(events=elemData.events)){
3113return;
3114}
3115types=(types||"").match(rnothtmlwhite)||[""];
3116t=types.length;
3117while(t--){
3118tmp=rtypenamespace.exec(types[t])||[];
3119type=origType=tmp[1];
3120namespaces=(tmp[2]||"").split(".").sort();
3121if(!type){
3122for(type in events){
3123jQuery.event.remove(elem,type+types[t],handler,selector,true);
3124}
3125continue;
3126}
3127special=jQuery.event.special[type]||{};
3128type=(selector?special.delegateType:special.bindType)||type;
3129handlers=events[type]||[];
3130tmp=tmp[2]&&
3131new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");
3132origCount=j=handlers.length;
3133while(j--){
3134handleObj=handlers[j];
3135if((mappedTypes||origType===handleObj.origType)&&
3136(!handler||handler.guid===handleObj.guid)&&
3137(!tmp||tmp.test(handleObj.namespace))&&
3138(!selector||selector===handleObj.selector||
3139selector==="**"&&handleObj.selector)){
3140handlers.splice(j,1);
3141if(handleObj.selector){
3142handlers.delegateCount--;
3143}
3144if(special.remove){
3145special.remove.call(elem,handleObj);
3146}
3147}
3148}
3149if(origCount&&!handlers.length){
3150if(!special.teardown||
3151special.teardown.call(elem,namespaces,elemData.handle)===false){
3152jQuery.removeEvent(elem,type,elemData.handle);
3153}
3154delete events[type];
3155}
3156}
3157if(jQuery.isEmptyObject(events)){
3158dataPriv.remove(elem,"handle events");
3159}
3160},
3161dispatch:function(nativeEvent){
3162var i,j,ret,matched,handleObj,handlerQueue,
3163args=new Array(arguments.length),
3164event=jQuery.event.fix(nativeEvent),
3165handlers=(
3166dataPriv.get(this,"events")||Object.create(null)
3167)[event.type]||[],
3168special=jQuery.event.special[event.type]||{};
3169args[0]=event;
3170for(i=1;i<arguments.length;i++){
3171args[i]=arguments[i];
3172}
3173event.delegateTarget=this;
3174if(special.preDispatch&&special.preDispatch.call(this,event)===false){
3175return;
3176}
3177handlerQueue=jQuery.event.handlers.call(this,event,handlers);
3178i=0;
3179while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){
3180event.currentTarget=matched.elem;
3181j=0;
3182while((handleObj=matched.handlers[j++])&&
3183!event.isImmediatePropagationStopped()){
3184if(!event.rnamespace||handleObj.namespace===false||
3185event.rnamespace.test(handleObj.namespace)){
3186event.handleObj=handleObj;
3187event.data=handleObj.data;
3188ret=((jQuery.event.special[handleObj.origType]||{}).handle||
3189handleObj.handler).apply(matched.elem,args);
3190if(ret!==undefined){
3191if((event.result=ret)===false){
3192event.preventDefault();
3193event.stopPropagation();
3194}
3195}
3196}
3197}
3198}
3199if(special.postDispatch){
3200special.postDispatch.call(this,event);
3201}
3202return event.result;
3203},
3204handlers:function(event,handlers){
3205var i,handleObj,sel,matchedHandlers,matchedSelectors,
3206handlerQueue=[],
3207delegateCount=handlers.delegateCount,
3208cur=event.target;
3209if(delegateCount&&
3210cur.nodeType&&
3211!(event.type==="click"&&event.button>=1)){
3212for(;cur!==this;cur=cur.parentNode||this){
3213if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){
3214matchedHandlers=[];
3215matchedSelectors={};
3216for(i=0;i<delegateCount;i++){
3217handleObj=handlers[i];
3218sel=handleObj.selector+" ";
3219if(matchedSelectors[sel]===undefined){
3220matchedSelectors[sel]=handleObj.needsContext?
3221jQuery(sel,this).index(cur)>-1:
3222jQuery.find(sel,this,null,[cur]).length;
3223}
3224if(matchedSelectors[sel]){
3225matchedHandlers.push(handleObj);
3226}
3227}
3228if(matchedHandlers.length){
3229handlerQueue.push({elem:cur,handlers:matchedHandlers});
3230}
3231}
3232}
3233}
3234cur=this;
3235if(delegateCount<handlers.length){
3236handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)});
3237}
3238return handlerQueue;
3239},
3240addProp:function(name,hook){
3241Object.defineProperty(jQuery.Event.prototype,name,{
3242enumerable:true,
3243configurable:true,
3244get:isFunction(hook)?
3245function(){
3246if(this.originalEvent){
3247return hook(this.originalEvent);
3248}
3249}:
3250function(){
3251if(this.originalEvent){
3252return this.originalEvent[name];
3253}
3254},
3255set:function(value){
3256Object.defineProperty(this,name,{
3257enumerable:true,
3258configurable:true,
3259writable:true,
3260value:value
3261});
3262}
3263});
3264},
3265fix:function(originalEvent){
3266return originalEvent[jQuery.expando]?
3267originalEvent:
3268new jQuery.Event(originalEvent);
3269},
3270special:{
3271load:{
3272noBubble:true
3273},
3274click:{
3275setup:function(data){
3276var el=this||data;
3277if(rcheckableType.test(el.type)&&
3278el.click&&nodeName(el,"input")){
3279leverageNative(el,"click",true);
3280}
3281return false;
3282},
3283trigger:function(data){
3284var el=this||data;
3285if(rcheckableType.test(el.type)&&
3286el.click&&nodeName(el,"input")){
3287leverageNative(el,"click");
3288}
3289return true;
3290},
3291_default:function(event){
3292var target=event.target;
3293return rcheckableType.test(target.type)&&
3294target.click&&nodeName(target,"input")&&
3295dataPriv.get(target,"click")||
3296nodeName(target,"a");
3297}
3298},
3299beforeunload:{
3300postDispatch:function(event){
3301if(event.result!==undefined&&event.originalEvent){
3302event.originalEvent.returnValue=event.result;
3303}
3304}
3305}
3306}
3307};
3308function leverageNative(el,type,isSetup){
3309if(!isSetup){
3310if(dataPriv.get(el,type)===undefined){
3311jQuery.event.add(el,type,returnTrue);
3312}
3313return;
3314}
3315dataPriv.set(el,type,false);
3316jQuery.event.add(el,type,{
3317namespace:false,
3318handler:function(event){
3319var result,
3320saved=dataPriv.get(this,type);
3321if((event.isTrigger&1)&&this[type]){
3322if(!saved){
3323saved=slice.call(arguments);
3324dataPriv.set(this,type,saved);
3325this[type]();
3326result=dataPriv.get(this,type);
3327dataPriv.set(this,type,false);
3328if(saved!==result){
3329event.stopImmediatePropagation();
3330event.preventDefault();
3331return result;
3332}
3333}else if((jQuery.event.special[type]||{}).delegateType){
3334event.stopPropagation();
3335}
3336}else if(saved){
3337dataPriv.set(this,type,jQuery.event.trigger(
3338saved[0],
3339saved.slice(1),
3340this
3341));
3342event.stopPropagation();
3343event.isImmediatePropagationStopped=returnTrue;
3344}
3345}
3346});
3347}
3348jQuery.removeEvent=function(elem,type,handle){
3349if(elem.removeEventListener){
3350elem.removeEventListener(type,handle);
3351}
3352};
3353jQuery.Event=function(src,props){
3354if(!(this instanceof jQuery.Event)){
3355return new jQuery.Event(src,props);
3356}
3357if(src&&src.type){
3358this.originalEvent=src;
3359this.type=src.type;
3360this.isDefaultPrevented=src.defaultPrevented||
3361src.defaultPrevented===undefined&&
3362src.returnValue===false?
3363returnTrue:
3364returnFalse;
3365this.target=(src.target&&src.target.nodeType===3)?
3366src.target.parentNode:
3367src.target;
3368this.currentTarget=src.currentTarget;
3369this.relatedTarget=src.relatedTarget;
3370}else{
3371this.type=src;
3372}
3373if(props){
3374jQuery.extend(this,props);
3375}
3376this.timeStamp=src&&src.timeStamp||Date.now();
3377this[jQuery.expando]=true;
3378};
3379jQuery.Event.prototype={
3380constructor:jQuery.Event,
3381isDefaultPrevented:returnFalse,
3382isPropagationStopped:returnFalse,
3383isImmediatePropagationStopped:returnFalse,
3384isSimulated:false,
3385preventDefault:function(){
3386var e=this.originalEvent;
3387this.isDefaultPrevented=returnTrue;
3388if(e&&!this.isSimulated){
3389e.preventDefault();
3390}
3391},
3392stopPropagation:function(){
3393var e=this.originalEvent;
3394this.isPropagationStopped=returnTrue;
3395if(e&&!this.isSimulated){
3396e.stopPropagation();
3397}
3398},
3399stopImmediatePropagation:function(){
3400var e=this.originalEvent;
3401this.isImmediatePropagationStopped=returnTrue;
3402if(e&&!this.isSimulated){
3403e.stopImmediatePropagation();
3404}
3405this.stopPropagation();
3406}
3407};
3408jQuery.each({
3409altKey:true,
3410bubbles:true,
3411cancelable:true,
3412changedTouches:true,
3413ctrlKey:true,
3414detail:true,
3415eventPhase:true,
3416metaKey:true,
3417pageX:true,
3418pageY:true,
3419shiftKey:true,
3420view:true,
3421"char":true,
3422code:true,
3423charCode:true,
3424key:true,
3425keyCode:true,
3426button:true,
3427buttons:true,
3428clientX:true,
3429clientY:true,
3430offsetX:true,
3431offsetY:true,
3432pointerId:true,
3433pointerType:true,
3434screenX:true,
3435screenY:true,
3436targetTouches:true,
3437toElement:true,
3438touches:true,
3439which:true
3440},jQuery.event.addProp);
3441jQuery.each({focus:"focusin",blur:"focusout"},function(type,delegateType){
3442function focusMappedHandler(nativeEvent){
3443if(document.documentMode){
3444var handle=dataPriv.get(this,"handle"),
3445event=jQuery.event.fix(nativeEvent);
3446event.type=nativeEvent.type==="focusin"?"focus":"blur";
3447event.isSimulated=true;
3448handle(nativeEvent);
3449if(event.target===event.currentTarget){
3450handle(event);
3451}
3452}else{
3453jQuery.event.simulate(delegateType,nativeEvent.target,
3454jQuery.event.fix(nativeEvent));
3455}
3456}
3457jQuery.event.special[type]={
3458setup:function(){
3459var attaches;
3460leverageNative(this,type,true);
3461if(document.documentMode){
3462attaches=dataPriv.get(this,delegateType);
3463if(!attaches){
3464this.addEventListener(delegateType,focusMappedHandler);
3465}
3466dataPriv.set(this,delegateType,(attaches||0)+1);
3467}else{
3468return false;
3469}
3470},
3471trigger:function(){
3472leverageNative(this,type);
3473return true;
3474},
3475teardown:function(){
3476var attaches;
3477if(document.documentMode){
3478attaches=dataPriv.get(this,delegateType)-1;
3479if(!attaches){
3480this.removeEventListener(delegateType,focusMappedHandler);
3481dataPriv.remove(this,delegateType);
3482}else{
3483dataPriv.set(this,delegateType,attaches);
3484}
3485}else{
3486return false;
3487}
3488},
3489_default:function(event){
3490return dataPriv.get(event.target,type);
3491},
3492delegateType:delegateType
3493};
3494jQuery.event.special[delegateType]={
3495setup:function(){
3496var doc=this.ownerDocument||this.document||this,
3497dataHolder=document.documentMode?this:doc,
3498attaches=dataPriv.get(dataHolder,delegateType);
3499if(!attaches){
3500if(document.documentMode){
3501this.addEventListener(delegateType,focusMappedHandler);
3502}else{
3503doc.addEventListener(type,focusMappedHandler,true);
3504}
3505}
3506dataPriv.set(dataHolder,delegateType,(attaches||0)+1);
3507},
3508teardown:function(){
3509var doc=this.ownerDocument||this.document||this,
3510dataHolder=document.documentMode?this:doc,
3511attaches=dataPriv.get(dataHolder,delegateType)-1;
3512if(!attaches){
3513if(document.documentMode){
3514this.removeEventListener(delegateType,focusMappedHandler);
3515}else{
3516doc.removeEventListener(type,focusMappedHandler,true);
3517}
3518dataPriv.remove(dataHolder,delegateType);
3519}else{
3520dataPriv.set(dataHolder,delegateType,attaches);
3521}
3522}
3523};
3524});
3525jQuery.each({
3526mouseenter:"mouseover",
3527mouseleave:"mouseout",
3528pointerenter:"pointerover",
3529pointerleave:"pointerout"
3530},function(orig,fix){
3531jQuery.event.special[orig]={
3532delegateType:fix,
3533bindType:fix,
3534handle:function(event){
3535var ret,
3536target=this,
3537related=event.relatedTarget,
3538handleObj=event.handleObj;
3539if(!related||(related!==target&&!jQuery.contains(target,related))){
3540event.type=handleObj.origType;
3541ret=handleObj.handler.apply(this,arguments);
3542event.type=fix;
3543}
3544return ret;
3545}
3546};
3547});
3548jQuery.fn.extend({
3549on:function(types,selector,data,fn){
3550return on(this,types,selector,data,fn);
3551},
3552one:function(types,selector,data,fn){
3553return on(this,types,selector,data,fn,1);
3554},
3555off:function(types,selector,fn){
3556var handleObj,type;
3557if(types&&types.preventDefault&&types.handleObj){
3558handleObj=types.handleObj;
3559jQuery(types.delegateTarget).off(
3560handleObj.namespace?
3561handleObj.origType+"."+handleObj.namespace:
3562handleObj.origType,
3563handleObj.selector,
3564handleObj.handler
3565);
3566return this;
3567}
3568if(typeof types==="object"){
3569for(type in types){
3570this.off(type,selector,types[type]);
3571}
3572return this;
3573}
3574if(selector===false||typeof selector==="function"){
3575fn=selector;
3576selector=undefined;
3577}
3578if(fn===false){
3579fn=returnFalse;
3580}
3581return this.each(function(){
3582jQuery.event.remove(this,types,fn,selector);
3583});
3584}
3585});
3586var
3587rnoInnerhtml=/<script|<style|<link/i,
3588rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,
3589rcleanScript=/^\s*<!\[CDATA\[|\]\]>\s*$/g;
3590function manipulationTarget(elem,content){
3591if(nodeName(elem,"table")&&
3592nodeName(content.nodeType!==11?content:content.firstChild,"tr")){
3593return jQuery(elem).children("tbody")[0]||elem;
3594}
3595return elem;
3596}
3597function disableScript(elem){
3598elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;
3599return elem;
3600}
3601function restoreScript(elem){
3602if((elem.type||"").slice(0,5)==="true/"){
3603elem.type=elem.type.slice(5);
3604}else{
3605elem.removeAttribute("type");
3606}
3607return elem;
3608}
3609function cloneCopyEvent(src,dest){
3610var i,l,type,pdataOld,udataOld,udataCur,events;
3611if(dest.nodeType!==1){
3612return;
3613}
3614if(dataPriv.hasData(src)){
3615pdataOld=dataPriv.get(src);
3616events=pdataOld.events;
3617if(events){
3618dataPriv.remove(dest,"handle events");
3619for(type in events){
3620for(i=0,l=events[type].length;i<l;i++){
3621jQuery.event.add(dest,type,events[type][i]);
3622}
3623}
3624}
3625}
3626if(dataUser.hasData(src)){
3627udataOld=dataUser.access(src);
3628udataCur=jQuery.extend({},udataOld);
3629dataUser.set(dest,udataCur);
3630}
3631}
3632function fixInput(src,dest){
3633var nodeName=dest.nodeName.toLowerCase();
3634if(nodeName==="input"&&rcheckableType.test(src.type)){
3635dest.checked=src.checked;
3636}else if(nodeName==="input"||nodeName==="textarea"){
3637dest.defaultValue=src.defaultValue;
3638}
3639}
3640function domManip(collection,args,callback,ignored){
3641args=flat(args);
3642var fragment,first,scripts,hasScripts,node,doc,
3643i=0,
3644l=collection.length,
3645iNoClone=l-1,
3646value=args[0],
3647valueIsFunction=isFunction(value);
3648if(valueIsFunction||
3649(l>1&&typeof value==="string"&&
3650!support.checkClone&&rchecked.test(value))){
3651return collection.each(function(index){
3652var self=collection.eq(index);
3653if(valueIsFunction){
3654args[0]=value.call(this,index,self.html());
3655}
3656domManip(self,args,callback,ignored);
3657});
3658}
3659if(l){
3660fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);
3661first=fragment.firstChild;
3662if(fragment.childNodes.length===1){
3663fragment=first;
3664}
3665if(first||ignored){
3666scripts=jQuery.map(getAll(fragment,"script"),disableScript);
3667hasScripts=scripts.length;
3668for(;i<l;i++){
3669node=fragment;
3670if(i!==iNoClone){
3671node=jQuery.clone(node,true,true);
3672if(hasScripts){
3673jQuery.merge(scripts,getAll(node,"script"));
3674}
3675}
3676callback.call(collection[i],node,i);
3677}
3678if(hasScripts){
3679doc=scripts[scripts.length-1].ownerDocument;
3680jQuery.map(scripts,restoreScript);
3681for(i=0;i<hasScripts;i++){
3682node=scripts[i];
3683if(rscriptType.test(node.type||"")&&
3684!dataPriv.access(node,"globalEval")&&
3685jQuery.contains(doc,node)){
3686if(node.src&&(node.type||"").toLowerCase()!=="module"){
3687if(jQuery._evalUrl&&!node.noModule){
3688jQuery._evalUrl(node.src,{
3689nonce:node.nonce||node.getAttribute("nonce")
3690},doc);
3691}
3692}else{
3693DOMEval(node.textContent.replace(rcleanScript,""),node,doc);
3694}
3695}
3696}
3697}
3698}
3699}
3700return collection;
3701}
3702function remove(elem,selector,keepData){
3703var node,
3704nodes=selector?jQuery.filter(selector,elem):elem,
3705i=0;
3706for(;(node=nodes[i])!=null;i++){
3707if(!keepData&&node.nodeType===1){
3708jQuery.cleanData(getAll(node));
3709}
3710if(node.parentNode){
3711if(keepData&&isAttached(node)){
3712setGlobalEval(getAll(node,"script"));
3713}
3714node.parentNode.removeChild(node);
3715}
3716}
3717return elem;
3718}
3719jQuery.extend({
3720htmlPrefilter:function(html){
3721return html;
3722},
3723clone:function(elem,dataAndEvents,deepDataAndEvents){
3724var i,l,srcElements,destElements,
3725clone=elem.cloneNode(true),
3726inPage=isAttached(elem);
3727if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&
3728!jQuery.isXMLDoc(elem)){
3729destElements=getAll(clone);
3730srcElements=getAll(elem);
3731for(i=0,l=srcElements.length;i<l;i++){
3732fixInput(srcElements[i],destElements[i]);
3733}
3734}
3735if(dataAndEvents){
3736if(deepDataAndEvents){
3737srcElements=srcElements||getAll(elem);
3738destElements=destElements||getAll(clone);
3739for(i=0,l=srcElements.length;i<l;i++){
3740cloneCopyEvent(srcElements[i],destElements[i]);
3741}
3742}else{
3743cloneCopyEvent(elem,clone);
3744}
3745}
3746destElements=getAll(clone,"script");
3747if(destElements.length>0){
3748setGlobalEval(destElements,!inPage&&getAll(elem,"script"));
3749}
3750return clone;
3751},
3752cleanData:function(elems){
3753var data,elem,type,
3754special=jQuery.event.special,
3755i=0;
3756for(;(elem=elems[i])!==undefined;i++){
3757if(acceptData(elem)){
3758if((data=elem[dataPriv.expando])){
3759if(data.events){
3760for(type in data.events){
3761if(special[type]){
3762jQuery.event.remove(elem,type);
3763}else{
3764jQuery.removeEvent(elem,type,data.handle);
3765}
3766}
3767}
3768elem[dataPriv.expando]=undefined;
3769}
3770if(elem[dataUser.expando]){
3771elem[dataUser.expando]=undefined;
3772}
3773}
3774}
3775}
3776});
3777jQuery.fn.extend({
3778detach:function(selector){
3779return remove(this,selector,true);
3780},
3781remove:function(selector){
3782return remove(this,selector);
3783},
3784text:function(value){
3785return access(this,function(value){
3786return value===undefined?
3787jQuery.text(this):
3788this.empty().each(function(){
3789if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3790this.textContent=value;
3791}
3792});
3793},null,value,arguments.length);
3794},
3795append:function(){
3796return domManip(this,arguments,function(elem){
3797if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3798var target=manipulationTarget(this,elem);
3799target.appendChild(elem);
3800}
3801});
3802},
3803prepend:function(){
3804return domManip(this,arguments,function(elem){
3805if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3806var target=manipulationTarget(this,elem);
3807target.insertBefore(elem,target.firstChild);
3808}
3809});
3810},
3811before:function(){
3812return domManip(this,arguments,function(elem){
3813if(this.parentNode){
3814this.parentNode.insertBefore(elem,this);
3815}
3816});
3817},
3818after:function(){
3819return domManip(this,arguments,function(elem){
3820if(this.parentNode){
3821this.parentNode.insertBefore(elem,this.nextSibling);
3822}
3823});
3824},
3825empty:function(){
3826var elem,
3827i=0;
3828for(;(elem=this[i])!=null;i++){
3829if(elem.nodeType===1){
3830jQuery.cleanData(getAll(elem,false));
3831elem.textContent="";
3832}
3833}
3834return this;
3835},
3836clone:function(dataAndEvents,deepDataAndEvents){
3837dataAndEvents=dataAndEvents==null?false:dataAndEvents;
3838deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;
3839return this.map(function(){
3840return jQuery.clone(this,dataAndEvents,deepDataAndEvents);
3841});
3842},
3843html:function(value){
3844return access(this,function(value){
3845var elem=this[0]||{},
3846i=0,
3847l=this.length;
3848if(value===undefined&&elem.nodeType===1){
3849return elem.innerHTML;
3850}
3851if(typeof value==="string"&&!rnoInnerhtml.test(value)&&
3852!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){
3853value=jQuery.htmlPrefilter(value);
3854try{
3855for(;i<l;i++){
3856elem=this[i]||{};
3857if(elem.nodeType===1){
3858jQuery.cleanData(getAll(elem,false));
3859elem.innerHTML=value;
3860}
3861}
3862elem=0;
3863}catch(e){}
3864}
3865if(elem){
3866this.empty().append(value);
3867}
3868},null,value,arguments.length);
3869},
3870replaceWith:function(){
3871var ignored=[];
3872return domManip(this,arguments,function(elem){
3873var parent=this.parentNode;
3874if(jQuery.inArray(this,ignored)<0){
3875jQuery.cleanData(getAll(this));
3876if(parent){
3877parent.replaceChild(elem,this);
3878}
3879}
3880},ignored);
3881}
3882});
3883jQuery.each({
3884appendTo:"append",
3885prependTo:"prepend",
3886insertBefore:"before",
3887insertAfter:"after",
3888replaceAll:"replaceWith"
3889},function(name,original){
3890jQuery.fn[name]=function(selector){
3891var elems,
3892ret=[],
3893insert=jQuery(selector),
3894last=insert.length-1,
3895i=0;
3896for(;i<=last;i++){
3897elems=i===last?this:this.clone(true);
3898jQuery(insert[i])[original](elems);
3899push.apply(ret,elems.get());
3900}
3901return this.pushStack(ret);
3902};
3903});
3904var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");
3905var rcustomProp=/^--/;
3906var getStyles=function(elem){
3907var view=elem.ownerDocument.defaultView;
3908if(!view||!view.opener){
3909view=window;
3910}
3911return view.getComputedStyle(elem);
3912};
3913var swap=function(elem,options,callback){
3914var ret,name,
3915old={};
3916for(name in options){
3917old[name]=elem.style[name];
3918elem.style[name]=options[name];
3919}
3920ret=callback.call(elem);
3921for(name in options){
3922elem.style[name]=old[name];
3923}
3924return ret;
3925};
3926var rboxStyle=new RegExp(cssExpand.join("|"),"i");
3927(function(){
3928function computeStyleTests(){
3929if(!div){
3930return;
3931}
3932container.style.cssText="position:absolute;left:-11111px;width:60px;"+
3933"margin-top:1px;padding:0;border:0";
3934div.style.cssText=
3935"position:relative;display:block;box-sizing:border-box;overflow:scroll;"+
3936"margin:auto;border:1px;padding:1px;"+
3937"width:60%;top:1%";
3938documentElement.appendChild(container).appendChild(div);
3939var divStyle=window.getComputedStyle(div);
3940pixelPositionVal=divStyle.top!=="1%";
3941reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;
3942div.style.right="60%";
3943pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;
3944boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;
3945div.style.position="absolute";
3946scrollboxSizeVal=roundPixelMeasures(div.offsetWidth/3)===12;
3947documentElement.removeChild(container);
3948div=null;
3949}
3950function roundPixelMeasures(measure){
3951return Math.round(parseFloat(measure));
3952}
3953var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,
3954reliableTrDimensionsVal,reliableMarginLeftVal,
3955container=document.createElement("div"),
3956div=document.createElement("div");
3957if(!div.style){
3958return;
3959}
3960div.style.backgroundClip="content-box";
3961div.cloneNode(true).style.backgroundClip="";
3962support.clearCloneStyle=div.style.backgroundClip==="content-box";
3963jQuery.extend(support,{
3964boxSizingReliable:function(){
3965computeStyleTests();
3966return boxSizingReliableVal;
3967},
3968pixelBoxStyles:function(){
3969computeStyleTests();
3970return pixelBoxStylesVal;
3971},
3972pixelPosition:function(){
3973computeStyleTests();
3974return pixelPositionVal;
3975},
3976reliableMarginLeft:function(){
3977computeStyleTests();
3978return reliableMarginLeftVal;
3979},
3980scrollboxSize:function(){
3981computeStyleTests();
3982return scrollboxSizeVal;
3983},
3984reliableTrDimensions:function(){
3985var table,tr,trChild,trStyle;
3986if(reliableTrDimensionsVal==null){
3987table=document.createElement("table");
3988tr=document.createElement("tr");
3989trChild=document.createElement("div");
3990table.style.cssText="position:absolute;left:-11111px;border-collapse:separate";
3991tr.style.cssText="box-sizing:content-box;border:1px solid";
3992tr.style.height="1px";
3993trChild.style.height="9px";
3994trChild.style.display="block";
3995documentElement
3996.appendChild(table)
3997.appendChild(tr)
3998.appendChild(trChild);
3999trStyle=window.getComputedStyle(tr);
4000reliableTrDimensionsVal=(parseInt(trStyle.height,10)+
4001parseInt(trStyle.borderTopWidth,10)+
4002parseInt(trStyle.borderBottomWidth,10))===tr.offsetHeight;
4003documentElement.removeChild(table);
4004}
4005return reliableTrDimensionsVal;
4006}
4007});
4008})();
4009function curCSS(elem,name,computed){
4010var width,minWidth,maxWidth,ret,
4011isCustomProp=rcustomProp.test(name),
4012style=elem.style;
4013computed=computed||getStyles(elem);
4014if(computed){
4015ret=computed.getPropertyValue(name)||computed[name];
4016if(isCustomProp&&ret){
4017ret=ret.replace(rtrimCSS,"$1")||undefined;
4018}
4019if(ret===""&&!isAttached(elem)){
4020ret=jQuery.style(elem,name);
4021}
4022if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){
4023width=style.width;
4024minWidth=style.minWidth;
4025maxWidth=style.maxWidth;
4026style.minWidth=style.maxWidth=style.width=ret;
4027ret=computed.width;
4028style.width=width;
4029style.minWidth=minWidth;
4030style.maxWidth=maxWidth;
4031}
4032}
4033return ret!==undefined?
4034ret+"":
4035ret;
4036}
4037function addGetHookIf(conditionFn,hookFn){
4038return{
4039get:function(){
4040if(conditionFn()){
4041delete this.get;
4042return;
4043}
4044return(this.get=hookFn).apply(this,arguments);
4045}
4046};
4047}
4048var cssPrefixes=["Webkit","Moz","ms"],
4049emptyStyle=document.createElement("div").style,
4050vendorProps={};
4051function vendorPropName(name){
4052var capName=name[0].toUpperCase()+name.slice(1),
4053i=cssPrefixes.length;
4054while(i--){
4055name=cssPrefixes[i]+capName;
4056if(name in emptyStyle){
4057return name;
4058}
4059}
4060}
4061function finalPropName(name){
4062var final=jQuery.cssProps[name]||vendorProps[name];
4063if(final){
4064return final;
4065}
4066if(name in emptyStyle){
4067return name;
4068}
4069return vendorProps[name]=vendorPropName(name)||name;
4070}
4071var
4072rdisplayswap=/^(none|table(?!-c[ea]).+)/,
4073cssShow={position:"absolute",visibility:"hidden",display:"block"},
4074cssNormalTransform={
4075letterSpacing:"0",
4076fontWeight:"400"
4077};
4078function setPositiveNumber(_elem,value,subtract){
4079var matches=rcssNum.exec(value);
4080return matches?
4081Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):
4082value;
4083}
4084function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){
4085var i=dimension==="width"?1:0,
4086extra=0,
4087delta=0,
4088marginDelta=0;
4089if(box===(isBorderBox?"border":"content")){
4090return 0;
4091}
4092for(;i<4;i+=2){
4093if(box==="margin"){
4094marginDelta+=jQuery.css(elem,box+cssExpand[i],true,styles);
4095}
4096if(!isBorderBox){
4097delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);
4098if(box!=="padding"){
4099delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4100}else{
4101extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4102}
4103}else{
4104if(box==="content"){
4105delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);
4106}
4107if(box!=="margin"){
4108delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4109}
4110}
4111}
4112if(!isBorderBox&&computedVal>=0){
4113delta+=Math.max(0,Math.ceil(
4114elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
4115computedVal-
4116delta-
4117extra-
41180.5
4119))||0;
4120}
4121return delta+marginDelta;
4122}
4123function getWidthOrHeight(elem,dimension,extra){
4124var styles=getStyles(elem),
4125boxSizingNeeded=!support.boxSizingReliable()||extra,
4126isBorderBox=boxSizingNeeded&&
4127jQuery.css(elem,"boxSizing",false,styles)==="border-box",
4128valueIsBorderBox=isBorderBox,
4129val=curCSS(elem,dimension,styles),
4130offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);
4131if(rnumnonpx.test(val)){
4132if(!extra){
4133return val;
4134}
4135val="auto";
4136}
4137if((!support.boxSizingReliable()&&isBorderBox||
4138!support.reliableTrDimensions()&&nodeName(elem,"tr")||
4139val==="auto"||
4140!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline")&&
4141elem.getClientRects().length){
4142isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";
4143valueIsBorderBox=offsetProp in elem;
4144if(valueIsBorderBox){
4145val=elem[offsetProp];
4146}
4147}
4148val=parseFloat(val)||0;
4149return(val+
4150boxModelAdjustment(
4151elem,
4152dimension,
4153extra||(isBorderBox?"border":"content"),
4154valueIsBorderBox,
4155styles,
4156val
4157)
4158)+"px";
4159}
4160jQuery.extend({
4161cssHooks:{
4162opacity:{
4163get:function(elem,computed){
4164if(computed){
4165var ret=curCSS(elem,"opacity");
4166return ret===""?"1":ret;
4167}
4168}
4169}
4170},
4171cssNumber:{
4172animationIterationCount:true,
4173aspectRatio:true,
4174borderImageSlice:true,
4175columnCount:true,
4176flexGrow:true,
4177flexShrink:true,
4178fontWeight:true,
4179gridArea:true,
4180gridColumn:true,
4181gridColumnEnd:true,
4182gridColumnStart:true,
4183gridRow:true,
4184gridRowEnd:true,
4185gridRowStart:true,
4186lineHeight:true,
4187opacity:true,
4188order:true,
4189orphans:true,
4190scale:true,
4191widows:true,
4192zIndex:true,
4193zoom:true,
4194fillOpacity:true,
4195floodOpacity:true,
4196stopOpacity:true,
4197strokeMiterlimit:true,
4198strokeOpacity:true
4199},
4200cssProps:{},
4201style:function(elem,name,value,extra){
4202if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){
4203return;
4204}
4205var ret,type,hooks,
4206origName=camelCase(name),
4207isCustomProp=rcustomProp.test(name),
4208style=elem.style;
4209if(!isCustomProp){
4210name=finalPropName(origName);
4211}
4212hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];
4213if(value!==undefined){
4214type=typeof value;
4215if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){
4216value=adjustCSS(elem,name,ret);
4217type="number";
4218}
4219if(value==null||value!==value){
4220return;
4221}
4222if(type==="number"&&!isCustomProp){
4223value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");
4224}
4225if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){
4226style[name]="inherit";
4227}
4228if(!hooks||!("set"in hooks)||
4229(value=hooks.set(elem,value,extra))!==undefined){
4230if(isCustomProp){
4231style.setProperty(name,value);
4232}else{
4233style[name]=value;
4234}
4235}
4236}else{
4237if(hooks&&"get"in hooks&&
4238(ret=hooks.get(elem,false,extra))!==undefined){
4239return ret;
4240}
4241return style[name];
4242}
4243},
4244css:function(elem,name,extra,styles){
4245var val,num,hooks,
4246origName=camelCase(name),
4247isCustomProp=rcustomProp.test(name);
4248if(!isCustomProp){
4249name=finalPropName(origName);
4250}
4251hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];
4252if(hooks&&"get"in hooks){
4253val=hooks.get(elem,true,extra);
4254}
4255if(val===undefined){
4256val=curCSS(elem,name,styles);
4257}
4258if(val==="normal"&&name in cssNormalTransform){
4259val=cssNormalTransform[name];
4260}
4261if(extra===""||extra){
4262num=parseFloat(val);
4263return extra===true||isFinite(num)?num||0:val;
4264}
4265return val;
4266}
4267});
4268jQuery.each(["height","width"],function(_i,dimension){
4269jQuery.cssHooks[dimension]={
4270get:function(elem,computed,extra){
4271if(computed){
4272return rdisplayswap.test(jQuery.css(elem,"display"))&&
4273(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?
4274swap(elem,cssShow,function(){
4275return getWidthOrHeight(elem,dimension,extra);
4276}):
4277getWidthOrHeight(elem,dimension,extra);
4278}
4279},
4280set:function(elem,value,extra){
4281var matches,
4282styles=getStyles(elem),
4283scrollboxSizeBuggy=!support.scrollboxSize()&&
4284styles.position==="absolute",
4285boxSizingNeeded=scrollboxSizeBuggy||extra,
4286isBorderBox=boxSizingNeeded&&
4287jQuery.css(elem,"boxSizing",false,styles)==="border-box",
4288subtract=extra?
4289boxModelAdjustment(
4290elem,
4291dimension,
4292extra,
4293isBorderBox,
4294styles
4295):
42960;
4297if(isBorderBox&&scrollboxSizeBuggy){
4298subtract-=Math.ceil(
4299elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
4300parseFloat(styles[dimension])-
4301boxModelAdjustment(elem,dimension,"border",false,styles)-
43020.5
4303);
4304}
4305if(subtract&&(matches=rcssNum.exec(value))&&
4306(matches[3]||"px")!=="px"){
4307elem.style[dimension]=value;
4308value=jQuery.css(elem,dimension);
4309}
4310return setPositiveNumber(elem,value,subtract);
4311}
4312};
4313});
4314jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,
4315function(elem,computed){
4316if(computed){
4317return(parseFloat(curCSS(elem,"marginLeft"))||
4318elem.getBoundingClientRect().left-
4319swap(elem,{marginLeft:0},function(){
4320return elem.getBoundingClientRect().left;
4321})
4322)+"px";
4323}
4324}
4325);
4326jQuery.each({
4327margin:"",
4328padding:"",
4329border:"Width"
4330},function(prefix,suffix){
4331jQuery.cssHooks[prefix+suffix]={
4332expand:function(value){
4333var i=0,
4334expanded={},
4335parts=typeof value==="string"?value.split(" "):[value];
4336for(;i<4;i++){
4337expanded[prefix+cssExpand[i]+suffix]=
4338parts[i]||parts[i-2]||parts[0];
4339}
4340return expanded;
4341}
4342};
4343if(prefix!=="margin"){
4344jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;
4345}
4346});
4347jQuery.fn.extend({
4348css:function(name,value){
4349return access(this,function(elem,name,value){
4350var styles,len,
4351map={},
4352i=0;
4353if(Array.isArray(name)){
4354styles=getStyles(elem);
4355len=name.length;
4356for(;i<len;i++){
4357map[name[i]]=jQuery.css(elem,name[i],false,styles);
4358}
4359return map;
4360}
4361return value!==undefined?
4362jQuery.style(elem,name,value):
4363jQuery.css(elem,name);
4364},name,value,arguments.length>1);
4365}
4366});
4367function Tween(elem,options,prop,end,easing){
4368return new Tween.prototype.init(elem,options,prop,end,easing);
4369}
4370jQuery.Tween=Tween;
4371Tween.prototype={
4372constructor:Tween,
4373init:function(elem,options,prop,end,easing,unit){
4374this.elem=elem;
4375this.prop=prop;
4376this.easing=easing||jQuery.easing._default;
4377this.options=options;
4378this.start=this.now=this.cur();
4379this.end=end;
4380this.unit=unit||(jQuery.cssNumber[prop]?"":"px");
4381},
4382cur:function(){
4383var hooks=Tween.propHooks[this.prop];
4384return hooks&&hooks.get?
4385hooks.get(this):
4386Tween.propHooks._default.get(this);
4387},
4388run:function(percent){
4389var eased,
4390hooks=Tween.propHooks[this.prop];
4391if(this.options.duration){
4392this.pos=eased=jQuery.easing[this.easing](
4393percent,this.options.duration*percent,0,1,this.options.duration
4394);
4395}else{
4396this.pos=eased=percent;
4397}
4398this.now=(this.end-this.start)*eased+this.start;
4399if(this.options.step){
4400this.options.step.call(this.elem,this.now,this);
4401}
4402if(hooks&&hooks.set){
4403hooks.set(this);
4404}else{
4405Tween.propHooks._default.set(this);
4406}
4407return this;
4408}
4409};
4410Tween.prototype.init.prototype=Tween.prototype;
4411Tween.propHooks={
4412_default:{
4413get:function(tween){
4414var result;
4415if(tween.elem.nodeType!==1||
4416tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){
4417return tween.elem[tween.prop];
4418}
4419result=jQuery.css(tween.elem,tween.prop,"");
4420return!result||result==="auto"?0:result;
4421},
4422set:function(tween){
4423if(jQuery.fx.step[tween.prop]){
4424jQuery.fx.step[tween.prop](tween);
4425}else if(tween.elem.nodeType===1&&(
4426jQuery.cssHooks[tween.prop]||
4427tween.elem.style[finalPropName(tween.prop)]!=null)){
4428jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);
4429}else{
4430tween.elem[tween.prop]=tween.now;
4431}
4432}
4433}
4434};
4435Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={
4436set:function(tween){
4437if(tween.elem.nodeType&&tween.elem.parentNode){
4438tween.elem[tween.prop]=tween.now;
4439}
4440}
4441};
4442jQuery.easing={
4443linear:function(p){
4444return p;
4445},
4446swing:function(p){
4447return 0.5-Math.cos(p*Math.PI)/2;
4448},
4449_default:"swing"
4450};
4451jQuery.fx=Tween.prototype.init;
4452jQuery.fx.step={};
4453var
4454fxNow,inProgress,
4455rfxtypes=/^(?:toggle|show|hide)$/,
4456rrun=/queueHooks$/;
4457function schedule(){
4458if(inProgress){
4459if(document.hidden===false&&window.requestAnimationFrame){
4460window.requestAnimationFrame(schedule);
4461}else{
4462window.setTimeout(schedule,jQuery.fx.interval);
4463}
4464jQuery.fx.tick();
4465}
4466}
4467function createFxNow(){
4468window.setTimeout(function(){
4469fxNow=undefined;
4470});
4471return(fxNow=Date.now());
4472}
4473function genFx(type,includeWidth){
4474var which,
4475i=0,
4476attrs={height:type};
4477includeWidth=includeWidth?1:0;
4478for(;i<4;i+=2-includeWidth){
4479which=cssExpand[i];
4480attrs["margin"+which]=attrs["padding"+which]=type;
4481}
4482if(includeWidth){
4483attrs.opacity=attrs.width=type;
4484}
4485return attrs;
4486}
4487function createTween(value,prop,animation){
4488var tween,
4489collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),
4490index=0,
4491length=collection.length;
4492for(;index<length;index++){
4493if((tween=collection[index].call(animation,prop,value))){
4494return tween;
4495}
4496}
4497}
4498function defaultPrefilter(elem,props,opts){
4499var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,
4500isBox="width"in props||"height"in props,
4501anim=this,
4502orig={},
4503style=elem.style,
4504hidden=elem.nodeType&&isHiddenWithinTree(elem),
4505dataShow=dataPriv.get(elem,"fxshow");
4506if(!opts.queue){
4507hooks=jQuery._queueHooks(elem,"fx");
4508if(hooks.unqueued==null){
4509hooks.unqueued=0;
4510oldfire=hooks.empty.fire;
4511hooks.empty.fire=function(){
4512if(!hooks.unqueued){
4513oldfire();
4514}
4515};
4516}
4517hooks.unqueued++;
4518anim.always(function(){
4519anim.always(function(){
4520hooks.unqueued--;
4521if(!jQuery.queue(elem,"fx").length){
4522hooks.empty.fire();
4523}
4524});
4525});
4526}
4527for(prop in props){
4528value=props[prop];
4529if(rfxtypes.test(value)){
4530delete props[prop];
4531toggle=toggle||value==="toggle";
4532if(value===(hidden?"hide":"show")){
4533if(value==="show"&&dataShow&&dataShow[prop]!==undefined){
4534hidden=true;
4535}else{
4536continue;
4537}
4538}
4539orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);
4540}
4541}
4542propTween=!jQuery.isEmptyObject(props);
4543if(!propTween&&jQuery.isEmptyObject(orig)){
4544return;
4545}
4546if(isBox&&elem.nodeType===1){
4547opts.overflow=[style.overflow,style.overflowX,style.overflowY];
4548restoreDisplay=dataShow&&dataShow.display;
4549if(restoreDisplay==null){
4550restoreDisplay=dataPriv.get(elem,"display");
4551}
4552display=jQuery.css(elem,"display");
4553if(display==="none"){
4554if(restoreDisplay){
4555display=restoreDisplay;
4556}else{
4557showHide([elem],true);
4558restoreDisplay=elem.style.display||restoreDisplay;
4559display=jQuery.css(elem,"display");
4560showHide([elem]);
4561}
4562}
4563if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){
4564if(jQuery.css(elem,"float")==="none"){
4565if(!propTween){
4566anim.done(function(){
4567style.display=restoreDisplay;
4568});
4569if(restoreDisplay==null){
4570display=style.display;
4571restoreDisplay=display==="none"?"":display;
4572}
4573}
4574style.display="inline-block";
4575}
4576}
4577}
4578if(opts.overflow){
4579style.overflow="hidden";
4580anim.always(function(){
4581style.overflow=opts.overflow[0];
4582style.overflowX=opts.overflow[1];
4583style.overflowY=opts.overflow[2];
4584});
4585}
4586propTween=false;
4587for(prop in orig){
4588if(!propTween){
4589if(dataShow){
4590if("hidden"in dataShow){
4591hidden=dataShow.hidden;
4592}
4593}else{
4594dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});
4595}
4596if(toggle){
4597dataShow.hidden=!hidden;
4598}
4599if(hidden){
4600showHide([elem],true);
4601}
4602anim.done(function(){
4603if(!hidden){
4604showHide([elem]);
4605}
4606dataPriv.remove(elem,"fxshow");
4607for(prop in orig){
4608jQuery.style(elem,prop,orig[prop]);
4609}
4610});
4611}
4612propTween=createTween(hidden?dataShow[prop]:0,prop,anim);
4613if(!(prop in dataShow)){
4614dataShow[prop]=propTween.start;
4615if(hidden){
4616propTween.end=propTween.start;
4617propTween.start=0;
4618}
4619}
4620}
4621}
4622function propFilter(props,specialEasing){
4623var index,name,easing,value,hooks;
4624for(index in props){
4625name=camelCase(index);
4626easing=specialEasing[name];
4627value=props[index];
4628if(Array.isArray(value)){
4629easing=value[1];
4630value=props[index]=value[0];
4631}
4632if(index!==name){
4633props[name]=value;
4634delete props[index];
4635}
4636hooks=jQuery.cssHooks[name];
4637if(hooks&&"expand"in hooks){
4638value=hooks.expand(value);
4639delete props[name];
4640for(index in value){
4641if(!(index in props)){
4642props[index]=value[index];
4643specialEasing[index]=easing;
4644}
4645}
4646}else{
4647specialEasing[name]=easing;
4648}
4649}
4650}
4651function Animation(elem,properties,options){
4652var result,
4653stopped,
4654index=0,
4655length=Animation.prefilters.length,
4656deferred=jQuery.Deferred().always(function(){
4657delete tick.elem;
4658}),
4659tick=function(){
4660if(stopped){
4661return false;
4662}
4663var currentTime=fxNow||createFxNow(),
4664remaining=Math.max(0,animation.startTime+animation.duration-currentTime),
4665temp=remaining/animation.duration||0,
4666percent=1-temp,
4667index=0,
4668length=animation.tweens.length;
4669for(;index<length;index++){
4670animation.tweens[index].run(percent);
4671}
4672deferred.notifyWith(elem,[animation,percent,remaining]);
4673if(percent<1&&length){
4674return remaining;
4675}
4676if(!length){
4677deferred.notifyWith(elem,[animation,1,0]);
4678}
4679deferred.resolveWith(elem,[animation]);
4680return false;
4681},
4682animation=deferred.promise({
4683elem:elem,
4684props:jQuery.extend({},properties),
4685opts:jQuery.extend(true,{
4686specialEasing:{},
4687easing:jQuery.easing._default
4688},options),
4689originalProperties:properties,
4690originalOptions:options,
4691startTime:fxNow||createFxNow(),
4692duration:options.duration,
4693tweens:[],
4694createTween:function(prop,end){
4695var tween=jQuery.Tween(elem,animation.opts,prop,end,
4696animation.opts.specialEasing[prop]||animation.opts.easing);
4697animation.tweens.push(tween);
4698return tween;
4699},
4700stop:function(gotoEnd){
4701var index=0,
4702length=gotoEnd?animation.tweens.length:0;
4703if(stopped){
4704return this;
4705}
4706stopped=true;
4707for(;index<length;index++){
4708animation.tweens[index].run(1);
4709}
4710if(gotoEnd){
4711deferred.notifyWith(elem,[animation,1,0]);
4712deferred.resolveWith(elem,[animation,gotoEnd]);
4713}else{
4714deferred.rejectWith(elem,[animation,gotoEnd]);
4715}
4716return this;
4717}
4718}),
4719props=animation.props;
4720propFilter(props,animation.opts.specialEasing);
4721for(;index<length;index++){
4722result=Animation.prefilters[index].call(animation,elem,props,animation.opts);
4723if(result){
4724if(isFunction(result.stop)){
4725jQuery._queueHooks(animation.elem,animation.opts.queue).stop=
4726result.stop.bind(result);
4727}
4728return result;
4729}
4730}
4731jQuery.map(props,createTween,animation);
4732if(isFunction(animation.opts.start)){
4733animation.opts.start.call(elem,animation);
4734}
4735animation
4736.progress(animation.opts.progress)
4737.done(animation.opts.done,animation.opts.complete)
4738.fail(animation.opts.fail)
4739.always(animation.opts.always);
4740jQuery.fx.timer(
4741jQuery.extend(tick,{
4742elem:elem,
4743anim:animation,
4744queue:animation.opts.queue
4745})
4746);
4747return animation;
4748}
4749jQuery.Animation=jQuery.extend(Animation,{
4750tweeners:{
4751"*":[function(prop,value){
4752var tween=this.createTween(prop,value);
4753adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);
4754return tween;
4755}]
4756},
4757tweener:function(props,callback){
4758if(isFunction(props)){
4759callback=props;
4760props=["*"];
4761}else{
4762props=props.match(rnothtmlwhite);
4763}
4764var prop,
4765index=0,
4766length=props.length;
4767for(;index<length;index++){
4768prop=props[index];
4769Animation.tweeners[prop]=Animation.tweeners[prop]||[];
4770Animation.tweeners[prop].unshift(callback);
4771}
4772},
4773prefilters:[defaultPrefilter],
4774prefilter:function(callback,prepend){
4775if(prepend){
4776Animation.prefilters.unshift(callback);
4777}else{
4778Animation.prefilters.push(callback);
4779}
4780}
4781});
4782jQuery.speed=function(speed,easing,fn){
4783var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{
4784complete:fn||!fn&&easing||
4785isFunction(speed)&&speed,
4786duration:speed,
4787easing:fn&&easing||easing&&!isFunction(easing)&&easing
4788};
4789if(jQuery.fx.off){
4790opt.duration=0;
4791}else{
4792if(typeof opt.duration!=="number"){
4793if(opt.duration in jQuery.fx.speeds){
4794opt.duration=jQuery.fx.speeds[opt.duration];
4795}else{
4796opt.duration=jQuery.fx.speeds._default;
4797}
4798}
4799}
4800if(opt.queue==null||opt.queue===true){
4801opt.queue="fx";
4802}
4803opt.old=opt.complete;
4804opt.complete=function(){
4805if(isFunction(opt.old)){
4806opt.old.call(this);
4807}
4808if(opt.queue){
4809jQuery.dequeue(this,opt.queue);
4810}
4811};
4812return opt;
4813};
4814jQuery.fn.extend({
4815fadeTo:function(speed,to,easing,callback){
4816return this.filter(isHiddenWithinTree).css("opacity",0).show()
4817.end().animate({opacity:to},speed,easing,callback);
4818},
4819animate:function(prop,speed,easing,callback){
4820var empty=jQuery.isEmptyObject(prop),
4821optall=jQuery.speed(speed,easing,callback),
4822doAnimation=function(){
4823var anim=Animation(this,jQuery.extend({},prop),optall);
4824if(empty||dataPriv.get(this,"finish")){
4825anim.stop(true);
4826}
4827};
4828doAnimation.finish=doAnimation;
4829return empty||optall.queue===false?
4830this.each(doAnimation):
4831this.queue(optall.queue,doAnimation);
4832},
4833stop:function(type,clearQueue,gotoEnd){
4834var stopQueue=function(hooks){
4835var stop=hooks.stop;
4836delete hooks.stop;
4837stop(gotoEnd);
4838};
4839if(typeof type!=="string"){
4840gotoEnd=clearQueue;
4841clearQueue=type;
4842type=undefined;
4843}
4844if(clearQueue){
4845this.queue(type||"fx",[]);
4846}
4847return this.each(function(){
4848var dequeue=true,
4849index=type!=null&&type+"queueHooks",
4850timers=jQuery.timers,
4851data=dataPriv.get(this);
4852if(index){
4853if(data[index]&&data[index].stop){
4854stopQueue(data[index]);
4855}
4856}else{
4857for(index in data){
4858if(data[index]&&data[index].stop&&rrun.test(index)){
4859stopQueue(data[index]);
4860}
4861}
4862}
4863for(index=timers.length;index--;){
4864if(timers[index].elem===this&&
4865(type==null||timers[index].queue===type)){
4866timers[index].anim.stop(gotoEnd);
4867dequeue=false;
4868timers.splice(index,1);
4869}
4870}
4871if(dequeue||!gotoEnd){
4872jQuery.dequeue(this,type);
4873}
4874});
4875},
4876finish:function(type){
4877if(type!==false){
4878type=type||"fx";
4879}
4880return this.each(function(){
4881var index,
4882data=dataPriv.get(this),
4883queue=data[type+"queue"],
4884hooks=data[type+"queueHooks"],
4885timers=jQuery.timers,
4886length=queue?queue.length:0;
4887data.finish=true;
4888jQuery.queue(this,type,[]);
4889if(hooks&&hooks.stop){
4890hooks.stop.call(this,true);
4891}
4892for(index=timers.length;index--;){
4893if(timers[index].elem===this&&timers[index].queue===type){
4894timers[index].anim.stop(true);
4895timers.splice(index,1);
4896}
4897}
4898for(index=0;index<length;index++){
4899if(queue[index]&&queue[index].finish){
4900queue[index].finish.call(this);
4901}
4902}
4903delete data.finish;
4904});
4905}
4906});
4907jQuery.each(["toggle","show","hide"],function(_i,name){
4908var cssFn=jQuery.fn[name];
4909jQuery.fn[name]=function(speed,easing,callback){
4910return speed==null||typeof speed==="boolean"?
4911cssFn.apply(this,arguments):
4912this.animate(genFx(name,true),speed,easing,callback);
4913};
4914});
4915jQuery.each({
4916slideDown:genFx("show"),
4917slideUp:genFx("hide"),
4918slideToggle:genFx("toggle"),
4919fadeIn:{opacity:"show"},
4920fadeOut:{opacity:"hide"},
4921fadeToggle:{opacity:"toggle"}
4922},function(name,props){
4923jQuery.fn[name]=function(speed,easing,callback){
4924return this.animate(props,speed,easing,callback);
4925};
4926});
4927jQuery.timers=[];
4928jQuery.fx.tick=function(){
4929var timer,
4930i=0,
4931timers=jQuery.timers;
4932fxNow=Date.now();
4933for(;i<timers.length;i++){
4934timer=timers[i];
4935if(!timer()&&timers[i]===timer){
4936timers.splice(i--,1);
4937}
4938}
4939if(!timers.length){
4940jQuery.fx.stop();
4941}
4942fxNow=undefined;
4943};
4944jQuery.fx.timer=function(timer){
4945jQuery.timers.push(timer);
4946jQuery.fx.start();
4947};
4948jQuery.fx.interval=13;
4949jQuery.fx.start=function(){
4950if(inProgress){
4951return;
4952}
4953inProgress=true;
4954schedule();
4955};
4956jQuery.fx.stop=function(){
4957inProgress=null;
4958};
4959jQuery.fx.speeds={
4960slow:600,
4961fast:200,
4962_default:400
4963};
4964jQuery.fn.delay=function(time,type){
4965time=jQuery.fx?jQuery.fx.speeds[time]||time:time;
4966type=type||"fx";
4967return this.queue(type,function(next,hooks){
4968var timeout=window.setTimeout(next,time);
4969hooks.stop=function(){
4970window.clearTimeout(timeout);
4971};
4972});
4973};
4974(function(){
4975var input=document.createElement("input"),
4976select=document.createElement("select"),
4977opt=select.appendChild(document.createElement("option"));
4978input.type="checkbox";
4979support.checkOn=input.value!=="";
4980support.optSelected=opt.selected;
4981input=document.createElement("input");
4982input.value="t";
4983input.type="radio";
4984support.radioValue=input.value==="t";
4985})();
4986var boolHook,
4987attrHandle=jQuery.expr.attrHandle;
4988jQuery.fn.extend({
4989attr:function(name,value){
4990return access(this,jQuery.attr,name,value,arguments.length>1);
4991},
4992removeAttr:function(name){
4993return this.each(function(){
4994jQuery.removeAttr(this,name);
4995});
4996}
4997});
4998jQuery.extend({
4999attr:function(elem,name,value){
5000var ret,hooks,
5001nType=elem.nodeType;
5002if(nType===3||nType===8||nType===2){
5003return;
5004}
5005if(typeof elem.getAttribute==="undefined"){
5006return jQuery.prop(elem,name,value);
5007}
5008if(nType!==1||!jQuery.isXMLDoc(elem)){
5009hooks=jQuery.attrHooks[name.toLowerCase()]||
5010(jQuery.expr.match.bool.test(name)?boolHook:undefined);
5011}
5012if(value!==undefined){
5013if(value===null){
5014jQuery.removeAttr(elem,name);
5015return;
5016}
5017if(hooks&&"set"in hooks&&
5018(ret=hooks.set(elem,value,name))!==undefined){
5019return ret;
5020}
5021elem.setAttribute(name,value+"");
5022return value;
5023}
5024if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){
5025return ret;
5026}
5027ret=jQuery.find.attr(elem,name);
5028return ret==null?undefined:ret;
5029},
5030attrHooks:{
5031type:{
5032set:function(elem,value){
5033if(!support.radioValue&&value==="radio"&&
5034nodeName(elem,"input")){
5035var val=elem.value;
5036elem.setAttribute("type",value);
5037if(val){
5038elem.value=val;
5039}
5040return value;
5041}
5042}
5043}
5044},
5045removeAttr:function(elem,value){
5046var name,
5047i=0,
5048attrNames=value&&value.match(rnothtmlwhite);
5049if(attrNames&&elem.nodeType===1){
5050while((name=attrNames[i++])){
5051elem.removeAttribute(name);
5052}
5053}
5054}
5055});
5056boolHook={
5057set:function(elem,value,name){
5058if(value===false){
5059jQuery.removeAttr(elem,name);
5060}else{
5061elem.setAttribute(name,name);
5062}
5063return name;
5064}
5065};
5066jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){
5067var getter=attrHandle[name]||jQuery.find.attr;
5068attrHandle[name]=function(elem,name,isXML){
5069var ret,handle,
5070lowercaseName=name.toLowerCase();
5071if(!isXML){
5072handle=attrHandle[lowercaseName];
5073attrHandle[lowercaseName]=ret;
5074ret=getter(elem,name,isXML)!=null?
5075lowercaseName:
5076null;
5077attrHandle[lowercaseName]=handle;
5078}
5079return ret;
5080};
5081});
5082var rfocusable=/^(?:input|select|textarea|button)$/i,
5083rclickable=/^(?:a|area)$/i;
5084jQuery.fn.extend({
5085prop:function(name,value){
5086return access(this,jQuery.prop,name,value,arguments.length>1);
5087},
5088removeProp:function(name){
5089return this.each(function(){
5090delete this[jQuery.propFix[name]||name];
5091});
5092}
5093});
5094jQuery.extend({
5095prop:function(elem,name,value){
5096var ret,hooks,
5097nType=elem.nodeType;
5098if(nType===3||nType===8||nType===2){
5099return;
5100}
5101if(nType!==1||!jQuery.isXMLDoc(elem)){
5102name=jQuery.propFix[name]||name;
5103hooks=jQuery.propHooks[name];
5104}
5105if(value!==undefined){
5106if(hooks&&"set"in hooks&&
5107(ret=hooks.set(elem,value,name))!==undefined){
5108return ret;
5109}
5110return(elem[name]=value);
5111}
5112if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){
5113return ret;
5114}
5115return elem[name];
5116},
5117propHooks:{
5118tabIndex:{
5119get:function(elem){
5120var tabindex=jQuery.find.attr(elem,"tabindex");
5121if(tabindex){
5122return parseInt(tabindex,10);
5123}
5124if(
5125rfocusable.test(elem.nodeName)||
5126rclickable.test(elem.nodeName)&&
5127elem.href
5128){
5129return 0;
5130}
5131return-1;
5132}
5133}
5134},
5135propFix:{
5136"for":"htmlFor",
5137"class":"className"
5138}
5139});
5140if(!support.optSelected){
5141jQuery.propHooks.selected={
5142get:function(elem){
5143var parent=elem.parentNode;
5144if(parent&&parent.parentNode){
5145parent.parentNode.selectedIndex;
5146}
5147return null;
5148},
5149set:function(elem){
5150var parent=elem.parentNode;
5151if(parent){
5152parent.selectedIndex;
5153if(parent.parentNode){
5154parent.parentNode.selectedIndex;
5155}
5156}
5157}
5158};
5159}
5160jQuery.each([
5161"tabIndex",
5162"readOnly",
5163"maxLength",
5164"cellSpacing",
5165"cellPadding",
5166"rowSpan",
5167"colSpan",
5168"useMap",
5169"frameBorder",
5170"contentEditable"
5171],function(){
5172jQuery.propFix[this.toLowerCase()]=this;
5173});
5174function stripAndCollapse(value){
5175var tokens=value.match(rnothtmlwhite)||[];
5176return tokens.join(" ");
5177}
5178function getClass(elem){
5179return elem.getAttribute&&elem.getAttribute("class")||"";
5180}
5181function classesToArray(value){
5182if(Array.isArray(value)){
5183return value;
5184}
5185if(typeof value==="string"){
5186return value.match(rnothtmlwhite)||[];
5187}
5188return[];
5189}
5190jQuery.fn.extend({
5191addClass:function(value){
5192var classNames,cur,curValue,className,i,finalValue;
5193if(isFunction(value)){
5194return this.each(function(j){
5195jQuery(this).addClass(value.call(this,j,getClass(this)));
5196});
5197}
5198classNames=classesToArray(value);
5199if(classNames.length){
5200return this.each(function(){
5201curValue=getClass(this);
5202cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");
5203if(cur){
5204for(i=0;i<classNames.length;i++){
5205className=classNames[i];
5206if(cur.indexOf(" "+className+" ")<0){
5207cur+=className+" ";
5208}
5209}
5210finalValue=stripAndCollapse(cur);
5211if(curValue!==finalValue){
5212this.setAttribute("class",finalValue);
5213}
5214}
5215});
5216}
5217return this;
5218},
5219removeClass:function(value){
5220var classNames,cur,curValue,className,i,finalValue;
5221if(isFunction(value)){
5222return this.each(function(j){
5223jQuery(this).removeClass(value.call(this,j,getClass(this)));
5224});
5225}
5226if(!arguments.length){
5227return this.attr("class","");
5228}
5229classNames=classesToArray(value);
5230if(classNames.length){
5231return this.each(function(){
5232curValue=getClass(this);
5233cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");
5234if(cur){
5235for(i=0;i<classNames.length;i++){
5236className=classNames[i];
5237while(cur.indexOf(" "+className+" ")>-1){
5238cur=cur.replace(" "+className+" "," ");
5239}
5240}
5241finalValue=stripAndCollapse(cur);
5242if(curValue!==finalValue){
5243this.setAttribute("class",finalValue);
5244}
5245}
5246});
5247}
5248return this;
5249},
5250toggleClass:function(value,stateVal){
5251var classNames,className,i,self,
5252type=typeof value,
5253isValidValue=type==="string"||Array.isArray(value);
5254if(isFunction(value)){
5255return this.each(function(i){
5256jQuery(this).toggleClass(
5257value.call(this,i,getClass(this),stateVal),
5258stateVal
5259);
5260});
5261}
5262if(typeof stateVal==="boolean"&&isValidValue){
5263return stateVal?this.addClass(value):this.removeClass(value);
5264}
5265classNames=classesToArray(value);
5266return this.each(function(){
5267if(isValidValue){
5268self=jQuery(this);
5269for(i=0;i<classNames.length;i++){
5270className=classNames[i];
5271if(self.hasClass(className)){
5272self.removeClass(className);
5273}else{
5274self.addClass(className);
5275}
5276}
5277}else if(value===undefined||type==="boolean"){
5278className=getClass(this);
5279if(className){
5280dataPriv.set(this,"__className__",className);
5281}
5282if(this.setAttribute){
5283this.setAttribute("class",
5284className||value===false?
5285"":
5286dataPriv.get(this,"__className__")||""
5287);
5288}
5289}
5290});
5291},
5292hasClass:function(selector){
5293var className,elem,
5294i=0;
5295className=" "+selector+" ";
5296while((elem=this[i++])){
5297if(elem.nodeType===1&&
5298(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){
5299return true;
5300}
5301}
5302return false;
5303}
5304});
5305var rreturn=/\r/g;
5306jQuery.fn.extend({
5307val:function(value){
5308var hooks,ret,valueIsFunction,
5309elem=this[0];
5310if(!arguments.length){
5311if(elem){
5312hooks=jQuery.valHooks[elem.type]||
5313jQuery.valHooks[elem.nodeName.toLowerCase()];
5314if(hooks&&
5315"get"in hooks&&
5316(ret=hooks.get(elem,"value"))!==undefined
5317){
5318return ret;
5319}
5320ret=elem.value;
5321if(typeof ret==="string"){
5322return ret.replace(rreturn,"");
5323}
5324return ret==null?"":ret;
5325}
5326return;
5327}
5328valueIsFunction=isFunction(value);
5329return this.each(function(i){
5330var val;
5331if(this.nodeType!==1){
5332return;
5333}
5334if(valueIsFunction){
5335val=value.call(this,i,jQuery(this).val());
5336}else{
5337val=value;
5338}
5339if(val==null){
5340val="";
5341}else if(typeof val==="number"){
5342val+="";
5343}else if(Array.isArray(val)){
5344val=jQuery.map(val,function(value){
5345return value==null?"":value+"";
5346});
5347}
5348hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];
5349if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){
5350this.value=val;
5351}
5352});
5353}
5354});
5355jQuery.extend({
5356valHooks:{
5357option:{
5358get:function(elem){
5359var val=jQuery.find.attr(elem,"value");
5360return val!=null?
5361val:
5362stripAndCollapse(jQuery.text(elem));
5363}
5364},
5365select:{
5366get:function(elem){
5367var value,option,i,
5368options=elem.options,
5369index=elem.selectedIndex,
5370one=elem.type==="select-one",
5371values=one?null:[],
5372max=one?index+1:options.length;
5373if(index<0){
5374i=max;
5375}else{
5376i=one?index:0;
5377}
5378for(;i<max;i++){
5379option=options[i];
5380if((option.selected||i===index)&&
5381!option.disabled&&
5382(!option.parentNode.disabled||
5383!nodeName(option.parentNode,"optgroup"))){
5384value=jQuery(option).val();
5385if(one){
5386return value;
5387}
5388values.push(value);
5389}
5390}
5391return values;
5392},
5393set:function(elem,value){
5394var optionSet,option,
5395options=elem.options,
5396values=jQuery.makeArray(value),
5397i=options.length;
5398while(i--){
5399option=options[i];
5400if(option.selected=
5401jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1
5402){
5403optionSet=true;
5404}
5405}
5406if(!optionSet){
5407elem.selectedIndex=-1;
5408}
5409return values;
5410}
5411}
5412}
5413});
5414jQuery.each(["radio","checkbox"],function(){
5415jQuery.valHooks[this]={
5416set:function(elem,value){
5417if(Array.isArray(value)){
5418return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1);
5419}
5420}
5421};
5422if(!support.checkOn){
5423jQuery.valHooks[this].get=function(elem){
5424return elem.getAttribute("value")===null?"on":elem.value;
5425};
5426}
5427});
5428var location=window.location;
5429var nonce={guid:Date.now()};
5430var rquery=(/\?/);
5431jQuery.parseXML=function(data){
5432var xml,parserErrorElem;
5433if(!data||typeof data!=="string"){
5434return null;
5435}
5436try{
5437xml=(new window.DOMParser()).parseFromString(data,"text/xml");
5438}catch(e){}
5439parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0];
5440if(!xml||parserErrorElem){
5441jQuery.error("Invalid XML: "+(
5442parserErrorElem?
5443jQuery.map(parserErrorElem.childNodes,function(el){
5444return el.textContent;
5445}).join("\n"):
5446data
5447));
5448}
5449return xml;
5450};
5451var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,
5452stopPropagationCallback=function(e){
5453e.stopPropagation();
5454};
5455jQuery.extend(jQuery.event,{
5456trigger:function(event,data,elem,onlyHandlers){
5457var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,
5458eventPath=[elem||document],
5459type=hasOwn.call(event,"type")?event.type:event,
5460namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];
5461cur=lastElement=tmp=elem=elem||document;
5462if(elem.nodeType===3||elem.nodeType===8){
5463return;
5464}
5465if(rfocusMorph.test(type+jQuery.event.triggered)){
5466return;
5467}
5468if(type.indexOf(".")>-1){
5469namespaces=type.split(".");
5470type=namespaces.shift();
5471namespaces.sort();
5472}
5473ontype=type.indexOf(":")<0&&"on"+type;
5474event=event[jQuery.expando]?
5475event:
5476new jQuery.Event(type,typeof event==="object"&&event);
5477event.isTrigger=onlyHandlers?2:3;
5478event.namespace=namespaces.join(".");
5479event.rnamespace=event.namespace?
5480new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):
5481null;
5482event.result=undefined;
5483if(!event.target){
5484event.target=elem;
5485}
5486data=data==null?
5487[event]:
5488jQuery.makeArray(data,[event]);
5489special=jQuery.event.special[type]||{};
5490if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){
5491return;
5492}
5493if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){
5494bubbleType=special.delegateType||type;
5495if(!rfocusMorph.test(bubbleType+type)){
5496cur=cur.parentNode;
5497}
5498for(;cur;cur=cur.parentNode){
5499eventPath.push(cur);
5500tmp=cur;
5501}
5502if(tmp===(elem.ownerDocument||document)){
5503eventPath.push(tmp.defaultView||tmp.parentWindow||window);
5504}
5505}
5506i=0;
5507while((cur=eventPath[i++])&&!event.isPropagationStopped()){
5508lastElement=cur;
5509event.type=i>1?
5510bubbleType:
5511special.bindType||type;
5512handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&
5513dataPriv.get(cur,"handle");
5514if(handle){
5515handle.apply(cur,data);
5516}
5517handle=ontype&&cur[ontype];
5518if(handle&&handle.apply&&acceptData(cur)){
5519event.result=handle.apply(cur,data);
5520if(event.result===false){
5521event.preventDefault();
5522}
5523}
5524}
5525event.type=type;
5526if(!onlyHandlers&&!event.isDefaultPrevented()){
5527if((!special._default||
5528special._default.apply(eventPath.pop(),data)===false)&&
5529acceptData(elem)){
5530if(ontype&&isFunction(elem[type])&&!isWindow(elem)){
5531tmp=elem[ontype];
5532if(tmp){
5533elem[ontype]=null;
5534}
5535jQuery.event.triggered=type;
5536if(event.isPropagationStopped()){
5537lastElement.addEventListener(type,stopPropagationCallback);
5538}
5539elem[type]();
5540if(event.isPropagationStopped()){
5541lastElement.removeEventListener(type,stopPropagationCallback);
5542}
5543jQuery.event.triggered=undefined;
5544if(tmp){
5545elem[ontype]=tmp;
5546}
5547}
5548}
5549}
5550return event.result;
5551},
5552simulate:function(type,elem,event){
5553var e=jQuery.extend(
5554new jQuery.Event(),
5555event,
5556{
5557type:type,
5558isSimulated:true
5559}
5560);
5561jQuery.event.trigger(e,null,elem);
5562}
5563});
5564jQuery.fn.extend({
5565trigger:function(type,data){
5566return this.each(function(){
5567jQuery.event.trigger(type,data,this);
5568});
5569},
5570triggerHandler:function(type,data){
5571var elem=this[0];
5572if(elem){
5573return jQuery.event.trigger(type,data,elem,true);
5574}
5575}
5576});
5577var
5578rbracket=/\[\]$/,
5579rCRLF=/\r?\n/g,
5580rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,
5581rsubmittable=/^(?:input|select|textarea|keygen)/i;
5582function buildParams(prefix,obj,traditional,add){
5583var name;
5584if(Array.isArray(obj)){
5585jQuery.each(obj,function(i,v){
5586if(traditional||rbracket.test(prefix)){
5587add(prefix,v);
5588}else{
5589buildParams(
5590prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",
5591v,
5592traditional,
5593add
5594);
5595}
5596});
5597}else if(!traditional&&toType(obj)==="object"){
5598for(name in obj){
5599buildParams(prefix+"["+name+"]",obj[name],traditional,add);
5600}
5601}else{
5602add(prefix,obj);
5603}
5604}
5605jQuery.param=function(a,traditional){
5606var prefix,
5607s=[],
5608add=function(key,valueOrFunction){
5609var value=isFunction(valueOrFunction)?
5610valueOrFunction():
5611valueOrFunction;
5612s[s.length]=encodeURIComponent(key)+"="+
5613encodeURIComponent(value==null?"":value);
5614};
5615if(a==null){
5616return"";
5617}
5618if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){
5619jQuery.each(a,function(){
5620add(this.name,this.value);
5621});
5622}else{
5623for(prefix in a){
5624buildParams(prefix,a[prefix],traditional,add);
5625}
5626}
5627return s.join("&");
5628};
5629jQuery.fn.extend({
5630serialize:function(){
5631return jQuery.param(this.serializeArray());
5632},
5633serializeArray:function(){
5634return this.map(function(){
5635var elements=jQuery.prop(this,"elements");
5636return elements?jQuery.makeArray(elements):this;
5637}).filter(function(){
5638var type=this.type;
5639return this.name&&!jQuery(this).is(":disabled")&&
5640rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&
5641(this.checked||!rcheckableType.test(type));
5642}).map(function(_i,elem){
5643var val=jQuery(this).val();
5644if(val==null){
5645return null;
5646}
5647if(Array.isArray(val)){
5648return jQuery.map(val,function(val){
5649return{name:elem.name,value:val.replace(rCRLF,"\r\n")};
5650});
5651}
5652return{name:elem.name,value:val.replace(rCRLF,"\r\n")};
5653}).get();
5654}
5655});
5656var
5657r20=/%20/g,
5658rhash=/#.*$/,
5659rantiCache=/([?&])_=[^&]*/,
5660rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,
5661rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
5662rnoContent=/^(?:GET|HEAD)$/,
5663rprotocol=/^\/\//,
5664prefilters={},
5665transports={},
5666allTypes="*/".concat("*"),
5667originAnchor=document.createElement("a");
5668originAnchor.href=location.href;
5669function addToPrefiltersOrTransports(structure){
5670return function(dataTypeExpression,func){
5671if(typeof dataTypeExpression!=="string"){
5672func=dataTypeExpression;
5673dataTypeExpression="*";
5674}
5675var dataType,
5676i=0,
5677dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];
5678if(isFunction(func)){
5679while((dataType=dataTypes[i++])){
5680if(dataType[0]==="+"){
5681dataType=dataType.slice(1)||"*";
5682(structure[dataType]=structure[dataType]||[]).unshift(func);
5683}else{
5684(structure[dataType]=structure[dataType]||[]).push(func);
5685}
5686}
5687}
5688};
5689}
5690function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){
5691var inspected={},
5692seekingTransport=(structure===transports);
5693function inspect(dataType){
5694var selected;
5695inspected[dataType]=true;
5696jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){
5697var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);
5698if(typeof dataTypeOrTransport==="string"&&
5699!seekingTransport&&!inspected[dataTypeOrTransport]){
5700options.dataTypes.unshift(dataTypeOrTransport);
5701inspect(dataTypeOrTransport);
5702return false;
5703}else if(seekingTransport){
5704return!(selected=dataTypeOrTransport);
5705}
5706});
5707return selected;
5708}
5709return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");
5710}
5711function ajaxExtend(target,src){
5712var key,deep,
5713flatOptions=jQuery.ajaxSettings.flatOptions||{};
5714for(key in src){
5715if(src[key]!==undefined){
5716(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];
5717}
5718}
5719if(deep){
5720jQuery.extend(true,target,deep);
5721}
5722return target;
5723}
5724function ajaxHandleResponses(s,jqXHR,responses){
5725var ct,type,finalDataType,firstDataType,
5726contents=s.contents,
5727dataTypes=s.dataTypes;
5728while(dataTypes[0]==="*"){
5729dataTypes.shift();
5730if(ct===undefined){
5731ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");
5732}
5733}
5734if(ct){
5735for(type in contents){
5736if(contents[type]&&contents[type].test(ct)){
5737dataTypes.unshift(type);
5738break;
5739}
5740}
5741}
5742if(dataTypes[0]in responses){
5743finalDataType=dataTypes[0];
5744}else{
5745for(type in responses){
5746if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){
5747finalDataType=type;
5748break;
5749}
5750if(!firstDataType){
5751firstDataType=type;
5752}
5753}
5754finalDataType=finalDataType||firstDataType;
5755}
5756if(finalDataType){
5757if(finalDataType!==dataTypes[0]){
5758dataTypes.unshift(finalDataType);
5759}
5760return responses[finalDataType];
5761}
5762}
5763function ajaxConvert(s,response,jqXHR,isSuccess){
5764var conv2,current,conv,tmp,prev,
5765converters={},
5766dataTypes=s.dataTypes.slice();
5767if(dataTypes[1]){
5768for(conv in s.converters){
5769converters[conv.toLowerCase()]=s.converters[conv];
5770}
5771}
5772current=dataTypes.shift();
5773while(current){
5774if(s.responseFields[current]){
5775jqXHR[s.responseFields[current]]=response;
5776}
5777if(!prev&&isSuccess&&s.dataFilter){
5778response=s.dataFilter(response,s.dataType);
5779}
5780prev=current;
5781current=dataTypes.shift();
5782if(current){
5783if(current==="*"){
5784current=prev;
5785}else if(prev!=="*"&&prev!==current){
5786conv=converters[prev+" "+current]||converters["* "+current];
5787if(!conv){
5788for(conv2 in converters){
5789tmp=conv2.split(" ");
5790if(tmp[1]===current){
5791conv=converters[prev+" "+tmp[0]]||
5792converters["* "+tmp[0]];
5793if(conv){
5794if(conv===true){
5795conv=converters[conv2];
5796}else if(converters[conv2]!==true){
5797current=tmp[0];
5798dataTypes.unshift(tmp[1]);
5799}
5800break;
5801}
5802}
5803}
5804}
5805if(conv!==true){
5806if(conv&&s.throws){
5807response=conv(response);
5808}else{
5809try{
5810response=conv(response);
5811}catch(e){
5812return{
5813state:"parsererror",
5814error:conv?e:"No conversion from "+prev+" to "+current
5815};
5816}
5817}
5818}
5819}
5820}
5821}
5822return{state:"success",data:response};
5823}
5824jQuery.extend({
5825active:0,
5826lastModified:{},
5827etag:{},
5828ajaxSettings:{
5829url:location.href,
5830type:"GET",
5831isLocal:rlocalProtocol.test(location.protocol),
5832global:true,
5833processData:true,
5834async:true,
5835contentType:"application/x-www-form-urlencoded; charset=UTF-8",
5836accepts:{
5837"*":allTypes,
5838text:"text/plain",
5839html:"text/html",
5840xml:"application/xml, text/xml",
5841json:"application/json, text/javascript"
5842},
5843contents:{
5844xml:/\bxml\b/,
5845html:/\bhtml/,
5846json:/\bjson\b/
5847},
5848responseFields:{
5849xml:"responseXML",
5850text:"responseText",
5851json:"responseJSON"
5852},
5853converters:{
5854"* text":String,
5855"text html":true,
5856"text json":JSON.parse,
5857"text xml":jQuery.parseXML
5858},
5859flatOptions:{
5860url:true,
5861context:true
5862}
5863},
5864ajaxSetup:function(target,settings){
5865return settings?
5866ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):
5867ajaxExtend(jQuery.ajaxSettings,target);
5868},
5869ajaxPrefilter:addToPrefiltersOrTransports(prefilters),
5870ajaxTransport:addToPrefiltersOrTransports(transports),
5871ajax:function(url,options){
5872if(typeof url==="object"){
5873options=url;
5874url=undefined;
5875}
5876options=options||{};
5877var transport,
5878cacheURL,
5879responseHeadersString,
5880responseHeaders,
5881timeoutTimer,
5882urlAnchor,
5883completed,
5884fireGlobals,
5885i,
5886uncached,
5887s=jQuery.ajaxSetup({},options),
5888callbackContext=s.context||s,
5889globalEventContext=s.context&&
5890(callbackContext.nodeType||callbackContext.jquery)?
5891jQuery(callbackContext):
5892jQuery.event,
5893deferred=jQuery.Deferred(),
5894completeDeferred=jQuery.Callbacks("once memory"),
5895statusCode=s.statusCode||{},
5896requestHeaders={},
5897requestHeadersNames={},
5898strAbort="canceled",
5899jqXHR={
5900readyState:0,
5901getResponseHeader:function(key){
5902var match;
5903if(completed){
5904if(!responseHeaders){
5905responseHeaders={};
5906while((match=rheaders.exec(responseHeadersString))){
5907responseHeaders[match[1].toLowerCase()+" "]=
5908(responseHeaders[match[1].toLowerCase()+" "]||[])
5909.concat(match[2]);
5910}
5911}
5912match=responseHeaders[key.toLowerCase()+" "];
5913}
5914return match==null?null:match.join(", ");
5915},
5916getAllResponseHeaders:function(){
5917return completed?responseHeadersString:null;
5918},
5919setRequestHeader:function(name,value){
5920if(completed==null){
5921name=requestHeadersNames[name.toLowerCase()]=
5922requestHeadersNames[name.toLowerCase()]||name;
5923requestHeaders[name]=value;
5924}
5925return this;
5926},
5927overrideMimeType:function(type){
5928if(completed==null){
5929s.mimeType=type;
5930}
5931return this;
5932},
5933statusCode:function(map){
5934var code;
5935if(map){
5936if(completed){
5937jqXHR.always(map[jqXHR.status]);
5938}else{
5939for(code in map){
5940statusCode[code]=[statusCode[code],map[code]];
5941}
5942}
5943}
5944return this;
5945},
5946abort:function(statusText){
5947var finalText=statusText||strAbort;
5948if(transport){
5949transport.abort(finalText);
5950}
5951done(0,finalText);
5952return this;
5953}
5954};
5955deferred.promise(jqXHR);
5956s.url=((url||s.url||location.href)+"")
5957.replace(rprotocol,location.protocol+"//");
5958s.type=options.method||options.type||s.method||s.type;
5959s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];
5960if(s.crossDomain==null){
5961urlAnchor=document.createElement("a");
5962try{
5963urlAnchor.href=s.url;
5964urlAnchor.href=urlAnchor.href;
5965s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==
5966urlAnchor.protocol+"//"+urlAnchor.host;
5967}catch(e){
5968s.crossDomain=true;
5969}
5970}
5971if(s.data&&s.processData&&typeof s.data!=="string"){
5972s.data=jQuery.param(s.data,s.traditional);
5973}
5974inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);
5975if(completed){
5976return jqXHR;
5977}
5978fireGlobals=jQuery.event&&s.global;
5979if(fireGlobals&&jQuery.active++===0){
5980jQuery.event.trigger("ajaxStart");
5981}
5982s.type=s.type.toUpperCase();
5983s.hasContent=!rnoContent.test(s.type);
5984cacheURL=s.url.replace(rhash,"");
5985if(!s.hasContent){
5986uncached=s.url.slice(cacheURL.length);
5987if(s.data&&(s.processData||typeof s.data==="string")){
5988cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;
5989delete s.data;
5990}
5991if(s.cache===false){
5992cacheURL=cacheURL.replace(rantiCache,"$1");
5993uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce.guid++)+
5994uncached;
5995}
5996s.url=cacheURL+uncached;
5997}else if(s.data&&s.processData&&
5998(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){
5999s.data=s.data.replace(r20,"+");
6000}
6001if(s.ifModified){
6002if(jQuery.lastModified[cacheURL]){
6003jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);
6004}
6005if(jQuery.etag[cacheURL]){
6006jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);
6007}
6008}
6009if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){
6010jqXHR.setRequestHeader("Content-Type",s.contentType);
6011}
6012jqXHR.setRequestHeader(
6013"Accept",
6014s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?
6015s.accepts[s.dataTypes[0]]+
6016(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):
6017s.accepts["*"]
6018);
6019for(i in s.headers){
6020jqXHR.setRequestHeader(i,s.headers[i]);
6021}
6022if(s.beforeSend&&
6023(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){
6024return jqXHR.abort();
6025}
6026strAbort="abort";
6027completeDeferred.add(s.complete);
6028jqXHR.done(s.success);
6029jqXHR.fail(s.error);
6030transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);
6031if(!transport){
6032done(-1,"No Transport");
6033}else{
6034jqXHR.readyState=1;
6035if(fireGlobals){
6036globalEventContext.trigger("ajaxSend",[jqXHR,s]);
6037}
6038if(completed){
6039return jqXHR;
6040}
6041if(s.async&&s.timeout>0){
6042timeoutTimer=window.setTimeout(function(){
6043jqXHR.abort("timeout");
6044},s.timeout);
6045}
6046try{
6047completed=false;
6048transport.send(requestHeaders,done);
6049}catch(e){
6050if(completed){
6051throw e;
6052}
6053done(-1,e);
6054}
6055}
6056function done(status,nativeStatusText,responses,headers){
6057var isSuccess,success,error,response,modified,
6058statusText=nativeStatusText;
6059if(completed){
6060return;
6061}
6062completed=true;
6063if(timeoutTimer){
6064window.clearTimeout(timeoutTimer);
6065}
6066transport=undefined;
6067responseHeadersString=headers||"";
6068jqXHR.readyState=status>0?4:0;
6069isSuccess=status>=200&&status<300||status===304;
6070if(responses){
6071response=ajaxHandleResponses(s,jqXHR,responses);
6072}
6073if(!isSuccess&&
6074jQuery.inArray("script",s.dataTypes)>-1&&
6075jQuery.inArray("json",s.dataTypes)<0){
6076s.converters["text script"]=function(){};
6077}
6078response=ajaxConvert(s,response,jqXHR,isSuccess);
6079if(isSuccess){
6080if(s.ifModified){
6081modified=jqXHR.getResponseHeader("Last-Modified");
6082if(modified){
6083jQuery.lastModified[cacheURL]=modified;
6084}
6085modified=jqXHR.getResponseHeader("etag");
6086if(modified){
6087jQuery.etag[cacheURL]=modified;
6088}
6089}
6090if(status===204||s.type==="HEAD"){
6091statusText="nocontent";
6092}else if(status===304){
6093statusText="notmodified";
6094}else{
6095statusText=response.state;
6096success=response.data;
6097error=response.error;
6098isSuccess=!error;
6099}
6100}else{
6101error=statusText;
6102if(status||!statusText){
6103statusText="error";
6104if(status<0){
6105status=0;
6106}
6107}
6108}
6109jqXHR.status=status;
6110jqXHR.statusText=(nativeStatusText||statusText)+"";
6111if(isSuccess){
6112deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);
6113}else{
6114deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);
6115}
6116jqXHR.statusCode(statusCode);
6117statusCode=undefined;
6118if(fireGlobals){
6119globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",
6120[jqXHR,s,isSuccess?success:error]);
6121}
6122completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);
6123if(fireGlobals){
6124globalEventContext.trigger("ajaxComplete",[jqXHR,s]);
6125if(!(--jQuery.active)){
6126jQuery.event.trigger("ajaxStop");
6127}
6128}
6129}
6130return jqXHR;
6131},
6132getJSON:function(url,data,callback){
6133return jQuery.get(url,data,callback,"json");
6134},
6135getScript:function(url,callback){
6136return jQuery.get(url,undefined,callback,"script");
6137}
6138});
6139jQuery.each(["get","post"],function(_i,method){
6140jQuery[method]=function(url,data,callback,type){
6141if(isFunction(data)){
6142type=type||callback;
6143callback=data;
6144data=undefined;
6145}
6146return jQuery.ajax(jQuery.extend({
6147url:url,
6148type:method,
6149dataType:type,
6150data:data,
6151success:callback
6152},jQuery.isPlainObject(url)&&url));
6153};
6154});
6155jQuery.ajaxPrefilter(function(s){
6156var i;
6157for(i in s.headers){
6158if(i.toLowerCase()==="content-type"){
6159s.contentType=s.headers[i]||"";
6160}
6161}
6162});
6163jQuery._evalUrl=function(url,options,doc){
6164return jQuery.ajax({
6165url:url,
6166type:"GET",
6167dataType:"script",
6168cache:true,
6169async:false,
6170global:false,
6171converters:{
6172"text script":function(){}
6173},
6174dataFilter:function(response){
6175jQuery.globalEval(response,options,doc);
6176}
6177});
6178};
6179jQuery.fn.extend({
6180wrapAll:function(html){
6181var wrap;
6182if(this[0]){
6183if(isFunction(html)){
6184html=html.call(this[0]);
6185}
6186wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);
6187if(this[0].parentNode){
6188wrap.insertBefore(this[0]);
6189}
6190wrap.map(function(){
6191var elem=this;
6192while(elem.firstElementChild){
6193elem=elem.firstElementChild;
6194}
6195return elem;
6196}).append(this);
6197}
6198return this;
6199},
6200wrapInner:function(html){
6201if(isFunction(html)){
6202return this.each(function(i){
6203jQuery(this).wrapInner(html.call(this,i));
6204});
6205}
6206return this.each(function(){
6207var self=jQuery(this),
6208contents=self.contents();
6209if(contents.length){
6210contents.wrapAll(html);
6211}else{
6212self.append(html);
6213}
6214});
6215},
6216wrap:function(html){
6217var htmlIsFunction=isFunction(html);
6218return this.each(function(i){
6219jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);
6220});
6221},
6222unwrap:function(selector){
6223this.parent(selector).not("body").each(function(){
6224jQuery(this).replaceWith(this.childNodes);
6225});
6226return this;
6227}
6228});
6229jQuery.expr.pseudos.hidden=function(elem){
6230return!jQuery.expr.pseudos.visible(elem);
6231};
6232jQuery.expr.pseudos.visible=function(elem){
6233return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);
6234};
6235jQuery.ajaxSettings.xhr=function(){
6236try{
6237return new window.XMLHttpRequest();
6238}catch(e){}
6239};
6240var xhrSuccessStatus={
62410:200,
62421223:204
6243},
6244xhrSupported=jQuery.ajaxSettings.xhr();
6245support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);
6246support.ajax=xhrSupported=!!xhrSupported;
6247jQuery.ajaxTransport(function(options){
6248var callback,errorCallback;
6249if(support.cors||xhrSupported&&!options.crossDomain){
6250return{
6251send:function(headers,complete){
6252var i,
6253xhr=options.xhr();
6254xhr.open(
6255options.type,
6256options.url,
6257options.async,
6258options.username,
6259options.password
6260);
6261if(options.xhrFields){
6262for(i in options.xhrFields){
6263xhr[i]=options.xhrFields[i];
6264}
6265}
6266if(options.mimeType&&xhr.overrideMimeType){
6267xhr.overrideMimeType(options.mimeType);
6268}
6269if(!options.crossDomain&&!headers["X-Requested-With"]){
6270headers["X-Requested-With"]="XMLHttpRequest";
6271}
6272for(i in headers){
6273xhr.setRequestHeader(i,headers[i]);
6274}
6275callback=function(type){
6276return function(){
6277if(callback){
6278callback=errorCallback=xhr.onload=
6279xhr.onerror=xhr.onabort=xhr.ontimeout=
6280xhr.onreadystatechange=null;
6281if(type==="abort"){
6282xhr.abort();
6283}else if(type==="error"){
6284if(typeof xhr.status!=="number"){
6285complete(0,"error");
6286}else{
6287complete(
6288xhr.status,
6289xhr.statusText
6290);
6291}
6292}else{
6293complete(
6294xhrSuccessStatus[xhr.status]||xhr.status,
6295xhr.statusText,
6296(xhr.responseType||"text")!=="text"||
6297typeof xhr.responseText!=="string"?
6298{binary:xhr.response}:
6299{text:xhr.responseText},
6300xhr.getAllResponseHeaders()
6301);
6302}
6303}
6304};
6305};
6306xhr.onload=callback();
6307errorCallback=xhr.onerror=xhr.ontimeout=callback("error");
6308if(xhr.onabort!==undefined){
6309xhr.onabort=errorCallback;
6310}else{
6311xhr.onreadystatechange=function(){
6312if(xhr.readyState===4){
6313window.setTimeout(function(){
6314if(callback){
6315errorCallback();
6316}
6317});
6318}
6319};
6320}
6321callback=callback("abort");
6322try{
6323xhr.send(options.hasContent&&options.data||null);
6324}catch(e){
6325if(callback){
6326throw e;
6327}
6328}
6329},
6330abort:function(){
6331if(callback){
6332callback();
6333}
6334}
6335};
6336}
6337});
6338jQuery.ajaxPrefilter(function(s){
6339if(s.crossDomain){
6340s.contents.script=false;
6341}
6342});
6343jQuery.ajaxSetup({
6344accepts:{
6345script:"text/javascript, application/javascript, "+
6346"application/ecmascript, application/x-ecmascript"
6347},
6348contents:{
6349script:/\b(?:java|ecma)script\b/
6350},
6351converters:{
6352"text script":function(text){
6353jQuery.globalEval(text);
6354return text;
6355}
6356}
6357});
6358jQuery.ajaxPrefilter("script",function(s){
6359if(s.cache===undefined){
6360s.cache=false;
6361}
6362if(s.crossDomain){
6363s.type="GET";
6364}
6365});
6366jQuery.ajaxTransport("script",function(s){
6367if(s.crossDomain||s.scriptAttrs){
6368var script,callback;
6369return{
6370send:function(_,complete){
6371script=jQuery("<script>")
6372.attr(s.scriptAttrs||{})
6373.prop({charset:s.scriptCharset,src:s.url})
6374.on("load error",callback=function(evt){
6375script.remove();
6376callback=null;
6377if(evt){
6378complete(evt.type==="error"?404:200,evt.type);
6379}
6380});
6381document.head.appendChild(script[0]);
6382},
6383abort:function(){
6384if(callback){
6385callback();
6386}
6387}
6388};
6389}
6390});
6391var oldCallbacks=[],
6392rjsonp=/(=)\?(?=&|$)|\?\?/;
6393jQuery.ajaxSetup({
6394jsonp:"callback",
6395jsonpCallback:function(){
6396var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce.guid++));
6397this[callback]=true;
6398return callback;
6399}
6400});
6401jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){
6402var callbackName,overwritten,responseContainer,
6403jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?
6404"url":
6405typeof s.data==="string"&&
6406(s.contentType||"")
6407.indexOf("application/x-www-form-urlencoded")===0&&
6408rjsonp.test(s.data)&&"data"
6409);
6410if(jsonProp||s.dataTypes[0]==="jsonp"){
6411callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?
6412s.jsonpCallback():
6413s.jsonpCallback;
6414if(jsonProp){
6415s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);
6416}else if(s.jsonp!==false){
6417s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;
6418}
6419s.converters["script json"]=function(){
6420if(!responseContainer){
6421jQuery.error(callbackName+" was not called");
6422}
6423return responseContainer[0];
6424};
6425s.dataTypes[0]="json";
6426overwritten=window[callbackName];
6427window[callbackName]=function(){
6428responseContainer=arguments;
6429};
6430jqXHR.always(function(){
6431if(overwritten===undefined){
6432jQuery(window).removeProp(callbackName);
6433}else{
6434window[callbackName]=overwritten;
6435}
6436if(s[callbackName]){
6437s.jsonpCallback=originalSettings.jsonpCallback;
6438oldCallbacks.push(callbackName);
6439}
6440if(responseContainer&&isFunction(overwritten)){
6441overwritten(responseContainer[0]);
6442}
6443responseContainer=overwritten=undefined;
6444});
6445return"script";
6446}
6447});
6448support.createHTMLDocument=(function(){
6449var body=document.implementation.createHTMLDocument("").body;
6450body.innerHTML="<form></form><form></form>";
6451return body.childNodes.length===2;
6452})();
6453jQuery.parseHTML=function(data,context,keepScripts){
6454if(typeof data!=="string"){
6455return[];
6456}
6457if(typeof context==="boolean"){
6458keepScripts=context;
6459context=false;
6460}
6461var base,parsed,scripts;
6462if(!context){
6463if(support.createHTMLDocument){
6464context=document.implementation.createHTMLDocument("");
6465base=context.createElement("base");
6466base.href=document.location.href;
6467context.head.appendChild(base);
6468}else{
6469context=document;
6470}
6471}
6472parsed=rsingleTag.exec(data);
6473scripts=!keepScripts&&[];
6474if(parsed){
6475return[context.createElement(parsed[1])];
6476}
6477parsed=buildFragment([data],context,scripts);
6478if(scripts&&scripts.length){
6479jQuery(scripts).remove();
6480}
6481return jQuery.merge([],parsed.childNodes);
6482};
6483jQuery.fn.load=function(url,params,callback){
6484var selector,type,response,
6485self=this,
6486off=url.indexOf(" ");
6487if(off>-1){
6488selector=stripAndCollapse(url.slice(off));
6489url=url.slice(0,off);
6490}
6491if(isFunction(params)){
6492callback=params;
6493params=undefined;
6494}else if(params&&typeof params==="object"){
6495type="POST";
6496}
6497if(self.length>0){
6498jQuery.ajax({
6499url:url,
6500type:type||"GET",
6501dataType:"html",
6502data:params
6503}).done(function(responseText){
6504response=arguments;
6505self.html(selector?
6506jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):
6507responseText);
6508}).always(callback&&function(jqXHR,status){
6509self.each(function(){
6510callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);
6511});
6512});
6513}
6514return this;
6515};
6516jQuery.expr.pseudos.animated=function(elem){
6517return jQuery.grep(jQuery.timers,function(fn){
6518return elem===fn.elem;
6519}).length;
6520};
6521jQuery.offset={
6522setOffset:function(elem,options,i){
6523var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,
6524position=jQuery.css(elem,"position"),
6525curElem=jQuery(elem),
6526props={};
6527if(position==="static"){
6528elem.style.position="relative";
6529}
6530curOffset=curElem.offset();
6531curCSSTop=jQuery.css(elem,"top");
6532curCSSLeft=jQuery.css(elem,"left");
6533calculatePosition=(position==="absolute"||position==="fixed")&&
6534(curCSSTop+curCSSLeft).indexOf("auto")>-1;
6535if(calculatePosition){
6536curPosition=curElem.position();
6537curTop=curPosition.top;
6538curLeft=curPosition.left;
6539}else{
6540curTop=parseFloat(curCSSTop)||0;
6541curLeft=parseFloat(curCSSLeft)||0;
6542}
6543if(isFunction(options)){
6544options=options.call(elem,i,jQuery.extend({},curOffset));
6545}
6546if(options.top!=null){
6547props.top=(options.top-curOffset.top)+curTop;
6548}
6549if(options.left!=null){
6550props.left=(options.left-curOffset.left)+curLeft;
6551}
6552if("using"in options){
6553options.using.call(elem,props);
6554}else{
6555curElem.css(props);
6556}
6557}
6558};
6559jQuery.fn.extend({
6560offset:function(options){
6561if(arguments.length){
6562return options===undefined?
6563this:
6564this.each(function(i){
6565jQuery.offset.setOffset(this,options,i);
6566});
6567}
6568var rect,win,
6569elem=this[0];
6570if(!elem){
6571return;
6572}
6573if(!elem.getClientRects().length){
6574return{top:0,left:0};
6575}
6576rect=elem.getBoundingClientRect();
6577win=elem.ownerDocument.defaultView;
6578return{
6579top:rect.top+win.pageYOffset,
6580left:rect.left+win.pageXOffset
6581};
6582},
6583position:function(){
6584if(!this[0]){
6585return;
6586}
6587var offsetParent,offset,doc,
6588elem=this[0],
6589parentOffset={top:0,left:0};
6590if(jQuery.css(elem,"position")==="fixed"){
6591offset=elem.getBoundingClientRect();
6592}else{
6593offset=this.offset();
6594doc=elem.ownerDocument;
6595offsetParent=elem.offsetParent||doc.documentElement;
6596while(offsetParent&&
6597(offsetParent===doc.body||offsetParent===doc.documentElement)&&
6598jQuery.css(offsetParent,"position")==="static"){
6599offsetParent=offsetParent.parentNode;
6600}
6601if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){
6602parentOffset=jQuery(offsetParent).offset();
6603parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);
6604parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true);
6605}
6606}
6607return{
6608top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),
6609left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)
6610};
6611},
6612offsetParent:function(){
6613return this.map(function(){
6614var offsetParent=this.offsetParent;
6615while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){
6616offsetParent=offsetParent.offsetParent;
6617}
6618return offsetParent||documentElement;
6619});
6620}
6621});
6622jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){
6623var top="pageYOffset"===prop;
6624jQuery.fn[method]=function(val){
6625return access(this,function(elem,method,val){
6626var win;
6627if(isWindow(elem)){
6628win=elem;
6629}else if(elem.nodeType===9){
6630win=elem.defaultView;
6631}
6632if(val===undefined){
6633return win?win[prop]:elem[method];
6634}
6635if(win){
6636win.scrollTo(
6637!top?val:win.pageXOffset,
6638top?val:win.pageYOffset
6639);
6640}else{
6641elem[method]=val;
6642}
6643},method,val,arguments.length);
6644};
6645});
6646jQuery.each(["top","left"],function(_i,prop){
6647jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,
6648function(elem,computed){
6649if(computed){
6650computed=curCSS(elem,prop);
6651return rnumnonpx.test(computed)?
6652jQuery(elem).position()[prop]+"px":
6653computed;
6654}
6655}
6656);
6657});
6658jQuery.each({Height:"height",Width:"width"},function(name,type){
6659jQuery.each({
6660padding:"inner"+name,
6661content:type,
6662"":"outer"+name
6663},function(defaultExtra,funcName){
6664jQuery.fn[funcName]=function(margin,value){
6665var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),
6666extra=defaultExtra||(margin===true||value===true?"margin":"border");
6667return access(this,function(elem,type,value){
6668var doc;
6669if(isWindow(elem)){
6670return funcName.indexOf("outer")===0?
6671elem["inner"+name]:
6672elem.document.documentElement["client"+name];
6673}
6674if(elem.nodeType===9){
6675doc=elem.documentElement;
6676return Math.max(
6677elem.body["scroll"+name],doc["scroll"+name],
6678elem.body["offset"+name],doc["offset"+name],
6679doc["client"+name]
6680);
6681}
6682return value===undefined?
6683jQuery.css(elem,type,extra):
6684jQuery.style(elem,type,value,extra);
6685},type,chainable?margin:undefined,chainable);
6686};
6687});
6688});
6689jQuery.each([
6690"ajaxStart",
6691"ajaxStop",
6692"ajaxComplete",
6693"ajaxError",
6694"ajaxSuccess",
6695"ajaxSend"
6696],function(_i,type){
6697jQuery.fn[type]=function(fn){
6698return this.on(type,fn);
6699};
6700});
6701jQuery.fn.extend({
6702bind:function(types,data,fn){
6703return this.on(types,null,data,fn);
6704},
6705unbind:function(types,fn){
6706return this.off(types,null,fn);
6707},
6708delegate:function(selector,types,data,fn){
6709return this.on(types,selector,data,fn);
6710},
6711undelegate:function(selector,types,fn){
6712return arguments.length===1?
6713this.off(selector,"**"):
6714this.off(types,selector||"**",fn);
6715},
6716hover:function(fnOver,fnOut){
6717return this
6718.on("mouseenter",fnOver)
6719.on("mouseleave",fnOut||fnOver);
6720}
6721});
6722jQuery.each(
6723("blur focus focusin focusout resize scroll click dblclick "+
6724"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+
6725"change select submit keydown keypress keyup contextmenu").split(" "),
6726function(_i,name){
6727jQuery.fn[name]=function(data,fn){
6728return arguments.length>0?
6729this.on(name,null,data,fn):
6730this.trigger(name);
6731};
6732}
6733);
6734var rtrim=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
6735jQuery.proxy=function(fn,context){
6736var tmp,args,proxy;
6737if(typeof context==="string"){
6738tmp=fn[context];
6739context=fn;
6740fn=tmp;
6741}
6742if(!isFunction(fn)){
6743return undefined;
6744}
6745args=slice.call(arguments,2);
6746proxy=function(){
6747return fn.apply(context||this,args.concat(slice.call(arguments)));
6748};
6749proxy.guid=fn.guid=fn.guid||jQuery.guid++;
6750return proxy;
6751};
6752jQuery.holdReady=function(hold){
6753if(hold){
6754jQuery.readyWait++;
6755}else{
6756jQuery.ready(true);
6757}
6758};
6759jQuery.isArray=Array.isArray;
6760jQuery.parseJSON=JSON.parse;
6761jQuery.nodeName=nodeName;
6762jQuery.isFunction=isFunction;
6763jQuery.isWindow=isWindow;
6764jQuery.camelCase=camelCase;
6765jQuery.type=toType;
6766jQuery.now=Date.now;
6767jQuery.isNumeric=function(obj){
6768var type=jQuery.type(obj);
6769return(type==="number"||type==="string")&&
6770!isNaN(obj-parseFloat(obj));
6771};
6772jQuery.trim=function(text){
6773return text==null?
6774"":
6775(text+"").replace(rtrim,"$1");
6776};
6777if(typeof define==="function"&&define.amd){
6778define("jquery",[],function(){
6779return jQuery;
6780});
6781}
6782var
6783_jQuery=window.jQuery,
6784_$=window.$;
6785jQuery.noConflict=function(deep){
6786if(window.$===jQuery){
6787window.$=_$;
6788}
6789if(deep&&window.jQuery===jQuery){
6790window.jQuery=_jQuery;
6791}
6792return jQuery;
6793};
6794if(typeof noGlobal==="undefined"){
6795window.jQuery=window.$=jQuery;
6796}
6797return jQuery;
6798});
6799
6800
6801/* prive/javascript/jquery.form.js?1790327464 */
6802
6803(function(factory){
6804if(typeof define==='function'&&define.amd){
6805define(['jquery'],factory);
6806}else if(typeof module==='object'&&module.exports){
6807module.exports=function(root,jQuery){
6808if(typeof jQuery==='undefined'){
6809if(typeof window!=='undefined'){
6810jQuery=require('jquery');
6811}
6812else{
6813jQuery=require('jquery')(root);
6814}
6815}
6816factory(jQuery);
6817return jQuery;
6818};
6819}else{
6820factory(jQuery);
6821}
6822}(function($){
6823'use strict';
6824var rCRLF=/\r?\n/g;
6825var feature={};
6826feature.fileapi=$('<input type="file">').get(0).files!==undefined;
6827feature.formdata=(typeof window.FormData!=='undefined');
6828var hasProp=!!$.fn.prop;
6829$.fn.attr2=function(){
6830if(!hasProp){
6831return this.attr.apply(this,arguments);
6832}
6833var val=this.prop.apply(this,arguments);
6834if((val&&val.jquery)||typeof val==='string'){
6835return val;
6836}
6837return this.attr.apply(this,arguments);
6838};
6839$.fn.ajaxSubmit=function(options,data,dataType,onSuccess){
6840if(!this.length){
6841log('ajaxSubmit: skipping submit process - no element selected');
6842return this;
6843}
6844var method,action,url,isMsie,iframeSrc,$form=this;
6845if(typeof options==='function'){
6846options={success:options};
6847}else if(typeof options==='string'||(options===false&&arguments.length>0)){
6848options={
6849'url':options,
6850'data':data,
6851'dataType':dataType
6852};
6853if(typeof onSuccess==='function'){
6854options.success=onSuccess;
6855}
6856}else if(typeof options==='undefined'){
6857options={};
6858}
6859method=options.method||options.type||this.attr2('method');
6860action=options.url||this.attr2('action');
6861url=(typeof action==='string')?$.trim(action):'';
6862url=url||window.location.href||'';
6863if(url){
6864url=(url.match(/^([^#]+)/)||[])[1];
6865}
6866isMsie=/(MSIE|Trident)/.test(navigator.userAgent||'');
6867iframeSrc=(isMsie&&/^https/i.test(window.location.href||''))?'javascript:false':'about:blank';
6868options=$.extend(true,{
6869url:url,
6870success:$.ajaxSettings.success,
6871type:method||$.ajaxSettings.type,
6872iframeSrc:iframeSrc
6873},options);
6874var veto={};
6875this.trigger('form-pre-serialize',[this,options,veto]);
6876if(veto.veto){
6877log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
6878return this;
6879}
6880if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){
6881log('ajaxSubmit: submit aborted via beforeSerialize callback');
6882return this;
6883}
6884var traditional=options.traditional;
6885if(typeof traditional==='undefined'){
6886traditional=$.ajaxSettings.traditional;
6887}
6888var elements=[];
6889var qx,a=this.formToArray(options.semantic,elements,options.filtering);
6890if(options.data){
6891var optionsData=$.isFunction(options.data)?options.data(a):options.data;
6892options.extraData=optionsData;
6893qx=$.param(optionsData,traditional);
6894}
6895if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){
6896log('ajaxSubmit: submit aborted via beforeSubmit callback');
6897return this;
6898}
6899this.trigger('form-submit-validate',[a,this,options,veto]);
6900if(veto.veto){
6901log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
6902return this;
6903}
6904var q=$.param(a,traditional);
6905if(qx){
6906q=(q?(q+'&'+qx):qx);
6907}
6908if(options.type.toUpperCase()==='GET'){
6909options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;
6910options.data=null;
6911}else{
6912options.data=q;
6913}
6914var callbacks=[];
6915if(options.resetForm){
6916callbacks.push(function(){
6917$form.resetForm();
6918});
6919}
6920if(options.clearForm){
6921callbacks.push(function(){
6922$form.clearForm(options.includeHidden);
6923});
6924}
6925if(!options.dataType&&options.target){
6926var oldSuccess=options.success||function(){};
6927callbacks.push(function(data,textStatus,jqXHR){
6928var successArguments=arguments,
6929fn=options.replaceTarget?'replaceWith':'html';
6930if(fn=='html'){
6931data=$.parseHTML($("<div>").text(data).html())
6932};
6933$(options.target)[fn](data).each(function(){
6934oldSuccess.apply(this,successArguments);
6935});
6936});
6937}else if(options.success){
6938if($.isArray(options.success)){
6939$.merge(callbacks,options.success);
6940}else{
6941callbacks.push(options.success);
6942}
6943}
6944options.success=function(data,status,xhr){
6945var context=options.context||this;
6946for(var i=0,max=callbacks.length;i<max;i++){
6947callbacks[i].apply(context,[data,status,xhr||$form,$form]);
6948}
6949};
6950if(options.error){
6951var oldError=options.error;
6952options.error=function(xhr,status,error){
6953var context=options.context||this;
6954oldError.apply(context,[xhr,status,error,$form]);
6955};
6956}
6957if(options.complete){
6958var oldComplete=options.complete;
6959options.complete=function(xhr,status){
6960var context=options.context||this;
6961oldComplete.apply(context,[xhr,status,$form]);
6962};
6963}
6964var fileInputs=$('input[type=file]:enabled',this).filter(function(){
6965return $(this).val()!=='';
6966});
6967var hasFileInputs=fileInputs.length>0;
6968var mp='multipart/form-data';
6969var multipart=($form.attr('enctype')===mp||$form.attr('encoding')===mp);
6970var fileAPI=feature.fileapi&&feature.formdata;
6971log('fileAPI :'+fileAPI);
6972var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;
6973var jqxhr;
6974if(options.iframe!==false&&(options.iframe||shouldUseFrame)){
6975if(options.closeKeepAlive){
6976$.get(options.closeKeepAlive,function(){
6977jqxhr=fileUploadIframe(a);
6978});
6979}else{
6980jqxhr=fileUploadIframe(a);
6981}
6982}else if((hasFileInputs||multipart)&&fileAPI){
6983jqxhr=fileUploadXhr(a);
6984}else{
6985jqxhr=$.ajax(options);
6986}
6987$form.removeData('jqxhr').data('jqxhr',jqxhr);
6988for(var k=0;k<elements.length;k++){
6989elements[k]=null;
6990}
6991this.trigger('form-submit-notify',[this,options]);
6992return this;
6993function deepSerialize(extraData){
6994var serialized=$.param(extraData,options.traditional).split('&');
6995var len=serialized.length;
6996var result=[];
6997var i,part;
6998for(i=0;i<len;i++){
6999serialized[i]=serialized[i].replace(/\+/g,' ');
7000part=serialized[i].split('=');
7001result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]);
7002}
7003return result;
7004}
7005function fileUploadXhr(a){
7006var formdata=new FormData();
7007for(var i=0;i<a.length;i++){
7008formdata.append(a[i].name,a[i].value);
7009}
7010if(options.extraData){
7011var serializedData=deepSerialize(options.extraData);
7012for(i=0;i<serializedData.length;i++){
7013if(serializedData[i]){
7014formdata.append(serializedData[i][0],serializedData[i][1]);
7015}
7016}
7017}
7018options.data=null;
7019var s=$.extend(true,{},$.ajaxSettings,options,{
7020contentType:false,
7021processData:false,
7022cache:false,
7023type:method||'POST'
7024});
7025if(options.uploadProgress){
7026s.xhr=function(){
7027var xhr=$.ajaxSettings.xhr();
7028if(xhr.upload){
7029xhr.upload.addEventListener('progress',function(event){
7030var percent=0;
7031var position=event.loaded||event.position;
7032var total=event.total;
7033if(event.lengthComputable){
7034percent=Math.ceil(position/total*100);
7035}
7036options.uploadProgress(event,position,total,percent);
7037},false);
7038}
7039return xhr;
7040};
7041}
7042s.data=null;
7043var beforeSend=s.beforeSend;
7044s.beforeSend=function(xhr,o){
7045if(options.formData){
7046o.data=options.formData;
7047}else{
7048o.data=formdata;
7049}
7050if(beforeSend){
7051beforeSend.call(this,xhr,o);
7052}
7053};
7054return $.ajax(s);
7055}
7056function fileUploadIframe(a){
7057var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;
7058var deferred=$.Deferred();
7059deferred.abort=function(status){
7060xhr.abort(status);
7061};
7062if(a){
7063for(i=0;i<elements.length;i++){
7064el=$(elements[i]);
7065if(hasProp){
7066el.prop('disabled',false);
7067}else{
7068el.removeAttr('disabled');
7069}
7070}
7071}
7072s=$.extend(true,{},$.ajaxSettings,options);
7073s.context=s.context||s;
7074id='jqFormIO'+new Date().getTime();
7075var ownerDocument=form.ownerDocument;
7076var $body=$form.closest('body');
7077if(s.iframeTarget){
7078$io=$(s.iframeTarget,ownerDocument);
7079n=$io.attr2('name');
7080if(!n){
7081$io.attr2('name',id);
7082}else{
7083id=n;
7084}
7085}else{
7086$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'">',ownerDocument);
7087$io.css({position:'absolute',top:'-1000px',left:'-1000px'});
7088}
7089io=$io[0];
7090xhr={
7091aborted:0,
7092responseText:null,
7093responseXML:null,
7094status:0,
7095statusText:'n/a',
7096getAllResponseHeaders:function(){},
7097getResponseHeader:function(){},
7098setRequestHeader:function(){},
7099abort:function(status){
7100var e=(status==='timeout'?'timeout':'aborted');
7101log('aborting upload... '+e);
7102this.aborted=1;
7103try{
7104if(io.contentWindow.document.execCommand){
7105io.contentWindow.document.execCommand('Stop');
7106}
7107}catch(ignore){}
7108$io.attr('src',s.iframeSrc);
7109xhr.error=e;
7110if(s.error){
7111s.error.call(s.context,xhr,e,status);
7112}
7113if(g){
7114$.event.trigger('ajaxError',[xhr,s,e]);
7115}
7116if(s.complete){
7117s.complete.call(s.context,xhr,e);
7118}
7119}
7120};
7121g=s.global;
7122if(g&&$.active++===0){
7123$.event.trigger('ajaxStart');
7124}
7125if(g){
7126$.event.trigger('ajaxSend',[xhr,s]);
7127}
7128if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){
7129if(s.global){
7130$.active--;
7131}
7132deferred.reject();
7133return deferred;
7134}
7135if(xhr.aborted){
7136deferred.reject();
7137return deferred;
7138}
7139sub=form.clk;
7140if(sub){
7141n=sub.name;
7142if(n&&!sub.disabled){
7143s.extraData=s.extraData||{};
7144s.extraData[n]=sub.value;
7145if(sub.type==='image'){
7146s.extraData[n+'.x']=form.clk_x;
7147s.extraData[n+'.y']=form.clk_y;
7148}
7149}
7150}
7151var CLIENT_TIMEOUT_ABORT=1;
7152var SERVER_ABORT=2;
7153function getDoc(frame){
7154var doc=null;
7155try{
7156if(frame.contentWindow){
7157doc=frame.contentWindow.document;
7158}
7159}catch(err){
7160log('cannot get iframe.contentWindow document: '+err);
7161}
7162if(doc){
7163return doc;
7164}
7165try{
7166doc=frame.contentDocument?frame.contentDocument:frame.document;
7167}catch(err){
7168log('cannot get iframe.contentDocument: '+err);
7169doc=frame.document;
7170}
7171return doc;
7172}
7173var csrf_token=$('meta[name=csrf-token]').attr('content');
7174var csrf_param=$('meta[name=csrf-param]').attr('content');
7175if(csrf_param&&csrf_token){
7176s.extraData=s.extraData||{};
7177s.extraData[csrf_param]=csrf_token;
7178}
7179function doSubmit(){
7180var t=$form.attr2('target'),
7181a=$form.attr2('action'),
7182mp='multipart/form-data',
7183et=$form.attr('enctype')||$form.attr('encoding')||mp;
7184form.setAttribute('target',id);
7185if(!method||/post/i.test(method)){
7186form.setAttribute('method','POST');
7187}
7188if(a!==s.url){
7189form.setAttribute('action',s.url);
7190}
7191if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){
7192$form.attr({
7193encoding:'multipart/form-data',
7194enctype:'multipart/form-data'
7195});
7196}
7197if(s.timeout){
7198timeoutHandle=setTimeout(function(){
7199timedOut=true;cb(CLIENT_TIMEOUT_ABORT);
7200},s.timeout);
7201}
7202function checkState(){
7203try{
7204var state=getDoc(io).readyState;
7205log('state = '+state);
7206if(state&&state.toLowerCase()==='uninitialized'){
7207setTimeout(checkState,50);
7208}
7209}catch(e){
7210log('Server abort: ',e,' (',e.name,')');
7211cb(SERVER_ABORT);
7212if(timeoutHandle){
7213clearTimeout(timeoutHandle);
7214}
7215timeoutHandle=undefined;
7216}
7217}
7218var extraInputs=[];
7219try{
7220if(s.extraData){
7221for(var n in s.extraData){
7222if(s.extraData.hasOwnProperty(n)){
7223if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){
7224extraInputs.push(
7225$('<input type="hidden" name="'+s.extraData[n].name+'">',ownerDocument).val(s.extraData[n].value)
7226.appendTo(form)[0]);
7227}else{
7228extraInputs.push(
7229$('<input type="hidden" name="'+n+'">',ownerDocument).val(s.extraData[n])
7230.appendTo(form)[0]);
7231}
7232}
7233}
7234}
7235if(!s.iframeTarget){
7236$io.appendTo($body);
7237}
7238if(io.attachEvent){
7239io.attachEvent('onload',cb);
7240}else{
7241io.addEventListener('load',cb,false);
7242}
7243setTimeout(checkState,15);
7244try{
7245form.submit();
7246}catch(err){
7247var submitFn=document.createElement('form').submit;
7248submitFn.apply(form);
7249}
7250}finally{
7251form.setAttribute('action',a);
7252form.setAttribute('enctype',et);
7253if(t){
7254form.setAttribute('target',t);
7255}else{
7256$form.removeAttr('target');
7257}
7258$(extraInputs).remove();
7259}
7260}
7261if(s.forceSync){
7262doSubmit();
7263}else{
7264setTimeout(doSubmit,10);
7265}
7266var data,doc,domCheckCount=50,callbackProcessed;
7267function cb(e){
7268if(xhr.aborted||callbackProcessed){
7269return;
7270}
7271doc=getDoc(io);
7272if(!doc){
7273log('cannot access response document');
7274e=SERVER_ABORT;
7275}
7276if(e===CLIENT_TIMEOUT_ABORT&&xhr){
7277xhr.abort('timeout');
7278deferred.reject(xhr,'timeout');
7279return;
7280}
7281if(e===SERVER_ABORT&&xhr){
7282xhr.abort('server abort');
7283deferred.reject(xhr,'error','server abort');
7284return;
7285}
7286if(!doc||doc.location.href===s.iframeSrc){
7287if(!timedOut){
7288return;
7289}
7290}
7291if(io.detachEvent){
7292io.detachEvent('onload',cb);
7293}else{
7294io.removeEventListener('load',cb,false);
7295}
7296var status='success',errMsg;
7297try{
7298if(timedOut){
7299throw'timeout';
7300}
7301var isXml=s.dataType==='xml'||doc.XMLDocument||$.isXMLDoc(doc);
7302log('isXml='+isXml);
7303if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){
7304if(--domCheckCount){
7305log('requeing onLoad callback, DOM not available');
7306setTimeout(cb,250);
7307return;
7308}
7309}
7310var docRoot=doc.body?doc.body:doc.documentElement;
7311xhr.responseText=docRoot?docRoot.innerHTML:null;
7312xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;
7313if(isXml){
7314s.dataType='xml';
7315}
7316xhr.getResponseHeader=function(header){
7317var headers={'content-type':s.dataType};
7318return headers[header.toLowerCase()];
7319};
7320if(docRoot){
7321xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;
7322xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;
7323}
7324var dt=(s.dataType||'').toLowerCase();
7325var scr=/(json|script|text)/.test(dt);
7326if(scr||s.textarea){
7327var ta=doc.getElementsByTagName('textarea')[0];
7328if(ta){
7329xhr.responseText=ta.value;
7330xhr.status=Number(ta.getAttribute('status'))||xhr.status;
7331xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;
7332}else if(scr){
7333var pre=doc.getElementsByTagName('pre')[0];
7334var b=doc.getElementsByTagName('body')[0];
7335if(pre){
7336xhr.responseText=pre.textContent?pre.textContent:pre.innerText;
7337}else if(b){
7338xhr.responseText=b.textContent?b.textContent:b.innerText;
7339}
7340}
7341}else if(dt==='xml'&&!xhr.responseXML&&xhr.responseText){
7342xhr.responseXML=toXml(xhr.responseText);
7343}
7344try{
7345data=httpData(xhr,dt,s);
7346}catch(err){
7347status='parsererror';
7348xhr.error=errMsg=(err||status);
7349}
7350}catch(err){
7351log('error caught: ',err);
7352status='error';
7353xhr.error=errMsg=(err||status);
7354}
7355if(xhr.aborted){
7356log('upload aborted');
7357status=null;
7358}
7359if(xhr.status){
7360status=((xhr.status>=200&&xhr.status<300)||xhr.status===304)?'success':'error';
7361}
7362if(status==='success'){
7363if(s.success){
7364s.success.call(s.context,data,'success',xhr);
7365}
7366deferred.resolve(xhr.responseText,'success',xhr);
7367if(g){
7368$.event.trigger('ajaxSuccess',[xhr,s]);
7369}
7370}else if(status){
7371if(typeof errMsg==='undefined'){
7372errMsg=xhr.statusText;
7373}
7374if(s.error){
7375s.error.call(s.context,xhr,status,errMsg);
7376}
7377deferred.reject(xhr,'error',errMsg);
7378if(g){
7379$.event.trigger('ajaxError',[xhr,s,errMsg]);
7380}
7381}
7382if(g){
7383$.event.trigger('ajaxComplete',[xhr,s]);
7384}
7385if(g&&!--$.active){
7386$.event.trigger('ajaxStop');
7387}
7388if(s.complete){
7389s.complete.call(s.context,xhr,status);
7390}
7391callbackProcessed=true;
7392if(s.timeout){
7393clearTimeout(timeoutHandle);
7394}
7395setTimeout(function(){
7396if(!s.iframeTarget){
7397$io.remove();
7398}else{
7399$io.attr('src',s.iframeSrc);
7400}
7401xhr.responseXML=null;
7402},100);
7403}
7404var toXml=$.parseXML||function(s,doc){
7405if(window.ActiveXObject){
7406doc=new ActiveXObject('Microsoft.XMLDOM');
7407doc.async='false';
7408doc.loadXML(s);
7409}else{
7410doc=(new DOMParser()).parseFromString(s,'text/xml');
7411}
7412return(doc&&doc.documentElement&&doc.documentElement.nodeName!=='parsererror')?doc:null;
7413};
7414var parseJSON=$.parseJSON||function(s){
7415window.console.error('jquery.parseJSON is undefined');
7416return null;
7417};
7418var httpData=function(xhr,type,s){
7419var ct=xhr.getResponseHeader('content-type')||'',
7420xml=((type==='xml'||!type)&&ct.indexOf('xml')>=0),
7421data=xml?xhr.responseXML:xhr.responseText;
7422if(xml&&data.documentElement.nodeName==='parsererror'){
7423if($.error){
7424$.error('parsererror');
7425}
7426}
7427if(s&&s.dataFilter){
7428data=s.dataFilter(data,type);
7429}
7430if(typeof data==='string'){
7431if((type==='json'||!type)&&ct.indexOf('json')>=0){
7432data=parseJSON(data);
7433}else if((type==='script'||!type)&&ct.indexOf('javascript')>=0){
7434$.globalEval(data);
7435}
7436}
7437return data;
7438};
7439return deferred;
7440}
7441};
7442$.fn.ajaxForm=function(options,data,dataType,onSuccess){
7443if(typeof options==='string'||(options===false&&arguments.length>0)){
7444options={
7445'url':options,
7446'data':data,
7447'dataType':dataType
7448};
7449if(typeof onSuccess==='function'){
7450options.success=onSuccess;
7451}
7452}
7453options=options||{};
7454options.delegation=options.delegation&&$.isFunction($.fn.on);
7455if(!options.delegation&&this.length===0){
7456var o={s:this.selector,c:this.context};
7457if(!$.isReady&&o.s){
7458log('DOM not ready, queuing ajaxForm');
7459$(function(){
7460$(o.s,o.c).ajaxForm(options);
7461});
7462return this;
7463}
7464log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));
7465return this;
7466}
7467if(options.delegation){
7468$(document)
7469.off('submit.form-plugin',this.selector,doAjaxSubmit)
7470.off('click.form-plugin',this.selector,captureSubmittingElement)
7471.on('submit.form-plugin',this.selector,options,doAjaxSubmit)
7472.on('click.form-plugin',this.selector,options,captureSubmittingElement);
7473return this;
7474}
7475if(options.beforeFormUnbind){
7476options.beforeFormUnbind(this,options);
7477}
7478return this.ajaxFormUnbind()
7479.on('submit.form-plugin',options,doAjaxSubmit)
7480.on('click.form-plugin',options,captureSubmittingElement);
7481};
7482function doAjaxSubmit(e){
7483var options=e.data;
7484if(!e.isDefaultPrevented()){
7485e.preventDefault();
7486$(e.target).closest('form').ajaxSubmit(options);
7487}
7488}
7489function captureSubmittingElement(e){
7490var target=e.target;
7491var $el=$(target);
7492if(!$el.is('[type=submit],[type=image]')){
7493var t=$el.closest('[type=submit]');
7494if(t.length===0){
7495return;
7496}
7497target=t[0];
7498}
7499var form=target.form;
7500form.clk=target;
7501if(target.type==='image'){
7502if(typeof e.offsetX!=='undefined'){
7503form.clk_x=e.offsetX;
7504form.clk_y=e.offsetY;
7505}else if(typeof $.fn.offset==='function'){
7506var offset=$el.offset();
7507form.clk_x=e.pageX-offset.left;
7508form.clk_y=e.pageY-offset.top;
7509}else{
7510form.clk_x=e.pageX-target.offsetLeft;
7511form.clk_y=e.pageY-target.offsetTop;
7512}
7513}
7514setTimeout(function(){
7515form.clk=form.clk_x=form.clk_y=null;
7516},100);
7517}
7518$.fn.ajaxFormUnbind=function(){
7519return this.off('submit.form-plugin click.form-plugin');
7520};
7521$.fn.formToArray=function(semantic,elements,filtering){
7522var a=[];
7523if(this.length===0){
7524return a;
7525}
7526var form=this[0];
7527var formId=this.attr('id');
7528var els=(semantic||typeof form.elements==='undefined')?form.getElementsByTagName('*'):form.elements;
7529var els2;
7530if(els){
7531els=$.makeArray(els);
7532}
7533if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){
7534els2=$(':input[form="'+formId+'"]').get();
7535if(els2.length){
7536els=(els||[]).concat(els2);
7537}
7538}
7539if(!els||!els.length){
7540return a;
7541}
7542if($.isFunction(filtering)){
7543els=$.map(els,filtering);
7544}
7545var i,j,n,v,el,max,jmax;
7546for(i=0,max=els.length;i<max;i++){
7547el=els[i];
7548n=el.name;
7549if(!n||el.disabled){
7550continue;
7551}
7552if(semantic&&form.clk&&el.type==='image'){
7553if(form.clk===el){
7554a.push({name:n,value:$(el).val(),type:el.type});
7555a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});
7556}
7557continue;
7558}
7559v=$.fieldValue(el,true);
7560if(v&&v.constructor===Array){
7561if(elements){
7562elements.push(el);
7563}
7564for(j=0,jmax=v.length;j<jmax;j++){
7565a.push({name:n,value:v[j]});
7566}
7567}else if(feature.fileapi&&el.type==='file'){
7568if(elements){
7569elements.push(el);
7570}
7571var files=el.files;
7572if(files.length){
7573for(j=0;j<files.length;j++){
7574a.push({name:n,value:files[j],type:el.type});
7575}
7576}else{
7577a.push({name:n,value:'',type:el.type});
7578}
7579}else if(v!==null&&typeof v!=='undefined'){
7580if(elements){
7581elements.push(el);
7582}
7583a.push({name:n,value:v,type:el.type,required:el.required});
7584}
7585}
7586if(!semantic&&form.clk){
7587var $input=$(form.clk),input=$input[0];
7588n=input.name;
7589if(n&&!input.disabled&&input.type==='image'){
7590a.push({name:n,value:$input.val()});
7591a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});
7592}
7593}
7594return a;
7595};
7596$.fn.formSerialize=function(semantic){
7597return $.param(this.formToArray(semantic));
7598};
7599$.fn.fieldSerialize=function(successful){
7600var a=[];
7601this.each(function(){
7602var n=this.name;
7603if(!n){
7604return;
7605}
7606var v=$.fieldValue(this,successful);
7607if(v&&v.constructor===Array){
7608for(var i=0,max=v.length;i<max;i++){
7609a.push({name:n,value:v[i]});
7610}
7611}else if(v!==null&&typeof v!=='undefined'){
7612a.push({name:this.name,value:v});
7613}
7614});
7615return $.param(a);
7616};
7617$.fn.fieldValue=function(successful){
7618for(var val=[],i=0,max=this.length;i<max;i++){
7619var el=this[i];
7620var v=$.fieldValue(el,successful);
7621if(v===null||typeof v==='undefined'||(v.constructor===Array&&!v.length)){
7622continue;
7623}
7624if(v.constructor===Array){
7625$.merge(val,v);
7626}else{
7627val.push(v);
7628}
7629}
7630return val;
7631};
7632$.fieldValue=function(el,successful){
7633var n=el.name,t=el.type,tag=el.tagName.toLowerCase();
7634if(typeof successful==='undefined'){
7635successful=true;
7636}
7637if(successful&&(!n||el.disabled||t==='reset'||t==='button'||
7638(t==='checkbox'||t==='radio')&&!el.checked||
7639(t==='submit'||t==='image')&&el.form&&el.form.clk!==el||
7640tag==='select'&&el.selectedIndex===-1)){
7641return null;
7642}
7643if(tag==='select'){
7644var index=el.selectedIndex;
7645if(index<0){
7646return null;
7647}
7648var a=[],ops=el.options;
7649var one=(t==='select-one');
7650var max=(one?index+1:ops.length);
7651for(var i=(one?index:0);i<max;i++){
7652var op=ops[i];
7653if(op.selected&&!op.disabled){
7654var v=op.value;
7655if(!v){
7656v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value;
7657}
7658if(one){
7659return v;
7660}
7661a.push(v);
7662}
7663}
7664return a;
7665}
7666return $(el).val().replace(rCRLF,'\r\n');
7667};
7668$.fn.clearForm=function(includeHidden){
7669return this.each(function(){
7670$('input,select,textarea',this).clearFields(includeHidden);
7671});
7672};
7673$.fn.clearFields=$.fn.clearInputs=function(includeHidden){
7674var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;
7675return this.each(function(){
7676var t=this.type,tag=this.tagName.toLowerCase();
7677if(re.test(t)||tag==='textarea'){
7678this.value='';
7679}else if(t==='checkbox'||t==='radio'){
7680this.checked=false;
7681}else if(tag==='select'){
7682this.selectedIndex=-1;
7683}else if(t==='file'){
7684if(/MSIE/.test(navigator.userAgent)){
7685$(this).replaceWith($(this).clone(true));
7686}else{
7687$(this).val('');
7688}
7689}else if(includeHidden){
7690if((includeHidden===true&&/hidden/.test(t))||
7691(typeof includeHidden==='string'&&$(this).is(includeHidden))){
7692this.value='';
7693}
7694}
7695});
7696};
7697$.fn.resetForm=function(){
7698return this.each(function(){
7699var el=$(this);
7700var tag=this.tagName.toLowerCase();
7701switch(tag){
7702case'input':
7703this.checked=this.defaultChecked;
7704case'textarea':
7705this.value=this.defaultValue;
7706return true;
7707case'option':
7708case'optgroup':
7709var select=el.parents('select');
7710if(select.length&&select[0].multiple){
7711if(tag==='option'){
7712this.selected=this.defaultSelected;
7713}else{
7714el.find('option').resetForm();
7715}
7716}else{
7717select.resetForm();
7718}
7719return true;
7720case'select':
7721el.find('option').each(function(i){
7722this.selected=this.defaultSelected;
7723if(this.defaultSelected&&!el[0].multiple){
7724el[0].selectedIndex=i;
7725return false;
7726}
7727});
7728return true;
7729case'label':
7730var forEl=$(el.attr('for'));
7731var list=el.find('input,select,textarea');
7732if(forEl[0]){
7733list.unshift(forEl[0]);
7734}
7735list.resetForm();
7736return true;
7737case'form':
7738if(typeof this.reset==='function'||(typeof this.reset==='object'&&!this.reset.nodeType)){
7739this.reset();
7740}
7741return true;
7742default:
7743el.find('form,input,label,select,textarea').resetForm();
7744return true;
7745}
7746});
7747};
7748$.fn.enable=function(b){
7749if(typeof b==='undefined'){
7750b=true;
7751}
7752return this.each(function(){
7753this.disabled=!b;
7754});
7755};
7756$.fn.selected=function(select){
7757if(typeof select==='undefined'){
7758select=true;
7759}
7760return this.each(function(){
7761var t=this.type;
7762if(t==='checkbox'||t==='radio'){
7763this.checked=select;
7764}else if(this.tagName.toLowerCase()==='option'){
7765var $sel=$(this).parent('select');
7766if(select&&$sel[0]&&$sel[0].type==='select-one'){
7767$sel.find('option').selected(false);
7768}
7769this.selected=select;
7770}
7771});
7772};
7773$.fn.ajaxSubmit.debug=false;
7774function log(){
7775if(!$.fn.ajaxSubmit.debug){
7776return;
7777}
7778var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');
7779if(window.console&&window.console.log){
7780window.console.log(msg);
7781}else if(window.opera&&window.opera.postError){
7782window.opera.postError(msg);
7783}
7784}
7785}));
7786
7787
7788/* prive/javascript/jquery.autosave.js?1790327464 */
7789
7790(function($){
7791$.fn.autosave=function(opt){
7792opt=$.extend({
7793url:window.location,
7794confirm:false,
7795confirmstring:'Sauvegarder ?'
7796},opt);
7797var save_changed=function(){
7798$('form.autosavechanged')
7799.each(function(){
7800if(!opt.confirm||confirm(opt.confirmstring)){
7801var contenu=$(this).serialize();
7802var d=new Date();
7803contenu=contenu+"&__timestamp="+Math.round(d.getTime()/1000);
7804$.post(opt.url,{
7805'action':'session',
7806'var':'autosave_'+$('input[name=autosave]',this).val(),
7807'val':contenu
7808});
7809}
7810}).removeClass('autosavechanged');
7811};
7812$(window).on('unload',save_changed);
7813return this
7814.on('keyup',function(){
7815$(this).addClass('autosavechanged');
7816})
7817.on('change',function(){
7818$(this).addClass('autosavechanged');
7819save_changed();
7820})
7821.on('submit',function(){
7822save_changed();
7823});
7824};
7825})(jQuery);
7826
7827
7828/* prive/javascript/jquery.placeholder-label.js?1790327464 */
7829
7830(function($){
7831$.placeholderLabel={
7832placeholder_class:null,
7833add_placeholder:function(){
7834if($(this).val()==$(this).attr('placeholder')){
7835$(this).val('').removeClass($.placeholderLabel.placeholder_class);
7836}
7837},
7838remove_placeholder:function(){
7839if($(this).val()==''){
7840$(this).val($(this).attr('placeholder')).addClass($.placeholderLabel.placeholder_class);
7841}
7842},
7843disable_placeholder_fields:function(){
7844$(this).find("input[placeholder]").each(function(){
7845if($(this).val()==$(this).attr('placeholder')){
7846$(this).val('');
7847}
7848});
7849return true;
7850}
7851};
7852$.fn.placeholderLabel=function(options){
7853var dummy=document.createElement('input');
7854if(dummy.placeholder!=undefined){
7855return this;
7856}
7857var config={
7858placeholder_class:'placeholder'
7859};
7860if(options)$.extend(config,options);
7861$.placeholderLabel.placeholder_class=config.placeholder_class;
7862this.each(function(){
7863var input=$(this);
7864input.focus($.placeholderLabel.add_placeholder);
7865input.blur($.placeholderLabel.remove_placeholder);
7866input.triggerHandler('focus');
7867input.triggerHandler('blur');
7868$(this.form).submit($.placeholderL
7868abel.disable_placeholder_fields);
7869});
7870return this;
7871}
7872})(jQuery);
7873
7874
7875/* prive/javascript/ajaxCallback.js?1790327464 */
7876jQuery.spip=jQuery.spip||{};
7877jQuery.spip.log=function(){
7878if(jQuery.spip.debug&&window.console&&window.console.log)
7879window.console.log.apply(this,arguments);
7880}
7881jQuery.spip.test_espace_prive=function(){
7882if(typeof spipConfig.core.test_espace_prive!=undefined&&spipConfig.core.test_espace_prive){
7883return true;
7884}
7885return false;
7886}
7887if(!jQuery.spip.load_handlers){
7888jQuery.spip.load_handlers=new Array();
7889function onAjaxLoad(f){
7890jQuery.spip.load_handlers.push(f);
7891};
7892jQuery.spip.triggerAjaxLoad=function(root){
7893jQuery.spip.log('triggerAjaxLoad');
7894jQuery.spip.log(root);
7895for(var i=0;i<jQuery.spip.load_handlers.length;i++)
7896jQuery.spip.load_handlers[i].apply(root);
7897};
7898jQuery.spip.intercepted={};
7899jQuery.spip.intercepted.load=jQuery.fn.load;
7900jQuery.fn.load=function(url,params,callback){
7901if(typeof url!=="string"){
7902return jQuery.spip.intercepted.load.apply(this,arguments);
7903}
7904callback=callback||function(){};
7905if(params){
7906if(params.constructor==Function){
7907callback=params;
7908params=null;
7909}
7910}
7911params=jQuery.extend(params,{triggerAjaxLoad:false});
7912var callback2=function(){jQuery.spip.log('jQuery.load');jQuery.spip.triggerAjaxLoad(this);callback.apply(this,arguments);};
7913return jQuery.spip.intercepted.load.apply(this,[url,params,callback2]);
7914};
7915jQuery.spip.intercepted.ajaxSubmit=jQuery.fn.ajaxSubmit;
7916jQuery.fn.ajaxSubmit=function(options){
7917options=options||{};
7918if(typeof options.onAjaxLoad=="undefined"||options.onAjaxLoad!=false){
7919var me=jQuery(this).parents('div.ajax');
7920if(me.length)
7921me=me.parent();
7922else
7923me=document;
7924if(typeof options=='function')
7925options={success:options};
7926var callback=options.success||function(){};
7927options.success=function(){callback.apply(this,arguments);jQuery.spip.log('jQuery.ajaxSubmit');jQuery.spip.triggerAjaxLoad(me);}
7928}
7929return jQuery.spip.intercepted.ajaxSubmit.apply(this,[options]);
7930}
7931jQuery.spip.intercepted.ajax=jQuery.ajax;
7932jQuery.ajax=function(url,settings){
7933if(typeof settings=='undefined'){
7934settings={};
7935if(typeof url=='object'){
7936settings=url;
7937url=null;
7938}
7939}
7940if(typeof url=='string'){
7941settings['url']=url;
7942}
7943if(settings.data&&settings.data['triggerAjaxLoad']===false){
7944settings.data['triggerAjaxLoad']=null;
7945return jQuery.spip.intercepted.ajax(settings);
7946}
7947var s=jQuery.extend(true,{},jQuery.ajaxSettings,settings);
7948var callbackContext=s.context||s;
7949try{
7950if(jQuery.ajax.caller==jQuery.spip.intercepted.load||jQuery.ajax.caller==jQuery.spip.intercepted.ajaxSubmit)
7951return jQuery.spip.intercepted.ajax(settings);
7952}
7953catch(err){}
7954var orig_complete=s.complete||function(){};
7955settings.complete=function(res,status){
7956var dataType=settings.dataType;
7957var ct=(res&&(typeof res.getResponseHeader=='function'))
7958?res.getResponseHeader("content-type"):'';
7959var xml=!dataType&&ct&&ct.indexOf("xml")>=0;
7960orig_complete.call(callbackContext,res,status);
7961if((!dataType&&!xml)||dataType=="html"){
7962jQuery.spip.log('jQuery.ajax');
7963if(typeof s.onAjaxLoad=="undefined"||s.onAjaxLoad!=false)
7964jQuery.spip.triggerAjaxLoad(s.ajaxTarget?s.ajaxTarget:document);
7965}
7966};
7967return jQuery.spip.intercepted.ajax(settings);
7968};
7969}
7970jQuery.uaMatch=function(ua){
7971ua=ua.toLowerCase();
7972var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||
7973ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||
7974[];
7975return{
7976browser:match[1]||"",
7977version:match[2]||"0"
7978};
7979};
7980if(!jQuery.browser){
7981matched=jQuery.uaMatch(navigator.userAgent);
7982browser={};
7983if(matched.browser){
7984browser[matched.browser]=true;
7985browser.version=matched.version;
7986}
7987if(browser.chrome){
7988browser.webkit=true;
7989}else if(browser.webkit){
7990browser.safari=true;
7991}
7992jQuery.browser=browser;
7993}
7994jQuery.getScript=function(url,callback){
7995return $.ajax({
7996url:url,
7997dataType:"script",
7998success:callback,
7999cache:true
8000});
8001}
8002jQuery.fn.positionner=function(force,setfocus){
8003if(!this.length){
8004return this;
8005}
8006var offset=jQuery(this).offset();
8007var hauteur=parseInt(jQuery(this).css('height'));
8008var marge=jQuery.spip.positionner_marge||5;
8009var scrolltop=self['pageYOffset']||
8010jQuery.boxModel&&document.documentElement['scrollTop']||
8011document.body['scrollTop'];
8012var h=jQuery(window).height();
8013var scroll=0;
8014if(force||(offset&&offset['top']-marge<=scrolltop)){
8015scroll=offset['top']-marge;
8016}
8017else if(offset&&offset['top']+hauteur-h+marge>scrolltop){
8018scroll=Math.min(offset['top']-marge-15,offset['top']+hauteur-h+40);
8019}
8020if(scroll)
8021jQuery('html,body')
8022.animate({scrollTop:scroll},300);
8023if(setfocus!==false)
8024jQuery(jQuery('*',this).filter('input[type=text],textarea')[0]).focus();
8025return this;
8026}
8027jQuery.spip.virtualbuffer_id='spip_virtualbufferupdate';
8028jQuery.spip.initReaderBuffer=function(){
8029if(jQuery('#'+jQuery.spip.virtualbuffer_id).length)return;
8030jQuery('body').append('<div style="float:left;width:0;height:0;position:absolute;left:-5000px;top:-5000px;"><input type="hidden" name="'+jQuery.spip.virtualbuffer_id+'" id="'+jQuery.spip.virtualbuffer_id+'" value="0"></div>');
8031}
8032jQuery.spip.updateReaderBuffer=function(){
8033var i=jQuery('#'+jQuery.spip.virtualbuffer_id);
8034if(!i.length)return;
8035i.val(parseInt(i.val())+1);
8036}
8037jQuery.fn.formulaire_setContainer=function(){
8038if(!this.closest('.ajax-form-container').length){
8039this.find('script').remove();
8040var aria=this.data('aria');
8041var $container=jQuery('<div class="ajax-form-container"></div>');
8042if(aria&&typeof aria==='object'){
8043for(var i in aria){
8044$container=$container.attr(i,aria[i]);
8045}
8046}
8047else{
8048aria=false;
8049}
8050this.wrap($container);
8051if(aria){
8052jQuery('form',this).not('[aria-live]').attr('aria-live','off');
8053}
8054}
8055return this;
8056}
8057jQuery.fn.formulaire_dyn_ajax=function(target){
8058if(this.length)
8059jQuery.spip.initReaderBuffer();
8060return this.each(function(){
8061var scrollwhensubmit=!jQuery(this).is('.noscroll');
8062var cible=target||this;
8063jQuery(cible).formulaire_setContainer();
8064jQuery('form:not(.noajax):not(.bouton_action_post)',this).each(function(){
8065var leform=this;
8066var leclk,leclk_x,leclk_y;
8067var onError=function(xhr,status,error,$form){
8068jQuery(leform).ajaxFormUnbind().find('input[name="var_ajax"]').remove();
8069var msg="Erreur";
8070if(typeof(error_on_ajaxform)!=="undefined")msg=error_on_ajaxform;
8071jQuery(leform).prepend("<p class='error ajax-error none'>"+msg+"</p>").find('.ajax-error').show('fast');
8072jQuery(cible).closest('.ajax-form-container').endLoading(true);
8073}
8074jQuery(this).prepend("<input type='hidden' name='var_ajax' value='form'>")
8075.ajaxForm({
8076beforeSubmit:function(){
8077leclk=leform.clk;
8078var scrollwhensubmit_button=true;
8079if(leclk){
8080scrollwhensubmit_button=!jQuery(leclk).is('.noscroll');
8081var n=leclk.name;
8082if(n&&!leclk.disabled&&leclk.type==="image"){
8083leclk_x=leform.clk_x;
8084leclk_y=leform.clk_y;
8085}
8086}
8087jQuery(cible).wrap('<div />');
8088cible=jQuery(cible).parent();
8089jQuery(cible).closest('.ajax-form-container').animateLoading();
8090if(scrollwhensubmit&&scrollwhensubmit_button){
8091jQuery(cible).positionner(false,false);
8092}
8093},
8094error:onError,
8095success:function(c,status,xhr,$form){
8096if(c.match(/^\s*noajax\s*$/)){
8097jQuery("input[name=var_ajax]",leform).remove();
8098if(leclk){
8099var n=leclk.name;
8100if(n&&!leclk.disabled){
8101jQuery(leform).prepend("<input type='hidden' name='"+n+"' value='"+leclk.value+"'>");
8102if(leclk.type==="image"){
8103jQuery(leform).prepend("<input type='hidden' name='"+n+".x' value='"+leform.clk_x+"'>");
8104jQuery(leform).prepend("<input type='hidden' name='"+n+".y' value='"+leform.clk_y+"'>");
8105}
8106}
8107}
8108jQuery(leform).ajaxFormUnbind().closest('.formulaire_spip').addClass('resubmit-noajax');
8109try{
8110leform.submit();
8111}catch(err){
8112var submitFn=document.createElement('form').submit;
8113submitFn.apply(leform);
8114}
8115}
8116else{
8117if(!c.length||c.indexOf("ajax-form-is-ok")==-1)
8118return onError.apply(this,[status,xhr,$form]);
8119var preloaded=jQuery.spip.preloaded_urls;
8120jQuery.spip.preloaded_urls={};
8121jQuery(cible).html(c);
8122var a=jQuery('a:first',cible).eq(0);
8123var d=jQuery('div.ajax',cible);
8124if(!d.length){
8125jQuery(cible).addClass('ajax');
8126if(!scrollwhensubmit)
8127jQuery(cible).addClass('noscroll');
8128}
8129else{
8130d.siblings('br.bugajaxie').remove();
8131cible=jQuery(":first",cible);
8132cible.unwrap();
8133}
8134if(a.length
8135&&a.is('a[name=ajax_ancre]')
8136&&jQuery(a.attr('href'),cible).length){
8137a=a.attr('href');
8138if(jQuery(a,cible).length)
8139setTimeout(function(){
8140jQuery(a,cible).positionner(false);
8141},10);
8142jQuery(cible).closest('.ajax-form-container').endLoading(true);
8143}
8144else{
8145if(a.length&&a.is('a[name=ajax_redirect]')){
8146a=a.get(0).href;
8147setTimeout(function(){
8148var cur=window.location.href.split('#');
8149document.location.replace(a);
8150if(cur[0]==a.split('#')[0]){
8151window.location.reload();
8152}
8153},10);
8154jQuery(cible).closest('.ajax-form-container').animateLoading();
8155}
8156else{
8157jQuery(cible).closest('.ajax-form-container').endLoading(true);
8158}
8159}
8160if(!jQuery('.reponse_formulaire_ok',cible).length)
8161jQuery.spip.preloaded_urls=preloaded;
8162jQuery.spip.updateReaderBuffer();
8163}
8164}
8165})
8166.addClass('noajax hasajax');
8167});
8168});
8169}
8170jQuery.fn.formulaire_verifier=function(callback,champ){
8171var erreurs={'message_erreur':'form non ajax'};
8172var me=this;
8173if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true'){
8174if(jQuery(me).is('form.hasajax')){
8175jQuery(me).ajaxSubmit({
8176dataType:"json",
8177data:{formulaire_action_verifier_json:true},
8178success:function(errs){
8179var args=[errs,champ]
8180if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true')
8181callback.apply(me,args);
8182}
8183});
8184}
8185else
8186callback.apply(me,[erreurs,champ]);
8187}
8188return this;
8189}
8190jQuery.fn.formulaire_activer_verif_auto=function(callback){
8191callback=callback||formulaire_actualiser_erreurs;
8192var me=jQuery(this).closest('.ajax-form-container');
8193var check=function(){
8194var name=jQuery(this).attr('name');
8195setTimeout(function(){me.find('form').formulaire_verifier(callback,name);},50);
8196}
8197var activer=function(){
8198if(me.find('form').attr('data-verifjson')!='on'){
8199me
8200.find('form')
8201.attr('data-verifjson','on')
8202.find('input,select,textarea')
8203.on('change',check);
8204}
8205}
8206jQuery(activer);
8207onAjaxLoad(function(){setTimeout(activer,150);});
8208}
8209function formulaire_actualiser_erreurs(erreurs){
8210var parent=jQuery(this).closest('.formulaire_spip');
8211if(!parent.length)return;
8212parent.find('.reponse_formulaire,.erreur_message').fadeOut().remove();
8213parent.find('.erreur').removeClass('erreur');
8214if(erreurs['message_ok'])
8215parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_ok">'+erreurs['message_ok']+'</p>');
8216if(erreurs['message_erreur'])
8217parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_erreur">'+erreurs['message_erreur']+'</p>');
8218for(var k in erreurs){
8219var saisie=parent.find('.editer_'+k);
8220if(saisie.length){
8221saisie.addClass('erreur');
8222saisie.find('label').after('<span class="erreur_message">'+erreurs[k]+'</span>');
8223}
8224}
8225}
8226var ajax_confirm=true;
8227var ajax_confirm_date=0;
8228var spip_confirm=window.confirm;
8229function _confirm(message){
8230ajax_confirm=spip_confirm(message);
8231if(!ajax_confirm){
8232var d=new Date();
8233ajax_confirm_date=d.getTime();
8234}
8235return ajax_confirm;
8236}
8237window.confirm=_confirm;
8238var ajaxbloc_selecteur;
8239jQuery.spip.preloaded_urls={};
8240jQuery.spip.on_ajax_loaded=function(blocfrag,c,href,history){
8241history=history||(history==null);
8242if(typeof href==undefined||href==null)
8243history=false;
8244if(history)
8245jQuery.spip.setHistoryState(blocfrag);
8246if(jQuery(blocfrag).attr('data-loaded-callback')){
8247var callback=eval(jQuery(blocfrag).attr('data-loaded-callback'));
8248callback.call(blocfrag,c,href,history);
8249}
8250else{
8251jQuery(blocfrag)
8252.html(c)
8253.endLoading();
8254}
8255if(typeof href!=undefined)
8256jQuery(blocfrag).attr('data-url',href);
8257if(history){
8258var href_history=href;
8259if(href_history.indexOf('var_nullify')!==-1){
8260href_history=parametre_url(href_history,'var_nullify','');
8261}
8262jQuery.spip.pushHistoryState(href_history);
8263jQuery.spip.setHistoryState(blocfrag);
8264}
8265var a=jQuery('a:first',jQuery(blocfrag)).eq(0);
8266if(a.length
8267&&a.is('a[name=ajax_ancre]')
8268&&jQuery(a.attr('href'),blocfrag).length){
8269a=a.attr('href');
8270jQuery(a,blocfrag).positionner(false);
8271}
8272jQuery.spip.log('on_ajax_loaded');
8273jQuery.spip.triggerAjaxLoad(blocfrag);
8274a=jQuery(blocfrag).parents('form.hasajax')
8275if(a.length)
8276a.eq(0).removeClass('noajax').parents('div.ajax').formulaire_dyn_ajax();
8277jQuery.spip.updateReaderBuffer();
8278}
8279jQuery.spip.on_ajax_failed=function(blocfrag,statusCode,href,history){
8280jQuery(blocfrag).addClass('invalid');
8281jQuery.spip.log("Echec AJAX statusCode "+statusCode)
8282history=history||(history==null);
8283if(history){
8284if(jQuery.spip.debug){
8285jQuery.spip.log("On redirige sur sur "+href)
8286}
8287else{
8288window.location.href=href;
8289}
8290}
8291}
8292jQuery.spip.stateId=0;
8293jQuery.spip.setHistoryState=function(blocfrag){
8294if(!window.history.replaceState)return;
8295if(!blocfrag.attr('id')){
8296while(jQuery('#ghsid'+jQuery.spip.stateId).length)
8297jQuery.spip.stateId++;
8298blocfrag.attr('id','ghsid'+jQuery.spip.stateId);
8299}
8300var href=blocfrag.attr('data-url')||blocfrag.attr('data-origin');
8301href=jQuery("<"+"a href='"+href+"'></a>").get(0).href;
8302var state={
8303id:blocfrag.attr('id'),
8304href:href
8305};
8306var ajaxid=blocfrag.attr('class').match(/\bajax-id-[\w-]+\b/);
8307if(ajaxid&&ajaxid.length)
8308state["ajaxid"]=ajaxid[0];
8309window.history.replaceState(state,window.document.title,window.document.location);
8310}
8311jQuery.spip.pushHistoryState=function(href,title){
8312if(!window.history.pushState)
8313return false;
8314window.history.pushState({},title,href);
8315}
8316window.onpopstate=function(popState){
8317if(popState.state&&popState.state.href){
8318var blocfrag=false;
8319if(popState.state.id){
8320blocfrag=jQuery('#'+popState.state.id);
8321}
8322if((!blocfrag||!blocfrag.length)&&popState.state.ajaxid){
8323blocfrag=jQuery('.ajaxbloc.'+popState.state.ajaxid);
8324}
8325if(blocfrag&&blocfrag.length==1){
8326jQuery.spip.ajaxClick(blocfrag,popState.state.href,{history:false});
8327return true;
8328}
8329else{
8330window.location.href=popState.state.href;
8331}
8332}
8333}
8334jQuery.spip.loadAjax=function(blocfrag,url,href,options){
8335var force=options.force||false;
8336if(jQuery(blocfrag).attr('data-loading-callback')){
8337var callback=eval(jQuery(blocfrag).attr('data-loading-callback'));
8338callback.call(blocfrag,url,href,options);
8339}
8340else{
8341jQuery(blocfrag).animateLoading();
8342}
8343if(jQuery.spip.preloaded_urls[url]&&!force){
8344if(jQuery.spip.preloaded_urls[url]=="<!--loading-->"){
8345setTimeout(function(){jQuery.spip.loadAjax(blocfrag,url,href,options);},100);
8346return;
8347}
8348jQuery.spip.on_ajax_loaded(blocfrag,jQuery.spip.preloaded_urls[url],href,options.history);
8349}else{
8350var d=new Date();
8351jQuery.spip.preloaded_urls[url]="<!--loading-->";
8352jQuery.ajax({
8353url:parametre_url(url,'var_t',d.getTime()),
8354onAjaxLoad:false,
8355success:function(c){
8356jQuery.spip.on_ajax_loaded(blocfrag,c,href,options.history);
8357jQuery.spip.preloaded_urls[url]=c;
8358if(options.callback&&typeof options.callback=="function")
8359options.callback.apply(blocfrag);
8360},
8361error:function(e){
8362jQuery.spip.preloaded_urls[url]='';
8363jQuery.spip.on_ajax_failed(blocfrag,e.status,href,options.history);
8364}
8365});
8366}
8367}
8368jQuery.spip.makeAjaxUrl=function(href,ajax_env,origin){
8369var url=href.split('#');
8370url[0]=parametre_url(url[0],'var_ajax',1);
8371url[0]=parametre_url(url[0],'var_ajax_env',ajax_env);
8372if(origin){
8373if(origin.indexOf('var_nullify')!==-1){
8374origin=parametre_url(origin,'var_nullify','');
8375}
8376var p=origin.indexOf('?');
8377var nullify=[];
8378if(p!==-1){
8379var args=origin.substring(p+1).split('&');
8380var val;
8381var arg;
8382for(var n=0;n<args.length;n++){
8383arg=args[n].split('=');
8384arg=decodeURIComponent(arg[0]);
8385p=arg.indexOf('[');
8386if(p!==-1)
8387arg=arg.substring(0,p);
8388val=parametre_url(href,arg);
8389if((typeof val=="undefined"||val==null)&&nullify.indexOf(arg)===-1){
8390nullify.push(arg);
8391}
8392}
8393if(nullify.length){
8394url[0]=url[0]+'&'+'var_nullify='+encodeURIComponent(nullify.join('|'));
8395}
8396}
8397}
8398if(url[1])
8399url[0]=parametre_url(url[0],'var_ajax_ancre',url[1]);
8400return url[0];
8401}
8402jQuery.spip.ajaxReload=function(blocfrag,options){
8403var ajax_env=blocfrag.attr('data-ajax-env');
8404if(!ajax_env||ajax_env==undefined)return;
8405var href=options.href||blocfrag.attr('data-url')||blocfrag.attr('data-origin');
8406if(href&&typeof href!=undefined){
8407if(href.indexOf('var_nullify')!==-1){
8408href=parametre_url(href,'var_nullify','');
8409}
8410options=options||{};
8411var callback=options.callback||null;
8412var history=options.history||false;
8413var args=options.args||{};
8414for(var key in args){
8415href=parametre_url(href,key,args[key]==undefined?'':args[key],'&',args[key]==undefined?false:true);
8416}
8417var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8418jQuery.spip.loadAjax(blocfrag,url,href,{force:true,callback:callback,history:history});
8419return true;
8420}
8421}
8422jQuery.spip.ajaxClick=function(blocfrag,href,options){
8423var ajax_env=blocfrag.attr('data-ajax-env');
8424if(!ajax_env||ajax_env==undefined)return;
8425if(!ajax_confirm){
8426ajax_confirm=true;
8427var d=new Date();
8428if((d.getTime()-ajax_confirm_date)<=2)
8429return false;
8430}
8431var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8432jQuery.spip.loadAjax(blocfrag,url,href,options);
8433return false;
8434}
8435jQuery.fn.ajaxbloc=function(){
8436if(this.length)
8437jQuery.spip.initReaderBuffer();
8438if(ajaxbloc_selecteur==undefined)
8439ajaxbloc_selecteur='.pagination a,a.ajax';
8440return this.each(function(){
8441jQuery('div.ajaxbloc',this).ajaxbloc();
8442var blocfrag=jQuery(this);
8443var ajax_env=blocfrag.attr('data-ajax-env');
8444if(!ajax_env||ajax_env==undefined)return;
8445blocfrag.not('.bind-ajaxReload').on('ajaxReload',function(event,options){
8446if(jQuery.spip.ajaxReload(blocfrag,options))
8447event.stopPropagation();
8448}).addClass('bind-ajaxReload');
8449jQuery(ajaxbloc_selecteur,this).not('.noajax,.bind-ajax')
8450.click(function(){return jQuery.spip.ajaxClick(blocfrag,this.href,{force:jQuery(this).is('.nocache'),history:!(jQuery(this).is('.nohistory')||jQuery(this).closest('.box_modalbox').length)});})
8451.addClass('bind-ajax')
8452.filter('.preload').each(function(){
8453var href=this.href;
8454var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8455if(!jQuery.spip.preloaded_urls[url]){
8456jQuery.spip.preloaded_urls[url]='<!--loading-->';
8457jQuery.ajax({url:url,onAjaxLoad:false,success:function(r){jQuery.spip.preloaded_urls[url]=r;},error:function(){jQuery.spip.preloaded_urls[url]='';}});
8458}
8459});
8460jQuery('form.bouton_action_post.ajax',this).not('.noajax,.bind-ajax').each(function(){
8461var leform=this;
8462var url=jQuery(this).attr('action').split('#');
8463var scrollwhensubmit=(!jQuery(this).is('.noscroll')&&!jQuery('.submit',this).is('.noscroll'));
8464jQuery(this)
8465.prepend("<input type='hidden' name='var_ajax' value='1'><input type='hidden' name='var_ajax_env' value='"+(ajax_env)+"'>"+(url[1]?"<input type='hidden' name='var_ajax_ancre' value='"+url[1]+"'>":""))
8466.ajaxForm({
8467beforeSubmit:function(){
8468jQuery(blocfrag).animateLoading();
8469if(scrollwhensubmit){
8470jQuery(blocfrag).positionner(false);
8471}
8472},
8473onAjaxLoad:false,
8474success:function(c){
8475jQuery.spip.on_ajax_loaded(blocfrag,c);
8476jQuery.spip.preloaded_urls={};
8477},
8478error:function(e){
8479jQuery.spip.preloaded_urls={};
8480var href=parametre_url(url,'redirect');
8481if(!href){
8482href=window.location.href;
8483}
8484jQuery.spip.on_ajax_failed(blocfrag,e.status,href,e.status===400);
8485}
8486})
8487.addClass('bind-ajax');
8488});
8489});
8490};
8491jQuery.fn.followLink=function(){
8492$(this).click();
8493if(!$(this).is('.bind-ajax'))
8494window.location.href=$(this).get(0).href;
8495return this;
8496}
8497function ajaxReload(ajaxid,options){
8498jQuery('div.ajaxbloc.ajax-id-'+ajaxid).ajaxReload(options);
8499}
8500jQuery.fn.ajaxReload=function(options){
8501options=options||{};
8502jQuery(this).trigger('ajaxReload',[options]);
8503return this;
8504}
8505jQuery.fn.animateLoading=function(){
8506this.attr('aria-busy','true').addClass('loading').children().css('opacity',0.5);
8507if(typeof ajax_image_searching!='undefined'){
8508var i=(this).find('.image_loading');
8509if(i.length)i.eq(0).html(ajax_image_searching);
8510else this.prepend('<span class="image_loading">'+ajax_image_searching+'</span>');
8511}
8512return this;
8513}
8514jQuery.fn.animeajax=jQuery.fn.animateLoading;
8515jQuery.fn.endLoading=function(hard){
8516hard=hard||false;
8517this.attr('aria-busy','false').removeClass('loading');
8518if(hard){
8519this.children().css('opacity','');
8520this.find('.image_loading').html('');
8521}
8522return this;
8523}
8524jQuery.fn.animateRemove=function(callback){
8525if(this.length){
8526var me=this;
8527var color=$("<div class='remove'></div>").css('background-color');
8528var sel=$(this);
8529if(sel.is('tr'))
8530sel=sel.add('>td',sel);
8531sel.addClass('remove').css({backgroundColor:color}).animate({opacity:"0.0"},'fast',function(){
8532sel.removeClass('remove').css({backgroundColor:''});
8533if(callback)
8534callback.apply(me);
8535});
8536}
8537return this;
8538}
8539jQuery.fn.animateAppend=function(callback){
8540if(this.length){
8541var me=this;
8542var color=$("<div class='append'></div>").css('background-color');
8543var origin=$(this).css('background-color')||'#ffffff';
8544if(origin=='transparent')origin='#ffffff';
8545var sel=$(this);
8546if(sel.is('tr'))
8547sel=sel.add('>td',sel);
8548sel.css('opacity','0.0').addClass('append').css({backgroundColor:color}).animate({opacity:"1.0"},1000,function(){
8549sel.animate({backgroundColor:origin},3000,function(){
8550sel.removeClass('append').css({backgroundColor:''});
8551if(callback)
8552callback.apply(me);
8553});
8554});
8555}
8556return this;
8557}
8558function parametre_url(url,c,v,sep,force_vide){
8559if(typeof(url)=='undefined'){
8560url='';
8561}
8562var p;
8563var ancre='';
8564var a='./';
8565var args=[];
8566p=url.indexOf('#');
8567if(p!=-1){
8568ancre=url.substring(p);
8569url=url.substring(0,p);
8570}
8571p=url.indexOf('?');
8572if(p!==-1){
8573if(p>0)a=url.substring(0,p);
8574args=url.substring(p+1).split('&');
8575}
8576else
8577a=url;
8578var regexp=new RegExp('^('+c.replace('[]','\\[\\]')+'\\[?\\]?)(=.*)?$');
8579var ajouts=[];
8580var u=(typeof(v)!=='object')?encodeURIComponent(v):v;
8581var na=[];
8582var v_read=null;
8583for(var n=0;n<args.length;n++){
8584var val=args[n];
8585try{
8586val=decodeURIComponent(val);
8587}catch(e){}
8588var r=val.match(regexp);
8589if(r&&r.length){
8590if(v==null){
8591if(r[1].substr(-2)=='[]'){
8592if(!v_read)v_read=[];
8593v_read.push((r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):'');
8594}
8595else{
8596return(r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):'';
8597}
8598}
8599else if(!v.length){
8600}
8601else if(r[1].substr(-2)!='[]'){
8602na.push(r[1]+'='+u);
8603ajouts.push(r[1]);
8604}
8605}
8606else
8607na.push(args[n]);
8608}
8609if(v==null)return v_read;
8610if(v||v.length||force_vide){
8611ajouts="="+ajouts.join("=")+"=";
8612var all=c.split('|');
8613for(n=0;n<all.length;n++){
8614if(ajouts.search("="+all[n]+"=")==-1){
8615if(typeof(v)!=='object'){
8616na.push(all[n]+'='+u);
8617}
8618else{
8619var id=((all[n].substring(-2)=='[]')?all[n]:all[n]+"[]");
8620for(p=0;p<v.length;p++)
8621na.push(id+'='+encodeURIComponent(v[p]));
8622}
8623}
8624}
8625}
8626if(na.length){
8627if(!sep)sep='&';
8628a=a+"?"+na.join(sep);
8629}
8630return a+ancre;
8631}
8632function spip_logo_survol_hover(){
8633var me=jQuery(this);
8634if(me.attr('data-src-hover')){
8635me.attr('data-src-original',me.attr('src'));
8636me.attr('src',me.attr('data-src-hover'));
8637}
8638}
8639function spip_logo_survol_out(){
8640var me=jQuery(this);
8641if(me.attr('data-src-original')){
8642me.attr('src',me.attr('data-src-original'));
8643}
8644}
8645function disableClickAfterFormSubmit(){
8646if(jQuery(this).is('.processing-submitted-form')){
8647return false;
8648}
8649jQuery(this)
8650.addClass('processing-submitted-form')
8651.find('button[type="submit"]')
8652.attr('disabled','disabled')
8653.addClass('disabled')
8654}
8655function puce_enable_survol(){
8656jQuery('span.puce_objet_popup a',this).not('.puce-survol-enabled').click(function(){
8657selec_statut(jQuery(this).attr('data-puce-id'),jQuery(this).attr('data-puce-type'),jQuery(this).attr('data-puce-decal'),jQuery('img',this).attr('src'),jQuery(this).attr('data-puce-action'));
8658return false;
8659}).addClass('puce-survol-enabled');
8660jQuery('span.puce_objet',this).not('.puce-survol-enabled').mouseover(function(){
8661if(!this.puce_loaded){
8662this.puce_loaded=true;prepare_selec_statut(this,jQuery(this).attr('data-puce-nom'),jQuery(this).attr('data-puce-type'),jQuery(this).attr('data-puce-id'),jQuery(this).attr('data-puce-action'));
8663}
8664}).addClass('puce-survol-enabled');
8665}
8666if(!window.var_zajax_content)
8667window.var_zajax_content='contenu';
8668jQuery(function(){
8669jQuery('form:not(.bouton_action_post)').parents('div.ajax')
8670.formulaire_dyn_ajax();
8671jQuery('div.ajaxbloc').ajaxbloc();
8672jQuery("input[placeholder]:text").placeholderLabel();
8673jQuery('.spip_logo_survol').hover(spip_logo_survol_hover,spip_logo_survol_out);
8674puce_enable_survol.apply(this);
8675jQuery('body').on('submit','form.bouton_action_post',disableClickAfterFormSubmit);
8676});
8677onAjaxLoad(function(){
8678if(jQuery){
8679jQuery('form:not(.bouton_action_post)',this).parents('div.ajax')
8680.formulaire_dyn_ajax();
8681if(jQuery(this).is('div.ajaxbloc'))
8682jQuery(this).ajaxbloc();
8683else if(jQuery(this).closest('div.ajaxbloc').length)
8684jQuery(this).closest('div.ajaxbloc').ajaxbloc();
8685else
8686jQuery('div.ajaxbloc',this).ajaxbloc();
8687jQuery("input[placeholder]:text",this).placeholderLabel();
8688jQuery('.spip_logo_survol',this).hover(spip_logo_survol_hover,spip_logo_survol_out);
8689puce_enable_survol.apply(this);
8690}
8691});
8692
8693
8694/* prive/javascript/js.cookie.js?1790327464 */
8695
8696;
8697(function(global,factory){
8698typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():
8699typeof define==='function'&&define.amd?define(factory):
8700(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){
8701var current=global.Cookies;
8702var exports=global.Cookies=factory();
8703exports.noConflict=function(){global.Cookies=current;return exports;};
8704})());
8705})(this,(function(){'use strict';
8706function assign(target){
8707for(var i=1;i<arguments.length;i++){
8708var source=arguments[i];
8709for(var key in source){
8710target[key]=source[key];
8711}
8712}
8713return target
8714}
8715var defaultConverter={
8716read:function(value){
8717if(value[0]==='"'){
8718value=value.slice(1,-1);
8719}
8720return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)
8721},
8722write:function(value){
8723return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
8724decodeURIComponent
8725)
8726}
8727};
8728function init(converter,defaultAttributes){
8729function set(name,value,attributes){
8730if(typeof document==='undefined'){
8731return
8732}
8733attributes=assign({},defaultAttributes,attributes);
8734if(typeof attributes.expires==='number'){
8735attributes.expires=new Date(Date.now()+attributes.expires*864e5);
8736}
8737if(attributes.expires){
8738attributes.expires=attributes.expires.toUTCString();
8739}
8740name=encodeURIComponent(name)
8741.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent)
8742.replace(/[()]/g,escape);
8743var stringifiedAttributes='';
8744for(var attributeName in attributes){
8745if(!attributes[attributeName]){
8746continue
8747}
8748stringifiedAttributes+='; '+attributeName;
8749if(attributes[attributeName]===true){
8750continue
8751}
8752stringifiedAttributes+='='+attributes[attributeName].split(';')[0];
8753}
8754return(document.cookie=
8755name+'='+converter.write(value,name)+stringifiedAttributes)
8756}
8757function get(name){
8758if(typeof document==='undefined'||(arguments.length&&!name)){
8759return
8760}
8761var cookies=document.cookie?document.cookie.split('; '):[];
8762var jar={};
8763for(var i=0;i<cookies.length;i++){
8764var parts=cookies[i].split('=');
8765var value=parts.slice(1).join('=');
8766try{
8767var found=decodeURIComponent(parts[0]);
8768jar[found]=converter.read(value,found);
8769if(name===found){
8770break
8771}
8772}catch(e){}
8773}
8774return name?jar[name]:jar
8775}
8776return Object.create(
8777{
8778set,
8779get,
8780remove:function(name,attributes){
8781set(
8782name,
8783'',
8784assign({},attributes,{
8785expires:-1
8786})
8787);
8788},
8789withAttributes:function(attributes){
8790return init(this.converter,assign({},this.attributes,attributes))
8791},
8792withConverter:function(converter){
8793return init(assign({},this.converter,converter),this.attributes)
8794}
8795},
8796{
8797attributes:{value:Object.freeze(defaultAttributes)},
8798converter:{value:Object.freeze(converter)}
8799}
8800)
8801}
8802var api=init(defaultConverter,{path:'/'});
8803return api;
8804}));
8805
8806
8807/* plugins/auto/jqueryui/v1.15.5/prive/javascript/ui/jquery-ui.js?1730746760 */
8808
8809(function(factory){
8810"use strict";
8811if(typeof define==="function"&&define.amd){
8812define(["jquery"],factory);
8813}else{
8814factory(jQuery);
8815}
8816})(function($){
8817"use strict";
8818$.ui=$.ui||{};
8819var version=$.ui.version="1.14.1";
8820var widgetUuid=0;
8821var widgetHasOwnProperty=Array.prototype.hasOwnProperty;
8822var widgetSlice=Array.prototype.slice;
8823$.cleanData=(function(orig){
8824return function(elems){
8825var events,elem,i;
8826for(i=0;(elem=elems[i])!=null;i++){
8827events=$._data(elem,"events");
8828if(events&&events.remove){
8829$(elem).triggerHandler("remove");
8830}
8831}
8832orig(elems);
8833};
8834})($.cleanData);
8835$.widget=function(name,base,prototype){
8836var existingConstructor,constructor,basePrototype;
8837var proxiedPrototype={};
8838var namespace=name.split(".")[0];
8839name=name.split(".")[1];
8840if(name==="__proto__"||name==="constructor"){
8841return $.error("Invalid widget name: "+name);
8842}
8843var fullName=namespace+"-"+name;
8844if(!prototype){
8845prototype=base;
8846base=$.Widget;
8847}
8848if(Array.isArray(prototype)){
8849prototype=$.extend.apply(null,[{}].concat(prototype));
8850}
8851$.expr.pseudos[fullName.toLowerCase()]=function(elem){
8852return!!$.data(elem,fullName);
8853};
8854$[namespace]=$[namespace]||{};
8855existingConstructor=$[namespace][name];
8856constructor=$[namespace][name]=function(options,element){
8857if(!this||!this._createWidget){
8858return new constructor(options,element);
8859}
8860if(arguments.length){
8861this._createWidget(options,element);
8862}
8863};
8864$.extend(constructor,existingConstructor,{
8865version:prototype.version,
8866_proto:$.extend({},prototype),
8867_childConstructors:[]
8868});
8869basePrototype=new base();
8870basePrototype.options=$.widget.extend({},basePrototype.options);
8871$.each(prototype,function(prop,value){
8872if(typeof value!=="function"){
8873proxiedPrototype[prop]=value;
8874return;
8875}
8876proxiedPrototype[prop]=(function(){
8877function _super(){
8878return base.prototype[prop].apply(this,arguments);
8879}
8880function _superApply(args){
8881return base.prototype[prop].apply(this,args);
8882}
8883return function(){
8884var __super=this._super;
8885var __superApply=this._superApply;
8886var returnValue;
8887this._super=_super;
8888this._superApply=_superApply;
8889returnValue=value.apply(this,arguments);
8890this._super=__super;
8891this._superApply=__superApply;
8892return returnValue;
8893};
8894})();
8895});
8896constructor.prototype=$.widget.extend(basePrototype,{
8897widgetEventPrefix:existingConstructor?(basePrototype.widgetEventPrefix||name):name
8898},proxiedPrototype,{
8899constructor:constructor,
8900namespace:namespace,
8901widgetName:name,
8902widgetFullName:fullName
8903});
8904if(existingConstructor){
8905$.each(existingConstructor._childConstructors,function(i,child){
8906var childPrototype=child.prototype;
8907$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,
8908child._proto);
8909});
8910delete existingConstructor._childConstructors;
8911}else{
8912base._childConstructors.push(constructor);
8913}
8914$.widget.bridge(name,constructor);
8915return constructor;
8916};
8917$.widget.extend=function(target){
vendor: 311,002 bytes, lines 8918-21435
8918var input=widgetSlice.call(arguments,1);
8919var inputIndex=0;
8920var inputLength=input.length;
8921var key;
8922var value;
8923for(;inputIndex<inputLength;inputIndex++){
8924for(key in input[inputIndex]){
8925value=input[inputIndex][key];
8926if(widgetHasOwnProperty.call(input[inputIndex],key)&&value!==undefined){
8927if($.isPlainObject(value)){
8928target[key]=$.isPlainObject(target[key])?
8929$.widget.extend({},target[key],value):
8930$.widget.extend({},value);
8931}else{
8932target[key]=value;
8933}
8934}
8935}
8936}
8937return target;
8938};
8939$.widget.bridge=function(name,object){
8940var fullName=object.prototype.widgetFullName||name;
8941$.fn[name]=function(options){
8942var isMethodCall=typeof options==="string";
8943var args=widgetSlice.call(arguments,1);
8944var returnValue=this;
8945if(isMethodCall){
8946if(!this.length&&options==="instance"){
8947returnValue=undefined;
8948}else{
8949this.each(function(){
8950var methodValue;
8951var instance=$.data(this,fullName);
8952if(options==="instance"){
8953returnValue=instance;
8954return false;
8955}
8956if(!instance){
8957return $.error("cannot call methods on "+name+
8958" prior to initialization; "+
8959"attempted to call method '"+options+"'");
8960}
8961if(typeof instance[options]!=="function"||
8962options.charAt(0)==="_"){
8963return $.error("no such method '"+options+"' for "+name+
8964" widget instance");
8965}
8966methodValue=instance[options].apply(instance,args);
8967if(methodValue!==instance&&methodValue!==undefined){
8968returnValue=methodValue&&methodValue.jquery?
8969returnValue.pushStack(methodValue.get()):
8970methodValue;
8971return false;
8972}
8973});
8974}
8975}else{
8976if(args.length){
8977options=$.widget.extend.apply(null,[options].concat(args));
8978}
8979this.each(function(){
8980var instance=$.data(this,fullName);
8981if(instance){
8982instance.option(options||{});
8983if(instance._init){
8984instance._init();
8985}
8986}else{
8987$.data(this,fullName,new object(options,this));
8988}
8989});
8990}
8991return returnValue;
8992};
8993};
8994$.Widget=function(){};
8995$.Widget._childConstructors=[];
8996$.Widget.prototype={
8997widgetName:"widget",
8998widgetEventPrefix:"",
8999defaultElement:"<div>",
9000options:{
9001classes:{},
9002disabled:false,
9003create:null
9004},
9005_createWidget:function(options,element){
9006element=$(element||this.defaultElement||this)[0];
9007this.element=$(element);
9008this.uuid=widgetUuid++;
9009this.eventNamespace="."+this.widgetName+this.uuid;
9010this.bindings=$();
9011this.hoverable=$();
9012this.focusable=$();
9013this.classesElementLookup={};
9014if(element!==this){
9015$.data(element,this.widgetFullName,this);
9016this._on(true,this.element,{
9017remove:function(event){
9018if(event.target===element){
9019this.destroy();
9020}
9021}
9022});
9023this.document=$(element.style?
9024element.ownerDocument:
9025element.document||element);
9026this.window=$(this.document[0].defaultView||this.document[0].parentWindow);
9027}
9028this.options=$.widget.extend({},
9029this.options,
9030this._getCreateOptions(),
9031options);
9032this._create();
9033if(this.options.disabled){
9034this._setOptionDisabled(this.options.disabled);
9035}
9036this._trigger("create",null,this._getCreateEventData());
9037this._init();
9038},
9039_getCreateOptions:function(){
9040return{};
9041},
9042_getCreateEventData:$.noop,
9043_create:$.noop,
9044_init:$.noop,
9045destroy:function(){
9046var that=this;
9047this._destroy();
9048$.each(this.classesElementLookup,function(key,value){
9049that._removeClass(value,key);
9050});
9051this.element
9052.off(this.eventNamespace)
9053.removeData(this.widgetFullName);
9054this.widget()
9055.off(this.eventNamespace)
9056.removeAttr("aria-disabled");
9057this.bindings.off(this.eventNamespace);
9058},
9059_destroy:$.noop,
9060widget:function(){
9061return this.element;
9062},
9063option:function(key,value){
9064var options=key;
9065var parts;
9066var curOption;
9067var i;
9068if(arguments.length===0){
9069return $.widget.extend({},this.options);
9070}
9071if(typeof key==="string"){
9072options={};
9073parts=key.split(".");
9074key=parts.shift();
9075if(parts.length){
9076curOption=options[key]=$.widget.extend({},this.options[key]);
9077for(i=0;i<parts.length-1;i++){
9078curOption[parts[i]]=curOption[parts[i]]||{};
9079curOption=curOption[parts[i]];
9080}
9081key=parts.pop();
9082if(arguments.length===1){
9083return curOption[key]===undefined?null:curOption[key];
9084}
9085curOption[key]=value;
9086}else{
9087if(arguments.length===1){
9088return this.options[key]===undefined?null:this.options[key];
9089}
9090options[key]=value;
9091}
9092}
9093this._setOptions(options);
9094return this;
9095},
9096_setOptions:function(options){
9097var key;
9098for(key in options){
9099this._setOption(key,options[key]);
9100}
9101return this;
9102},
9103_setOption:function(key,value){
9104if(key==="classes"){
9105this._setOptionClasses(value);
9106}
9107this.options[key]=value;
9108if(key==="disabled"){
9109this._setOptionDisabled(value);
9110}
9111return this;
9112},
9113_setOptionClasses:function(value){
9114var classKey,elements,currentElements;
9115for(classKey in value){
9116currentElements=this.classesElementLookup[classKey];
9117if(value[classKey]===this.options.classes[classKey]||
9118!currentElements||
9119!currentElements.length){
9120continue;
9121}
9122elements=$(currentElements.get());
9123this._removeClass(currentElements,classKey);
9124elements.addClass(this._classes({
9125element:elements,
9126keys:classKey,
9127classes:value,
9128add:true
9129}));
9130}
9131},
9132_setOptionDisabled:function(value){
9133this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!value);
9134if(value){
9135this._removeClass(this.hoverable,null,"ui-state-hover");
9136this._removeClass(this.focusable,null,"ui-state-focus");
9137}
9138},
9139enable:function(){
9140return this._setOptions({disabled:false});
9141},
9142disable:function(){
9143return this._setOptions({disabled:true});
9144},
9145_classes:function(options){
9146var full=[];
9147var that=this;
9148options=$.extend({
9149element:this.element,
9150classes:this.options.classes||{}
9151},options);
9152function bindRemoveEvent(){
9153var nodesToBind=[];
9154options.element.each(function(_,element){
9155var isTracked=$.map(that.classesElementLookup,function(elements){
9156return elements;
9157})
9158.some(function(elements){
9159return elements.is(element);
9160});
9161if(!isTracked){
9162nodesToBind.push(element);
9163}
9164});
9165that._on($(nodesToBind),{
9166remove:"_untrackClassesElement"
9167});
9168}
9169function processClassString(classes,checkOption){
9170var current,i;
9171for(i=0;i<classes.length;i++){
9172current=that.classesElementLookup[classes[i]]||$();
9173if(options.add){
9174bindRemoveEvent();
9175current=$($.uniqueSort(current.get().concat(options.element.get())));
9176}else{
9177current=$(current.not(options.element).get());
9178}
9179that.classesElementLookup[classes[i]]=current;
9180full.push(classes[i]);
9181if(checkOption&&options.classes[classes[i]]){
9182full.push(options.classes[classes[i]]);
9183}
9184}
9185}
9186if(options.keys){
9187processClassString(options.keys.match(/\S+/g)||[],true);
9188}
9189if(options.extra){
9190processClassString(options.extra.match(/\S+/g)||[]);
9191}
9192return full.join(" ");
9193},
9194_untrackClassesElement:function(event){
9195var that=this;
9196$.each(that.classesElementLookup,function(key,value){
9197if($.inArray(event.target,value)!==-1){
9198that.classesElementLookup[key]=$(value.not(event.target).get());
9199}
9200});
9201this._off($(event.target));
9202},
9203_removeClass:function(element,keys,extra){
9204return this._toggleClass(element,keys,extra,false);
9205},
9206_addClass:function(element,keys,extra){
9207return this._toggleClass(element,keys,extra,true);
9208},
9209_toggleClass:function(element,keys,extra,add){
9210add=(typeof add==="boolean")?add:extra;
9211var shift=(typeof element==="string"||element===null),
9212options={
9213extra:shift?keys:extra,
9214keys:shift?element:keys,
9215element:shift?this.element:element,
9216add:add
9217};
9218options.element.toggleClass(this._classes(options),add);
9219return this;
9220},
9221_on:function(suppressDisabledCheck,element,handlers){
9222var delegateElement;
9223var instance=this;
9224if(typeof suppressDisabledCheck!=="boolean"){
9225handlers=element;
9226element=suppressDisabledCheck;
9227suppressDisabledCheck=false;
9228}
9229if(!handlers){
9230handlers=element;
9231element=this.element;
9232delegateElement=this.widget();
9233}else{
9234element=delegateElement=$(element);
9235this.bindings=this.bindings.add(element);
9236}
9237$.each(handlers,function(event,handler){
9238function handlerProxy(){
9239if(!suppressDisabledCheck&&
9240(instance.options.disabled===true||
9241$(this).hasClass("ui-state-disabled"))){
9242return;
9243}
9244return(typeof handler==="string"?instance[handler]:handler)
9245.apply(instance,arguments);
9246}
9247if(typeof handler!=="string"){
9248handlerProxy.guid=handler.guid=
9249handler.guid||handlerProxy.guid||$.guid++;
9250}
9251var match=event.match(/^([\w:-]*)\s*(.*)$/);
9252var eventName=match[1]+instance.eventNamespace;
9253var selector=match[2];
9254if(selector){
9255delegateElement.on(eventName,selector,handlerProxy);
9256}else{
9257element.on(eventName,handlerProxy);
9258}
9259});
9260},
9261_off:function(element,eventName){
9262eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+
9263this.eventNamespace;
9264element.off(eventName);
9265this.bindings=$(this.bindings.not(element).get());
9266this.focusable=$(this.focusable.not(element).get());
9267this.hoverable=$(this.hoverable.not(element).get());
9268},
9269_delay:function(handler,delay){
9270function handlerProxy(){
9271return(typeof handler==="string"?instance[handler]:handler)
9272.apply(instance,arguments);
9273}
9274var instance=this;
9275return setTimeout(handlerProxy,delay||0);
9276},
9277_hoverable:function(element){
9278this.hoverable=this.hoverable.add(element);
9279this._on(element,{
9280mouseenter:function(event){
9281this._addClass($(event.currentTarget),null,"ui-state-hover");
9282},
9283mouseleave:function(event){
9284this._removeClass($(event.currentTarget),null,"ui-state-hover");
9285}
9286});
9287},
9288_focusable:function(element){
9289this.focusable=this.focusable.add(element);
9290this._on(element,{
9291focusin:function(event){
9292this._addClass($(event.currentTarget),null,"ui-state-focus");
9293},
9294focusout:function(event){
9295this._removeClass($(event.currentTarget),null,"ui-state-focus");
9296}
9297});
9298},
9299_trigger:function(type,event,data){
9300var prop,orig;
9301var callback=this.options[type];
9302data=data||{};
9303event=$.Event(event);
9304event.type=(type===this.widgetEventPrefix?
9305type:
9306this.widgetEventPrefix+type).toLowerCase();
9307event.target=this.element[0];
9308orig=event.originalEvent;
9309if(orig){
9310for(prop in orig){
9311if(!(prop in event)){
9312event[prop]=orig[prop];
9313}
9314}
9315}
9316this.element.trigger(event,data);
9317return!(typeof callback==="function"&&
9318callback.apply(this.element[0],[event].concat(data))===false||
9319event.isDefaultPrevented());
9320}
9321};
9322$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){
9323$.Widget.prototype["_"+method]=function(element,options,callback){
9324if(typeof options==="string"){
9325options={effect:options};
9326}
9327var hasOptions;
9328var effectName=!options?
9329method:
9330options===true||typeof options==="number"?
9331defaultEffect:
9332options.effect||defaultEffect;
9333options=options||{};
9334if(typeof options==="number"){
9335options={duration:options};
9336}else if(options===true){
9337options={};
9338}
9339hasOptions=!$.isEmptyObject(options);
9340options.complete=callback;
9341if(options.delay){
9342element.delay(options.delay);
9343}
9344if(hasOptions&&$.effects&&$.effects.effect[effectName]){
9345element[method](options);
9346}else if(effectName!==method&&element[effectName]){
9347element[effectName](options.duration,options.easing,callback);
9348}else{
9349element.queue(function(next){
9350$(this)[method]();
9351if(callback){
9352callback.call(element[0]);
9353}
9354next();
9355});
9356}
9357};
9358});
9359var widget=$.widget;
9360(function(){
9361var cachedScrollbarWidth,
9362max=Math.max,
9363abs=Math.abs,
9364rhorizontal=/left|center|right/,
9365rvertical=/top|center|bottom/,
9366roffset=/[\+\-]\d+(\.[\d]+)?%?/,
9367rposition=/^\w+/,
9368rpercent=/%$/,
9369_position=$.fn.position;
9370function getOffsets(offsets,width,height){
9371return[
9372parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),
9373parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)
9374];
9375}
9376function parseCss(element,property){
9377return parseInt($.css(element,property),10)||0;
9378}
9379function isWindow(obj){
9380return obj!=null&&obj===obj.window;
9381}
9382function getDimensions(elem){
9383var raw=elem[0];
9384if(raw.nodeType===9){
9385return{
9386width:elem.width(),
9387height:elem.height(),
9388offset:{top:0,left:0}
9389};
9390}
9391if(isWindow(raw)){
9392return{
9393width:elem.width(),
9394height:elem.height(),
9395offset:{top:elem.scrollTop(),left:elem.scrollLeft()}
9396};
9397}
9398if(raw.preventDefault){
9399return{
9400width:0,
9401height:0,
9402offset:{top:raw.pageY,left:raw.pageX}
9403};
9404}
9405return{
9406width:elem.outerWidth(),
9407height:elem.outerHeight(),
9408offset:elem.offset()
9409};
9410}
9411$.position={
9412scrollbarWidth:function(){
9413if(cachedScrollbarWidth!==undefined){
9414return cachedScrollbarWidth;
9415}
9416var w1,w2,
9417div=$("<div style="+
9418"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>"+
9419"<div style='height:300px;width:auto;'></div></div>"),
9420innerDiv=div.children()[0];
9421$("body").append(div);
9422w1=innerDiv.offsetWidth;
9423div.css("overflow","scroll");
9424w2=innerDiv.offsetWidth;
9425if(w1===w2){
9426w2=div[0].clientWidth;
9427}
9428div.remove();
9429return(cachedScrollbarWidth=w1-w2);
9430},
9431getScrollInfo:function(within){
9432var overflowX=within.isWindow||within.isDocument?"":
9433within.element.css("overflow-x"),
9434overflowY=within.isWindow||within.isDocument?"":
9435within.element.css("overflow-y"),
9436hasOverflowX=overflowX==="scroll"||
9437(overflowX==="auto"&&within.width<within.element[0].scrollWidth),
9438hasOverflowY=overflowY==="scroll"||
9439(overflowY==="auto"&&within.height<within.element[0].scrollHeight);
9440return{
9441width:hasOverflowY?$.position.scrollbarWidth():0,
9442height:hasOverflowX?$.position.scrollbarWidth():0
9443};
9444},
9445getWithinInfo:function(element){
9446var withinElement=$(element||window),
9447isElemWindow=isWindow(withinElement[0]),
9448isDocument=!!withinElement[0]&&withinElement[0].nodeType===9,
9449hasOffset=!isElemWindow&&!isDocument;
9450return{
9451element:withinElement,
9452isWindow:isElemWindow,
9453isDocument:isDocument,
9454offset:hasOffset?$(element).offset():{left:0,top:0},
9455scrollLeft:withinElement.scrollLeft(),
9456scrollTop:withinElement.scrollTop(),
9457width:withinElement.outerWidth(),
9458height:withinElement.outerHeight()
9459};
9460}
9461};
9462$.fn.position=function(options){
9463if(!options||!options.of){
9464return _position.apply(this,arguments);
9465}
9466options=$.extend({},options);
9467var atOffset,targetWidth,targetHeight,targetOffset,basePosition,dimensions,
9468target=typeof options.of==="string"?
9469$(document).find(options.of):
9470$(options.of),
9471within=$.position.getWithinInfo(options.within),
9472scrollInfo=$.position.getScrollInfo(within),
9473collision=(options.collision||"flip").split(" "),
9474offsets={};
9475dimensions=getDimensions(target);
9476if(target[0].preventDefault){
9477options.at="left top";
9478}
9479targetWidth=dimensions.width;
9480targetHeight=dimensions.height;
9481targetOffset=dimensions.offset;
9482basePosition=$.extend({},targetOffset);
9483$.each(["my","at"],function(){
9484var pos=(options[this]||"").split(" "),
9485horizontalOffset,
9486verticalOffset;
9487if(pos.length===1){
9488pos=rhorizontal.test(pos[0])?
9489pos.concat(["center"]):
9490rvertical.test(pos[0])?
9491["center"].concat(pos):
9492["center","center"];
9493}
9494pos[0]=rhorizontal.test(pos[0])?pos[0]:"center";
9495pos[1]=rvertical.test(pos[1])?pos[1]:"center";
9496horizontalOffset=roffset.exec(pos[0]);
9497verticalOffset=roffset.exec(pos[1]);
9498offsets[this]=[
9499horizontalOffset?horizontalOffset[0]:0,
9500verticalOffset?verticalOffset[0]:0
9501];
9502options[this]=[
9503rposition.exec(pos[0])[0],
9504rposition.exec(pos[1])[0]
9505];
9506});
9507if(collision.length===1){
9508collision[1]=collision[0];
9509}
9510if(options.at[0]==="right"){
9511basePosition.left+=targetWidth;
9512}else if(options.at[0]==="center"){
9513basePosition.left+=targetWidth/2;
9514}
9515if(options.at[1]==="bottom"){
9516basePosition.top+=targetHeight;
9517}else if(options.at[1]==="center"){
9518basePosition.top+=targetHeight/2;
9519}
9520atOffset=getOffsets(offsets.at,targetWidth,targetHeight);
9521basePosition.left+=atOffset[0];
9522basePosition.top+=atOffset[1];
9523return this.each(function(){
9524var collisionPosition,using,
9525elem=$(this),
9526elemWidth=elem.outerWidth(),
9527elemHeight=elem.outerHeight(),
9528marginLeft=parseCss(this,"marginLeft"),
9529marginTop=parseCss(this,"marginTop"),
9530collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+
9531scrollInfo.width,
9532collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+
9533scrollInfo.height,
9534position=$.extend({},basePosition),
9535myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());
9536if(options.my[0]==="right"){
9537position.left-=elemWidth;
9538}else if(options.my[0]==="center"){
9539position.left-=elemWidth/2;
9540}
9541if(options.my[1]==="bottom"){
9542position.top-=elemHeight;
9543}else if(options.my[1]==="center"){
9544position.top-=elemHeight/2;
9545}
9546position.left+=myOffset[0];
9547position.top+=myOffset[1];
9548collisionPosition={
9549marginLeft:marginLeft,
9550marginTop:marginTop
9551};
9552$.each(["left","top"],function(i,dir){
9553if($.ui.position[collision[i]]){
9554$.ui.position[collision[i]][dir](position,{
9555targetWidth:targetWidth,
9556targetHeight:targetHeight,
9557elemWidth:elemWidth,
9558elemHeight:elemHeight,
9559collisionPosition:collisionPosition,
9560collisionWidth:collisionWidth,
9561collisionHeight:collisionHeight,
9562offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],
9563my:options.my,
9564at:options.at,
9565within:within,
9566elem:elem
9567});
9568}
9569});
9570if(options.using){
9571using=function(props){
9572var left=targetOffset.left-position.left,
9573right=left+targetWidth-elemWidth,
9574top=targetOffset.top-position.top,
9575bottom=top+targetHeight-elemHeight,
9576feedback={
9577target:{
9578element:target,
9579left:targetOffset.left,
9580top:targetOffset.top,
9581width:targetWidth,
9582height:targetHeight
9583},
9584element:{
9585element:elem,
9586left:position.left,
9587top:position.top,
9588width:elemWidth,
9589height:elemHeight
9590},
9591horizontal:right<0?"left":left>0?"right":"center",
9592vertical:bottom<0?"top":top>0?"bottom":"middle"
9593};
9594if(targetWidth<elemWidth&&abs(left+right)<targetWidth){
9595feedback.horizontal="center";
9596}
9597if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight){
9598feedback.vertical="middle";
9599}
9600if(max(abs(left),abs(right))>max(abs(top),abs(bottom))){
9601feedback.important="horizontal";
9602}else{
9603feedback.important="vertical";
9604}
9605options.using.call(this,props,feedback);
9606};
9607}
9608elem.offset($.extend(position,{using:using}));
9609});
9610};
9611$.ui.position={
9612fit:{
9613left:function(position,data){
9614var within=data.within,
9615withinOffset=within.isWindow?within.scrollLeft:within.offset.left,
9616outerWidth=within.width,
9617collisionPosLeft=position.left-data.collisionPosition.marginLeft,
9618overLeft=withinOffset-collisionPosLeft,
9619overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset,
9620newOverRight;
9621if(data.collisionWidth>outerWidth){
9622if(overLeft>0&&overRight<=0){
9623newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-
9624withinOffset;
9625position.left+=overLeft-newOverRight;
9626}else if(overRight>0&&overLeft<=0){
9627position.left=withinOffset;
9628}else{
9629if(overLeft>overRight){
9630position.left=withinOffset+outerWidth-data.collisionWidth;
9631}else{
9632position.left=withinOffset;
9633}
9634}
9635}else if(overLeft>0){
9636position.left+=overLeft;
9637}else if(overRight>0){
9638position.left-=overRight;
9639}else{
9640position.left=max(position.left-collisionPosLeft,position.left);
9641}
9642},
9643top:function(position,data){
9644var within=data.within,
9645withinOffset=within.isWindow?within.scrollTop:within.offset.top,
9646outerHeight=data.within.height,
9647collisionPosTop=position.top-data.collisionPosition.marginTop,
9648overTop=withinOffset-collisionPosTop,
9649overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset,
9650newOverBottom;
9651if(data.collisionHeight>outerHeight){
9652if(overTop>0&&overBottom<=0){
9653newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-
9654withinOffset;
9655position.top+=overTop-newOverBottom;
9656}else if(overBottom>0&&overTop<=0){
9657position.top=withinOffset;
9658}else{
9659if(overTop>overBottom){
9660position.top=withinOffset+outerHeight-data.collisionHeight;
9661}else{
9662position.top=withinOffset;
9663}
9664}
9665}else if(overTop>0){
9666position.top+=overTop;
9667}else if(overBottom>0){
9668position.top-=overBottom;
9669}else{
9670position.top=max(position.top-collisionPosTop,position.top);
9671}
9672}
9673},
9674flip:{
9675left:function(position,data){
9676var within=data.within,
9677withinOffset=within.offset.left+within.scrollLeft,
9678outerWidth=within.width,
9679offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,
9680collisionPosLeft=position.left-data.collisionPosition.marginLeft,
9681overLeft=collisionPosLeft-offsetLeft,
9682overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,
9683myOffset=data.my[0]==="left"?
9684-data.elemWidth:
9685data.my[0]==="right"?
9686data.elemWidth:
96870,
9688atOffset=data.at[0]==="left"?
9689data.targetWidth:
9690data.at[0]==="right"?
9691-data.targetWidth:
96920,
9693offset=-2*data.offset[0],
9694newOverRight,
9695newOverLeft;
9696if(overLeft<0){
9697newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-
9698outerWidth-withinOffset;
9699if(newOverRight<0||newOverRight<abs(overLeft)){
9700position.left+=myOffset+atOffset+offset;
9701}
9702}else if(overRight>0){
9703newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+
9704atOffset+offset-offsetLeft;
9705if(newOverLeft>0||abs(newOverLeft)<overRight){
9706position.left+=myOffset+atOffset+offset;
9707}
9708}
9709},
9710top:function(position,data){
9711var within=data.within,
9712withinOffset=within.offset.top+within.scrollTop,
9713outerHeight=within.height,
9714offsetTop=within.isWindow?within.scrollTop:within.offset.top,
9715collisionPosTop=position.top-data.collisionPosition.marginTop,
9716overTop=collisionPosTop-offsetTop,
9717overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop,
9718top=data.my[1]==="top",
9719myOffset=top?
9720-data.elemHeight:
9721data.my[1]==="bottom"?
9722data.elemHeight:
97230,
9724atOffset=data.at[1]==="top"?
9725data.targetHeight:
9726data.at[1]==="bottom"?
9727-data.targetHeight:
97280,
9729offset=-2*data.offset[1],
9730newOverTop,
9731newOverBottom;
9732if(overTop<0){
9733newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-
9734outerHeight-withinOffset;
9735if(newOverBottom<0||newOverBottom<abs(overTop)){
9736position.top+=myOffset+atOffset+offset;
9737}
9738}else if(overBottom>0){
9739newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+
9740offset-offsetTop;
9741if(newOverTop>0||abs(newOverTop)<overBottom){
9742position.top+=myOffset+atOffset+offset;
9743}
9744}
9745}
9746},
9747flipfit:{
9748left:function(){
9749$.ui.position.flip.left.apply(this,arguments);
9750$.ui.position.fit.left.apply(this,arguments);
9751},
9752top:function(){
9753$.ui.position.flip.top.apply(this,arguments);
9754$.ui.position.fit.top.apply(this,arguments);
9755}
9756}
9757};
9758})();
9759var position=$.ui.position;
9760var data=$.extend($.expr.pseudos,{
9761data:$.expr.createPseudo(function(dataName){
9762return function(elem){
9763return!!$.data(elem,dataName);
9764};
9765})
9766});
9767var disableSelection=$.fn.extend({
9768disableSelection:(function(){
9769var eventType="onselectstart"in document.createElement("div")?
9770"selectstart":
9771"mousedown";
9772return function(){
9773return this.on(eventType+".ui-disableSelection",function(event){
9774event.preventDefault();
9775});
9776};
9777})(),
9778enableSelection:function(){
9779return this.off(".ui-disableSelection");
9780}
9781});
9782var jQuery=$;
9783var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor "+
9784"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
9785class2type={},
9786toString=class2type.toString,
9787rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,
9788stringParsers=[{
9789re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
9790parse:function(execResult){
9791return[
9792execResult[1],
9793execResult[2],
9794execResult[3],
9795execResult[4]
9796];
9797}
9798},{
9799re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
9800parse:function(execResult){
9801return[
9802execResult[1]*2.55,
9803execResult[2]*2.55,
9804execResult[3]*2.55,
9805execResult[4]
9806];
9807}
9808},{
9809re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
9810parse:function(execResult){
9811return[
9812parseInt(execResult[1],16),
9813parseInt(execResult[2],16),
9814parseInt(execResult[3],16),
9815execResult[4]?
9816(parseInt(execResult[4],16)/255).toFixed(2):
98171
9818];
9819}
9820},{
9821re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
9822parse:function(execResult){
9823return[
9824parseInt(execResult[1]+execResult[1],16),
9825parseInt(execResult[2]+execResult[2],16),
9826parseInt(execResult[3]+execResult[3],16),
9827execResult[4]?
9828(parseInt(execResult[4]+execResult[4],16)/255)
9829.toFixed(2):
98301
9831];
9832}
9833},{
9834re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
9835space:"hsla",
9836parse:function(execResult){
9837return[
9838execResult[1],
9839execResult[2]/100,
9840execResult[3]/100,
9841execResult[4]
9842];
9843}
9844}],
9845color=jQuery.Color=function(color,green,blue,alpha){
9846return new jQuery.Color.fn.parse(color,green,blue,alpha);
9847},
9848spaces={
9849rgba:{
9850props:{
9851red:{
9852idx:0,
9853type:"byte"
9854},
9855green:{
9856idx:1,
9857type:"byte"
9858},
9859blue:{
9860idx:2,
9861type:"byte"
9862}
9863}
9864},
9865hsla:{
9866props:{
9867hue:{
9868idx:0,
9869type:"degrees"
9870},
9871saturation:{
9872idx:1,
9873type:"percent"
9874},
9875lightness:{
9876idx:2,
9877type:"percent"
9878}
9879}
9880}
9881},
9882propTypes={
9883"byte":{
9884floor:true,
9885max:255
9886},
9887"percent":{
9888max:1
9889},
9890"degrees":{
9891mod:360,
9892floor:true
9893}
9894},
9895colors,
9896each=jQuery.each;
9897each(spaces,function(spaceName,space){
9898space.cache="_"+spaceName;
9899space.props.alpha={
9900idx:3,
9901type:"percent",
9902def:1
9903};
9904});
9905jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
9906function(_i,name){
9907class2type["[object "+name+"]"]=name.toLowerCase();
9908});
9909function getType(obj){
9910if(obj==null){
9911return obj+"";
9912}
9913return typeof obj==="object"?
9914class2type[toString.call(obj)]||"object":
9915typeof obj;
9916}
9917function clamp(value,prop,allowEmpty){
9918var type=propTypes[prop.type]||{};
9919if(value==null){
9920return(allowEmpty||!prop.def)?null:prop.def;
9921}
9922value=type.floor?~~value:parseFloat(value);
9923if(type.mod){
9924return(value+type.mod)%type.mod;
9925}
9926return Math.min(type.max,Math.max(0,value));
9927}
9928function stringParse(string){
9929var inst=color(),
9930rgba=inst._rgba=[];
9931string=string.toLowerCase();
9932each(stringParsers,function(_i,parser){
9933var parsed,
9934match=parser.re.exec(string),
9935values=match&&parser.parse(match),
9936spaceName=parser.space||"rgba";
9937if(values){
9938parsed=inst[spaceName](values);
9939inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache];
9940rgba=inst._rgba=parsed._rgba;
9941return false;
9942}
9943});
9944if(rgba.length){
9945if(rgba.join()==="0,0,0,0"){
9946jQuery.extend(rgba,colors.transparent);
9947}
9948return inst;
9949}
9950return colors[string];
9951}
9952color.fn=jQuery.extend(color.prototype,{
9953parse:function(red,green,blue,alpha){
9954if(red===undefined){
9955this._rgba=[null,null,null,null];
9956return this;
9957}
9958if(red.jquery||red.nodeType){
9959red=jQuery(red).css(green);
9960green=undefined;
9961}
9962var inst=this,
9963type=getType(red),
9964rgba=this._rgba=[];
9965if(green!==undefined){
9966red=[red,green,blue,alpha];
9967type="array";
9968}
9969if(type==="string"){
9970return this.parse(stringParse(red)||colors._default);
9971}
9972if(type==="array"){
9973each(spaces.rgba.props,function(_key,prop){
9974rgba[prop.idx]=clamp(red[prop.idx],prop);
9975});
9976return this;
9977}
9978if(type==="object"){
9979if(red instanceof color){
9980each(spaces,function(_spaceName,space){
9981if(red[space.cache]){
9982inst[space.cache]=red[space.cache].slice();
9983}
9984});
9985}else{
9986each(spaces,function(_spaceName,space){
9987var cache=space.cache;
9988each(space.props,function(key,prop){
9989if(!inst[cache]&&space.to){
9990if(key==="alpha"||red[key]==null){
9991return;
9992}
9993inst[cache]=space.to(inst._rgba);
9994}
9995inst[cache][prop.idx]=clamp(red[key],prop,true);
9996});
9997if(inst[cache]&&jQuery.inArray(
9998null,
9999inst[cache].slice(0,3)
10000)<0){
10001if(inst[cache][3]==null){
10002inst[cache][3]=1;
10003}
10004if(space.from){
10005inst._rgba=space.from(inst[cache]);
10006}
10007}
10008});
10009}
10010return this;
10011}
10012},
10013is:function(compare){
10014var is=color(compare),
10015same=true,
10016inst=this;
10017each(spaces,function(_,space){
10018var localCache,
10019isCache=is[space.cache];
10020if(isCache){
10021localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[];
10022each(space.props,function(_,prop){
10023if(isCache[prop.idx]!=null){
10024same=(isCache[prop.idx]===localCache[prop.idx]);
10025return same;
10026}
10027});
10028}
10029return same;
10030});
10031return same;
10032},
10033_space:function(){
10034var used=[],
10035inst=this;
10036each(spaces,function(spaceName,space){
10037if(inst[space.cache]){
10038used.push(spaceName);
10039}
10040});
10041return used.pop();
10042},
10043transition:function(other,distance){
10044var end=color(other),
10045spaceName=end._space(),
10046space=spaces[spaceName],
10047startColor=this.alpha()===0?color("transparent"):this,
10048start=startColor[space.cache]||space.to(startColor._rgba),
10049result=start.slice();
10050end=end[space.cache];
10051each(space.props,function(_key,prop){
10052var index=prop.idx,
10053startValue=start[index],
10054endValue=end[index],
10055type=propTypes[prop.type]||{};
10056if(endValue===null){
10057return;
10058}
10059if(startValue===null){
10060result[index]=endValue;
10061}else{
10062if(type.mod){
10063if(endValue-startValue>type.mod/2){
10064startValue+=type.mod;
10065}else if(startValue-endValue>type.mod/2){
10066startValue-=type.mod;
10067}
10068}
10069result[index]=clamp((endValue-startValue)*distance+startValue,prop);
10070}
10071});
10072return this[spaceName](result);
10073},
10074blend:function(opaque){
10075if(this._rgba[3]===1){
10076return this;
10077}
10078var rgb=this._rgba.slice(),
10079a=rgb.pop(),
10080blend=color(opaque)._rgba;
10081return color(jQuery.map(rgb,function(v,i){
10082return(1-a)*blend[i]+a*v;
10083}));
10084},
10085toRgbaString:function(){
10086var prefix="rgba(",
10087rgba=jQuery.map(this._rgba,function(v,i){
10088if(v!=null){
10089return v;
10090}
10091return i>2?1:0;
10092});
10093if(rgba[3]===1){
10094rgba.pop();
10095prefix="rgb(";
10096}
10097return prefix+rgba.join(", ")+")";
10098},
10099toHslaString:function(){
10100var prefix="hsla(",
10101hsla=jQuery.map(this.hsla(),function(v,i){
10102if(v==null){
10103v=i>2?1:0;
10104}
10105if(i&&i<3){
10106v=Math.round(v*100)+"%";
10107}
10108return v;
10109});
10110if(hsla[3]===1){
10111hsla.pop();
10112prefix="hsl(";
10113}
10114return prefix+hsla.join(", ")+")";
10115},
10116toHexString:function(includeAlpha){
10117var rgba=this._rgba.slice(),
10118alpha=rgba.pop();
10119if(includeAlpha){
10120rgba.push(~~(alpha*255));
10121}
10122return"#"+jQuery.map(rgba,function(v){
10123return("0"+(v||0).toString(16)).substr(-2);
10124}).join("");
10125},
10126toString:function(){
10127return this.toRgbaString();
10128}
10129});
10130color.fn.parse.prototype=color.fn;
10131function hue2rgb(p,q,h){
10132h=(h+1)%1;
10133if(h*6<1){
10134return p+(q-p)*h*6;
10135}
10136if(h*2<1){
10137return q;
10138}
10139if(h*3<2){
10140return p+(q-p)*((2/3)-h)*6;
10141}
10142return p;
10143}
10144spaces.hsla.to=function(rgba){
10145if(rgba[0]==null||rgba[1]==null||rgba[2]==null){
10146return[null,null,null,rgba[3]];
10147}
10148var r=rgba[0]/255,
10149g=rgba[1]/255,
10150b=rgba[2]/255,
10151a=rgba[3],
10152max=Math.max(r,g,b),
10153min=Math.min(r,g,b),
10154diff=max-min,
10155add=max+min,
10156l=add*0.5,
10157h,s;
10158if(min===max){
10159h=0;
10160}else if(r===max){
10161h=(60*(g-b)/diff)+360;
10162}else if(g===max){
10163h=(60*(b-r)/diff)+120;
10164}else{
10165h=(60*(r-g)/diff)+240;
10166}
10167if(diff===0){
10168s=0;
10169}else if(l<=0.5){
10170s=diff/add;
10171}else{
10172s=diff/(2-add);
10173}
10174return[Math.round(h)%360,s,l,a==null?1:a];
10175};
10176spaces.hsla.from=function(hsla){
10177if(hsla[0]==null||hsla[1]==null||hsla[2]==null){
10178return[null,null,null,hsla[3]];
10179}
10180var h=hsla[0]/360,
10181s=hsla[1],
10182l=hsla[2],
10183a=hsla[3],
10184q=l<=0.5?l*(1+s):l+s-l*s,
10185p=2*l-q;
10186return[
10187Math.round(hue2rgb(p,q,h+(1/3))*255),
10188Math.round(hue2rgb(p,q,h)*255),
10189Math.round(hue2rgb(p,q,h-(1/3))*255),
10190a
10191];
10192};
10193each(spaces,function(spaceName,space){
10194var props=space.props,
10195cache=space.cache,
10196to=space.to,
10197from=space.from;
10198color.fn[spaceName]=function(value){
10199if(to&&!this[cache]){
10200this[cache]=to(this._rgba);
10201}
10202if(value===undefined){
10203return this[cache].slice();
10204}
10205var ret,
10206type=getType(value),
10207arr=(type==="array"||type==="object")?value:arguments,
10208local=this[cache].slice();
10209each(props,function(key,prop){
10210var val=arr[type==="object"?key:prop.idx];
10211if(val==null){
10212val=local[prop.idx];
10213}
10214local[prop.idx]=clamp(val,prop);
10215});
10216if(from){
10217ret=color(from(local));
10218ret[cache]=local;
10219return ret;
10220}else{
10221return color(local);
10222}
10223};
10224each(props,function(key,prop){
10225if(color.fn[key]){
10226return;
10227}
10228color.fn[key]=function(value){
10229var local,cur,match,fn,
10230vtype=getType(value);
10231if(key==="alpha"){
10232fn=this._hsla?"hsla":"rgba";
10233}else{
10234fn=spaceName;
10235}
10236local=this[fn]();
10237cur=local[prop.idx];
10238if(vtype==="undefined"){
10239return cur;
10240}
10241if(vtype==="function"){
10242value=value.call(this,cur);
10243vtype=getType(value);
10244}
10245if(value==null&&prop.empty){
10246return this;
10247}
10248if(vtype==="string"){
10249match=rplusequals.exec(value);
10250if(match){
10251value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1);
10252}
10253}
10254local[prop.idx]=value;
10255return this[fn](local);
10256};
10257});
10258});
10259color.hook=function(hook){
10260var hooks=hook.split(" ");
10261each(hooks,function(_i,hook){
10262jQuery.cssHooks[hook]={
10263set:function(elem,value){
10264var parsed;
10265if(value!=="transparent"&&
10266(getType(value)!=="string"||
10267(parsed=stringParse(value)))){
10268value=color(parsed||value);
10269value=value.toRgbaString();
10270}
10271elem.style[hook]=value;
10272}
10273};
10274jQuery.fx.step[hook]=function(fx){
10275if(!fx.colorInit){
10276fx.start=color(fx.elem,hook);
10277fx.end=color(fx.end);
10278fx.colorInit=true;
10279}
10280jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos));
10281};
10282});
10283};
10284color.hook(stepHooks);
10285jQuery.cssHooks.borderColor={
10286expand:function(value){
10287var expanded={};
10288each(["Top","Right","Bottom","Left"],function(_i,part){
10289expanded["border"+part+"Color"]=value;
10290});
10291return expanded;
10292}
10293};
10294colors=jQuery.Color.names={
10295aqua:"#00ffff",
10296black:"#000000",
10297blue:"#0000ff",
10298fuchsia:"#ff00ff",
10299gray:"#808080",
10300green:"#008000",
10301lime:"#00ff00",
10302maroon:"#800000",
10303navy:"#000080",
10304olive:"#808000",
10305purple:"#800080",
10306red:"#ff0000",
10307silver:"#c0c0c0",
10308teal:"#008080",
10309white:"#ffffff",
10310yellow:"#ffff00",
10311transparent:[null,null,null,0],
10312_default:"#ffffff"
10313};
10314var dataSpace="ui-effects-",
10315dataSpaceStyle="ui-effects-style",
10316dataSpaceAnimated="ui-effects-animated";
10317$.effects={
10318effect:{}
10319};
10320(function(){
10321var classAnimationActions=["add","remove","toggle"],
10322shorthandStyles={
10323border:1,
10324borderBottom:1,
10325borderColor:1,
10326borderLeft:1,
10327borderRight:1,
10328borderTop:1,
10329borderWidth:1,
10330margin:1,
10331padding:1
10332};
10333$.each(
10334["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],
10335function(_,prop){
10336$.fx.step[prop]=function(fx){
10337if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){
10338jQuery.style(fx.elem,prop,fx.end);
10339fx.setAttr=true;
10340}
10341};
10342}
10343);
10344function camelCase(string){
10345return string.replace(/-([\da-z])/gi,function(all,letter){
10346return letter.toUpperCase();
10347});
10348}
10349function getElementStyles(elem){
10350var key,len,
10351style=elem.ownerDocument.defaultView.getComputedStyle(elem),
10352styles={};
10353len=style.length;
10354while(len--){
10355key=style[len];
10356if(typeof style[key]==="string"){
10357styles[camelCase(key)]=style[key];
10358}
10359}
10360return styles;
10361}
10362function styleDifference(oldStyle,newStyle){
10363var diff={},
10364name,value;
10365for(name in newStyle){
10366value=newStyle[name];
10367if(oldStyle[name]!==value){
10368if(!shorthandStyles[name]){
10369if($.fx.step[name]||!isNaN(parseFloat(value))){
10370diff[name]=value;
10371}
10372}
10373}
10374}
10375return diff;
10376}
10377$.effects.animateClass=function(value,duration,easing,callback){
10378var o=$.speed(duration,easing,callback);
10379return this.queue(function(){
10380var animated=$(this),
10381baseClass=animated.attr("class")||"",
10382applyClassChange,
10383allAnimations=o.children?animated.find("*").addBack():animated;
10384allAnimations=allAnimations.map(function(){
10385var el=$(this);
10386return{
10387el:el,
10388start:getElementStyles(this)
10389};
10390});
10391applyClassChange=function(){
10392$.each(classAnimationActions,function(i,action){
10393if(value[action]){
10394animated[action+"Class"](value[action]);
10395}
10396});
10397};
10398applyClassChange();
10399allAnimations=allAnimations.map(function(){
10400this.end=getElementStyles(this.el[0]);
10401this.diff=styleDifference(this.start,this.end);
10402return this;
10403});
10404animated.attr("class",baseClass);
10405allAnimations=allAnimations.map(function(){
10406var styleInfo=this,
10407dfd=$.Deferred(),
10408opts=$.extend({},o,{
10409queue:false,
10410complete:function(){
10411dfd.resolve(styleInfo);
10412}
10413});
10414this.el.animate(this.diff,opts);
10415return dfd.promise();
10416});
10417$.when.apply($,allAnimations.get()).done(function(){
10418applyClassChange();
10419$.each(arguments,function(){
10420var el=this.el;
10421$.each(this.diff,function(key){
10422el.css(key,"");
10423});
10424});
10425o.complete.call(animated[0]);
10426});
10427});
10428};
10429$.fn.extend({
10430addClass:(function(orig){
10431return function(classNames,speed,easing,callback){
10432return speed?
10433$.effects.animateClass.call(this,
10434{add:classNames},speed,easing,callback):
10435orig.apply(this,arguments);
10436};
10437})($.fn.addClass),
10438removeClass:(function(orig){
10439return function(classNames,speed,easing,callback){
10440return arguments.length>1?
10441$.effects.animateClass.call(this,
10442{remove:classNames},speed,easing,callback):
10443orig.apply(this,arguments);
10444};
10445})($.fn.removeClass),
10446toggleClass:(function(orig){
10447return function(classNames,force,speed,easing,callback){
10448if(typeof force==="boolean"||force===undefined){
10449if(!speed){
10450return orig.apply(this,arguments);
10451}else{
10452return $.effects.animateClass.call(this,
10453(force?{add:classNames}:{remove:classNames}),
10454speed,easing,callback);
10455}
10456}else{
10457return $.effects.animateClass.call(this,
10458{toggle:classNames},force,speed,easing);
10459}
10460};
10461})($.fn.toggleClass),
10462switchClass:function(remove,add,speed,easing,callback){
10463return $.effects.animateClass.call(this,{
10464add:add,
10465remove:remove
10466},speed,easing,callback);
10467}
10468});
10469})();
10470(function(){
10471if($.expr&&$.expr.pseudos&&$.expr.pseudos.animated){
10472$.expr.pseudos.animated=(function(orig){
10473return function(elem){
10474return!!$(elem).data(dataSpaceAnimated)||orig(elem);
10475};
10476})($.expr.pseudos.animated);
10477}
10478if($.uiBackCompat===true){
10479$.extend($.effects,{
10480save:function(element,set){
10481var i=0,length=set.length;
10482for(;i<length;i++){
10483if(set[i]!==null){
10484element.data(dataSpace+set[i],element[0].style[set[i]]);
10485}
10486}
10487},
10488restore:function(element,set){
10489var val,i=0,length=set.length;
10490for(;i<length;i++){
10491if(set[i]!==null){
10492val=element.data(dataSpace+set[i]);
10493element.css(set[i],val);
10494}
10495}
10496},
10497setMode:function(el,mode){
10498if(mode==="toggle"){
10499mode=el.is(":hidden")?"show":"hide";
10500}
10501return mode;
10502},
10503createWrapper:function(element){
10504if(element.parent().is(".ui-effects-wrapper")){
10505return element.parent();
10506}
10507var props={
10508width:element.outerWidth(true),
10509height:element.outerHeight(true),
10510"float":element.css("float")
10511},
10512wrapper=$("<div></div>")
10513.addClass("ui-effects-wrapper")
10514.css({
10515fontSize:"100%",
10516background:"transparent",
10517border:"none",
10518margin:0,
10519padding:0
10520}),
10521size={
10522width:element.width(),
10523height:element.height()
10524},
10525active=document.activeElement;
10526try{
10527active.id;
10528}catch(e){
10529active=document.body;
10530}
10531element.wrap(wrapper);
10532if(element[0]===active||$.contains(element[0],active)){
10533$(active).trigger("focus");
10534}
10535wrapper=element.parent();
10536if(element.css("position")==="static"){
10537wrapper.css({position:"relative"});
10538element.css({position:"relative"});
10539}else{
10540$.extend(props,{
10541position:element.css("position"),
10542zIndex:element.css("z-index")
10543});
10544$.each(["top","left","bottom","right"],function(i,pos){
10545props[pos]=element.css(pos);
10546if(isNaN(parseInt(props[pos],10))){
10547props[pos]="auto";
10548}
10549});
10550element.css({
10551position:"relative",
10552top:0,
10553left:0,
10554right:"auto",
10555bottom:"auto"
10556});
10557}
10558element.css(size);
10559return wrapper.css(props).show();
10560},
10561removeWrapper:function(element){
10562var active=document.activeElement;
10563if(element.parent().is(".ui-effects-wrapper")){
10564element.parent().replaceWith(element);
10565if(element[0]===active||$.contains(element[0],active)){
10566$(active).trigger("focus");
10567}
10568}
10569return element;
10570}
10571});
10572}
10573$.extend($.effects,{
10574version:"1.14.1",
10575define:function(name,mode,effect){
10576if(!effect){
10577effect=mode;
10578mode="effect";
10579}
10580$.effects.effect[name]=effect;
10581$.effects.effect[name].mode=mode;
10582return effect;
10583},
10584scaledDimensions:function(element,percent,direction){
10585if(percent===0){
10586return{
10587height:0,
10588width:0,
10589outerHeight:0,
10590outerWidth:0
10591};
10592}
10593var x=direction!=="horizontal"?((percent||100)/100):1,
10594y=direction!=="vertical"?((percent||100)/100):1;
10595return{
10596height:element.height()*y,
10597width:element.width()*x,
10598outerHeight:element.outerHeight()*y,
10599outerWidth:element.outerWidth()*x
10600};
10601},
10602clipToBox:function(animation){
10603return{
10604width:animation.clip.right-animation.clip.left,
10605height:animation.clip.bottom-animation.clip.top,
10606left:animation.clip.left,
10607top:animation.clip.top
10608};
10609},
10610unshift:function(element,queueLength,count){
10611var queue=element.queue();
10612if(queueLength>1){
10613queue.splice.apply(queue,
10614[1,0].concat(queue.splice(queueLength,count)));
10615}
10616element.dequeue();
10617},
10618saveStyle:function(element){
10619element.data(dataSpaceStyle,element[0].style.cssText);
10620},
10621restoreStyle:function(element){
10622element[0].style.cssText=element.data(dataSpaceStyle)||"";
10623element.removeData(dataSpaceStyle);
10624},
10625mode:function(element,mode){
10626var hidden=element.is(":hidden");
10627if(mode==="toggle"){
10628mode=hidden?"show":"hide";
10629}
10630if(hidden?mode==="hide":mode==="show"){
10631mode="none";
10632}
10633return mode;
10634},
10635getBaseline:function(origin,original){
10636var y,x;
10637switch(origin[0]){
10638case"top":
10639y=0;
10640break;
10641case"middle":
10642y=0.5;
10643break;
10644case"bottom":
10645y=1;
10646break;
10647default:
10648y=origin[0]/original.height;
10649}
10650switch(origin[1]){
10651case"left":
10652x=0;
10653break;
10654case"center":
10655x=0.5;
10656break;
10657case"right":
10658x=1;
10659break;
10660default:
10661x=origin[1]/original.width;
10662}
10663return{
10664x:x,
10665y:y
10666};
10667},
10668createPlaceholder:function(element){
10669var placeholder,
10670cssPosition=element.css("position"),
10671position=element.position();
10672element.css({
10673marginTop:element.css("marginTop"),
10674marginBottom:element.css("marginBottom"),
10675marginLeft:element.css("marginLeft"),
10676marginRight:element.css("marginRight")
10677})
10678.outerWidth(element.outerWidth())
10679.outerHeight(element.outerHeight());
10680if(/^(static|relative)/.test(cssPosition)){
10681cssPosition="absolute";
10682placeholder=$("<"+element[0].nodeName+">").insertAfter(element).css({
10683display:/^(inline|ruby)/.test(element.css("display"))?
10684"inline-block":
10685"block",
10686visibility:"hidden",
10687marginTop:element.css("marginTop"),
10688marginBottom:element.css("marginBottom"),
10689marginLeft:element.css("marginLeft"),
10690marginRight:element.css("marginRight"),
10691"float":element.css("float")
10692})
10693.outerWidth(element.outerWidth())
10694.outerHeight(element.outerHeight())
10695.addClass("ui-effects-placeholder");
10696element.data(dataSpace+"placeholder",placeholder);
10697}
10698element.css({
10699position:cssPosition,
10700left:position.left,
10701top:position.top
10702});
10703return placeholder;
10704},
10705removePlaceholder:function(element){
10706var dataKey=dataSpace+"placeholder",
10707placeholder=element.data(dataKey);
10708if(placeholder){
10709placeholder.remove();
10710element.removeData(dataKey);
10711}
10712},
10713cleanUp:function(element){
10714$.effects.restoreStyle(element);
10715$.effects.removePlaceholder(element);
10716},
10717setTransition:function(element,list,factor,value){
10718value=value||{};
10719$.each(list,function(i,x){
10720var unit=element.cssUnit(x);
10721if(unit[0]>0){
10722value[x]=unit[0]*factor+unit[1];
10723}
10724});
10725return value;
10726}
10727});
10728function _normalizeArguments(effect,options,speed,callback){
10729if($.isPlainObject(effect)){
10730options=effect;
10731effect=effect.effect;
10732}
10733effect={effect:effect};
10734if(options==null){
10735options={};
10736}
10737if(typeof options==="function"){
10738callback=options;
10739speed=null;
10740options={};
10741}
10742if(typeof options==="number"||$.fx.speeds[options]){
10743callback=speed;
10744speed=options;
10745options={};
10746}
10747if(typeof speed==="function"){
10748callback=speed;
10749speed=null;
10750}
10751if(options){
10752$.extend(effect,options);
10753}
10754speed=speed||options.duration;
10755effect.duration=$.fx.off?0:
10756typeof speed==="number"?speed:
10757speed in $.fx.speeds?$.fx.speeds[speed]:
10758$.fx.speeds._default;
10759effect.complete=callback||options.complete;
10760return effect;
10761}
10762function standardAnimationOption(option){
10763if(!option||typeof option==="number"||$.fx.speeds[option]){
10764return true;
10765}
10766if(typeof option==="string"&&!$.effects.effect[option]){
10767return true;
10768}
10769if(typeof option==="function"){
10770return true;
10771}
10772if(typeof option==="object"&&!option.effect){
10773return true;
10774}
10775return false;
10776}
10777$.fn.extend({
10778effect:function(){
10779var args=_normalizeArguments.apply(this,arguments),
10780effectMethod=$.effects.effect[args.effect],
10781defaultMode=effectMethod.mode,
10782queue=args.queue,
10783queueName=queue||"fx",
10784complete=args.complete,
10785mode=args.mode,
10786modes=[],
10787prefilter=function(next){
10788var el=$(this),
10789normalizedMode=$.effects.mode(el,mode)||defaultMode;
10790el.data(dataSpaceAnimated,true);
10791modes.push(normalizedMode);
10792if(defaultMode&&(normalizedMode==="show"||
10793(normalizedMode===defaultMode&&normalizedMode==="hide"))){
10794el.show();
10795}
10796if(!defaultMode||normalizedMode!=="none"){
10797$.effects.saveStyle(el);
10798}
10799if(typeof next==="function"){
10800next();
10801}
10802};
10803if($.fx.off||!effectMethod){
10804if(mode){
10805return this[mode](args.duration,complete);
10806}else{
10807return this.each(function(){
10808if(complete){
10809complete.call(this);
10810}
10811});
10812}
10813}
10814function run(next){
10815var elem=$(this);
10816function cleanup(){
10817elem.removeData(dataSpaceAnimated);
10818$.effects.cleanUp(elem);
10819if(args.mode==="hide"){
10820elem.hide();
10821}
10822done();
10823}
10824function done(){
10825if(typeof complete==="function"){
10826complete.call(elem[0]);
10827}
10828if(typeof next==="function"){
10829next();
10830}
10831}
10832args.mode=modes.shift();
10833if($.uiBackCompat===true&&!defaultMode){
10834if(elem.is(":hidden")?mode==="hide":mode==="show"){
10835elem[mode]();
10836done();
10837}else{
10838effectMethod.call(elem[0],args,done);
10839}
10840}else{
10841if(args.mode==="none"){
10842elem[mode]();
10843done();
10844}else{
10845effectMethod.call(elem[0],args,cleanup);
10846}
10847}
10848}
10849return queue===false?
10850this.each(prefilter).each(run):
10851this.queue(queueName,prefilter).queue(queueName,run);
10852},
10853show:(function(orig){
10854return function(option){
10855if(standardAnimationOption(option)){
10856return orig.apply(this,arguments);
10857}else{
10858var args=_normalizeArguments.apply(this,arguments);
10859args.mode="show";
10860return this.effect.call(this,args);
10861}
10862};
10863})($.fn.show),
10864hide:(function(orig){
10865return function(option){
10866if(standardAnimationOption(option)){
10867return orig.apply(this,arguments);
10868}else{
10869var args=_normalizeArguments.apply(this,arguments);
10870args.mode="hide";
10871return this.effect.call(this,args);
10872}
10873};
10874})($.fn.hide),
10875toggle:(function(orig){
10876return function(option){
10877if(standardAnimationOption(option)||typeof option==="boolean"){
10878return orig.apply(this,arguments);
10879}else{
10880var args=_normalizeArguments.apply(this,arguments);
10881args.mode="toggle";
10882return this.effect.call(this,args);
10883}
10884};
10885})($.fn.toggle),
10886cssUnit:function(key){
10887var style=this.css(key),
10888val=[];
10889$.each(["em","px","%","pt"],function(i,unit){
10890if(style.indexOf(unit)>0){
10891val=[parseFloat(style),unit];
10892}
10893});
10894return val;
10895},
10896cssClip:function(clipObj){
10897if(clipObj){
10898return this.css("clip","rect("+clipObj.top+"px "+clipObj.right+"px "+
10899clipObj.bottom+"px "+clipObj.left+"px)");
10900}
10901return parseClip(this.css("clip"),this);
10902},
10903transfer:function(options,done){
10904var element=$(this),
10905target=$(options.to),
10906targetFixed=target.css("position")==="fixed",
10907body=$("body"),
10908fixTop=targetFixed?body.scrollTop():0,
10909fixLeft=targetFixed?body.scrollLeft():0,
10910endPosition=target.offset(),
10911animation={
10912top:endPosition.top-fixTop,
10913left:endPosition.left-fixLeft,
10914height:target.innerHeight(),
10915width:target.innerWidth()
10916},
10917startPosition=element.offset(),
10918transfer=$("<div class='ui-effects-transfer'></div>");
10919transfer
10920.appendTo("body")
10921.addClass(options.className)
10922.css({
10923top:startPosition.top-fixTop,
10924left:startPosition.left-fixLeft,
10925height:element.innerHeight(),
10926width:element.innerWidth(),
10927position:targetFixed?"fixed":"absolute"
10928})
10929.animate(animation,options.duration,options.easing,function(){
10930transfer.remove();
10931if(typeof done==="function"){
10932done();
10933}
10934});
10935}
10936});
10937function parseClip(str,element){
10938var outerWidth=element.outerWidth(),
10939outerHeight=element.outerHeight(),
10940clipRegex=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
10941values=clipRegex.exec(str)||["",0,outerWidth,outerHeight,0];
10942return{
10943top:parseFloat(values[1])||0,
10944right:values[2]==="auto"?outerWidth:parseFloat(values[2]),
10945bottom:values[3]==="auto"?outerHeight:parseFloat(values[3]),
10946left:parseFloat(values[4])||0
10947};
10948}
10949$.fx.step.clip=function(fx){
10950if(!fx.clipInit){
10951fx.start=$(fx.elem).cssClip();
10952if(typeof fx.end==="string"){
10953fx.end=parseClip(fx.end,fx.elem);
10954}
10955fx.clipInit=true;
10956}
10957$(fx.elem).cssClip({
10958top:fx.pos*(fx.end.top-fx.start.top)+fx.start.top,
10959right:fx.pos*(fx.end.right-fx.start.right)+fx.start.right,
10960bottom:fx.pos*(fx.end.bottom-fx.start.bottom)+fx.start.bottom,
10961left:fx.pos*(fx.end.left-fx.start.left)+fx.start.left
10962});
10963};
10964})();
10965(function(){
10966var baseEasings={};
10967$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){
10968baseEasings[name]=function(p){
10969return Math.pow(p,i+2);
10970};
10971});
10972$.extend(baseEasings,{
10973Sine:function(p){
10974return 1-Math.cos(p*Math.PI/2);
10975},
10976Circ:function(p){
10977return 1-Math.sqrt(1-p*p);
10978},
10979Elastic:function(p){
10980return p===0||p===1?p:
10981-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15);
10982},
10983Back:function(p){
10984return p*p*(3*p-2);
10985},
10986Bounce:function(p){
10987var pow2,
10988bounce=4;
10989while(p<((pow2=Math.pow(2,--bounce))-1)/11){}
10990return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2);
10991}
10992});
10993$.each(baseEasings,function(name,easeIn){
10994$.easing["easeIn"+name]=easeIn;
10995$.easing["easeOut"+name]=function(p){
10996return 1-easeIn(1-p);
10997};
10998$.easing["easeInOut"+name]=function(p){
10999return p<0.5?
11000easeIn(p*2)/2:
110011-easeIn(p*-2+2)/2;
11002};
11003});
11004})();
11005var effect=$.effects;
11006var effectsEffectBlind=$.effects.define("blind","hide",function(options,done){
11007var map={
11008up:["bottom","top"],
11009vertical:["bottom","top"],
11010down:["top","bottom"],
11011left:["right","left"],
11012horizontal:["right","left"],
11013right:["left","right"]
11014},
11015element=$(this),
11016direction=options.direction||"up",
11017start=element.cssClip(),
11018animate={clip:$.extend({},start)},
11019placeholder=$.effects.createPlaceholder(element);
11020animate.clip[map[direction][0]]=animate.clip[map[direction][1]];
11021if(options.mode==="show"){
11022element.cssClip(animate.clip);
11023if(placeholder){
11024placeholder.css($.effects.clipToBox(animate));
11025}
11026animate.clip=start;
11027}
11028if(placeholder){
11029placeholder.animate($.effects.clipToBox(animate),options.duration,options.easing);
11030}
11031element.animate(animate,{
11032queue:false,
11033duration:options.duration,
11034easing:options.easing,
11035complete:done
11036});
11037});
11038var effectsEffectBounce=$.effects.define("bounce",function(options,done){
11039var upAnim,downAnim,refValue,
11040element=$(this),
11041mode=options.mode,
11042hide=mode==="hide",
11043show=mode==="show",
11044direction=options.direction||"up",
11045distance=options.distance,
11046times=options.times||5,
11047anims=times*2+(show||hide?1:0),
11048speed=options.duration/anims,
11049easing=options.easing,
11050ref=(direction==="up"||direction==="down")?"top":"left",
11051motion=(direction==="up"||direction==="left"),
11052i=0,
11053queuelen=element.queue().length;
11054$.effects.createPlaceholder(element);
11055refValue=element.css(ref);
11056if(!distance){
11057distance=element[ref==="top"?"outerHeight":"outerWidth"]()/3;
11058}
11059if(show){
11060downAnim={opacity:1};
11061downAnim[ref]=refValue;
11062element
11063.css("opacity",0)
11064.css(ref,motion?-distance*2:distance*2)
11065.animate(downAnim,speed,easing);
11066}
11067if(hide){
11068distance=distance/Math.pow(2,times-1);
11069}
11070downAnim={};
11071downAnim[ref]=refValue;
11072for(;i<times;i++){
11073upAnim={};
11074upAnim[ref]=(motion?"-=":"+=")+distance;
11075element
11076.animate(upAnim,speed,easing)
11077.animate(downAnim,speed,easing);
11078distance=hide?distance*2:distance/2;
11079}
11080if(hide){
11081upAnim={opacity:0};
11082upAnim[ref]=(motion?"-=":"+=")+distance;
11083element.animate(upAnim,speed,easing);
11084}
11085element.queue(done);
11086$.effects.unshift(element,queuelen,anims+1);
11087});
11088var effectsEffectClip=$.effects.define("clip","hide",function(options,done){
11089var start,
11090animate={},
11091element=$(this),
11092direction=options.direction||"vertical",
11093both=direction==="both",
11094horizontal=both||direction==="horizontal",
11095vertical=both||direction==="vertical";
11096start=element.cssClip();
11097animate.clip={
11098top:vertical?(start.bottom-start.top)/2:start.top,
11099right:horizontal?(start.right-start.left)/2:start.right,
11100bottom:vertical?(start.bottom-start.top)/2:start.bottom,
11101left:horizontal?(start.right-start.left)/2:start.left
11102};
11103$.effects.createPlaceholder(element);
11104if(options.mode==="show"){
11105element.cssClip(animate.clip);
11106animate.clip=start;
11107}
11108element.animate(animate,{
11109queue:false,
11110duration:options.duration,
11111easing:options.easing,
11112complete:done
11113});
11114});
11115var effectsEffectDrop=$.effects.define("drop","hide",function(options,done){
11116var distance,
11117element=$(this),
11118mode=options.mode,
11119show=mode==="show",
11120direction=options.direction||"left",
11121ref=(direction==="up"||direction==="down")?"top":"left",
11122motion=(direction==="up"||direction==="left")?"-=":"+=",
11123oppositeMotion=(motion==="+=")?"-=":"+=",
11124animation={
11125opacity:0
11126};
11127$.effects.createPlaceholder(element);
11128distance=options.distance||
11129element[ref==="top"?"outerHeight":"outerWidth"](true)/2;
11130animation[ref]=motion+distance;
11131if(show){
11132element.css(animation);
11133animation[ref]=oppositeMotion+distance;
11134animation.opacity=1;
11135}
11136element.animate(animation,{
11137queue:false,
11138duration:options.duration,
11139easing:options.easing,
11140complete:done
11141});
11142});
11143var effectsEffectExplode=$.effects.define("explode","hide",function(options,done){
11144var i,j,left,top,mx,my,
11145rows=options.pieces?Math.round(Math.sqrt(options.pieces)):3,
11146cells=rows,
11147element=$(this),
11148mode=options.mode,
11149show=mode==="show",
11150offset=element.show().css("visibility","hidden").offset(),
11151width=Math.ceil(element.outerWidth()/cells),
11152height=Math.ceil(element.outerHeight()/rows),
11153pieces=[];
11154function childComplete(){
11155pieces.push(this);
11156if(pieces.length===rows*cells){
11157animComplete();
11158}
11159}
11160for(i=0;i<rows;i++){
11161top=offset.top+i*height;
11162my=i-(rows-1)/2;
11163for(j=0;j<cells;j++){
11164left=offset.left+j*width;
11165mx=j-(cells-1)/2;
11166element
11167.clone()
11168.appendTo("body")
11169.wrap("<div></div>")
11170.css({
11171position:"absolute",
11172visibility:"visible",
11173left:-j*width,
11174top:-i*height
11175})
11176.parent()
11177.addClass("ui-effects-explode")
11178.css({
11179position:"absolute",
11180overflow:"hidden",
11181width:width,
11182height:height,
11183left:left+(show?mx*width:0),
11184top:top+(show?my*height:0),
11185opacity:show?0:1
11186})
11187.animate({
11188left:left+(show?0:mx*width),
11189top:top+(show?0:my*height),
11190opacity:show?1:0
11191},options.duration||500,options.easing,childComplete);
11192}
11193}
11194function animComplete(){
11195element.css({
11196visibility:"visible"
11197});
11198$(pieces).remove();
11199done();
11200}
11201});
11202var effectsEffectFade=$.effects.define("fade","toggle",function(options,done){
11203var show=options.mode==="show";
11204$(this)
11205.css("opacity",show?0:1)
11206.animate({
11207opacity:show?1:0
11208},{
11209queue:false,
11210duration:options.duration,
11211easing:options.easing,
11212complete:done
11213});
11214});
11215var effectsEffectFold=$.effects.define("fold","hide",function(options,done){
11216var element=$(this),
11217mode=options.mode,
11218show=mode==="show",
11219hide=mode==="hide",
11220size=options.size||15,
11221percent=/([0-9]+)%/.exec(size),
11222horizFirst=!!options.horizFirst,
11223ref=horizFirst?["right","bottom"]:["bottom","right"],
11224duration=options.duration/2,
11225placeholder=$.effects.createPlaceholder(element),
11226start=element.cssClip(),
11227animation1={clip:$.extend({},start)},
11228animation2={clip:$.extend({},start)},
11229distance=[start[ref[0]],start[ref[1]]],
11230queuelen=element.queue().length;
11231if(percent){
11232size=parseInt(percent[1],10)/100*distance[hide?0:1];
11233}
11234animation1.clip[ref[0]]=size;
11235animation2.clip[ref[0]]=size;
11236animation2.clip[ref[1]]=0;
11237if(show){
11238element.cssClip(animation2.clip);
11239if(placeholder){
11240placeholder.css($.effects.clipToBox(animation2));
11241}
11242animation2.clip=start;
11243}
11244element
11245.queue(function(next){
11246if(placeholder){
11247placeholder
11248.animate($.effects.clipToBox(animation1),duration,options.easing)
11249.animate($.effects.clipToBox(animation2),duration,options.easing);
11250}
11251next();
11252})
11253.animate(animation1,duration,options.easing)
11254.animate(animation2,duration,options.easing)
11255.queue(done);
11256$.effects.unshift(element,queuelen,4);
11257});
11258var effectsEffectHighlight=$.effects.define("highlight","show",function(options,done){
11259var element=$(this),
11260animation={
11261backgroundColor:element.css("backgroundColor")
11262};
11263if(options.mode==="hide"){
11264animation.opacity=0;
11265}
11266$.effects.saveStyle(element);
11267element
11268.css({
11269backgroundImage:"none",
11270backgroundColor:options.color||"#ffff99"
11271})
11272.animate(animation,{
11273queue:false,
11274duration:options.duration,
11275easing:options.easing,
11276complete:done
11277});
11278});
11279var effectsEffectSize=$.effects.define("size",function(options,done){
11280var baseline,factor,temp,
11281element=$(this),
11282cProps=["fontSize"],
11283vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],
11284hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
11285mode=options.mode,
11286restore=mode!=="effect",
11287scale=options.scale||"both",
11288origin=options.origin||["middle","center"],
11289position=element.css("position"),
11290pos=element.position(),
11291original=$.effects.scaledDimensions(element),
11292from=options.from||original,
11293to=options.to||$.effects.scaledDimensions(element,0);
11294$.effects.createPlaceholder(element);
11295if(mode==="show"){
11296temp=from;
11297from=to;
11298to=temp;
11299}
11300factor={
11301from:{
11302y:from.height/original.height,
11303x:from.width/original.width
11304},
11305to:{
11306y:to.height/original.height,
11307x:to.width/original.width
11308}
11309};
11310if(scale==="box"||scale==="both"){
11311if(factor.from.y!==factor.to.y){
11312from=$.effects.setTransition(element,vProps,factor.from.y,from);
11313to=$.effects.setTransition(element,vProps,factor.to.y,to);
11314}
11315if(factor.from.x!==factor.to.x){
11316from=$.effects.setTransition(element,hProps,factor.from.x,from);
11317to=$.effects.setTransition(element,hProps,factor.to.x,to);
11318}
11319}
11320if(scale==="content"||scale==="both"){
11321if(factor.from.y!==factor.to.y){
11322from=$.effects.setTransition(element,cProps,factor.from.y,from);
11323to=$.effects.setTransition(element,cProps,factor.to.y,to);
11324}
11325}
11326if(origin){
11327baseline=$.effects.getBaseline(origin,original);
11328from.top=(original.outerHeight-from.outerHeight)*baseline.y+pos.top;
11329from.left=(original.outerWidth-from.outerWidth)*baseline.x+pos.left;
11330to.top=(original.outerHeight-to.outerHeight)*baseline.y+pos.top;
11331to.left=(original.outerWidth-to.outerWidth)*baseline.x+pos.left;
11332}
11333delete from.outerHeight;
11334delete from.outerWidth;
11335element.css(from);
11336if(scale==="content"||scale==="both"){
11337vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);
11338hProps=hProps.concat(["marginLeft","marginRight"]);
11339element.find("*[width]").each(function(){
11340var child=$(this),
11341childOriginal=$.effects.scaledDimensions(child),
11342childFrom={
11343height:childOriginal.height*factor.from.y,
11344width:childOriginal.width*factor.from.x,
11345outerHeight:childOriginal.outerHeight*factor.from.y,
11346outerWidth:childOriginal.outerWidth*factor.from.x
11347},
11348childTo={
11349height:childOriginal.height*factor.to.y,
11350width:childOriginal.width*factor.to.x,
11351outerHeight:childOriginal.height*factor.to.y,
11352outerWidth:childOriginal.width*factor.to.x
11353};
11354if(factor.from.y!==factor.to.y){
11355childFrom=$.effects.setTransition(child,vProps,factor.from.y,childFrom);
11356childTo=$.effects.setTransition(child,vProps,factor.to.y,childTo);
11357}
11358if(factor.from.x!==factor.to.x){
11359childFrom=$.effects.setTransition(child,hProps,factor.from.x,childFrom);
11360childTo=$.effects.setTransition(child,hProps,factor.to.x,childTo);
11361}
11362if(restore){
11363$.effects.saveStyle(child);
11364}
11365child.css(childFrom);
11366child.animate(childTo,options.duration,options.easing,function(){
11367if(restore){
11368$.effects.restoreStyle(child);
11369}
11370});
11371});
11372}
11373element.animate(to,{
11374queue:false,
11375duration:options.duration,
11376easing:options.easing,
11377complete:function(){
11378var offset=element.offset();
11379if(to.opacity===0){
11380element.css("opacity",from.opacity);
11381}
11382if(!restore){
11383element
11384.css("position",position==="static"?"relative":position)
11385.offset(offset);
11386$.effects.saveStyle(element);
11387}
11388done();
11389}
11390});
11391});
11392var effectsEffectScale=$.effects.define("scale",function(options,done){
11393var el=$(this),
11394mode=options.mode,
11395percent=parseInt(options.percent,10)||
11396(parseInt(options.percent,10)===0?0:(mode!=="effect"?0:100)),
11397newOptions=$.extend(true,{
11398from:$.effects.scaledDimensions(el),
11399to:$.effects.scaledDimensions(el,percent,options.direction||"both"),
11400origin:options.origin||["middle","center"]
11401},options);
11402if(options.fade){
11403newOptions.from.opacity=1;
11404newOptions.to.opacity=0;
11405}
11406$.effects.effect.size.call(this,newOptions,done);
11407});
11408var effectsEffectPuff=$.effects.define("puff","hide",function(options,done){
11409var newOptions=$.extend(true,{},options,{
11410fade:true,
11411percent:parseInt(options.percent,10)||150
11412});
11413$.effects.effect.scale.call(this,newOptions,done);
11414});
11415var effectsEffectPulsate=$.effects.define("pulsate","show",function(options,done){
11416var element=$(this),
11417mode=options.mode,
11418show=mode==="show",
11419hide=mode==="hide",
11420showhide=show||hide,
11421anims=((options.times||5)*2)+(showhide?1:0),
11422duration=options.duration/anims,
11423animateTo=0,
11424i=1,
11425queuelen=element.queue().length;
11426if(show||!element.is(":visible")){
11427element.css("opacity",0).show();
11428animateTo=1;
11429}
11430for(;i<anims;i++){
11431element.animate({opacity:animateTo},duration,options.easing);
11432animateTo=1-animateTo;
11433}
11434element.animate({opacity:animateTo},duration,options.easing);
11435element.queue(done);
11436$.effects.unshift(element,queuelen,anims+1);
11437});
11438var effectsEffectShake=$.effects.define("shake",function(options,done){
11439var i=1,
11440element=$(this),
11441direction=options.direction||"left",
11442distance=options.distance||20,
11443times=options.times||3,
11444anims=times*2+1,
11445speed=Math.round(options.duration/anims),
11446ref=(direction==="up"||direction==="down")?"top":"left",
11447positiveMotion=(direction==="up"||direction==="left"),
11448animation={},
11449animation1={},
11450animation2={},
11451queuelen=element.queue().length;
11452$.effects.createPlaceholder(element);
11453animation[ref]=(positiveMotion?"-=":"+=")+distance;
11454animation1[ref]=(positiveMotion?"+=":"-=")+distance*2;
11455animation2[ref]=(positiveMotion?"-=":"+=")+distance*2;
11456element.animate(animation,speed,options.easing);
11457for(;i<times;i++){
11458element
11459.animate(animation1,speed,options.easing)
11460.animate(animation2,speed,options.easing);
11461}
11462element
11463.animate(animation1,speed,options.easing)
11464.animate(animation,speed/2,options.easing)
11465.queue(done);
11466$.effects.unshift(element,queuelen,anims+1);
11467});
11468var effectsEffectSlide=$.effects.define("slide","show",function(options,done){
11469var startClip,startRef,
11470element=$(this),
11471map={
11472up:["bottom","top"],
11473down:["top","bottom"],
11474left:["right","left"],
11475right:["left","right"]
11476},
11477mode=options.mode,
11478direction=options.direction||"left",
11479ref=(direction==="up"||direction==="down")?"top":"left",
11480positiveMotion=(direction==="up"||direction==="left"),
11481distance=options.distance||
11482element[ref==="top"?"outerHeight":"outerWidth"](true),
11483animation={};
11484$.effects.createPlaceholder(element);
11485startClip=element.cssClip();
11486startRef=element.position()[ref];
11487animation[ref]=(positiveMotion?-1:1)*distance+startRef;
11488animation.clip=element.cssClip();
11489animation.clip[map[direction][1]]=animation.clip[map[direction][0]];
11490if(mode==="show"){
11491element.cssClip(animation.clip);
11492element.css(ref,animation[ref]);
11493animation.clip=startClip;
11494animation[ref]=startRef;
11495}
11496element.animate(animation,{
11497queue:false,
11498duration:options.duration,
11499easing:options.easing,
11500complete:done
11501});
11502});
11503var effect;
11504if($.uiBackCompat===true){
11505effect=$.effects.define("transfer",function(options,done){
11506$(this).transfer(options,done);
11507});
11508}
11509var effectsEffectTransfer=effect;
11510$.ui.focusable=function(element,hasTabindex){
11511var map,mapName,img,focusableIfVisible,fieldset,
11512nodeName=element.nodeName.toLowerCase();
11513if("area"===nodeName){
11514map=element.parentNode;
11515mapName=map.name;
11516if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){
11517return false;
11518}
11519img=$("img[usemap='#"+mapName+"']");
11520return img.length>0&&img.is(":visible");
11521}
11522if(/^(input|select|textarea|button|object)$/.test(nodeName)){
11523focusableIfVisible=!element.disabled;
11524if(focusableIfVisible){
11525fieldset=$(element).closest("fieldset")[0];
11526if(fieldset){
11527focusableIfVisible=!fieldset.disabled;
11528}
11529}
11530}else if("a"===nodeName){
11531focusableIfVisible=element.href||hasTabindex;
11532}else{
11533focusableIfVisible=hasTabindex;
11534}
11535return focusableIfVisible&&$(element).is(":visible")&&
11536$(element).css("visibility")==="visible";
11537};
11538$.extend($.expr.pseudos,{
11539focusable:function(element){
11540return $.ui.focusable(element,$.attr(element,"tabindex")!=null);
11541}
11542});
11543var focusable=$.ui.focusable;
11544var formResetMixin=$.ui.formResetMixin={
11545_formResetHandler:function(){
11546var form=$(this);
11547setTimeout(function(){
11548var instances=form.data("ui-form-reset-instances");
11549$.each(instances,function(){
11550this.refresh();
11551});
11552});
11553},
11554_bindFormResetHandler:function(){
11555this.form=$(this.element.prop("form"));
11556if(!this.form.length){
11557return;
11558}
11559var instances=this.form.data("ui-form-reset-instances")||[];
11560if(!instances.length){
11561this.form.on("reset.ui-form-reset",this._formResetHandler);
11562}
11563instances.push(this);
11564this.form.data("ui-form-reset-instances",instances);
11565},
11566_unbindFormResetHandler:function(){
11567if(!this.form.length){
11568return;
11569}
11570var instances=this.form.data("ui-form-reset-instances");
11571instances.splice($.inArray(this,instances),1);
11572if(instances.length){
11573this.form.data("ui-form-reset-instances",instances);
11574}else{
11575this.form
11576.removeData("ui-form-reset-instances")
11577.off("reset.ui-form-reset");
11578}
11579}
11580};
11581if(!$.escapeSelector){
11582$.escapeSelector=function(id){
11583return CSS.escape(id+"");
11584};
11585}
11586if(!$.fn.even||!$.fn.odd){
11587$.fn.extend({
11588even:function(){
11589return this.filter(function(i){
11590return i%2===0;
11591});
11592},
11593odd:function(){
11594return this.filter(function(i){
11595return i%2===1;
11596});
11597}
11598});
11599}
11600;
11601var keycode=$.ui.keyCode={
11602BACKSPACE:8,
11603COMMA:188,
11604DELETE:46,
11605DOWN:40,
11606END:35,
11607ENTER:13,
11608ESCAPE:27,
11609HOME:36,
11610LEFT:37,
11611PAGE_DOWN:34,
11612PAGE_UP:33,
11613PERIOD:190,
11614RIGHT:39,
11615SPACE:32,
11616TAB:9,
11617UP:38
11618};
11619var labels=$.fn.labels=function(){
11620var ancestor,selector,id,labels,ancestors;
11621if(!this.length){
11622return this.pushStack([]);
11623}
11624if(this[0].labels&&this[0].labels.length){
11625return this.pushStack(this[0].labels);
11626}
11627labels=this.eq(0).parents("label");
11628id=this.attr("id");
11629if(id){
11630ancestor=this.eq(0).parents().last();
11631ancestors=ancestor.add(ancestor.length?ancestor.siblings():this.siblings());
11632selector="label[for='"+CSS.escape(id)+"']";
11633labels=labels.add(ancestors.find(selector).addBack(selector));
11634}
11635return this.pushStack(labels);
11636};
11637var scrollParent=$.fn.scrollParent=function(includeHidden){
11638var position=this.css("position"),
11639excludeStaticParent=position==="absolute",
11640overflowRegex=includeHidden?/(auto|scroll|hidden)/:/(auto|scroll)/,
11641scrollParent=this.parents().filter(function(){
11642var parent=$(this);
11643if(excludeStaticParent&&parent.css("position")==="static"){
11644return false;
11645}
11646return overflowRegex.test(parent.css("overflow")+parent.css("overflow-y")+
11647parent.css("overflow-x"));
11648}).eq(0);
11649return position==="fixed"||!scrollParent.length?
11650$(this[0].ownerDocument||document):
11651scrollParent;
11652};
11653var tabbable=$.extend($.expr.pseudos,{
11654tabbable:function(element){
11655var tabIndex=$.attr(element,"tabindex"),
11656hasTabindex=tabIndex!=null;
11657return(!hasTabindex||tabIndex>=0)&&$.ui.focusable(element,hasTabindex);
11658}
11659});
11660var uniqueId=$.fn.extend({
11661uniqueId:(function(){
11662var uuid=0;
11663return function(){
11664return this.each(function(){
11665if(!this.id){
11666this.id="ui-id-"+(++uuid);
11667}
11668});
11669};
11670})(),
11671removeUniqueId:function(){
11672return this.each(function(){
11673if(/^ui-id-\d+$/.test(this.id)){
11674$(this).removeAttr("id");
11675}
11676});
11677}
11678});
11679var widgetsAccordion=$.widget("ui.accordion",{
11680version:"1.14.1",
11681options:{
11682active:0,
11683animate:{},
11684classes:{
11685"ui-accordion-header":"ui-corner-top",
11686"ui-accordion-header-collapsed":"ui-corner-all",
11687"ui-accordion-content":"ui-corner-bottom"
11688},
11689collapsible:false,
11690event:"click",
11691header:function(elem){
11692return elem
11693.find("> li > :first-child")
11694.add(
11695elem.find("> :not(li)")
11696.filter(function(i){
11697return i%2===0;
11698})
11699);
11700},
11701heightStyle:"auto",
11702icons:{
11703activeHeader:"ui-icon-triangle-1-s",
11704header:"ui-icon-triangle-1-e"
11705},
11706activate:null,
11707beforeActivate:null
11708},
11709hideProps:{
11710borderTopWidth:"hide",
11711borderBottomWidth:"hide",
11712paddingTop:"hide",
11713paddingBottom:"hide",
11714height:"hide"
11715},
11716showProps:{
11717borderTopWidth:"show",
11718borderBottomWidth:"show",
11719paddingTop:"show",
11720paddingBottom:"show",
11721height:"show"
11722},
11723_create:function(){
11724var options=this.options;
11725this.prevShow=this.prevHide=$();
11726this._addClass("ui-accordion","ui-widget ui-helper-reset");
11727this.element.attr("role","tablist");
11728if(!options.collapsible&&(options.active===false||options.active==null)){
11729options.active=0;
11730}
11731this._processPanels();
11732if(options.active<0){
11733options.active+=this.headers.length;
11734}
11735this._refresh();
11736},
11737_getCreateEventData:function(){
11738return{
11739header:this.active,
11740panel:!this.active.length?$():this.active.next()
11741};
11742},
11743_createIcons:function(){
11744var icon,children,
11745icons=this.options.icons;
11746if(icons){
11747icon=$("<span>");
11748this._addClass(icon,"ui-accordion-header-icon","ui-icon "+icons.header);
11749icon.prependTo(this.headers);
11750children=this.active.children(".ui-accordion-header-icon");
11751this._removeClass(children,icons.header)
11752._addClass(children,null,icons.activeHeader)
11753._addClass(this.headers,"ui-accordion-icons");
11754}
11755},
11756_destroyIcons:function(){
11757this._removeClass(this.headers,"ui-accordion-icons");
11758this.headers.children(".ui-accordion-header-icon").remove();
11759},
11760_destroy:function(){
11761var contents;
11762this.element.removeAttr("role");
11763this.headers
11764.removeAttr("role aria-expanded aria-selected aria-controls tabIndex")
11765.removeUniqueId();
11766this._destroyIcons();
11767contents=this.headers.next()
11768.css("display","")
11769.removeAttr("role aria-hidden aria-labelledby")
11770.removeUniqueId();
11771if(this.options.heightStyle!=="content"){
11772contents.css("height","");
11773}
11774},
11775_setOption:function(key,value){
11776if(key==="active"){
11777this._activate(value);
11778return;
11779}
11780if(key==="event"){
11781if(this.options.event){
11782this._off(this.headers,this.options.event);
11783}
11784this._setupEvents(value);
11785}
11786this._super(key,value);
11787if(key==="collapsible"&&!value&&this.options.active===false){
11788this._activate(0);
11789}
11790if(key==="icons"){
11791this._destroyIcons();
11792if(value){
11793this._createIcons();
11794}
11795}
11796},
11797_setOptionDisabled:function(value){
11798this._super(value);
11799this.element.attr("aria-disabled",value);
11800this._toggleClass(null,"ui-state-disabled",!!value);
11801},
11802_keydown:function(event){
11803if(event.altKey||event.ctrlKey){
11804return;
11805}
11806var keyCode=$.ui.keyCode,
11807length=this.headers.length,
11808currentIndex=this.headers.index(event.target),
11809toFocus=false;
11810switch(event.keyCode){
11811case keyCode.RIGHT:
11812case keyCode.DOWN:
11813toFocus=this.headers[(currentIndex+1)%length];
11814break;
11815case keyCode.LEFT:
11816case keyCode.UP:
11817toFocus=this.headers[(currentIndex-1+length)%length];
11818break;
11819case keyCode.SPACE:
11820case keyCode.ENTER:
11821this._eventHandler(event);
11822break;
11823case keyCode.HOME:
11824toFocus=this.headers[0];
11825break;
11826case keyCode.END:
11827toFocus=this.headers[length-1];
11828break;
11829}
11830if(toFocus){
11831$(event.target).attr("tabIndex",-1);
11832$(toFocus).attr("tabIndex",0);
11833$(toFocus).trigger("focus");
11834event.preventDefault();
11835}
11836},
11837_panelKeyDown:function(event){
11838if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){
11839$(event.currentTarget).prev().trigger("focus");
11840}
11841},
11842refresh:function(){
11843var options=this.options;
11844this._processPanels();
11845if((options.active===false&&options.collapsible===true)||
11846!this.headers.length){
11847options.active=false;
11848this.active=$();
11849}else if(options.active===false){
11850this._activate(0);
11851}else if(this.active.length&&!$.contains(this.element[0],this.active[0])){
11852if(this.headers.length===this.headers.find(".ui-state-disabled").length){
11853options.active=false;
11854this.active=$();
11855}else{
11856this._activate(Math.max(0,options.active-1));
11857}
11858}else{
11859options.active=this.headers.index(this.active);
11860}
11861this._destroyIcons();
11862this._refresh();
11863},
11864_processPanels:function(){
11865var prevHeaders=this.headers,
11866prevPanels=this.panels;
11867if(typeof this.options.header==="function"){
11868this.headers=this.options.header(this.element);
11869}else{
11870this.headers=this.element.find(this.options.header);
11871}
11872this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed",
11873"ui-state-default");
11874this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide();
11875this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content");
11876if(prevPanels){
11877this._off(prevHeaders.not(this.headers));
11878this._off(prevPanels.not(this.panels));
11879}
11880},
11881_refresh:function(){
11882var maxHeight,
11883options=this.options,
11884heightStyle=options.heightStyle,
11885parent=this.element.parent();
11886this.active=this._findActive(options.active);
11887this._addClass(this.active,"ui-accordion-header-active","ui-state-active")
11888._removeClass(this.active,"ui-accordion-header-collapsed");
11889this._addClass(this.active.next(),"ui-accordion-content-active");
11890this.active.next().show();
11891this.headers
11892.attr("role","tab")
11893.each(function(){
11894var header=$(this),
11895headerId=header.uniqueId().attr("id"),
11896panel=header.next(),
11897panelId=panel.uniqueId().attr("id");
11898header.attr("aria-controls",panelId);
11899panel.attr("aria-labelledby",headerId);
11900})
11901.next()
11902.attr("role","tabpanel");
11903this.headers
11904.not(this.active)
11905.attr({
11906"aria-selected":"false",
11907"aria-expanded":"false",
11908tabIndex:-1
11909})
11910.next()
11911.attr({
11912"aria-hidden":"true"
11913})
11914.hide();
11915if(!this.active.length){
11916this.headers.eq(0).attr("tabIndex",0);
11917}else{
11918this.active.attr({
11919"aria-selected":"true",
11920"aria-expanded":"true",
11921tabIndex:0
11922})
11923.next()
11924.attr({
11925"aria-hidden":"false"
11926});
11927}
11928this._createIcons();
11929this._setupEvents(options.event);
11930if(heightStyle==="fill"){
11931maxHeight=parent.height();
11932this.element.siblings(":visible").each(function(){
11933var elem=$(this),
11934position=elem.css("position");
11935if(position==="absolute"||position==="fixed"){
11936return;
11937}
11938maxHeight-=elem.outerHeight(true);
11939});
11940this.headers.each(function(){
11941maxHeight-=$(this).outerHeight(true);
11942});
11943this.headers.next()
11944.each(function(){
11945$(this).height(Math.max(0,maxHeight-
11946$(this).innerHeight()+$(this).height()));
11947})
11948.css("overflow","auto");
11949}else if(heightStyle==="auto"){
11950maxHeight=0;
11951this.headers.next()
11952.each(function(){
11953var isVisible=$(this).is(":visible");
11954if(!isVisible){
11955$(this).show();
11956}
11957maxHeight=Math.max(maxHeight,$(this).css("height","").height());
11958if(!isVisible){
11959$(this).hide();
11960}
11961})
11962.height(maxHeight);
11963}
11964},
11965_activate:function(index){
11966var active=this._findActive(index)[0];
11967if(active===this.active[0]){
11968return;
11969}
11970active=active||this.active[0];
11971this._eventHandler({
11972target:active,
11973currentTarget:active,
11974preventDefault:$.noop
11975});
11976},
11977_findActive:function(selector){
11978return typeof selector==="number"?this.headers.eq(selector):$();
11979},
11980_setupEvents:function(event){
11981var events={
11982keydown:"_keydown"
11983};
11984if(event){
11985$.each(event.split(" "),function(index,eventName){
11986events[eventName]="_eventHandler";
11987});
11988}
11989this._off(this.headers.add(this.headers.next()));
11990this._on(this.headers,events);
11991this._on(this.headers.next(),{keydown:"_panelKeyDown"});
11992this._hoverable(this.headers);
11993this._focusable(this.headers);
11994},
11995_eventHandler:function(event){
11996var activeChildren,clickedChildren,
11997options=this.options,
11998active=this.active,
11999clicked=$(event.currentTarget),
12000clickedIsActive=clicked[0]===active[0],
12001collapsing=clickedIsActive&&options.collapsible,
12002toShow=collapsing?$():clicked.next(),
12003toHide=active.next(),
12004eventData={
12005oldHeader:active,
12006oldPanel:toHide,
12007newHeader:collapsing?$():clicked,
12008newPanel:toShow
12009};
12010event.preventDefault();
12011if(
12012(clickedIsActive&&!options.collapsible)||
12013(this._trigger("beforeActivate",event,eventData)===false)){
12014return;
12015}
12016options.active=collapsing?false:this.headers.index(clicked);
12017this.active=clickedIsActive?$():clicked;
12018this._toggle(eventData);
12019this._removeClass(active,"ui-accordion-header-active","ui-state-active");
12020if(options.icons){
12021activeChildren=active.children(".ui-accordion-header-icon");
12022this._removeClass(activeChildren,null,options.icons.activeHeader)
12023._addClass(activeChildren,null,options.icons.header);
12024}
12025if(!clickedIsActive){
12026this._removeClass(clicked,"ui-accordion-header-collapsed")
12027._addClass(clicked,"ui-accordion-header-active","ui-state-active");
12028if(options.icons){
12029clickedChildren=clicked.children(".ui-accordion-header-icon");
12030this._removeClass(clickedChildren,null,options.icons.header)
12031._addClass(clickedChildren,null,options.icons.activeHeader);
12032}
12033this._addClass(clicked.next(),"ui-accordion-content-active");
12034}
12035},
12036_toggle:function(data){
12037var toShow=data.newPanel,
12038toHide=this.prevShow.length?this.prevShow:data.oldPanel;
12039this.prevShow.add(this.prevHide).stop(true,true);
12040this.prevShow=toShow;
12041this.prevHide=toHide;
12042if(this.options.animate){
12043this._animate(toShow,toHide,data);
12044}else{
12045toHide.hide();
12046toShow.show();
12047this._toggleComplete(data);
12048}
12049toHide.attr({
12050"aria-hidden":"true"
12051});
12052toHide.prev().attr({
12053"aria-selected":"false",
12054"aria-expanded":"false"
12055});
12056if(toShow.length&&toHide.length){
12057toHide.prev().attr({
12058"tabIndex":-1,
12059"aria-expanded":"false"
12060});
12061}else if(toShow.length){
12062this.headers.filter(function(){
12063return parseInt($(this).attr("tabIndex"),10)===0;
12064})
12065.attr("tabIndex",-1);
12066}
12067toShow
12068.attr("aria-hidden","false")
12069.prev()
12070.attr({
12071"aria-selected":"true",
12072"aria-expanded":"true",
12073tabIndex:0
12074});
12075},
12076_animate:function(toShow,toHide,data){
12077var total,easing,duration,
12078that=this,
12079adjust=0,
12080boxSizing=toShow.css("box-sizing"),
12081down=toShow.length&&
12082(!toHide.length||(toShow.index()<toHide.index())),
12083animate=this.options.animate||{},
12084options=down&&animate.down||animate,
12085complete=function(){
12086that._toggleComplete(data);
12087};
12088if(typeof options==="number"){
12089duration=options;
12090}
12091if(typeof options==="string"){
12092easing=options;
12093}
12094easing=easing||options.easing||animate.easing;
12095duration=duration||options.duration||animate.duration;
12096if(!toHide.length){
12097return toShow.animate(this.showProps,duration,easing,complete);
12098}
12099if(!toShow.length){
12100return toHide.animate(this.hideProps,duration,easing,complete);
12101}
12102total=toShow.show().outerHeight();
12103toHide.animate(this.hideProps,{
12104duration:duration,
12105easing:easing,
12106step:function(now,fx){
12107fx.now=Math.round(now);
12108}
12109});
12110toShow
12111.hide()
12112.animate(this.showProps,{
12113duration:duration,
12114easing:easing,
12115complete:complete,
12116step:function(now,fx){
12117fx.now=Math.round(now);
12118if(fx.prop!=="height"){
12119if(boxSizing==="content-box"){
12120adjust+=fx.now;
12121}
12122}else if(that.options.heightStyle!=="content"){
12123fx.now=Math.round(total-toHide.outerHeight()-adjust);
12124adjust=0;
12125}
12126}
12127});
12128},
12129_toggleComplete:function(data){
12130var toHide=data.oldPanel,
12131prev=toHide.prev();
12132this._removeClass(toHide,"ui-accordion-content-active");
12133this._removeClass(prev,"ui-accordion-header-active")
12134._addClass(prev,"ui-accordion-header-collapsed");
12135this._trigger("activate",null,data);
12136}
12137});
12138var widgetsMenu=$.widget("ui.menu",{
12139version:"1.14.1",
12140defaultElement:"<ul>",
12141delay:300,
12142options:{
12143icons:{
12144submenu:"ui-icon-caret-1-e"
12145},
12146items:"> *",
12147menus:"ul",
12148position:{
12149my:"left top",
12150at:"right top"
12151},
12152role:"menu",
12153blur:null,
12154focus:null,
12155select:null
12156},
12157_create:function(){
12158this.activeMenu=this.element;
12159this.mouseHandled=false;
12160this.lastMousePosition={x:null,y:null};
12161this.element
12162.uniqueId()
12163.attr({
12164role:this.options.role,
12165tabIndex:0
12166});
12167this._addClass("ui-menu","ui-widget ui-widget-content");
12168this._on({
12169"mousedown .ui-menu-item":function(event){
12170event.preventDefault();
12171this._activateItem(event);
12172},
12173"click .ui-menu-item":function(event){
12174var target=$(event.target);
12175var active=$(this.document[0].activeElement);
12176if(!this.mouseHandled&&target.not(".ui-state-disabled").length){
12177this.select(event);
12178if(!event.isPropagationStopped()){
12179this.mouseHandled=true;
12180}
12181if(target.has(".ui-menu").length){
12182this.expand(event);
12183}else if(!this.element.is(":focus")&&
12184active.closest(".ui-menu").length){
12185this.element.trigger("focus",[true]);
12186if(this.active&&this.active.parents(".ui-menu").length===1){
12187clearTimeout(this.timer);
12188}
12189}
12190}
12191},
12192"mouseenter .ui-menu-item":"_activateItem",
12193"mousemove .ui-menu-item":"_activateItem",
12194mouseleave:"collapseAll",
12195"mouseleave .ui-menu":"collapseAll",
12196focus:function(event,keepActiveItem){
12197var item=this.active||this._menuItems().first();
12198if(!keepActiveItem){
12199this.focus(event,item);
12200}
12201},
12202blur:function(event){
12203this._delay(function(){
12204var notContained=!$.contains(
12205this.element[0],
12206this.document[0].activeElement
12207);
12208if(notContained){
12209this.collapseAll(event);
12210}
12211});
12212},
12213keydown:"_keydown"
12214});
12215this.refresh();
12216this._on(this.document,{
12217click:function(event){
12218if(this._closeOnDocumentClick(event)){
12219this.collapseAll(event,true);
12220}
12221this.mouseHandled=false;
12222}
12223});
12224},
12225_activateItem:function(event){
12226if(this.previousFilter){
12227return;
12228}
12229if(event.clientX===this.lastMousePosition.x&&
12230event.clientY===this.lastMousePosition.y){
12231return;
12232}
12233this.lastMousePosition={
12234x:event.clientX,
12235y:event.clientY
12236};
12237var actualTarget=$(event.target).closest(".ui-menu-item"),
12238target=$(event.currentTarget);
12239if(actualTarget[0]!==target[0]){
12240return;
12241}
12242if(target.is(".ui-state-active")){
12243return;
12244}
12245this._removeClass(target.siblings().children(".ui-state-active"),
12246null,"ui-state-active");
12247this.focus(event,target);
12248},
12249_destroy:function(){
12250var items=this.element.find(".ui-menu-item")
12251.removeAttr("role aria-disabled"),
12252submenus=items.children(".ui-menu-item-wrapper")
12253.removeUniqueId()
12254.removeAttr("tabIndex role aria-haspopup");
12255this.element
12256.removeAttr("aria-activedescendant")
12257.find(".ui-menu").addBack()
12258.removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled "+
12259"tabIndex")
12260.removeUniqueId()
12261.show();
12262submenus.children().each(function(){
12263var elem=$(this);
12264if(elem.data("ui-menu-submenu-caret")){
12265elem.remove();
12266}
12267});
12268},
12269_keydown:function(event){
12270var match,prev,character,skip,
12271preventDefault=true;
12272switch(event.keyCode){
12273case $.ui.keyCode.PAGE_UP:
12274this.previousPage(event);
12275break;
12276case $.ui.keyCode.PAGE_DOWN:
12277this.nextPage(event);
12278break;
12279case $.ui.keyCode.HOME:
12280this._move("first","first",event);
12281break;
12282case $.ui.keyCode.END:
12283this._move("last","last",event);
12284break;
12285case $.ui.keyCode.UP:
12286this.previous(event);
12287break;
12288case $.ui.keyCode.DOWN:
12289this.next(event);
12290break;
12291case $.ui.keyCode.LEFT:
12292this.collapse(event);
12293break;
12294case $.ui.keyCode.RIGHT:
12295if(this.active&&!this.active.is(".ui-state-disabled")){
12296this.expand(event);
12297}
12298break;
12299case $.ui.keyCode.ENTER:
12300case $.ui.keyCode.SPACE:
12301this._activate(event);
12302break;
12303case $.ui.keyCode.ESCAPE:
12304this.collapse(event);
12305break;
12306default:
12307preventDefault=false;
12308prev=this.previousFilter||"";
12309skip=false;
12310character=event.keyCode>=96&&event.keyCode<=105?
12311(event.keyCode-96).toString():String.fromCharCode(event.keyCode);
12312clearTimeout(this.filterTimer);
12313if(character===prev){
12314skip=true;
12315}else{
12316character=prev+character;
12317}
12318match=this._filterMenuItems(character);
12319match=skip&&match.index(this.active.next())!==-1?
12320this.active.nextAll(".ui-menu-item"):
12321match;
12322if(!match.length){
12323character=String.fromCharCode(event.keyCode);
12324match=this._filterMenuItems(character);
12325}
12326if(match.length){
12327this.focus(event,match);
12328this.previousFilter=character;
12329this.filterTimer=this._delay(function(){
12330delete this.previousFilter;
12331},1000);
12332}else{
12333delete this.previousFilter;
12334}
12335}
12336if(preventDefault){
12337event.preventDefault();
12338}
12339},
12340_activate:function(event){
12341if(this.active&&!this.active.is(".ui-state-disabled")){
12342if(this.active.children("[aria-haspopup='true']").length){
12343this.expand(event);
12344}else{
12345this.select(event);
12346}
12347}
12348},
12349refresh:function(){
12350var menus,items,newSubmenus,newItems,newWrappers,
12351that=this,
12352icon=this.options.icons.submenu,
12353submenus=this.element.find(this.options.menus);
12354this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length);
12355newSubmenus=submenus.filter(":not(.ui-menu)")
12356.hide()
12357.attr({
12358role:this.options.role,
12359"aria-hidden":"true",
12360"aria-expanded":"false"
12361})
12362.each(function(){
12363var menu=$(this),
12364item=menu.prev(),
12365submenuCaret=$("<span>").data("ui-menu-submenu-caret",true);
12366that._addClass(submenuCaret,"ui-menu-icon","ui-icon "+icon);
12367item
12368.attr("aria-haspopup","true")
12369.prepend(submenuCaret);
12370menu.attr("aria-labelledby",item.attr("id"));
12371});
12372this._addClass(newSubmenus,"ui-menu","ui-widget ui-widget-content ui-front");
12373menus=submenus.add(this.element);
12374items=menus.find(this.options.items);
12375items.not(".ui-menu-item").each(function(){
12376var item=$(this);
12377if(that._isDivider(item)){
12378that._addClass(item,"ui-menu-divider","ui-widget-content");
12379}
12380});
12381newItems=items.not(".ui-menu-item, .ui-menu-divider");
12382newWrappers=newItems.children()
12383.not(".ui-menu")
12384.uniqueId()
12385.attr({
12386tabIndex:-1,
12387role:this._itemRole()
12388});
12389this._addClass(newItems,"ui-menu-item")
12390._addClass(newWrappers,"ui-menu-item-wrapper");
12391items.filter(".ui-state-disabled").attr("aria-disabled","true");
12392if(this.active&&!$.contains(this.element[0],this.active[0])){
12393this.blur();
12394}
12395},
12396_itemRole:function(){
12397return{
12398menu:"menuitem",
12399listbox:"option"
12400}[this.options.role];
12401},
12402_setOption:function(key,value){
12403if(key==="icons"){
12404var icons=this.element.find(".ui-menu-icon");
12405this._removeClass(icons,null,this.options.icons.submenu)
12406._addClass(icons,null,value.submenu);
12407}
12408this._super(key,value);
12409},
12410_setOptionDisabled:function(value){
12411this._super(value);
12412this.element.attr("aria-disabled",String(value));
12413this._toggleClass(null,"ui-state-disabled",!!value);
12414},
12415focus:function(event,item){
12416var nested,focused,activeParent;
12417this.blur(event,event&&event.type==="focus");
12418this._scrollIntoView(item);
12419this.active=item.first();
12420focused=this.active.children(".ui-menu-item-wrapper");
12421this._addClass(focused,null,"ui-state-active");
12422if(this.options.role){
12423this.element.attr("aria-activedescendant",focused.attr("id"));
12424}
12425activeParent=this.active
12426.parent()
12427.closest(".ui-menu-item")
12428.children(".ui-menu-item-wrapper");
12429this._addClass(activeParent,null,"ui-state-active");
12430if(event&&event.type==="keydown"){
12431this._close();
12432}else{
12433this.timer=this._delay(function(){
12434this._close();
12435},this.delay);
12436}
12437nested=item.children(".ui-menu");
12438if(nested.length&&event&&(/^mouse/.test(event.type))){
12439this._startOpening(nested);
12440}
12441this.activeMenu=item.parent();
12442this._trigger("focus",event,{item:item});
12443},
12444_scrollIntoView:function(item){
12445var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;
12446if(this._hasScroll()){
12447borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0;
12448paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0;
12449offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;
12450scroll=this.activeMenu.scrollTop();
12451elementHeight=this.activeMenu.height();
12452itemHeight=item.outerHeight();
12453if(offset<0){
12454this.activeMenu.scrollTop(scroll+offset);
12455}else if(offset+itemHeight>elementHeight){
12456this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight);
12457}
12458}
12459},
12460blur:function(event,fromFocus){
12461if(!fromFocus){
12462clearTimeout(this.timer);
12463}
12464if(!this.active){
12465return;
12466}
12467this._removeClass(this.active.children(".ui-menu-item-wrapper"),
12468null,"ui-state-active");
12469this._trigger("blur",event,{item:this.active});
12470this.active=null;
12471},
12472_startOpening:function(submenu){
12473clearTimeout(this.timer);
12474if(submenu.attr("aria-hidden")!=="true"){
12475return;
12476}
12477this.timer=this._delay(function(){
12478this._close();
12479this._open(submenu);
12480},this.delay);
12481},
12482_open:function(submenu){
12483var position=$.extend({
12484of:this.active
12485},this.options.position);
12486clearTimeout(this.timer);
12487this.element.find(".ui-menu").not(submenu.parents(".ui-menu"))
12488.hide()
12489.attr("aria-hidden","true");
12490submenu
12491.show()
12492.removeAttr("aria-hidden")
12493.attr("aria-expanded","true")
12494.position(position);
12495},
12496collapseAll:function(event,all){
12497clearTimeout(this.timer);
12498this.timer=this._delay(function(){
12499var currentMenu=all?this.element:
12500$(event&&event.target).closest(this.element.find(".ui-menu"));
12501if(!currentMenu.length){
12502currentMenu=this.element;
12503}
12504this._close(currentMenu);
12505this.blur(event);
12506this._removeClass(currentMenu.find(".ui-state-active"),null,"ui-state-active");
12507this.activeMenu=currentMenu;
12508},all?0:this.delay);
12509},
12510_close:function(startMenu){
12511if(!startMenu){
12512startMenu=this.active?this.active.parent():this.element;
12513}
12514startMenu.find(".ui-menu")
12515.hide()
12516.attr("aria-hidden","true")
12517.attr("aria-expanded","false");
12518},
12519_closeOnDocumentClick:function(event){
12520return!$(event.target).closest(".ui-menu").length;
12521},
12522_isDivider:function(item){
12523return!/[^\-\u2014\u2013\s]/.test(item.text());
12524},
12525collapse:function(event){
12526var newItem=this.active&&
12527this.active.parent().closest(".ui-menu-item",this.element);
12528if(newItem&&newItem.length){
12529this._close();
12530this.focus(event,newItem);
12531}
12532},
12533expand:function(event){
12534var newItem=this.active&&this._menuItems(this.active.children(".ui-menu")).first();
12535if(newItem&&newItem.length){
12536this._open(newItem.parent());
12537this._delay(function(){
12538this.focus(event,newItem);
12539});
12540}
12541},
12542next:function(event){
12543this._move("next","first",event);
12544},
12545previous:function(event){
12546this._move("prev","last",event);
12547},
12548isFirstItem:function(){
12549return this.active&&!this.active.prevAll(".ui-menu-item").length;
12550},
12551isLastItem:function(){
12552return this.active&&!this.active.nextAll(".ui-menu-item").length;
12553},
12554_menuItems:function(menu){
12555return(menu||this.element)
12556.find(this.options.items)
12557.filter(".ui-menu-item");
12558},
12559_move:function(direction,filter,event){
12560var next;
12561if(this.active){
12562if(direction==="first"||direction==="last"){
12563next=this.active
12564[direction==="first"?"prevAll":"nextAll"](".ui-menu-item")
12565.last();
12566}else{
12567next=this.active
12568[direction+"All"](".ui-menu-item")
12569.first();
12570}
12571}
12572if(!next||!next.length||!this.active){
12573next=this._menuItems(this.activeMenu)[filter]();
12574}
12575this.focus(event,next);
12576},
12577nextPage:function(event){
12578var item,base,height;
12579if(!this.active){
12580this.next(event);
12581return;
12582}
12583if(this.isLastItem()){
12584return;
12585}
12586if(this._hasScroll()){
12587base=this.active.offset().top;
12588height=this.element.innerHeight();
12589if($.fn.jquery.indexOf("3.2.")===0){
12590height+=this.element[0].offsetHeight-this.element.outerHeight();
12591}
12592this.active.nextAll(".ui-menu-item").each(function(){
12593item=$(this);
12594return item.offset().top-base-height<0;
12595});
12596this.focus(event,item);
12597}else{
12598this.focus(event,this._menuItems(this.activeMenu)
12599[!this.active?"first":"last"]());
12600}
12601},
12602previousPage:function(event){
12603var item,base,height;
12604if(!this.active){
12605this.next(event);
12606return;
12607}
12608if(this.isFirstItem()){
12609return;
12610}
12611if(this._hasScroll()){
12612base=this.active.offset().top;
12613height=this.element.innerHeight();
12614if($.fn.jquery.indexOf("3.2.")===0){
12615height+=this.element[0].offsetHeight-this.element.outerHeight();
12616}
12617this.active.prevAll(".ui-menu-item").each(function(){
12618item=$(this);
12619return item.offset().top-base+height>0;
12620});
12621this.focus(event,item);
12622}else{
12623this.focus(event,this._menuItems(this.activeMenu).first());
12624}
12625},
12626_hasScroll:function(){
12627return this.element.outerHeight()<this.element.prop("scrollHeight");
12628},
12629select:function(event){
12630this.active=this.active||$(event.target).closest(".ui-menu-item");
12631var ui={item:this.active};
12632if(!this.active.has(".ui-menu").length){
12633this.collapseAll(event,true);
12634}
12635this._trigger("select",event,ui);
12636},
12637_filterMenuItems:function(character){
12638var escapedCharacter=character.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),
12639regex=new RegExp("^"+escapedCharacter,"i");
12640return this.activeMenu
12641.find(this.options.items)
12642.filter(".ui-menu-item")
12643.filter(function(){
12644return regex.test(
12645String.prototype.trim.call(
12646$(this).children(".ui-menu-item-wrapper").text()));
12647});
12648}
12649});
12650$.widget("ui.autocomplete",{
12651version:"1.14.1",
12652defaultElement:"<input>",
12653options:{
12654appendTo:null,
12655autoFocus:false,
12656delay:300,
12657minLength:1,
12658position:{
12659my:"left top",
12660at:"left bottom",
12661collision:"none"
12662},
12663source:null,
12664change:null,
12665close:null,
12666focus:null,
12667open:null,
12668response:null,
12669search:null,
12670select:null
12671},
12672requestIndex:0,
12673pending:0,
12674liveRegionTimer:null,
12675_create:function(){
12676var suppressKeyPress,suppressKeyPressRepeat,suppressInput,
12677nodeName=this.element[0].nodeName.toLowerCase(),
12678isTextarea=nodeName==="textarea",
12679isInput=nodeName==="input";
12680this.isMultiLine=isTextarea||
12681!isInput&&this.element.prop("contentEditable")==="true";
12682this.valueMethod=this.element[isTextarea||isInput?"val":"text"];
12683this.isNewMenu=true;
12684this._addClass("ui-autocomplete-input");
12685this.element.attr("autocomplete","off");
12686this._on(this.element,{
12687keydown:function(event){
12688if(this.element.prop("readOnly")){
12689suppressKeyPress=true;
12690suppressInput=true;
12691suppressKeyPressRepeat=true;
12692return;
12693}
12694suppressKeyPress=false;
12695suppressInput=false;
12696suppressKeyPressRepeat=false;
12697var keyCode=$.ui.keyCode;
12698switch(event.keyCode){
12699case keyCode.PAGE_UP:
12700suppressKeyPress=true;
12701this._move("previousPage",event);
12702break;
12703case keyCode.PAGE_DOWN:
12704suppressKeyPress=true;
12705this._move("nextPage",event);
12706break;
12707case keyCode.UP:
12708suppressKeyPress=true;
12709this._keyEvent("previous",event);
12710break;
12711case keyCode.DOWN:
12712suppressKeyPress=true;
12713this._keyEvent("next",event);
12714break;
12715case keyCode.ENTER:
12716if(this.menu.active){
12717suppressKeyPress=true;
12718event.preventDefault();
12719this.menu.select(event);
12720}
12721break;
12722case keyCode.TAB:
12723if(this.menu.active){
12724this.menu.select(event);
12725}
12726break;
12727case keyCode.ESCAPE:
12728if(this.menu.element.is(":visible")){
12729if(!this.isMultiLine){
12730this._value(this.term);
12731}
12732this.close(event);
12733event.preventDefault();
12734}
12735break;
12736default:
12737suppressKeyPressRepeat=true;
12738this._searchTimeout(event);
12739break;
12740}
12741},
12742keypress:function(event){
12743if(suppressKeyPress){
12744suppressKeyPress=false;
12745if(!this.isMultiLine||this.menu.element.is(":visible")){
12746event.preventDefault();
12747}
12748return;
12749}
12750if(suppressKeyPressRepeat){
12751return;
12752}
12753var keyCode=$.ui.keyCode;
12754switch(event.keyCode){
12755case keyCode.PAGE_UP:
12756this._move("previousPage",event);
12757break;
12758case keyCode.PAGE_DOWN:
12759this._move("nextPage",event);
12760break;
12761case keyCode.UP:
12762this._keyEvent("previous",event);
12763break;
12764case keyCode.DOWN:
12765this._keyEvent("next",event);
12766break;
12767}
12768},
12769input:function(event){
12770if(suppressInput){
12771suppressInput=false;
12772event.preventDefault();
12773return;
12774}
12775this._searchTimeout(event);
12776},
12777focus:function(){
12778this.selectedItem=null;
12779this.previous=this._value();
12780},
12781blur:function(event){
12782clearTimeout(this.searching);
12783this.close(event);
12784this._change(event);
12785}
12786});
12787this._initSource();
12788this.menu=$("<ul>")
12789.appendTo(this._appendTo())
12790.menu({
12791role:null
12792})
12793.hide()
12794.menu("instance");
12795this._addClass(this.menu.element,"ui-autocomplete","ui-front");
12796this._on(this.menu.element,{
12797mousedown:function(event){
12798event.preventDefault();
12799},
12800menufocus:function(event,ui){
12801var label,item;
12802if(this.isNewMenu){
12803this.isNewMenu=false;
12804if(event.originalEvent&&/^mouse/.test(event.originalEvent.type)){
12805this.menu.blur();
12806this.document.one("mousemove",function(){
12807$(event.target).trigger(event.originalEvent);
12808});
12809return;
12810}
12811}
12812item=ui.item.data("ui-autocomplete-item");
12813if(false!==this._trigger("focus",event,{item:item})){
12814if(event.originalEvent&&/^key/.test(event.originalEvent.type)){
12815this._value(item.value);
12816}
12817}
12818label=ui.item.attr("aria-label")||item.value;
12819if(label&&String.prototype.trim.call(label).length){
12820clearTimeout(this.liveRegionTimer);
12821this.liveRegionTimer=this._delay(function(){
12822this.liveRegion.html($("<div>").text(label));
12823},100);
12824}
12825},
12826menuselect:function(event,ui){
12827var item=ui.item.data("ui-autocomplete-item"),
12828previous=this.previous;
12829if(this.element[0]!==this.document[0].activeElement){
12830this.element.trigger("focus");
12831this.previous=previous;
12832}
12833if(false!==this._trigger("select",event,{item:item})){
12834this._value(item.value);
12835}
12836this.term=this._value();
12837this.close(event);
12838this.selectedItem=item;
12839}
12840});
12841this.liveRegion=$("<div>",{
12842role:"status",
12843"aria-live":"assertive",
12844"aria-relevant":"additions"
12845})
12846.appendTo(this.document[0].body);
12847this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");
12848this._on(this.window,{
12849beforeunload:function(){
12850this.element.removeAttr("autocomplete");
12851}
12852});
12853},
12854_destroy:function(){
12855clearTimeout(this.searching);
12856this.element.removeAttr("autocomplete");
12857this.menu.element.remove();
12858this.liveRegion.remove();
12859},
12860_setOption:function(key,value){
12861this._super(key,value);
12862if(key==="source"){
12863this._initSource();
12864}
12865if(key==="appendTo"){
12866this.menu.element.appendTo(this._appendTo());
12867}
12868if(key==="disabled"&&value&&this.xhr){
12869this.xhr.abort();
12870}
12871},
12872_isEventTargetInWidget:function(event){
12873var menuElement=this.menu.element[0];
12874return event.target===this.element[0]||
12875event.target===menuElement||
12876$.contains(menuElement,event.target);
12877},
12878_closeOnClickOutside:function(event){
12879if(!this._isEventTargetInWidget(event)){
12880this.close();
12881}
12882},
12883_appendTo:function(){
12884var element=this.options.appendTo;
12885if(element){
12886element=element.jquery||element.nodeType?
12887$(element):
12888this.document.find(element).eq(0);
12889}
12890if(!element||!element[0]){
12891element=this.element.closest(".ui-front, dialog");
12892}
12893if(!element.length){
12894element=this.document[0].body;
12895}
12896return element;
12897},
12898_initSource:function(){
12899var array,url,
12900that=this;
12901if(Array.isArray(this.options.source)){
12902array=this.options.source;
12903this.source=function(request,response){
12904response($.ui.autocomplete.filter(array,request.term));
12905};
12906}else if(typeof this.options.source==="string"){
12907url=this.options.source;
12908this.source=function(request,response){
12909if(that.xhr){
12910that.xhr.abort();
12911}
12912that.xhr=$.ajax({
12913url:url,
12914data:request,
12915dataType:"json",
12916success:function(data){
12917response(data);
12918},
12919error:function(){
12920response([]);
12921}
12922});
12923};
12924}else{
12925this.source=this.options.source;
12926}
12927},
12928_searchTimeout:function(event){
12929clearTimeout(this.searching);
12930this.searching=this._delay(function(){
12931var equalValues=this.term===this._value(),
12932menuVisible=this.menu.element.is(":visible"),
12933modifierKey=event.altKey||event.ctrlKey||event.metaKey||event.shiftKey;
12934if(!equalValues||(equalValues&&!menuVisible&&!modifierKey)){
12935this.selectedItem=null;
12936this.search(null,event);
12937}
12938},this.options.delay);
12939},
12940search:function(value,event){
12941value=value!=null?value:this._value();
12942this.term=this._value();
12943if(value.length<this.options.minLength){
12944return this.close(event);
12945}
12946if(this._trigger("search",event)===false){
12947return;
12948}
12949return this._search(value);
12950},
12951_search:function(value){
12952this.pending++;
12953this._addClass("ui-autocomplete-loading");
12954this.cancelSearch=false;
12955this.source({term:value},this._response());
12956},
12957_response:function(){
12958var index=++this.requestIndex;
12959return function(content){
12960if(index===this.requestIndex){
12961this.__response(content);
12962}
12963this.pending--;
12964if(!this.pending){
12965this._removeClass("ui-autocomplete-loading");
12966}
12967}.bind(this);
12968},
12969__response:function(content){
12970if(content){
12971content=this._normalize(content);
12972}
12973this._trigger("response",null,{content:content});
12974if(!this.options.disabled&&content&&content.length&&!this.cancelSearch){
12975this._suggest(content);
12976this._trigger("open");
12977}else{
12978this._close();
12979}
12980},
12981close:function(event){
12982this.cancelSearch=true;
12983this._close(event);
12984},
12985_close:function(event){
12986this._off(this.document,"mousedown");
12987if(this.menu.element.is(":visible")){
12988this.menu.element.hide();
12989this.menu.blur();
12990this.isNewMenu=true;
12991this._trigger("close",event);
12992}
12993},
12994_change:function(event){
12995if(this.previous!==this._value()){
12996this._trigger("change",event,{item:this.selectedItem});
12997}
12998},
12999_normalize:function(items){
13000if(items.length&&items[0].label&&items[0].value){
13001return items;
13002}
13003return $.map(items,function(item){
13004if(typeof item==="string"){
13005return{
13006label:item,
13007value:item
13008};
13009}
13010return $.extend({},item,{
13011label:item.label||item.value,
13012value:item.value||item.label
13013});
13014});
13015},
13016_suggest:function(items){
13017var ul=this.menu.element.empty();
13018this._renderMenu(ul,items);
13019this.isNewMenu=true;
13020this.menu.refresh();
13021ul.show();
13022this._resizeMenu();
13023ul.position($.extend({
13024of:this.element
13025},this.options.position));
13026if(this.options.autoFocus){
13027this.menu.next();
13028}
13029this._on(this.document,{
13030mousedown:"_closeOnClickOutside"
13031});
13032},
13033_resizeMenu:function(){
13034var ul=this.menu.element;
13035ul.outerWidth(Math.max(
13036ul.width("").outerWidth()+1,
13037this.element.outerWidth()
13038));
13039},
13040_renderMenu:function(ul,items){
13041var that=this;
13042$.each(items,function(index,item){
13043that._renderItemData(ul,item);
13044});
13045},
13046_renderItemData:function(ul,item){
13047return this._renderItem(ul,item).data("ui-autocomplete-item",item);
13048},
13049_renderItem:function(ul,item){
13050return $("<li>")
13051.append($("<div>").text(item.label))
13052.appendTo(ul);
13053},
13054_move:function(direction,event){
13055if(!this.menu.element.is(":visible")){
13056this.search(null,event);
13057return;
13058}
13059if(this.menu.isFirstItem()&&/^previous/.test(direction)||
13060this.menu.isLastItem()&&/^next/.test(direction)){
13061if(!this.isMultiLine){
13062this._value(this.term);
13063}
13064this.menu.blur();
13065return;
13066}
13067this.menu[direction](event);
13068},
13069widget:function(){
13070return this.menu.element;
13071},
13072_value:function(){
13073return this.valueMethod.apply(this.element,arguments);
13074},
13075_keyEvent:function(keyEvent,event){
13076if(!this.isMultiLine||this.menu.element.is(":visible")){
13077this._move(keyEvent,event);
13078event.preventDefault();
13079}
13080}
13081});
13082$.extend($.ui.autocomplete,{
13083escapeRegex:function(value){
13084return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");
13085},
13086filter:function(array,term){
13087var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");
13088return $.grep(array,function(value){
13089return matcher.test(value.label||value.value||value);
13090});
13091}
13092});
13093$.widget("ui.autocomplete",$.ui.autocomplete,{
13094options:{
13095messages:{
13096noResults:"No search results.",
13097results:function(amount){
13098return amount+(amount>1?" results are":" result is")+
13099" available, use up and down arrow keys to navigate.";
13100}
13101}
13102},
13103__response:function(content){
13104var message;
13105this._superApply(arguments);
13106if(this.options.disabled||this.cancelSearch){
13107return;
13108}
13109if(content&&content.length){
13110message=this.options.messages.results(content.length);
13111}else{
13112message=this.options.messages.noResults;
13113}
13114clearTimeout(this.liveRegionTimer);
13115this.liveRegionTimer=this._delay(function(){
13116this.liveRegion.html($("<div>").text(message));
13117},100);
13118}
13119});
13120var widgetsAutocomplete=$.ui.autocomplete;
13121var controlgroupCornerRegex=/ui-corner-([a-z]){2,6}/g;
13122var widgetsControlgroup=$.widget("ui.controlgroup",{
13123version:"1.14.1",
13124defaultElement:"<div>",
13125options:{
13126direction:"horizontal",
13127disabled:null,
13128onlyVisible:true,
13129items:{
13130"button":"input[type=button], input[type=submit], input[type=reset], button, a",
13131"controlgroupLabel":".ui-controlgroup-label",
13132"checkboxradio":"input[type='checkbox'], input[type='radio']",
13133"selectmenu":"select",
13134"spinner":".ui-spinner-input"
13135}
13136},
13137_create:function(){
13138this._enhance();
13139},
13140_enhance:function(){
13141this.element.attr("role","toolbar");
13142this.refresh();
13143},
13144_destroy:function(){
13145this._callChildMethod("destroy");
13146this.childWidgets.removeData("ui-controlgroup-data");
13147this.element.removeAttr("role");
13148if(this.options.items.controlgroupLabel){
13149this.element
13150.find(this.options.items.controlgroupLabel)
13151.find(".ui-controlgroup-label-contents")
13152.contents().unwrap();
13153}
13154},
13155_initWidgets:function(){
13156var that=this,
13157childWidgets=[];
13158$.each(this.options.items,function(widget,selector){
13159var labels;
13160var options={};
13161if(!selector){
13162return;
13163}
13164if(widget==="controlgroupLabel"){
13165labels=that.element.find(selector);
13166labels.each(function(){
13167var element=$(this);
13168if(element.children(".ui-controlgroup-label-contents").length){
13169return;
13170}
13171element.contents()
13172.wrapAll("<span class='ui-controlgroup-label-contents'></span>");
13173});
13174that._addClass(labels,null,"ui-widget ui-widget-content ui-state-default");
13175childWidgets=childWidgets.concat(labels.get());
13176return;
13177}
13178if(!$.fn[widget]){
13179return;
13180}
13181if(that["_"+widget+"Options"]){
13182options=that["_"+widget+"Options"]("middle");
13183}else{
13184options={classes:{}};
13185}
13186that.element
13187.find(selector)
13188.each(function(){
13189var element=$(this);
13190var instance=element[widget]("instance");
13191var instanceOptions=$.widget.extend({},options);
13192if(widget==="button"&&element.parent(".ui-spinner").length){
13193return;
13194}
13195if(!instance){
13196instance=element[widget]()[widget]("instance");
13197}
13198if(instance){
13199instanceOptions.classes=
13200that._resolveClassesValues(instanceOptions.classes,instance);
13201}
13202element[widget](instanceOptions);
13203var widgetElement=element[widget]("widget");
13204$.data(widgetElement[0],"ui-controlgroup-data",
13205instance?instance:element[widget]("instance"));
13206childWidgets.push(widgetElement[0]);
13207});
13208});
13209this.childWidgets=$($.uniqueSort(childWidgets));
13210this._addClass(this.childWidgets,"ui-controlgroup-item");
13211},
13212_callChildMethod:function(method){
13213this.childWidgets.each(function(){
13214var element=$(this),
13215data=element.data("ui-controlgroup-data");
13216if(data&&data[method]){
13217data[method]();
13218}
13219});
13220},
13221_updateCornerClass:function(element,position){
13222var remove="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
13223var add=this._buildSimpleOptions(position,"label").classes.label;
13224this._removeClass(element,null,remove);
13225this._addClass(element,null,add);
13226},
13227_buildSimpleOptions:function(position,key){
13228var direction=this.options.direction==="vertical";
13229var result={
13230classes:{}
13231};
13232result.classes[key]={
13233"middle":"",
13234"first":"ui-corner-"+(direction?"top":"left"),
13235"last":"ui-corner-"+(direction?"bottom":"right"),
13236"only":"ui-corner-all"
13237}[position];
13238return result;
13239},
13240_spinnerOptions:function(position){
13241var options=this._buildSimpleOptions(position,"ui-spinner");
13242options.classes["ui-spinner-up"]="";
13243options.classes["ui-spinner-down"]="";
13244return options;
13245},
13246_buttonOptions:function(position){
13247return this._buildSimpleOptions(position,"ui-button");
13248},
13249_checkboxradioOptions:function(position){
13250return this._buildSimpleOptions(position,"ui-checkboxradio-label");
13251},
13252_selectmenuOptions:function(position){
13253var direction=this.options.direction==="vertical";
13254return{
13255width:direction?"auto":false,
13256classes:{
13257middle:{
13258"ui-selectmenu-button-open":"",
13259"ui-selectmenu-button-closed":""
13260},
13261first:{
13262"ui-selectmenu-button-open":"ui-corner-"+(direction?"top":"tl"),
13263"ui-selectmenu-button-closed":"ui-corner-"+(direction?"top":"left")
13264},
13265last:{
13266"ui-selectmenu-button-open":direction?"":"ui-corner-tr",
13267"ui-selectmenu-button-closed":"ui-corner-"+(direction?"bottom":"right")
13268},
13269only:{
13270"ui-selectmenu-button-open":"ui-corner-top",
13271"ui-selectmenu-button-closed":"ui-corner-all"
13272}
13273}[position]
13274};
13275},
13276_resolveClassesValues:function(classes,instance){
13277var result={};
13278$.each(classes,function(key){
13279var current=instance.options.classes[key]||"";
13280current=String.prototype.trim.call(current.replace(controlgroupCornerRegex,""));
13281result[key]=(current+" "+classes[key]).replace(/\s+/g," ");
13282});
13283return result;
13284},
13285_setOption:function(key,value){
13286if(key==="direction"){
13287this._removeClass("ui-controlgroup-"+this.options.direction);
13288}
13289this._super(key,value);
13290if(key==="disabled"){
13291this._callChildMethod(value?"disable":"enable");
13292return;
13293}
13294this.refresh();
13295},
13296refresh:function(){
13297var children,
13298that=this;
13299this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction);
13300if(this.options.direction==="horizontal"){
13301this._addClass(null,"ui-helper-clearfix");
13302}
13303this._initWidgets();
13304children=this.childWidgets;
13305if(this.options.onlyVisible){
13306children=children.filter(":visible");
13307}
13308if(children.length){
13309$.each(["first","last"],function(index,value){
13310var instance=children[value]().data("ui-controlgroup-data");
13311if(instance&&that["_"+instance.widgetName+"Options"]){
13312var options=that["_"+instance.widgetName+"Options"](
13313children.length===1?"only":value
13314);
13315options.classes=that._resolveClassesValues(options.classes,instance);
13316instance.element[instance.widgetName](options);
13317}else{
13318that._updateCornerClass(children[value](),value);
13319}
13320});
13321this._callChildMethod("refresh");
13322}
13323}
13324});
13325$.widget("ui.checkboxradio",[$.ui.formResetMixin,{
13326version:"1.14.1",
13327options:{
13328disabled:null,
13329label:null,
13330icon:true,
13331classes:{
13332"ui-checkboxradio-label":"ui-corner-all",
13333"ui-checkboxradio-icon":"ui-corner-all"
13334}
13335},
13336_getCreateOptions:function(){
13337var disabled,labels,labelContents;
13338var options=this._super()||{};
13339this._readType();
13340labels=this.element.labels();
13341this.label=$(labels[labels.length-1]);
13342if(!this.label.length){
13343$.error("No label found for checkboxradio widget");
13344}
13345this.originalLabel="";
13346labelContents=this.label.contents().not(this.element[0]);
13347if(labelContents.length){
13348this.originalLabel+=labelContents
13349.clone()
13350.wrapAll("<div></div>")
13351.parent()
13352.html();
13353}
13354if(this.originalLabel){
13355options.label=this.originalLabel;
13356}
13357disabled=this.element[0].disabled;
13358if(disabled!=null){
13359options.disabled=disabled;
13360}
13361return options;
13362},
13363_create:function(){
13364var checked=this.element[0].checked;
13365this._bindFormResetHandler();
13366if(this.options.disabled==null){
13367this.options.disabled=this.element[0].disabled;
13368}
13369this._setOption("disabled",this.options.disabled);
13370this._addClass("ui-checkboxradio","ui-helper-hidden-accessible");
13371this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget");
13372if(this.type==="radio"){
13373this._addClass(this.label,"ui-checkboxradio-radio-label");
13374}
13375if(this.options.label&&this.options.label!==this.originalLabel){
13376this._updateLabel();
13377}else if(this.originalLabel){
13378this.options.label=this.originalLabel;
13379}
13380this._enhance();
13381if(checked){
13382this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active");
13383}
13384this._on({
13385change:"_toggleClasses",
13386focus:function(){
13387this._addClass(this.label,null,"ui-state-focus ui-visual-focus");
13388},
13389blur:function(){
13390this._removeClass(this.label,null,"ui-state-focus ui-visual-focus");
13391}
13392});
13393},
13394_readType:function(){
13395var nodeName=this.element[0].nodeName.toLowerCase();
13396this.type=this.element[0].type;
13397if(nodeName!=="input"||!/radio|checkbox/.test(this.type)){
13398$.error("Can't create checkboxradio on element.nodeName="+nodeName+
13399" and element.type="+this.type);
13400}
13401},
13402_enhance:function(){
13403this._updateIcon(this.element[0].checked);
13404},
13405widget:function(){
13406return this.label;
13407},
13408_getRadioGroup:function(){
13409var group;
13410var name=this.element[0].name;
13411var nameSelector="input[name='"+CSS.escape(name)+"']";
13412if(!name){
13413return $([]);
13414}
13415if(this.form.length){
13416group=$(this.form[0].elements).filter(nameSelector);
13417}else{
13418group=$(nameSelector).filter(function(){
13419return $($(this).prop("form")).length===0;
13420});
13421}
13422return group.not(this.element);
13423},
13424_toggleClasses:function(){
13425var checked=this.element[0].checked;
13426this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",checked);
13427if(this.options.icon&&this.type==="checkbox"){
13428this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",checked)
13429._toggleClass(this.icon,null,"ui-icon-blank",!checked);
13430}
13431if(this.type==="radio"){
13432this._getRadioGroup()
13433.each(function(){
13434var instance=$(this).checkboxradio("instance");
13435if(instance){
13436instance._removeClass(instance.label,
13437"ui-checkboxradio-checked","ui-state-active");
13438}
13439});
13440}
13441},
13442_destroy:function(){
13443this._unbindFormResetHandler();
13444if(this.icon){
13445this.icon.remove();
13446this.iconSpace.remove();
13447}
13448},
13449_setOption:function(key,value){
13450if(key==="label"&&!value){
13451return;
13452}
13453this._super(key,value);
13454if(key==="disabled"){
13455this._toggleClass(this.label,null,"ui-state-disabled",value);
13456this.element[0].disabled=value;
13457return;
13458}
13459this.refresh();
13460},
13461_updateIcon:function(checked){
13462var toAdd="ui-icon ui-icon-background ";
13463if(this.options.icon){
13464if(!this.icon){
13465this.icon=$("<span>");
13466this.iconSpace=$("<span> </span>");
13467this._addClass(this.iconSpace,"ui-checkboxradio-icon-space");
13468}
13469if(this.type==="checkbox"){
13470toAdd+=checked?"ui-icon-check ui-state-checked":"ui-icon-blank";
13471this._removeClass(this.icon,null,checked?"ui-icon-blank":"ui-icon-check");
13472}else{
13473toAdd+="ui-icon-blank";
13474}
13475this._addClass(this.icon,"ui-checkboxradio-icon",toAdd);
13476if(!checked){
13477this._removeClass(this.icon,null,"ui-icon-check ui-state-checked");
13478}
13479this.icon.prependTo(this.label).after(this.iconSpace);
13480}else if(this.icon!==undefined){
13481this.icon.remove();
13482this.iconSpace.remove();
13483delete this.icon;
13484}
13485},
13486_updateLabel:function(){
13487var contents=this.label.contents().not(this.element[0]);
13488if(this.icon){
13489contents=contents.not(this.icon[0]);
13490}
13491if(this.iconSpace){
13492contents=contents.not(this.iconSpace[0]);
13493}
13494contents.remove();
13495this.label.append(this.options.label);
13496},
13497refresh:function(){
13498var checked=this.element[0].checked,
13499isDisabled=this.element[0].disabled;
13500this._updateIcon(checked);
13501this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",checked);
13502if(this.options.label!==null){
13503this._updateLabel();
13504}
13505if(isDisabled!==this.options.disabled){
13506this._setOptions({"disabled":isDisabled});
13507}
13508}
13509}]);
13510var widgetsCheckboxradio=$.ui.checkboxradio;
13511$.widget("ui.button",{
13512version:"1.14.1",
13513defaultElement:"<button>",
13514options:{
13515classes:{
13516"ui-button":"ui-corner-all"
13517},
13518disabled:null,
13519icon:null,
13520iconPosition:"beginning",
13521label:null,
13522showLabel:true
13523},
13524_getCreateOptions:function(){
13525var disabled,
13526options=this._super()||{};
13527this.isInput=this.element.is("input");
13528disabled=this.element[0].disabled;
13529if(disabled!=null){
13530options.disabled=disabled;
13531}
13532this.originalLabel=this.isInput?this.element.val():this.element.html();
13533if(this.originalLabel){
13534options.label=this.originalLabel;
13535}
13536return options;
13537},
13538_create:function(){
13539if(!this.option.showLabel&!this.options.icon){
13540this.options.showLabel=true;
13541}
13542if(this.options.disabled==null){
13543this.options.disabled=this.element[0].disabled||false;
13544}
13545this.hasTitle=!!this.element.attr("title");
13546if(this.options.label&&this.options.label!==this.originalLabel){
13547if(this.isInput){
13548this.element.val(this.options.label);
13549}else{
13550this.element.html(this.options.label);
13551}
13552}
13553this._addClass("ui-button","ui-widget");
13554this._setOption("disabled",this.options.disabled);
13555this._enhance();
13556if(this.element.is("a")){
13557this._on({
13558"keyup":function(event){
13559if(event.keyCode===$.ui.keyCode.SPACE){
13560event.preventDefault();
13561if(this.element[0].click){
13562this.element[0].click();
13563}else{
13564this.element.trigger("click");
13565}
13566}
13567}
13568});
13569}
13570},
13571_enhance:function(){
13572if(!this.element.is("button")){
13573this.element.attr("role","button");
13574}
13575if(this.options.icon){
13576this._updateIcon("icon",this.options.icon);
13577this._updateTooltip();
13578}
13579},
13580_updateTooltip:function(){
13581this.title=this.element.attr("title");
13582if(!this.options.showLabel&&!this.title){
13583this.element.attr("title",this.options.label);
13584}
13585},
13586_updateIcon:function(option,value){
13587var icon=option!=="iconPosition",
13588position=icon?this.options.iconPosition:value,
13589displayBlock=position==="top"||position==="bottom";
13590if(!this.icon){
13591this.icon=$("<span>");
13592this._addClass(this.icon,"ui-button-icon","ui-icon");
13593if(!this.options.showLabel){
13594this._addClass("ui-button-icon-only");
13595}
13596}else if(icon){
13597this._removeClass(this.icon,null,this.options.icon);
13598}
13599if(icon){
13600this._addClass(this.icon,null,value);
13601}
13602this._attachIcon(position);
13603if(displayBlock){
13604this._addClass(this.icon,null,"ui-widget-icon-block");
13605if(this.iconSpace){
13606this.iconSpace.remove();
13607}
13608}else{
13609if(!this.iconSpace){
13610this.iconSpace=$("<span> </span>");
13611this._addClass(this.iconSpace,"ui-button-icon-space");
13612}
13613this._removeClass(this.icon,null,"ui-wiget-icon-block");
13614this._attachIconSpace(position);
13615}
13616},
13617_destroy:function(){
13618this.element.removeAttr("role");
13619if(this.icon){
13620this.icon.remove();
13621}
13622if(this.iconSpace){
13623this.iconSpace.remove();
13624}
13625if(!this.hasTitle){
13626this.element.removeAttr("title");
13627}
13628},
13629_attachIconSpace:function(iconPosition){
13630this.icon[/^(?:end|bottom)/.test(iconPosition)?"before":"after"](this.iconSpace);
13631},
13632_attachIcon:function(iconPosition){
13633this.element[/^(?:end|bottom)/.test(iconPosition)?"append":"prepend"](this.icon);
13634},
13635_setOptions:function(options){
13636var newShowLabel=options.showLabel===undefined?
13637this.options.showLabel:
13638options.showLabel,
13639newIcon=options.icon===undefined?this.options.icon:options.icon;
13640if(!newShowLabel&&!newIcon){
13641options.showLabel=true;
13642}
13643this._super(options);
13644},
13645_setOption:function(key,value){
13646if(key==="icon"){
13647if(value){
13648this._updateIcon(key,value);
13649}else if(this.icon){
13650this.icon.remove();
13651if(this.iconSpace){
13652this.iconSpace.remove();
13653}
13654}
13655}
13656if(key==="iconPosition"){
13657this._updateIcon(key,value);
13658}
13659if(key==="showLabel"){
13660this._toggleClass("ui-button-icon-only",null,!value);
13661this._updateTooltip();
13662}
13663if(key==="label"){
13664if(this.isInput){
13665this.element.val(value);
13666}else{
13667this.element.html(value);
13668if(this.icon){
13669this._attachIcon(this.options.iconPosition);
13670this._attachIconSpace(this.options.iconPosition);
13671}
13672}
13673}
13674this._super(key,value);
13675if(key==="disabled"){
13676this._toggleClass(null,"ui-state-disabled",value);
13677this.element[0].disabled=value;
13678if(value){
13679this.element.trigger("blur");
13680}
13681}
13682},
13683refresh:function(){
13684var isDisabled=this.element.is("input, button")?
13685this.element[0].disabled:this.element.hasClass("ui-button-disabled");
13686if(isDisabled!==this.options.disabled){
13687this._setOptions({disabled:isDisabled});
13688}
13689this._updateTooltip();
13690}
13691});
13692if($.uiBackCompat===true){
13693$.widget("ui.button",$.ui.button,{
13694options:{
13695text:true,
13696icons:{
13697primary:null,
13698secondary:null
13699}
13700},
13701_create:function(){
13702if(this.options.showLabel&&!this.options.text){
13703this.options.showLabel=this.options.text;
13704}
13705if(!this.options.showLabel&&this.options.text){
13706this.options.text=this.options.showLabel;
13707}
13708if(!this.options.icon&&(this.options.icons.primary||
13709this.options.icons.secondary)){
13710if(this.options.icons.primary){
13711this.options.icon=this.options.icons.primary;
13712}else{
13713this.options.icon=this.options.icons.secondary;
13714this.options.iconPosition="end";
13715}
13716}else if(this.options.icon){
13717this.options.icons.primary=this.options.icon;
13718}
13719this._super();
13720},
13721_setOption:function(key,value){
13722if(key==="text"){
13723this._super("showLabel",value);
13724return;
13725}
13726if(key==="showLabel"){
13727this.options.text=value;
13728}
13729if(key==="icon"){
13730this.options.icons.primary=value;
13731}
13732if(key==="icons"){
13733if(value.primary){
13734this._super("icon",value.primary);
13735this._super("iconPosition","beginning");
13736}else if(value.secondary){
13737this._super("icon",value.secondary);
13738this._super("iconPosition","end");
13739}
13740}
13741this._superApply(arguments);
13742}
13743});
13744$.fn.button=(function(orig){
13745return function(options){
13746var isMethodCall=typeof options==="string";
13747var args=Array.prototype.slice.call(arguments,1);
13748var returnValue=this;
13749if(isMethodCall){
13750if(!this.length&&options==="instance"){
13751returnValue=undefined;
13752}else{
13753this.each(function(){
13754var methodValue;
13755var type=$(this).attr("type");
13756var name=type!=="checkbox"&&type!=="radio"?
13757"button":
13758"checkboxradio";
13759var instance=$.data(this,"ui-"+name);
13760if(options==="instance"){
13761returnValue=instance;
13762return false;
13763}
13764if(!instance){
13765return $.error("cannot call methods on button"+
13766" prior to initialization; "+
13767"attempted to call method '"+options+"'");
13768}
13769if(typeof instance[options]!=="function"||
13770options.charAt(0)==="_"){
13771return $.error("no such method '"+options+"' for button"+
13772" widget instance");
13773}
13774methodValue=instance[options].apply(instance,args);
13775if(methodValue!==instance&&methodValue!==undefined){
13776returnValue=methodValue&&methodValue.jquery?
13777returnValue.pushStack(methodValue.get()):
13778methodValue;
13779return false;
13780}
13781});
13782}
13783}else{
13784if(args.length){
13785options=$.widget.extend.apply(null,[options].concat(args));
13786}
13787this.each(function(){
13788var type=$(this).attr("type");
13789var name=type!=="checkbox"&&type!=="radio"?"button":"checkboxradio";
13790var instance=$.data(this,"ui-"+name);
13791if(instance){
13792instance.option(options||{});
13793if(instance._init){
13794instance._init();
13795}
13796}else{
13797if(name==="button"){
13798orig.call($(this),options);
13799return;
13800}
13801$(this).checkboxradio($.extend({icon:false},options));
13802}
13803});
13804}
13805return returnValue;
13806};
13807})($.fn.button);
13808$.fn.buttonset=function(){
13809if(!$.ui.controlgroup){
13810$.error("Controlgroup widget missing");
13811}
13812if(arguments[0]==="option"&&arguments[1]==="items"&&arguments[2]){
13813return this.controlgroup.apply(this,
13814[arguments[0],"items.button",arguments[2]]);
13815}
13816if(arguments[0]==="option"&&arguments[1]==="items"){
13817return this.controlgroup.apply(this,[arguments[0],"items.button"]);
13818}
13819if(typeof arguments[0]==="object"&&arguments[0].items){
13820arguments[0].items={
13821button:arguments[0].items
13822};
13823}
13824return this.controlgroup.apply(this,arguments);
13825};
13826}
13827var widgetsButton=$.ui.button;
13828$.extend($.ui,{datepicker:{version:"1.14.1"}});
13829var datepicker_instActive;
13830function datepicker_getZindex(elem){
13831var position,value;
13832while(elem.length&&elem[0]!==document){
13833position=elem.css("position");
13834if(position==="absolute"||position==="relative"||position==="fixed"){
13835value=parseInt(elem.css("zIndex"),10);
13836if(!isNaN(value)&&value!==0){
13837return value;
13838}
13839}
13840elem=elem.parent();
13841}
13842return 0;
13843}
13844function Datepicker(){
13845this._curInst=null;
13846this._keyEvent=false;
13847this._disabledInputs=[];
13848this._datepickerShowing=false;
13849this._inDialog=false;
13850this._mainDivId="ui-datepicker-div";
13851this._inlineClass="ui-datepicker-inline";
13852this._appendClass="ui-datepicker-append";
13853this._triggerClass="ui-datepicker-trigger";
13854this._dialogClass="ui-datepicker-dialog";
13855this._disableClass="ui-datepicker-disabled";
13856this._unselectableClass="ui-datepicker-unselectable";
13857this._currentClass="ui-datepicker-current-day";
13858this._dayOverClass="ui-datepicker-days-cell-over";
13859this.regional=[];
13860this.regional[""]={
13861closeText:"Done",
13862prevText:"Prev",
13863nextText:"Next",
13864currentText:"Today",
13865monthNames:["January","February","March","April","May","June",
13866"July","August","September","October","November","December"],
13867monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
13868dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
13869dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],
13870dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],
13871weekHeader:"Wk",
13872dateFormat:"mm/dd/yy",
13873firstDay:0,
13874isRTL:false,
13875showMonthAfterYear:false,
13876yearSuffix:"",
13877selectMonthLabel:"Select month",
13878selectYearLabel:"Select year"
13879};
13880this._defaults={
13881showOn:"focus",
13882showAnim:"fadeIn",
13883showOptions:{},
13884defaultDate:null,
13885appendText:"",
13886buttonText:"...",
13887buttonImage:"",
13888buttonImageOnly:false,
13889hideIfNoPrevNext:false,
13890navigationAsDateFormat:false,
13891gotoCurrent:false,
13892changeMonth:false,
13893changeYear:false,
13894yearRange:"c-10:c+10",
13895showOtherMonths:false,
13896selectOtherMonths:false,
13897showWeek:false,
13898calculateWeek:this.iso8601Week,
13899shortYearCutoff:"+10",
13900minDate:null,
13901maxDate:null,
13902duration:"fast",
13903beforeShowDay:null,
13904beforeShow:null,
13905onSelect:null,
13906onChangeMonthYear:null,
13907onClose:null,
13908onUpdateDatepicker:null,
13909numberOfMonths:1,
13910showCurrentAtPos:0,
13911stepMonths:1,
13912stepBigMonths:12,
13913altField:"",
13914altFormat:"",
13915constrainInput:true,
13916showButtonPanel:false,
13917autoSize:false,
13918disabled:false
13919};
13920$.extend(this._defaults,this.regional[""]);
13921this.regional.en=$.extend(true,{},this.regional[""]);
13922this.regional["en-US"]=$.extend(true,{},this.regional.en);
13923this.dpDiv=datepicker_bindHover($("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
13924}
13925$.extend(Datepicker.prototype,{
13926markerClassName:"hasDatepicker",
13927maxRows:4,
13928_widgetDatepicker:function(){
13929return this.dpDiv;
13930},
13931setDefaults:function(settings){
13932datepicker_extendRemove(this._defaults,settings||{});
13933return this;
13934},
13935_attachDatepicker:function(target,settings){
13936var nodeName,inline,inst;
13937nodeName=target.nodeName.toLowerCase();
13938inline=(nodeName==="div"||nodeName==="span");
13939if(!target.id){
13940this.uuid+=1;
13941target.id="dp"+this.uuid;
13942}
13943inst=this._newInst($(target),inline);
13944inst.settings=$.extend({},settings||{});
13945if(nodeName==="input"){
13946this._connectDatepicker(target,inst);
13947}else if(inline){
13948this._inlineDatepicker(target,inst);
13949}
13950},
13951_newInst:function(target,inline){
13952var id=target[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");
13953return{id:id,input:target,
13954selectedDay:0,selectedMonth:0,selectedYear:0,
13955drawMonth:0,drawYear:0,
13956inline:inline,
13957dpDiv:(!inline?this.dpDiv:
13958datepicker_bindHover($("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
13959},
13960_connectDatepicker:function(target,inst){
13961var input=$(target);
13962inst.append=$([]);
13963inst.trigger=$([]);
13964if(input.hasClass(this.markerClassName)){
13965return;
13966}
13967this._attachments(input,inst);
13968input.addClass(this.markerClassName).on("keydown",this._doKeyDown).
13969on("keypress",this._doKeyPress).on("keyup",this._doKeyUp);
13970this._autoSize(inst);
13971$.data(target,"datepicker",inst);
13972if(inst.settings.disabled){
13973this._disableDatepicker(target);
13974}
13975},
13976_attachments:function(input,inst){
13977var showOn,buttonText,buttonImage,
13978appendText=this._get(inst,"appendText"),
13979isRTL=this._get(inst,"isRTL");
13980if(inst.append){
13981inst.append.remove();
13982}
13983if(appendText){
13984inst.append=$("<span>")
13985.addClass(this._appendClass)
13986.text(appendText);
13987input[isRTL?"before":"after"](inst.append);
13988}
13989input.off("focus",this._showDatepicker);
13990if(inst.trigger){
13991inst.trigger.remove();
13992}
13993showOn=this._get(inst,"showOn");
13994if(showOn==="focus"||showOn==="both"){
13995input.on("focus",this._showDatepicker);
13996}
13997if(showOn==="button"||showOn==="both"){
13998buttonText=this._get(inst,"buttonText");
13999buttonImage=this._get(inst,"buttonImage");
14000if(this._get(inst,"buttonImageOnly")){
14001inst.trigger=$("<img>")
14002.addClass(this._triggerClass)
14003.attr({
14004src:buttonImage,
14005alt:buttonText,
14006title:buttonText
14007});
14008}else{
14009inst.trigger=$("<button type='button'>")
14010.addClass(this._triggerClass);
14011if(buttonImage){
14012inst.trigger.html(
14013$("<img>")
14014.attr({
14015src:buttonImage,
14016alt:buttonText,
14017title:buttonText
14018})
14019);
14020}else{
14021inst.trigger.text(buttonText);
14022}
14023}
14024input[isRTL?"before":"after"](inst.trigger);
14025inst.trigger.on("click",function(){
14026if($.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]){
14027$.datepicker._hideDatepicker();
14028}else if($.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]){
14029$.datepicker._hideDatepicker();
14030$.datepicker._showDatepicker(input[0]);
14031}else{
14032$.datepicker._showDatepicker(input[0]);
14033}
14034return false;
14035});
14036}
14037},
14038_autoSize:function(inst){
14039if(this._get(inst,"autoSize")&&!inst.inline){
14040var findMax,max,maxI,i,
14041date=new Date(2009,12-1,20),
14042dateFormat=this._get(inst,"dateFormat");
14043if(dateFormat.match(/[DM]/)){
14044findMax=function(names){
14045max=0;
14046maxI=0;
14047for(i=0;i<names.length;i++){
14048if(names[i].length>max){
14049max=names[i].length;
14050maxI=i;
14051}
14052}
14053return maxI;
14054};
14055date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?
14056"monthNames":"monthNamesShort"))));
14057date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?
14058"dayNames":"dayNamesShort")))+20-date.getDay());
14059}
14060inst.input.attr("size",this._formatDate(inst,date).length);
14061}
14062},
14063_inlineDatepicker:function(target,inst){
14064var divSpan=$(target);
14065if(divSpan.hasClass(this.markerClassName)){
14066return;
14067}
14068divSpan.addClass(this.markerClassName).append(inst.dpDiv);
14069$.data(target,"datepicker",inst);
14070this._setDate(inst,this._getDefaultDate(inst),true);
14071this._updateDatepicker(inst);
14072this._updateAlternate(inst);
14073if(inst.settings.disabled){
14074this._disableDatepicker(target);
14075}
14076inst.dpDiv.css("display","block");
14077},
14078_dialogDatepicker:function(input,date,onSelect,settings,pos){
14079var id,browserWidth,browserHeight,scrollX,scrollY,
14080inst=this._dialogInst;
14081if(!inst){
14082this.uuid+=1;
14083id="dp"+this.uuid;
14084this._dialogInput=$("<input type='text' id='"+id+
14085"' style='position: absolute; top: -100px; width: 0px;'/>");
14086this._dialogInput.on("keydown",this._doKeyDown);
14087$("body").append(this._dialogInput);
14088inst=this._dialogInst=this._newInst(this._dialogInput,false);
14089inst.settings={};
14090$.data(this._dialogInput[0],"datepicker",inst);
14091}
14092datepicker_extendRemove(inst.settings,settings||{});
14093date=(date&&date.constructor===Date?this._formatDate(inst,date):date);
14094this._dialogInput.val(date);
14095this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);
14096if(!this._pos){
14097browserWidth=document.documentElement.clientWidth;
14098browserHeight=document.documentElement.clientHeight;
14099scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;
14100scrollY=document.documentElement.scrollTop||document.body.scrollTop;
14101this._pos=
14102[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];
14103}
14104this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");
14105inst.settings.onSelect=onSelect;
14106this._inDialog=true;
14107this.dpDiv.addClass(this._dialogClass);
14108this._showDatepicker(this._dialogInput[0]);
14109if($.blockUI){
14110$.blockUI(this.dpDiv);
14111}
14112$.data(this._dialogInput[0],"datepicker",inst);
14113return this;
14114},
14115_destroyDatepicker:function(target){
14116var nodeName,
14117$target=$(target),
14118inst=$.data(target,"datepicker");
14119if(!$target.hasClass(this.markerClassName)){
14120return;
14121}
14122nodeName=target.nodeName.toLowerCase();
14123$.removeData(target,"datepicker");
14124if(nodeName==="input"){
14125inst.append.remove();
14126inst.trigger.remove();
14127$target.removeClass(this.markerClassName).
14128off("focus",this._showDatepicker).
14129off("keydown",this._doKeyDown).
14130off("keypress",this._doKeyPress).
14131off("keyup",this._doKeyUp);
14132}else if(nodeName==="div"||nodeName==="span"){
14133$target.removeClass(this.markerClassName).empty();
14134}
14135$.datepicker._hideDatepicker();
14136if(datepicker_instActive===inst){
14137datepicker_instActive=null;
14138this._curInst=null;
14139}
14140},
14141_enableDatepicker:function(target){
14142var nodeName,inline,
14143$target=$(target),
14144inst=$.data(target,"datepicker");
14145if(!$target.hasClass(this.markerClassName)){
14146return;
14147}
14148nodeName=target.nodeName.toLowerCase();
14149if(nodeName==="input"){
14150target.disabled=false;
14151inst.trigger.filter("button").
14152each(function(){
14153this.disabled=false;
14154}).end().
14155filter("img").css({opacity:"1.0",cursor:""});
14156}else if(nodeName==="div"||nodeName==="span"){
14157inline=$target.children("."+this._inlineClass);
14158inline.children().removeClass("ui-state-disabled");
14159inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
14160prop("disabled",false);
14161}
14162this._disabledInputs=$.map(this._disabledInputs,
14163function(value){
14164return(value===target?null:value);
14165});
14166},
14167_disableDatepicker:function(target){
14168var nodeName,inline,
14169$target=$(target),
14170inst=$.data(target,"datepicker");
14171if(!$target.hasClass(this.markerClassName)){
14172return;
14173}
14174nodeName=target.nodeName.toLowerCase();
14175if(nodeName==="input"){
14176target.disabled=true;
14177inst.trigger.filter("button").
14178each(function(){
14179this.disabled=true;
14180}).end().
14181filter("img").css({opacity:"0.5",cursor:"default"});
14182}else if(nodeName==="div"||nodeName==="span"){
14183inline=$target.children("."+this._inlineClass);
14184inline.children().addClass("ui-state-disabled");
14185inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
14186prop("disabled",true);
14187}
14188this._disabledInputs=$.map(this._disabledInputs,
14189function(value){
14190return(value===target?null:value);
14191});
14192this._disabledInputs[this._disabledInputs.length]=target;
14193},
14194_isDisabledDatepicker:function(target){
14195if(!target){
14196return false;
14197}
14198for(var i=0;i<this._disabledInputs.length;i++){
14199if(this._disabledInputs[i]===target){
14200return true;
14201}
14202}
14203return false;
14204},
14205_getInst:function(target){
14206try{
14207return $.data(target,"datepicker");
14208}catch(err){
14209throw"Missing instance data for this datepicker";
14210}
14211},
14212_optionDatepicker:function(target,name,value){
14213var settings,date,minDate,maxDate,
14214inst=this._getInst(target);
14215if(arguments.length===2&&typeof name==="string"){
14216return(name==="defaults"?$.extend({},$.datepicker._defaults):
14217(inst?(name==="all"?$.extend({},inst.settings):
14218this._get(inst,name)):null));
14219}
14220settings=name||{};
14221if(typeof name==="string"){
14222settings={};
14223settings[name]=value;
14224}
14225if(inst){
14226if(this._curInst===inst){
14227this._hideDatepicker();
14228}
14229date=this._getDateDatepicker(target,true);
14230minDate=this._getMinMaxDate(inst,"min");
14231maxDate=this._getMinMaxDate(inst,"max");
14232datepicker_extendRemove(inst.settings,settings);
14233if(minDate!==null&&settings.dateFormat!==undefined&&settings.minDate===undefined){
14234inst.settings.minDate=this._formatDate(inst,minDate);
14235}
14236if(maxDate!==null&&settings.dateFormat!==undefined&&settings.maxDate===undefined){
14237inst.settings.maxDate=this._formatDate(inst,maxDate);
14238}
14239if("disabled"in settings){
14240if(settings.disabled){
14241this._disableDatepicker(target);
14242}else{
14243this._enableDatepicker(target);
14244}
14245}
14246this._attachments($(target),inst);
14247this._autoSize(inst);
14248this._setDate(inst,date);
14249this._updateAlternate(inst);
14250this._updateDatepicker(inst);
14251}
14252},
14253_changeDatepicker:function(target,name,value){
14254this._optionDatepicker(target,name,value);
14255},
14256_refreshDatepicker:function(target){
14257var inst=this._getInst(target);
14258if(inst){
14259this._updateDatepicker(inst);
14260}
14261},
14262_setDateDatepicker:function(target,date){
14263var inst=this._getInst(target);
14264if(inst){
14265this._setDate(inst,date);
14266this._updateDatepicker(inst);
14267this._updateAlternate(inst);
14268}
14269},
14270_getDateDatepicker:function(target,noDefault){
14271var inst=this._getInst(target);
14272if(inst&&!inst.inline){
14273this._setDateFromField(inst,noDefault);
14274}
14275return(inst?this._getDate(inst):null);
14276},
14277_doKeyDown:function(event){
14278var onSelect,dateStr,sel,
14279inst=$.datepicker._getInst(event.target),
14280handled=true,
14281isRTL=inst.dpDiv.is(".ui-datepicker-rtl");
14282inst._keyEvent=true;
14283if($.datepicker._datepickerShowing){
14284switch(event.keyCode){
14285case 9:$.datepicker._hideDatepicker();
14286handled=false;
14287break;
14288case 13:sel=$("td."+$.datepicker._dayOverClass+":not(."+
14289$.datepicker._currentClass+")",inst.dpDiv);
14290if(sel[0]){
14291$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]);
14292}
14293onSelect=$.datepicker._get(inst,"onSelect");
14294if(onSelect){
14295dateStr=$.datepicker._formatDate(inst);
14296onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);
14297}else{
14298$.datepicker._hideDatepicker();
14299}
14300return false;
14301case 27:$.datepicker._hideDatepicker();
14302break;
14303case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?
14304-$.datepicker._get(inst,"stepBigMonths"):
14305-$.datepicker._get(inst,"stepMonths")),"M");
14306break;
14307case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?
14308+$.datepicker._get(inst,"stepBigMonths"):
14309+$.datepicker._get(inst,"stepMonths")),"M");
14310break;
14311case 35:if(event.ctrlKey||event.metaKey){
14312$.datepicker._clearDate(event.target);
14313}
14314handled=event.ctrlKey||event.metaKey;
14315break;
14316case 36:if(event.ctrlKey||event.metaKey){
14317$.datepicker._gotoToday(event.target);
14318}
14319handled=event.ctrlKey||event.metaKey;
14320break;
14321case 37:if(event.ctrlKey||event.metaKey){
14322$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D");
14323}
14324handled=event.ctrlKey||event.metaKey;
14325if(event.originalEvent.altKey){
14326$.datepicker._adjustDate(event.target,(event.ctrlKey?
14327-$.datepicker._get(inst,"stepBigMonths"):
14328-$.datepicker._get(inst,"stepMonths")),"M");
14329}
14330break;
14331case 38:if(event.ctrlKey||event.metaKey){
14332$.datepicker._adjustDate(event.target,-7,"D");
14333}
14334handled=event.ctrlKey||event.metaKey;
14335break;
14336case 39:if(event.ctrlKey||event.metaKey){
14337$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D");
14338}
14339handled=event.ctrlKey||event.metaKey;
14340if(event.originalEvent.altKey){
14341$.datepicker._adjustDate(event.target,(event.ctrlKey?
14342+$.datepicker._get(inst,"stepBigMonths"):
14343+$.datepicker._get(inst,"stepMonths")),"M");
14344}
14345break;
14346case 40:if(event.ctrlKey||event.metaKey){
14347$.datepicker._adjustDate(event.target,+7,"D");
14348}
14349handled=event.ctrlKey||event.metaKey;
14350break;
14351default:handled=false;
14352}
14353}else if(event.keyCode===36&&event.ctrlKey){
14354$.datepicker._showDatepicker(this);
14355}else{
14356handled=false;
14357}
14358if(handled){
14359event.preventDefault();
14360event.stopPropagation();
14361}
14362},
14363_doKeyPress:function(event){
14364var chars,chr,
14365inst=$.datepicker._getInst(event.target);
14366if($.datepicker._get(inst,"constrainInput")){
14367chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));
14368chr=String.fromCharCode(event.charCode==null?event.keyCode:event.charCode);
14369return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1);
14370}
14371},
14372_doKeyUp:function(event){
14373var date,
14374inst=$.datepicker._getInst(event.target);
14375if(inst.input.val()!==inst.lastVal){
14376try{
14377date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),
14378(inst.input?inst.input.val():null),
14379$.datepicker._getFormatConfig(inst));
14380if(date){
14381$.datepicker._setDateFromField(inst);
14382$.datepicker._updateAlternate(inst);
14383$.datepicker._updateDatepicker(inst);
14384}
14385}catch(err){
14386}
14387}
14388return true;
14389},
14390_showDatepicker:function(input){
14391input=input.target||input;
14392if(input.nodeName.toLowerCase()!=="input"){
14393input=$("input",input.parentNode)[0];
14394}
14395if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput===input){
14396return;
14397}
14398var inst,beforeShow,beforeShowSettings,isFixed,
14399offset,showAnim,duration;
14400inst=$.datepicker._getInst(input);
14401if($.datepicker._curInst&&$.datepicker._curInst!==inst){
14402$.datepicker._curInst.dpDiv.stop(true,true);
14403if(inst&&$.datepicker._datepickerShowing){
14404$.datepicker._hideDatepicker($.datepicker._curInst.input[0]);
14405}
14406}
14407beforeShow=$.datepicker._get(inst,"beforeShow");
14408beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};
14409if(beforeShowSettings===false){
14410return;
14411}
14412datepicker_extendRemove(inst.settings,beforeShowSettings);
14413inst.lastVal=null;
14414$.datepicker._lastInput=input;
14415$.datepicker._setDateFromField(inst);
14416if($.datepicker._inDialog){
14417input.value="";
14418}
14419if(!$.datepicker._pos){
14420$.datepicker._pos=$.datepicker._findPos(input);
14421$.datepicker._pos[1]+=input.offsetHeight;
14422}
14423isFixed=false;
14424$(input).parents().each(function(){
14425isFixed|=$(this).css("position")==="fixed";
14426return!isFixed;
14427});
14428offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};
14429$.datepicker._pos=null;
14430inst.dpDiv.empty();
14431inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});
14432$.datepicker._updateDatepicker(inst);
14433offset=$.datepicker._checkOffset(inst,offset,isFixed);
14434inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?
14435"static":(isFixed?"fixed":"absolute")),display:"none",
14436left:offset.left+"px",top:offset.top+"px"});
14437if(!inst.inline){
14438showAnim=$.datepicker._get(inst,"showAnim");
14439duration=$.datepicker._get(inst,"duration");
14440inst.dpDiv.css("z-index",datepicker_getZindex($(input))+1);
14441$.datepicker._datepickerShowing=true;
14442if($.effects&&$.effects.effect[showAnim]){
14443inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration);
14444}else{
14445inst.dpDiv[showAnim||"show"](showAnim?duration:null);
14446}
14447if($.datepicker._shouldFocusInput(inst)){
14448inst.input.trigger("focus");
14449}
14450$.datepicker._curInst=inst;
14451}
14452},
14453_updateDatepicker:function(inst){
14454this.maxRows=4;
14455datepicker_instActive=inst;
14456inst.dpDiv.empty().append(this._generateHTML(inst));
14457this._attachHandlers(inst);
14458var origyearshtml,
14459numMonths=this._getNumberOfMonths(inst),
14460cols=numMonths[1],
14461width=17,
14462activeCell=inst.dpDiv.find("."+this._dayOverClass+" a"),
14463onUpdateDatepicker=$.datepicker._get(inst,"onUpdateDatepicker");
14464if(activeCell.length>0){
14465datepicker_handleMouseover.apply(activeCell.get(0));
14466}
14467inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
14468if(cols>1){
14469inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em");
14470}
14471inst.dpDiv[(numMonths[0]!==1||numMonths[1]!==1?"add":"remove")+
14472"Class"]("ui-datepicker-multi");
14473inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+
14474"Class"]("ui-datepicker-rtl");
14475if(inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(inst)){
14476inst.input.trigger("focus");
14477}
14478if(inst.yearshtml){
14479origyearshtml=inst.yearshtml;
14480setTimeout(function(){
14481if(origyearshtml===inst.yearshtml&&inst.yearshtml){
14482inst.dpDiv.find("select.ui-datepicker-year").first().replaceWith(inst.yearshtml);
14483}
14484origyearshtml=inst.yearshtml=null;
14485},0);
14486}
14487if(onUpdateDatepicker){
14488onUpdateDatepicker.apply((inst.input?inst.input[0]:null),[inst]);
14489}
14490},
14491_shouldFocusInput:function(inst){
14492return inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled");
14493},
14494_checkOffset:function(inst,offset,isFixed){
14495var dpWidth=inst.dpDiv.outerWidth(),
14496dpHeight=inst.dpDiv.outerHeight(),
14497inputWidth=inst.input?inst.input.outerWidth():0,
14498inputHeight=inst.input?inst.input.outerHeight():0,
14499viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),
14500viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());
14501offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);
14502offset.left-=(isFixed&&offset.left===inst.input.offset().left)?$(document).scrollLeft():0;
14503offset.top-=(isFixed&&offset.top===(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;
14504offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?
14505Math.abs(offset.left+dpWidth-viewWidth):0);
14506offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?
14507Math.abs(dpHeight+inputHeight):0);
14508return offset;
14509},
14510_findPos:function(obj){
14511var position,
14512inst=this._getInst(obj),
14513isRTL=this._get(inst,"isRTL");
14514while(obj&&(obj.type==="hidden"||obj.nodeType!==1||$.expr.pseudos.hidden(obj))){
14515obj=obj[isRTL?"previousSibling":"nextSibling"];
14516}
14517position=$(obj).offset();
14518return[position.left,position.top];
14519},
14520_hideDatepicker:function(input){
14521var showAnim,duration,postProcess,onClose,
14522inst=this._curInst;
14523if(!inst||(input&&inst!==$.data(input,"datepicker"))){
14524return;
14525}
14526if(this._datepickerShowing){
14527showAnim=this._get(inst,"showAnim");
14528duration=this._get(inst,"duration");
14529postProcess=function(){
14530$.datepicker._tidyDialog(inst);
14531};
14532if($.effects&&($.effects.effect[showAnim])){
14533inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess);
14534}else{
14535inst.dpDiv[(showAnim==="slideDown"?"slideUp":
14536(showAnim==="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess);
14537}
14538if(!showAnim){
14539postProcess();
14540}
14541this._datepickerShowing=false;
14542onClose=this._get(inst,"onClose");
14543if(onClose){
14544onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst]);
14545}
14546this._lastInput=null;
14547if(this._inDialog){
14548this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});
14549if($.blockUI){
14550$.unblockUI();
14551$("body").append(this.dpDiv);
14552}
14553}
14554this._inDialog=false;
14555}
14556},
14557_tidyDialog:function(inst){
14558inst.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar");
14559},
14560_checkExternalClick:function(event){
14561if(!$.datepicker._curInst){
14562return;
14563}
14564var $target=$(event.target),
14565inst=$.datepicker._getInst($target[0]);
14566if((($target[0].id!==$.datepicker._mainDivId&&
14567$target.parents("#"+$.datepicker._mainDivId).length===0&&
14568!$target.hasClass($.datepicker.markerClassName)&&
14569!$target.closest("."+$.datepicker._triggerClass).length&&
14570$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)))||
14571($target.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!==inst)){
14572$.datepicker._hideDatepicker();
14573}
14574},
14575_adjustDate:function(id,offset,period){
14576var target=$(id),
14577inst=this._getInst(target[0]);
14578if(this._isDisabledDatepicker(target[0])){
14579return;
14580}
14581this._adjustInstDate(inst,offset,period);
14582this._updateDatepicker(inst);
14583},
14584_gotoToday:function(id){
14585var date,
14586target=$(id),
14587inst=this._getInst(target[0]);
14588if(this._get(inst,"gotoCurrent")&&inst.currentDay){
14589inst.selectedDay=inst.currentDay;
14590inst.drawMonth=inst.selectedMonth=inst.currentMonth;
14591inst.drawYear=inst.selectedYear=inst.currentYear;
14592}else{
14593date=new Date();
14594inst.selectedDay=date.getDate();
14595inst.drawMonth=inst.selectedMonth=date.getMonth();
14596inst.drawYear=inst.selectedYear=date.getFullYear();
14597}
14598this._notifyChange(inst);
14599this._adjustDate(target);
14600},
14601_selectMonthYear:function(id,select,period){
14602var target=$(id),
14603inst=this._getInst(target[0]);
14604inst["selected"+(period==="M"?"Month":"Year")]=
14605inst["draw"+(period==="M"?"Month":"Year")]=
14606parseInt(select.options[select.selectedIndex].value,10);
14607this._notifyChange(inst);
14608this._adjustDate(target);
14609},
14610_selectDay:function(id,month,year,td){
14611var inst,
14612target=$(id);
14613if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){
14614return;
14615}
14616inst=this._getInst(target[0]);
14617inst.selectedDay=inst.currentDay=parseInt($("a",td).attr("data-date"));
14618inst.selectedMonth=inst.currentMonth=month;
14619inst.selectedYear=inst.currentYear=year;
14620this._selectDate(id,this._formatDate(inst,
14621inst.currentDay,inst.currentMonth,inst.currentYear));
14622},
14623_clearDate:function(id){
14624var target=$(id);
14625this._selectDate(target,"");
14626},
14627_selectDate:function(id,dateStr){
14628var onSelect,
14629target=$(id),
14630inst=this._getInst(target[0]);
14631dateStr=(dateStr!=null?dateStr:this._formatDate(inst));
14632if(inst.input){
14633inst.input.val(dateStr);
14634}
14635this._updateAlternate(inst);
14636onSelect=this._get(inst,"onSelect");
14637if(onSelect){
14638onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);
14639}else if(inst.input){
14640inst.input.trigger("change");
14641}
14642if(inst.inline){
14643this._updateDatepicker(inst);
14644}else{
14645this._hideDatepicker();
14646this._lastInput=inst.input[0];
14647if(typeof(inst.input[0])!=="object"){
14648inst.input.trigger("focus");
14649}
14650this._lastInput=null;
14651}
14652},
14653_updateAlternate:function(inst){
14654var altFormat,date,dateStr,
14655altField=this._get(inst,"altField");
14656if(altField){
14657altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");
14658date=this._getDate(inst);
14659dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));
14660$(document).find(altField).val(dateStr);
14661}
14662},
14663noWeekends:function(date){
14664var day=date.getDay();
14665return[(day>0&&day<6),""];
14666},
14667iso8601Week:function(date){
14668var time,
14669checkDate=new Date(date.getTime());
14670checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));
14671time=checkDate.getTime();
14672checkDate.setMonth(0);
14673checkDate.setDate(1);
14674return Math.floor(Math.round((time-checkDate)/86400000)/7)+1;
14675},
14676parseDate:function(format,value,settings){
14677if(format==null||value==null){
14678throw"Invalid arguments";
14679}
14680value=(typeof value==="object"?value.toString():value+"");
14681if(value===""){
14682return null;
14683}
14684var iFormat,dim,extra,
14685iValue=0,
14686shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,
14687shortYearCutoff=(typeof shortYearCutoffTemp!=="string"?shortYearCutoffTemp:
14688new Date().getFullYear()%100+parseInt(shortYearCutoffTemp,10)),
14689dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,
14690dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,
14691monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,
14692monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,
14693year=-1,
14694month=-1,
14695day=-1,
14696doy=-1,
14697literal=false,
14698date,
14699lookAhead=function(match){
14700var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);
14701if(matches){
14702iFormat++;
14703}
14704return matches;
14705},
14706getNumber=function(match){
14707var isDoubled=lookAhead(match),
14708size=(match==="@"?14:(match==="!"?20:
14709(match==="y"&&isDoubled?4:(match==="o"?3:2)))),
14710minSize=(match==="y"?size:1),
14711digits=new RegExp("^\\d{"+minSize+","+size+"}"),
14712num=value.substring(iValue).match(digits);
14713if(!num){
14714throw"Missing number at position "+iValue;
14715}
14716iValue+=num[0].length;
14717return parseInt(num[0],10);
14718},
14719getName=function(match,shortNames,longNames){
14720var index=-1,
14721names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){
14722return[[k,v]];
14723}).sort(function(a,b){
14724return-(a[1].length-b[1].length);
14725});
14726$.each(names,function(i,pair){
14727var name=pair[1];
14728if(value.substr(iValue,name.length).toLowerCase()===name.toLowerCase()){
14729index=pair[0];
14730iValue+=name.length;
14731return false;
14732}
14733});
14734if(index!==-1){
14735return index+1;
14736}else{
14737throw"Unknown name at position "+iValue;
14738}
14739},
14740checkLiteral=function(){
14741if(value.charAt(iValue)!==format.charAt(iFormat)){
14742throw"Unexpected literal at position "+iValue;
14743}
14744iValue++;
14745};
14746for(iFormat=0;iFormat<format.length;iFormat++){
14747if(literal){
14748if(format.charAt(iFormat)==="'"&&!lookAhead("'")){
14749literal=false;
14750}else{
14751checkLiteral();
14752}
14753}else{
14754switch(format.charAt(iFormat)){
14755case"d":
14756day=getNumber("d");
14757break;
14758case"D":
14759getName("D",dayNamesShort,dayNames);
14760break;
14761case"o":
14762doy=getNumber("o");
14763break;
14764case"m":
14765month=getNumber("m");
14766break;
14767case"M":
14768month=getName("M",monthNamesShort,monthNames);
14769break;
14770case"y":
14771year=getNumber("y");
14772break;
14773case"@":
14774date=new Date(getNumber("@"));
14775year=date.getFullYear();
14776month=date.getMonth()+1;
14777day=date.getDate();
14778break;
14779case"!":
14780date=new Date((getNumber("!")-this._ticksTo1970)/10000);
14781year=date.getFullYear();
14782month=date.getMonth()+1;
14783day=date.getDate();
14784break;
14785case"'":
14786if(lookAhead("'")){
14787checkLiteral();
14788}else{
14789literal=true;
14790}
14791break;
14792default:
14793checkLiteral();
14794}
14795}
14796}
14797if(iValue<value.length){
14798extra=value.substr(iValue);
14799if(!/^\s+/.test(extra)){
14800throw"Extra/unparsed characters found in date: "+extra;
14801}
14802}
14803if(year===-1){
14804year=new Date().getFullYear();
14805}else if(year<100){
14806year+=new Date().getFullYear()-new Date().getFullYear()%100+
14807(year<=shortYearCutoff?0:-100);
14808}
14809if(doy>-1){
14810month=1;
14811day=doy;
14812do{
14813dim=this._getDaysInMonth(year,month-1);
14814if(day<=dim){
14815break;
14816}
14817month++;
14818day-=dim;
14819}while(true);
14820}
14821date=this._daylightSavingAdjust(new Date(year,month-1,day));
14822if(date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day){
14823throw"Invalid date";
14824}
14825return date;
14826},
14827ATOM:"yy-mm-dd",
14828COOKIE:"D, dd M yy",
14829ISO_8601:"yy-mm-dd",
14830RFC_822:"D, d M y",
14831RFC_850:"DD, dd-M-y",
14832RFC_1036:"D, d M y",
14833RFC_1123:"D, d M yy",
14834RFC_2822:"D, d M yy",
14835RSS:"D, d M y",
14836TICKS:"!",
14837TIMESTAMP:"@",
14838W3C:"yy-mm-dd",
14839_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+
14840Math.floor(1970/400))*24*60*60*10000000),
14841formatDate:function(format,date,settings){
14842if(!date){
14843return"";
14844}
14845var iFormat,
14846dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,
14847dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,
14848monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,
14849monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,
14850lookAhead=function(match){
14851var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);
14852if(matches){
14853iFormat++;
14854}
14855return matches;
14856},
14857formatNumber=function(match,value,len){
14858var num=""+value;
14859if(lookAhead(match)){
14860while(num.length<len){
14861num="0"+num;
14862}
14863}
14864return num;
14865},
14866formatName=function(match,value,shortNames,longNames){
14867return(lookAhead(match)?longNames[value]:shortNames[value]);
14868},
14869output="",
14870literal=false;
14871if(date){
14872for(iFormat=0;iFormat<format.length;iFormat++){
14873if(literal){
14874if(format.charAt(iFormat)==="'"&&!lookAhead("'")){
14875literal=false;
14876}else{
14877output+=format.charAt(iFormat);
14878}
14879}else{
14880switch(format.charAt(iFormat)){
14881case"d":
14882output+=formatNumber("d",date.getDate(),2);
14883break;
14884case"D":
14885output+=formatName("D",date.getDay(),dayNamesShort,dayNames);
14886break;
14887case"o":
14888output+=formatNumber("o",
14889Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000),3);
14890break;
14891case"m":
14892output+=formatNumber("m",date.getMonth()+1,2);
14893break;
14894case"M":
14895output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);
14896break;
14897case"y":
14898output+=(lookAhead("y")?date.getFullYear():
14899(date.getFullYear()%100<10?"0":"")+date.getFullYear()%100);
14900break;
14901case"@":
14902output+=date.getTime();
14903break;
14904case"!":
14905output+=date.getTime()*10000+this._ticksTo1970;
14906break;
14907case"'":
14908if(lookAhead("'")){
14909output+="'";
14910}else{
14911literal=true;
14912}
14913break;
14914default:
14915output+=format.charAt(iFormat);
14916}
14917}
14918}
14919}
14920return output;
14921},
14922_possibleChars:function(format){
14923var iFormat,
14924chars="",
14925literal=false,
14926lookAhead=function(match){
14927var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);
14928if(matches){
14929iFormat++;
14930}
14931return matches;
14932};
14933for(iFormat=0;iFormat<format.length;iFormat++){
14934if(literal){
14935if(format.charAt(iFormat)==="'"&&!lookAhead("'")){
14936literal=false;
14937}else{
14938chars+=format.charAt(iFormat);
14939}
14940}else{
14941switch(format.charAt(iFormat)){
14942case"d":case"m":case"y":case"@":
14943chars+="0123456789";
14944break;
14945case"D":case"M":
14946return null;
14947case"'":
14948if(lookAhead("'")){
14949chars+="'";
14950}else{
14951literal=true;
14952}
14953break;
14954default:
14955chars+=format.charAt(iFormat);
14956}
14957}
14958}
14959return chars;
14960},
14961_get:function(inst,name){
14962return inst.settings[name]!==undefined?
14963inst.settings[name]:this._defaults[name];
14964},
14965_setDateFromField:function(inst,noDefault){
14966if(inst.input.val()===inst.lastVal){
14967return;
14968}
14969var dateFormat=this._get(inst,"dateFormat"),
14970dates=inst.lastVal=inst.input?inst.input.val():null,
14971defaultDate=this._getDefaultDate(inst),
14972date=defaultDate,
14973settings=this._getFormatConfig(inst);
14974try{
14975date=this.parseDate(dateFormat,dates,settings)||defaultDate;
14976}catch(event){
14977dates=(noDefault?"":dates);
14978}
14979inst.selectedDay=date.getDate();
14980inst.drawMonth=inst.selectedMonth=date.getMonth();
14981inst.drawYear=inst.selectedYear=date.getFullYear();
14982inst.currentDay=(dates?date.getDate():0);
14983inst.currentMonth=(dates?date.getMonth():0);
14984inst.currentYear=(dates?date.getFullYear():0);
14985this._adjustInstDate(inst);
14986},
14987_getDefaultDate:function(inst){
14988return this._restrictMinMax(inst,
14989this._determineDate(inst,this._get(inst,"defaultDate"),new Date()));
14990},
14991_determineDate:function(inst,date,defaultDate){
14992var offsetNumeric=function(offset){
14993var date=new Date();
14994date.setDate(date.getDate()+offset);
14995return date;
14996},
14997offsetString=function(offset){
14998try{
14999return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),
15000offset,$.datepicker._getFormatConfig(inst));
15001}catch(e){
15002}
15003var date=(offset.toLowerCase().match(/^c/)?
15004$.datepicker._getDate(inst):null)||new Date(),
15005year=date.getFullYear(),
15006month=date.getMonth(),
15007day=date.getDate(),
15008pattern=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
15009matches=pattern.exec(offset);
15010while(matches){
15011switch(matches[2]||"d"){
15012case"d":case"D":
15013day+=parseInt(matches[1],10);break;
15014case"w":case"W":
15015day+=parseInt(matches[1],10)*7;break;
15016case"m":case"M":
15017month+=parseInt(matches[1],10);
15018day=Math.min(day,$.datepicker._getDaysInMonth(year,month));
15019break;
15020case"y":case"Y":
15021year+=parseInt(matches[1],10);
15022day=Math.min(day,$.datepicker._getDaysInMonth(year,month));
15023break;
15024}
15025matches=pattern.exec(offset);
15026}
15027return new Date(year,month,day);
15028},
15029newDate=(date==null||date===""?defaultDate:(typeof date==="string"?offsetString(date):
15030(typeof date==="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):new Date(date.getTime()))));
15031newDate=(newDate&&newDate.toString()==="Invalid Date"?defaultDate:newDate);
15032if(newDate){
15033newDate.setHours(0);
15034newDate.setMinutes(0);
15035newDate.setSeconds(0);
15036newDate.setMilliseconds(0);
15037}
15038return this._daylightSavingAdjust(newDate);
15039},
15040_daylightSavingAdjust:function(date){
15041if(!date){
15042return null;
15043}
15044date.setHours(date.getHours()>12?date.getHours()+2:0);
15045return date;
15046},
15047_setDate:function(inst,date,noChange){
15048var clear=!date,
15049origMonth=inst.selectedMonth,
15050origYear=inst.selectedYear,
15051newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));
15052inst.selectedDay=inst.currentDay=newDate.getDate();
15053inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();
15054inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();
15055if((origMonth!==inst.selectedMonth||origYear!==inst.selectedYear)&&!noChange){
15056this._notifyChange(inst);
15057}
15058this._adjustInstDate(inst);
15059if(inst.input){
15060inst.input.val(clear?"":this._formatDate(inst));
15061}
15062},
15063_getDate:function(inst){
15064var startDate=(!inst.currentYear||(inst.input&&inst.input.val()==="")?null:
15065this._daylightSavingAdjust(new Date(
15066inst.currentYear,inst.currentMonth,inst.currentDay)));
15067return startDate;
15068},
15069_attachHandlers:function(inst){
15070var stepMonths=this._get(inst,"stepMonths"),
15071id="#"+inst.id.replace(/\\\\/g,"\\");
15072inst.dpDiv.find("[data-handler]").map(function(){
15073var handler={
15074prev:function(){
15075$.datepicker._adjustDate(id,-stepMonths,"M");
15076},
15077next:function(){
15078$.datepicker._adjustDate(id,+stepMonths,"M");
15079},
15080hide:function(){
15081$.datepicker._hideDatepicker();
15082},
15083today:function(){
15084$.datepicker._gotoToday(id);
15085},
15086selectDay:function(){
15087$.datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);
15088return false;
15089},
15090selectMonth:function(){
15091$.datepicker._selectMonthYear(id,this,"M");
15092return false;
15093},
15094selectYear:function(){
15095$.datepicker._selectMonthYear(id,this,"Y");
15096return false;
15097}
15098};
15099$(this).on(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")]);
15100});
15101},
15102_generateHTML:function(inst){
15103var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,
15104controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,
15105monthNames,monthNamesShort,beforeShowDay,showOtherMonths,
15106selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,
15107cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,
15108printDate,dRow,tbody,daySettings,otherMonth,unselectable,
15109tempDate=new Date(),
15110today=this._daylightSavingAdjust(
15111new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),
15112isRTL=this._get(inst,"isRTL"),
15113showButtonPanel=this._get(inst,"showButtonPanel"),
15114hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),
15115navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),
15116numMonths=this._getNumberOfMonths(inst),
15117showCurrentAtPos=this._get(inst,"showCurrentAtPos"),
15118stepMonths=this._get(inst,"stepMonths"),
15119isMultiMonth=(numMonths[0]!==1||numMonths[1]!==1),
15120currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):
15121new Date(inst.currentYear,inst.currentMonth,inst.currentDay))),
15122minDate=this._getMinMaxDate(inst,"min"),
15123maxDate=this._getMinMaxDate(inst,"max"),
15124drawMonth=inst.drawMonth-showCurrentAtPos,
15125drawYear=inst.drawYear;
15126if(drawMonth<0){
15127drawMonth+=12;
15128drawYear--;
15129}
15130if(maxDate){
15131maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
15132maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));
15133maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);
15134while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){
15135drawMonth--;
15136if(drawMonth<0){
15137drawMonth=11;
15138drawYear--;
15139}
15140}
15141}
15142inst.drawMonth=drawMonth;
15143inst.drawYear=drawYear;
15144prevText=this._get(inst,"prevText");
15145prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,
15146this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),
15147this._getFormatConfig(inst)));
15148if(this._canAdjustMonth(inst,-1,drawYear,drawMonth)){
15149prev=$("<a>")
15150.attr({
15151"class":"ui-datepicker-prev ui-corner-all",
15152"data-handler":"prev",
15153"data-event":"click",
15154title:prevText
15155})
15156.append(
15157$("<span>")
15158.addClass("ui-icon ui-icon-circle-triangle-"+
15159(isRTL?"e":"w"))
15160.text(prevText)
15161)[0].outerHTML;
15162}else if(hideIfNoPrevNext){
15163prev="";
15164}else{
15165prev=$("<a>")
15166.attr({
15167"class":"ui-datepicker-prev ui-corner-all ui-state-disabled",
15168title:prevText
15169})
15170.append(
15171$("<span>")
15172.addClass("ui-icon ui-icon-circle-triangle-"+
15173(isRTL?"e":"w"))
15174.text(prevText)
15175)[0].outerHTML;
15176}
15177nextText=this._get(inst,"nextText");
15178nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,
15179this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),
15180this._getFormatConfig(inst)));
15181if(this._canAdjustMonth(inst,+1,drawYear,drawMonth)){
15182next=$("<a>")
15183.attr({
15184"class":"ui-datepicker-next ui-corner-all",
15185"data-handler":"next",
15186"data-event":"click",
15187title:nextText
15188})
15189.append(
15190$("<span>")
15191.addClass("ui-icon ui-icon-circle-triangle-"+
15192(isRTL?"w":"e"))
15193.text(nextText)
15194)[0].outerHTML;
15195}else if(hideIfNoPrevNext){
15196next="";
15197}else{
15198next=$("<a>")
15199.attr({
15200"class":"ui-datepicker-next ui-corner-all ui-state-disabled",
15201title:nextText
15202})
15203.append(
15204$("<span>")
15205.attr("class","ui-icon ui-icon-circle-triangle-"+
15206(isRTL?"w":"e"))
15207.text(nextText)
15208)[0].outerHTML;
15209}
15210currentText=this._get(inst,"currentText");
15211gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);
15212currentText=(!navigationAsDateFormat?currentText:
15213this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));
15214controls="";
15215if(!inst.inline){
15216controls=$("<button>")
15217.attr({
15218type:"button",
15219"class":"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
15220"data-handler":"hide",
15221"data-event":"click"
15222})
15223.text(this._get(inst,"closeText"))[0].outerHTML;
15224}
15225buttonPanel="";
15226if(showButtonPanel){
15227buttonPanel=$("<div class='ui-datepicker-buttonpane ui-widget-content'>")
15228.append(isRTL?controls:"")
15229.append(this._isInRange(inst,gotoDate)?
15230$("<button>")
15231.attr({
15232type:"button",
15233"class":"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
15234"data-handler":"today",
15235"data-event":"click"
15236})
15237.text(currentText):
15238"")
15239.append(isRTL?"":controls)[0].outerHTML;
15240}
15241firstDay=parseInt(this._get(inst,"firstDay"),10);
15242firstDay=(isNaN(firstDay)?0:firstDay);
15243showWeek=this._get(inst,"showWeek");
15244dayNames=this._get(inst,"dayNames");
15245dayNamesMin=this._get(inst,"dayNamesMin");
15246monthNames=this._get(inst,"monthNames");
15247monthNamesShort=this._get(inst,"monthNamesShort");
15248beforeShowDay=this._get(inst,"beforeShowDay");
15249showOtherMonths=this._get(inst,"showOtherMonths");
15250selectOtherMonths=this._get(inst,"selectOtherMonths");
15251defaultDate=this._getDefaultDate(inst);
15252html="";
15253for(row=0;row<numMonths[0];row++){
15254group="";
15255this.maxRows=4;
15256for(col=0;col<numMonths[1];col++){
15257selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));
15258cornerClass=" ui-corner-all";
15259calender="";
15260if(isMultiMonth){
15261calender+="<div class='ui-datepicker-group";
15262if(numMonths[1]>1){
15263switch(col){
15264case 0:calender+=" ui-datepicker-group-first";
15265cornerClass=" ui-corner-"+(isRTL?"right":"left");break;
15266case numMonths[1]-1:calender+=" ui-datepicker-group-last";
15267cornerClass=" ui-corner-"+(isRTL?"left":"right");break;
15268default:calender+=" ui-datepicker-group-middle";cornerClass="";break;
15269}
15270}
15271calender+="'>";
15272}
15273calender+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+cornerClass+"'>"+
15274(/all|left/.test(cornerClass)&&row===0?(isRTL?next:prev):"")+
15275(/all|right/.test(cornerClass)&&row===0?(isRTL?prev:next):"")+
15276this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,
15277row>0||col>0,monthNames,monthNamesShort)+
15278"</div><table class='ui-datepicker-calendar'><thead>"+
15279"<tr>";
15280thead=(showWeek?"<th class='ui-datepicker-week-col'>"+this._get(inst,"weekHeader")+"</th>":"");
15281for(dow=0;dow<7;dow++){
15282day=(dow+firstDay)%7;
15283thead+="<th scope='col'"+((dow+firstDay+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+
15284"<span title='"+dayNames[day]+"'>"+dayNamesMin[day]+"</span></th>";
15285}
15286calender+=thead+"</tr></thead><tbody>";
15287daysInMonth=this._getDaysInMonth(drawYear,drawMonth);
15288if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){
15289inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);
15290}
15291leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;
15292curRows=Math.ceil((leadDays+daysInMonth)/7);
15293numRows=(isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows);
15294this.maxRows=numRows;
15295printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));
15296for(dRow=0;dRow<numRows;dRow++){
15297calender+="<tr>";
15298tbody=(!showWeek?"":"<td class='ui-datepicker-week-col'>"+
15299this._get(inst,"calculateWeek")(printDate)+"</td>");
15300for(dow=0;dow<7;dow++){
15301daySettings=(beforeShowDay?
15302beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);
15303otherMonth=(printDate.getMonth()!==drawMonth);
15304unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||
15305(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);
15306tbody+="<td class='"+
15307((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+
15308(otherMonth?" ui-datepicker-other-month":"")+
15309((printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent)||
15310(defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime())?
15311" "+this._dayOverClass:"")+
15312(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+
15313(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+
15314(printDate.getTime()===currentDate.getTime()?" "+this._currentClass:"")+
15315(printDate.getTime()===today.getTime()?" ui-datepicker-today":""))+"'"+
15316((!otherMonth||showOtherMonths)&&daySettings[2]?" title='"+daySettings[2].replace(/'/g,"&#39;")+"'":"")+
15317(unselectable?"":" data-handler='selectDay' data-event='click' data-month='"+printDate.getMonth()+"' data-year='"+printDate.getFullYear()+"'")+">"+
15318(otherMonth&&!showOtherMonths?"&#xa0;":
15319(unselectable?"<span class='ui-state-default'>"+printDate.getDate()+"</span>":"<a class='ui-state-default"+
15320(printDate.getTime()===today.getTime()?" ui-state-highlight":"")+
15321(printDate.getTime()===currentDate.getTime()?" ui-state-active":"")+
15322(otherMonth?" ui-priority-secondary":"")+
15323"' href='#' aria-current='"+(printDate.getTime()===currentDate.getTime()?"true":"false")+
15324"' data-date='"+printDate.getDate()+
15325"'>"+printDate.getDate()+"</a>"))+"</td>";
15326printDate.setDate(printDate.getDate()+1);
15327printDate=this._daylightSavingAdjust(printDate);
15328}
15329calender+=tbody+"</tr>";
15330}
15331drawMonth++;
15332if(drawMonth>11){
15333drawMonth=0;
15334drawYear++;
15335}
15336calender+="</tbody></table>"+(isMultiMonth?"</div>"+
15337((numMonths[0]>0&&col===numMonths[1]-1)?"<div class='ui-datepicker-row-break'></div>":""):"");
15338group+=calender;
15339}
15340html+=group;
15341}
15342html+=buttonPanel;
15343inst._keyEvent=false;
15344return html;
15345},
15346_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,
15347secondary,monthNames,monthNamesShort){
15348var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,
15349changeMonth=this._get(inst,"changeMonth"),
15350changeYear=this._get(inst,"changeYear"),
15351showMonthAfterYear=this._get(inst,"showMonthAfterYear"),
15352selectMonthLabel=this._get(inst,"selectMonthLabel"),
15353selectYearLabel=this._get(inst,"selectYearLabel"),
15354html="<div class='ui-datepicker-title'>",
15355monthHtml="";
15356if(secondary||!changeMonth){
15357monthHtml+="<span class='ui-datepicker-month'>"+monthNames[drawMonth]+"</span>";
15358}else{
15359inMinYear=(minDate&&minDate.getFullYear()===drawYear);
15360inMaxYear=(maxDate&&maxDate.getFullYear()===drawYear);
15361monthHtml+="<select class='ui-datepicker-month' aria-label='"+selectMonthLabel+"' data-handler='selectMonth' data-event='change'>";
15362for(month=0;month<12;month++){
15363if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){
15364monthHtml+="<option value='"+month+"'"+
15365(month===drawMonth?" selected='selected'":"")+
15366">"+monthNamesShort[month]+"</option>";
15367}
15368}
15369monthHtml+="</select>";
15370}
15371if(!showMonthAfterYear){
15372html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"");
15373}
15374if(!inst.yearshtml){
15375inst.yearshtml="";
15376if(secondary||!changeYear){
15377html+="<span class='ui-datepicker-year'>"+drawYear+"</span>";
15378}else{
15379years=this._get(inst,"yearRange").split(":");
15380thisYear=new Date().getFullYear();
15381determineYear=function(value){
15382var year=(value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):
15383(value.match(/[+\-].*/)?thisYear+parseInt(value,10):
15384parseInt(value,10)));
15385return(isNaN(year)?thisYear:year);
15386};
15387year=determineYear(years[0]);
15388endYear=Math.max(year,determineYear(years[1]||""));
15389year=(minDate?Math.max(year,minDate.getFullYear()):year);
15390endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);
15391inst.yearshtml+="<select class='ui-datepicker-year' aria-label='"+selectYearLabel+"' data-handler='selectYear' data-event='change'>";
15392for(;year<=endYear;year++){
15393inst.yearshtml+="<option value='"+year+"'"+
15394(year===drawYear?" selected='selected'":"")+
15395">"+year+"</option>";
15396}
15397inst.yearshtml+="</select>";
15398html+=inst.yearshtml;
15399inst.yearshtml=null;
15400}
15401}
15402html+=this._get(inst,"yearSuffix");
15403if(showMonthAfterYear){
15404html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml;
15405}
15406html+="</div>";
15407return html;
15408},
15409_adjustInstDate:function(inst,offset,period){
15410var year=inst.selectedYear+(period==="Y"?offset:0),
15411month=inst.selectedMonth+(period==="M"?offset:0),
15412day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period==="D"?offset:0),
15413date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));
15414inst.selectedDay=date.getDate();
15415inst.drawMonth=inst.selectedMonth=date.getMonth();
15416inst.drawYear=inst.selectedYear=date.getFullYear();
15417if(period==="M"||period==="Y"){
15418this._notifyChange(inst);
15419}
15420},
15421_restrictMinMax:function(inst,date){
15422var minDate=this._getMinMaxDate(inst,"min"),
15423maxDate=this._getMinMaxDate(inst,"max"),
15424newDate=(minDate&&date<minDate?minDate:date);
15425return(maxDate&&newDate>maxDate?maxDate:newDate);
15426},
15427_notifyChange:function(inst){
15428var onChange=this._get(inst,"onChangeMonthYear");
15429if(onChange){
15430onChange.apply((inst.input?inst.input[0]:null),
15431[inst.selectedYear,inst.selectedMonth+1,inst]);
15432}
15433},
15434_getNumberOfMonths:function(inst){
15435var numMonths=this._get(inst,"numberOfMonths");
15436return(numMonths==null?[1,1]:(typeof numMonths==="number"?[1,numMonths]:numMonths));
15437},
15438_getMinMaxDate:function(inst,minMax){
15439return this._determineDate(inst,this._get(inst,minMax+"Date"),null);
15440},
15441_getDaysInMonth:function(year,month){
15442return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate();
15443},
15444_getFirstDayOfMonth:function(year,month){
15445return new Date(year,month,1).getDay();
15446},
15447_canAdjustMonth:function(inst,offset,curYear,curMonth){
15448var numMonths=this._getNumberOfMonths(inst),
15449date=this._daylightSavingAdjust(new Date(curYear,
15450curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));
15451if(offset<0){
15452date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));
15453}
15454return this._isInRange(inst,date);
15455},
15456_isInRange:function(inst,date){
15457var yearSplit,currentYear,
15458minDate=this._getMinMaxDate(inst,"min"),
15459maxDate=this._getMinMaxDate(inst,"max"),
15460minYear=null,
15461maxYear=null,
15462years=this._get(inst,"yearRange");
15463if(years){
15464yearSplit=years.split(":");
15465currentYear=new Date().getFullYear();
15466minYear=parseInt(yearSplit[0],10);
15467maxYear=parseInt(yearSplit[1],10);
15468if(yearSplit[0].match(/[+\-].*/)){
15469minYear+=currentYear;
15470}
15471if(yearSplit[1].match(/[+\-].*/)){
15472maxYear+=currentYear;
15473}
15474}
15475return((!minDate||date.getTime()>=minDate.getTime())&&
15476(!maxDate||date.getTime()<=maxDate.getTime())&&
15477(!minYear||date.getFullYear()>=minYear)&&
15478(!maxYear||date.getFullYear()<=maxYear));
15479},
15480_getFormatConfig:function(inst){
15481var shortYearCutoff=this._get(inst,"shortYearCutoff");
15482shortYearCutoff=(typeof shortYearCutoff!=="string"?shortYearCutoff:
15483new Date().getFullYear()%100+parseInt(shortYearCutoff,10));
15484return{shortYearCutoff:shortYearCutoff,
15485dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),
15486monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")};
15487},
15488_formatDate:function(inst,day,month,year){
15489if(!day){
15490inst.currentDay=inst.selectedDay;
15491inst.currentMonth=inst.selectedMonth;
15492inst.currentYear=inst.selectedYear;
15493}
15494var date=(day?(typeof day==="object"?day:
15495this._daylightSavingAdjust(new Date(year,month,day))):
15496this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));
15497return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst));
15498}
15499});
15500function datepicker_bindHover(dpDiv){
15501var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
15502return dpDiv.on("mouseout",selector,function(){
15503$(this).removeClass("ui-state-hover");
15504if(this.className.indexOf("ui-datepicker-prev")!==-1){
15505$(this).removeClass("ui-datepicker-prev-hover");
15506}
15507if(this.className.indexOf("ui-datepicker-next")!==-1){
15508$(this).removeClass("ui-datepicker-next-hover");
15509}
15510})
15511.on("mouseover",selector,datepicker_handleMouseover);
15512}
15513function datepicker_handleMouseover(){
15514if(!$.datepicker._isDisabledDatepicker(datepicker_instActive.inline?datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.input[0])){
15515$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
15516$(this).addClass("ui-state-hover");
15517if(this.className.indexOf("ui-datepicker-prev")!==-1){
15518$(this).addClass("ui-datepicker-prev-hover");
15519}
15520if(this.className.indexOf("ui-datepicker-next")!==-1){
15521$(this).addClass("ui-datepicker-next-hover");
15522}
15523}
15524}
15525function datepicker_extendRemove(target,props){
15526$.extend(target,props);
15527for(var name in props){
15528if(props[name]==null){
15529target[name]=props[name];
15530}
15531}
15532return target;
15533}
15534$.fn.datepicker=function(options){
15535if(!this.length){
15536return this;
15537}
15538if(!$.datepicker.initialized){
15539$(document).on("mousedown",$.datepicker._checkExternalClick);
15540$.datepicker.initialized=true;
15541}
15542if($("#"+$.datepicker._mainDivId).length===0){
15543$("body").append($.datepicker.dpDiv);
15544}
15545var otherArgs=Array.prototype.slice.call(arguments,1);
15546if(typeof options==="string"&&(options==="isDisabled"||options==="getDate"||options==="widget")){
15547return $.datepicker["_"+options+"Datepicker"].
15548apply($.datepicker,[this[0]].concat(otherArgs));
15549}
15550if(options==="option"&&arguments.length===2&&typeof arguments[1]==="string"){
15551return $.datepicker["_"+options+"Datepicker"].
15552apply($.datepicker,[this[0]].concat(otherArgs));
15553}
15554return this.each(function(){
15555if(typeof options==="string"){
15556$.datepicker["_"+options+"Datepicker"]
15557.apply($.datepicker,[this].concat(otherArgs));
15558}else{
15559$.datepicker._attachDatepicker(this,options);
15560}
15561});
15562};
15563$.datepicker=new Datepicker();
15564$.datepicker.initialized=false;
15565$.datepicker.uuid=new Date().getTime();
15566$.datepicker.version="1.14.1";
15567var widgetsDatepicker=$.datepicker;
15568var mouseHandled=false;
15569$(document).on("mouseup",function(){
15570mouseHandled=false;
15571});
15572var widgetsMouse=$.widget("ui.mouse",{
15573version:"1.14.1",
15574options:{
15575cancel:"input, textarea, button, select, option",
15576distance:1,
15577delay:0
15578},
15579_mouseInit:function(){
15580var that=this;
15581this.element
15582.on("mousedown."+this.widgetName,function(event){
15583return that._mouseDown(event);
15584})
15585.on("click."+this.widgetName,function(event){
15586if(true===$.data(event.target,that.widgetName+".preventClickEvent")){
15587$.removeData(event.target,that.widgetName+".preventClickEvent");
15588event.stopImmediatePropagation();
15589return false;
15590}
15591});
15592this.started=false;
15593},
15594_mouseDestroy:function(){
15595this.element.off("."+this.widgetName);
15596if(this._mouseMoveDelegate){
15597this.document
15598.off("mousemove."+this.widgetName,this._mouseMoveDelegate)
15599.off("mouseup."+this.widgetName,this._mouseUpDelegate);
15600}
15601},
15602_mouseDown:function(event){
15603if(mouseHandled){
15604return;
15605}
15606this._mouseMoved=false;
15607if(this._mouseStarted){
15608this._mouseUp(event);
15609}
15610this._mouseDownEvent=event;
15611var that=this,
15612btnIsLeft=event.which===1,
15613elIsCancel=typeof this.options.cancel==="string"?
15614$(event.target).closest(this.options.cancel).length:
15615false;
15616if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){
15617return true;
15618}
15619this.mouseDelayMet=!this.options.delay;
15620if(!this.mouseDelayMet){
15621this._mouseDelayTimer=setTimeout(function(){
15622that.mouseDelayMet=true;
15623},this.options.delay);
15624}
15625if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){
15626this._mouseStarted=(this._mouseStart(event)!==false);
15627if(!this._mouseStarted){
15628event.preventDefault();
15629return true;
15630}
15631}
15632if(true===$.data(event.target,this.widgetName+".preventClickEvent")){
15633$.removeData(event.target,this.widgetName+".preventClickEvent");
15634}
15635this._mouseMoveDelegate=function(event){
15636return that._mouseMove(event);
15637};
15638this._mouseUpDelegate=function(event){
15639return that._mouseUp(event);
15640};
15641this.document
15642.on("mousemove."+this.widgetName,this._mouseMoveDelegate)
15643.on("mouseup."+this.widgetName,this._mouseUpDelegate);
15644event.preventDefault();
15645mouseHandled=true;
15646return true;
15647},
15648_mouseMove:function(event){
15649if(this._mouseMoved&&!event.which){
15650if(event.originalEvent.altKey||event.originalEvent.ctrlKey||
15651event.originalEvent.metaKey||event.originalEvent.shiftKey){
15652this.ignoreMissingWhich=true;
15653}else if(!this.ignoreMissingWhich){
15654return this._mouseUp(event);
15655}
15656}
15657if(event.which||event.button){
15658this._mouseMoved=true;
15659}
15660if(this._mouseStarted){
15661this._mouseDrag(event);
15662return event.preventDefault();
15663}
15664if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){
15665this._mouseStarted=
15666(this._mouseStart(this._mouseDownEvent,event)!==false);
15667if(this._mouseStarted){
15668this._mouseDrag(event);
15669}else{
15670this._mouseUp(event);
15671}
15672}
15673return!this._mouseStarted;
15674},
15675_mouseUp:function(event){
15676this.document
15677.off("mousemove."+this.widgetName,this._mouseMoveDelegate)
15678.off("mouseup."+this.widgetName,this._mouseUpDelegate);
15679if(this._mouseStarted){
15680this._mouseStarted=false;
15681if(event.target===this._mouseDownEvent.target){
15682$.data(event.target,this.widgetName+".preventClickEvent",true);
15683}
15684this._mouseStop(event);
15685}
15686if(this._mouseDelayTimer){
15687clearTimeout(this._mouseDelayTimer);
15688delete this._mouseDelayTimer;
15689}
15690this.ignoreMissingWhich=false;
15691mouseHandled=false;
15692event.preventDefault();
15693},
15694_mouseDistanceMet:function(event){
15695return(Math.max(
15696Math.abs(this._mouseDownEvent.pageX-event.pageX),
15697Math.abs(this._mouseDownEvent.pageY-event.pageY)
15698)>=this.options.distance
15699);
15700},
15701_mouseDelayMet:function(){
15702return this.mouseDelayMet;
15703},
15704_mouseStart:function(){},
15705_mouseDrag:function(){},
15706_mouseStop:function(){},
15707_mouseCapture:function(){
15708return true;
15709}
15710});
15711var plugin=$.ui.plugin={
15712add:function(module,option,set){
15713var i,
15714proto=$.ui[module].prototype;
15715for(i in set){
15716proto.plugins[i]=proto.plugins[i]||[];
15717proto.plugins[i].push([option,set[i]]);
15718}
15719},
15720call:function(instance,name,args,allowDisconnected){
15721var i,
15722set=instance.plugins[name];
15723if(!set){
15724return;
15725}
15726if(!allowDisconnected&&(!instance.element[0].parentNode||
15727instance.element[0].parentNode.nodeType===11)){
15728return;
15729}
15730for(i=0;i<set.length;i++){
15731if(instance.options[set[i][0]]){
15732set[i][1].apply(instance.element,args);
15733}
15734}
15735}
15736};
15737$.widget("ui.draggable",$.ui.mouse,{
15738version:"1.14.1",
15739widgetEventPrefix:"drag",
15740options:{
15741addClasses:true,
15742appendTo:"parent",
15743axis:false,
15744connectToSortable:false,
15745containment:false,
15746cursor:"auto",
15747cursorAt:false,
15748grid:false,
15749handle:false,
15750helper:"original",
15751iframeFix:false,
15752opacity:false,
15753refreshPositions:false,
15754revert:false,
15755revertDuration:500,
15756scope:"default",
15757scroll:true,
15758scrollSensitivity:20,
15759scrollSpeed:20,
15760snap:false,
15761snapMode:"both",
15762snapTolerance:20,
15763stack:false,
15764zIndex:false,
15765drag:null,
15766start:null,
15767stop:null
15768},
15769_create:function(){
15770if(this.options.helper==="original"){
15771this._setPositionRelative();
15772}
15773if(this.options.addClasses){
15774this._addClass("ui-draggable");
15775}
15776this._setHandleClassName();
15777this._mouseInit();
15778},
15779_setOption:function(key,value){
15780this._super(key,value);
15781if(key==="handle"){
15782this._removeHandleClassName();
15783this._setHandleClassName();
15784}
15785},
15786_destroy:function(){
15787if((this.helper||this.element).is(".ui-draggable-dragging")){
15788this.destroyOnClear=true;
15789return;
15790}
15791this._removeHandleClassName();
15792this._mouseDestroy();
15793},
15794_mouseCapture:function(event){
15795var o=this.options;
15796if(this.helper||o.disabled||
15797$(event.target).closest(".ui-resizable-handle").length>0){
15798return false;
15799}
15800this.handle=this._getHandle(event);
15801if(!this.handle){
15802return false;
15803}
15804this._blurActiveElement(event);
15805this._blockFrames(o.iframeFix===true?"iframe":o.iframeFix);
15806return true;
15807},
15808_blockFrames:function(selector){
15809this.iframeBlocks=this.document.find(selector).map(function(){
15810var iframe=$(this);
15811return $("<div>")
15812.css("position","absolute")
15813.appendTo(iframe.parent())
15814.outerWidth(iframe.outerWidth())
15815.outerHeight(iframe.outerHeight())
15816.offset(iframe.offset())[0];
15817});
15818},
15819_unblockFrames:function(){
15820if(this.iframeBlocks){
15821this.iframeBlocks.remove();
15822delete this.iframeBlocks;
15823}
15824},
15825_blurActiveElement:function(event){
15826var activeElement=this.document[0].activeElement,
15827target=$(event.target);
15828if(target.closest(activeElement).length){
15829return;
15830}
15831$(activeElement).trigger("blur");
15832},
15833_mouseStart:function(event){
15834var o=this.options;
15835this.helper=this._createHelper(event);
15836this._addClass(this.helper,"ui-draggable-dragging");
15837this._cacheHelperProportions();
15838if($.ui.ddmanager){
15839$.ui.ddmanager.current=this;
15840}
15841this._cacheMargins();
15842this.cssPosition=this.helper.css("position");
15843this.scrollParent=this.helper.scrollParent(true);
15844this.offsetParent=this.helper.offsetParent();
15845this.hasFixedAncestor=this.helper.parents().filter(function(){
15846return $(this).css("position")==="fixed";
15847}).length>0;
15848this.positionAbs=this.element.offset();
15849this._refreshOffsets(event);
15850this.originalPosition=this.position=this._generatePosition(event,false);
15851this.originalPageX=event.pageX;
15852this.originalPageY=event.pageY;
15853if(o.cursorAt){
15854this._adjustOffsetFromHelper(o.cursorAt);
15855}
15856this._setContainment();
15857if(this._trigger("start",event)===false){
15858this._clear();
15859return false;
15860}
15861this._cacheHelperProportions();
15862if($.ui.ddmanager&&!o.dropBehaviour){
15863$.ui.ddmanager.prepareOffsets(this,event);
15864}
15865this._mouseDrag(event,true);
15866if($.ui.ddmanager){
15867$.ui.ddmanager.dragStart(this,event);
15868}
15869return true;
15870},
15871_refreshOffsets:function(event){
15872this.offset={
15873top:this.positionAbs.top-this.margins.top,
15874left:this.positionAbs.left-this.margins.left,
15875scroll:false,
15876parent:this._getParentOffset(),
15877relative:this._getRelativeOffset()
15878};
15879this.offset.click={
15880left:event.pageX-this.offset.left,
15881top:event.pageY-this.offset.top
15882};
15883},
15884_mouseDrag:function(event,noPropagation){
15885if(this.hasFixedAncestor){
15886this.offset.parent=this._getParentOffset();
15887}
15888this.position=this._generatePosition(event,true);
15889this.positionAbs=this._convertPositionTo("absolute");
15890if(!noPropagation){
15891var ui=this._uiHash();
15892if(this._trigger("drag",event,ui)===false){
15893this._mouseUp(new $.Event("mouseup",event));
15894return false;
15895}
15896this.position=ui.position;
15897}
15898this.helper[0].style.left=this.position.left+"px";
15899this.helper[0].style.top=this.position.top+"px";
15900if($.ui.ddmanager){
15901$.ui.ddmanager.drag(this,event);
15902}
15903return false;
15904},
15905_mouseStop:function(event){
15906var that=this,
15907dropped=false;
15908if($.ui.ddmanager&&!this.options.dropBehaviour){
15909dropped=$.ui.ddmanager.drop(this,event);
15910}
15911if(this.dropped){
15912dropped=this.dropped;
15913this.dropped=false;
15914}
15915if((this.options.revert==="invalid"&&!dropped)||
15916(this.options.revert==="valid"&&dropped)||
15917this.options.revert===true||(typeof this.options.revert==="function"&&
15918this.options.revert.call(this.element,dropped))
15919){
15920$(this.helper).animate(
15921this.originalPosition,
15922parseInt(this.options.revertDuration,10),
15923function(){
15924if(that._trigger("stop",event)!==false){
15925that._clear();
15926}
15927}
15928);
15929}else{
15930if(this._trigger("stop",event)!==false){
15931this._clear();
15932}
15933}
15934return false;
15935},
15936_mouseUp:function(event){
15937this._unblockFrames();
15938if($.ui.ddmanager){
15939$.ui.ddmanager.dragStop(this,event);
15940}
15941if(this.handleElement.is(event.target)){
15942this.element.trigger("focus");
15943}
15944return $.ui.mouse.prototype._mouseUp.call(this,event);
15945},
15946cancel:function(){
15947if(this.helper.is(".ui-draggable-dragging")){
15948this._mouseUp(new $.Event("mouseup",{target:this.element[0]}));
15949}else{
15950this._clear();
15951}
15952return this;
15953},
15954_getHandle:function(event){
15955return this.options.handle?
15956!!$(event.target).closest(this.element.find(this.options.handle)).length:
15957true;
15958},
15959_setHandleClassName:function(){
15960this.handleElement=this.options.handle?
15961this.element.find(this.options.handle):this.element;
15962this._addClass(this.handleElement,"ui-draggable-handle");
15963},
15964_removeHandleClassName:function(){
15965this._removeClass(this.handleElement,"ui-draggable-handle");
15966},
15967_createHelper:function(event){
15968var o=this.options,
15969helperIsFunction=typeof o.helper==="function",
15970helper=helperIsFunction?
15971$(o.helper.apply(this.element[0],[event])):
15972(o.helper==="clone"?
15973this.element.clone().removeAttr("id"):
15974this.element);
15975if(!helper.parents("body").length){
15976helper.appendTo((o.appendTo==="parent"?
15977this.element[0].parentNode:
15978o.appendTo));
15979}
15980if(helperIsFunction&&helper[0]===this.element[0]){
15981this._setPositionRelative();
15982}
15983if(helper[0]!==this.element[0]&&
15984!(/(fixed|absolute)/).test(helper.css("position"))){
15985helper.css("position","absolute");
15986}
15987return helper;
15988},
15989_setPositionRelative:function(){
15990if(!(/^(?:r|a|f)/).test(this.element.css("position"))){
15991this.element[0].style.position="relative";
15992}
15993},
15994_adjustOffsetFromHelper:function(obj){
15995if(typeof obj==="string"){
15996obj=obj.split(" ");
15997}
15998if(Array.isArray(obj)){
15999obj={left:+obj[0],top:+obj[1]||0};
16000}
16001if("left"in obj){
16002this.offset.click.left=obj.left+this.margins.left;
16003}
16004if("right"in obj){
16005this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;
16006}
16007if("top"in obj){
16008this.offset.click.top=obj.top+this.margins.top;
16009}
16010if("bottom"in obj){
16011this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;
16012}
16013},
16014_isRootNode:function(element){
16015return(/(html|body)/i).test(element.tagName)||element===this.document[0];
16016},
16017_getParentOffset:function(){
16018var po=this.offsetParent.offset(),
16019document=this.document[0];
16020if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&
16021$.contains(this.scrollParent[0],this.offsetParent[0])){
16022po.left+=this.scrollParent.scrollLeft();
16023po.top+=this.scrollParent.scrollTop();
16024}
16025if(this._isRootNode(this.offsetParent[0])){
16026po={top:0,left:0};
16027}
16028return{
16029top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),
16030left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)
16031};
16032},
16033_getRelativeOffset:function(){
16034if(this.cssPosition!=="relative"){
16035return{top:0,left:0};
16036}
16037var p=this.element.position(),
16038scrollIsRootNode=this._isRootNode(this.scrollParent[0]);
16039return{
16040top:p.top-(parseInt(this.helper.css("top"),10)||0)+
16041(!scrollIsRootNode?this.scrollParent.scrollTop():0),
16042left:p.left-(parseInt(this.helper.css("left"),10)||0)+
16043(!scrollIsRootNode?this.scrollParent.scrollLeft():0)
16044};
16045},
16046_cacheMargins:function(){
16047this.margins={
16048left:(parseInt(this.element.css("marginLeft"),10)||0),
16049top:(parseInt(this.element.css("marginTop"),10)||0),
16050right:(parseInt(this.element.css("marginRight"),10)||0),
16051bottom:(parseInt(this.element.css("marginBottom"),10)||0)
16052};
16053},
16054_cacheHelperProportions:function(){
16055this.helperProportions={
16056width:this.helper.outerWidth(),
16057height:this.helper.outerHeight()
16058};
16059},
16060_setContainment:function(){
16061var isUserScrollable,c,ce,
16062o=this.options,
16063document=this.document[0];
16064this.relativeContainer=null;
16065if(!o.containment){
16066this.containment=null;
16067return;
16068}
16069if(o.containment==="window"){
16070this.containment=[
16071$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,
16072$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,
16073$(window).scrollLeft()+$(window).width()-
16074this.helperProportions.width-this.margins.left,
16075$(window).scrollTop()+
16076($(window).height()||document.body.parentNode.scrollHeight)-
16077this.helperProportions.height-this.margins.top
16078];
16079return;
16080}
16081if(o.containment==="document"){
16082this.containment=[
160830,
160840,
16085$(document).width()-this.helperProportions.width-this.margins.left,
16086($(document).height()||document.body.parentNode.scrollHeight)-
16087this.helperProportions.height-this.margins.top
16088];
16089return;
16090}
16091if(o.containment.constructor===Array){
16092this.containment=o.containment;
16093return;
16094}
16095if(o.containment==="parent"){
16096o.containment=this.helper[0].parentNode;
16097}
16098c=$(o.containment);
16099ce=c[0];
16100if(!ce){
16101return;
16102}
16103isUserScrollable=/(scroll|auto)/.test(c.css("overflow"));
16104this.containment=[
16105(parseInt(c.css("borderLeftWidth"),10)||0)+
16106(parseInt(c.css("paddingLeft"),10)||0),
16107(parseInt(c.css("borderTopWidth"),10)||0)+
16108(parseInt(c.css("paddingTop"),10)||0),
16109(isUserScrollable?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-
16110(parseInt(c.css("borderRightWidth"),10)||0)-
16111(parseInt(c.css("paddingRight"),10)||0)-
16112this.helperProportions.width-
16113this.margins.left-
16114this.margins.right,
16115(isUserScrollable?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-
16116(parseInt(c.css("borderBottomWidth"),10)||0)-
16117(parseInt(c.css("paddingBottom"),10)||0)-
16118this.helperProportions.height-
16119this.margins.top-
16120this.margins.bottom
16121];
16122this.relativeContainer=c;
16123},
16124_convertPositionTo:function(d,pos){
16125if(!pos){
16126pos=this.position;
16127}
16128var mod=d==="absolute"?1:-1,
16129scrollIsRootNode=this._isRootNode(this.scrollParent[0]);
16130return{
16131top:(
16132pos.top+
16133this.offset.relative.top*mod+
16134this.offset.parent.top*mod-
16135((this.cssPosition==="fixed"?
16136-this.offset.scroll.top:
16137(scrollIsRootNode?0:this.offset.scroll.top))*mod)
16138),
16139left:(
16140pos.left+
16141this.offset.relative.left*mod+
16142this.offset.parent.left*mod-
16143((this.cssPosition==="fixed"?
16144-this.offset.scroll.left:
16145(scrollIsRootNode?0:this.offset.scroll.left))*mod)
16146)
16147};
16148},
16149_generatePosition:function(event,constrainPosition){
16150var containment,co,top,left,
16151o=this.options,
16152scrollIsRootNode=this._isRootNode(this.scrollParent[0]),
16153pageX=event.pageX,
16154pageY=event.pageY;
16155if(!scrollIsRootNode||!this.offset.scroll){
16156this.offset.scroll={
16157top:this.scrollParent.scrollTop(),
16158left:this.scrollParent.scrollLeft()
16159};
16160}
16161if(constrainPosition){
16162if(this.containment){
16163if(this.relativeContainer){
16164co=this.relativeContainer.offset();
16165containment=[
16166this.containment[0]+co.left,
16167this.containment[1]+co.top,
16168this.containment[2]+co.left,
16169this.containment[3]+co.top
16170];
16171}else{
16172containment=this.containment;
16173}
16174if(event.pageX-this.offset.click.left<containment[0]){
16175pageX=containment[0]+this.offset.click.left;
16176}
16177if(event.pageY-this.offset.click.top<containment[1]){
16178pageY=containment[1]+this.offset.click.top;
16179}
16180if(event.pageX-this.offset.click.left>containment[2]){
16181pageX=containment[2]+this.offset.click.left;
16182}
16183if(event.pageY-this.offset.click.top>containment[3]){
16184pageY=containment[3]+this.offset.click.top;
16185}
16186}
16187if(o.grid){
16188top=o.grid[1]?this.originalPageY+Math.round((pageY-
16189this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;
16190pageY=containment?((top-this.offset.click.top>=containment[1]||
16191top-this.offset.click.top>containment[3])?
16192top:
16193((top-this.offset.click.top>=containment[1])?
16194top-o.grid[1]:top+o.grid[1])):top;
16195left=o.grid[0]?this.originalPageX+
16196Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:
16197this.originalPageX;
16198pageX=containment?((left-this.offset.click.left>=containment[0]||
16199left-this.offset.click.left>containment[2])?
16200left:
16201((left-this.offset.click.left>=containment[0])?
16202left-o.grid[0]:left+o.grid[0])):left;
16203}
16204if(o.axis==="y"){
16205pageX=this.originalPageX;
16206}
16207if(o.axis==="x"){
16208pageY=this.originalPageY;
16209}
16210}
16211return{
16212top:(
16213pageY-
16214this.offset.click.top-
16215this.offset.relative.top-
16216this.offset.parent.top+
16217(this.cssPosition==="fixed"?
16218-this.offset.scroll.top:
16219(scrollIsRootNode?0:this.offset.scroll.top))
16220),
16221left:(
16222pageX-
16223this.offset.click.left-
16224this.offset.relative.left-
16225this.offset.parent.left+
16226(this.cssPosition==="fixed"?
16227-this.offset.scroll.left:
16228(scrollIsRootNode?0:this.offset.scroll.left))
16229)
16230};
16231},
16232_clear:function(){
16233this._removeClass(this.helper,"ui-draggable-dragging");
16234if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){
16235this.helper.remove();
16236}
16237this.helper=null;
16238this.cancelHelperRemoval=false;
16239if(this.destroyOnClear){
16240this.destroy();
16241}
16242},
16243_trigger:function(type,event,ui){
16244ui=ui||this._uiHash();
16245$.ui.plugin.call(this,type,[event,ui,this],true);
16246if(/^(drag|start|stop)/.test(type)){
16247this.positionAbs=this._convertPositionTo("absolute");
16248ui.offset=this.positionAbs;
16249}
16250return $.Widget.prototype._trigger.call(this,type,event,ui);
16251},
16252plugins:{},
16253_uiHash:function(){
16254return{
16255helper:this.helper,
16256position:this.position,
16257originalPosition:this.originalPosition,
16258offset:this.positionAbs
16259};
16260}
16261});
16262$.ui.plugin.add("draggable","connectToSortable",{
16263start:function(event,ui,draggable){
16264var uiSortable=$.extend({},ui,{
16265item:draggable.element
16266});
16267draggable.sortables=[];
16268$(draggable.options.connectToSortable).each(function(){
16269var sortable=$(this).sortable("instance");
16270if(sortable&&!sortable.options.disabled){
16271draggable.sortables.push(sortable);
16272sortable.refreshPositions();
16273sortable._trigger("activate",event,uiSortable);
16274}
16275});
16276},
16277stop:function(event,ui,draggable){
16278var uiSortable=$.extend({},ui,{
16279item:draggable.element
16280});
16281draggable.cancelHelperRemoval=false;
16282$.each(draggable.sortables,function(){
16283var sortable=this;
16284if(sortable.isOver){
16285sortable.isOver=0;
16286draggable.cancelHelperRemoval=true;
16287sortable.cancelHelperRemoval=false;
16288sortable._storedCSS={
16289position:sortable.placeholder.css("position"),
16290top:sortable.placeholder.css("top"),
16291left:sortable.placeholder.css("left")
16292};
16293sortable._mouseStop(event);
16294sortable.options.helper=sortable.options._helper;
16295}else{
16296sortable.cancelHelperRemoval=true;
16297sortable._trigger("deactivate",event,uiSortable);
16298}
16299});
16300},
16301drag:function(event,ui,draggable){
16302$.each(draggable.sortables,function(){
16303var innermostIntersecting=false,
16304sortable=this;
16305sortable.positionAbs=draggable.positionAbs;
16306sortable.helperProportions=draggable.helperProportions;
16307sortable.offset.click=draggable.offset.click;
16308if(sortable._intersectsWith(sortable.containerCache)){
16309innermostIntersecting=true;
16310$.each(draggable.sortables,function(){
16311this.positionAbs=draggable.positionAbs;
16312this.helperProportions=draggable.helperProportions;
16313this.offset.click=draggable.offset.click;
16314if(this!==sortable&&
16315this._intersectsWith(this.containerCache)&&
16316$.contains(sortable.element[0],this.element[0])){
16317innermostIntersecting=false;
16318}
16319return innermostIntersecting;
16320});
16321}
16322if(innermostIntersecting){
16323if(!sortable.isOver){
16324sortable.isOver=1;
16325draggable._parent=ui.helper.parent();
16326sortable.currentItem=ui.helper
16327.appendTo(sortable.element)
16328.data("ui-sortable-item",true);
16329sortable.options._helper=sortable.options.helper;
16330sortable.options.helper=function(){
16331return ui.helper[0];
16332};
16333event.target=sortable.currentItem[0];
16334sortable._mouseCapture(event,true);
16335sortable._mouseStart(event,true,true);
16336sortable.offset.click.top=draggable.offset.click.top;
16337sortable.offset.click.left=draggable.offset.click.left;
16338sortable.offset.parent.left-=draggable.offset.parent.left-
16339sortable.offset.parent.left;
16340sortable.offset.parent.top-=draggable.offset.parent.top-
16341sortable.offset.parent.top;
16342draggable._trigger("toSortable",event);
16343draggable.dropped=sortable.element;
16344$.each(draggable.sortables,function(){
16345this.refreshPositions();
16346});
16347draggable.currentItem=draggable.element;
16348sortable.fromOutside=draggable;
16349}
16350if(sortable.currentItem){
16351sortable._mouseDrag(event);
16352ui.position=sortable.position;
16353}
16354}else{
16355if(sortable.isOver){
16356sortable.isOver=0;
16357sortable.cancelHelperRemoval=true;
16358sortable.options._revert=sortable.options.revert;
16359sortable.options.revert=false;
16360sortable._trigger("out",event,sortable._uiHash(sortable));
16361sortable._mouseStop(event,true);
16362sortable.options.revert=sortable.options._revert;
16363sortable.options.helper=sortable.options._helper;
16364if(sortable.placeholder){
16365sortable.placeholder.remove();
16366}
16367ui.helper.appendTo(draggable._parent);
16368draggable._refreshOffsets(event);
16369ui.position=draggable._generatePosition(event,true);
16370draggable._trigger("fromSortable",event);
16371draggable.dropped=false;
16372$.each(draggable.sortables,function(){
16373this.refreshPositions();
16374});
16375}
16376}
16377});
16378}
16379});
16380$.ui.plugin.add("draggable","cursor",{
16381start:function(event,ui,instance){
16382var t=$("body"),
16383o=instance.options;
16384if(t.css("cursor")){
16385o._cursor=t.css("cursor");
16386}
16387t.css("cursor",o.cursor);
16388},
16389stop:function(event,ui,instance){
16390var o=instance.options;
16391if(o._cursor){
16392$("body").css("cursor",o._cursor);
16393}
16394}
16395});
16396$.ui.plugin.add("draggable","opacity",{
16397start:function(event,ui,instance){
16398var t=$(ui.helper),
16399o=instance.options;
16400if(t.css("opacity")){
16401o._opacity=t.css("opacity");
16402}
16403t.css("opacity",o.opacity);
16404},
16405stop:function(event,ui,instance){
16406var o=instance.options;
16407if(o._opacity){
16408$(ui.helper).css("opacity",o._opacity);
16409}
16410}
16411});
16412$.ui.plugin.add("draggable","scroll",{
16413start:function(event,ui,i){
16414if(!i.scrollParentNotHidden){
16415i.scrollParentNotHidden=i.helper.scrollParent(false);
16416}
16417if(i.scrollParentNotHidden[0]!==i.document[0]&&
16418i.scrollParentNotHidden[0].tagName!=="HTML"){
16419i.overflowOffset=i.scrollParentNotHidden.offset();
16420}
16421},
16422drag:function(event,ui,i){
16423var o=i.options,
16424scrolled=false,
16425scrollParent=i.scrollParentNotHidden[0],
16426document=i.document[0];
16427if(scrollParent!==document&&scrollParent.tagName!=="HTML"){
16428if(!o.axis||o.axis!=="x"){
16429if((i.overflowOffset.top+scrollParent.offsetHeight)-event.pageY<
16430o.scrollSensitivity){
16431scrollParent.scrollTop=scrolled=scrollParent.scrollTop+o.scrollSpeed;
16432}else if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){
16433scrollParent.scrollTop=scrolled=scrollParent.scrollTop-o.scrollSpeed;
16434}
16435}
16436if(!o.axis||o.axis!=="y"){
16437if((i.overflowOffset.left+scrollParent.offsetWidth)-event.pageX<
16438o.scrollSensitivity){
16439scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft+o.scrollSpeed;
16440}else if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){
16441scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft-o.scrollSpeed;
16442}
16443}
16444}else{
16445if(!o.axis||o.axis!=="x"){
16446if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){
16447scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);
16448}else if($(window).height()-(event.pageY-$(document).scrollTop())<
16449o.scrollSensitivity){
16450scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);
16451}
16452}
16453if(!o.axis||o.axis!=="y"){
16454if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){
16455scrolled=$(document).scrollLeft(
16456$(document).scrollLeft()-o.scrollSpeed
16457);
16458}else if($(window).width()-(event.pageX-$(document).scrollLeft())<
16459o.scrollSensitivity){
16460scrolled=$(document).scrollLeft(
16461$(document).scrollLeft()+o.scrollSpeed
16462);
16463}
16464}
16465}
16466if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){
16467$.ui.ddmanager.prepareOffsets(i,event);
16468}
16469}
16470});
16471$.ui.plugin.add("draggable","snap",{
16472start:function(event,ui,i){
16473var o=i.options;
16474i.snapElements=[];
16475$(o.snap.constructor!==String?(o.snap.items||":data(ui-draggable)"):o.snap)
16476.each(function(){
16477var $t=$(this),
16478$o=$t.offset();
16479if(this!==i.element[0]){
16480i.snapElements.push({
16481item:this,
16482width:$t.outerWidth(),height:$t.outerHeight(),
16483top:$o.top,left:$o.left
16484});
16485}
16486});
16487},
16488drag:function(event,ui,inst){
16489var ts,bs,ls,rs,l,r,t,b,i,first,
16490o=inst.options,
16491d=o.snapTolerance,
16492x1=ui.offset.left,x2=x1+inst.helperProportions.width,
16493y1=ui.offset.top,y2=y1+inst.helperProportions.height;
16494for(i=inst.snapElements.length-1;i>=0;i--){
16495l=inst.snapElements[i].left-inst.margins.left;
16496r=l+inst.snapElements[i].width;
16497t=inst.snapElements[i].top-inst.margins.top;
16498b=t+inst.snapElements[i].height;
16499if(x2<l-d||x1>r+d||y2<t-d||y1>b+d||
16500!$.contains(inst.snapElements[i].item.ownerDocument,
16501inst.snapElements[i].item)){
16502if(inst.snapElements[i].snapping){
16503if(inst.options.snap.release){
16504inst.options.snap.release.call(
16505inst.element,
16506event,
16507$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})
16508);
16509}
16510}
16511inst.snapElements[i].snapping=false;
16512continue;
16513}
16514if(o.snapMode!=="inner"){
16515ts=Math.abs(t-y2)<=d;
16516bs=Math.abs(b-y1)<=d;
16517ls=Math.abs(l-x2)<=d;
16518rs=Math.abs(r-x1)<=d;
16519if(ts){
16520ui.position.top=inst._convertPositionTo("relative",{
16521top:t-inst.helperProportions.height,
16522left:0
16523}).top;
16524}
16525if(bs){
16526ui.position.top=inst._convertPositionTo("relative",{
16527top:b,
16528left:0
16529}).top;
16530}
16531if(ls){
16532ui.position.left=inst._convertPositionTo("relative",{
16533top:0,
16534left:l-inst.helperProportions.width
16535}).left;
16536}
16537if(rs){
16538ui.position.left=inst._convertPositionTo("relative",{
16539top:0,
16540left:r
16541}).left;
16542}
16543}
16544first=(ts||bs||ls||rs);
16545if(o.snapMode!=="outer"){
16546ts=Math.abs(t-y1)<=d;
16547bs=Math.abs(b-y2)<=d;
16548ls=Math.abs(l-x1)<=d;
16549rs=Math.abs(r-x2)<=d;
16550if(ts){
16551ui.position.top=inst._convertPositionTo("relative",{
16552top:t,
16553left:0
16554}).top;
16555}
16556if(bs){
16557ui.position.top=inst._convertPositionTo("relative",{
16558top:b-inst.helperProportions.height,
16559left:0
16560}).top;
16561}
16562if(ls){
16563ui.position.left=inst._convertPositionTo("relative",{
16564top:0,
16565left:l
16566}).left;
16567}
16568if(rs){
16569ui.position.left=inst._convertPositionTo("relative",{
16570top:0,
16571left:r-inst.helperProportions.width
16572}).left;
16573}
16574}
16575if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){
16576if(inst.options.snap.snap){
16577inst.options.snap.snap.call(
16578inst.element,
16579event,
16580$.extend(inst._uiHash(),{
16581snapItem:inst.snapElements[i].item
16582}));
16583}
16584}
16585inst.snapElements[i].snapping=(ts||bs||ls||rs||first);
16586}
16587}
16588});
16589$.ui.plugin.add("draggable","stack",{
16590start:function(event,ui,instance){
16591var min,
16592o=instance.options,
16593group=$.makeArray($(o.stack)).sort(function(a,b){
16594return(parseInt($(a).css("zIndex"),10)||0)-
16595(parseInt($(b).css("zIndex"),10)||0);
16596});
16597if(!group.length){
16598return;
16599}
16600min=parseInt($(group[0]).css("zIndex"),10)||0;
16601$(group).each(function(i){
16602$(this).css("zIndex",min+i);
16603});
16604this.css("zIndex",(min+group.length));
16605}
16606});
16607$.ui.plugin.add("draggable","zIndex",{
16608start:function(event,ui,instance){
16609var t=$(ui.helper),
16610o=instance.options;
16611if(t.css("zIndex")){
16612o._zIndex=t.css("zIndex");
16613}
16614t.css("zIndex",o.zIndex);
16615},
16616stop:function(event,ui,instance){
16617var o=instance.options;
16618if(o._zIndex){
16619$(ui.helper).css("zIndex",o._zIndex);
16620}
16621}
16622});
16623var widgetsDraggable=$.ui.draggable;
16624$.widget("ui.resizable",$.ui.mouse,{
16625version:"1.14.1",
16626widgetEventPrefix:"resize",
16627options:{
16628alsoResize:false,
16629animate:false,
16630animateDuration:"slow",
16631animateEasing:"swing",
16632aspectRatio:false,
16633autoHide:false,
16634classes:{
16635"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"
16636},
16637containment:false,
16638ghost:false,
16639grid:false,
16640handles:"e,s,se",
16641helper:false,
16642maxHeight:null,
16643maxWidth:null,
16644minHeight:10,
16645minWidth:10,
16646zIndex:90,
16647resize:null,
16648start:null,
16649stop:null
16650},
16651_num:function(value){
16652return parseFloat(value)||0;
16653},
16654_isNumber:function(value){
16655return!isNaN(parseFloat(value));
16656},
16657_hasScroll:function(el,a){
16658var scroll,
16659has=false,
16660overflow=$(el).css("overflow");
16661if(overflow==="hidden"){
16662return false;
16663}
16664if(overflow==="scroll"){
16665return true;
16666}
16667scroll=(a&&a==="left")?"scrollLeft":"scrollTop";
16668if(el[scroll]>0){
16669return true;
16670}
16671try{
16672el[scroll]=1;
16673has=(el[scroll]>0);
16674el[scroll]=0;
16675}catch(e){
16676}
16677return has;
16678},
16679_create:function(){
16680var margins,
16681o=this.options,
16682that=this;
16683this._addClass("ui-resizable");
16684$.extend(this,{
16685_aspectRatio:!!(o.aspectRatio),
16686aspectRatio:o.aspectRatio,
16687originalElement:this.element,
16688_proportionallyResizeElements:[],
16689_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null
16690});
16691if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){
16692this.element.wrap(
16693$("<div class='ui-wrapper'></div>").css({
16694overflow:"hidden",
16695position:this.element.css("position"),
16696width:this.element.outerWidth(),
16697height:this.element.outerHeight(),
16698top:this.element.css("top"),
16699left:this.element.css("left")
16700})
16701);
16702this.element=this.element.parent().data(
16703"ui-resizable",this.element.resizable("instance")
16704);
16705this.elementIsWrapper=true;
16706margins={
16707marginTop:this.originalElement.css("marginTop"),
16708marginRight:this.originalElement.css("marginRight"),
16709marginBottom:this.originalElement.css("marginBottom"),
16710marginLeft:this.originalElement.css("marginLeft")
16711};
16712this.element.css(margins);
16713this.originalResizeStyle=this.originalElement.css("resize");
16714this.originalElement.css("resize","none");
16715this._proportionallyResizeElements.push(this.originalElement.css({
16716position:"static",
16717zoom:1,
16718display:"block"
16719}));
16720this._proportionallyResize();
16721}
16722this._setupHandles();
16723if(o.autoHide){
16724$(this.element)
16725.on("mouseenter",function(){
16726if(o.disabled){
16727return;
16728}
16729that._removeClass("ui-resizable-autohide");
16730that._handles.show();
16731})
16732.on("mouseleave",function(){
16733if(o.disabled){
16734return;
16735}
16736if(!that.resizing){
16737that._addClass("ui-resizable-autohide");
16738that._handles.hide();
16739}
16740});
16741}
16742this._mouseInit();
16743},
16744_destroy:function(){
16745this._mouseDestroy();
16746this._addedHandles.remove();
16747var wrapper,
16748_destroy=function(exp){
16749$(exp)
16750.removeData("resizable")
16751.removeData("ui-resizable")
16752.off(".resizable");
16753};
16754if(this.elementIsWrapper){
16755_destroy(this.element);
16756wrapper=this.element;
16757this.originalElement.css({
16758position:wrapper.css("position"),
16759width:wrapper.outerWidth(),
16760height:wrapper.outerHeight(),
16761top:wrapper.css("top"),
16762left:wrapper.css("left")
16763}).insertAfter(wrapper);
16764wrapper.remove();
16765}
16766this.originalElement.css("resize",this.originalResizeStyle);
16767_destroy(this.originalElement);
16768return this;
16769},
16770_setOption:function(key,value){
16771this._super(key,value);
16772switch(key){
16773case"handles":
16774this._removeHandles();
16775this._setupHandles();
16776break;
16777case"aspectRatio":
16778this._aspectRatio=!!value;
16779break;
16780default:
16781break;
16782}
16783},
16784_setupHandles:function(){
16785var o=this.options,handle,i,n,hname,axis,that=this;
16786this.handles=o.handles||
16787(!$(".ui-resizable-handle",this.element).length?
16788"e,s,se":{
16789n:".ui-resizable-n",
16790e:".ui-resizable-e",
16791s:".ui-resizable-s",
16792w:".ui-resizable-w",
16793se:".ui-resizable-se",
16794sw:".ui-resizable-sw",
16795ne:".ui-resizable-ne",
16796nw:".ui-resizable-nw"
16797});
16798this._handles=$();
16799this._addedHandles=$();
16800if(this.handles.constructor===String){
16801if(this.handles==="all"){
16802this.handles="n,e,s,w,se,sw,ne,nw";
16803}
16804n=this.handles.split(",");
16805this.handles={};
16806for(i=0;i<n.length;i++){
16807handle=String.prototype.trim.call(n[i]);
16808hname="ui-resizable-"+handle;
16809axis=$("<div>");
16810this._addClass(axis,"ui-resizable-handle "+hname);
16811axis.css({zIndex:o.zIndex});
16812this.handles[handle]=".ui-resizable-"+handle;
16813if(!this.element.children(this.handles[handle]).length){
16814this.element.append(axis);
16815this._addedHandles=this._addedHandles.add(axis);
16816}
16817}
16818}
16819this._renderAxis=function(target){
16820var i,axis,padPos,padWrapper;
16821target=target||this.element;
16822for(i in this.handles){
16823if(this.handles[i].constructor===String){
16824this.handles[i]=this.element.children(this.handles[i]).first().show();
16825}else if(this.handles[i].jquery||this.handles[i].nodeType){
16826this.handles[i]=$(this.handles[i]);
16827this._on(this.handles[i],{"mousedown":that._mouseDown});
16828}
16829if(this.elementIsWrapper&&
16830this.originalElement[0]
16831.nodeName
16832.match(/^(textarea|input|select|button)$/i)){
16833axis=$(this.handles[i],this.element);
16834padWrapper=/sw|ne|nw|se|n|s/.test(i)?
16835axis.outerHeight():
16836axis.outerWidth();
16837padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");
16838target.css(padPos,padWrapper);
16839this._proportionallyResize();
16840}
16841this._handles=this._handles.add(this.handles[i]);
16842}
16843};
16844this._renderAxis(this.element);
16845this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));
16846this._handles.disableSelection();
16847this._handles.on("mouseover",function(){
16848if(!that.resizing){
16849if(this.className){
16850axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
16851}
16852that.axis=axis&&axis[1]?axis[1]:"se";
16853}
16854});
16855if(o.autoHide){
16856this._handles.hide();
16857this._addClass("ui-resizable-autohide");
16858}
16859},
16860_removeHandles:function(){
16861this._addedHandles.remove();
16862},
16863_mouseCapture:function(event){
16864var i,handle,
16865capture=false;
16866for(i in this.handles){
16867handle=$(this.handles[i])[0];
16868if(handle===event.target||$.contains(handle,event.target)){
16869capture=true;
16870}
16871}
16872return!this.options.disabled&&capture;
16873},
16874_mouseStart:function(event){
16875var curleft,curtop,cursor,calculatedSize,
16876o=this.options,
16877el=this.element;
16878this.resizing=true;
16879this._renderProxy();
16880curleft=this._num(this.helper.css("left"));
16881curtop=this._num(this.helper.css("top"));
16882if(o.containment){
16883curleft+=$(o.containment).scrollLeft()||0;
16884curtop+=$(o.containment).scrollTop()||0;
16885}
16886this.offset=this.helper.offset();
16887this.position={left:curleft,top:curtop};
16888if(!this._helper){
16889calculatedSize=this._calculateAdjustedElementDimensions(el);
16890}
16891this.size=this._helper?{
16892width:this.helper.width(),
16893height:this.helper.height()
16894}:{
16895width:calculatedSize.width,
16896height:calculatedSize.height
16897};
16898this.originalSize=this._helper?{
16899width:el.outerWidth(),
16900height:el.outerHeight()
16901}:{
16902width:calculatedSize.width,
16903height:calculatedSize.height
16904};
16905this.sizeDiff={
16906width:el.outerWidth()-el.width(),
16907height:el.outerHeight()-el.height()
16908};
16909this.originalPosition={left:curleft,top:curtop};
16910this.originalMousePosition={left:event.pageX,top:event.pageY};
16911this.aspectRatio=(typeof o.aspectRatio==="number")?
16912o.aspectRatio:
16913((this.originalSize.width/this.originalSize.height)||1);
16914cursor=$(".ui-resizable-"+this.axis).css("cursor");
16915$("body").css("cursor",cursor==="auto"?this.axis+"-resize":cursor);
16916this._addClass("ui-resizable-resizing");
16917this._propagate("start",event);
16918return true;
16919},
16920_mouseDrag:function(event){
16921var data,props,
16922smp=this.originalMousePosition,
16923a=this.axis,
16924dx=(event.pageX-smp.left)||0,
16925dy=(event.pageY-smp.top)||0,
16926trigger=this._change[a];
16927this._updatePrevProperties();
16928if(!trigger){
16929return false;
16930}
16931data=trigger.apply(this,[event,dx,dy]);
16932this._updateVirtualBoundaries(event.shiftKey);
16933if(this._aspectRatio||event.shiftKey){
16934data=this._updateRatio(data,event);
16935}
16936data=this._respectSize(data,event);
16937this._updateCache(data);
16938this._propagate("resize",event);
16939props=this._applyChanges();
16940if(!this._helper&&this._proportionallyResizeElements.length){
16941this._proportionallyResize();
16942}
16943if(!$.isEmptyObject(props)){
16944this._updatePrevProperties();
16945this._trigger("resize",event,this.ui());
16946this._applyChanges();
16947}
16948return false;
16949},
16950_mouseStop:function(event){
16951this.resizing=false;
16952var pr,ista,soffseth,soffsetw,s,left,top,
16953o=this.options,that=this;
16954if(this._helper){
16955pr=this._proportionallyResizeElements;
16956ista=pr.length&&(/textarea/i).test(pr[0].nodeName);
16957soffseth=ista&&this._hasScroll(pr[0],"left")?0:that.sizeDiff.height;
16958soffsetw=ista?0:that.sizeDiff.width;
16959s={
16960width:(that.helper.width()-soffsetw),
16961height:(that.helper.height()-soffseth)
16962};
16963left=(parseFloat(that.element.css("left"))+
16964(that.position.left-that.originalPosition.left))||null;
16965top=(parseFloat(that.element.css("top"))+
16966(that.position.top-that.originalPosition.top))||null;
16967if(!o.animate){
16968this.element.css($.extend(s,{top:top,left:left}));
16969}
16970that.helper.height(that.size.height);
16971that.helper.width(that.size.width);
16972if(this._helper&&!o.animate){
16973this._proportionallyResize();
16974}
16975}
16976$("body").css("cursor","auto");
16977this._removeClass("ui-resizable-resizing");
16978this._propagate("stop",event);
16979if(this._helper){
16980this.helper.remove();
16981}
16982return false;
16983},
16984_updatePrevProperties:function(){
16985this.prevPosition={
16986top:this.position.top,
16987left:this.position.left
16988};
16989this.prevSize={
16990width:this.size.width,
16991height:this.size.height
16992};
16993},
16994_applyChanges:function(){
16995var props={};
16996if(this.position.top!==this.prevPosition.top){
16997props.top=this.position.top+"px";
16998}
16999if(this.position.left!==this.prevPosition.left){
17000props.left=this.position.left+"px";
17001}
17002this.helper.css(props);
17003if(this.size.width!==this.prevSize.width){
17004props.width=this.size.width+"px";
17005this.helper.width(props.width);
17006}
17007if(this.size.height!==this.prevSize.height){
17008props.height=this.size.height+"px";
17009this.helper.height(props.height);
17010}
17011return props;
17012},
17013_updateVirtualBoundaries:function(forceAspectRatio){
17014var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,
17015o=this.options;
17016b={
17017minWidth:this._isNumber(o.minWidth)?o.minWidth:0,
17018maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:Infinity,
17019minHeight:this._isNumber(o.minHeight)?o.minHeight:0,
17020maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:Infinity
17021};
17022if(this._aspectRatio||forceAspectRatio){
17023pMinWidth=b.minHeight*this.aspectRatio;
17024pMinHeight=b.minWidth/this.aspectRatio;
17025pMaxWidth=b.maxHeight*this.aspectRatio;
17026pMaxHeight=b.maxWidth/this.aspectRatio;
17027if(pMinWidth>b.minWidth){
17028b.minWidth=pMinWidth;
17029}
17030if(pMinHeight>b.minHeight){
17031b.minHeight=pMinHeight;
17032}
17033if(pMaxWidth<b.maxWidth){
17034b.maxWidth=pMaxWidth;
17035}
17036if(pMaxHeight<b.maxHeight){
17037b.maxHeight=pMaxHeight;
17038}
17039}
17040this._vBoundaries=b;
17041},
17042_updateCache:function(data){
17043this.offset=this.helper.offset();
17044if(this._isNumber(data.left)){
17045this.position.left=data.left;
17046}
17047if(this._isNumber(data.top)){
17048this.position.top=data.top;
17049}
17050if(this._isNumber(data.height)){
17051this.size.height=data.height;
17052}
17053if(this._isNumber(data.width)){
17054this.size.width=data.width;
17055}
17056},
17057_updateRatio:function(data){
17058var cpos=this.position,
17059csize=this.size,
17060a=this.axis;
17061if(this._isNumber(data.height)){
17062data.width=(data.height*this.aspectRatio);
17063}else if(this._isNumber(data.width)){
17064data.height=(data.width/this.aspectRatio);
17065}
17066if(a==="sw"){
17067data.left=cpos.left+(csize.width-data.width);
17068data.top=null;
17069}
17070if(a==="nw"){
17071data.top=cpos.top+(csize.height-data.height);
17072data.left=cpos.left+(csize.width-data.width);
17073}
17074return data;
17075},
17076_respectSize:function(data){
17077var o=this._vBoundaries,
17078a=this.axis,
17079ismaxw=this._isNumber(data.width)&&o.maxWidth&&(o.maxWidth<data.width),
17080ismaxh=this._isNumber(data.height)&&o.maxHeight&&(o.maxHeight<data.height),
17081isminw=this._isNumber(data.width)&&o.minWidth&&(o.minWidth>data.width),
17082isminh=this._isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height),
17083dw=this.originalPosition.left+this.originalSize.width,
17084dh=this.originalPosition.top+this.originalSize.height,
17085cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);
17086if(isminw){
17087data.width=o.minWidth;
17088}
17089if(isminh){
17090data.height=o.minHeight;
17091}
17092if(ismaxw){
17093data.width=o.maxWidth;
17094}
17095if(ismaxh){
17096data.height=o.maxHeight;
17097}
17098if(isminw&&cw){
17099data.left=dw-o.minWidth;
17100}
17101if(ismaxw&&cw){
17102data.left=dw-o.maxWidth;
17103}
17104if(isminh&&ch){
17105data.top=dh-o.minHeight;
17106}
17107if(ismaxh&&ch){
17108data.top=dh-o.maxHeight;
17109}
17110if(!data.width&&!data.height&&!data.left&&data.top){
17111data.top=null;
17112}else if(!data.width&&!data.height&&!data.top&&data.left){
17113data.left=null;
17114}
17115return data;
17116},
17117_getPaddingPlusBorderDimensions:function(element){
17118var i=0,
17119widths=[],
17120borders=[
17121element.css("borderTopWidth"),
17122element.css("borderRightWidth"),
17123element.css("borderBottomWidth"),
17124element.css("borderLeftWidth")
17125],
17126paddings=[
17127element.css("paddingTop"),
17128element.css("paddingRight"),
17129element.css("paddingBottom"),
17130element.css("paddingLeft")
17131];
17132for(;i<4;i++){
17133widths[i]=(parseFloat(borders[i])||0);
17134widths[i]+=(parseFloat(paddings[i])||0);
17135}
17136return{
17137height:widths[0]+widths[2],
17138width:widths[1]+widths[3]
17139};
17140},
17141_calculateAdjustedElementDimensions:function(element){
17142var elWidth,elHeight,paddingBorder,
17143ce=element.get(0);
17144if(element.css("box-sizing")!=="content-box"||
17145(!this._hasScroll(ce)&&!this._hasScroll(ce,"left"))){
17146return{
17147height:parseFloat(element.css("height")),
17148width:parseFloat(element.css("width"))
17149};
17150}
17151elWidth=parseFloat(ce.style.width);
17152elHeight=parseFloat(ce.style.height);
17153paddingBorder=this._getPaddingPlusBorderDimensions(element);
17154elWidth=isNaN(elWidth)?
17155this._getElementTheoreticalSize(element,paddingBorder,"width"):
17156elWidth;
17157elHeight=isNaN(elHeight)?
17158this._getElementTheoreticalSize(element,paddingBorder,"height"):
17159elHeight;
17160return{
17161height:elHeight,
17162width:elWidth
17163};
17164},
17165_getElementTheoreticalSize:function(element,extraSize,dimension){
17166var size=Math.max(0,Math.ceil(
17167element.get(0)["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
17168extraSize[dimension]-
171690.5
17170))||0;
17171return size;
17172},
17173_proportionallyResize:function(){
17174if(!this._proportionallyResizeElements.length){
17175return;
17176}
17177var prel,
17178i=0,
17179element=this.helper||this.element;
17180for(;i<this._proportionallyResizeElements.length;i++){
17181prel=this._proportionallyResizeElements[i];
17182if(!this.outerDimensions){
17183this.outerDimensions=this._getPaddingPlusBorderDimensions(prel);
17184}
17185prel.css({
17186height:(element.height()-this.outerDimensions.height)||0,
17187width:(element.width()-this.outerDimensions.width)||0
17188});
17189}
17190},
17191_renderProxy:function(){
17192var el=this.element,o=this.options;
17193this.elementOffset=el.offset();
17194if(this._helper){
17195this.helper=this.helper||$("<div></div>").css({overflow:"hidden"});
17196this._addClass(this.helper,this._helper);
17197this.helper.css({
17198width:this.element.outerWidth(),
17199height:this.element.outerHeight(),
17200position:"absolute",
17201left:this.elementOffset.left+"px",
17202top:this.elementOffset.top+"px",
17203zIndex:++o.zIndex
17204});
17205this.helper
17206.appendTo("body")
17207.disableSelection();
17208}else{
17209this.helper=this.element;
17210}
17211},
17212_change:{
17213e:function(event,dx){
17214return{width:this.originalSize.width+dx};
17215},
17216w:function(event,dx){
17217var cs=this.originalSize,sp=this.originalPosition;
17218return{left:sp.left+dx,width:cs.width-dx};
17219},
17220n:function(event,dx,dy){
17221var cs=this.originalSize,sp=this.originalPosition;
17222return{top:sp.top+dy,height:cs.height-dy};
17223},
17224s:function(event,dx,dy){
17225return{height:this.originalSize.height+dy};
17226},
17227se:function(event,dx,dy){
17228return $.extend(this._change.s.apply(this,arguments),
17229this._change.e.apply(this,[event,dx,dy]));
17230},
17231sw:function(event,dx,dy){
17232return $.extend(this._change.s.apply(this,arguments),
17233this._change.w.apply(this,[event,dx,dy]));
17234},
17235ne:function(event,dx,dy){
17236return $.extend(this._change.n.apply(this,arguments),
17237this._change.e.apply(this,[event,dx,dy]));
17238},
17239nw:function(event,dx,dy){
17240return $.extend(this._change.n.apply(this,arguments),
17241this._change.w.apply(this,[event,dx,dy]));
17242}
17243},
17244_propagate:function(n,event){
17245$.ui.plugin.call(this,n,[event,this.ui()]);
17246if(n!=="resize"){
17247this._trigger(n,event,this.ui());
17248}
17249},
17250plugins:{},
17251ui:function(){
17252return{
17253originalElement:this.originalElement,
17254element:this.element,
17255helper:this.helper,
17256position:this.position,
17257size:this.size,
17258originalSize:this.originalSize,
17259originalPosition:this.originalPosition
17260};
17261}
17262});
17263$.ui.plugin.add("resizable","animate",{
17264stop:function(event){
17265var that=$(this).resizable("instance"),
17266o=that.options,
17267pr=that._proportionallyResizeElements,
17268ista=pr.length&&(/textarea/i).test(pr[0].nodeName),
17269soffseth=ista&&that._hasScroll(pr[0],"left")?0:that.sizeDiff.height,
17270soffsetw=ista?0:that.sizeDiff.width,
17271style={
17272width:(that.size.width-soffsetw),
17273height:(that.size.height-soffseth)
17274},
17275left=(parseFloat(that.element.css("left"))+
17276(that.position.left-that.originalPosition.left))||null,
17277top=(parseFloat(that.element.css("top"))+
17278(that.position.top-that.originalPosition.top))||null;
17279that.element.animate(
17280$.extend(style,top&&left?{top:top,left:left}:{}),{
17281duration:o.animateDuration,
17282easing:o.animateEasing,
17283step:function(){
17284var data={
17285width:parseFloat(that.element.css("width")),
17286height:parseFloat(that.element.css("height")),
17287top:parseFloat(that.element.css("top")),
17288left:parseFloat(that.element.css("left"))
17289};
17290if(pr&&pr.length){
17291$(pr[0]).css({width:data.width,height:data.height});
17292}
17293that._updateCache(data);
17294that._propagate("resize",event);
17295}
17296}
17297);
17298}
17299});
17300$.ui.plugin.add("resizable","containment",{
17301start:function(){
17302var element,p,co,ch,cw,width,height,
17303that=$(this).resizable("instance"),
17304o=that.options,
17305el=that.element,
17306oc=o.containment,
17307ce=(oc instanceof $)?
17308oc.get(0):
17309(/parent/.test(oc))?el.parent().get(0):oc;
17310if(!ce){
17311return;
17312}
17313that.containerElement=$(ce);
17314if(/document/.test(oc)||oc===document){
17315that.containerOffset={
17316left:0,
17317top:0
17318};
17319that.containerPosition={
17320left:0,
17321top:0
17322};
17323that.parentData={
17324element:$(document),
17325left:0,
17326top:0,
17327width:$(document).width(),
17328height:$(document).height()||document.body.parentNode.scrollHeight
17329};
17330}else{
17331element=$(ce);
17332p=[];
17333$(["Top","Right","Left","Bottom"]).each(function(i,name){
17334p[i]=that._num(element.css("padding"+name));
17335});
17336that.containerOffset=element.offset();
17337that.containerPosition=element.position();
17338that.containerSize={
17339height:(element.innerHeight()-p[3]),
17340width:(element.innerWidth()-p[1])
17341};
17342co=that.containerOffset;
17343ch=that.containerSize.height;
17344cw=that.containerSize.width;
17345width=(that._hasScroll(ce,"left")?ce.scrollWidth:cw);
17346height=(that._hasScroll(ce)?ce.scrollHeight:ch);
17347that.parentData={
17348element:ce,
17349left:co.left,
17350top:co.top,
17351width:width,
17352height:height
17353};
17354}
17355},
17356resize:function(event){
17357var woset,hoset,isParent,isOffsetRelative,
17358that=$(this).resizable("instance"),
17359o=that.options,
17360co=that.containerOffset,
17361cp=that.position,
17362pRatio=that._aspectRatio||event.shiftKey,
17363cop={
17364top:0,
17365left:0
17366},
17367ce=that.containerElement,
17368continueResize=true;
17369if(ce[0]!==document&&(/static/).test(ce.css("position"))){
17370cop=co;
17371}
17372if(cp.left<(that._helper?co.left:0)){
17373that.size.width=that.size.width+
17374(that._helper?
17375(that.position.left-co.left):
17376(that.position.left-cop.left));
17377if(pRatio){
17378that.size.height=that.size.width/that.aspectRatio;
17379continueResize=false;
17380}
17381that.position.left=o.helper?co.left:0;
17382}
17383if(cp.top<(that._helper?co.top:0)){
17384that.size.height=that.size.height+
17385(that._helper?
17386(that.position.top-co.top):
17387that.position.top);
17388if(pRatio){
17389that.size.width=that.size.height*that.aspectRatio;
17390continueResize=false;
17391}
17392that.position.top=that._helper?co.top:0;
17393}
17394isParent=that.containerElement.get(0)===that.element.parent().get(0);
17395isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position"));
17396if(isParent&&isOffsetRelative){
17397that.offset.left=that.parentData.left+that.position.left;
17398that.offset.top=that.parentData.top+that.position.top;
17399}else{
17400that.offset.left=that.element.offset().left;
17401that.offset.top=that.element.offset().top;
17402}
17403woset=Math.abs(that.sizeDiff.width+
17404(that._helper?
17405that.offset.left-cop.left:
17406(that.offset.left-co.left)));
17407hoset=Math.abs(that.sizeDiff.height+
17408(that._helper?
17409that.offset.top-cop.top:
17410(that.offset.top-co.top)));
17411if(woset+that.size.width>=that.parentData.width){
17412that.size.width=that.parentData.width-woset;
17413if(pRatio){
17414that.size.height=that.size.width/that.aspectRatio;
17415continueResize=false;
17416}
17417}
17418if(hoset+that.size.height>=that.parentData.height){
17419that.size.height=that.parentData.height-hoset;
17420if(pRatio){
17421that.size.width=that.size.height*that.aspectRatio;
17422continueResize=false;
17423}
17424}
17425if(!continueResize){
17426that.position.left=that.prevPosition.left;
17427that.position.top=that.prevPosition.top;
17428that.size.width=that.prevSize.width;
17429that.size.height=that.prevSize.height;
17430}
17431},
17432stop:function(){
17433var that=$(this).resizable("instance"),
17434o=that.options,
17435co=that.containerOffset,
17436cop=that.containerPosition,
17437ce=that.containerElement,
17438helper=$(that.helper),
17439ho=helper.offset(),
17440w=helper.outerWidth()-that.sizeDiff.width,
17441h=helper.outerHeight()-that.sizeDiff.height;
17442if(that._helper&&!o.animate&&(/relative/).test(ce.css("position"))){
17443$(this).css({
17444left:ho.left-cop.left-co.left,
17445width:w,
17446height:h
17447});
17448}
17449if(that._helper&&!o.animate&&(/static/).test(ce.css("position"))){
17450$(this).css({
17451left:ho.left-cop.left-co.left,
17452width:w,
17453height:h
17454});
17455}
17456}
17457});
17458$.ui.plugin.add("resizable","alsoResize",{
17459start:function(){
17460var that=$(this).resizable("instance"),
17461o=that.options;
17462$(o.alsoResize).each(function(){
17463var el=$(this),
17464elSize=that._calculateAdjustedElementDimensions(el);
17465el.data("ui-resizable-alsoresize",{
17466width:elSize.width,height:elSize.height,
17467left:parseFloat(el.css("left")),top:parseFloat(el.css("top"))
17468});
17469});
17470},
17471resize:function(event,ui){
17472var that=$(this).resizable("instance"),
17473o=that.options,
17474os=that.originalSize,
17475op=that.originalPosition,
17476delta={
17477height:(that.size.height-os.height)||0,
17478width:(that.size.width-os.width)||0,
17479top:(that.position.top-op.top)||0,
17480left:(that.position.left-op.left)||0
17481};
17482$(o.alsoResize).each(function(){
17483var el=$(this),start=$(this).data("ui-resizable-alsoresize"),style={},
17484css=el.parents(ui.originalElement[0]).length?
17485["width","height"]:
17486["width","height","top","left"];
17487$.each(css,function(i,prop){
17488var sum=(start[prop]||0)+(delta[prop]||0);
17489if(sum&&sum>=0){
17490style[prop]=sum||null;
17491}
17492});
17493el.css(style);
17494});
17495},
17496stop:function(){
17497$(this).removeData("ui-resizable-alsoresize");
17498}
17499});
17500$.ui.plugin.add("resizable","ghost",{
17501start:function(){
17502var that=$(this).resizable("instance"),cs=that.size;
17503that.ghost=that.originalElement.clone();
17504that.ghost.css({
17505opacity:0.25,
17506display:"block",
17507position:"relative",
17508height:cs.height,
17509width:cs.width,
17510margin:0,
17511left:0,
17512top:0
17513});
17514that._addClass(that.ghost,"ui-resizable-ghost");
17515if($.uiBackCompat===true&&typeof that.options.ghost==="string"){
17516that.ghost.addClass(this.options.ghost);
17517}
17518that.ghost.appendTo(that.helper);
17519},
17520resize:function(){
17521var that=$(this).resizable("instance");
17522if(that.ghost){
17523that.ghost.css({
17524position:"relative",
17525height:that.size.height,
17526width:that.size.width
17527});
17528}
17529},
17530stop:function(){
17531var that=$(this).resizable("instance");
17532if(that.ghost&&that.helper){
17533that.helper.get(0).removeChild(that.ghost.get(0));
17534}
17535}
17536});
17537$.ui.plugin.add("resizable","grid",{
17538resize:function(){
17539var outerDimensions,
17540that=$(this).resizable("instance"),
17541o=that.options,
17542cs=that.size,
17543os=that.originalSize,
17544op=that.originalPosition,
17545a=that.axis,
17546grid=typeof o.grid==="number"?[o.grid,o.grid]:o.grid,
17547gridX=(grid[0]||1),
17548gridY=(grid[1]||1),
17549ox=Math.round((cs.width-os.width)/gridX)*gridX,
17550oy=Math.round((cs.height-os.height)/gridY)*gridY,
17551newWidth=os.width+ox,
17552newHeight=os.height+oy,
17553isMaxWidth=o.maxWidth&&(o.maxWidth<newWidth),
17554isMaxHeight=o.maxHeight&&(o.maxHeight<newHeight),
17555isMinWidth=o.minWidth&&(o.minWidth>newWidth),
17556isMinHeight=o.minHeight&&(o.minHeight>newHeight);
17557o.grid=grid;
17558if(isMinWidth){
17559newWidth+=gridX;
17560}
17561if(isMinHeight){
17562newHeight+=gridY;
17563}
17564if(isMaxWidth){
17565newWidth-=gridX;
17566}
17567if(isMaxHeight){
17568newHeight-=gridY;
17569}
17570if(/^(se|s|e)$/.test(a)){
17571that.size.width=newWidth;
17572that.size.height=newHeight;
17573}else if(/^(ne)$/.test(a)){
17574that.size.width=newWidth;
17575that.size.height=newHeight;
17576that.position.top=op.top-oy;
17577}else if(/^(sw)$/.test(a)){
17578that.size.width=newWidth;
17579that.size.height=newHeight;
17580that.position.left=op.left-ox;
17581}else{
17582if(newHeight-gridY<=0||newWidth-gridX<=0){
17583outerDimensions=that._getPaddingPlusBorderDimensions(this);
17584}
17585if(newHeight-gridY>0){
17586that.size.height=newHeight;
17587that.position.top=op.top-oy;
17588}else{
17589newHeight=gridY-outerDimensions.height;
17590that.size.height=newHeight;
17591that.position.top=op.top+os.height-newHeight;
17592}
17593if(newWidth-gridX>0){
17594that.size.width=newWidth;
17595that.position.left=op.left-ox;
17596}else{
17597newWidth=gridX-outerDimensions.width;
17598that.size.width=newWidth;
17599that.position.left=op.left+os.width-newWidth;
17600}
17601}
17602}
17603});
17604var widgetsResizable=$.ui.resizable;
17605$.widget("ui.dialog",{
17606version:"1.14.1",
17607options:{
17608appendTo:"body",
17609autoOpen:true,
17610buttons:[],
17611classes:{
17612"ui-dialog":"ui-corner-all",
17613"ui-dialog-titlebar":"ui-corner-all"
17614},
17615closeOnEscape:true,
17616closeText:"Close",
17617draggable:true,
17618hide:null,
17619height:"auto",
17620maxHeight:null,
17621maxWidth:null,
17622minHeight:150,
17623minWidth:150,
17624modal:false,
17625position:{
17626my:"center",
17627at:"center",
17628of:window,
17629collision:"fit",
17630using:function(pos){
17631var topOffset=$(this).css(pos).offset().top;
17632if(topOffset<0){
17633$(this).css("top",pos.top-topOffset);
17634}
17635}
17636},
17637resizable:true,
17638show:null,
17639title:null,
17640uiDialogTitleHeadingLevel:0,
17641width:300,
17642beforeClose:null,
17643close:null,
17644drag:null,
17645dragStart:null,
17646dragStop:null,
17647focus:null,
17648open:null,
17649resize:null,
17650resizeStart:null,
17651resizeStop:null
17652},
17653sizeRelatedOptions:{
17654buttons:true,
17655height:true,
17656maxHeight:true,
17657maxWidth:true,
17658minHeight:true,
17659minWidth:true,
17660width:true
17661},
17662resizableRelatedOptions:{
17663maxHeight:true,
17664maxWidth:true,
17665minHeight:true,
17666minWidth:true
17667},
17668_create:function(){
17669this.originalCss={
17670display:this.element[0].style.display,
17671width:this.element[0].style.width,
17672minHeight:this.element[0].style.minHeight,
17673maxHeight:this.element[0].style.maxHeight,
17674height:this.element[0].style.height
17675};
17676this.originalPosition={
17677parent:this.element.parent(),
17678index:this.element.parent().children().index(this.element)
17679};
17680this.originalTitle=this.element.attr("title");
17681if(this.options.title==null&&this.originalTitle!=null){
17682this.options.title=this.originalTitle;
17683}
17684if(this.options.disabled){
17685this.options.disabled=false;
17686}
17687this._createWrapper();
17688this.element
17689.show()
17690.removeAttr("title")
17691.appendTo(this.uiDialog);
17692this._addClass("ui-dialog-content","ui-widget-content");
17693this._createTitlebar();
17694this._createButtonPane();
17695if(this.options.draggable&&$.fn.draggable){
17696this._makeDraggable();
17697}
17698if(this.options.resizable&&$.fn.resizable){
17699this._makeResizable();
17700}
17701this._isOpen=false;
17702this._trackFocus();
17703},
17704_init:function(){
17705if(this.options.autoOpen){
17706this.open();
17707}
17708},
17709_appendTo:function(){
17710var element=this.options.appendTo;
17711if(element&&(element.jquery||element.nodeType)){
17712return $(element);
17713}
17714return this.document.find(element||"body").eq(0);
17715},
17716_destroy:function(){
17717var next,
17718originalPosition=this.originalPosition;
17719this._untrackInstance();
17720this._destroyOverlay();
17721this.element
17722.removeUniqueId()
17723.css(this.originalCss)
17724.detach();
17725this.uiDialog.remove();
17726if(this.originalTitle){
17727this.element.attr("title",this.originalTitle);
17728}
17729next=originalPosition.parent.children().eq(originalPosition.index);
17730if(next.length&&next[0]!==this.element[0]){
17731next.before(this.element);
17732}else{
17733originalPosition.parent.append(this.element);
17734}
17735},
17736widget:function(){
17737return this.uiDialog;
17738},
17739disable:$.noop,
17740enable:$.noop,
17741close:function(event){
17742var that=this;
17743if(!this._isOpen||this._trigger("beforeClose",event)===false){
17744return;
17745}
17746this._isOpen=false;
17747this._focusedElement=null;
17748this._destroyOverlay();
17749this._untrackInstance();
17750if(!this.opener.filter(":focusable").trigger("focus").length){
17751$(this.document[0].activeElement).trigger("blur");
17752}
17753this._hide(this.uiDialog,this.options.hide,function(){
17754that._trigger("close",event);
17755});
17756},
17757isOpen:function(){
17758return this._isOpen;
17759},
17760moveToTop:function(){
17761this._moveToTop();
17762},
17763_moveToTop:function(event,silent){
17764var moved=false,
17765zIndices=this.uiDialog.siblings(".ui-front:visible").map(function(){
17766return+$(this).css("z-index");
17767}).get(),
17768zIndexMax=Math.max.apply(null,zIndices);
17769if(zIndexMax>=+this.uiDialog.css("z-index")){
17770this.uiDialog.css("z-index",zIndexMax+1);
17771moved=true;
17772}
17773if(moved&&!silent){
17774this._trigger("focus",event);
17775}
17776return moved;
17777},
17778open:function(){
17779var that=this;
17780if(this._isOpen){
17781if(this._moveToTop()){
17782this._focusTabbable();
17783}
17784return;
17785}
17786this._isOpen=true;
17787this.opener=$(this.document[0].activeElement);
17788this._size();
17789this._position();
17790this._createOverlay();
17791this._moveToTop(null,true);
17792if(this.overlay){
17793this.overlay.css("z-index",this.uiDialog.css("z-index")-1);
17794}
17795this._show(this.uiDialog,this.options.show,function(){
17796that._focusTabbable();
17797that._trigger("focus");
17798});
17799this._makeFocusTarget();
17800this._trigger("open");
17801},
17802_focusTabbable:function(){
17803var hasFocus=this._focusedElement;
17804if(!hasFocus){
17805hasFocus=this.element.find("[autofocus]");
17806}
17807if(!hasFocus.length){
17808hasFocus=this.element.find(":tabbable");
17809}
17810if(!hasFocus.length){
17811hasFocus=this.uiDialogButtonPane.find(":tabbable");
17812}
17813if(!hasFocus.length){
17814hasFocus=this.uiDialogTitlebarClose.filter(":tabbable");
17815}
17816if(!hasFocus.length){
17817hasFocus=this.uiDialog;
17818}
17819hasFocus.eq(0).trigger("focus");
17820},
17821_restoreTabbableFocus:function(){
17822var activeElement=this.document[0].activeElement,
17823isActive=this.uiDialog[0]===activeElement||
17824$.contains(this.uiDialog[0],activeElement);
17825if(!isActive){
17826this._focusTabbable();
17827}
17828},
17829_keepFocus:function(event){
17830event.preventDefault();
17831this._restoreTabbableFocus();
17832},
17833_createWrapper:function(){
17834this.uiDialog=$("<div>")
17835.hide()
17836.attr({
17837tabIndex:-1,
17838role:"dialog",
17839"aria-modal":this.options.modal?"true":null
17840})
17841.appendTo(this._appendTo());
17842this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front");
17843this._on(this.uiDialog,{
17844keydown:function(event){
17845if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&
17846event.keyCode===$.ui.keyCode.ESCAPE){
17847event.preventDefault();
17848this.close(event);
17849return;
17850}
17851if(event.keyCode!==$.ui.keyCode.TAB||event.isDefaultPrevented()){
17852return;
17853}
17854var tabbables=this.uiDialog.find(":tabbable"),
17855first=tabbables.first(),
17856last=tabbables.last();
17857if((event.target===last[0]||event.target===this.uiDialog[0])&&
17858!event.shiftKey){
17859this._delay(function(){
17860first.trigger("focus");
17861});
17862event.preventDefault();
17863}else if((event.target===first[0]||
17864event.target===this.uiDialog[0])&&event.shiftKey){
17865this._delay(function(){
17866last.trigger("focus");
17867});
17868event.preventDefault();
17869}
17870},
17871mousedown:function(event){
17872if(this._moveToTop(event)){
17873this._focusTabbable();
17874}
17875}
17876});
17877if(!this.element.find("[aria-describedby]").length){
17878this.uiDialog.attr({
17879"aria-describedby":this.element.uniqueId().attr("id")
17880});
17881}
17882},
17883_createTitlebar:function(){
17884var uiDialogTitle;
17885this.uiDialogTitlebar=$("<div>");
17886this._addClass(this.uiDialogTitlebar,
17887"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix");
17888this._on(this.uiDialogTitlebar,{
17889mousedown:function(event){
17890if(!$(event.target).closest(".ui-dialog-titlebar-close")){
17891this.uiDialog.trigger("focus");
17892}
17893}
17894});
17895this.uiDialogTitlebarClose=$("<button type='button'></button>")
17896.button({
17897label:$("<a>").text(this.options.closeText).html(),
17898icon:"ui-icon-closethick",
17899showLabel:false
17900})
17901.appendTo(this.uiDialogTitlebar);
17902this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close");
17903this._on(this.uiDialogTitlebarClose,{
17904click:function(event){
17905event.preventDefault();
17906this.close(event);
17907}
17908});
17909var uiDialogHeadingLevel=Number.isInteger(this.options.uiDialogTitleHeadingLevel)&&
17910this.options.uiDialogTitleHeadingLevel>0&&
17911this.options.uiDialogTitleHeadingLevel<=6?
17912"h"+this.options.uiDialogTitleHeadingLevel:"span";
17913uiDialogTitle=$("<"+uiDialogHeadingLevel+">")
17914.uniqueId().prependTo(this.uiDialogTitlebar);
17915this._addClass(uiDialogTitle,"ui-dialog-title");
17916this._title(uiDialogTitle);
17917this.uiDialogTitlebar.prependTo(this.uiDialog);
17918this.uiDialog.attr({
17919"aria-labelledby":uiDialogTitle.attr("id")
17920});
17921},
17922_title:function(title){
17923if(this.options.title){
17924title.text(this.options.title);
17925}else{
17926title.html("&#160;");
17927}
17928},
17929_createButtonPane:function(){
17930this.uiDialogButtonPane=$("<div>");
17931this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane",
17932"ui-widget-content ui-helper-clearfix");
17933this.uiButtonSet=$("<div>")
17934.appendTo(this.uiDialogButtonPane);
17935this._addClass(this.uiButtonSet,"ui-dialog-buttonset");
17936this._createButtons();
17937},
17938_createButtons:function(){
17939var that=this,
17940buttons=this.options.buttons;
17941this.uiDialogButtonPane.remove();
17942this.uiButtonSet.empty();
17943if($.isEmptyObject(buttons)||(Array.isArray(buttons)&&!buttons.length)){
17944this._removeClass(this.uiDialog,"ui-dialog-buttons");
17945return;
17946}
17947$.each(buttons,function(name,props){
17948var click,buttonOptions;
17949props=typeof props==="function"?
17950{click:props,text:name}:
17951props;
17952props=$.extend({type:"button"},props);
17953click=props.click;
17954buttonOptions={
17955icon:props.icon,
17956iconPosition:props.iconPosition,
17957showLabel:props.showLabel,
17958icons:props.icons,
17959text:props.text
17960};
17961delete props.click;
17962delete props.icon;
17963delete props.iconPosition;
17964delete props.showLabel;
17965delete props.icons;
17966if(typeof props.text==="boolean"){
17967delete props.text;
17968}
17969$("<button></button>",props)
17970.button(buttonOptions)
17971.appendTo(that.uiButtonSet)
17972.on("click",function(){
17973click.apply(that.element[0],arguments);
17974});
17975});
17976this._addClass(this.uiDialog,"ui-dialog-buttons");
17977this.uiDialogButtonPane.appendTo(this.uiDialog);
17978},
17979_makeDraggable:function(){
17980var that=this,
17981options=this.options;
17982function filteredUi(ui){
17983return{
17984position:ui.position,
17985offset:ui.offset
17986};
17987}
17988this.uiDialog.draggable({
17989cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
17990handle:".ui-dialog-titlebar",
17991containment:"document",
17992start:function(event,ui){
17993that._addClass($(this),"ui-dialog-dragging");
17994that._blockFrames();
17995that._trigger("dragStart",event,filteredUi(ui));
17996},
17997drag:function(event,ui){
17998that._trigger("drag",event,filteredUi(ui));
17999},
18000stop:function(event,ui){
18001var left=ui.offset.left-that.document.scrollLeft(),
18002top=ui.offset.top-that.document.scrollTop();
18003options.position={
18004my:"left top",
18005at:"left"+(left>=0?"+":"")+left+" "+
18006"top"+(top>=0?"+":"")+top,
18007of:that.window
18008};
18009that._removeClass($(this),"ui-dialog-dragging");
18010that._unblockFrames();
18011that._trigger("dragStop",event,filteredUi(ui));
18012}
18013});
18014},
18015_makeResizable:function(){
18016var that=this,
18017options=this.options,
18018handles=options.resizable,
18019position=this.uiDialog.css("position"),
18020resizeHandles=typeof handles==="string"?
18021handles:
18022"n,e,s,w,se,sw,ne,nw";
18023function filteredUi(ui){
18024return{
18025originalPosition:ui.originalPosition,
18026originalSize:ui.originalSize,
18027position:ui.position,
18028size:ui.size
18029};
18030}
18031this.uiDialog.resizable({
18032cancel:".ui-dialog-content",
18033containment:"document",
18034alsoResize:this.element,
18035maxWidth:options.maxWidth,
18036maxHeight:options.maxHeight,
18037minWidth:options.minWidth,
18038minHeight:this._minHeight(),
18039handles:resizeHandles,
18040start:function(event,ui){
18041that._addClass($(this),"ui-dialog-resizing");
18042that._blockFrames();
18043that._trigger("resizeStart",event,filteredUi(ui));
18044},
18045resize:function(event,ui){
18046that._trigger("resize",event,filteredUi(ui));
18047},
18048stop:function(event,ui){
18049var offset=that.uiDialog.offset(),
18050left=offset.left-that.document.scrollLeft(),
18051top=offset.top-that.document.scrollTop();
18052options.height=that.uiDialog.height();
18053options.width=that.uiDialog.width();
18054options.position={
18055my:"left top",
18056at:"left"+(left>=0?"+":"")+left+" "+
18057"top"+(top>=0?"+":"")+top,
18058of:that.window
18059};
18060that._removeClass($(this),"ui-dialog-resizing");
18061that._unblockFrames();
18062that._trigger("resizeStop",event,filteredUi(ui));
18063}
18064})
18065.css("position",position);
18066},
18067_trackFocus:function(){
18068this._on(this.widget(),{
18069focusin:function(event){
18070this._makeFocusTarget();
18071this._focusedElement=$(event.target);
18072}
18073});
18074},
18075_makeFocusTarget:function(){
18076this._untrackInstance();
18077this._trackingInstances().unshift(this);
18078},
18079_untrackInstance:function(){
18080var instances=this._trackingInstances(),
18081exists=$.inArray(this,instances);
18082if(exists!==-1){
18083instances.splice(exists,1);
18084}
18085},
18086_trackingInstances:function(){
18087var instances=this.document.data("ui-dialog-instances");
18088if(!instances){
18089instances=[];
18090this.document.data("ui-dialog-instances",instances);
18091}
18092return instances;
18093},
18094_minHeight:function(){
18095var options=this.options;
18096return options.height==="auto"?
18097options.minHeight:
18098Math.min(options.minHeight,options.height);
18099},
18100_position:function(){
18101var isVisible=this.uiDialog.is(":visible");
18102if(!isVisible){
18103this.uiDialog.show();
18104}
18105this.uiDialog.position(this.options.position);
18106if(!isVisible){
18107this.uiDialog.hide();
18108}
18109},
18110_setOptions:function(options){
18111var that=this,
18112resize=false,
18113resizableOptions={};
18114$.each(options,function(key,value){
18115that._setOption(key,value);
18116if(key in that.sizeRelatedOptions){
18117resize=true;
18118}
18119if(key in that.resizableRelatedOptions){
18120resizableOptions[key]=value;
18121}
18122});
18123if(resize){
18124this._size();
18125this._position();
18126}
18127if(this.uiDialog.is(":data(ui-resizable)")){
18128this.uiDialog.resizable("option",resizableOptions);
18129}
18130},
18131_setOption:function(key,value){
18132var isDraggable,isResizable,
18133uiDialog=this.uiDialog;
18134if(key==="disabled"){
18135return;
18136}
18137this._super(key,value);
18138if(key==="appendTo"){
18139this.uiDialog.appendTo(this._appendTo());
18140}
18141if(key==="buttons"){
18142this._createButtons();
18143}
18144if(key==="closeText"){
18145this.uiDialogTitlebarClose.button({
18146label:$("<a>").text(""+this.options.closeText).html()
18147});
18148}
18149if(key==="draggable"){
18150isDraggable=uiDialog.is(":data(ui-draggable)");
18151if(isDraggable&&!value){
18152uiDialog.draggable("destroy");
18153}
18154if(!isDraggable&&value){
18155this._makeDraggable();
18156}
18157}
18158if(key==="position"){
18159this._position();
18160}
18161if(key==="resizable"){
18162isResizable=uiDialog.is(":data(ui-resizable)");
18163if(isResizable&&!value){
18164uiDialog.resizable("destroy");
18165}
18166if(isResizable&&typeof value==="string"){
18167uiDialog.resizable("option","handles",value);
18168}
18169if(!isResizable&&value!==false){
18170this._makeResizable();
18171}
18172}
18173if(key==="title"){
18174this._title(this.uiDialogTitlebar.find(".ui-dialog-title"));
18175}
18176if(key==="modal"){
18177uiDialog.attr("aria-modal",value?"true":null);
18178}
18179},
18180_size:function(){
18181var nonContentHeight,minContentHeight,maxContentHeight,
18182options=this.options;
18183this.element.show().css({
18184width:"auto",
18185minHeight:0,
18186maxHeight:"none",
18187height:0
18188});
18189if(options.minWidth>options.width){
18190options.width=options.minWidth;
18191}
18192nonContentHeight=this.uiDialog.css({
18193height:"auto",
18194width:options.width
18195})
18196.outerHeight();
18197minContentHeight=Math.max(0,options.minHeight-nonContentHeight);
18198maxContentHeight=typeof options.maxHeight==="number"?
18199Math.max(0,options.maxHeight-nonContentHeight):
18200"none";
18201if(options.height==="auto"){
18202this.element.css({
18203minHeight:minContentHeight,
18204maxHeight:maxContentHeight,
18205height:"auto"
18206});
18207}else{
18208this.element.height(Math.max(0,options.height-nonContentHeight));
18209}
18210if(this.uiDialog.is(":data(ui-resizable)")){
18211this.uiDialog.resizable("option","minHeight",this._minHeight());
18212}
18213},
18214_blockFrames:function(){
18215this.iframeBlocks=this.document.find("iframe").map(function(){
18216var iframe=$(this);
18217return $("<div>")
18218.css({
18219position:"absolute",
18220width:iframe.outerWidth(),
18221height:iframe.outerHeight()
18222})
18223.appendTo(iframe.parent())
18224.offset(iframe.offset())[0];
18225});
18226},
18227_unblockFrames:function(){
18228if(this.iframeBlocks){
18229this.iframeBlocks.remove();
18230delete this.iframeBlocks;
18231}
18232},
18233_allowInteraction:function(event){
18234if($(event.target).closest(".ui-dialog").length){
18235return true;
18236}
18237return!!$(event.target).closest(".ui-datepicker").length;
18238},
18239_createOverlay:function(){
18240if(!this.options.modal){
18241return;
18242}
18243var isOpening=true;
18244this._delay(function(){
18245isOpening=false;
18246});
18247if(!this.document.data("ui-dialog-overlays")){
18248this.document.on("focusin.ui-dialog",function(event){
18249if(isOpening){
18250return;
18251}
18252var instance=this._trackingInstances()[0];
18253if(!instance._allowInteraction(event)){
18254event.preventDefault();
18255instance._focusTabbable();
18256}
18257}.bind(this));
18258}
18259this.overlay=$("<div>")
18260.appendTo(this._appendTo());
18261this._addClass(this.overlay,null,"ui-widget-overlay ui-front");
18262this._on(this.overlay,{
18263mousedown:"_keepFocus"
18264});
18265this.document.data("ui-dialog-overlays",
18266(this.document.data("ui-dialog-overlays")||0)+1);
18267},
18268_destroyOverlay:function(){
18269if(!this.options.modal){
18270return;
18271}
18272if(this.overlay){
18273var overlays=this.document.data("ui-dialog-overlays")-1;
18274if(!overlays){
18275this.document.off("focusin.ui-dialog");
18276this.document.removeData("ui-dialog-overlays");
18277}else{
18278this.document.data("ui-dialog-overlays",overlays);
18279}
18280this.overlay.remove();
18281this.overlay=null;
18282}
18283}
18284});
18285if($.uiBackCompat===true){
18286$.widget("ui.dialog",$.ui.dialog,{
18287options:{
18288dialogClass:""
18289},
18290_createWrapper:function(){
18291this._super();
18292this.uiDialog.addClass(this.options.dialogClass);
18293},
18294_setOption:function(key,value){
18295if(key==="dialogClass"){
18296this.uiDialog
18297.removeClass(this.options.dialogClass)
18298.addClass(value);
18299}
18300this._superApply(arguments);
18301}
18302});
18303}
18304var widgetsDialog=$.ui.dialog;
18305$.widget("ui.droppable",{
18306version:"1.14.1",
18307widgetEventPrefix:"drop",
18308options:{
18309accept:"*",
18310addClasses:true,
18311greedy:false,
18312scope:"default",
18313tolerance:"intersect",
18314activate:null,
18315deactivate:null,
18316drop:null,
18317out:null,
18318over:null
18319},
18320_create:function(){
18321var proportions,
18322o=this.options,
18323accept=o.accept;
18324this.isover=false;
18325this.isout=true;
18326this.accept=typeof accept==="function"?accept:function(d){
18327return d.is(accept);
18328};
18329this.proportions=function(){
18330if(arguments.length){
18331proportions=arguments[0];
18332}else{
18333return proportions?
18334proportions:
18335proportions={
18336width:this.element[0].offsetWidth,
18337height:this.element[0].offsetHeight
18338};
18339}
18340};
18341this._addToManager(o.scope);
18342if(o.addClasses){
18343this._addClass("ui-droppable");
18344}
18345},
18346_addToManager:function(scope){
18347$.ui.ddmanager.droppables[scope]=$.ui.ddmanager.droppables[scope]||[];
18348$.ui.ddmanager.droppables[scope].push(this);
18349},
18350_splice:function(drop){
18351var i=0;
18352for(;i<drop.length;i++){
18353if(drop[i]===this){
18354drop.splice(i,1);
18355}
18356}
18357},
18358_destroy:function(){
18359var drop=$.ui.ddmanager.droppables[this.options.scope];
18360this._splice(drop);
18361},
18362_setOption:function(key,value){
18363if(key==="accept"){
18364this.accept=typeof value==="function"?value:function(d){
18365return d.is(value);
18366};
18367}else if(key==="scope"){
18368var drop=$.ui.ddmanager.droppables[this.options.scope];
18369this._splice(drop);
18370this._addToManager(value);
18371}
18372this._super(key,value);
18373},
18374_activate:function(event){
18375var draggable=$.ui.ddmanager.current;
18376this._addActiveClass();
18377if(draggable){
18378this._trigger("activate",event,this.ui(draggable));
18379}
18380},
18381_deactivate:function(event){
18382var draggable=$.ui.ddmanager.current;
18383this._removeActiveClass();
18384if(draggable){
18385this._trigger("deactivate",event,this.ui(draggable));
18386}
18387},
18388_over:function(event){
18389var draggable=$.ui.ddmanager.current;
18390if(!draggable||(draggable.currentItem||
18391draggable.element)[0]===this.element[0]){
18392return;
18393}
18394if(this.accept.call(this.element[0],(draggable.currentItem||
18395draggable.element))){
18396this._addHoverClass();
18397this._trigger("over",event,this.ui(draggable));
18398}
18399},
18400_out:function(event){
18401var draggable=$.ui.ddmanager.current;
18402if(!draggable||(draggable.currentItem||
18403draggable.element)[0]===this.element[0]){
18404return;
18405}
18406if(this.accept.call(this.element[0],(draggable.currentItem||
18407draggable.element))){
18408this._removeHoverClass();
18409this._trigger("out",event,this.ui(draggable));
18410}
18411},
18412_drop:function(event,custom){
18413var draggable=custom||$.ui.ddmanager.current,
18414childrenIntersection=false;
18415if(!draggable||(draggable.currentItem||
18416draggable.element)[0]===this.element[0]){
18417return false;
18418}
18419this.element
18420.find(":data(ui-droppable)")
18421.not(".ui-draggable-dragging")
18422.each(function(){
18423var inst=$(this).droppable("instance");
18424if(
18425inst.options.greedy&&
18426!inst.options.disabled&&
18427inst.options.scope===draggable.options.scope&&
18428inst.accept.call(
18429inst.element[0],(draggable.currentItem||draggable.element)
18430)&&
18431$.ui.intersect(
18432draggable,
18433$.extend(inst,{offset:inst.element.offset()}),
18434inst.options.tolerance,event
18435)
18436){
18437childrenIntersection=true;
18438return false;
18439}
18440});
18441if(childrenIntersection){
18442return false;
18443}
18444if(this.accept.call(this.element[0],
18445(draggable.currentItem||draggable.element))){
18446this._removeActiveClass();
18447this._removeHoverClass();
18448this._trigger("drop",event,this.ui(draggable));
18449return this.element;
18450}
18451return false;
18452},
18453ui:function(c){
18454return{
18455draggable:(c.currentItem||c.element),
18456helper:c.helper,
18457position:c.position,
18458offset:c.positionAbs
18459};
18460},
18461_addHoverClass:function(){
18462this._addClass("ui-droppable-hover");
18463},
18464_removeHoverClass:function(){
18465this._removeClass("ui-droppable-hover");
18466},
18467_addActiveClass:function(){
18468this._addClass("ui-droppable-active");
18469},
18470_removeActiveClass:function(){
18471this._removeClass("ui-droppable-active");
18472}
18473});
18474$.ui.intersect=(function(){
18475function isOverAxis(x,reference,size){
18476return(x>=reference)&&(x<(reference+size));
18477}
18478return function(draggable,droppable,toleranceMode,event){
18479if(!droppable.offset){
18480return false;
18481}
18482var x1=(draggable.positionAbs||
18483draggable.position.absolute).left+draggable.margins.left,
18484y1=(draggable.positionAbs||
18485draggable.position.absolute).top+draggable.margins.top,
18486x2=x1+draggable.helperProportions.width,
18487y2=y1+draggable.helperProportions.height,
18488l=droppable.offset.left,
18489t=droppable.offset.top,
18490r=l+droppable.proportions().width,
18491b=t+droppable.proportions().height;
18492switch(toleranceMode){
18493case"fit":
18494return(l<=x1&&x2<=r&&t<=y1&&y2<=b);
18495case"intersect":
18496return(l<x1+(draggable.helperProportions.width/2)&&
18497x2-(draggable.helperProportions.width/2)<r&&
18498t<y1+(draggable.helperProportions.height/2)&&
18499y2-(draggable.helperProportions.height/2)<b);
18500case"pointer":
18501return isOverAxis(event.pageY,t,droppable.proportions().height)&&
18502isOverAxis(event.pageX,l,droppable.proportions().width);
18503case"touch":
18504return(
18505(y1>=t&&y1<=b)||
18506(y2>=t&&y2<=b)||
18507(y1<t&&y2>b)
18508)&&(
18509(x1>=l&&x1<=r)||
18510(x2>=l&&x2<=r)||
18511(x1<l&&x2>r)
18512);
18513default:
18514return false;
18515}
18516};
18517})();
18518$.ui.ddmanager={
18519current:null,
18520droppables:{"default":[]},
18521prepareOffsets:function(t,event){
18522var i,j,
18523m=$.ui.ddmanager.droppables[t.options.scope]||[],
18524type=event?event.type:null,
18525list=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();
18526droppablesLoop:for(i=0;i<m.length;i++){
18527if(m[i].options.disabled||(t&&!m[i].accept.call(m[i].element[0],
18528(t.currentItem||t.element)))){
18529continue;
18530}
18531for(j=0;j<list.length;j++){
18532if(list[j]===m[i].element[0]){
18533m[i].proportions().height=0;
18534continue droppablesLoop;
18535}
18536}
18537m[i].visible=m[i].element.css("display")!=="none";
18538if(!m[i].visible){
18539continue;
18540}
18541if(type==="mousedown"){
18542m[i]._activate.call(m[i],event);
18543}
18544m[i].offset=m[i].element.offset();
18545m[i].proportions({
18546width:m[i].element[0].offsetWidth,
18547height:m[i].element[0].offsetHeight
18548});
18549}
18550},
18551drop:function(draggable,event){
18552var dropped=false;
18553$.each(($.ui.ddmanager.droppables[draggable.options.scope]||[]).slice(),function(){
18554if(!this.options){
18555return;
18556}
18557if(!this.options.disabled&&this.visible&&
18558$.ui.intersect(draggable,this,this.options.tolerance,event)){
18559dropped=this._drop.call(this,event)||dropped;
18560}
18561if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],
18562(draggable.currentItem||draggable.element))){
18563this.isout=true;
18564this.isover=false;
18565this._deactivate.call(this,event);
18566}
18567});
18568return dropped;
18569},
18570dragStart:function(draggable,event){
18571draggable.element.parentsUntil("body").on("scroll.droppable",function(){
18572if(!draggable.options.refreshPositions){
18573$.ui.ddmanager.prepareOffsets(draggable,event);
18574}
18575});
18576},
18577drag:function(draggable,event){
18578if(draggable.options.refreshPositions){
18579$.ui.ddmanager.prepareOffsets(draggable,event);
18580}
18581$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){
18582if(this.options.disabled||this.greedyChild||!this.visible){
18583return;
18584}
18585var parentInstance,scope,parent,
18586intersects=$.ui.intersect(draggable,this,this.options.tolerance,event),
18587c=!intersects&&this.isover?
18588"isout":
18589(intersects&&!this.isover?"isover":null);
18590if(!c){
18591return;
18592}
18593if(this.options.greedy){
18594scope=this.options.scope;
18595parent=this.element.parents(":data(ui-droppable)").filter(function(){
18596return $(this).droppable("instance").options.scope===scope;
18597});
18598if(parent.length){
18599parentInstance=$(parent[0]).droppable("instance");
18600parentInstance.greedyChild=(c==="isover");
18601}
18602}
18603if(parentInstance&&c==="isover"){
18604parentInstance.isover=false;
18605parentInstance.isout=true;
18606parentInstance._out.call(parentInstance,event);
18607}
18608this[c]=true;
18609this[c==="isout"?"isover":"isout"]=false;
18610this[c==="isover"?"_over":"_out"].call(this,event);
18611if(parentInstance&&c==="isout"){
18612parentInstance.isout=false;
18613parentInstance.isover=true;
18614parentInstance._over.call(parentInstance,event);
18615}
18616});
18617},
18618dragStop:function(draggable,event){
18619draggable.element.parentsUntil("body").off("scroll.droppable");
18620if(!draggable.options.refreshPositions){
18621$.ui.ddmanager.prepareOffsets(draggable,event);
18622}
18623}
18624};
18625if($.uiBackCompat===true){
18626$.widget("ui.droppable",$.ui.droppable,{
18627options:{
18628hoverClass:false,
18629activeClass:false
18630},
18631_addActiveClass:function(){
18632this._super();
18633if(this.options.activeClass){
18634this.element.addClass(this.options.activeClass);
18635}
18636},
18637_removeActiveClass:function(){
18638this._super();
18639if(this.options.activeClass){
18640this.element.removeClass(this.options.activeClass);
18641}
18642},
18643_addHoverClass:function(){
18644this._super();
18645if(this.options.hoverClass){
18646this.element.addClass(this.options.hoverClass);
18647}
18648},
18649_removeHoverClass:function(){
18650this._super();
18651if(this.options.hoverClass){
18652this.element.removeClass(this.options.hoverClass);
18653}
18654}
18655});
18656}
18657var widgetsDroppable=$.ui.droppable;
18658var widgetsProgressbar=$.widget("ui.progressbar",{
18659version:"1.14.1",
18660options:{
18661classes:{
18662"ui-progressbar":"ui-corner-all",
18663"ui-progressbar-value":"ui-corner-left",
18664"ui-progressbar-complete":"ui-corner-right"
18665},
18666max:100,
18667value:0,
18668change:null,
18669complete:null
18670},
18671min:0,
18672_create:function(){
18673this.oldValue=this.options.value=this._constrainedValue();
18674this.element.attr({
18675role:"progressbar",
18676"aria-valuemin":this.min
18677});
18678this._addClass("ui-progressbar","ui-widget ui-widget-content");
18679this.valueDiv=$("<div>").appendTo(this.element);
18680this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header");
18681this._refreshValue();
18682},
18683_destroy:function(){
18684this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow");
18685this.valueDiv.remove();
18686},
18687value:function(newValue){
18688if(newValue===undefined){
18689return this.options.value;
18690}
18691this.options.value=this._constrainedValue(newValue);
18692this._refreshValue();
18693},
18694_constrainedValue:function(newValue){
18695if(newValue===undefined){
18696newValue=this.options.value;
18697}
18698this.indeterminate=newValue===false;
18699if(typeof newValue!=="number"){
18700newValue=0;
18701}
18702return this.indeterminate?false:
18703Math.min(this.options.max,Math.max(this.min,newValue));
18704},
18705_setOptions:function(options){
18706var value=options.value;
18707delete options.value;
18708this._super(options);
18709this.options.value=this._constrainedValue(value);
18710this._refreshValue();
18711},
18712_setOption:function(key,value){
18713if(key==="max"){
18714value=Math.max(this.min,value);
18715}
18716this._super(key,value);
18717},
18718_setOptionDisabled:function(value){
18719this._super(value);
18720this.element.attr("aria-disabled",value);
18721this._toggleClass(null,"ui-state-disabled",!!value);
18722},
18723_percentage:function(){
18724return this.indeterminate?
18725100:
18726100*(this.options.value-this.min)/(this.options.max-this.min);
18727},
18728_refreshValue:function(){
18729var value=this.options.value,
18730percentage=this._percentage();
18731this.valueDiv
18732.toggle(this.indeterminate||value>this.min)
18733.width(percentage.toFixed(0)+"%");
18734this
18735._toggleClass(this.valueDiv,"ui-progressbar-complete",null,
18736value===this.options.max)
18737._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate);
18738if(this.indeterminate){
18739this.element.removeAttr("aria-valuenow");
18740if(!this.overlayDiv){
18741this.overlayDiv=$("<div>").appendTo(this.valueDiv);
18742this._addClass(this.overlayDiv,"ui-progressbar-overlay");
18743}
18744}else{
18745this.element.attr({
18746"aria-valuemax":this.options.max,
18747"aria-valuenow":value
18748});
18749if(this.overlayDiv){
18750this.overlayDiv.remove();
18751this.overlayDiv=null;
18752}
18753}
18754if(this.oldValue!==value){
18755this.oldValue=value;
18756this._trigger("change");
18757}
18758if(value===this.options.max){
18759this._trigger("complete");
18760}
18761}
18762});
18763var widgetsSelectable=$.widget("ui.selectable",$.ui.mouse,{
18764version:"1.14.1",
18765options:{
18766appendTo:"body",
18767autoRefresh:true,
18768distance:0,
18769filter:"*",
18770tolerance:"touch",
18771selected:null,
18772selecting:null,
18773start:null,
18774stop:null,
18775unselected:null,
18776unselecting:null
18777},
18778_create:function(){
18779var that=this;
18780this._addClass("ui-selectable");
18781this.dragged=false;
18782this.refresh=function(){
18783that.elementPos=$(that.element[0]).offset();
18784that.selectees=$(that.options.filter,that.element[0]);
18785that._addClass(that.selectees,"ui-selectee");
18786that.selectees.each(function(){
18787var $this=$(this),
18788selecteeOffset=$this.offset(),
18789pos={
18790left:selecteeOffset.left-that.elementPos.left,
18791top:selecteeOffset.top-that.elementPos.top
18792};
18793$.data(this,"selectable-item",{
18794element:this,
18795$element:$this,
18796left:pos.left,
18797top:pos.top,
18798right:pos.left+$this.outerWidth(),
18799bottom:pos.top+$this.outerHeight(),
18800startselected:false,
18801selected:$this.hasClass("ui-selected"),
18802selecting:$this.hasClass("ui-selecting"),
18803unselecting:$this.hasClass("ui-unselecting")
18804});
18805});
18806};
18807this.refresh();
18808this._mouseInit();
18809this.helper=$("<div>");
18810this._addClass(this.helper,"ui-selectable-helper");
18811},
18812_destroy:function(){
18813this.selectees.removeData("selectable-item");
18814this._mouseDestroy();
18815},
18816_mouseStart:function(event){
18817var that=this,
18818options=this.options;
18819this.opos=[event.pageX,event.pageY];
18820this.elementPos=$(this.element[0]).offset();
18821if(this.options.disabled){
18822return;
18823}
18824this.selectees=$(options.filter,this.element[0]);
18825this._trigger("start",event);
18826$(options.appendTo).append(this.helper);
18827this.helper.css({
18828"left":event.pageX,
18829"top":event.pageY,
18830"width":0,
18831"height":0
18832});
18833if(options.autoRefresh){
18834this.refresh();
18835}
18836this.selectees.filter(".ui-selected").each(function(){
18837var selectee=$.data(this,"selectable-item");
18838selectee.startselected=true;
18839if(!event.metaKey&&!event.ctrlKey){
18840that._removeClass(selectee.$element,"ui-selected");
18841selectee.selected=false;
18842that._addClass(selectee.$element,"ui-unselecting");
18843selectee.unselecting=true;
18844that._trigger("unselecting",event,{
18845unselecting:selectee.element
18846});
18847}
18848});
18849$(event.target).parents().addBack().each(function(){
18850var doSelect,
18851selectee=$.data(this,"selectable-item");
18852if(selectee){
18853doSelect=(!event.metaKey&&!event.ctrlKey)||
18854!selectee.$element.hasClass("ui-selected");
18855that._removeClass(selectee.$element,doSelect?"ui-unselecting":"ui-selected")
18856._addClass(selectee.$element,doSelect?"ui-selecting":"ui-unselecting");
18857selectee.unselecting=!doSelect;
18858selectee.selecting=doSelect;
18859selectee.selected=doSelect;
18860if(doSelect){
18861that._trigger("selecting",event,{
18862selecting:selectee.element
18863});
18864}else{
18865that._trigger("unselecting",event,{
18866unselecting:selectee.element
18867});
18868}
18869return false;
18870}
18871});
18872},
18873_mouseDrag:function(event){
18874this.dragged=true;
18875if(this.options.disabled){
18876return;
18877}
18878var tmp,
18879that=this,
18880options=this.options,
18881x1=this.opos[0],
18882y1=this.opos[1],
18883x2=event.pageX,
18884y2=event.pageY;
18885if(x1>x2){
18886tmp=x2;x2=x1;x1=tmp;
18887}
18888if(y1>y2){
18889tmp=y2;y2=y1;y1=tmp;
18890}
18891this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});
18892this.selectees.each(function(){
18893var selectee=$.data(this,"selectable-item"),
18894hit=false,
18895offset={};
18896if(!selectee||selectee.element===that.element[0]){
18897return;
18898}
18899offset.left=selectee.left+that.elementPos.left;
18900offset.right=selectee.right+that.elementPos.left;
18901offset.top=selectee.top+that.elementPos.top;
18902offset.bottom=selectee.bottom+that.elementPos.top;
18903if(options.tolerance==="touch"){
18904hit=(!(offset.left>x2||offset.right<x1||offset.top>y2||
18905offset.bottom<y1));
18906}else if(options.tolerance==="fit"){
18907hit=(offset.left>x1&&offset.right<x2&&offset.top>y1&&
18908offset.bottom<y2);
18909}
18910if(hit){
18911if(selectee.selected){
18912that._removeClass(selectee.$element,"ui-selected");
18913selectee.selected=false;
18914}
18915if(selectee.unselecting){
18916that._removeClass(selectee.$element,"ui-unselecting");
18917selectee.unselecting=false;
18918}
18919if(!selectee.selecting){
18920that._addClass(selectee.$element,"ui-selecting");
18921selectee.selecting=true;
18922that._trigger("selecting",event,{
18923selecting:selectee.element
18924});
18925}
18926}else{
18927if(selectee.selecting){
18928if((event.metaKey||event.ctrlKey)&&selectee.startselected){
18929that._removeClass(selectee.$element,"ui-selecting");
18930selectee.selecting=false;
18931that._addClass(selectee.$element,"ui-selected");
18932selectee.selected=true;
18933}else{
18934that._removeClass(selectee.$element,"ui-selecting");
18935selectee.selecting=false;
18936if(selectee.startselected){
18937that._addClass(selectee.$element,"ui-unselecting");
18938selectee.unselecting=true;
18939}
18940that._trigger("unselecting",event,{
18941unselecting:selectee.element
18942});
18943}
18944}
18945if(selectee.selected){
18946if(!event.metaKey&&!event.ctrlKey&&!selectee.startselected){
18947that._removeClass(selectee.$element,"ui-selected");
18948selectee.selected=false;
18949that._addClass(selectee.$element,"ui-unselecting");
18950selectee.unselecting=true;
18951that._trigger("unselecting",event,{
18952unselecting:selectee.element
18953});
18954}
18955}
18956}
18957});
18958return false;
18959},
18960_mouseStop:function(event){
18961var that=this;
18962this.dragged=false;
18963$(".ui-unselecting",this.element[0]).each(function(){
18964var selectee=$.data(this,"selectable-item");
18965that._removeClass(selectee.$element,"ui-unselecting");
18966selectee.unselecting=false;
18967selectee.startselected=false;
18968that._trigger("unselected",event,{
18969unselected:selectee.element
18970});
18971});
18972$(".ui-selecting",this.element[0]).each(function(){
18973var selectee=$.data(this,"selectable-item");
18974that._removeClass(selectee.$element,"ui-selecting")
18975._addClass(selectee.$element,"ui-selected");
18976selectee.selecting=false;
18977selectee.selected=true;
18978selectee.startselected=true;
18979that._trigger("selected",event,{
18980selected:selectee.element
18981});
18982});
18983this._trigger("stop",event);
18984this.helper.remove();
18985return false;
18986}
18987});
18988var widgetsSelectmenu=$.widget("ui.selectmenu",[$.ui.formResetMixin,{
18989version:"1.14.1",
18990defaultElement:"<select>",
18991options:{
18992appendTo:null,
18993classes:{
18994"ui-selectmenu-button-open":"ui-corner-top",
18995"ui-selectmenu-button-closed":"ui-corner-all"
18996},
18997disabled:null,
18998icons:{
18999button:"ui-icon-triangle-1-s"
19000},
19001position:{
19002my:"left top",
19003at:"left bottom",
19004collision:"none"
19005},
19006width:false,
19007change:null,
19008close:null,
19009focus:null,
19010open:null,
19011select:null
19012},
19013_create:function(){
19014var selectmenuId=this.element.uniqueId().attr("id");
19015this.ids={
19016element:selectmenuId,
19017button:selectmenuId+"-button",
19018menu:selectmenuId+"-menu"
19019};
19020this._drawButton();
19021this._drawMenu();
19022this._bindFormResetHandler();
19023this._rendered=false;
19024this.menuItems=$();
19025},
19026_drawButton:function(){
19027var icon,
19028that=this,
19029item=this._parseOption(
19030this.element.find("option:selected"),
19031this.element[0].selectedIndex
19032);
19033this.labels=this.element.labels().attr("for",this.ids.button);
19034this._on(this.labels,{
19035click:function(event){
19036this.button.trigger("focus");
19037event.preventDefault();
19038}
19039});
19040this.element.hide();
19041this.button=$("<span>",{
19042tabindex:this.options.disabled?-1:0,
19043id:this.ids.button,
19044role:"combobox",
19045"aria-expanded":"false",
19046"aria-autocomplete":"list",
19047"aria-owns":this.ids.menu,
19048"aria-haspopup":"true",
19049title:this.element.attr("title")
19050})
19051.insertAfter(this.element);
19052this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed",
19053"ui-button ui-widget");
19054icon=$("<span>").appendTo(this.button);
19055this._addClass(icon,"ui-selectmenu-icon","ui-icon "+this.options.icons.button);
19056this.buttonItem=this._renderButtonItem(item)
19057.appendTo(this.button);
19058if(this.options.width!==false){
19059this._resizeButton();
19060}
19061this._on(this.button,this._buttonEvents);
19062this.button.one("focusin",function(){
19063if(!that._rendered){
19064that._refreshMenu();
19065}
19066});
19067},
19068_drawMenu:function(){
19069var that=this;
19070this.menu=$("<ul>",{
19071"aria-hidden":"true",
19072"aria-labelledby":this.ids.button,
19073id:this.ids.menu
19074});
19075this.menuWrap=$("<div>").append(this.menu);
19076this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front");
19077this.menuWrap.appendTo(this._appendTo());
19078this.menuInstance=this.menu
19079.menu({
19080classes:{
19081"ui-menu":"ui-corner-bottom"
19082},
19083role:"listbox",
19084select:function(event,ui){
19085event.preventDefault();
19086that._select(ui.item.data("ui-selectmenu-item"),event);
19087},
19088focus:function(event,ui){
19089var item=ui.item.data("ui-selectmenu-item");
19090if(that.focusIndex!=null&&item.index!==that.focusIndex){
19091that._trigger("focus",event,{item:item});
19092if(!that.isOpen){
19093that._select(item,event);
19094}
19095}
19096that.focusIndex=item.index;
19097that.button.attr("aria-activedescendant",
19098that.menuItems.eq(item.index).attr("id"));
19099}
19100})
19101.menu("instance");
19102this.menuInstance._off(this.menu,"mouseleave");
19103this.menuInstance._closeOnDocumentClick=function(){
19104return false;
19105};
19106this.menuInstance._isDivider=function(){
19107return false;
19108};
19109},
19110refresh:function(){
19111this._refreshMenu();
19112this.buttonItem.replaceWith(
19113this.buttonItem=this._renderButtonItem(
19114this._getSelectedItem().data("ui-selectmenu-item")||{}
19115)
19116);
19117if(this.options.width===null){
19118this._resizeButton();
19119}
19120},
19121_refreshMenu:function(){
19122var item,
19123options=this.element.find("option");
19124this.menu.empty();
19125this._parseOptions(options);
19126this._renderMenu(this.menu,this.items);
19127this.menuInstance.refresh();
19128this.menuItems=this.menu.find("li")
19129.not(".ui-selectmenu-optgroup")
19130.find(".ui-menu-item-wrapper");
19131this._rendered=true;
19132if(!options.length){
19133return;
19134}
19135item=this._getSelectedItem();
19136this.menuInstance.focus(null,item);
19137this._setAria(item.data("ui-selectmenu-item"));
19138this._setOption("disabled",this.element.prop("disabled"));
19139},
19140open:function(event){
19141if(this.options.disabled){
19142return;
19143}
19144if(!this._rendered){
19145this._refreshMenu();
19146}else{
19147this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active");
19148this.menuInstance.focus(null,this._getSelectedItem());
19149}
19150if(!this.menuItems.length){
19151return;
19152}
19153this.isOpen=true;
19154this._toggleAttr();
19155this._resizeMenu();
19156this._position();
19157this._on(this.document,this._documentClick);
19158this._trigger("open",event);
19159},
19160_position:function(){
19161this.menuWrap.position($.extend({of:this.button},this.options.position));
19162},
19163close:function(event){
19164if(!this.isOpen){
19165return;
19166}
19167this.isOpen=false;
19168this._toggleAttr();
19169this.range=null;
19170this._off(this.document);
19171this._trigger("close",event);
19172},
19173widget:function(){
19174return this.button;
19175},
19176menuWidget:function(){
19177return this.menu;
19178},
19179_renderButtonItem:function(item){
19180var buttonItem=$("<span>");
19181this._setText(buttonItem,item.label);
19182this._addClass(buttonItem,"ui-selectmenu-text");
19183return buttonItem;
19184},
19185_renderMenu:function(ul,items){
19186var that=this,
19187currentOptgroup="";
19188$.each(items,function(index,item){
19189var li;
19190if(item.optgroup!==currentOptgroup){
19191li=$("<li>",{
19192text:item.optgroup
19193});
19194that._addClass(li,"ui-selectmenu-optgroup","ui-menu-divider"+
19195(item.element.parent("optgroup").prop("disabled")?
19196" ui-state-disabled":
19197""));
19198li.appendTo(ul);
19199currentOptgroup=item.optgroup;
19200}
19201that._renderItemData(ul,item);
19202});
19203},
19204_renderItemData:function(ul,item){
19205return this._renderItem(ul,item).data("ui-selectmenu-item",item);
19206},
19207_renderItem:function(ul,item){
19208var li=$("<li>"),
19209wrapper=$("<div>",{
19210title:item.element.attr("title")
19211});
19212if(item.disabled){
19213this._addClass(li,null,"ui-state-disabled");
19214}
19215if(item.hidden){
19216li.prop("hidden",true);
19217}else{
19218this._setText(wrapper,item.label);
19219}
19220return li.append(wrapper).appendTo(ul);
19221},
19222_setText:function(element,value){
19223if(value){
19224element.text(value);
19225}else{
19226element.html("&#160;");
19227}
19228},
19229_move:function(direction,event){
19230var item,next,
19231filter=".ui-menu-item";
19232if(this.isOpen){
19233item=this.menuItems.eq(this.focusIndex).parent("li");
19234}else{
19235item=this.menuItems.eq(this.element[0].selectedIndex).parent("li");
19236filter+=":not(.ui-state-disabled)";
19237}
19238if(direction==="first"||direction==="last"){
19239next=item[direction==="first"?"prevAll":"nextAll"](filter).eq(-1);
19240}else{
19241next=item[direction+"All"](filter).eq(0);
19242}
19243if(next.length){
19244this.menuInstance.focus(event,next);
19245}
19246},
19247_getSelectedItem:function(){
19248return this.menuItems.eq(this.element[0].selectedIndex).parent("li");
19249},
19250_toggle:function(event){
19251this[this.isOpen?"close":"open"](event);
19252},
19253_setSelection:function(){
19254var selection;
19255if(!this.range){
19256return;
19257}
19258selection=window.getSelection();
19259selection.removeAllRanges();
19260selection.addRange(this.range);
19261},
19262_documentClick:{
19263mousedown:function(event){
19264if(!this.isOpen){
19265return;
19266}
19267if(!$(event.target).closest(".ui-selectmenu-menu, #"+
19268CSS.escape(this.ids.button)).length){
19269this.close(event);
19270}
19271}
19272},
19273_buttonEvents:{
19274mousedown:function(){
19275var selection=window.getSelection();
19276if(selection.rangeCount){
19277this.range=selection.getRangeAt(0);
19278}
19279},
19280click:function(event){
19281this._setSelection();
19282this._toggle(event);
19283},
19284keydown:function(event){
19285var preventDefault=true;
19286switch(event.keyCode){
19287case $.ui.keyCode.TAB:
19288case $.ui.keyCode.ESCAPE:
19289this.close(event);
19290preventDefault=false;
19291break;
19292case $.ui.keyCode.ENTER:
19293if(this.isOpen){
19294this._selectFocusedItem(event);
19295}
19296break;
19297case $.ui.keyCode.UP:
19298if(event.altKey){
19299this._toggle(event);
19300}else{
19301this._move("prev",event);
19302}
19303break;
19304case $.ui.keyCode.DOWN:
19305if(event.altKey){
19306this._toggle(event);
19307}else{
19308this._move("next",event);
19309}
19310break;
19311case $.ui.keyCode.SPACE:
19312if(this.isOpen){
19313this._selectFocusedItem(event);
19314}else{
19315this._toggle(event);
19316}
19317break;
19318case $.ui.keyCode.LEFT:
19319this._move("prev",event);
19320break;
19321case $.ui.keyCode.RIGHT:
19322this._move("next",event);
19323break;
19324case $.ui.keyCode.HOME:
19325case $.ui.keyCode.PAGE_UP:
19326this._move("first",event);
19327break;
19328case $.ui.keyCode.END:
19329case $.ui.keyCode.PAGE_DOWN:
19330this._move("last",event);
19331break;
19332default:
19333this.menu.trigger(event);
19334preventDefault=false;
19335}
19336if(preventDefault){
19337event.preventDefault();
19338}
19339}
19340},
19341_selectFocusedItem:function(event){
19342var item=this.menuItems.eq(this.focusIndex).parent("li");
19343if(!item.hasClass("ui-state-disabled")){
19344this._select(item.data("ui-selectmenu-item"),event);
19345}
19346},
19347_select:function(item,event){
19348var oldIndex=this.element[0].selectedIndex;
19349this.element[0].selectedIndex=item.index;
19350this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(item));
19351this._setAria(item);
19352this._trigger("select",event,{item:item});
19353if(item.index!==oldIndex){
19354this._trigger("change",event,{item:item});
19355}
19356this.close(event);
19357},
19358_setAria:function(item){
19359var id=this.menuItems.eq(item.index).attr("id");
19360this.button.attr({
19361"aria-labelledby":id,
19362"aria-activedescendant":id
19363});
19364this.menu.attr("aria-activedescendant",id);
19365},
19366_setOption:function(key,value){
19367if(key==="icons"){
19368var icon=this.button.find("span.ui-icon");
19369this._removeClass(icon,null,this.options.icons.button)
19370._addClass(icon,null,value.button);
19371}
19372this._super(key,value);
19373if(key==="appendTo"){
19374this.menuWrap.appendTo(this._appendTo());
19375}
19376if(key==="width"){
19377this._resizeButton();
19378}
19379},
19380_setOptionDisabled:function(value){
19381this._super(value);
19382this.menuInstance.option("disabled",value);
19383this.button.attr("aria-disabled",value);
19384this._toggleClass(this.button,null,"ui-state-disabled",value);
19385this.element.prop("disabled",value);
19386if(value){
19387this.button.attr("tabindex",-1);
19388this.close();
19389}else{
19390this.button.attr("tabindex",0);
19391}
19392},
19393_appendTo:function(){
19394var element=this.options.appendTo;
19395if(element){
19396element=element.jquery||element.nodeType?
19397$(element):
19398this.document.find(element).eq(0);
19399}
19400if(!element||!element[0]){
19401element=this.element.closest(".ui-front, dialog");
19402}
19403if(!element.length){
19404element=this.document[0].body;
19405}
19406return element;
19407},
19408_toggleAttr:function(){
19409this.button.attr("aria-expanded",this.isOpen);
19410this._removeClass(this.button,"ui-selectmenu-button-"+
19411(this.isOpen?"closed":"open"))
19412._addClass(this.button,"ui-selectmenu-button-"+
19413(this.isOpen?"open":"closed"))
19414._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen);
19415this.menu.attr("aria-hidden",!this.isOpen);
19416},
19417_resizeButton:function(){
19418var width=this.options.width;
19419if(width===false){
19420this.button.css("width","");
19421return;
19422}
19423if(width===null){
19424width=this.element.show().outerWidth();
19425this.element.hide();
19426}
19427this.button.outerWidth(width);
19428},
19429_resizeMenu:function(){
19430this.menu.outerWidth(Math.max(
19431this.button.outerWidth(),
19432this.menu.width("").outerWidth()
19433));
19434},
19435_getCreateOptions:function(){
19436var options=this._super();
19437options.disabled=this.element.prop("disabled");
19438return options;
19439},
19440_parseOptions:function(options){
19441var that=this,
19442data=[];
19443options.each(function(index,item){
19444data.push(that._parseOption($(item),index));
19445});
19446this.items=data;
19447},
19448_parseOption:function(option,index){
19449var optgroup=option.parent("optgroup");
19450return{
19451element:option,
19452index:index,
19453value:option.val(),
19454label:option.text(),
19455hidden:optgroup.prop("hidden")||option.prop("hidden"),
19456optgroup:optgroup.attr("label")||"",
19457disabled:optgroup.prop("disabled")||option.prop("disabled")
19458};
19459},
19460_destroy:function(){
19461this._unbindFormResetHandler();
19462this.menuWrap.remove();
19463this.button.remove();
19464this.element.show();
19465this.element.removeUniqueId();
19466this.labels.attr("for",this.ids.element);
19467}
19468}]);
19469var widgetsSlider=$.widget("ui.slider",$.ui.mouse,{
19470version:"1.14.1",
19471widgetEventPrefix:"slide",
19472options:{
19473animate:false,
19474classes:{
19475"ui-slider":"ui-corner-all",
19476"ui-slider-handle":"ui-corner-all",
19477"ui-slider-range":"ui-corner-all ui-widget-header"
19478},
19479distance:0,
19480max:100,
19481min:0,
19482orientation:"horizontal",
19483range:false,
19484step:1,
19485value:0,
19486values:null,
19487change:null,
19488slide:null,
19489start:null,
19490stop:null
19491},
19492numPages:5,
19493_create:function(){
19494this._keySliding=false;
19495this._mouseSliding=false;
19496this._animateOff=true;
19497this._handleIndex=null;
19498this._detectOrientation();
19499this._mouseInit();
19500this._calculateNewMax();
19501this._addClass("ui-slider ui-slider-"+this.orientation,
19502"ui-widget ui-widget-content");
19503this._refresh();
19504this._animateOff=false;
19505},
19506_refresh:function(){
19507this._createRange();
19508this._createHandles();
19509this._setupEvents();
19510this._refreshValue();
19511},
19512_createHandles:function(){
19513var i,handleCount,
19514options=this.options,
19515existingHandles=this.element.find(".ui-slider-handle"),
19516handle="<span tabindex='0'></span>",
19517handles=[];
19518handleCount=(options.values&&options.values.length)||1;
19519if(existingHandles.length>handleCount){
19520existingHandles.slice(handleCount).remove();
19521existingHandles=existingHandles.slice(0,handleCount);
19522}
19523for(i=existingHandles.length;i<handleCount;i++){
19524handles.push(handle);
19525}
19526this.handles=existingHandles.add($(handles.join("")).appendTo(this.element));
19527this._addClass(this.handles,"ui-slider-handle","ui-state-default");
19528this.handle=this.handles.eq(0);
19529this.handles.each(function(i){
19530$(this)
19531.data("ui-slider-handle-index",i)
19532.attr("tabIndex",0);
19533});
19534},
19535_createRange:function(){
19536var options=this.options;
19537if(options.range){
19538if(options.range===true){
19539if(!options.values){
19540options.values=[this._valueMin(),this._valueMin()];
19541}else if(options.values.length&&options.values.length!==2){
19542options.values=[options.values[0],options.values[0]];
19543}else if(Array.isArray(options.values)){
19544options.values=options.values.slice(0);
19545}
19546}
19547if(!this.range||!this.range.length){
19548this.range=$("<div>")
19549.appendTo(this.element);
19550this._addClass(this.range,"ui-slider-range");
19551}else{
19552this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max");
19553this.range.css({
19554"left":"",
19555"bottom":""
19556});
19557}
19558if(options.range==="min"||options.range==="max"){
19559this._addClass(this.range,"ui-slider-range-"+options.range);
19560}
19561}else{
19562if(this.range){
19563this.range.remove();
19564}
19565this.range=null;
19566}
19567},
19568_setupEvents:function(){
19569this._off(this.handles);
19570this._on(this.handles,this._handleEvents);
19571this._hoverable(this.handles);
19572this._focusable(this.handles);
19573},
19574_destroy:function(){
19575this.handles.remove();
19576if(this.range){
19577this.range.remove();
19578}
19579this._mouseDestroy();
19580},
19581_mouseCapture:function(event){
19582var position,normValue,distance,closestHandle,index,allowed,offset,mouseOverHandle,
19583that=this,
19584o=this.options;
19585if(o.disabled){
19586return false;
19587}
19588this.elementSize={
19589width:this.element.outerWidth(),
19590height:this.element.outerHeight()
19591};
19592this.elementOffset=this.element.offset();
19593position={x:event.pageX,y:event.pageY};
19594normValue=this._normValueFromMouse(position);
19595distance=this._valueMax()-this._valueMin()+1;
19596this.handles.each(function(i){
19597var thisDistance=Math.abs(normValue-that.values(i));
19598if((distance>thisDistance)||
19599(distance===thisDistance&&
19600(i===that._lastChangedValue||that.values(i)===o.min))){
19601distance=thisDistance;
19602closestHandle=$(this);
19603index=i;
19604}
19605});
19606allowed=this._start(event,index);
19607if(allowed===false){
19608return false;
19609}
19610this._mouseSliding=true;
19611this._handleIndex=index;
19612this._addClass(closestHandle,null,"ui-state-active");
19613closestHandle.trigger("focus");
19614offset=closestHandle.offset();
19615mouseOverHandle=!$(event.target).parents().addBack().is(".ui-slider-handle");
19616this._clickOffset=mouseOverHandle?{left:0,top:0}:{
19617left:event.pageX-offset.left-(closestHandle.width()/2),
19618top:event.pageY-offset.top-
19619(closestHandle.height()/2)-
19620(parseInt(closestHandle.css("borderTopWidth"),10)||0)-
19621(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+
19622(parseInt(closestHandle.css("marginTop"),10)||0)
19623};
19624if(!this.handles.hasClass("ui-state-hover")){
19625this._slide(event,index,normValue);
19626}
19627this._animateOff=true;
19628return true;
19629},
19630_mouseStart:function(){
19631return true;
19632},
19633_mouseDrag:function(event){
19634var position={x:event.pageX,y:event.pageY},
19635normValue=this._normValueFromMouse(position);
19636this._slide(event,this._handleIndex,normValue);
19637return false;
19638},
19639_mouseStop:function(event){
19640this._removeClass(this.handles,null,"ui-state-active");
19641this._mouseSliding=false;
19642this._stop(event,this._handleIndex);
19643this._change(event,this._handleIndex);
19644this._handleIndex=null;
19645this._clickOffset=null;
19646this._animateOff=false;
19647return false;
19648},
19649_detectOrientation:function(){
19650this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal";
19651},
19652_normValueFromMouse:function(position){
19653var pixelTotal,
19654pixelMouse,
19655percentMouse,
19656valueTotal,
19657valueMouse;
19658if(this.orientation==="horizontal"){
19659pixelTotal=this.elementSize.width;
19660pixelMouse=position.x-this.elementOffset.left-
19661(this._clickOffset?this._clickOffset.left:0);
19662}else{
19663pixelTotal=this.elementSize.height;
19664pixelMouse=position.y-this.elementOffset.top-
19665(this._clickOffset?this._clickOffset.top:0);
19666}
19667percentMouse=(pixelMouse/pixelTotal);
19668if(percentMouse>1){
19669percentMouse=1;
19670}
19671if(percentMouse<0){
19672percentMouse=0;
19673}
19674if(this.orientation==="vertical"){
19675percentMouse=1-percentMouse;
19676}
19677valueTotal=this._valueMax()-this._valueMin();
19678valueMouse=this._valueMin()+percentMouse*valueTotal;
19679return this._trimAlignValue(valueMouse);
19680},
19681_uiHash:function(index,value,values){
19682var uiHash={
19683handle:this.handles[index],
19684handleIndex:index,
19685value:value!==undefined?value:this.value()
19686};
19687if(this._hasMultipleValues()){
19688uiHash.value=value!==undefined?value:this.values(index);
19689uiHash.values=values||this.values();
19690}
19691return uiHash;
19692},
19693_hasMultipleValues:function(){
19694return this.options.values&&this.options.values.length;
19695},
19696_start:function(event,index){
19697return this._trigger("start",event,this._uiHash(index));
19698},
19699_slide:function(event,index,newVal){
19700var allowed,otherVal,
19701currentValue=this.value(),
19702newValues=this.values();
19703if(this._hasMultipleValues()){
19704otherVal=this.values(index?0:1);
19705currentValue=this.values(index);
19706if(this.options.values.length===2&&this.options.range===true){
19707newVal=index===0?Math.min(otherVal,newVal):Math.max(otherVal,newVal);
19708}
19709newValues[index]=newVal;
19710}
19711if(newVal===currentValue){
19712return;
19713}
19714allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues));
19715if(allowed===false){
19716return;
19717}
19718if(this._hasMultipleValues()){
19719this.values(index,newVal);
19720}else{
19721this.value(newVal);
19722}
19723},
19724_stop:function(event,index){
19725this._trigger("stop",event,this._uiHash(index));
19726},
19727_change:function(event,index){
19728if(!this._keySliding&&!this._mouseSliding){
19729this._lastChangedValue=index;
19730this._trigger("change",event,this._uiHash(index));
19731}
19732},
19733value:function(newValue){
19734if(arguments.length){
19735this.options.value=this._trimAlignValue(newValue);
19736this._refreshValue();
19737this._change(null,0);
19738return;
19739}
19740return this._value();
19741},
19742values:function(index,newValue){
19743var vals,
19744newValues,
19745i;
19746if(arguments.length>1){
19747this.options.values[index]=this._trimAlignValue(newValue);
19748this._refreshValue();
19749this._change(null,index);
19750return;
19751}
19752if(arguments.length){
19753if(Array.isArray(arguments[0])){
19754vals=this.options.values;
19755newValues=arguments[0];
19756for(i=0;i<vals.length;i+=1){
19757vals[i]=this._trimAlignValue(newValues[i]);
19758this._change(null,i);
19759}
19760this._refreshValue();
19761}else{
19762if(this._hasMultipleValues()){
19763return this._values(index);
19764}else{
19765return this.value();
19766}
19767}
19768}else{
19769return this._values();
19770}
19771},
19772_setOption:function(key,value){
19773var i,
19774valsLength=0;
19775if(key==="range"&&this.options.range===true){
19776if(value==="min"){
19777this.options.value=this._values(0);
19778this.options.values=null;
19779}else if(value==="max"){
19780this.options.value=this._values(this.options.values.length-1);
19781this.options.values=null;
19782}
19783}
19784if(Array.isArray(this.options.values)){
19785valsLength=this.options.values.length;
19786}
19787this._super(key,value);
19788switch(key){
19789case"orientation":
19790this._detectOrientation();
19791this._removeClass("ui-slider-horizontal ui-slider-vertical")
19792._addClass("ui-slider-"+this.orientation);
19793this._refreshValue();
19794if(this.options.range){
19795this._refreshRange(value);
19796}
19797this.handles.css(value==="horizontal"?"bottom":"left","");
19798break;
19799case"value":
19800this._animateOff=true;
19801this._refreshValue();
19802this._change(null,0);
19803this._animateOff=false;
19804break;
19805case"values":
19806this._animateOff=true;
19807this._refreshValue();
19808for(i=valsLength-1;i>=0;i--){
19809this._change(null,i);
19810}
19811this._animateOff=false;
19812break;
19813case"step":
19814case"min":
19815case"max":
19816this._animateOff=true;
19817this._calculateNewMax();
19818this._refreshValue();
19819this._animateOff=false;
19820break;
19821case"range":
19822this._animateOff=true;
19823this._refresh();
19824this._animateOff=false;
19825break;
19826}
19827},
19828_setOptionDisabled:function(value){
19829this._super(value);
19830this._toggleClass(null,"ui-state-disabled",!!value);
19831},
19832_value:function(){
19833var val=this.options.value;
19834val=this._trimAlignValue(val);
19835return val;
19836},
19837_values:function(index){
19838var val,
19839vals,
19840i;
19841if(arguments.length){
19842val=this.options.values[index];
19843val=this._trimAlignValue(val);
19844return val;
19845}else if(this._hasMultipleValues()){
19846vals=this.options.values.slice();
19847for(i=0;i<vals.length;i+=1){
19848vals[i]=this._trimAlignValue(vals[i]);
19849}
19850return vals;
19851}else{
19852return[];
19853}
19854},
19855_trimAlignValue:function(val){
19856if(val<=this._valueMin()){
19857return this._valueMin();
19858}
19859if(val>=this._valueMax()){
19860return this._valueMax();
19861}
19862var step=(this.options.step>0)?this.options.step:1,
19863valModStep=(val-this._valueMin())%step,
19864alignValue=val-valModStep;
19865if(Math.abs(valModStep)*2>=step){
19866alignValue+=(valModStep>0)?step:(-step);
19867}
19868return parseFloat(alignValue.toFixed(5));
19869},
19870_calculateNewMax:function(){
19871var max=this.options.max,
19872min=this._valueMin(),
19873step=this.options.step,
19874aboveMin=Math.round((max-min)/step)*step;
19875max=aboveMin+min;
19876if(max>this.options.max){
19877max-=step;
19878}
19879this.max=parseFloat(max.toFixed(this._precision()));
19880},
19881_precision:function(){
19882var precision=this._precisionOf(this.options.step);
19883if(this.options.min!==null){
19884precision=Math.max(precision,this._precisionOf(this.options.min));
19885}
19886return precision;
19887},
19888_precisionOf:function(num){
19889var str=num.toString(),
19890decimal=str.indexOf(".");
19891return decimal===-1?0:str.length-decimal-1;
19892},
19893_valueMin:function(){
19894return this.options.min;
19895},
19896_valueMax:function(){
19897return this.max;
19898},
19899_refreshRange:function(orientation){
19900if(orientation==="vertical"){
19901this.range.css({"width":"","left":""});
19902}
19903if(orientation==="horizontal"){
19904this.range.css({"height":"","bottom":""});
19905}
19906},
19907_refreshValue:function(){
19908var lastValPercent,valPercent,value,valueMin,valueMax,
19909oRange=this.options.range,
19910o=this.options,
19911that=this,
19912animate=(!this._animateOff)?o.animate:false,
19913_set={};
19914if(this._hasMultipleValues()){
19915this.handles.each(function(i){
19916valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-
19917that._valueMin())*100;
19918_set[that.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";
19919$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);
19920if(that.options.range===true){
19921if(that.orientation==="horizontal"){
19922if(i===0){
19923that.range.stop(1,1)[animate?"animate":"css"]({
19924left:valPercent+"%"
19925},o.animate);
19926}
19927if(i===1){
19928that.range[animate?"animate":"css"]({
19929width:(valPercent-lastValPercent)+"%"
19930},{
19931queue:false,
19932duration:o.animate
19933});
19934}
19935}else{
19936if(i===0){
19937that.range.stop(1,1)[animate?"animate":"css"]({
19938bottom:(valPercent)+"%"
19939},o.animate);
19940}
19941if(i===1){
19942that.range[animate?"animate":"css"]({
19943height:(valPercent-lastValPercent)+"%"
19944},{
19945queue:false,
19946duration:o.animate
19947});
19948}
19949}
19950}
19951lastValPercent=valPercent;
19952});
19953}else{
19954value=this.value();
19955valueMin=this._valueMin();
19956valueMax=this._valueMax();
19957valPercent=(valueMax!==valueMin)?
19958(value-valueMin)/(valueMax-valueMin)*100:
199590;
19960_set[this.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";
19961this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);
19962if(oRange==="min"&&this.orientation==="horizontal"){
19963this.range.stop(1,1)[animate?"animate":"css"]({
19964width:valPercent+"%"
19965},o.animate);
19966}
19967if(oRange==="max"&&this.orientation==="horizontal"){
19968this.range.stop(1,1)[animate?"animate":"css"]({
19969width:(100-valPercent)+"%"
19970},o.animate);
19971}
19972if(oRange==="min"&&this.orientation==="vertical"){
19973this.range.stop(1,1)[animate?"animate":"css"]({
19974height:valPercent+"%"
19975},o.animate);
19976}
19977if(oRange==="max"&&this.orientation==="vertical"){
19978this.range.stop(1,1)[animate?"animate":"css"]({
19979height:(100-valPercent)+"%"
19980},o.animate);
19981}
19982}
19983},
19984_handleEvents:{
19985keydown:function(event){
19986var allowed,curVal,newVal,step,
19987index=$(event.target).data("ui-slider-handle-index");
19988switch(event.keyCode){
19989case $.ui.keyCode.HOME:
19990case $.ui.keyCode.END:
19991case $.ui.keyCode.PAGE_UP:
19992case $.ui.keyCode.PAGE_DOWN:
19993case $.ui.keyCode.UP:
19994case $.ui.keyCode.RIGHT:
19995case $.ui.keyCode.DOWN:
19996case $.ui.keyCode.LEFT:
19997event.preventDefault();
19998if(!this._keySliding){
19999this._keySliding=true;
20000this._addClass($(event.target),null,"ui-state-active");
20001allowed=this._start(event,index);
20002if(allowed===false){
20003return;
20004}
20005}
20006break;
20007}
20008step=this.options.step;
20009if(this._hasMultipleValues()){
20010curVal=newVal=this.values(index);
20011}else{
20012curVal=newVal=this.value();
20013}
20014switch(event.keyCode){
20015case $.ui.keyCode.HOME:
20016newVal=this._valueMin();
20017break;
20018case $.ui.keyCode.END:
20019newVal=this._valueMax();
20020break;
20021case $.ui.keyCode.PAGE_UP:
20022newVal=this._trimAlignValue(
20023curVal+((this._valueMax()-this._valueMin())/this.numPages)
20024);
20025break;
20026case $.ui.keyCode.PAGE_DOWN:
20027newVal=this._trimAlignValue(
20028curVal-((this._valueMax()-this._valueMin())/this.numPages));
20029break;
20030case $.ui.keyCode.UP:
20031case $.ui.keyCode.RIGHT:
20032if(curVal===this._valueMax()){
20033return;
20034}
20035newVal=this._trimAlignValue(curVal+step);
20036break;
20037case $.ui.keyCode.DOWN:
20038case $.ui.keyCode.LEFT:
20039if(curVal===this._valueMin()){
20040return;
20041}
20042newVal=this._trimAlignValue(curVal-step);
20043break;
20044}
20045this._slide(event,index,newVal);
20046},
20047keyup:function(event){
20048var index=$(event.target).data("ui-slider-handle-index");
20049if(this._keySliding){
20050this._keySliding=false;
20051this._stop(event,index);
20052this._change(event,index);
20053this._removeClass($(event.target),null,"ui-state-active");
20054}
20055}
20056}
20057});
20058var widgetsSortable=$.widget("ui.sortable",$.ui.mouse,{
20059version:"1.14.1",
20060widgetEventPrefix:"sort",
20061ready:false,
20062options:{
20063appendTo:"parent",
20064axis:false,
20065connectWith:false,
20066containment:false,
20067cursor:"auto",
20068cursorAt:false,
20069dropOnEmpty:true,
20070forcePlaceholderSize:false,
20071forceHelperSize:false,
20072grid:false,
20073handle:false,
20074helper:"original",
20075items:"> *",
20076opacity:false,
20077placeholder:false,
20078revert:false,
20079scroll:true,
20080scrollSensitivity:20,
20081scrollSpeed:20,
20082scope:"default",
20083tolerance:"intersect",
20084zIndex:1000,
20085activate:null,
20086beforeStop:null,
20087change:null,
20088deactivate:null,
20089out:null,
20090over:null,
20091receive:null,
20092remove:null,
20093sort:null,
20094start:null,
20095stop:null,
20096update:null
20097},
20098_isOverAxis:function(x,reference,size){
20099return(x>=reference)&&(x<(reference+size));
20100},
20101_isFloating:function(item){
20102return(/left|right/).test(item.css("float"))||
20103(/inline|table-cell/).test(item.css("display"));
20104},
20105_create:function(){
20106this.containerCache={};
20107this._addClass("ui-sortable");
20108this.refresh();
20109this.offset=this.element.offset();
20110this._mouseInit();
20111this._setHandleClassName();
20112this.ready=true;
20113},
20114_setOption:function(key,value){
20115this._super(key,value);
20116if(key==="handle"){
20117this._setHandleClassName();
20118}
20119},
20120_setHandleClassName:function(){
20121var that=this;
20122this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");
20123$.each(this.items,function(){
20124that._addClass(
20125this.instance.options.handle?
20126this.item.find(this.instance.options.handle):
20127this.item,
20128"ui-sortable-handle"
20129);
20130});
20131},
20132_destroy:function(){
20133this._mouseDestroy();
20134for(var i=this.items.length-1;i>=0;i--){
20135this.items[i].item.removeData(this.widgetName+"-item");
20136}
20137return this;
20138},
20139_mouseCapture:function(event,overrideHandle){
20140var currentItem=null,
20141validHandle=false,
20142that=this;
20143if(this.reverting){
20144return false;
20145}
20146if(this.options.disabled||this.options.type==="static"){
20147return false;
20148}
20149this._refreshItems(event);
20150$(event.target).parents().each(function(){
20151if($.data(this,that.widgetName+"-item")===that){
20152currentItem=$(this);
20153return false;
20154}
20155});
20156if($.data(event.target,that.widgetName+"-item")===that){
20157currentItem=$(event.target);
20158}
20159if(!currentItem){
20160return false;
20161}
20162if(this.options.handle&&!overrideHandle){
20163$(this.options.handle,currentItem).find("*").addBack().each(function(){
20164if(this===event.target){
20165validHandle=true;
20166}
20167});
20168if(!validHandle){
20169return false;
20170}
20171}
20172this.currentItem=currentItem;
20173this._removeCurrentsFromItems();
20174return true;
20175},
20176_mouseStart:function(event,overrideHandle,noActivation){
20177var i,body,
20178o=this.options;
20179this.currentContainer=this;
20180this.refreshPositions();
20181this.appendTo=$(o.appendTo!=="parent"?
20182o.appendTo:
20183this.currentItem.parent());
20184this.helper=this._createHelper(event);
20185this._cacheHelperProportions();
20186this._cacheMargins();
20187this.offset=this.currentItem.offset();
20188this.offset={
20189top:this.offset.top-this.margins.top,
20190left:this.offset.left-this.margins.left
20191};
20192$.extend(this.offset,{
20193click:{
20194left:event.pageX-this.offset.left,
20195top:event.pageY-this.offset.top
20196},
20197relative:this._getRelativeOffset()
20198});
20199this.helper.css("position","absolute");
20200this.cssPosition=this.helper.css("position");
20201if(o.cursorAt){
20202this._adjustOffsetFromHelper(o.cursorAt);
20203}
20204this.domPosition={
20205prev:this.currentItem.prev()[0],
20206parent:this.currentItem.parent()[0]
20207};
20208if(this.helper[0]!==this.currentItem[0]){
20209this.currentItem.hide();
20210}
20211this._createPlaceholder();
20212this.scrollParent=this.placeholder.scrollParent();
20213$.extend(this.offset,{
20214parent:this._getParentOffset()
20215});
20216if(o.containment){
20217this._setContainment();
20218}
20219if(o.cursor&&o.cursor!=="auto"){
20220body=this.document.find("body");
20221this._storedStylesheet=
20222$("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(body);
20223}
20224if(o.zIndex){
20225if(this.helper.css("zIndex")){
20226this._storedZIndex=this.helper.css("zIndex");
20227}
20228this.helper.css("zIndex",o.zIndex);
20229}
20230if(o.opacity){
20231if(this.helper.css("opacity")){
20232this._storedOpacity=this.helper.css("opacity");
20233}
20234this.helper.css("opacity",o.opacity);
20235}
20236if(this.scrollParent[0]!==this.document[0]&&
20237this.scrollParent[0].tagName!=="HTML"){
20238this.overflowOffset=this.scrollParent.offset();
20239}
20240this._trigger("start",event,this._uiHash());
20241if(!this._preserveHelperProportions){
20242this._cacheHelperProportions();
20243}
20244if(!noActivation){
20245for(i=this.containers.length-1;i>=0;i--){
20246this.containers[i]._trigger("activate",event,this._uiHash(this));
20247}
20248}
20249if($.ui.ddmanager){
20250$.ui.ddmanager.current=this;
20251}
20252if($.ui.ddmanager&&!o.dropBehaviour){
20253$.ui.ddmanager.prepareOffsets(this,event);
20254}
20255this.dragging=true;
20256this._addClass(this.helper,"ui-sortable-helper");
20257if(!this.helper.parent().is(this.appendTo)){
20258this.helper.detach().appendTo(this.appendTo);
20259this.offset.parent=this._getParentOffset();
20260}
20261this.position=this.originalPosition=this._generatePosition(event);
20262this.originalPageX=event.pageX;
20263this.originalPageY=event.pageY;
20264this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute");
20265this._mouseDrag(event);
20266return true;
20267},
20268_scroll:function(event){
20269var o=this.options,
20270scrolled=false;
20271if(this.scrollParent[0]!==this.document[0]&&
20272this.scrollParent[0].tagName!=="HTML"){
20273if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-
20274event.pageY<o.scrollSensitivity){
20275this.scrollParent[0].scrollTop=
20276scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed;
20277}else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){
20278this.scrollParent[0].scrollTop=
20279scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed;
20280}
20281if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-
20282event.pageX<o.scrollSensitivity){
20283this.scrollParent[0].scrollLeft=scrolled=
20284this.scrollParent[0].scrollLeft+o.scrollSpeed;
20285}else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){
20286this.scrollParent[0].scrollLeft=scrolled=
20287this.scrollParent[0].scrollLeft-o.scrollSpeed;
20288}
20289}else{
20290if(event.pageY-this.document.scrollTop()<o.scrollSensitivity){
20291scrolled=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed);
20292}else if(this.window.height()-(event.pageY-this.document.scrollTop())<
20293o.scrollSensitivity){
20294scrolled=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed);
20295}
20296if(event.pageX-this.document.scrollLeft()<o.scrollSensitivity){
20297scrolled=this.document.scrollLeft(
20298this.document.scrollLeft()-o.scrollSpeed
20299);
20300}else if(this.window.width()-(event.pageX-this.document.scrollLeft())<
20301o.scrollSensitivity){
20302scrolled=this.document.scrollLeft(
20303this.document.scrollLeft()+o.scrollSpeed
20304);
20305}
20306}
20307return scrolled;
20308},
20309_mouseDrag:function(event){
20310var i,item,itemElement,intersection,
20311o=this.options;
20312this.position=this._generatePosition(event);
20313this.positionAbs=this._convertPositionTo("absolute");
20314if(!this.options.axis||this.options.axis!=="y"){
20315this.helper[0].style.left=this.position.left+"px";
20316}
20317if(!this.options.axis||this.options.axis!=="x"){
20318this.helper[0].style.top=this.position.top+"px";
20319}
20320if(o.scroll){
20321if(this._scroll(event)!==false){
20322this._refreshItemPositions(true);
20323if($.ui.ddmanager&&!o.dropBehaviour){
20324$.ui.ddmanager.prepareOffsets(this,event);
20325}
20326}
20327}
20328this.dragDirection={
20329vertical:this._getDragVerticalDirection(),
20330horizontal:this._getDragHorizontalDirection()
20331};
20332for(i=this.items.length-1;i>=0;i--){
20333item=this.items[i];
20334itemElement=item.item[0];
20335intersection=this._intersectsWithPointer(item);
20336if(!intersection){
20337continue;
20338}
20339if(item.instance!==this.currentContainer){
20340continue;
20341}
20342if(itemElement!==this.currentItem[0]&&
20343this.placeholder[intersection===1?
20344"next":"prev"]()[0]!==itemElement&&
20345!$.contains(this.placeholder[0],itemElement)&&
20346(this.options.type==="semi-dynamic"?
20347!$.contains(this.element[0],itemElement):
20348true
20349)
20350){
20351this.direction=intersection===1?"down":"up";
20352if(this.options.tolerance==="pointer"||
20353this._intersectsWithSides(item)){
20354this._rearrange(event,item);
20355}else{
20356break;
20357}
20358this._trigger("change",event,this._uiHash());
20359break;
20360}
20361}
20362this._contactContainers(event);
20363if($.ui.ddmanager){
20364$.ui.ddmanager.drag(this,event);
20365}
20366this._trigger("sort",event,this._uiHash());
20367this.lastPositionAbs=this.positionAbs;
20368return false;
20369},
20370_mouseStop:function(event,noPropagation){
20371if(!event){
20372return;
20373}
20374if($.ui.ddmanager&&!this.options.dropBehaviour){
20375$.ui.ddmanager.drop(this,event);
20376}
20377if(this.options.revert){
20378var that=this,
20379cur=this.placeholder.offset(),
20380axis=this.options.axis,
20381animation={};
20382if(!axis||axis==="x"){
20383animation.left=cur.left-this.offset.parent.left-this.margins.left+
20384(this.offsetParent[0]===this.document[0].body?
203850:
20386this.offsetParent[0].scrollLeft
20387);
20388}
20389if(!axis||axis==="y"){
20390animation.top=cur.top-this.offset.parent.top-this.margins.top+
20391(this.offsetParent[0]===this.document[0].body?
203920:
20393this.offsetParent[0].scrollTop
20394);
20395}
20396this.reverting=true;
20397$(this.helper).animate(
20398animation,
20399parseInt(this.options.revert,10)||500,
20400function(){
20401that._clear(event);
20402}
20403);
20404}else{
20405this._clear(event,noPropagation);
20406}
20407return false;
20408},
20409cancel:function(){
20410if(this.dragging){
20411this._mouseUp(new $.Event("mouseup",{target:null}));
20412if(this.options.helper==="original"){
20413this.currentItem.css(this._storedCSS);
20414this._removeClass(this.currentItem,"ui-sortable-helper");
20415}else{
20416this.currentItem.show();
20417}
20418for(var i=this.containers.length-1;i>=0;i--){
20419this.containers[i]._trigger("deactivate",null,this._uiHash(this));
20420if(this.containers[i].containerCache.over){
20421this.containers[i]._trigger("out",null,this._uiHash(this));
20422this.containers[i].containerCache.over=0;
20423}
20424}
20425}
20426if(this.placeholder){
20427if(this.placeholder[0].parentNode){
20428this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
20429}
20430if(this.options.helper!=="original"&&this.helper&&
20431this.helper[0].parentNode){
20432this.helper.remove();
20433}
20434$.extend(this,{
20435helper:null,
20436dragging:false,
20437reverting:false,
20438_noFinalSort:null
20439});
20440if(this.domPosition.prev){
20441$(this.domPosition.prev).after(this.currentItem);
20442}else{
20443$(this.domPosition.parent).prepend(this.currentItem);
20444}
20445}
20446return this;
20447},
20448serialize:function(o){
20449var items=this._getItemsAsjQuery(o&&o.connected),
20450str=[];
20451o=o||{};
20452$(items).each(function(){
20453var res=($(o.item||this).attr(o.attribute||"id")||"")
20454.match(o.expression||(/(.+)[\-=_](.+)/));
20455if(res){
20456str.push(
20457(o.key||res[1]+"[]")+
20458"="+(o.key&&o.expression?res[1]:res[2]));
20459}
20460});
20461if(!str.length&&o.key){
20462str.push(o.key+"=");
20463}
20464return str.join("&");
20465},
20466toArray:function(o){
20467var items=this._getItemsAsjQuery(o&&o.connected),
20468ret=[];
20469o=o||{};
20470items.each(function(){
20471ret.push($(o.item||this).attr(o.attribute||"id")||"");
20472});
20473return ret;
20474},
20475_intersectsWith:function(item){
20476var x1=this.positionAbs.left,
20477x2=x1+this.helperProportions.width,
20478y1=this.positionAbs.top,
20479y2=y1+this.helperProportions.height,
20480l=item.left,
20481r=l+item.width,
20482t=item.top,
20483b=t+item.height,
20484dyClick=this.offset.click.top,
20485dxClick=this.offset.click.left,
20486isOverElementHeight=(this.options.axis==="x")||((y1+dyClick)>t&&
20487(y1+dyClick)<b),
20488isOverElementWidth=(this.options.axis==="y")||((x1+dxClick)>l&&
20489(x1+dxClick)<r),
20490isOverElement=isOverElementHeight&&isOverElementWidth;
20491if(this.options.tolerance==="pointer"||
20492this.options.forcePointerForContainers||
20493(this.options.tolerance!=="pointer"&&
20494this.helperProportions[this.floating?"width":"height"]>
20495item[this.floating?"width":"height"])
20496){
20497return isOverElement;
20498}else{
20499return(l<x1+(this.helperProportions.width/2)&&
20500x2-(this.helperProportions.width/2)<r&&
20501t<y1+(this.helperProportions.height/2)&&
20502y2-(this.helperProportions.height/2)<b);
20503
20504}
20505},
20506_intersectsWithPointer:function(item){
20507var verticalDirection,horizontalDirection,
20508isOverElementHeight=(this.options.axis==="x")||
20509this._isOverAxis(
20510this.positionAbs.top+this.offset.click.top,item.top,item.height),
20511isOverElementWidth=(this.options.axis==="y")||
20512this._isOverAxis(
20513this.positionAbs.left+this.offset.click.left,item.left,item.width),
20514isOverElement=isOverElementHeight&&isOverElementWidth;
20515if(!isOverElement){
20516return false;
20517}
20518verticalDirection=this.dragDirection.vertical;
20519horizontalDirection=this.dragDirection.horizontal;
20520return this.floating?
20521((horizontalDirection==="right"||verticalDirection==="down")?2:1):
20522(verticalDirection&&(verticalDirection==="down"?2:1));
20523},
20524_intersectsWithSides:function(item){
20525var isOverBottomHalf=this._isOverAxis(this.positionAbs.top+
20526this.offset.click.top,item.top+(item.height/2),item.height),
20527isOverRightHalf=this._isOverAxis(this.positionAbs.left+
20528this.offset.click.left,item.left+(item.width/2),item.width),
20529verticalDirection=this.dragDirection.vertical,
20530horizontalDirection=this.dragDirection.horizontal;
20531if(this.floating&&horizontalDirection){
20532return((horizontalDirection==="right"&&isOverRightHalf)||
20533(horizontalDirection==="left"&&!isOverRightHalf));
20534}else{
20535return verticalDirection&&((verticalDirection==="down"&&isOverBottomHalf)||
20536(verticalDirection==="up"&&!isOverBottomHalf));
20537}
20538},
20539_getDragVerticalDirection:function(){
20540var delta=this.positionAbs.top-this.lastPositionAbs.top;
20541return delta!==0&&(delta>0?"down":"up");
20542},
20543_getDragHorizontalDirection:function(){
20544var delta=this.positionAbs.left-this.lastPositionAbs.left;
20545return delta!==0&&(delta>0?"right":"left");
20546},
20547refresh:function(event){
20548this._refreshItems(event);
20549this._setHandleClassName();
20550this.refreshPositions();
20551return this;
20552},
20553_connectWith:function(){
20554var options=this.options;
20555return options.connectWith.constructor===String?
20556[options.connectWith]:
20557options.connectWith;
20558},
20559_getItemsAsjQuery:function(connected){
20560var i,j,cur,inst,
20561items=[],
20562queries=[],
20563connectWith=this._connectWith();
20564if(connectWith&&connected){
20565for(i=connectWith.length-1;i>=0;i--){
20566cur=$(connectWith[i],this.document[0]);
20567for(j=cur.length-1;j>=0;j--){
20568inst=$.data(cur[j],this.widgetFullName);
20569if(inst&&inst!==this&&!inst.options.disabled){
20570queries.push([typeof inst.options.items==="function"?
20571inst.options.items.call(inst.element):
20572$(inst.options.items,inst.element)
20573.not(".ui-sortable-helper")
20574.not(".ui-sortable-placeholder"),inst]);
20575}
20576}
20577}
20578}
20579queries.push([typeof this.options.items==="function"?
20580this.options.items
20581.call(this.element,null,{options:this.options,item:this.currentItem}):
20582$(this.options.items,this.element)
20583.not(".ui-sortable-helper")
20584.not(".ui-sortable-placeholder"),this]);
20585function addItems(){
20586items.push(this);
20587}
20588for(i=queries.length-1;i>=0;i--){
20589queries[i][0].each(addItems);
20590}
20591return $(items);
20592},
20593_removeCurrentsFromItems:function(){
20594var list=this.currentItem.find(":data("+this.widgetName+"-item)");
20595this.items=$.grep(this.items,function(item){
20596for(var j=0;j<list.length;j++){
20597if(list[j]===item.item[0]){
20598return false;
20599}
20600}
20601return true;
20602});
20603},
20604_refreshItems:function(event){
20605this.items=[];
20606this.containers=[this];
20607var i,j,cur,inst,targetData,_queries,item,queriesLength,
20608items=this.items,
20609queries=[[typeof this.options.items==="function"?
20610this.options.items.call(this.element[0],event,{item:this.currentItem}):
20611$(this.options.items,this.element),this]],
20612connectWith=this._connectWith();
20613if(connectWith&&this.ready){
20614for(i=connectWith.length-1;i>=0;i--){
20615cur=$(connectWith[i],this.document[0]);
20616for(j=cur.length-1;j>=0;j--){
20617inst=$.data(cur[j],this.widgetFullName);
20618if(inst&&inst!==this&&!inst.options.disabled){
20619queries.push([typeof inst.options.items==="function"?
20620inst.options.items
20621.call(inst.element[0],event,{item:this.currentItem}):
20622$(inst.options.items,inst.element),inst]);
20623this.containers.push(inst);
20624}
20625}
20626}
20627}
20628for(i=queries.length-1;i>=0;i--){
20629targetData=queries[i][1];
20630_queries=queries[i][0];
20631for(j=0,queriesLength=_queries.length;j<queriesLength;j++){
20632item=$(_queries[j]);
20633item.data(this.widgetName+"-item",targetData);
20634items.push({
20635item:item,
20636instance:targetData,
20637width:0,height:0,
20638left:0,top:0
20639});
20640}
20641}
20642},
20643_refreshItemPositions:function(fast){
20644var i,item,t,p;
20645for(i=this.items.length-1;i>=0;i--){
20646item=this.items[i];
20647if(this.currentContainer&&item.instance!==this.currentContainer&&
20648item.item[0]!==this.currentItem[0]){
20649continue;
20650}
20651t=this.options.toleranceElement?
20652$(this.options.toleranceElement,item.item):
20653item.item;
20654if(!fast){
20655item.width=t.outerWidth();
20656item.height=t.outerHeight();
20657}
20658p=t.offset();
20659item.left=p.left;
20660item.top=p.top;
20661}
20662},
20663refreshPositions:function(fast){
20664this.floating=this.items.length?
20665this.options.axis==="x"||this._isFloating(this.items[0].item):
20666false;
20667if(this.offsetParent&&this.helper){
20668this.offset.parent=this._getParentOffset();
20669}
20670this._refreshItemPositions(fast);
20671var i,p;
20672if(this.options.custom&&this.options.custom.refreshContainers){
20673this.options.custom.refreshContainers.call(this);
20674}else{
20675for(i=this.containers.length-1;i>=0;i--){
20676p=this.containers[i].element.offset();
20677this.containers[i].containerCache.left=p.left;
20678this.containers[i].containerCache.top=p.top;
20679this.containers[i].containerCache.width=
20680this.containers[i].element.outerWidth();
20681this.containers[i].containerCache.height=
20682this.containers[i].element.outerHeight();
20683}
20684}
20685return this;
20686},
20687_createPlaceholder:function(that){
20688that=that||this;
20689var className,nodeName,
20690o=that.options;
20691if(!o.placeholder||o.placeholder.constructor===String){
20692className=o.placeholder;
20693nodeName=that.currentItem[0].nodeName.toLowerCase();
20694o.placeholder={
20695element:function(){
20696var element=$("<"+nodeName+">",that.document[0]);
20697that._addClass(element,"ui-sortable-placeholder",
20698className||that.currentItem[0].className)
20699._removeClass(element,"ui-sortable-helper");
20700if(nodeName==="tbody"){
20701that._createTrPlaceholder(
20702that.currentItem.find("tr").eq(0),
20703$("<tr>",that.document[0]).appendTo(element)
20704);
20705}else if(nodeName==="tr"){
20706that._createTrPlaceholder(that.currentItem,element);
20707}else if(nodeName==="img"){
20708element.attr("src",that.currentItem.attr("src"));
20709}
20710if(!className){
20711element.css("visibility","hidden");
20712}
20713return element;
20714},
20715update:function(container,p){
20716if(className&&!o.forcePlaceholderSize){
20717return;
20718}
20719if(!p.height()||(o.forcePlaceholderSize&&
20720(nodeName==="tbody"||nodeName==="tr"))){
20721p.height(
20722that.currentItem.innerHeight()-
20723parseInt(that.currentItem.css("paddingTop")||0,10)-
20724parseInt(that.currentItem.css("paddingBottom")||0,10));
20725}
20726if(!p.width()){
20727p.width(
20728that.currentItem.innerWidth()-
20729parseInt(that.currentItem.css("paddingLeft")||0,10)-
20730parseInt(that.currentItem.css("paddingRight")||0,10));
20731}
20732}
20733};
20734}
20735that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem));
20736that.currentItem.after(that.placeholder);
20737o.placeholder.update(that,that.placeholder);
20738},
20739_createTrPlaceholder:function(sourceTr,targetTr){
20740var that=this;
20741sourceTr.children().each(function(){
20742$("<td>&#160;</td>",that.document[0])
20743.attr("colspan",$(this).attr("colspan")||1)
20744.appendTo(targetTr);
20745});
20746},
20747_contactContainers:function(event){
20748var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,cur,nearBottom,
20749floating,axis,
20750innermostContainer=null,
20751innermostIndex=null;
20752for(i=this.containers.length-1;i>=0;i--){
20753if($.contains(this.currentItem[0],this.containers[i].element[0])){
20754continue;
20755}
20756if(this._intersectsWith(this.containers[i].containerCache)){
20757if(innermostContainer&&
20758$.contains(
20759this.containers[i].element[0],
20760innermostContainer.element[0])){
20761continue;
20762}
20763innermostContainer=this.containers[i];
20764innermostIndex=i;
20765}else{
20766if(this.containers[i].containerCache.over){
20767this.containers[i]._trigger("out",event,this._uiHash(this));
20768this.containers[i].containerCache.over=0;
20769}
20770}
20771}
20772if(!innermostContainer){
20773return;
20774}
20775if(this.containers.length===1){
20776if(!this.containers[innermostIndex].containerCache.over){
20777this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));
20778this.containers[innermostIndex].containerCache.over=1;
20779}
20780}else{
20781dist=10000;
20782itemWithLeastDistance=null;
20783floating=innermostContainer.floating||this._isFloating(this.currentItem);
20784posProperty=floating?"left":"top";
20785sizeProperty=floating?"width":"height";
20786axis=floating?"pageX":"pageY";
20787for(j=this.items.length-1;j>=0;j--){
20788if(!$.contains(
20789this.containers[innermostIndex].element[0],this.items[j].item[0])
20790){
20791continue;
20792}
20793if(this.items[j].item[0]===this.currentItem[0]){
20794continue;
20795}
20796cur=this.items[j].item.offset()[posProperty];
20797nearBottom=false;
20798if(event[axis]-cur>this.items[j][sizeProperty]/2){
20799nearBottom=true;
20800}
20801if(Math.abs(event[axis]-cur)<dist){
20802dist=Math.abs(event[axis]-cur);
20803itemWithLeastDistance=this.items[j];
20804this.direction=nearBottom?"up":"down";
20805}
20806}
20807if(!itemWithLeastDistance&&!this.options.dropOnEmpty){
20808return;
20809}
20810if(this.currentContainer===this.containers[innermostIndex]){
20811if(!this.currentContainer.containerCache.over){
20812this.containers[innermostIndex]._trigger("over",event,this._uiHash());
20813this.currentContainer.containerCache.over=1;
20814}
20815return;
20816}
20817if(itemWithLeastDistance){
20818this._rearrange(event,itemWithLeastDistance,null,true);
20819}else{
20820this._rearrange(event,null,this.containers[innermostIndex].element,true);
20821}
20822this._trigger("change",event,this._uiHash());
20823this.containers[innermostIndex]._trigger("change",event,this._uiHash(this));
20824this.currentContainer=this.containers[innermostIndex];
20825this.options.placeholder.update(this.currentContainer,this.placeholder);
20826this.scrollParent=this.placeholder.scrollParent();
20827if(this.scrollParent[0]!==this.document[0]&&
20828this.scrollParent[0].tagName!=="HTML"){
20829this.overflowOffset=this.scrollParent.offset();
20830}
20831this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));
20832this.containers[innermostIndex].containerCache.over=1;
20833}
20834},
20835_createHelper:function(event){
20836var o=this.options,
20837helper=typeof o.helper==="function"?
20838$(o.helper.apply(this.element[0],[event,this.currentItem])):
20839(o.helper==="clone"?this.currentItem.clone():this.currentItem);
20840if(!helper.parents("body").length){
20841this.appendTo[0].appendChild(helper[0]);
20842}
20843if(helper[0]===this.currentItem[0]){
20844this._storedCSS={
20845width:this.currentItem[0].style.width,
20846height:this.currentItem[0].style.height,
20847position:this.currentItem.css("position"),
20848top:this.currentItem.css("top"),
20849left:this.currentItem.css("left")
20850};
20851}
20852if(!helper[0].style.width||o.forceHelperSize){
20853helper.width(this.currentItem.width());
20854}
20855if(!helper[0].style.height||o.forceHelperSize){
20856helper.height(this.currentItem.height());
20857}
20858return helper;
20859},
20860_adjustOffsetFromHelper:function(obj){
20861if(typeof obj==="string"){
20862obj=obj.split(" ");
20863}
20864if(Array.isArray(obj)){
20865obj={left:+obj[0],top:+obj[1]||0};
20866}
20867if("left"in obj){
20868this.offset.click.left=obj.left+this.margins.left;
20869}
20870if("right"in obj){
20871this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;
20872}
20873if("top"in obj){
20874this.offset.click.top=obj.top+this.margins.top;
20875}
20876if("bottom"in obj){
20877this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;
20878}
20879},
20880_getParentOffset:function(){
20881this.offsetParent=this.helper.offsetParent();
20882var po=this.offsetParent.offset();
20883if(this.cssPosition==="absolute"&&this.scrollParent[0]!==this.document[0]&&
20884$.contains(this.scrollParent[0],this.offsetParent[0])){
20885po.left+=this.scrollParent.scrollLeft();
20886po.top+=this.scrollParent.scrollTop();
20887}
20888if(this.offsetParent[0]===this.document[0].body){
20889po={top:0,left:0};
20890}
20891return{
20892top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),
20893left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)
20894};
20895},
20896_getRelativeOffset:function(){
20897if(this.cssPosition==="relative"){
20898var p=this.currentItem.position();
20899return{
20900top:p.top-(parseInt(this.helper.css("top"),10)||0)+
20901this.scrollParent.scrollTop(),
20902left:p.left-(parseInt(this.helper.css("left"),10)||0)+
20903this.scrollParent.scrollLeft()
20904};
20905}else{
20906return{top:0,left:0};
20907}
20908},
20909_cacheMargins:function(){
20910this.margins={
20911left:(parseInt(this.currentItem.css("marginLeft"),10)||0),
20912top:(parseInt(this.currentItem.css("marginTop"),10)||0)
20913};
20914},
20915_cacheHelperProportions:function(){
20916this.helperProportions={
20917width:this.helper.outerWidth(),
20918height:this.helper.outerHeight()
20919};
20920},
20921_setContainment:function(){
20922var ce,co,over,
20923o=this.options;
20924if(o.containment==="parent"){
20925o.containment=this.helper[0].parentNode;
20926}
20927if(o.containment==="document"||o.containment==="window"){
20928this.containment=[
209290-this.offset.relative.left-this.offset.parent.left,
209300-this.offset.relative.top-this.offset.parent.top,
20931o.containment==="document"?
20932this.document.width():
20933this.window.width()-this.helperProportions.width-this.margins.left,
20934(o.containment==="document"?
20935(this.document.height()||document.body.parentNode.scrollHeight):
20936this.window.height()||this.document[0].body.parentNode.scrollHeight
20937)-this.helperProportions.height-this.margins.top
20938];
20939}
20940if(!(/^(document|window|parent)$/).test(o.containment)){
20941ce=$(o.containment)[0];
20942co=$(o.containment).offset();
20943over=($(ce).css("overflow")!=="hidden");
20944this.containment=[
20945co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+
20946(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,
20947co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+
20948(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,
20949co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-
20950(parseInt($(ce).css("borderLeftWidth"),10)||0)-
20951(parseInt($(ce).css("paddingRight"),10)||0)-
20952this.helperProportions.width-this.margins.left,
20953co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-
20954(parseInt($(ce).css("borderTopWidth"),10)||0)-
20955(parseInt($(ce).css("paddingBottom"),10)||0)-
20956this.helperProportions.height-this.margins.top
20957];
20958}
20959},
20960_convertPositionTo:function(d,pos){
20961if(!pos){
20962pos=this.position;
20963}
20964var mod=d==="absolute"?1:-1,
20965scroll=this.cssPosition==="absolute"&&
20966!(this.scrollParent[0]!==this.document[0]&&
20967$.contains(this.scrollParent[0],this.offsetParent[0]))?
20968this.offsetParent:
20969this.scrollParent,
20970scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);
20971return{
20972top:(
20973pos.top+
20974this.offset.relative.top*mod+
20975this.offset.parent.top*mod-
20976((this.cssPosition==="fixed"?
20977-this.scrollParent.scrollTop():
20978(scrollIsRootNode?0:scroll.scrollTop()))*mod)
20979),
20980left:(
20981pos.left+
20982this.offset.relative.left*mod+
20983this.offset.parent.left*mod-
20984((this.cssPosition==="fixed"?
20985-this.scrollParent.scrollLeft():scrollIsRootNode?0:
20986scroll.scrollLeft())*mod)
20987)
20988};
20989},
20990_generatePosition:function(event){
20991var top,left,
20992o=this.options,
20993pageX=event.pageX,
20994pageY=event.pageY,
20995scroll=this.cssPosition==="absolute"&&
20996!(this.scrollParent[0]!==this.document[0]&&
20997$.contains(this.scrollParent[0],this.offsetParent[0]))?
20998this.offsetParent:
20999this.scrollParent,
21000scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);
21001if(this.cssPosition==="relative"&&!(this.scrollParent[0]!==this.document[0]&&
21002this.scrollParent[0]!==this.offsetParent[0])){
21003this.offset.relative=this._getRelativeOffset();
21004}
21005if(this.originalPosition){
21006if(this.containment){
21007if(event.pageX-this.offset.click.left<this.containment[0]){
21008pageX=this.containment[0]+this.offset.click.left;
21009}
21010if(event.pageY-this.offset.click.top<this.containment[1]){
21011pageY=this.containment[1]+this.offset.click.top;
21012}
21013if(event.pageX-this.offset.click.left>this.containment[2]){
21014pageX=this.containment[2]+this.offset.click.left;
21015}
21016if(event.pageY-this.offset.click.top>this.containment[3]){
21017pageY=this.containment[3]+this.offset.click.top;
21018}
21019}
21020if(o.grid){
21021top=this.originalPageY+Math.round((pageY-this.originalPageY)/
21022o.grid[1])*o.grid[1];
21023pageY=this.containment?
21024((top-this.offset.click.top>=this.containment[1]&&
21025top-this.offset.click.top<=this.containment[3])?
21026top:
21027((top-this.offset.click.top>=this.containment[1])?
21028top-o.grid[1]:top+o.grid[1])):
21029top;
21030left=this.originalPageX+Math.round((pageX-this.originalPageX)/
21031o.grid[0])*o.grid[0];
21032pageX=this.containment?
21033((left-this.offset.click.left>=this.containment[0]&&
21034left-this.offset.click.left<=this.containment[2])?
21035left:
21036((left-this.offset.click.left>=this.containment[0])?
21037left-o.grid[0]:left+o.grid[0])):
21038left;
21039}
21040}
21041return{
21042top:(
21043pageY-
21044this.offset.click.top-
21045this.offset.relative.top-
21046this.offset.parent.top+
21047((this.cssPosition==="fixed"?
21048-this.scrollParent.scrollTop():
21049(scrollIsRootNode?0:scroll.scrollTop())))
21050),
21051left:(
21052pageX-
21053this.offset.click.left-
21054this.offset.relative.left-
21055this.offset.parent.left+
21056((this.cssPosition==="fixed"?
21057-this.scrollParent.scrollLeft():
21058scrollIsRootNode?0:scroll.scrollLeft()))
21059)
21060};
21061},
21062_rearrange:function(event,i,a,hardRefresh){
21063if(a){
21064a[0].appendChild(this.placeholder[0]);
21065}else{
21066i.item[0].parentNode.insertBefore(this.placeholder[0],
21067(this.direction==="down"?i.item[0]:i.item[0].nextSibling));
21068}
21069this.counter=this.counter?++this.counter:1;
21070var counter=this.counter;
21071this._delay(function(){
21072if(counter===this.counter){
21073this.refreshPositions(!hardRefresh);
21074}
21075});
21076},
21077_clear:function(event,noPropagation){
21078this.reverting=false;
21079var i,
21080delayedTriggers=[];
21081if(!this._noFinalSort&&this.currentItem.parent().length){
21082this.placeholder.before(this.currentItem);
21083}
21084this._noFinalSort=null;
21085if(this.helper[0]===this.currentItem[0]){
21086for(i in this._storedCSS){
21087if(this._storedCSS[i]==="auto"||this._storedCSS[i]==="static"){
21088this._storedCSS[i]="";
21089}
21090}
21091this.currentItem.css(this._storedCSS);
21092this._removeClass(this.currentItem,"ui-sortable-helper");
21093}else{
21094this.currentItem.show();
21095}
21096if(this.fromOutside&&!noPropagation){
21097delayedTriggers.push(function(event){
21098this._trigger("receive",event,this._uiHash(this.fromOutside));
21099});
21100}
21101if((this.fromOutside||
21102this.domPosition.prev!==
21103this.currentItem.prev().not(".ui-sortable-helper")[0]||
21104this.domPosition.parent!==this.currentItem.parent()[0])&&!noPropagation){
21105delayedTriggers.push(function(event){
21106this._trigger("update",event,this._uiHash());
21107});
21108}
21109if(this!==this.currentContainer){
21110if(!noPropagation){
21111delayedTriggers.push(function(event){
21112this._trigger("remove",event,this._uiHash());
21113});
21114delayedTriggers.push((function(c){
21115return function(event){
21116c._trigger("receive",event,this._uiHash(this));
21117};
21118}).call(this,this.currentContainer));
21119delayedTriggers.push((function(c){
21120return function(event){
21121c._trigger("update",event,this._uiHash(this));
21122};
21123}).call(this,this.currentContainer));
21124}
21125}
21126function delayEvent(type,instance,container){
21127return function(event){
21128container._trigger(type,event,instance._uiHash(instance));
21129};
21130}
21131for(i=this.containers.length-1;i>=0;i--){
21132if(!noPropagation){
21133delayedTriggers.push(delayEvent("deactivate",this,this.containers[i]));
21134}
21135if(this.containers[i].containerCache.over){
21136delayedTriggers.push(delayEvent("out",this,this.containers[i]));
21137this.containers[i].containerCache.over=0;
21138}
21139}
21140if(this._storedStylesheet){
21141this._storedStylesheet.remove();
21142this._storedStylesheet=null;
21143}
21144if(this._storedOpacity){
21145this.helper.css("opacity",this._storedOpacity);
21146}
21147if(this._storedZIndex){
21148this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex);
21149}
21150this.dragging=false;
21151if(!noPropagation){
21152this._trigger("beforeStop",event,this._uiHash());
21153}
21154this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
21155if(!this.cancelHelperRemoval){
21156if(this.helper[0]!==this.currentItem[0]){
21157this.helper.remove();
21158}
21159this.helper=null;
21160}
21161if(!noPropagation){
21162for(i=0;i<delayedTriggers.length;i++){
21163delayedTriggers[i].call(this,event);
21164}
21165this._trigger("stop",event,this._uiHash());
21166}
21167this.fromOutside=false;
21168return!this.cancelHelperRemoval;
21169},
21170_trigger:function(){
21171if($.Widget.prototype._trigger.apply(this,arguments)===false){
21172this.cancel();
21173}
21174},
21175_uiHash:function(_inst){
21176var inst=_inst||this;
21177return{
21178helper:inst.helper,
21179placeholder:inst.placeholder||$([]),
21180position:inst.position,
21181originalPosition:inst.originalPosition,
21182offset:inst.positionAbs,
21183item:inst.currentItem,
21184sender:_inst?_inst.element:null
21185};
21186}
21187});
21188function spinnerModifier(fn){
21189return function(){
21190var previous=this.element.val();
21191fn.apply(this,arguments);
21192this._refresh();
21193if(previous!==this.element.val()){
21194this._trigger("change");
21195}
21196};
21197}
21198$.widget("ui.spinner",{
21199version:"1.14.1",
21200defaultElement:"<input>",
21201widgetEventPrefix:"spin",
21202options:{
21203classes:{
21204"ui-spinner":"ui-corner-all",
21205"ui-spinner-down":"ui-corner-br",
21206"ui-spinner-up":"ui-corner-tr"
21207},
21208culture:null,
21209icons:{
21210down:"ui-icon-triangle-1-s",
21211up:"ui-icon-triangle-1-n"
21212},
21213incremental:true,
21214max:null,
21215min:null,
21216numberFormat:null,
21217page:10,
21218step:1,
21219change:null,
21220spin:null,
21221start:null,
21222stop:null
21223},
21224_create:function(){
21225this._setOption("max",this.options.max);
21226this._setOption("min",this.options.min);
21227this._setOption("step",this.options.step);
21228if(this.value()!==""){
21229this._value(this.element.val(),true);
21230}
21231this._draw();
21232this._on(this._events);
21233this._refresh();
21234this._on(this.window,{
21235beforeunload:function(){
21236this.element.removeAttr("autocomplete");
21237}
21238});
21239},
21240_getCreateOptions:function(){
21241var options=this._super();
21242var element=this.element;
21243$.each(["min","max","step"],function(i,option){
21244var value=element.attr(option);
21245if(value!=null&&value.length){
21246options[option]=value;
21247}
21248});
21249return options;
21250},
21251_events:{
21252keydown:function(event){
21253if(this._start(event)&&this._keydown(event)){
21254event.preventDefault();
21255}
21256},
21257keyup:"_stop",
21258focus:function(){
21259this.previous=this.element.val();
21260},
21261blur:function(event){
21262this._stop();
21263this._refresh();
21264if(this.previous!==this.element.val()){
21265this._trigger("change",event);
21266}
21267},
21268mousewheel:function(event,delta){
21269var activeElement=this.document[0].activeElement;
21270var isActive=this.element[0]===activeElement;
21271if(!isActive||!delta){
21272return;
21273}
21274if(!this.spinning&&!this._start(event)){
21275return false;
21276}
21277this._spin((delta>0?1:-1)*this.options.step,event);
21278clearTimeout(this.mousewheelTimer);
21279this.mousewheelTimer=this._delay(function(){
21280if(this.spinning){
21281this._stop(event);
21282}
21283},100);
21284event.preventDefault();
21285},
21286"mousedown .ui-spinner-button":function(event){
21287var previous;
21288previous=this.element[0]===this.document[0].activeElement?
21289this.previous:this.element.val();
21290function checkFocus(){
21291var isActive=this.element[0]===this.document[0].activeElement;
21292if(!isActive){
21293this.element.trigger("focus");
21294this.previous=previous;
21295}
21296}
21297event.preventDefault();
21298checkFocus.call(this);
21299if(this._start(event)===false){
21300return;
21301}
21302this._repeat(null,$(event.currentTarget)
21303.hasClass("ui-spinner-up")?1:-1,event);
21304},
21305"mouseup .ui-spinner-button":"_stop",
21306"mouseenter .ui-spinner-button":function(event){
21307if(!$(event.currentTarget).hasClass("ui-state-active")){
21308return;
21309}
21310if(this._start(event)===false){
21311return false;
21312}
21313this._repeat(null,$(event.currentTarget)
21314.hasClass("ui-spinner-up")?1:-1,event);
21315},
21316"mouseleave .ui-spinner-button":"_stop"
21317},
21318_enhance:function(){
21319this.uiSpinner=this.element
21320.attr("autocomplete","off")
21321.wrap("<span>")
21322.parent()
21323.append(
21324"<a></a><a></a>"
21325);
21326},
21327_draw:function(){
21328this._enhance();
21329this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content");
21330this._addClass("ui-spinner-input");
21331this.element.attr("role","spinbutton");
21332this.buttons=this.uiSpinner.children("a")
21333.attr("tabIndex",-1)
21334.attr("aria-hidden",true)
21335.button({
21336classes:{
21337"ui-button":""
21338}
21339});
21340this._removeClass(this.buttons,"ui-corner-all");
21341this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up");
21342this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down");
21343this.buttons.first().button({
21344"icon":this.options.icons.up,
21345"showLabel":false
21346});
21347this.buttons.last().button({
21348"icon":this.options.icons.down,
21349"showLabel":false
21350});
21351if(this.buttons.height()>Math.ceil(this.uiSpinner.height()*0.5)&&
21352this.uiSpinner.height()>0){
21353this.uiSpinner.height(this.uiSpinner.height());
21354}
21355},
21356_keydown:function(event){
21357var options=this.options,
21358keyCode=$.ui.keyCode;
21359switch(event.keyCode){
21360case keyCode.UP:
21361this._repeat(null,1,event);
21362return true;
21363case keyCode.DOWN:
21364this._repeat(null,-1,event);
21365return true;
21366case keyCode.PAGE_UP:
21367this._repeat(null,options.page,event);
21368return true;
21369case keyCode.PAGE_DOWN:
21370this._repeat(null,-options.page,event);
21371return true;
21372}
21373return false;
21374},
21375_start:function(event){
21376if(!this.spinning&&this._trigger("start",event)===false){
21377return false;
21378}
21379if(!this.counter){
21380this.counter=1;
21381}
21382this.spinning=true;
21383return true;
21384},
21385_repeat:function(i,steps,event){
21386i=i||500;
21387clearTimeout(this.timer);
21388this.timer=this._delay(function(){
21389this._repeat(40,steps,event);
21390},i);
21391this._spin(steps*this.options.step,event);
21392},
21393_spin:function(step,event){
21394var value=this.value()||0;
21395if(!this.counter){
21396this.counter=1;
21397}
21398value=this._adjustValue(value+step*this._increment(this.counter));
21399if(!this.spinning||this._trigger("spin",event,{value:value})!==false){
21400this._value(value);
21401this.counter++;
21402}
21403},
21404_increment:function(i){
21405var incremental=this.options.incremental;
21406if(incremental){
21407return typeof incremental==="function"?
21408incremental(i):
21409Math.floor(i*i*i/50000-i*i/ 500 + 17 * i /200+1);
21410}
21411return 1;
21412},
21413_precision:function(){
21414var precision=this._precisionOf(this.options.step);
21415if(this.options.min!==null){
21416precision=Math.max(precision,this._precisionOf(this.options.min));
21417}
21418return precision;
21419},
21420_precisionOf:function(num){
21421var str=num.toString(),
21422decimal=str.indexOf(".");
21423return decimal===-1?0:str.length-decimal-1;
21424},
21425_adjustValue:function(value){
21426var base,aboveMin,
21427options=this.options;
21428base=options.min!==null?options.min:0;
21429aboveMin=value-base;
21430aboveMin=Math.round(aboveMin/options.step)*options.step;
21431value=base+aboveMin;
21432value=parseFloat(value.toFixed(this._precision()));
21433if(options.max!==null&&value>options.max){
21434return options.max;
21435}
vendor: 4,894 bytes, lines 21436-21648
21436if(options.min!==null&&value<options.min){
21437return options.min;
21438}
21439return value;
21440},
21441_stop:function(event){
21442if(!this.spinning){
21443return;
21444}
21445clearTimeout(this.timer);
21446clearTimeout(this.mousewheelTimer);
21447this.counter=0;
21448this.spinning=false;
21449this._trigger("stop",event);
21450},
21451_setOption:function(key,value){
21452var prevValue,first,last;
21453if(key==="culture"||key==="numberFormat"){
21454prevValue=this._parse(this.element.val());
21455this.options[key]=value;
21456this.element.val(this._format(prevValue));
21457return;
21458}
21459if(key==="max"||key==="min"||key==="step"){
21460if(typeof value==="string"){
21461value=this._parse(value);
21462}
21463}
21464if(key==="icons"){
21465first=this.buttons.first().find(".ui-icon");
21466this._removeClass(first,null,this.options.icons.up);
21467this._addClass(first,null,value.up);
21468last=this.buttons.last().find(".ui-icon");
21469this._removeClass(last,null,this.options.icons.down);
21470this._addClass(last,null,value.down);
21471}
21472this._super(key,value);
21473},
21474_setOptionDisabled:function(value){
21475this._super(value);
21476this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!value);
21477this.element.prop("disabled",!!value);
21478this.buttons.button(value?"disable":"enable");
21479},
21480_setOptions:spinnerModifier(function(options){
21481this._super(options);
21482}),
21483_parse:function(val){
21484if(typeof val==="string"&&val!==""){
21485val=window.Globalize&&this.options.numberFormat?
21486Globalize.parseFloat(val,10,this.options.culture):+val;
21487}
21488return val===""||isNaN(val)?null:val;
21489},
21490_format:function(value){
21491if(value===""){
21492return"";
21493}
21494return window.Globalize&&this.options.numberFormat?
21495Globalize.format(value,this.options.numberFormat,this.options.culture):
21496value;
21497},
21498_refresh:function(){
21499this.element.attr({
21500"aria-valuemin":this.options.min,
21501"aria-valuemax":this.options.max,
21502"aria-valuenow":this._parse(this.element.val())
21503});
21504},
21505isValid:function(){
21506var value=this.value();
21507if(value===null){
21508return false;
21509}
21510return value===this._adjustValue(value);
21511},
21512_value:function(value,allowAny){
21513var parsed;
21514if(value!==""){
21515parsed=this._parse(value);
21516if(parsed!==null){
21517if(!allowAny){
21518parsed=this._adjustValue(parsed);
21519}
21520value=this._format(parsed);
21521}
21522}
21523this.element.val(value);
21524this._refresh();
21525},
21526_destroy:function(){
21527this.element
21528.prop("disabled",false)
21529.removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow");
21530this.uiSpinner.replaceWith(this.element);
21531},
21532stepUp:spinnerModifier(function(steps){
21533this._stepUp(steps);
21534}),
21535_stepUp:function(steps){
21536if(this._start()){
21537this._spin((steps||1)*this.options.step);
21538this._stop();
21539}
21540},
21541stepDown:spinnerModifier(function(steps){
21542this._stepDown(steps);
21543}),
21544_stepDown:function(steps){
21545if(this._start()){
21546this._spin((steps||1)*-this.options.step);
21547this._stop();
21548}
21549},
21550pageUp:spinnerModifier(function(pages){
21551this._stepUp((pages||1)*this.options.page);
21552}),
21553pageDown:spinnerModifier(function(pages){
21554this._stepDown((pages||1)*this.options.page);
21555}),
21556value:function(newVal){
21557if(!arguments.length){
21558return this._parse(this.element.val());
21559}
21560spinnerModifier(this._value).call(this,newVal);
21561},
21562widget:function(){
21563return this.uiSpinner;
21564}
21565});
21566if($.uiBackCompat===true){
21567$.widget("ui.spinner",$.ui.spinner,{
21568_enhance:function(){
21569this.uiSpinner=this.element
21570.attr("autocomplete","off")
21571.wrap(this._uiSpinnerHtml())
21572.parent()
21573.append(this._buttonHtml());
21574},
21575_uiSpinnerHtml:function(){
21576return"<span>";
21577},
21578_buttonHtml:function(){
21579return"<a></a><a></a>";
21580}
21581});
21582}
21583var widgetsSpinner=$.ui.spinner;
21584$.widget("ui.tabs",{
21585version:"1.14.1",
21586delay:300,
21587options:{
21588active:null,
21589classes:{
21590"ui-tabs":"ui-corner-all",
21591"ui-tabs-nav":"ui-corner-all",
21592"ui-tabs-panel":"ui-corner-bottom",
21593"ui-tabs-tab":"ui-corner-top"
21594},
21595collapsible:false,
21596event:"click",
21597heightStyle:"content",
21598hide:null,
21599show:null,
21600activate:null,
21601beforeActivate:null,
21602beforeLoad:null,
21603load:null
21604},
21605_isLocal:(function(){
21606var rhash=/#.*$/;
21607return function(anchor){
21608var anchorUrl,locationUrl;
21609anchorUrl=anchor.href.replace(rhash,"");
21610locationUrl=location.href.replace(rhash,"");
21611try{
21612anchorUrl=decodeURIComponent(anchorUrl);
21613}catch(error){}
21614try{
21615locationUrl=decodeURIComponent(locationUrl);
21616}catch(error){}
21617return anchor.hash.length>1&&anchorUrl===locationUrl;
21618};
21619})(),
21620_create:function(){
21621var that=this,
21622options=this.options;
21623this.running=false;
21624this._addClass("ui-tabs","ui-widget ui-widget-content");
21625this._toggleClass("ui-tabs-collapsible",null,options.collapsible);
21626this._processTabs();
21627options.active=this._initialActive();
21628if(Array.isArray(options.disabled)){
21629options.disabled=$.uniqueSort(options.disabled.concat(
21630$.map(this.tabs.filter(".ui-state-disabled"),function(li){
21631return that.tabs.index(li);
21632})
21633)).sort();
21634}
21635if(this.options.active!==false&&this.anchors.length){
21636this.active=this._findActive(options.active);
21637}else{
21638this.active=$();
21639}
21640this._refresh();
21641if(this.active.length){
21642this.load(options.active);
21643}
21644},
21645_initialActive:function(){
21646var active=this.options.active,
21647collapsible=this.options.collapsible,
21648locationHashDecoded=decodeURIComponent(location.hash.substring(1));
vendor: 26,086 bytes, lines 21649-22701
21649if(active===null){
21650if(locationHashDecoded){
21651this.tabs.each(function(i,tab){
21652if($(tab).attr("aria-controls")===locationHashDecoded){
21653active=i;
21654return false;
21655}
21656});
21657}
21658if(active===null){
21659active=this.tabs.index(this.tabs.filter(".ui-tabs-active"));
21660}
21661if(active===null||active===-1){
21662active=this.tabs.length?0:false;
21663}
21664}
21665if(active!==false){
21666active=this.tabs.index(this.tabs.eq(active));
21667if(active===-1){
21668active=collapsible?false:0;
21669}
21670}
21671if(!collapsible&&active===false&&this.anchors.length){
21672active=0;
21673}
21674return active;
21675},
21676_getCreateEventData:function(){
21677return{
21678tab:this.active,
21679panel:!this.active.length?$():this._getPanelForTab(this.active)
21680};
21681},
21682_tabKeydown:function(event){
21683var focusedTab=$(this.document[0].activeElement).closest("li"),
21684selectedIndex=this.tabs.index(focusedTab),
21685goingForward=true;
21686if(this._handlePageNav(event)){
21687return;
21688}
21689switch(event.keyCode){
21690case $.ui.keyCode.RIGHT:
21691case $.ui.keyCode.DOWN:
21692selectedIndex++;
21693break;
21694case $.ui.keyCode.UP:
21695case $.ui.keyCode.LEFT:
21696goingForward=false;
21697selectedIndex--;
21698break;
21699case $.ui.keyCode.END:
21700selectedIndex=this.anchors.length-1;
21701break;
21702case $.ui.keyCode.HOME:
21703selectedIndex=0;
21704break;
21705case $.ui.keyCode.SPACE:
21706event.preventDefault();
21707clearTimeout(this.activating);
21708this._activate(selectedIndex);
21709return;
21710case $.ui.keyCode.ENTER:
21711event.preventDefault();
21712clearTimeout(this.activating);
21713this._activate(selectedIndex===this.options.active?false:selectedIndex);
21714return;
21715default:
21716return;
21717}
21718event.preventDefault();
21719clearTimeout(this.activating);
21720selectedIndex=this._focusNextTab(selectedIndex,goingForward);
21721if(!event.ctrlKey&&!event.metaKey){
21722focusedTab.attr("aria-selected","false");
21723this.tabs.eq(selectedIndex).attr("aria-selected","true");
21724this.activating=this._delay(function(){
21725this.option("active",selectedIndex);
21726},this.delay);
21727}
21728},
21729_panelKeydown:function(event){
21730if(this._handlePageNav(event)){
21731return;
21732}
21733if(event.ctrlKey&&event.keyCode===$.ui.keyCode.UP){
21734event.preventDefault();
21735this.active.trigger("focus");
21736}
21737},
21738_handlePageNav:function(event){
21739if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP){
21740this._activate(this._focusNextTab(this.options.active-1,false));
21741return true;
21742}
21743if(event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN){
21744this._activate(this._focusNextTab(this.options.active+1,true));
21745return true;
21746}
21747},
21748_findNextTab:function(index,goingForward){
21749var lastTabIndex=this.tabs.length-1;
21750function constrain(){
21751if(index>lastTabIndex){
21752index=0;
21753}
21754if(index<0){
21755index=lastTabIndex;
21756}
21757return index;
21758}
21759while($.inArray(constrain(),this.options.disabled)!==-1){
21760index=goingForward?index+1:index-1;
21761}
21762return index;
21763},
21764_focusNextTab:function(index,goingForward){
21765index=this._findNextTab(index,goingForward);
21766this.tabs.eq(index).trigger("focus");
21767return index;
21768},
21769_setOption:function(key,value){
21770if(key==="active"){
21771this._activate(value);
21772return;
21773}
21774this._super(key,value);
21775if(key==="collapsible"){
21776this._toggleClass("ui-tabs-collapsible",null,value);
21777if(!value&&this.options.active===false){
21778this._activate(0);
21779}
21780}
21781if(key==="event"){
21782this._setupEvents(value);
21783}
21784if(key==="heightStyle"){
21785this._setupHeightStyle(value);
21786}
21787},
21788refresh:function(){
21789var options=this.options,
21790lis=this.tablist.children(":has(a[href])");
21791options.disabled=$.map(lis.filter(".ui-state-disabled"),function(tab){
21792return lis.index(tab);
21793});
21794this._processTabs();
21795if(options.active===false||!this.anchors.length){
21796options.active=false;
21797this.active=$();
21798}else if(this.active.length&&!$.contains(this.tablist[0],this.active[0])){
21799if(this.tabs.length===options.disabled.length){
21800options.active=false;
21801this.active=$();
21802}else{
21803this._activate(this._findNextTab(Math.max(0,options.active-1),false));
21804}
21805}else{
21806options.active=this.tabs.index(this.active);
21807}
21808this._refresh();
21809},
21810_refresh:function(){
21811this._setOptionDisabled(this.options.disabled);
21812this._setupEvents(this.options.event);
21813this._setupHeightStyle(this.options.heightStyle);
21814this.tabs.not(this.active).attr({
21815"aria-selected":"false",
21816"aria-expanded":"false",
21817tabIndex:-1
21818});
21819this.panels.not(this._getPanelForTab(this.active))
21820.hide()
21821.attr({
21822"aria-hidden":"true"
21823});
21824if(!this.active.length){
21825this.tabs.eq(0).attr("tabIndex",0);
21826}else{
21827this.active
21828.attr({
21829"aria-selected":"true",
21830"aria-expanded":"true",
21831tabIndex:0
21832});
21833this._addClass(this.active,"ui-tabs-active","ui-state-active");
21834this._getPanelForTab(this.active)
21835.show()
21836.attr({
21837"aria-hidden":"false"
21838});
21839}
21840},
21841_processTabs:function(){
21842var that=this,
21843prevTabs=this.tabs,
21844prevAnchors=this.anchors,
21845prevPanels=this.panels;
21846this.tablist=this._getList().attr("role","tablist");
21847this._addClass(this.tablist,"ui-tabs-nav",
21848"ui-helper-reset ui-helper-clearfix ui-widget-header");
21849this.tablist
21850.on("mousedown"+this.eventNamespace,"> li",function(event){
21851if($(this).is(".ui-state-disabled")){
21852event.preventDefault();
21853}
21854});
21855this.tabs=this.tablist.find("> li:has(a[href])")
21856.attr({
21857role:"tab",
21858tabIndex:-1
21859});
21860this._addClass(this.tabs,"ui-tabs-tab","ui-state-default");
21861this.anchors=this.tabs.map(function(){
21862return $("a",this)[0];
21863})
21864.attr({
21865tabIndex:-1
21866});
21867this._addClass(this.anchors,"ui-tabs-anchor");
21868this.panels=$();
21869this.anchors.each(function(i,anchor){
21870var selector,panel,panelId,
21871anchorId=$(anchor).uniqueId().attr("id"),
21872tab=$(anchor).closest("li"),
21873originalAriaControls=tab.attr("aria-controls");
21874if(that._isLocal(anchor)){
21875selector=decodeURIComponent(anchor.hash);
21876panelId=selector.substring(1);
21877panel=that.element.find("#"+CSS.escape(panelId));
21878}else{
21879panelId=tab.attr("aria-controls")||$({}).uniqueId()[0].id;
21880selector="#"+panelId;
21881panel=that.element.find(selector);
21882if(!panel.length){
21883panel=that._createPanel(panelId);
21884panel.insertAfter(that.panels[i-1]||that.tablist);
21885}
21886panel.attr("aria-live","polite");
21887}
21888if(panel.length){
21889that.panels=that.panels.add(panel);
21890}
21891if(originalAriaControls){
21892tab.data("ui-tabs-aria-controls",originalAriaControls);
21893}
21894tab.attr({
21895"aria-controls":panelId,
21896"aria-labelledby":anchorId
21897});
21898panel.attr("aria-labelledby",anchorId);
21899});
21900this.panels.attr("role","tabpanel");
21901this._addClass(this.panels,"ui-tabs-panel","ui-widget-content");
21902if(prevTabs){
21903this._off(prevTabs.not(this.tabs));
21904this._off(prevAnchors.not(this.anchors));
21905this._off(prevPanels.not(this.panels));
21906}
21907},
21908_getList:function(){
21909return this.tablist||this.element.find("ol, ul").eq(0);
21910},
21911_createPanel:function(id){
21912return $("<div>")
21913.attr("id",id)
21914.data("ui-tabs-destroy",true);
21915},
21916_setOptionDisabled:function(disabled){
21917var currentItem,li,i;
21918if(Array.isArray(disabled)){
21919if(!disabled.length){
21920disabled=false;
21921}else if(disabled.length===this.anchors.length){
21922disabled=true;
21923}
21924}
21925for(i=0;(li=this.tabs[i]);i++){
21926currentItem=$(li);
21927if(disabled===true||$.inArray(i,disabled)!==-1){
21928currentItem.attr("aria-disabled","true");
21929this._addClass(currentItem,null,"ui-state-disabled");
21930}else{
21931currentItem.removeAttr("aria-disabled");
21932this._removeClass(currentItem,null,"ui-state-disabled");
21933}
21934}
21935this.options.disabled=disabled;
21936this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,
21937disabled===true);
21938},
21939_setupEvents:function(event){
21940var events={};
21941if(event){
21942$.each(event.split(" "),function(index,eventName){
21943events[eventName]="_eventHandler";
21944});
21945}
21946this._off(this.anchors.add(this.tabs).add(this.panels));
21947this._on(true,this.anchors,{
21948click:function(event){
21949event.preventDefault();
21950}
21951});
21952this._on(this.anchors,events);
21953this._on(this.tabs,{keydown:"_tabKeydown"});
21954this._on(this.panels,{keydown:"_panelKeydown"});
21955this._focusable(this.tabs);
21956this._hoverable(this.tabs);
21957},
21958_setupHeightStyle:function(heightStyle){
21959var maxHeight,
21960parent=this.element.parent();
21961if(heightStyle==="fill"){
21962maxHeight=parent.height();
21963maxHeight-=this.element.outerHeight()-this.element.height();
21964this.element.siblings(":visible").each(function(){
21965var elem=$(this),
21966position=elem.css("position");
21967if(position==="absolute"||position==="fixed"){
21968return;
21969}
21970maxHeight-=elem.outerHeight(true);
21971});
21972this.element.children().not(this.panels).each(function(){
21973maxHeight-=$(this).outerHeight(true);
21974});
21975this.panels.each(function(){
21976$(this).height(Math.max(0,maxHeight-
21977$(this).innerHeight()+$(this).height()));
21978})
21979.css("overflow","auto");
21980}else if(heightStyle==="auto"){
21981maxHeight=0;
21982this.panels.each(function(){
21983maxHeight=Math.max(maxHeight,$(this).height("").height());
21984}).height(maxHeight);
21985}
21986},
21987_eventHandler:function(event){
21988var options=this.options,
21989active=this.active,
21990anchor=$(event.currentTarget),
21991tab=anchor.closest("li"),
21992clickedIsActive=tab[0]===active[0],
21993collapsing=clickedIsActive&&options.collapsible,
21994toShow=collapsing?$():this._getPanelForTab(tab),
21995toHide=!active.length?$():this._getPanelForTab(active),
21996eventData={
21997oldTab:active,
21998oldPanel:toHide,
21999newTab:collapsing?$():tab,
22000newPanel:toShow
22001};
22002event.preventDefault();
22003if(tab.hasClass("ui-state-disabled")||
22004tab.hasClass("ui-tabs-loading")||
22005this.running||
22006(clickedIsActive&&!options.collapsible)||
22007(this._trigger("beforeActivate",event,eventData)===false)){
22008return;
22009}
22010options.active=collapsing?false:this.tabs.index(tab);
22011this.active=clickedIsActive?$():tab;
22012if(this.xhr){
22013this.xhr.abort();
22014}
22015if(!toHide.length&&!toShow.length){
22016$.error("jQuery UI Tabs: Mismatching fragment identifier.");
22017}
22018if(toShow.length){
22019this.load(this.tabs.index(tab),event);
22020}
22021this._toggle(event,eventData);
22022},
22023_toggle:function(event,eventData){
22024var that=this,
22025toShow=eventData.newPanel,
22026toHide=eventData.oldPanel;
22027this.running=true;
22028function complete(){
22029that.running=false;
22030that._trigger("activate",event,eventData);
22031}
22032function show(){
22033that._addClass(eventData.newTab.closest("li"),"ui-tabs-active","ui-state-active");
22034if(toShow.length&&that.options.show){
22035that._show(toShow,that.options.show,complete);
22036}else{
22037toShow.show();
22038complete();
22039}
22040}
22041if(toHide.length&&this.options.hide){
22042this._hide(toHide,this.options.hide,function(){
22043that._removeClass(eventData.oldTab.closest("li"),
22044"ui-tabs-active","ui-state-active");
22045show();
22046});
22047}else{
22048this._removeClass(eventData.oldTab.closest("li"),
22049"ui-tabs-active","ui-state-active");
22050toHide.hide();
22051show();
22052}
22053toHide.attr("aria-hidden","true");
22054eventData.oldTab.attr({
22055"aria-selected":"false",
22056"aria-expanded":"false"
22057});
22058if(toShow.length&&toHide.length){
22059eventData.oldTab.attr("tabIndex",-1);
22060}else if(toShow.length){
22061this.tabs.filter(function(){
22062return $(this).attr("tabIndex")===0;
22063})
22064.attr("tabIndex",-1);
22065}
22066toShow.attr("aria-hidden","false");
22067eventData.newTab.attr({
22068"aria-selected":"true",
22069"aria-expanded":"true",
22070tabIndex:0
22071});
22072},
22073_activate:function(index){
22074var anchor,
22075active=this._findActive(index);
22076if(active[0]===this.active[0]){
22077return;
22078}
22079if(!active.length){
22080active=this.active;
22081}
22082anchor=active.find(".ui-tabs-anchor")[0];
22083this._eventHandler({
22084target:anchor,
22085currentTarget:anchor,
22086preventDefault:$.noop
22087});
22088},
22089_findActive:function(index){
22090return index===false?$():this.tabs.eq(index);
22091},
22092_getIndex:function(index){
22093if(typeof index==="string"){
22094index=this.anchors.index(this.anchors.filter("[href$='"+
22095CSS.escape(index)+"']"));
22096}
22097return index;
22098},
22099_destroy:function(){
22100if(this.xhr){
22101this.xhr.abort();
22102}
22103this.tablist
22104.removeAttr("role")
22105.off(this.eventNamespace);
22106this.anchors
22107.removeAttr("role tabIndex")
22108.removeUniqueId();
22109this.tabs.add(this.panels).each(function(){
22110if($.data(this,"ui-tabs-destroy")){
22111$(this).remove();
22112}else{
22113$(this).removeAttr("role tabIndex "+
22114"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded");
22115}
22116});
22117this.tabs.each(function(){
22118var li=$(this),
22119prev=li.data("ui-tabs-aria-controls");
22120if(prev){
22121li
22122.attr("aria-controls",prev)
22123.removeData("ui-tabs-aria-controls");
22124}else{
22125li.removeAttr("aria-controls");
22126}
22127});
22128this.panels.show();
22129if(this.options.heightStyle!=="content"){
22130this.panels.css("height","");
22131}
22132},
22133enable:function(index){
22134var disabled=this.options.disabled;
22135if(disabled===false){
22136return;
22137}
22138if(index===undefined){
22139disabled=false;
22140}else{
22141index=this._getIndex(index);
22142if(Array.isArray(disabled)){
22143disabled=$.map(disabled,function(num){
22144return num!==index?num:null;
22145});
22146}else{
22147disabled=$.map(this.tabs,function(li,num){
22148return num!==index?num:null;
22149});
22150}
22151}
22152this._setOptionDisabled(disabled);
22153},
22154disable:function(index){
22155var disabled=this.options.disabled;
22156if(disabled===true){
22157return;
22158}
22159if(index===undefined){
22160disabled=true;
22161}else{
22162index=this._getIndex(index);
22163if($.inArray(index,disabled)!==-1){
22164return;
22165}
22166if(Array.isArray(disabled)){
22167disabled=$.merge([index],disabled).sort();
22168}else{
22169disabled=[index];
22170}
22171}
22172this._setOptionDisabled(disabled);
22173},
22174load:function(index,event){
22175index=this._getIndex(index);
22176var that=this,
22177tab=this.tabs.eq(index),
22178anchor=tab.find(".ui-tabs-anchor"),
22179panel=this._getPanelForTab(tab),
22180eventData={
22181tab:tab,
22182panel:panel
22183},
22184complete=function(jqXHR,status){
22185if(status==="abort"){
22186that.panels.stop(false,true);
22187}
22188that._removeClass(tab,"ui-tabs-loading");
22189panel.removeAttr("aria-busy");
22190if(jqXHR===that.xhr){
22191delete that.xhr;
22192}
22193};
22194if(this._isLocal(anchor[0])){
22195return;
22196}
22197this.xhr=$.ajax(this._ajaxSettings(anchor,event,eventData));
22198if(this.xhr.statusText!=="canceled"){
22199this._addClass(tab,"ui-tabs-loading");
22200panel.attr("aria-busy","true");
22201this.xhr
22202.done(function(response,status,jqXHR){
22203panel.html(response);
22204that._trigger("load",event,eventData);
22205complete(jqXHR,status);
22206})
22207.fail(function(jqXHR,status){
22208complete(jqXHR,status);
22209});
22210}
22211},
22212_ajaxSettings:function(anchor,event,eventData){
22213var that=this;
22214return{
22215url:anchor.attr("href"),
22216beforeSend:function(jqXHR,settings){
22217return that._trigger("beforeLoad",event,
22218$.extend({jqXHR:jqXHR,ajaxSettings:settings},eventData));
22219}
22220};
22221},
22222_getPanelForTab:function(tab){
22223var id=$(tab).attr("aria-controls");
22224return this.element.find("#"+CSS.escape(id));
22225}
22226});
22227if($.uiBackCompat===true){
22228$.widget("ui.tabs",$.ui.tabs,{
22229_processTabs:function(){
22230this._superApply(arguments);
22231this._addClass(this.tabs,"ui-tab");
22232}
22233});
22234}
22235var widgetsTabs=$.ui.tabs;
22236$.widget("ui.tooltip",{
22237version:"1.14.1",
22238options:{
22239classes:{
22240"ui-tooltip":"ui-corner-all ui-widget-shadow"
22241},
22242content:function(){
22243var title=$(this).attr("title");
22244return $("<a>").text(title).html();
22245},
22246hide:true,
22247items:"[title]:not([disabled])",
22248position:{
22249my:"left top+15",
22250at:"left bottom",
22251collision:"flipfit flip"
22252},
22253show:true,
22254track:false,
22255close:null,
22256open:null
22257},
22258_addDescribedBy:function(elem,id){
22259var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);
22260describedby.push(id);
22261elem
22262.data("ui-tooltip-id",id)
22263.attr("aria-describedby",String.prototype.trim.call(describedby.join(" ")));
22264},
22265_removeDescribedBy:function(elem){
22266var id=elem.data("ui-tooltip-id"),
22267describedby=(elem.attr("aria-describedby")||"").split(/\s+/),
22268index=$.inArray(id,describedby);
22269if(index!==-1){
22270describedby.splice(index,1);
22271}
22272elem.removeData("ui-tooltip-id");
22273describedby=String.prototype.trim.call(describedby.join(" "));
22274if(describedby){
22275elem.attr("aria-describedby",describedby);
22276}else{
22277elem.removeAttr("aria-describedby");
22278}
22279},
22280_create:function(){
22281this._on({
22282mouseover:"open",
22283focusin:"open"
22284});
22285this.tooltips={};
22286this.parents={};
22287this.liveRegion=$("<div>")
22288.attr({
22289role:"log",
22290"aria-live":"assertive",
22291"aria-relevant":"additions"
22292})
22293.appendTo(this.document[0].body);
22294this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");
22295this.disabledTitles=$([]);
22296},
22297_setOption:function(key,value){
22298var that=this;
22299this._super(key,value);
22300if(key==="content"){
22301$.each(this.tooltips,function(id,tooltipData){
22302that._updateContent(tooltipData.element);
22303});
22304}
22305},
22306_setOptionDisabled:function(value){
22307this[value?"_disable":"_enable"]();
22308},
22309_disable:function(){
22310var that=this;
22311$.each(this.tooltips,function(id,tooltipData){
22312var event=$.Event("blur");
22313event.target=event.currentTarget=tooltipData.element[0];
22314that.close(event,true);
22315});
22316this.disabledTitles=this.disabledTitles.add(
22317this.element.find(this.options.items).addBack()
22318.filter(function(){
22319var element=$(this);
22320if(element.is("[title]")){
22321return element
22322.data("ui-tooltip-title",element.attr("title"))
22323.removeAttr("title");
22324}
22325})
22326);
22327},
22328_enable:function(){
22329this.disabledTitles.each(function(){
22330var element=$(this);
22331if(element.data("ui-tooltip-title")){
22332element.attr("title",element.data("ui-tooltip-title"));
22333}
22334});
22335this.disabledTitles=$([]);
22336},
22337open:function(event){
22338var that=this,
22339target=$(event?event.target:this.element)
22340.closest(this.options.items);
22341if(!target.length||target.data("ui-tooltip-id")){
22342return;
22343}
22344if(target.attr("title")){
22345target.data("ui-tooltip-title",target.attr("title"));
22346}
22347target.data("ui-tooltip-open",true);
22348if(event&&event.type==="mouseover"){
22349target.parents().each(function(){
22350var parent=$(this),
22351blurEvent;
22352if(parent.data("ui-tooltip-open")){
22353blurEvent=$.Event("blur");
22354blurEvent.target=blurEvent.currentTarget=this;
22355that.close(blurEvent,true);
22356}
22357if(parent.attr("title")){
22358parent.uniqueId();
22359that.parents[this.id]={
22360element:this,
22361title:parent.attr("title")
22362};
22363parent.attr("title","");
22364}
22365});
22366}
22367this._registerCloseHandlers(event,target);
22368this._updateContent(target,event);
22369},
22370_updateContent:function(target,event){
22371var content,
22372contentOption=this.options.content,
22373that=this,
22374eventType=event?event.type:null;
22375if(typeof contentOption==="string"||contentOption.nodeType||
22376contentOption.jquery){
22377return this._open(event,target,contentOption);
22378}
22379content=contentOption.call(target[0],function(response){
22380if(!target.data("ui-tooltip-open")){
22381return;
22382}
22383if(event){
22384event.type=eventType;
22385}
22386that._open(event,target,response);
22387});
22388if(content){
22389this._open(event,target,content);
22390}
22391},
22392_open:function(event,target,content){
22393var tooltipData,tooltip,delayedShow,a11yContent,
22394positionOption=$.extend({},this.options.position);
22395if(!content){
22396return;
22397}
22398tooltipData=this._find(target);
22399if(tooltipData){
22400tooltipData.tooltip.find(".ui-tooltip-content").html(content);
22401return;
22402}
22403if(target.is("[title]")){
22404if(event&&event.type==="mouseover"){
22405target.attr("title","");
22406}else{
22407target.removeAttr("title");
22408}
22409}
22410tooltipData=this._tooltip(target);
22411tooltip=tooltipData.tooltip;
22412this._addDescribedBy(target,tooltip.attr("id"));
22413tooltip.find(".ui-tooltip-content").html(content);
22414this.liveRegion.children().hide();
22415a11yContent=$("<div>").html(tooltip.find(".ui-tooltip-content").html());
22416a11yContent.removeAttr("name").find("[name]").removeAttr("name");
22417a11yContent.removeAttr("id").find("[id]").removeAttr("id");
22418a11yContent.appendTo(this.liveRegion);
22419function position(event){
22420positionOption.of=event;
22421if(tooltip.is(":hidden")){
22422return;
22423}
22424tooltip.position(positionOption);
22425}
22426if(this.options.track&&event&&/^mouse/.test(event.type)){
22427this._on(this.document,{
22428mousemove:position
22429});
22430position(event);
22431}else{
22432tooltip.position($.extend({
22433of:target
22434},this.options.position));
22435}
22436tooltip.hide();
22437this._show(tooltip,this.options.show);
22438if(this.options.track&&this.options.show&&this.options.show.delay){
22439delayedShow=this.delayedShow=setInterval(function(){
22440if(tooltip.is(":visible")){
22441position(positionOption.of);
22442clearInterval(delayedShow);
22443}
22444},13);
22445}
22446this._trigger("open",event,{tooltip:tooltip});
22447},
22448_registerCloseHandlers:function(event,target){
22449var events={
22450keyup:function(event){
22451if(event.keyCode===$.ui.keyCode.ESCAPE){
22452var fakeEvent=$.Event(event);
22453fakeEvent.currentTarget=target[0];
22454this.close(fakeEvent,true);
22455}
22456}
22457};
22458if(target[0]!==this.element[0]){
22459events.remove=function(){
22460var targetElement=this._find(target);
22461if(targetElement){
22462this._removeTooltip(targetElement.tooltip);
22463}
22464};
22465}
22466if(!event||event.type==="mouseover"){
22467events.mouseleave="close";
22468}
22469if(!event||event.type==="focusin"){
22470events.focusout="close";
22471}
22472this._on(true,target,events);
22473},
22474close:function(event){
22475var tooltip,
22476that=this,
22477target=$(event?event.currentTarget:this.element),
22478tooltipData=this._find(target);
22479if(!tooltipData){
22480target.removeData("ui-tooltip-open");
22481return;
22482}
22483tooltip=tooltipData.tooltip;
22484if(tooltipData.closing){
22485return;
22486}
22487clearInterval(this.delayedShow);
22488if(target.data("ui-tooltip-title")&&!target.attr("title")){
22489target.attr("title",target.data("ui-tooltip-title"));
22490}
22491this._removeDescribedBy(target);
22492tooltipData.hiding=true;
22493tooltip.stop(true);
22494this._hide(tooltip,this.options.hide,function(){
22495that._removeTooltip($(this));
22496});
22497target.removeData("ui-tooltip-open");
22498this._off(target,"mouseleave focusout keyup");
22499if(target[0]!==this.element[0]){
22500this._off(target,"remove");
22501}
22502this._off(this.document,"mousemove");
22503if(event&&event.type==="mouseleave"){
22504$.each(this.parents,function(id,parent){
22505$(parent.element).attr("title",parent.title);
22506delete that.parents[id];
22507});
22508}
22509tooltipData.closing=true;
22510this._trigger("close",event,{tooltip:tooltip});
22511if(!tooltipData.hiding){
22512tooltipData.closing=false;
22513}
22514},
22515_tooltip:function(element){
22516var tooltip=$("<div>").attr("role","tooltip"),
22517content=$("<div>").appendTo(tooltip),
22518id=tooltip.uniqueId().attr("id");
22519this._addClass(content,"ui-tooltip-content");
22520this._addClass(tooltip,"ui-tooltip","ui-widget ui-widget-content");
22521tooltip.appendTo(this._appendTo(element));
22522return this.tooltips[id]={
22523element:element,
22524tooltip:tooltip
22525};
22526},
22527_find:function(target){
22528var id=target.data("ui-tooltip-id");
22529return id?this.tooltips[id]:null;
22530},
22531_removeTooltip:function(tooltip){
22532clearInterval(this.delayedShow);
22533tooltip.remove();
22534delete this.tooltips[tooltip.attr("id")];
22535},
22536_appendTo:function(target){
22537var element=target.closest(".ui-front, dialog");
22538if(!element.length){
22539element=this.document[0].body;
22540}
22541return element;
22542},
22543_destroy:function(){
22544var that=this;
22545$.each(this.tooltips,function(id,tooltipData){
22546var event=$.Event("blur"),
22547element=tooltipData.element;
22548event.target=event.currentTarget=element[0];
22549that.close(event,true);
22550$("#"+id).remove();
22551if(element.data("ui-tooltip-title")){
22552if(!element.attr("title")){
22553element.attr("title",element.data("ui-tooltip-title"));
22554}
22555element.removeData("ui-tooltip-title");
22556}
22557});
22558this.liveRegion.remove();
22559}
22560});
22561if($.uiBackCompat===true){
22562$.widget("ui.tooltip",$.ui.tooltip,{
22563options:{
22564tooltipClass:null
22565},
22566_tooltip:function(){
22567var tooltipData=this._superApply(arguments);
22568if(this.options.tooltipClass){
22569tooltipData.tooltip.addClass(this.options.tooltipClass);
22570}
22571return tooltipData;
22572}
22573});
22574}
22575var widgetsTooltip=$.ui.tooltip;
22576});
22577
22578
22579/* plugins/auto/uploadhtml5/v2.1.0/lib/dropzone/dropzone.js?1751664454 */
22580"use strict";
22581var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();
22582function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}
22583function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
22584function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
22585var Emitter=function(){
22586function Emitter(){
22587_classCallCheck(this,Emitter);
22588}
22589_createClass(Emitter,[{
22590key:"on",
22591value:function on(event,fn){
22592this._callbacks=this._callbacks||{};
22593if(!this._callbacks[event]){
22594this._callbacks[event]=[];
22595}
22596this._callbacks[event].push(fn);
22597return this;
22598}
22599},{
22600key:"emit",
22601value:function emit(event){
22602this._callbacks=this._callbacks||{};
22603var callbacks=this._callbacks[event];
22604if(callbacks){
22605for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){
22606args[_key-1]=arguments[_key];
22607}
22608for(var _iterator=callbacks,_isArray=true,_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){
22609var _ref;
22610if(_isArray){
22611if(_i>=_iterator.length)break;
22612_ref=_iterator[_i++];
22613}else{
22614_i=_iterator.next();
22615if(_i.done)break;
22616_ref=_i.value;
22617}
22618var callback=_ref;
22619callback.apply(this,args);
22620}
22621}
22622return this;
22623}
22624},{
22625key:"off",
22626value:function off(event,fn){
22627if(!this._callbacks||arguments.length===0){
22628this._callbacks={};
22629return this;
22630}
22631var callbacks=this._callbacks[event];
22632if(!callbacks){
22633return this;
22634}
22635if(arguments.length===1){
22636delete this._callbacks[event];
22637return this;
22638}
22639for(var i=0;i<callbacks.length;i++){
22640var callback=callbacks[i];
22641if(callback===fn){
22642callbacks.splice(i,1);
22643break;
22644}
22645}
22646return this;
22647}
22648}]);
22649return Emitter;
22650}();
22651var Dropzone=function(_Emitter){
22652_inherits(Dropzone,_Emitter);
22653_createClass(Dropzone,null,[{
22654key:"initClass",
22655value:function initClass(){
22656this.prototype.Emitter=Emitter;
22657this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"];
22658this.prototype.defaultOptions={
22659url:null,
22660method:"post",
22661withCredentials:false,
22662timeout:30000,
22663parallelUploads:2,
22664uploadMultiple:false,
22665chunking:false,
22666forceChunking:false,
22667chunkSize:2000000,
22668parallelChunkUploads:false,
22669retryChunks:false,
22670retryChunksLimit:3,
22671maxFilesize:256,
22672paramName:"file",
22673createImageThumbnails:true,
22674maxThumbnailFilesize:10,
22675thumbnailWidth:120,
22676thumbnailHeight:120,
22677thumbnailMethod:'crop',
22678resizeWidth:null,
22679resizeHeight:null,
22680resizeMimeType:null,
22681resizeQuality:0.8,
22682resizeMethod:'contain',
22683filesizeBase:1000,
22684maxFiles:null,
22685headers:null,
22686clickable:true,
22687ignoreHiddenFiles:true,
22688acceptedFiles:null,
22689acceptedMimeTypes:null,
22690autoProcessQueue:true,
22691autoQueue:true,
22692addRemoveLinks:false,
22693previewsContainer:null,
22694hiddenInputContainer:"body",
22695capture:null,
22696renameFilename:null,
22697renameFile:null,
22698forceFallback:false,
22699dictDefaultMessage:"Drop files here to upload",
22700dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",
22701dictFallbackText:"Please use the fallback form below to upload your files like in the olde
22701n days.",
22702dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
22703dictInvalidFileType:"You can't upload files of this type.",
22704dictResponseError:"Server responded with {{statusCode}} code.",
22705dictCancelUpload:"Cancel upload",
22706dictUploadCanceled:"Upload canceled.",
22707dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",
22708dictRemoveFile:"Remove file",
22709dictRemoveFileConfirmation:null,
22710dictMaxFilesExceeded:"You can not upload any more files.",
22711dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},
22712init:function init(){},
22713params:function params(files,xhr,chunk){
22714if(chunk){
22715return{
22716dzuuid:chunk.file.upload.uuid,
22717dzchunkindex:chunk.index,
22718dztotalfilesize:chunk.file.size,
22719dzchunksize:this.options.chunkSize,
22720dztotalchunkcount:chunk.file.upload.totalChunkCount,
22721dzchunkbyteoffset:chunk.index*this.options.chunkSize
22722};
22723}
22724},
22725accept:function accept(file,done){
22726return done();
22727},
22728chunksUploaded:function chunksUploaded(file,done){
22729done();
22730},
22731fallback:function fallback(){
22732var messageElement=void 0;
22733this.element.className=this.element.className+" dz-browser-not-supported";
22734for(var _iterator2=this.element.getElementsByTagName("div"),_isArray2=true,_i2=0,_iterator2=_isArray2?_iterator2:_iterator2[Symbol.iterator]();;){
22735var _ref2;
22736if(_isArray2){
22737if(_i2>=_iterator2.length)break;
22738_ref2=_iterator2[_i2++];
22739}else{
22740_i2=_iterator2.next();
22741if(_i2.done)break;
22742_ref2=_i2.value;
22743}
22744var child=_ref2;
22745if(/(^| )dz-message($| )/.test(child.className)){
22746messageElement=child;
22747child.className="dz-message";
22748break;
22749}
22750}
22751if(!messageElement){
22752messageElement=Dropzone.createElement("<div class=\"dz-message\"><span></span></div>");
22753this.element.appendChild(messageElement);
22754}
22755var span=messageElement.getElementsByTagName("span")[0];
22756if(span){
22757if(span.textContent!=null){
22758span.textContent=this.options.dictFallbackMessage;
22759}else if(span.innerText!=null){
22760span.innerText=this.options.dictFallbackMessage;
22761}
22762}
22763return this.element.appendChild(this.getFallbackForm());
22764},
22765resize:function resize(file,width,height,resizeMethod){
22766var info={
22767srcX:0,
22768srcY:0,
22769srcWidth:file.width,
22770srcHeight:file.height
22771};
22772var srcRatio=file.width/file.height;
22773if(width==null&&height==null){
22774width=info.srcWidth;
22775height=info.srcHeight;
22776}else if(width==null){
22777width=height*srcRatio;
22778}else if(height==null){
22779height=width/srcRatio;
22780}
22781width=Math.min(width,info.srcWidth);
22782height=Math.min(height,info.srcHeight);
22783var trgRatio=width/height;
22784if(info.srcWidth>width||info.srcHeight>height){
22785if(resizeMethod==='crop'){
22786if(srcRatio>trgRatio){
22787info.srcHeight=file.height;
22788info.srcWidth=info.srcHeight*trgRatio;
22789}else{
22790info.srcWidth=file.width;
22791info.srcHeight=info.srcWidth/trgRatio;
22792}
22793}else if(resizeMethod==='contain'){
22794if(srcRatio>trgRatio){
22795height=width/srcRatio;
22796}else{
22797width=height*srcRatio;
22798}
22799}else{
22800throw new Error("Unknown resizeMethod '"+resizeMethod+"'");
22801}
22802}
22803info.srcX=(file.width-info.srcWidth)/2;
22804info.srcY=(file.height-info.srcHeight)/2;
22805info.trgWidth=width;
22806info.trgHeight=height;
22807return info;
22808},
22809transformFile:function transformFile(file,done){
22810if((this.options.resizeWidth||this.options.resizeHeight)&&file.type.match(/image.*/)){
22811return this.resizeImage(file,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,done);
22812}else{
22813return done(file);
22814}
22815},
22816previewTemplate:"<div class=\"dz-preview dz-file-preview\">\n  <div class=\"dz-image\"><img data-dz-thumbnail /></div>\n  <div class=\"dz-details\">\n    <div class=\"dz-size\"><span data-dz-size></span></div>\n    <div class=\"dz-filename\"><span data-dz-name></span></div>\n  </div>\n  <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n  <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n  <div class=\"dz-success-mark\">\n    <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n      <title>Check</title>\n      <defs></defs>\n      <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n        <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\" sketch:type=\"MSShapeGroup\"></path>\n      </g>\n    </svg>\n  </div>\n  <div class=\"dz-error-mark\">\n    <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n      <title>Error</title>\n      <defs></defs>\n      <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n        <g id=\"Check-+-Oval-2\" sketch:type=\"MSLayerGroup\" stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\">\n          <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" sketch:type=\"MSShapeGroup\"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>",
22817drop:function drop(e){
22818return this.element.classList.remove("dz-drag-hover");
22819},
22820dragstart:function dragstart(e){},
22821dragend:function dragend(e){
22822return this.element.classList.remove("dz-drag-hover");
22823},
22824dragenter:function dragenter(e){
22825return this.element.classList.add("dz-drag-hover");
22826},
22827dragover:function dragover(e){
22828return this.element.classList.add("dz-drag-hover");
22829},
22830dragleave:function dragleave(e){
22831return this.element.classList.remove("dz-drag-hover");
22832},
22833paste:function paste(e){},
22834reset:function reset(){
22835return this.element.classList.remove("dz-started");
22836},
22837addedfile:function addedfile(file){
22838var _this2=this;
22839if(this.element===this.previewsContainer){
22840this.element.classList.add("dz-started");
22841}
22842if(this.previewsContainer){
22843file.previewElement=Dropzone.createElement(this.options.previewTemplate.trim());
22844file.previewTemplate=file.previewElement;
22845this.previewsContainer.appendChild(file.previewElement);
22846for(var _iterator3=file.previewElement.querySelectorAll("[data-dz-name]"),_isArray3=true,_i3=0,_iterator3=_isArray3?_iterator3:_iterator3[Symbol.iterator]();;){
22847var _ref3;
22848if(_isArray3){
22849if(_i3>=_iterator3.length)break;
22850_ref3=_iterator3[_i3++];
22851}else{
22852_i3=_iterator3.next();
22853if(_i3.done)break;
22854_ref3=_i3.value;
22855}
22856var node=_ref3;
22857node.textContent=file.name;
22858}
22859for(var _iterator4=file.previewElement.querySelectorAll("[data-dz-size]"),_isArray4=true,_i4=0,_iterator4=_isArray4?_iterator4:_iterator4[Symbol.iterator]();;){
22860if(_isArray4){
22861if(_i4>=_iterator4.length)break;
22862node=_iterator4[_i4++];
22863}else{
22864_i4=_iterator4.next();
22865if(_i4.done)break;
22866node=_i4.value;
22867}
22868node.innerHTML=this.filesize(file.size);
22869}
22870if(this.options.addRemoveLinks){
22871file._removeLink=Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>"+this.options.dictRemoveFile+"</a>");
22872file.previewElement.appendChild(file._removeLink);
22873}
22874var removeFileEvent=function removeFileEvent(e){
22875e.preventDefault();
22876e.stopPropagation();
22877if(file.status===Dropzone.UPLOADING){
22878return Dropzone.confirm(_this2.options.dictCancelUploadConfirmation,function(){
22879return _this2.removeFile(file);
22880});
22881}else{
22882if(_this2.options.dictRemoveFileConfirmation){
22883return Dropzone.confirm(_this2.options.dictRemoveFileConfirmation,function(){
22884return _this2.removeFile(file);
22885});
22886}else{
22887return _this2.removeFile(file);
22888}
22889}
22890};
22891for(var _iterator5=file.previewElement.querySelectorAll("[data-dz-remove]"),_isArray5=true,_i5=0,_iterator5=_isArray5?_iterator5:_iterator5[Symbol.iterator]();;){
22892var _ref4;
22893if(_isArray5){
22894if(_i5>
22894=_iterator5.length)break;
22895_ref4=_iterator5[_i5++];
22896}else{
22897_i5=_iterator5.next();
22898if(_i5.done)break;
22899_ref4=_i5.value;
22900}
22901var removeLink=_ref4;
22902removeLink.addEventListener("click",removeFileEvent);
22903}
22904}
22905},
22906removedfile:function removedfile(file){
22907if(file.previewElement!=null&&file.previewElement.parentNode!=null){
22908file.previewElement.parentNode.removeChild(file.previewElement);
22909}
22910return this._updateMaxFilesReachedClass();
22911},
22912thumbnail:function thumbnail(file,dataUrl){
22913if(file.previewElement){
22914file.previewElement.classList.remove("dz-file-preview");
22915for(var _iterator6=file.previewElement.querySelectorAll("[data-dz-thumbnail]"),_isArray6=true,_i6=0,_iterator6=_isArray6?_iterator6:_iterator6[Symbol.iterator]();;){
22916var _ref5;
22917if(_isArray6){
22918if(_i6>=_iterator6.length)break;
22919_ref5=_iterator6[_i6++];
22920}else{
22921_i6=_iterator6.next();
22922if(_i6.done)break;
22923_ref5=_i6.value;
22924}
22925var thumbnailElement=_ref5;
22926thumbnailElement.alt=file.name;
22927thumbnailElement.src=dataUrl;
22928}
22929return setTimeout(function(){
22930return file.previewElement.classList.add("dz-image-preview");
22931},1);
22932}
22933},
22934error:function error(file,message){
22935if(file.previewElement){
22936file.previewElement.classList.add("dz-error");
22937if(typeof message!=="String"&&message.error){
22938message=message.error;
22939}
22940for(var _iterator7=file.previewElement.querySelectorAll("[data-dz-errormessage]"),_isArray7=true,_i7=0,_iterator7=_isArray7?_iterator7:_iterator7[Symbol.iterator]();;){
22941var _ref6;
22942if(_isArray7){
22943if(_i7>=_iterator7.length)break;
22944_ref6=_iterator7[_i7++];
22945}else{
22946_i7=_iterator7.next();
22947if(_i7.done)break;
22948_ref6=_i7.value;
22949}
22950var node=_ref6;
22951node.textContent=message;
22952}
22953}
22954},
22955errormultiple:function errormultiple(){},
22956processing:function processing(file){
22957if(file.previewElement){
22958file.previewElement.classList.add("dz-processing");
22959if(file._removeLink){
22960return file._removeLink.innerHTML=this.options.dictCancelUpload;
22961}
22962}
22963},
22964processingmultiple:function processingmultiple(){},
22965uploadprogress:function uploadprogress(file,progress,bytesSent){
22966if(file.previewElement){
22967for(var _iterator8=file.previewElement.querySelectorAll("[data-dz-uploadprogress]"),_isArray8=true,_i8=0,_iterator8=_isArray8?_iterator8:_iterator8[Symbol.iterator]();;){
22968var _ref7;
22969if(_isArray8){
22970if(_i8>=_iterator8.length)break;
22971_ref7=_iterator8[_i8++];
22972}else{
22973_i8=_iterator8.next();
22974if(_i8.done)break;
22975_ref7=_i8.value;
22976}
22977var node=_ref7;
22978node.nodeName==='PROGRESS'?node.value=progress:node.style.width=progress+"%";
22979}
22980}
22981},
22982totaluploadprogress:function totaluploadprogress(){},
22983sending:function sending(){},
22984sendingmultiple:function sendingmultiple(){},
22985success:function success(file){
22986if(file.previewElement){
22987return file.previewElement.classList.add("dz-success");
22988}
22989},
22990successmultiple:function successmultiple(){},
22991canceled:function canceled(file){
22992return this.emit("error",file,this.options.dictUploadCanceled);
22993},
22994canceledmultiple:function canceledmultiple(){},
22995complete:function complete(file){
22996if(file._removeLink){
22997file._removeLink.innerHTML=this.options.dictRemoveFile;
22998}
22999if(file.previewElement){
23000return file.previewElement.classList.add("dz-complete");
23001}
23002},
23003completemultiple:function completemultiple(){},
23004maxfilesexceeded:function maxfilesexceeded(){},
23005maxfilesreached:function maxfilesreached(){},
23006queuecomplete:function queuecomplete(){},
23007addedfiles:function addedfiles(){}
23008};
23009this.prototype._thumbnailQueue=[];
23010this.prototype._processingThumbnail=false;
23011}
23012},{
23013key:"extend",
23014value:function extend(target){
23015for(var _len2=arguments.length,objects=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){
23016objects[_key2-1]=arguments[_key2];
23017}
23018for(var _iterator9=objects,_isArray9=true,_i9=0,_iterator9=_isArray9?_iterator9:_iterator9[Symbol.iterator]();;){
23019var _ref8;
23020if(_isArray9){
23021if(_i9>=_iterator9.length)break;
23022_ref8=_iterator9[_i9++];
23023}else{
23024_i9=_iterator9.next();
23025if(_i9.done)break;
23026_ref8=_i9.value;
23027}
23028var object=_ref8;
23029for(var key in object){
23030var val=object[key];
23031target[key]=val;
23032}
23033}
23034return target;
23035}
23036}]);
23037function Dropzone(el,options){
23038_classCallCheck(this,Dropzone);
23039var _this=_possibleConstructorReturn(this,(Dropzone.__proto__||Object.getPrototypeOf(Dropzone)).call(this));
23040var fallback=void 0,
23041left=void 0;
23042_this.element=el;
23043_this.version=Dropzone.version;
23044_this.defaultOptions.previewTemplate=_this.defaultOptions.previewTemplate.replace(/\n*/g,"");
23045_this.clickableElements=[];
23046_this.listeners=[];
23047_this.files=[];
23048if(typeof _this.element==="string"){
23049_this.element=document.querySelector(_this.element);
23050}
23051if(!_this.element||_this.element.nodeType==null){
23052throw new Error("Invalid dropzone element.");
23053}
23054if(_this.element.dropzone){
23055throw new Error("Dropzone already attached.");
23056}
23057Dropzone.instances.push(_this);
23058_this.element.dropzone=_this;
23059var elementOptions=(left=Dropzone.optionsForElement(_this.element))!=null?left:{};
23060_this.options=Dropzone.extend({},_this.defaultOptions,elementOptions,options!=null?options:{});
23061if(_this.options.forceFallback||!Dropzone.isBrowserSupported()){
23062var _ret;
23063return _ret=_this.options.fallback.call(_this),_possibleConstructorReturn(_this,_ret);
23064}
23065if(_this.options.url==null){
23066_this.options.url=_this.element.getAttribute("action");
23067}
23068if(!_this.options.url){
23069throw new Error("No URL provided.");
23070}
23071if(_this.options.acceptedFiles&&_this.options.acceptedMimeTypes){
23072throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
23073}
23074if(_this.options.uploadMultiple&&_this.options.chunking){
23075throw new Error('You cannot set both: uploadMultiple and chunking.');
23076}
23077if(_this.options.acceptedMimeTypes){
23078_this.options.acceptedFiles=_this.options.acceptedMimeTypes;
23079delete _this.options.acceptedMimeTypes;
23080}
23081if(_this.options.renameFilename!=null){
23082_this.options.renameFile=function(file){
23083return _this.options.renameFilename.call(_this,file.name,file);
23084};
23085}
23086_this.options.method=_this.options.method.toUpperCase();
23087if((fallback=_this.getExistingFallback())&&fallback.parentNode){
23088fallback.parentNode.removeChild(fallback);
23089}
23090if(_this.options.previewsContainer!==false){
23091if(_this.options.previewsContainer){
23092_this.previewsContainer=Dropzone.getElement(_this.options.previewsContainer,"previewsContainer");
23093}else{
23094_this.previewsContainer=_this.element;
23095}
23096}
23097if(_this.options.clickable){
23098if(_this.options.clickable===true){
23099_this.clickableElements=[_this.element];
23100}else{
23101_this.clickableElements=Dropzone.getElements(_this.options.clickable,"clickable");
23102}
23103}
23104_this.init();
23105return _this;
23106}
23107_createClass(Dropzone,[{
23108key:"getAcceptedFiles",
23109value:function getAcceptedFiles(){
23110return this.files.filter(function(file){
23111return file.accepted;
23112}).map(function(file){
23113return file;
23114});
23115}
23116},{
23117key:"getRejectedFiles",
23118value:function getRejectedFiles(){
23119return this.files.filter(function(file){
23120return!file.accepted;
23121}).map(function(file){
23122return file;
23123});
23124}
23125},{
23126key:"getFilesWithStatus",
23127value:function getFilesWithStatus(status){
23128return this.files.filter(function(file){
23129return file.status===status;
23130}).map(function(file){
23131return file;
23132});
23133}
23134},{
23135key:"getQueuedFiles",
23136value:function getQueuedFiles(){
23137return this.getFilesWithStatus(Dropzone.QUEUED);
23138}
23139},{
23140key:"getUploadingFiles",
23141value:function getUploadingFiles(){
23142return this.getFilesWithStatus(Dropzone.UPLOADING);
23143}
23144},{
23145key:"getAddedFiles",
23146value:function getAddedFiles(){
23147return this.getFilesWithStatus(Dropzone.ADDED);
23148}
23149},{
23150key:"getActiveFiles",
23151value:function getActiveFiles(){
23152return this.files.filter(function(file){
23153return file.status===Dropzone.UPLOADING||file.status===Dropzone.QUEUED;
23154}).map(function(file){
23155return file;
23156});
23157}
23158},{
23159key:"init",
23160value:function init(){
23161var _this3=this;
23162if(this.element.tagName==="form"){
23163this.element.setAttribute("enctype","multipart/form-data");
23164}
23165if(this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")){
23166this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><span>"+this.options.dictDefaultMessage+"</span></div>"));
23167}
23168if(this.clickableElements.length){
23169var setupHiddenFileInput=function setupHiddenFileInput(){
23170if(_this3.hiddenFileInput){
23171_this3.hiddenFileInput.parentNode.removeChild(_this3.hiddenFileInput);
23172}
23173_this3.hiddenFileInput=document.createElement("input");
23174_this3.hiddenFileInput.setAttribute("type","file");
23175if(_this3.options.maxFiles===null||_this3.options.maxFiles>1){
23176_this3.hiddenFileInput.setAttribute("multiple","multiple");
23177}
23178_this3.hiddenFileInput.className="dz-hidden-input";
23179if(_this3.options.acceptedFiles!==null){
23180_this3.hiddenFileInput.setAttribute("accept",_this3.options.acceptedFiles);
23181}
23182if(_this3.options.capture!==null){
23183_this3.hiddenFileInput.setAttribute("capture",_this3.options.capture);
23184}
23185_this3.hiddenFileInput.style.visibility="hidden";
23186_this3.hiddenFileInput.style.position="absolute";
23187_this3.hiddenFileInput.style.top="0";
23188_this3.hiddenFileInput.style.left="0";
23189_this3.hiddenFileInput.style.height="0";
23190_this3.hiddenFileInput.style.width="0";
23191Dropzone.getElement(_this3.options.hiddenInputContainer,'hiddenInputContainer').appendChild(_this3.hiddenFileInput);
23192return _this3.hiddenFileInput.addEventListener("change",function(){
23193var files=_this3.hiddenFileInput.files;
23194if(files.length){
23195for(var _iterator10=files,_isArray10=true,_i10=0,_iterator10=_isArray10?_iterator10:_iterator10[Symbol.iterator]();;){
23196var _ref9;
23197if(_isArray10){
23198if(_i10>=_iterator10.length)break;
23199_ref9=_iterator10[_i10++];
23200}else{
23201_i10=_iterator10.next();
23202if(_i10.done)break;
23203_ref9=_i10.value;
23204}
23205var file=_ref9;
23206_this3.addFile(file);
23207}
23208}
23209_this3.emit("addedfiles",files);
23210return setupHiddenFileInput();
23211});
23212};
23213setupHiddenFileInput();
23214}
23215this.URL=window.URL!==null?window.URL:window.webkitURL;
23216for(var _iterator11=this.events,_isArray11=true,_i11=0,_iterator11=_isArray11?_iterator11:_iterator11[Symbol.iterator]();;){
23217var _ref10;
23218if(_isArray11){
23219if(_i11>=_iterator11.length)break;
23220_ref10=_iterator11[_i11++];
23221}else{
23222_i11=_iterator11.next();
23223if(_i11.done)break;
23224_ref10=_i11.value;
23225}
23226var eventName=_ref10;
23227this.on(eventName,this.options[eventName]);
23228}
23229this.on("uploadprogress",function(){
23230return _this3.updateTotalUploadProgress();
23231});
23232this.on("removedfile",function(){
23233return _this3.updateTotalUploadProgress();
23234});
23235this.on("canceled",function(file){
23236return _this3.emit("complete",file);
23237});
23238this.on("complete",function(file){
23239if(_this3.getAddedFiles().length===0&&_this3.getUploadingFiles().length===0&&_this3.getQueuedFiles().length===0){
23240return setTimeout(function(){
23241return _this3.emit("queuecomplete");
23242},0);
23243}
23244});
23245var noPropagation=function noPropagation(e){
23246e.stopPropagation();
23247if(e.preventDefault){
23248return e.preventDefault();
23249}else{
23250return e.returnValue=false;
23251}
23252};
23253this.listeners=[{
23254element:this.element,
23255events:{
23256"dragstart":function dragstart(e){
23257return _this3.emit("dragstart",e);
23258},
23259"dragenter":function dragenter(e){
23260noPropagation(e);
23261return _this3.emit("dragenter",e);
23262},
23263"dragover":function dragover(e){
23264var efct=void 0;
23265try{
23266efct=e.dataTransfer.effectAllowed;
23267}catch(error){}
23268e.dataTransfer.dropEffect='move'===efct||'linkMove'===efct?'move':'copy';
23269noPropagation(e);
23270return _this3.emit("dragover",e);
23271},
23272"dragleave":function dragleave(e){
23273return _this3.emit("dragleave",e);
23274},
23275"drop":function drop(e){
23276noPropagation(e);
23277return _this3.drop(e);
23278},
23279"dragend":function dragend(e){
23280return _this3.emit("dragend",e);
23281}
23282}}];
23283this.clickableElements.forEach(function(clickableElement){
23284return _this3.listeners.push({
23285element:clickableElement,
23286events:{
23287"click":function click(evt){
23288if(clickableElement!==_this3.element||evt.target===_this3.element||Dropzone.elementInside(evt.target,_this3.element.querySelector(".dz-message"))){
23289_this3.hiddenFileInput.click();
23290}
23291return true;
23292}
23293}
23294});
23295});
23296this.enable();
23297return this.options.init.call(this);
23298}
23299},{
23300key:"destroy",
23301value:function destroy(){
23302this.disable();
23303this.removeAllFiles(true);
23304if(this.hiddenFileInput!=null?this.hiddenFileInput.parentNode:undefined){
23305this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
23306this.hiddenFileInput=null;
23307}
23308delete this.element.dropzone;
23309return Dropzone.instances.splice(Dropzone.instances.indexOf(this),1);
23310}
23311},{
23312key:"updateTotalUploadProgress",
23313value:function updateTotalUploadProgress(){
23314var totalUploadProgress=void 0;
23315var totalBytesSent=0;
23316var totalBytes=0;
23317var activeFiles=this.getActiveFiles();
23318if(activeFiles.length){
23319for(var _iterator12=this.getActiveFiles(),_isArray12=true,_i12=0,_iterator12=_isArray12?_iterator12:_iterator12[Symbol.iterator]();;){
23320var _ref11;
23321if(_isArray12){
23322if(_i12>=_iterator12.length)break;
23323_ref11=_iterator12[_i12++];
23324}else{
23325_i12=_iterator12.next();
23326if(_i12.done)break;
23327_ref11=_i12.value;
23328}
23329var file=_ref11;
23330totalBytesSent+=file.upload.bytesSent;
23331totalBytes+=file.upload.total;
23332}
23333totalUploadProgress=100*totalBytesSent/totalBytes;
23334}else{
23335totalUploadProgress=100;
23336}
23337return this.emit("totaluploadprogress",totalUploadProgress,totalBytes,totalBytesSent);
23338}
23339},{
23340key:"_getParamName",
23341value:function _getParamName(n){
23342if(typeof this.options.paramName==="function"){
23343return this.options.paramName(n);
23344}else{
23345return""+this.options.paramName+(this.options.uploadMultiple?"["+n+"]":"");
23346}
23347}
23348},{
23349key:"_renameFile",
23350value:function _renameFile(file){
23351if(typeof this.options.renameFile!=="function"){
23352return file.name;
23353}
23354return this.options.renameFile(file);
23355}
23356},{
23357key:"getFallbackForm",
23358value:function getFallbackForm(){
23359var existingFallback=void 0,
23360form=void 0;
23361if(existingFallback=this.getExistingFallback()){
23362return existingFallback;
23363}
23364var fieldsString="<div class=\"dz-fallback\">";
23365if(this.options.dictFallbackText){
23366fieldsString+="<p>"+this.options.dictFallbackText+"</p>";
23367}
23368fieldsString+="<input type=\"file\" name=\""+this._getParamName(0)+"\" "+(this.options.uploadMultiple?'multiple="multiple"':undefined)+" /><input type=\"submit\" value=\"Upload!\"></div>";
23369var fields=Dropzone.createElement(fieldsString);
23370if(this.element.tagName!=="FORM"){
23371form=Dropzone.createElement("<form action=\""+this.options.url+"\" enctype=\"multipart/form-data\" method=\""+this.options.method+"\"></form>");
23372form.appendChild(fields);
23373}else{
23374this.element.setAttribute("enctype","multipart/form-data");
23375this.element.setAttribute("method",this.options.method);
23376}
23377return form!=null?form:fields;
23378}
23379},{
23380key:"getExistingFallback",
23381value:function getExistingFallback(){
23382var getFallback=function getFallback(elements){
23383for(var _iterator13=elements,_isArray13=true,_i13=0,_iterator13=_isArray13?_iterator13:_iterator13[Symbol.iterator]();;){
23384var _ref12;
23385if(_isArray13){
23386if(_i13>=_iterator13.length)break;
23387_ref12=_iterator13[_i13++];
23388}else{
23389_i13=_iterator13.next();
23390if(_i13.done)break;
23391_ref12=_i13.value;
23392}
23393var el=_ref12;
23394if(/(^| )fallback($| )/.test(el.className)){
23395return el;
23396}
23397}
23398};
23399var _arr=["div","form"];
23400for(var _i14=0;_i14<_arr.length;_i14++){
23401var tagName=_arr[_i14];
23402var fallback;
23403if(fallback=getFallback(this.element.getElementsByTagName(tagName))){
23404return fallback;
23405}
23406}
23407}
23408},{
23409key:"setupEventListeners",
23410value:function setupEventListeners(){
23411return this.listeners.map(function(elementListeners){
23412return function(){
23413var result=[];
23414for(var event in elementListeners.events){
23415var listener=elementListeners.events[event];
23416result.push(elementListeners.element.addEventListener(event,listener,false));
23417}
23418return result;
23419}();
23420});
23421}
23422},{
23423key:"removeEventListeners",
23424value:function removeEventListeners(){
23425return this.listeners.map(function(elementListeners){
23426return function(){
23427var result=[];
23428for(var event in elementListeners.events){
23429var listener=elementListeners.events[event];
23430result.push(elementListeners.element.removeEventListener(event,listener,false));
23431}
23432return result;
23433}();
23434});
23435}
23436},{
23437key:"disable",
23438value:function disable(){
23439var _this4=this;
23440this.clickableElements.forEach(function(element){
23441return element.classList.remove("dz-clickable");
23442});
23443this.removeEventListeners();
23444this.disabled=true;
23445return this.files.map(function(file){
23446return _this4.cancelUpload(file);
23447});
23448}
23449},{
23450key:"enable",
23451value:function enable(){
23452delete this.disabled;
23453this.clickableElements.forEach(function(element){
23454return element.classList.add("dz-clickable");
23455});
23456return this.setupEventListeners();
23457}
23458},{
23459key:"filesize",
23460value:function filesize(size){
23461var selectedSize=0;
23462var selectedUnit="b";
23463if(size>0){
23464var units=['tb','gb','mb','kb','b'];
23465for(var i=0;i<units.length;i++){
23466var unit=units[i];
23467var cutoff=Math.pow(this.options.filesizeBase,4-i)/10;
23468if(size>=cutoff){
23469selectedSize=size/Math.pow(this.options.filesizeBase,4-i);
23470selectedUnit=unit;
23471break;
23472}
23473}
23474selectedSize=Math.round(10*selectedSize)/10;
23475}
23476return"<strong>"+selectedSize+"</strong> "+this.options.dictFileSizeUnits[selectedUnit];
23477}
23478},{
23479key:"_updateMaxFilesReachedClass",
23480value:function _updateMaxFilesReachedClass(){
23481if(this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles){
23482if(this.getAcceptedFiles().length===this.options.maxFiles){
23483this.emit('maxfilesreached',this.files);
23484}
23485return this.element.classList.add("dz-max-files-reached");
23486}else{
23487return this.element.classList.remove("dz-max-files-reached");
23488}
23489}
23490},{
23491key:"drop",
23492value:function drop(e){
23493if(!e.dataTransfer){
23494return;
23495}
23496this.emit("drop",e);
23497var files=[];
23498for(var i=0;i<e.dataTransfer.files.length;i++){
23499files[i]=e.dataTransfer.files[i];
23500}
23501this.emit("addedfiles",files);
23502if(files.length){
23503var items=e.dataTransfer.items;
23504if(items&&items.length&&items[0].webkitGetAsEntry!=null){
23505this._addFilesFromItems(items);
23506}else{
23507this.handleFiles(files);
23508}
23509}
23510}
23511},{
23512key:"paste",
23513value:function paste(e){
23514if(__guard__(e!=null?e.clipboardData:undefined,function(x){
23515return x.items;
23516})==null){
23517return;
23518}
23519this.emit("paste",e);
23520var items=e.clipboardData.items;
23521if(items.length){
23522return this._addFilesFromItems(items);
23523}
23524}
23525},{
23526key:"handleFiles",
23527value:function handleFiles(files){
23528for(var _iterator14=files,_isArray14=true,_i15=0,_iterator14=_isArray14?_iterator14:_iterator14[Symbol.iterator]();;){
23529var _ref13;
23530if(_isArray14){
23531if(_i15>=_iterator14.length)break;
23532_ref13=_iterator14[_i15++];
23533}else{
23534_i15=_iterator14.next();
23535if(_i15.done)break;
23536_ref13=_i15.value;
23537}
23538var file=_ref13;
23539this.addFile(file);
23540}
23541}
23542},{
23543key:"_addFilesFromItems",
23544value:function _addFilesFromItems(items){
23545var _this5=this;
23546return function(){
23547var result=[];
23548for(var _iterator15=items,_isArray15=true,_i16=0,_iterator15=_isArray15?_iterator15:_iterator15[Symbol.iterator]();;){
23549var _ref14;
23550if(_isArray15){
23551if(_i16>=_iterator15.length)break;
23552_ref14=_iterator15[_i16++];
23553}else{
23554_i16=_iterator15.next();
23555if(_i16.done)break;
23556_ref14=_i16.value;
23557}
23558var item=_ref14;
23559var entry;
23560if(item.webkitGetAsEntry!=null&&(entry=item.webkitGetAsEntry())){
23561if(entry.isFile){
23562result.push(_this5.addFile(item.getAsFile()));
23563}else if(entry.isDirectory){
23564result.push(_this5._addFilesFromDirectory(entry,entry.name));
23565}else{
23566result.push(undefined);
23567}
23568}else if(item.getAsFile!=null){
23569if(item.kind==null||item.kind==="file"){
23570result.push(_this5.addFile(item.getAsFile()));
23571}else{
23572result.push(undefined);
23573}
23574}else{
23575result.push(undefined);
23576}
23577}
23578return result;
23579}();
23580}
23581},{
23582key:"_addFilesFromDirectory",
23583value:function _addFilesFromDirectory(directory,path){
23584var _this6=this;
23585var dirReader=directory.createReader();
23586var errorHandler=function errorHandler(error){
23587return __guardMethod__(console,'log',function(o){
23588return o.log(error);
23589});
23590};
23591var readEntries=function readEntries(){
23592return dirReader.readEntries(function(entries){
23593if(entries.length>0){
23594for(var _iterator16=entries,_isArray16=true,_i17=0,_iterator16=_isArray16?_iterator16:_iterator16[Symbol.iterator]();;){
23595var _ref15;
23596if(_isArray16){
23597if(_i17>=_iterator16.length)break;
23598_ref15=_iterator16[_i17++];
23599}else{
23600_i17=_iterator16.next();
23601if(_i17.done)break;
23602_ref15=_i17.value;
23603}
23604var entry=_ref15;
23605if(entry.isFile){
23606entry.file(function(file){
23607if(_this6.options.ignoreHiddenFiles&&file.name.substring(0,1)==='.'){
23608return;
23609}
23610file.fullPath=path+"/"+file.name;
23611return _this6.addFile(file);
23612});
23613}else if(entry.isDirectory){
23614_this6._addFilesFromDirectory(entry,path+"/"+entry.name);
23615}
23616}
23617readEntries();
23618}
23619return null;
23620},errorHandler);
23621};
23622return readEntries();
23623}
23624},{
23625key:"accept",
23626value:function accept(file,done){
23627if(this.options.maxFilesize&&file.size>this.options.maxFilesize*1024*1024){
23628return done(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(file.size/1024/ 10.24) /100).replace("{{maxFilesize}}",this.options.maxFilesize));
23629}else if(!Dropzone.isValidFile(file,this.options.acceptedFiles)){
23630return done(this.options.dictInvalidFileType);
23631}else if(this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles){
23632done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles));
23633return this.emit("maxfilesexceeded",file);
23634}else{
23635return this.options.accept.call(this,file,done);
23636}
23637}
23638},{
23639key:"addFile",
23640value:function addFile(file){
23641var _this7=this;
23642file.upload={
23643uuid:Dropzone.uuidv4(),
23644progress:0,
23645total:file.size,
23646bytesSent:0,
23647filename:this._renameFile(file),
23648chunked:this.options.chunking&&(this.options.forceChunking||file.size>this.options.chunkSize),
23649totalChunkCount:Math.ceil(file.size/this.options.chunkSize)
23650};
23651this.files.push(file);
23652file.status=Dropzone.ADDED;
23653this.emit("addedfile",file);
23654this._enqueueThumbnail(file);
23655return this.accept(file,function(error){
23656if(error){
23657file.accepted=false;
23658_this7._errorProcessing([file],error);
23659}else{
23660file.accepted=true;
23661if(_this7.options.autoQueue){
23662_this7.enqueueFile(file);
23663}
23664}
23665return _this7._updateMaxFilesReachedClass();
23666});
23667}
23668},{
23669key:"enqueueFiles",
23670value:function enqueueFiles(files){
23671for(var _iterator17=files,_isArray17=true,_i18=0,_iterator17=_isArray17?_iterator17:_iterator17[Symbol.iterator]();;){
23672var _ref16;
23673if(_isArray17){
23674if(_i18>=_iterator17.length)break;
23675_ref16=_iterator17[_i18++];
23676}else{
23677_i18=_iterator17.next();
23678if(_i18.done)break;
23679_ref16=_i18.value;
23680}
23681var file=_ref16;
23682this.enqueueFile(file);
23683}
23684return null;
23685}
23686},{
23687key:"enqueueFile",
23688value:function enqueueFile(file){
23689var _this8=this;
23690if(file.status===Dropzone.ADDED&&file.accepted===true){
23691file.status=Dropzone.QUEUED;
23692if(this.options.autoProcessQueue){
23693return setTimeout(function(){
23694return _this8.processQueue();
23695},0);
23696}
23697}else{
23698throw new Error("This file can't be queued because it has already been processed or was rejected.");
23699}
23700}
23701},{
23702key:"_enqueueThumbnail",
23703value:function _enqueueThumbnail(file){
23704var _this9=this;
23705if(this.options.createImageThumbnails&&file.type.match(/image.*/)&&file.size<=this.options.maxThumbnailFilesize*1024*1024){
23706this._thumbnailQueue.push(file);
23707return setTimeout(function(){
23708return _this9._processThumbnailQueue();
23709},0);
23710}
23711}
23712},{
23713key:"_processThumbnailQueue",
23714value:function _processThumbnailQueue(){
23715var _this10=this;
23716if(this._processingThumbnail||this._thumbnailQueue.length===0){
23717return;
23718}
23719this._processingThumbnail=true;
23720var file=this._thumbnailQueue.shift();
23721return this.createThumbnail(file,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,true,function(dataUrl){
23722_this10.emit("thumbnail",file,dataUrl);
23723_this10._processingThumbnail=false;
23724return _this10._processThumbnailQueue();
23725});
23726}
23727},{
23728key:"removeFile",
23729value:function removeFile(file){
23730if(file.status===Dropzone.UPLOADING){
23731this.cancelUpload(file);
23732}
23733this.files=without(this.files,file);
23734this.emit("removedfile",file);
23735if(this.files.length===0){
23736return this.emit("reset");
23737}
23738}
23739},{
23740key:"removeAllFiles",
23741value:function removeAllFiles(cancelIfNecessary){
23742if(cancelIfNecessary==null){
23743cancelIfNecessary=false;
23744}
23745for(var _iterator18=this.files.slice(),_isArray18=true,_i19=0,_iterator18=_isArray18?_iterator18:_iterator18[Symbol.iterator]();;){
23746var _ref17;
23747if(_isArray18){
23748if(_i19>=_iterator18.length)break;
23749_ref17=_iterator18[_i19++];
23750}else{
23751_i19=_iterator18.next();
23752if(_i19.done)break;
23753_ref17=_i19.value;
23754}
23755var file=_ref17;
23756if(file.status!==Dropzone.UPLOADING||cancelIfNecessary){
23757this.removeFile(file);
23758}
23759}
23760return null;
23761}
23762},{
23763key:"resizeImage",
23764value:function resizeImage(file,width,height,resizeMethod,callback){
23765var _this11=this;
23766return this.createThumbnail(file,width,height,resizeMethod,true,function(dataUrl,canvas){
23767if(canvas==null){
23768return callback(file);
23769}else{
23770var resizeMimeType=_this11.options.resizeMimeType;
23771if(resizeMimeType==null){
23772resizeMimeType=file.type;
23773}
23774var resizedDataURL=canvas.toDataURL(resizeMimeType,_this11.options.resizeQuality);
23775if(resizeMimeType==='image/jpeg'||resizeMimeType==='image/jpg'){
23776resizedDataURL=ExifRestore.restore(file.dataURL,resizedDataURL);
23777}
23778return callback(Dropzone.dataURItoBlob(resizedDataURL));
23779}
23780});
23781}
23782},{
23783key:"createThumbnail",
23784value:function createThumbnail(file,width,height,resizeMethod,fixOrientation,callback){
23785var _this12=this;
23786var fileReader=new FileReader();
23787fileReader.onload=function(){
23788file.dataURL=fileReader.result;
23789if(file.type==="image/svg+xml"){
23790if(callback!=null){
23791callback(fileReader.result);
23792}
23793return;
23794}
23795return _this12.createThumbnailFromUrl(file,width,height,resizeMethod,fixOrientation,callback);
23796};
23797return fileReader.readAsDataURL(file);
23798}
23799},{
23800key:"createThumbnailFromUrl",
23801value:function createThumbnailFromUrl(file,width,height,resizeMethod,fixOrientation,callback,crossOrigin){
23802var _this13=this;
23803var img=document.createElement("img");
23804if(crossOrigin){
23805img.crossOrigin=crossOrigin;
23806}
23807img.onload=function(){
23808var loadExif=function loadExif(callback){
23809return callback(1);
23810};
23811if(typeof EXIF!=='undefined'&&EXIF!==null&&fixOrientation){
23812loadExif=function loadExif(callback){
23813return EXIF.getData(img,function(){
23814return callback(EXIF.getTag(this,'Orientation'));
23815});
23816};
23817}
23818return loadExif(function(orientation){
23819file.width=img.width;
23820file.height=img.height;
23821var resizeInfo=_this13.options.resize.call(_this13,file,width,height,resizeMethod);
23822var canvas=document.createElement("canvas");
23823var ctx=canvas.getContext("2d");
23824canvas.width=resizeInfo.trgWidth;
23825canvas.height=resizeInfo.trgHeight;
23826if(orientation>4){
23827canvas.width=resizeInfo.trgHeight;
23828canvas.height=resizeInfo.trgWidth;
23829}
23830switch(orientation){
23831case 2:
23832ctx.translate(canvas.width,0);
23833ctx.scale(-1,1);
23834break;
23835case 3:
23836ctx.translate(canvas.width,canvas.height);
23837ctx.rotate(Math.PI);
23838break;
23839case 4:
23840ctx.translate(0,canvas.height);
23841ctx.scale(1,-1);
23842break;
23843case 5:
23844ctx.rotate(0.5*Math.PI);
23845ctx.scale(1,-1);
23846break;
23847case 6:
23848ctx.rotate(0.5*Math.PI);
23849ctx.translate(0,-canvas.width);
23850break;
23851case 7:
23852ctx.rotate(0.5*Math.PI);
23853ctx.translate(canvas.height,-canvas.width);
23854ctx.scale(-1,1);
23855break;
23856case 8:
23857ctx.rotate(-0.5*Math.PI);
23858ctx.translate(-canvas.height,0);
23859break;
23860}
23861drawImageIOSFix(ctx,img,resizeInfo.srcX!=null?resizeInfo.srcX:0,resizeInfo.srcY!=null?resizeInfo.srcY:0,resizeInfo.srcWidth,resizeInfo.srcHeight,resizeInfo.trgX!=null?resizeInfo.trgX:0,resizeInfo.trgY!=null?resizeInfo.trgY:0,resizeInfo.trgWidth,resizeInfo.trgHeight);
23862var thumbnail=canvas.toDataURL("image/png");
23863if(callback!=null){
23864return callback(thumbnail,canvas);
23865}
23866});
23867};
23868if(callback!=null){
23869img.onerror=callback;
23870}
23871return img.src=file.dataURL;
23872}
23873},{
23874key:"processQueue",
23875value:function processQueue(){
23876var parallelUploads=this.options.parallelUploads;
23877var processingLength=this.getUploadingFiles().length;
23878var i=processingLength;
23879if(processingLength>=parallelUploads){
23880return;
23881}
23882var queuedFiles=this.getQueuedFiles();
23883if(!(queuedFiles.length>0)){
23884return;
23885}
23886if(this.options.uploadMultiple){
23887return this.processFiles(queuedFiles.slice(0,parallelUploads-processingLength));
23888}else{
23889while(i<parallelUploads){
23890if(!queuedFiles.length){
23891return;
23892}
23893this.processFile(queuedFiles.shift());
23894i++;
23895}
23896}
23897}
23898},{
23899key:"processFile",
23900value:function processFile(file){
23901return this.processFiles([file]);
23902}
23903},{
23904key:"processFiles",
23905value:function processFiles(files){
23906for(var _iterator19=files,_isArray19=true,_i20=0,_iterator19=_isArray19?_iterator19:_iterator19[Symbol.iterator]();;){
23907var _ref18;
23908if(_isArray19){
23909if(_i20>=_iterator19.length)break;
23910_ref18=_iterator19[_i20++];
23911}else{
23912_i20=_iterator19.next();
23913if(_i20.done)break;
23914_ref18=_i20.value;
23915}
23916var file=_ref18;
23917file.processing=true;
23918file.status=Dropzone.UPLOADING;
23919this.emit("processing",file);
23920}
23921if(this.options.uploadMultiple){
23922this.emit("processingmultiple",files);
23923}
23924return this.uploadFiles(files);
23925}
23926},{
23927key:"_getFilesWithXhr",
23928value:function _getFilesWithXhr(xhr){
23929var files=void 0;
23930return files=this.files.filter(function(file){
23931return file.xhr===xhr;
23932}).map(function(file){
23933return file;
23934});
23935}
23936},{
23937key:"cancelUpload",
23938value:function cancelUpload(file){
23939if(file.status===Dropzone.UPLOADING){
23940var groupedFiles=this._getFilesWithXhr(file.xhr);
23941for(var _iterator20=groupedFiles,_isArray20=true,_i21=0,_iterator20=_isArray20?_iterator20:_iterator20[Symbol.iterator]();;){
23942var _ref19;
23943if(_isArray20){
23944if(_i21>=_iterator20.length)break;
23945_ref19=_iterator20[_i21++];
23946}else{
23947_i21=_iterator20.next();
23948if(_i21.done)break;
23949_ref19=_i21.value;
23950}
23951var groupedFile=_ref19;
23952groupedFile.status=Dropzone.CANCELED;
23953}
23954if(typeof file.xhr!=='undefined'){
23955file.xhr.abort();
23956}
23957for(var _iterator21=groupedFiles,_isArray21=true,_i22=0,_iterator21=_isArray21?_iterator21:_iterator21[Symbol.iterator]();;){
23958var _ref20;
23959if(_isArray21){
23960if(_i22>=_iterator21.length)break;
23961_ref20=_iterator21[_i22++];
23962}else{
23963_i22=_iterator21.next();
23964if(_i22.done)break;
23965_ref20=_i22.value;
23966}
23967var _groupedFile=_ref20;
23968this.emit("canceled",_groupedFile);
23969}
23970if(this.options.uploadMultiple){
23971this.emit("canceledmultiple",groupedFiles);
23972}
23973}else if(file.status===Dropzone.ADDED||file.status===Dropzone.QUEUED){
23974file.status=Dropzone.CANCELED;
23975this.emit("canceled",file);
23976if(this.options.uploadMultiple){
23977this.emit("canceledmultiple",[file]);
23978}
23979}
23980if(this.options.autoProcessQueue){
23981return this.processQueue();
23982}
23983}
23984},{
23985key:"resolveOption",
23986value:function resolveOption(option){
23987if(typeof option==='function'){
23988for(var _len3=arguments.length,args=Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){
23989args[_key3-1]=arguments[_key3];
23990}
23991return option.apply(this,args);
23992}
23993return option;
23994}
23995},{
23996key:"uploadFile",
23997value:function uploadFile(file){
23998return this.uploadFiles([file]);
23999}
24000},{
24001key:"uploadFiles",
24002value:function uploadFiles(files){
24003var _this14=this;
24004this._transformFiles(files,function(transformedFiles){
24005if(files[0].upload.chunked){
24006var file=files[0];
24007var transformedFile=transformedFiles[0];
24008var startedChunkCount=0;
24009file.upload.chunks=[];
24010var handleNextChunk=function handleNextChunk(){
24011var chunkIndex=0;
24012while(file.upload.chunks[chunkIndex]!==undefined){
24013chunkIndex++;
24014}
24015if(chunkIndex>=file.upload.totalChunkCount)return;
24016startedChunkCount++;
24017var start=chunkIndex*_this14.options.chunkSize;
24018var end=Math.min(start+_this14.options.chunkSize,file.size);
24019var dataBlock={
24020name:_this14._getParamName(0),
24021data:transformedFile.webkitSlice?transformedFile.webkitSlice(start,end):transformedFile.slice(start,end),
24022filename:file.upload.filename,
24023chunkIndex:chunkIndex
24024};
24025file.upload.chunks[chunkIndex]={
24026file:file,
24027index:chunkIndex,
24028dataBlock:dataBlock,
24029status:Dropzone.UPLOADING,
24030progress:0,
24031retries:0
24032};
24033_this14._uploadData(files,[dataBlock]);
24034};
24035file.upload.finishedChunkUpload=function(chunk){
24036var allFinished=true;
24037chunk.status=Dropzone.SUCCESS;
24038chunk.dataBlock=null;
24039chunk.xhr=null;
24040for(var i=0;i<file.upload.totalChunkCount;i++){
24041if(file.upload.chunks[i]===undefined){
24042return handleNextChunk();
24043}
24044if(file.upload.chunks[i].status!==Dropzone.SUCCESS){
24045allFinished=false;
24046}
24047}
24048if(allFinished){
24049_this14.options.chunksUploaded(file,function(){
24050_this14._finished(files,'',null);
24051});
24052}
24053};
24054if(_this14.options.parallelChunkUploads){
24055for(var i=0;i<file.upload.totalChunkCount;i++){
24056handleNextChunk();
24057}
24058}else{
24059handleNextChunk();
24060}
24061}else{
24062var dataBlocks=[];
24063for(var _i23=0;_i23<files.length;_i23++){
24064dataBlocks[_i23]={
24065name:_this14._getParamName(_i23),
24066data:transformedFiles[_i23],
24067filename:files[_i23].upload.filename
24068};
24069}
24070_this14._uploadData(files,dataBlocks);
24071}
24072});
24073}
24074},{
24075key:"_getChunk",
24076value:function _getChunk(file,xhr){
24077for(var i=0;i<file.upload.totalChunkCount;i++){
24078if(file.upload.chunks[i]!==undefined&&file.upload.chunks[i].xhr===xhr){
24079return file.upload.chunks[i];
24080}
24081}
24082}
24083},{
24084key:"_uploadData",
24085value:function _uploadData(files,dataBlocks){
24086var _this15=this;
24087var xhr=new XMLHttpRequest();
24088for(var _iterator22=files,_isArray22=true,_i24=0,_iterator22=_isArray22?_iterator22:_iterator22[Symbol.iterator]();;){
24089var _ref21;
24090if(_isArray22){
24091if(_i24>=_iterator22.length)break;
24092_ref21=_iterator22[_i24++];
24093}else{
24094_i24=_iterator22.next();
24095if(_i24.done)break;
24096_ref21=_i24.value;
24097}
24098var file=_ref21;
24099file.xhr=xhr;
24100}
24101if(files[0].upload.chunked){
24102files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr=xhr;
24103}
24104var method=this.resolveOption(this.options.method,files);
24105var url=this.resolveOption(this.options.url,files);
24106xhr.open(method,url,true);
24107xhr.timeout=this.resolveOption(this.options.timeout,files);
24108xhr.withCredentials=!!this.options.withCredentials;
24109xhr.onload=function(e){
24110_this15._finishedUploading(files,xhr,e);
24111};
24112xhr.onerror=function(){
24113_this15._handleUploadError(files,xhr);
24114};
24115var progressObj=xhr.upload!=null?xhr.upload:xhr;
24116progressObj.onprogress=function(e){
24117return _this15._updateFilesUploadProgress(files,xhr,e);
24118};
24119var headers={
24120"Accept":"application/json",
24121"Cache-Control":"no-cache",
24122"X-Requested-With":"XMLHttpRequest"
24123};
24124if(this.options.headers){
24125Dropzone.extend(headers,this.options.headers);
24126}
24127for(var headerName in headers){
24128var headerValue=headers[headerName];
24129if(headerValue){
24130xhr.setRequestHeader(headerName,headerValue);
24131}
24132}
24133var formData=new FormData();
24134if(this.options.params){
24135var additionalParams=this.options.params;
24136if(typeof additionalParams==='function'){
24137additionalParams=additionalParams.call(this,files,xhr,files[0].upload.chunked?this._getChunk(files[0],xhr):null);
24138}
24139for(var key in additionalParams){
24140var value=additionalParams[key];
24141formData.append(key,value);
24142}
24143}
24144for(var _iterator23=files,_isArray23=true,_i25=0,_iterator23=_isArray23?_iterator23:_iterator23[Symbol.iterator]();;){
24145var _ref22;
24146if(_isArray23){
24147if(_i25>=_iterator23.length)break;
24148_ref22=_iterator23[_i25++];
24149}else{
24150_i25=_iterator23.next();
24151if(_i25.done)break;
24152_ref22=_i25.value;
24153}
24154var _file=_ref22;
24155this.emit("sending",_file,xhr,formData);
24156}
24157if(this.options.uploadMultiple){
24158this.emit("sendingmultiple",files,xhr,formData);
24159}
24160this._addFormElementData(formData);
24161for(var i=0;i<dataBlocks.length;i++){
24162var dataBlock=dataBlocks[i];
24163formData.append(dataBlock.name,dataBlock.data,dataBlock.filename);
24164}
24165this.submitRequest(xhr,formData,files);
24166}
24167},{
24168key:"_transformFiles",
24169value:function _transformFiles(files,done){
24170var _this16=this;
24171var transformedFiles=[];
24172var doneCounter=0;
24173var _loop=function _loop(i){
24174_this16.options.transformFile.call(_this16,files[i],function(transformedFile){
24175transformedFiles[i]=transformedFile;
24176if(++doneCounter===files.length){
24177done(transformedFiles);
24178}
24179});
24180};
24181for(var i=0;i<files.length;i++){
24182_loop(i);
24183}
24184}
24185},{
24186key:"_addFormElementData",
24187value:function _addFormElementData(formData){
24188if(this.element.tagName==="FORM"){
24189for(var _iterator24=this.element.querySelectorAll("input, textarea, select, button"),_isArray24=true,_i26=0,_iterator24=_isArray24?_iterator24:_iterator24[Symbol.iterator]();;){
24190var _ref23;
24191if(_isArray24){
24192if(_i26>=_iterator24.length)break;
24193_ref23=_iterator24[_i26++];
24194}else{
24195_i26=_iterator24.next();
24196if(_i26.done)break;
24197_ref23=_i26.value;
24198}
24199var input=_ref23;
24200var inputName=input.getAttribute("name");
24201var inputType=input.getAttribute("type");
24202if(inputType)inputType=inputType.toLowerCase();
24203if(typeof inputName==='undefined'||inputName===null)continue;
24204if(input.tagName==="SELECT"&&input.hasAttribute("multiple")){
24205for(var _iterator25=input.options,_isArray25=true,_i27=0,_iterator25=_isArray25?_iterator25:_iterator25[Symbol.iterator]();;){
24206var _ref24;
24207if(_isArray25){
24208if(_i27>=_iterator25.length)break;
24209_ref24=_iterator25[_i27++];
24210}else{
24211_i27=_iterator25.next();
24212if(_i27.done)break;
24213_ref24=_i27.value;
24214}
24215var option=_ref24;
24216if(option.selected){
24217formData.append(inputName,option.value);
24218}
24219}
24220}else if(!inputType||inputType!=="checkbox"&&inputType!=="radio"||input.checked){
24221formData.append(inputName,input.value);
24222}
24223}
24224}
24225}
24226},{
24227key:"_updateFilesUploadProgress",
24228value:function _updateFilesUploadProgress(files,xhr,e){
24229var progress=void 0;
24230if(typeof e!=='undefined'){
24231progress=100*e.loaded/e.total;
24232if(files[0].upload.chunked){
24233var file=files[0];
24234var chunk=this._getChunk(file,xhr);
24235chunk.progress=progress;
24236chunk.total=e.total;
24237chunk.bytesSent=e.loaded;
24238var fileProgress=0,
24239fileTotal=void 0,
24240fileBytesSent=void 0;
24241file.upload.progress=0;
24242file.upload.total=0;
24243file.upload.bytesSent=0;
24244for(var i=0;i<file.upload.totalChunkCount;i++){
24245if(file.upload.chunks[i]!==undefined&&file.upload.chunks[i].progress!==undefined){
24246file.upload.progress+=file.upload.chunks[i].progress;
24247file.upload.total+=file.upload.chunks[i].total;
24248file.upload.bytesSent+=file.upload.chunks[i].bytesSent;
24249}
24250}
24251file.upload.progress=file.upload.progress/file.upload.totalChunkCount;
24252}else{
24253for(var _iterator26=files,_isArray26=true,_i28=0,_iterator26=_isArray26?_iterator26:_iterator26[Symbol.iterator]();;){
24254var _ref25;
24255if(_isArray26){
24256if(_i28>=_iterator26.length)break;
24257_ref25=_iterator26[_i28++];
24258}else{
24259_i28=_iterator26.next();
24260if(_i28.done)break;
24261_ref25=_i28.value;
24262}
24263var _file2=_ref25;
24264_file2.upload.progress=progress;
24265_file2.upload.total=e.total;
24266_file2.upload.bytesSent=e.loaded;
24267}
24268}
24269for(var _iterator27=files,_isArray27=true,_i29=0,_iterator27=_isArray27?_iterator27:_iterator27[Symbol.iterator]();;){
24270var _ref26;
24271if(_isArray27){
24272if(_i29>=_iterator27.length)break;
24273_ref26=_iterator27[_i29++];
24274}else{
24275_i29=_iterator27.next();
24276if(_i29.done)break;
24277_ref26=_i29.value;
24278}
24279var _file3=_ref26;
24280this.emit("uploadprogress",_file3,_file3.upload.progress,_file3.upload.bytesSent);
24281}
24282}else{
24283var allFilesFinished=true;
24284progress=100;
24285for(var _iterator28=files,_isArray28=true,_i30=0,_iterator28=_isArray28?_iterator28:_iterator28[Symbol.iterator]();;){
24286var _ref27;
24287if(_isArray28){
24288if(_i30>=_iterator28.length)break;
24289_ref27=_iterator28[_i30++];
24290}else{
24291_i30=_iterator28.next();
24292if(_i30.done)break;
24293_ref27=_i30.value;
24294}
24295var _file4=_ref27;
24296if(_file4.upload.progress!==100||_file4.upload.bytesSent!==_file4.upload.total){
24297allFilesFinished=false;
24298}
24299_file4.upload.progress=progress;
24300_file4.upload.bytesSent=_file4.upload.total;
24301}
24302if(allFilesFinished){
24303return;
24304}
24305for(var _iterator29=files,_isArray29=true,_i31=0,_iterator29=_isArray29?_iterator29:_iterator29[Symbol.iterator]();;){
24306var _ref28;
24307if(_isArray29){
24308if(_i31>=_iterator29.length)break;
24309_ref28=_iterator29[_i31++];
24310}else{
24311_i31=_iterator29.next();
24312if(_i31.done)break;
24313_ref28=_i31.value;
24314}
24315var _file5=_ref28;
24316this.emit("uploadprogress",_file5,progress,_file5.upload.bytesSent);
24317}
24318}
24319}
24320},{
24321key:"_finishedUploading",
24322value:function _finishedUploading(files,xhr,e){
24323var response=void 0;
24324if(files[0].status===Dropzone.CANCELED){
24325return;
24326}
24327if(xhr.readyState!==4){
24328return;
24329}
24330if(xhr.responseType!=='arraybuffer'&&xhr.responseType!=='blob'){
24331response=xhr.responseText;
24332if(xhr.getResponseHeader("content-type")&&~xhr.getResponseHeader("content-type").indexOf("application/json")){
24333try{
24334response=JSON.parse(response);
24335}catch(error){
24336e=error;
24337response="Invalid JSON response from server.";
24338}
24339}
24340}
24341this._updateFilesUploadProgress(files);
24342if(!(200<=xhr.status&&xhr.status<300)){
24343this._handleUploadError(files,xhr,response);
24344}else{
24345if(files[0].upload.chunked){
24346files[0].upload.finishedChunkUpload(this._getChunk(files[0],xhr));
24347}else{
24348this._finished(files,response,e);
24349}
24350}
24351}
24352},{
24353key:"_handleUploadError",
24354value:function _handleUploadError(files,xhr,response){
24355if(files[0].status===Dropzone.CANCELED){
24356return;
24357}
24358if(files[0].upload.chunked&&this.options.retryChunks){
24359var chunk=this._getChunk(files[0],xhr);
24360if(chunk.retries++<this.options.retryChunksLimit){
24361this._uploadData(files,[chunk.dataBlock]);
24362return;
24363}else{
24364console.warn('Retried this chunk too often. Giving up.');
24365}
24366}
24367for(var _iterator30=files,_isArray30=true,_i32=0,_iterator30=_isArray30?_iterator30:_iterator30[Symbol.iterator]();;){
24368var _ref29;
24369if(_isArray30){
24370if(_i32>=_iterator30.length)break;
24371_ref29=_iterator30[_i32++];
24372}else{
24373_i32=_iterator30.next();
24374if(_i32.done)break;
24375_ref29=_i32.value;
24376}
24377var file=_ref29;
24378this._errorProcessing(files,response||this.options.dictResponseError.replace("{{statusCode}}",xhr.status),xhr);
24379}
24380}
24381},{
24382key:"submitRequest",
24383value:function submitRequest(xhr,formData,files){
24384xhr.send(formData);
24385}
24386},{
24387key:"_finished",
24388value:function _finished(files,responseText,e){
24389for(var _iterator31=files,_isArray31=true,_i33=0,_iterator31=_isArray31?_iterator31:_iterator31[Symbol.iterator]();;){
24390var _ref30;
24391if(_isArray31){
24392if(_i33>=_iterator31.length)break;
24393_ref30=_iterator31[_i33++];
24394}else{
24395_i33=_iterator31.next();
24396if(_i33.done)break;
24397_ref30=_i33.value;
24398}
24399var file=_ref30;
24400file.status=Dropzone.SUCCESS;
24401this.emit("success",file,responseText,e);
24402this.emit("complete",file);
24403}
24404if(this.options.uploadMultiple){
24405this.emit("successmultiple",files,responseText,e);
24406this.emit("completemultiple",files);
24407}
24408if(this.options.autoProcessQueue){
24409return this.processQueue();
24410}
24411}
24412},{
24413key:"_errorProcessing",
24414value:function _errorProcessing(files,message,xhr){
24415for(var _iterator32=files,_isArray32=true,_i34=0,_iterator32=_isArray32?_iterator32:_iterator32[Symbol.iterator]();;){
24416var _ref31;
24417if(_isArray32){
24418if(_i34>=_iterator32.length)break;
24419_ref31=_iterator32[_i34++];
24420}else{
24421_i34=_iterator32.next();
24422if(_i34.done)break;
24423_ref31=_i34.value;
24424}
24425var file=_ref31;
24426file.status=Dropzone.ERROR;
24427this.emit("error",file,message,xhr);
24428this.emit("complete",file);
24429}
24430if(this.options.uploadMultiple){
24431this.emit("errormultiple",files,message,xhr);
24432this.emit("completemultiple",files);
24433}
24434if(this.options.autoProcessQueue){
24435return this.processQueue();
24436}
24437}
24438}],[{
24439key:"uuidv4",
24440value:function uuidv4(){
24441return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){
24442var r=Math.random()*16|0,
24443v=c==='x'?r:r&0x3|0x8;
24444return v.toString(16);
24445});
24446}
24447}]);
24448return Dropzone;
24449}(Emitter);
24450Dropzone.initClass();
24451Dropzone.version="5.5.0";
24452Dropzone.options={};
24453Dropzone.optionsForElement=function(element){
24454if(element.getAttribute("id")){
24455return Dropzone.options[camelize(element.getAttribute("id"))];
24456}else{
24457return undefined;
24458}
24459};
24460Dropzone.instances=[];
24461Dropzone.forElement=function(element){
24462if(typeof element==="string"){
24463element=document.querySelector(element);
24464}
24465if((element!=null?element.dropzone:undefined)==null){
24466throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
24467}
24468return element.dropzone;
24469};
24470Dropzone.autoDiscover=true;
24471Dropzone.discover=function(){
24472var dropzones=void 0;
24473if(document.querySelectorAll){
24474dropzones=document.querySelectorAll(".dropzone");
24475}else{
24476dropzones=[];
24477var checkElements=function checkElements(elements){
24478return function(){
24479var result=[];
24480for(var _iterator33=elements,_isArray33=true,_i35=0,_iterator33=_isArray33?_iterator33:_iterator33[Symbol.iterator]();;){
24481var _ref32;
24482if(_isArray33){
24483if(_i35>=_iterator33.length)break;
24484_ref32=_iterator33[_i35++];
24485}else{
24486_i35=_iterator33.next();
24487if(_i35.done)break;
24488_ref32=_i35.value;
24489}
24490var el=_ref32;
24491if(/(^| )dropzone($| )/.test(el.className)){
24492result.push(dropzones.push(el));
24493}else{
24494result.push(undefined);
24495}
24496}
24497return result;
24498}();
24499};
24500checkElements(document.getElementsByTagName("div"));
24501checkElements(document.getElementsByTagName("form"));
24502}
24503return function(){
24504var result=[];
24505for(var _iterator34=dropzones,_isArray34=true,_i36=0,_iterator34=_isArray34?_iterator34:_iterator34[Symbol.iterator]();;){
24506var _ref33;
24507if(_isArray34){
24508if(_i36>=_iterator34.length)break;
24509_ref33=_iterator34[_i36++];
24510}else{
24511_i36=_iterator34.next();
24512if(_i36.done)break;
24513_ref33=_i36.value;
24514}
24515var dropzone=_ref33;
24516if(Dropzone.optionsForElement(dropzone)!==false){
24517result.push(new Dropzone(dropzone));
24518}else{
24519result.push(undefined);
24520}
24521}
24522return result;
24523}();
24524};
24525Dropzone.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i];
24526Dropzone.isBrowserSupported=function(){
24527var capableBrowser=true;
24528if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector){
24529if(!("classList"in document.createElement("a"))){
24530capableBrowser=false;
24531}else{
24532for(var _iterator35=Dropzone.blacklistedBrowsers,_isArray35=true,_i37=0,_iterator35=_isArray35?_iterator35:_iterator35[Symbol.iterator]();;){
24533var _ref34;
24534if(_isArray35){
24535if(_i37>=_iterator35.length)break;
24536_ref34=_iterator35[_i37++];
24537}else{
24538_i37=_iterator35.next();
24539if(_i37.done)break;
24540_ref34=_i37.value;
24541}
24542var regex=_ref34;
24543if(regex.test(navigator.userAgent)){
24544capableBrowser=false;
24545continue;
24546}
24547}
24548}
24549}else{
24550capableBrowser=false;
24551}
24552return capableBrowser;
24553};
24554Dropzone.dataURItoBlob=function(dataURI){
24555var byteString=atob(dataURI.split(',')[1]);
24556var mimeString=dataURI.split(',')[0].split(':')[1].split(';')[0];
24557var ab=new ArrayBuffer(byteString.length);
24558var ia=new Uint8Array(ab);
24559for(var i=0,end=byteString.length,asc=0<=end;asc?i<=end:i>=end;asc?i++:i--){
24560ia[i]=byteString.charCodeAt(i);
24561}
24562return new Blob([ab],{type:mimeString});
24563};
24564var without=function without(list,rejectedItem){
24565return list.filter(function(item){
24566return item!==rejectedItem;
24567}).map(function(item){
24568return item;
24569});
24570};
24571var camelize=function camelize(str){
24572return str.replace(/[\-_](\w)/g,function(match){
24573return match.charAt(1).toUpperCase();
24574});
24575};
24576Dropzone.createElement=function(string){
24577var div=document.createElement("div");
24578div.innerHTML=string;
24579return div.childNodes[0];
24580};
24581Dropzone.elementInside=function(element,container){
24582if(element===container){
24583return true;
24584}
24585while(element=element.parentNode){
24586if(element===container){
24587return true;
24588}
24589}
24590return false;
24591};
24592Dropzone.getElement=function(el,name){
24593var element=void 0;
24594if(typeof el==="string"){
24595element=document.querySelector(el);
24596}else if(el.nodeType!=null){
24597element=el;
24598}
24599if(element==null){
24600throw new Error("Invalid `"+name+"` option provided. Please provide a CSS selector or a plain HTML element.");
24601}
24602return element;
24603};
24604Dropzone.getElements=function(els,name){
24605var el=void 0,
24606elements=void 0;
24607if(els instanceof Array){
24608elements=[];
24609try{
24610for(var _iterator36=els,_isArray36=true,_i38=0,_iterator36=_isArray36?_iterator36:_iterator36[Symbol.iterator]();;){
24611if(_isArray36){
24612if(_i38>=_iterator36.length)break;
24613el=_iterator36[_i38++];
24614}else{
24615_i38=_iterator36.next();
24616if(_i38.done)break;
24617el=_i38.value;
24618}
24619elements.push(this.getElement(el,name));
24620}
24621}catch(e){
24622elements=null;
24623}
24624}else if(typeof els==="string"){
24625elements=[];
24626for(var _iterator37=document.querySelectorAll(els),_isArray37=true,_i39=0,_iterator37=_isArray37?_iterator37:_iterator37[Symbol.iterator]();;){
24627if(_isArray37){
24628if(_i39>=_iterator37.length)break;
24629el=_iterator37[_i39++];
24630}else{
24631_i39=_iterator37.next();
24632if(_i39.done)break;
24633el=_i39.value;
24634}
24635elements.push(el);
24636}
24637}else if(els.nodeType!=null){
24638elements=[els];
24639}
24640if(elements==null||!elements.length){
24641throw new Error("Invalid `"+name+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");
24642}
24643return elements;
24644};
24645Dropzone.confirm=function(question,accepted,rejected){
24646if(window.confirm(question)){
24647return accepted();
24648}else if(rejected!=null){
24649return rejected();
24650}
24651};
24652Dropzone.isValidFile=function(file,acceptedFiles){
24653if(!acceptedFiles){
24654return true;
24655}
24656acceptedFiles=acceptedFiles.split(",");
24657var mimeType=file.type;
24658var baseMimeType=mimeType.replace(/\/.*$/,"");
24659for(var _iterator38=acceptedFiles,_isArray38=true,_i40=0,_iterator38=_isArray38?_iterator38:_iterator38[Symbol.iterator]();;){
24660var _ref35;
24661if(_isArray38){
24662if(_i40>=_iterator38.length)break;
24663_ref35=_iterator38[_i40++];
24664}else{
24665_i40=_iterator38.next();
24666if(_i40.done)break;
24667_ref35=_i40.value;
24668}
24669var validType=_ref35;
24670validType=validType.trim();
24671if(validType.charAt(0)==="."){
24672if(file.name.toLowerCase().indexOf(validType.toLowerCase(),file.name.length-validType.length)!==-1){
24673return true;
24674}
24675}else if(/\/\*$/.test(validType)){
24676if(baseMimeType===validType.replace(/\/.*$/,"")){
24677return true;
24678}
24679}else{
24680if(mimeType===validType){
24681return true;
24682}
24683}
24684}
24685return false;
24686};
24687if(typeof jQuery!=='undefined'&&jQuery!==null){
24688jQuery.fn.dropzone=function(options){
24689return this.each(function(){
24690return new Dropzone(this,options);
24691});
24692};
24693}
24694if(typeof module!=='undefined'&&module!==null){
24695module.exports=Dropzone;
24696}else{
24697window.Dropzone=Dropzone;
24698}
24699Dropzone.ADDED="added";
24700Dropzone.QUEUED="queued";
24701Dropzone.ACCEPTED=Dropzone.QUEUED;
24702Dropzone.UPLOADING="uploading";
24703Dropzone.PROCESSING=Dropzone.UPLOADING;
24704Dropzone.CANCELED="canceled";
24705Dropzone.ERROR="error";
24706Dropzone.SUCCESS="success";
24707var detectVerticalSquash=function detectVerticalSquash(img){
24708var iw=img.naturalWidth;
24709var ih=img.naturalHeight;
24710var canvas=document.createElement("canvas");
24711canvas.width=1;
24712canvas.height=ih;
24713var ctx=canvas.getContext("2d");
24714ctx.drawImage(img,0,0);
24715var _ctx$getImageData=ctx.getImageData(1,0,1,ih),
24716data=_ctx$getImageData.data;
24717var sy=0;
24718var ey=ih;
24719var py=ih;
24720while(py>sy){
24721var alpha=data[(py-1)*4+3];
24722if(alpha===0){
24723ey=py;
24724}else{
24725sy=py;
24726}
24727py=ey+sy>>1;
24728}
24729var ratio=py/ih;
24730if(ratio===0){
24731return 1;
24732}else{
24733return ratio;
24734}
24735};
24736var drawImageIOSFix=function drawImageIOSFix(ctx,img,sx,sy,sw,sh,dx,dy,dw,dh){
24737var vertSquashRatio=detectVerticalSquash(img);
24738return ctx.drawImage(img,sx,sy,sw,sh,dx,dy,dw,dh/vertSquashRatio);
24739};
24740var ExifRestore=function(){
24741function ExifRestore(){
24742_classCallCheck(this,ExifRestore);
24743}
24744_createClass(ExifRestore,null,[{
24745key:"initClass",
24746value:function initClass(){
24747this.KEY_STR='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
24748}
24749},{
24750key:"encode64",
24751value:function encode64(input){
24752var output='';
24753var chr1=undefined;
24754var chr2=undefined;
24755var chr3='';
24756var enc1=undefined;
24757var enc2=undefined;
24758var enc3=undefined;
24759var enc4='';
24760var i=0;
24761while(true){
24762chr1=input[i++];
24763chr2=input[i++];
24764chr3=input[i++];
24765enc1=chr1>>2;
24766enc2=(chr1&3)<<4|chr2>>4;
24767enc3=(chr2&15)<<2|chr3>>6;
24768enc4=chr3&63;
24769if(isNaN(chr2)){
24770enc3=enc4=64;
24771}else if(isNaN(chr3)){
24772enc4=64;
24773}
24774output=output+this.KEY_STR.charAt(enc1)+this.KEY_STR.charAt(enc2)+this.KEY_STR.charAt(enc3)+this.KEY_STR.charAt(enc4);
24775chr1=chr2=chr3='';
24776enc1=enc2=enc3=enc4='';
24777if(!(i<input.length)){
24778break;
24779}
24780}
24781return output;
24782}
24783},{
24784key:"restore",
24785value:function restore(origFileBase64,resizedFileBase64){
24786if(!origFileBase64.match('data:image/jpeg;base64,')){
24787return resizedFileBase64;
24788}
24789var rawImage=this.decode64(origFileBase64.replace('data:image/jpeg;base64,',''));
24790var segments=this.slice2Segments(rawImage);
24791var image=this.exifManipulation(resizedFileBase64,segments);
24792return"data:image/jpeg;base64,"+this.encode64(image);
24793}
24794},{
24795key:"exifManipulation",
24796value:function exifManipulation(resizedFileBase64,segments){
24797var exifArray=this.getExifArray(segments);
24798var newImageArray=this.insertExif(resizedFileBase64,exifArray);
24799var aBuffer=new Uint8Array(newImageArray);
24800return aBuffer;
24801}
24802},{
24803key:"getExifArray",
24804value:function getExifArray(segments){
24805var seg=undefined;
24806var x=0;
24807while(x<segments.length){
24808seg=segments[x];
24809if(seg[0]===255&seg[1]===225){
24810return seg;
24811}
24812x++;
24813}
24814return[];
24815}
24816},{
24817key:"insertExif",
24818value:function insertExif(resizedFileBase64,exifArray){
24819var imageData=resizedFileBase64.replace('data:image/jpeg;base64,','');
24820var buf=this.decode64(imageData);
24821var separatePoint=buf.indexOf(255,3);
24822var mae=buf.slice(0,separatePoint);
24823var ato=buf.slice(separatePoint);
24824var array=mae;
24825array=array.concat(exifArray);
24826array=array.concat(ato);
24827return array;
24828}
24829},{
24830key:"slice2Segments",
24831value:function slice2Segments(rawImageArray){
24832var head=0;
24833var segments=[];
24834while(true){
24835var length;
24836if(rawImageArray[head]===255&rawImageArray[head+1]===218){
24837break;
24838}
24839if(rawImageArray[head]===255&rawImageArray[head+1]===216){
24840head+=2;
24841}else{
24842length=rawImageArray[head+2]*256+rawImageArray[head+3];
24843var endPoint=head+length+2;
24844var seg=rawImageArray.slice(head,endPoint);
24845segments.push(seg);
24846head=endPoint;
24847}
24848if(head>rawImageArray.length){
24849break;
24850}
24851}
24852return segments;
24853}
24854},{
24855key:"decode64",
24856value:function decode64(input){
24857var output='';
24858var chr1=undefined;
24859var chr2=undefined;
24860var chr3='';
24861var enc1=undefined;
24862var enc2=undefined;
24863var enc3=undefined;
24864var enc4='';
24865var i=0;
24866var buf=[];
24867var base64test=/[^A-Za-z0-9\+\/\=]/g;
24868if(base64test.exec(input)){
24869console.warn('There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, \'+\', \'/\',and \'=\'\nExpect errors in decoding.');
24870}
24871input=input.replace(/[^A-Za-z0-9\+\/\=]/g,'');
24872while(true){
24873enc1=this.KEY_STR.indexOf(input.charAt(i++));
24874enc2=this.KEY_STR.indexOf(input.charAt(i++));
24875enc3=this.KEY_STR.indexOf(input.charAt(i++));
24876enc4=this.KEY_STR.indexOf(input.charAt(i++));
24877chr1=enc1<<2|enc2>>4;
24878chr2=(enc2&15)<<4|enc3>>2;
24879chr3=(enc3&3)<<6|enc4;
24880buf.push(chr1);
24881if(enc3!==64){
24882buf.push(chr2);
24883}
24884if(enc4!==64){
24885buf.push(chr3);
24886}
24887chr1=chr2=chr3='';
24888enc1=enc2=enc3=enc4='';
24889if(!(i<input.length)){
24890break;
24891}
24892}
24893return buf;
24894}
24895}]);
24896return ExifRestore;
24897}();
24898ExifRestore.initClass();
24899var contentLoaded=function contentLoaded(win,fn){
24900var done=false;
24901var top=true;
24902var doc=win.document;
24903var root=doc.documentElement;
24904var add=doc.addEventListener?"addEventListener":"attachEvent";
24905var rem=doc.addEventListener?"removeEventListener":"detachEvent";
24906var pre=doc.addEventListener?"":"on";
24907var init=function init(e){
24908if(e.type==="readystatechange"&&doc.readyState!=="complete"){
24909return;
24910}
24911(e.type==="load"?win:doc)[rem](pre+e.type,init,false);
24912if(!done&&(done=true)){
24913return fn.call(win,e.type||e);
24914}
24915};
24916var poll=function poll(){
24917try{
24918root.doScroll("left");
24919}catch(e){
24920setTimeout(poll,50);
24921return;
24922}
24923return init("poll");
24924};
24925if(doc.readyState!=="complete"){
24926if(doc.createEventObject&&root.doScroll){
24927try{
24928top=!win.frameElement;
24929}catch(error){}
24930if(top){
24931poll();
24932}
24933}
24934doc[add](pre+"DOMContentLoaded",init,false);
24935doc[add](pre+"readystatechange",init,false);
24936return win[add](pre+"load",init,false);
24937}
24938};
24939Dropzone._autoDiscoverFunction=function(){
24940if(Dropzone.autoDiscover){
24941return Dropzone.discover();
24942}
24943};
24944contentLoaded(window,Dropzone._autoDiscoverFunction);
24945function __guard__(value,transform){
24946return typeof value!=='undefined'&&value!==null?transform(value):undefined;
24947}
24948function __guardMethod__(obj,methodName,transform){
24949if(typeof obj!=='undefined'&&obj!==null&&typeof obj[methodName]==='function'){
24950return transform(obj,methodName);
24951}else{
24952return undefined;
24953}
24954}
24955
24956
24957/* plugins/auto/zblobul_core/v6.9.30/javascript/zblobul.js?1790763342 */
24958
24959$(function(){
24960$("#catnav > ul").addClass('flexnav').attr("data-breakpoint","1025");
24961$(".flexnav").flexNav();
24962});
24963$(function(){
24964$('a.spip_out,a.spip_url,a.spip_documents,.reseau_national a').attr("target","_blank");
24965});
24966$(function(){
24967var shrinkHeader=20;
24968$(window).on('scroll',function(){
24969var scroll=getCurrentScroll();
24970if(scroll>=shrinkHeader){
24971$('#header').addClass('mini');
24972}
24973else{
24974$('#header').removeClass('mini');
24975}
24976});
24977function getCurrentScroll(){
24978return window.pageYOffset||document.documentElement.scrollTop;
24979}
24980});
24981$(function(){
24982var onMapMouseleaveHandler=function(event){
24983var that=$(this);
24984that.on('click',onMapClickHandler);
24985that.off('mouseleave',onMapMouseleaveHandler);
24986that.find('iframe').css("pointer-events","none");
24987}
24988var onMapClickHandler=function(event){
24989var that=$(this);
24990that.off('click',onMapClickHandler);
24991that.find('iframe').css("pointer-events","auto");
24992that.on('mouseleave',onMapMouseleaveHandler);
24993}
24994$('.google_map').on('click',onMapClickHandler);
24995});
24996$(function(){
24997$('.spip_ancre').smoothScroll({offset:-150});
24998$('#shortcuts a').smoothScroll({offset:-150});
24999$('.cs_sommaire_corps a').smoothScroll({offset:-150});
25000$('.sommaire_ancre').smoothScroll({offset:-150});
25001});
25002
25003
25004/* plugins/auto/zblobul_core/v6.9.30/javascript/menu_visiteur.js?1790763342 */
25005
25006(function(){
25007'use strict';
25008document.addEventListener('DOMContentLoaded',function(){
25009try{document.documentElement.classList.add('has-js');}catch(e){}
25010var isTouch=('ontouchstart'in window)||navigator.maxTouchPoints>0;
25011var _dbg=false;
25012function dbg(){if(_dbg)console.log('[menu_visiteur]',...arguments);}
25013dbg('init — isTouch:',isTouch);
25014if(window.MutationObserver){
25015var topBar=document.querySelector('#top_bar');
25016if(topBar){
25017var _obs=new MutationObserver(function(mutations){
25018mutations.forEach(function(m){
25019if(m.addedNodes.length||m.removedNodes.length){
25020dbg('MutationObserver #top_bar — noeuds modifiés:',m.addedNodes.length,'ajoutés,',m.removedNodes.length,'supprimés',m.target);
25021}
25022});
25023});
25024_obs.observe(topBar,{childList:true,subtree:true});
25025dbg('MutationObserver actif sur #top_bar');
25026}else{
25027dbg('ATTENTION: #top_bar introuvable au DOMContentLoaded');
25028}
25029}
25030function fermerTousMenus(){
25031document.querySelectorAll('#top_bar .connexion.open').forEach(function(m){
25032m.classList.remove('open');
25033var s=m.querySelector('span');
25034if(s)s.setAttribute('aria-expanded','false');
25035});
25036}
25037function fermerToutesCloches(){
25038document.querySelectorAll('#top_bar .notif-cloche.open').forEach(function(c){
25039c.classList.remove('open');
25040var b=c.querySelector('.notification_btn');
25041if(b)b.setAttribute('aria-expanded','false');
25042});
25043}
25044document.addEventListener('click',function(e){
25045var trigger=e.target&&e.target.closest&&e.target.closest('#top_bar .connexion > span');
25046if(!trigger)return;
25047dbg('clic sur trigger .connexion > span',trigger.className,'— target:',e.target.tagName,e.target.className);
25048e.stopPropagation();
25049var menu=trigger.closest('.connexion');
25050var estOuvert=menu.classList.contains('open');
25051dbg('état avant toggle — .open:',estOuvert);
25052fermerTousMenus();
25053fermerToutesCloches();
25054if(!estOuvert){
25055menu.classList.add('open');
25056trigger.setAttribute('aria-expanded','true');
25057dbg('.open ajouté sur',menu);
25058}else{
25059dbg('.open retiré (menu était ouvert)');
25060}
25061});
25062document.addEventListener('click',function(e){
25063var btn=e.target&&e.target.closest&&e.target.closest('#top_bar .notif-cloche .notification_btn');
25064if(!btn)return;
25065dbg('clic sur .notification_btn');
25066e.stopPropagation();
25067var cloche=btn.closest('.notif-cloche');
25068var estOuvert=cloche.classList.contains('open');
25069fermerTousMenus();
25070fermerToutesCloches();
25071if(!estOuvert){
25072cloche.classList.add('open');
25073btn.setAttribute('aria-expanded','true');
25074}
25075});
25076document.addEventListener('click',function(e){
25077if(e.target&&e.target.closest){
25078if(e.target.closest('#top_bar .connexion'))return;
25079if(e.target.closest('#top_bar .notif-cloche'))return;
25080}
25081var hadOpen=document.querySelectorAll('#top_bar .connexion.open, #top_bar .notif-cloche.open').length>0;
25082if(hadOpen)dbg('clic extérieur — fermeture des menus ouverts');
25083fermerTousMenus();
25084fermerToutesCloches();
25085});
25086document.addEventListener('keydown',function(e){
25087var key=e.key||e.keyCode;
25088if(key!=='Escape'&&key!=='Esc'&&key!==27)return;
25089document.querySelectorAll('#top_bar .connexion.open').forEach(function(menu){
25090menu.classList.remove('open');
25091var s=menu.querySelector('span');
25092if(s){s.setAttribute('aria-expanded','false');try{s.focus();}catch(err){}}
25093});
25094document.querySelectorAll('#top_bar .notif-cloche.open').forEach(function(cloche){
25095cloche.classList.remove('open');
25096var b=cloche.querySelector('.notification_btn');
25097if(b){b.setAttribute('aria-expanded','false');try{b.focus();}catch(err){}}
25098});
25099});
25100document.addEventListener('keydown',function(e){
25101var code=e.key||e.keyCode;
25102if(code!=='Enter'&&code!==' '&&code!==13&&code!==32)return;
25103var trigger=e.target&&e.target.closest&&e.target.closest('#top_bar .connexion > span');
25104var btn=e.target&&e.target.closest&&e.target.closest('#top_bar .notif-cloche .notification_btn');
25105if(!trigger&&!btn)return;
25106e.preventDefault();
25107if(trigger)trigger.click();
25108if(btn)btn.click();
25109});
25110var HOVER_MS=500;
25111var _hoverTimer=null;
25112document.addEventListener('mouseenter',function(e){
25113if(isTouch)return;
25114var trigger=e.target&&e.target.closest&&e.target.closest('#top_bar .connexion > span');
25115if(!trigger)return;
25116if(_hoverTimer)return;
25117_hoverTimer=setTimeout(function(){
25118_hoverTimer=null;
25119if(trigger.getAttribute('aria-expanded')==='true')return;
25120trigger.click();
25121},HOVER_MS);
25122},true);
25123document.addEventListener('mouseleave',function(e){
25124var trigger=e.target&&e.target.closest&&e.target.closest('#top_bar .connexion > span');
25125if(!trigger)return;
25126if(_hoverTimer){clearTimeout(_hoverTimer);_hoverTimer=null;}
25127},true);
25128});
25129}());
25130
25131
25132/* plugins/auto/zblobul_core/v6.9.30/javascript/jquery.smooth-scroll.js?1790763342 */
25133
25134(function(factory){
25135if(typeof define==='function'&&define.amd){
25136define(['jquery'],factory);
25137}else if(typeof module==='object'&&module.exports){
25138factory(require('jquery'));
25139}else{
25140factory(jQuery);
25141}
25142}(function($){
25143var version='2.2.0';
25144var optionOverrides={};
25145var defaults={
25146exclude:[],
25147excludeWithin:[],
25148offset:0,
vendor: 5,269 bytes, lines 25149-25364
25149direction:'top',
25150delegateSelector:null,
25151scrollElement:null,
25152scrollTarget:null,
25153autoFocus:false,
25154beforeScroll:function(){},
25155afterScroll:function(){},
25156easing:'swing',
25157speed:400,
25158autoCoefficient:2,
25159preventDefault:true
25160};
25161var getScrollable=function(opts){
25162var scrollable=[];
25163var scrolled=false;
25164var dir=opts.dir&&opts.dir==='left'?'scrollLeft':'scrollTop';
25165this.each(function(){
25166var el=$(this);
25167if(this===document||this===window){
25168return;
25169}
25170if(document.scrollingElement&&(this===document.documentElement||this===document.body)){
25171scrollable.push(document.scrollingElement);
25172return false;
25173}
25174if(el[dir]()>0){
25175scrollable.push(this);
25176}else{
25177el[dir](1);
25178scrolled=el[dir]()>0;
25179if(scrolled){
25180scrollable.push(this);
25181}
25182el[dir](0);
25183}
25184});
25185if(!scrollable.length){
25186this.each(function(){
25187if(this===document.documentElement&&$(this).css('scrollBehavior')==='smooth'){
25188scrollable=[this];
25189}
25190if(!scrollable.length&&this.nodeName==='BODY'){
25191scrollable=[this];
25192}
25193});
25194}
25195if(opts.el==='first'&&scrollable.length>1){
25196scrollable=[scrollable[0]];
25197}
25198return scrollable;
25199};
25200var rRelative=/^([\-\+]=)(\d+)/;
25201$.fn.extend({
25202scrollable:function(dir){
25203var scrl=getScrollable.call(this,{dir:dir});
25204return this.pushStack(scrl);
25205},
25206firstScrollable:function(dir){
25207var scrl=getScrollable.call(this,{el:'first',dir:dir});
25208return this.pushStack(scrl);
25209},
25210smoothScroll:function(options,extra){
25211options=options||{};
25212if(options==='options'){
25213if(!extra){
25214return this.first().data('ssOpts');
25215}
25216return this.each(function(){
25217var $this=$(this);
25218var opts=$.extend($this.data('ssOpts')||{},extra);
25219$(this).data('ssOpts',opts);
25220});
25221}
25222var opts=$.extend({},$.fn.smoothScroll.defaults,options);
25223var clickHandler=function(event){
25224var escapeSelector=function(str){
25225return str.replace(/(:|\.|\/)/g,'\\$1');
25226};
25227var link=this;
25228var $link=$(this);
25229var thisOpts=$.extend({},opts,$link.data('ssOpts')||{});
25230var exclude=opts.exclude;
25231var excludeWithin=thisOpts.excludeWithin;
25232var elCounter=0;
25233var ewlCounter=0;
25234var include=true;
25235var clickOpts={};
25236var locationPath=$.smoothScroll.filterPath(location.pathname);
25237var linkPath=$.smoothScroll.filterPath(link.pathname);
25238var hostMatch=location.hostname===link.hostname||!link.hostname;
25239var pathMatch=thisOpts.scrollTarget||(linkPath===locationPath);
25240var thisHash=escapeSelector(link.hash);
25241if(thisHash&&!$(thisHash).length){
25242include=false;
25243}
25244if(!thisOpts.scrollTarget&&(!hostMatch||!pathMatch||!thisHash)){
25245include=false;
25246}else{
25247while(include&&elCounter<exclude.length){
25248if($link.is(escapeSelector(exclude[elCounter++]))){
25249include=false;
25250}
25251}
25252while(include&&ewlCounter<excludeWithin.length){
25253if($link.closest(excludeWithin[ewlCounter++]).length){
25254include=false;
25255}
25256}
25257}
25258if(include){
25259if(thisOpts.preventDefault){
25260event.preventDefault();
25261}
25262$.extend(clickOpts,thisOpts,{
25263scrollTarget:thisOpts.scrollTarget||thisHash,
25264link:link
25265});
25266$.smoothScroll(clickOpts);
25267}
25268};
25269if(options.delegateSelector!==null){
25270this
25271.off('click.smoothscroll',options.delegateSelector)
25272.on('click.smoothscroll',options.delegateSelector,clickHandler);
25273}else{
25274this
25275.off('click.smoothscroll')
25276.on('click.smoothscroll',clickHandler);
25277}
25278return this;
25279}
25280});
25281var getExplicitOffset=function(val){
25282var explicit={relative:''};
25283var parts=typeof val==='string'&&rRelative.exec(val);
25284if(typeof val==='number'){
25285explicit.px=val;
25286}else if(parts){
25287explicit.relative=parts[1];
25288explicit.px=parseFloat(parts[2])||0;
25289}
25290return explicit;
25291};
25292var onAfterScroll=function(opts){
25293var $tgt=$(opts.scrollTarget);
25294if(opts.autoFocus&&$tgt.length){
25295$tgt[0].focus();
25296if(!$tgt.is(document.activeElement)){
25297$tgt.prop({tabIndex:-1});
25298$tgt[0].focus();
25299}
25300}
25301opts.afterScroll.call(opts.link,opts);
25302};
25303$.smoothScroll=function(options,px){
25304if(options==='options'&&typeof px==='object'){
25305return $.extend(optionOverrides,px);
25306}
25307var opts,$scroller,speed,delta;
25308var explicitOffset=getExplicitOffset(options);
25309var scrollTargetOffset={};
25310var scrollerOffset=0;
25311var offPos='offset';
25312var scrollDir='scrollTop';
25313var aniProps={};
25314var aniOpts={};
25315if(explicitOffset.px){
25316opts=$.extend({link:null},$.fn.smoothScroll.defaults,optionOverrides);
25317}else{
25318opts=$.extend({link:null},$.fn.smoothScroll.defaults,options||{},optionOverrides);
25319if(opts.scrollElement){
25320offPos='position';
25321if(opts.scrollElement.css('position')==='static'){
25322opts.scrollElement.css('position','relative');
25323}
25324}
25325if(px){
25326explicitOffset=getExplicitOffset(px);
25327}
25328}
25329scrollDir=opts.direction==='left'?'scrollLeft':scrollDir;
25330if(opts.scrollElement){
25331$scroller=opts.scrollElement;
25332if(!explicitOffset.px&&!(/^(?:HTML|BODY)$/).test($scroller[0].nodeName)){
25333scrollerOffset=$scroller[scrollDir]();
25334}
25335}else{
25336$scroller=$('html, body').firstScrollable(opts.direction);
25337}
25338opts.beforeScroll.call($scroller,opts);
25339scrollTargetOffset=explicitOffset.px?explicitOffset:{
25340relative:'',
25341px:($(opts.scrollTarget)[offPos]()&&$(opts.scrollTarget)[offPos]()[opts.direction])||0
25342};
25343aniProps[scrollDir]=scrollTargetOffset.relative+(scrollTargetOffset.px+scrollerOffset+opts.offset);
25344speed=opts.speed;
25345if(speed==='auto'){
25346delta=Math.abs(aniProps[scrollDir]-$scroller[scrollDir]());
25347speed=delta/opts.autoCoefficient;
25348}
25349aniOpts={
25350duration:speed,
25351easing:opts.easing,
25352complete:function(){
25353onAfterScroll(opts);
25354}
25355};
25356if(opts.step){
25357aniOpts.step=opts.step;
25358}
25359if($scroller.length){
25360$scroller.stop().animate(aniProps,aniOpts);
25361}else{
25362onAfterScroll(opts);
25363}
25364};
vendor: 4,342 bytes, lines 25365-25519
25365$.smoothScroll.version=version;
25366$.smoothScroll.filterPath=function(string){
25367string=string||'';
25368return string
25369.replace(/^\//,'')
25370.replace(/(?:index|default).[a-zA-Z]{3,4}$/,'')
25371.replace(/\/$/,'');
25372};
25373$.fn.smoothScroll.defaults=defaults;
25374}));
25375
25376
25377/* plugins/auto/zblobul_core/v6.9.30/plugins/jquery/jquery.easing.1.3.js?1790763342 */
25378
25379jQuery.easing['jswing']=jQuery.easing['swing'];
25380jQuery.extend(jQuery.easing,
25381{
25382def:'easeOutQuad',
25383swing:function(x,t,b,c,d){
25384return jQuery.easing[jQuery.easing.def](x,t,b,c,d);
25385},
25386easeInQuad:function(x,t,b,c,d){
25387return c*(t/=d)*t+b;
25388},
25389easeOutQuad:function(x,t,b,c,d){
25390return-c*(t/=d)*(t-2)+b;
25391},
25392easeInOutQuad:function(x,t,b,c,d){
25393if((t/=d/2)<1)return c/2*t*t+b;
25394return-c/2*((--t)*(t-2)-1)+b;
25395},
25396easeInCubic:function(x,t,b,c,d){
25397return c*(t/=d)*t*t+b;
25398},
25399easeOutCubic:function(x,t,b,c,d){
25400return c*((t=t/d-1)*t*t+1)+b;
25401},
25402easeInOutCubic:function(x,t,b,c,d){
25403if((t/=d/2)<1)return c/2*t*t*t+b;
25404return c/2*((t-=2)*t*t+2)+b;
25405},
25406easeInQuart:function(x,t,b,c,d){
25407return c*(t/=d)*t*t*t+b;
25408},
25409easeOutQuart:function(x,t,b,c,d){
25410return-c*((t=t/d-1)*t*t*t-1)+b;
25411},
25412easeInOutQuart:function(x,t,b,c,d){
25413if((t/=d/2)<1)return c/2*t*t*t*t+b;
25414return-c/2*((t-=2)*t*t*t-2)+b;
25415},
25416easeInQuint:function(x,t,b,c,d){
25417return c*(t/=d)*t*t*t*t+b;
25418},
25419easeOutQuint:function(x,t,b,c,d){
25420return c*((t=t/d-1)*t*t*t*t+1)+b;
25421},
25422easeInOutQuint:function(x,t,b,c,d){
25423if((t/=d/2)<1)return c/2*t*t*t*t*t+b;
25424return c/2*((t-=2)*t*t*t*t+2)+b;
25425},
25426easeInSine:function(x,t,b,c,d){
25427return-c*Math.cos(t/d*(Math.PI/2))+c+b;
25428},
25429easeOutSine:function(x,t,b,c,d){
25430return c*Math.sin(t/d*(Math.PI/2))+b;
25431},
25432easeInOutSine:function(x,t,b,c,d){
25433return-c/2*(Math.cos(Math.PI*t/d)-1)+b;
25434},
25435easeInExpo:function(x,t,b,c,d){
25436return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;
25437},
25438easeOutExpo:function(x,t,b,c,d){
25439return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;
25440},
25441easeInOutExpo:function(x,t,b,c,d){
25442if(t==0)return b;
25443if(t==d)return b+c;
25444if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;
25445return c/2*(-Math.pow(2,-10*--t)+2)+b;
25446},
25447easeInCirc:function(x,t,b,c,d){
25448return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;
25449},
25450easeOutCirc:function(x,t,b,c,d){
25451return c*Math.sqrt(1-(t=t/d-1)*t)+b;
25452},
25453easeInOutCirc:function(x,t,b,c,d){
25454if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;
25455return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;
25456},
25457easeInElastic:function(x,t,b,c,d){
25458var s=1.70158;var p=0;var a=c;
25459if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;
25460if(a<Math.abs(c)){a=c;var s=p/4;}
25461else var s=p/(2*Math.PI)*Math.asin(c/a);
25462return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
25463},
25464easeOutElastic:function(x,t,b,c,d){
25465var s=1.70158;var p=0;var a=c;
25466if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;
25467if(a<Math.abs(c)){a=c;var s=p/4;}
25468else var s=p/(2*Math.PI)*Math.asin(c/a);
25469return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;
25470},
25471easeInOutElastic:function(x,t,b,c,d){
25472var s=1.70158;var p=0;var a=c;
25473if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);
25474if(a<Math.abs(c)){a=c;var s=p/4;}
25475else var s=p/(2*Math.PI)*Math.asin(c/a);
25476if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
25477return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;
25478},
25479easeInBack:function(x,t,b,c,d,s){
25480if(s==undefined)s=1.70158;
25481return c*(t/=d)*t*((s+1)*t-s)+b;
25482},
25483easeOutBack:function(x,t,b,c,d,s){
25484if(s==undefined)s=1.70158;
25485return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;
25486},
25487easeInOutBack:function(x,t,b,c,d,s){
25488if(s==undefined)s=1.70158;
25489if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;
25490return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;
25491},
25492easeInBounce:function(x,t,b,c,d){
25493return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;
25494},
25495easeOutBounce:function(x,t,b,c,d){
25496if((t/=d)<(1/2.75)){
25497return c*(7.5625*t*t)+b;
25498}else if(t<(2/2.75)){
25499return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;
25500}else if(t<(2.5/2.75)){
25501return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;
25502}else{
25503return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;
25504}
25505},
25506easeInOutBounce:function(x,t,b,c,d){
25507if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;
25508return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;
25509}
25510});
25511
25512
25513/* plugins/auto/zblobul_core/v6.9.30/plugins/flexnav/jquery.flexnav.js?1790763342 */
25514
25515(function(){
25516var $;
25517$=jQuery;
25518$.fn.flexNav=function(options){
25519var $nav,$top_nav_items,breakpoint,count,nav_percent,nav_width,resetMenu,resizer,settings,showMenu,toggle_selector,touch_selector;
25520settings=$.extend({
25521'animationSpeed':250,
25522'transitionOpacity':true,
25523'buttonSelector':'.menu-button',
25524'hoverIntent':false,
25525'hoverIntentTimeout':150,
25526'calcItemWidths':false,
25527'hover':true
25528},options);
25529$nav=$(this);
25530$nav.addClass('with-js');
25531if(settings.transitionOpacity===true){
25532$nav.addClass('opacity');
25533}
25534$nav.find("li").each(function(){
25535if($(this).has("ul").length){
25536return $(this).addClass("item-with-ul").find("ul").hide();
25537}
25538});
25539if(settings.calcItemWidths===true){
25540$top_nav_items=$nav.find('>li');
25541count=$top_nav_items.length;
25542nav_width=100/count;
25543nav_percent=nav_width+"%";
25544}
25545if($nav.data('breakpoint')){
25546breakpoint=$nav.data('breakpoint');
25547}
25548showMenu=function(){
25549if($nav.hasClass('lg-screen')===true&&settings.hover===true){
25550if(settings.transitionOpacity===true){
25551return $(this).find('>ul').addClass('flexnav-show').stop(true,true).animate({
25552height:["toggle","swing"],
25553opacity:"toggle"
25554},settings.animationSpeed);
25555}else{
25556return $(this).find('>ul').addClass('flexnav-show').stop(true,true).animate({
25557height:["toggle","swing"]
25558},settings.animationSpeed);
25559}
25560}
25561};
25562resetMenu=function(){
25563if($nav.hasClass('lg-screen')===true&&$(this).find('>ul').hasClass('flexnav-show')===true&&settings.hover===true){
25564if(settings.transitionOpacity===true){
25565return $(this).find('>ul').removeClass('flexnav-show').stop(true,true).animate({
25566height:["toggle","swing"],
25567opacity:"toggle"
25568},settings.animationSpeed);
25569}else{
25570return $(this).find('>ul').removeClass('flexnav-show').stop(true,true).animate({
25571height:["toggle","swing"]
25572},settings.animationSpeed);
25573}
25574}
25575};
25576resizer=function(){
25577var selector;
25578if($(window).width()<=breakpoint){
25579$nav.removeClass("lg-screen").addClass("sm-screen");
25580if(settings.calcItemWidths===true){
25581$top_nav_items.css('width','100%');
25582}
25583selector=settings['buttonSelector']+', '+settings['buttonSelector']+' .touch-button';
25584$(selector).removeClass('active');
25585return $('.one-page li a').on('click',function(){
25586return $nav.removeClass('flexnav-show');
25587});
25588}else if($(window).width()>breakpoint){
25589$nav.removeClass("sm-screen").addClass("lg-screen");
25590if(settings.calcItemWidths===true){
25591$top_nav_items.css('width',nav_percent);
25592}
25593$nav.removeClass('flexnav-show').find('.item-with-ul').on();
25594$('.item-with-ul').find('ul').removeClass('flexnav-show').css('display','none');
25595resetMenu();
25596if(settings.hoverIntent===true){
25597return $('.item-with-ul').hoverIntent({
25598over:showMenu,
25599out:resetMenu,
25600timeout:settings.hoverIntentTimeout
25601});
25602}else if(settings.hoverIntent===false){
25603$('.item-with-ul').off('mouseenter').off('mouseleave');
25604return $('.item-with-ul').on('mouseenter',showMenu).on('mouseleave',resetMenu);
25605}
25606}
25607};
25608$(settings['buttonSelector']).data('navEl',$nav);
25609touch_selector='.item-with-ul, '+settings['buttonSelector'];
25610$(touch_selector).append('<span class="touch-button"><i></i></span>');
25611toggle_selector=settings['buttonSelector']+', '+settings['buttonSelector']+' .touch-button';
25612$(toggle_selector).on('click',function(e){
25613var $btnParent,$thisNav,bs;
25614$(toggle_selector).toggleClass('active');
25615e.preventDefault();
25616e.stopPropagation();
25617bs=settings['buttonSelector'];
25618$btnParent=$(this).is(bs)?$(this):$(this).parent(bs);
25619$thisNav=$btnParent.data('navEl');
25620return $thisNav.toggleClass('flexnav-show');
25621});
25622$('.touch-button').on('click',function(e){
25623var $sub,$touchButton;
25624$sub=$(this).parent('.item-with-ul').find('>ul');
25625$touchButton=$(this).parent('.item-with-ul').find('>span.touch-button');
25626if($nav.hasClass('lg-screen')===true){
25627$(this).parent('.item-with-ul').siblings().find('ul.flexnav-show').removeClass('flexnav-show').hide();
25628}
25629if($sub.hasClass('flexnav-show')===true){
25630$sub.removeClass('flexnav-show').slideUp(settings.animationSpeed);
25631return $touchButton.removeClass('active');
25632}else if($sub.hasClass('flexnav-show')===false){
25633$sub.addClass('flexnav-show').slideDown(settings.animationSpeed);
25634return $touchButton.addClass('active');
25635}
25636});
25637$nav.find('.item-with-ul *').focus(function(){
25638$(this).parent('.item-with-ul').parent().find(".open").not(this).removeClass("open").hide();
25639return $(this).parent('.item-with-ul').find('>ul').addClass("open").show();
25640});
25641resizer();
25642return $(window).on('resize',resizer);
25643};
25644}).call(this);
25645
25646
25647/* plugins/auto/zblobul_core/v6.9.30/plugins/liquidslider/js/jquery.touchSwipe.min.js?1790763342 */
25648(function(e){var o="left",n="right",d="up",v="down",c="in",w="out",l="none",r="auto",k="swipe",s="pinch",x="tap",i="doubletap",b="longtap",A="horizontal",t="vertical",h="all",q=10,f="start",j="move",g="end",p="cancel",a="ontouchstart"in window,y="TouchSwipe";var m={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"button, input, select, textarea, a, .noSwipe"};e.fn.swipe=function(D){var C=e(this),B=C.data(y);if(B&&typeof D==="string"){if(B[D]){return B[D].apply(this,Array.prototype.slice.call(arguments,1))}else{e.error("Method "+D+" does not exist on jQuery.swipe")}}else{if(!B&&(typeof D==="object"||!D)){return u.apply(this,arguments)}}return C};e.fn.swipe.defaults=m;e.fn.swipe.phases={PHASE_START:f,PHASE_MOVE:j,PHASE_END:g,PHASE_CANCEL:p};e.fn.swipe.directions={LEFT:o,RIGHT:n,UP:d,DOWN:v,IN:c,OUT:w};e.fn.swipe.pageScroll={NONE:l,HORIZONTAL:A,VERTICAL:t,AUTO:r};e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:h};function u(B){if(B&&(B.allowPageScroll===undefined&&(B.swipe!==undefined||B.swipeStatus!==undefined))){B.allowPageScroll=l}if(B.click!==undefined&&B.tap===undefined){B.tap=B.click}if(!B){B={}}B=e.extend({},e.fn.swipe.defaults,B);return this.each(function(){var D=e(this);var C=D.data(y);if(!C){C=new z(this,B);D.data(y,C)}})}function z(a0,aq){var av=(a||!aq.fallbackToMouseEvents),G=av?"touchstart":"mousedown",au=av?"touchmove":"mousemove",R=av?"touchend":"mouseup",P=av?null:"mouseleave",az="touchcancel";var ac=0,aL=null,Y=0,aX=0,aV=0,D=1,am=0,aF=0,J=null;var aN=e(a0);var W="start";var T=0;var aM=null;var Q=0,aY=0,a1=0,aa=0,K=0;var aS=null;try{aN.bind(G,aJ);aN.bind(az,a5)}catch(ag){e.error("events not supported "+G+","+az+" on jQuery.swipe")}this.enable=function(){aN.bind(G,aJ);aN.bind(az,a5);return aN};this.disable=function(){aG();return aN};this.destroy=function(){aG();aN.data(y,null);return aN};this.option=function(a8,a7){if(aq[a8]!==undefined){if(a7===undefined){return aq[a8]}else{aq[a8]=a7}}else{e.error("Option "+a8+" does not exist on jQuery.swipe.options")}};function aJ(a9){if(ax()){return}if(e(a9.target).closest(aq.excludedElements,aN).length>0){return}var ba=a9.originalEvent?a9.originalEvent:a9;var a8,a7=a?ba.touches[0]:ba;W=f;if(a){T=ba.touches.length}else{a9.preventDefault()}ac=0;aL=null;aF=null;Y=0;aX=0;aV=0;D=1;am=0;aM=af();J=X();O();if(!a||(T===aq.fingers||aq.fingers===h)||aT()){ae(0,a7);Q=ao();if(T==2){ae(1,ba.touches[1]);aX=aV=ap(aM[0].start,aM[1].start)}if(aq.swipeStatus||aq.pinchStatus){a8=L(ba,W)}}else{a8=false}if(a8===false){W=p;L(ba,W);return a8}else{ak(true)}}function aZ(ba){var bd=ba.originalEvent?ba.originalEvent:ba;if(W===g||W===p||ai()){return}var a9,a8=a?bd.touches[0]:bd;var bb=aD(a8);aY=ao();if(a){T=bd.touches.length}W=j;if(T==2){if(aX==0){ae(1,bd.touches[1]);aX=aV=ap(aM[0].start,aM[1].start)}else{aD(bd.touches[1]);aV=ap(aM[0].end,aM[1].end);aF=an(aM[0].end,aM[1].end)}D=a3(aX,aV);am=Math.abs(aX-aV)}if((T===aq.fingers||aq.fingers===h)||!a||aT()){aL=aH(bb.start,bb.end);ah(ba,aL);ac=aO(bb.start,bb.end);Y=aI();aE(aL,ac);if(aq.swipeStatus||aq.pinchStatus){a9=L(bd,W)}if(!aq.triggerOnTouchEnd||aq.triggerOnTouchLeave){var a7=true;if(aq.triggerOnTouchLeave){var bc=aU(this);a7=B(bb.end,bc)}if(!aq.triggerOnTouchEnd&&a7){W=ay(j)}else{if(aq.triggerOnTouchLeave&&!a7){W=ay(g)}}if(W==p||W==g){L(bd,W)}}}else{W=p;L(bd,W)}if(a9===false){W=p;L(bd,W)}}function I(a7){var a8=a7.originalEvent;if(a){if(a8.touches.length>0){C();return true}}if(ai()){T=aa}a7.preventDefault();aY=ao();Y=aI();if(a6()){W=p;L(a8,W)}else{if(aq.triggerOnTouchEnd||(aq.triggerOnTouchEnd==false&&W===j)){W=g;L(a8,W)}else{if(!aq.triggerOnTouchEnd&&a2()){W=g;aB(a8,W,x)}else{if(W===j){W=p;L(a8,W)}}}}ak(false)}function a5(){T=0;aY=0;Q=0;aX=0;aV=0;D=1;O();ak(false)}function H(a7){var a8=a7.originalEvent;if(aq.triggerOnTouchLeave){W=ay(g);L(a8,W)}}function aG(){aN.unbind(G,aJ);aN.unbind(az,a5);aN.unbind(au,aZ);aN.unbind(R,I);if(P){aN.unbind(P,H)}ak(false)}function ay(bb){var ba=bb;var a9=aw();var a8=aj();var a7=a6();if(!a9||a7){ba=p}else{if(a8&&bb==j&&(!aq.triggerOnTouchEnd||aq.triggerOnTouchLeave)){ba=g}else{if(!a8&&bb==g&&aq.triggerOnTouchLeave){ba=p}}}return ba}function L(a9,a7){var a8=undefined;if(F()||S()){a8=aB(a9,a7,k)}else{if((M()||aT())&&a8!==false){a8=aB(a9,a7,s)}}
vendor: 4,176 bytes, line 25648
25648if(aC()&&a8!==false){a8=aB(a9,a7,i)}else{if(al()&&a8!==false){a8=aB(a9,a7,b)}else{if(ad()&&a8!==false){a8=aB(a9,a7,x)}}}if(a7===p){a5(a9)}if(a7===g){if(a){if(a9.touches.length==0){a5(a9)}}else{a5(a9)}}return a8}function aB(ba,a7,a9){var a8=undefined;if(a9==k){aN.trigger("swipeStatus",[a7,aL||null,ac||0,Y||0,T]);if(aq.swipeStatus){a8=aq.swipeStatus.call(aN,ba,a7,aL||null,ac||0,Y||0,T);if(a8===false){return false}}if(a7==g&&aR()){aN.trigger("swipe",[aL,ac,Y,T]);if(aq.swipe){a8=aq.swipe.call(aN,ba,aL,ac,Y,T);if(a8===false){return false}}switch(aL){case o:aN.trigger("swipeLeft",[aL,ac,Y,T]);if(aq.swipeLeft){a8=aq.swipeLeft.call(aN,ba,aL,ac,Y,T)}break;case n:aN.trigger("swipeRight",[aL,ac,Y,T]);if(aq.swipeRight){a8=aq.swipeRight.call(aN,ba,aL,ac,Y,T)}break;case d:aN.trigger("swipeUp",[aL,ac,Y,T]);if(aq.swipeUp){a8=aq.swipeUp.call(aN,ba,aL,ac,Y,T)}break;case v:aN.trigger("swipeDown",[aL,ac,Y,T]);if(aq.swipeDown){a8=aq.swipeDown.call(aN,ba,aL,ac,Y,T)}break}}}if(a9==s){aN.trigger("pinchStatus",[a7,aF||null,am||0,Y||0,T,D]);if(aq.pinchStatus){a8=aq.pinchStatus.call(aN,ba,a7,aF||null,am||0,Y||0,T,D);if(a8===false){return false}}if(a7==g&&a4()){switch(aF){case c:aN.trigger("pinchIn",[aF||null,am||0,Y||0,T,D]);if(aq.pinchIn){a8=aq.pinchIn.call(aN,ba,aF||null,am||0,Y||0,T,D)}break;case w:aN.trigger("pinchOut",[aF||null,am||0,Y||0,T,D]);if(aq.pinchOut){a8=aq.pinchOut.call(aN,ba,aF||null,am||0,Y||0,T,D)}break}}}if(a9==x){if(a7===p||a7===g){clearTimeout(aS);if(V()&&!E()){K=ao();aS=setTimeout(e.proxy(function(){K=null;aN.trigger("tap",[ba.target]);if(aq.tap){a8=aq.tap.call(aN,ba,ba.target)}},this),aq.doubleTapThreshold)}else{K=null;aN.trigger("tap",[ba.target]);if(aq.tap){a8=aq.tap.call(aN,ba,ba.target)}}}}else{if(a9==i){if(a7===p||a7===g){clearTimeout(aS);K=null;aN.trigger("doubletap",[ba.target]);if(aq.doubleTap){a8=aq.doubleTap.call(aN,ba,ba.target)}}}else{if(a9==b){if(a7===p||a7===g){clearTimeout(aS);K=null;aN.trigger("longtap",[ba.target]);if(aq.longTap){a8=aq.longTap.call(aN,ba,ba.target)}}}}}return a8}function aj(){var a7=true;if(aq.threshold!==null){a7=ac>=aq.threshold}return a7}function a6(){var a7=false;if(aq.cancelThreshold!==null&&aL!==null){a7=(aP(aL)-ac)>=aq.cancelThreshold}return a7}function ab(){if(aq.pinchThreshold!==null){return am>=aq.pinchThreshold}return true}function aw(){var a7;if(aq.maxTimeThreshold){if(Y>=aq.maxTimeThreshold){a7=false}else{a7=true}}else{a7=true}return a7}function ah(a7,a8){if(aq.allowPageScroll===l||aT()){a7.preventDefault()}else{var a9=aq.allowPageScroll===r;switch(a8){case o:if((aq.swipeLeft&&a9)||(!a9&&aq.allowPageScroll!=A)){a7.preventDefault()}break;case n:if((aq.swipeRight&&a9)||(!a9&&aq.allowPageScroll!=A)){a7.preventDefault()}break;case d:if((aq.swipeUp&&a9)||(!a9&&aq.allowPageScroll!=t)){a7.preventDefault()}break;case v:if((aq.swipeDown&&a9)||(!a9&&aq.allowPageScroll!=t)){a7.preventDefault()}break}}}function a4(){var a8=aK();var a7=U();var a9=ab();return a8&&a7&&a9}function aT(){return!!(aq.pinchStatus||aq.pinchIn||aq.pinchOut)}function M(){return!!(a4()&&aT())}function aR(){var ba=aw();var bc=aj();var a9=aK();var a7=U();var a8=a6();var bb=!a8&&a7&&a9&&bc&&ba;return bb}function S(){return!!(aq.swipe||aq.swipeStatus||aq.swipeLeft||aq.swipeRight||aq.swipeUp||aq.swipeDown)}function F(){return!!(aR()&&S())}function aK(){return((T===aq.fingers||aq.fingers===h)||!a)}function U(){return aM[0].end.x!==0}function a2(){return!!(aq.tap)}function V(){return!!(aq.doubleTap)}function aQ(){return!!(aq.longTap)}function N(){if(K==null){return false}var a7=ao();return(V()&&((a7-K)<=aq.doubleTapThreshold))}function E(){return N()}function at(){return((T===1||!a)&&(isNaN(ac)||ac===0))}function aW(){return((Y>aq.longTapThreshold)&&(ac<q))}function ad(){return!!(at()&&a2())}function aC(){return!!(N()&&V())}function al(){return!!(aW()&&aQ())}function C(){a1=ao();aa=event.touches.length+1}function O(){a1=0;aa=0}function ai(){var a7=false;if(a1){var a8=ao()-a1;if(a8<=aq.fingerReleaseThreshold){a7=true}}return a7}function ax(){return!!(aN.data(y+"_intouch")===true)}function ak(a7){if(a7===true){aN.bind(au,aZ);aN.bind(R,I);if(P){aN.bind(P,H)}}else{aN.unbind(au,aZ,false);aN.unbind(R,I,false);
25648if(P){aN.unbind(P,H,false)}}aN.data(y+"_intouch",a7===true)}function ae(a8,a7){var a9=a7.identifier!==undefined?a7.identifier:0;aM[a8].identifier=a9;aM[a8].start.x=aM[a8].end.x=a7.pageX||a7.clientX;aM[a8].start.y=aM[a8].end.y=a7.pageY||a7.clientY;return aM[a8]}function aD(a7){var a9=a7.identifier!==undefined?a7.identifier:0;var a8=Z(a9);a8.end.x=a7.pageX||a7.clientX;a8.end.y=a7.pageY||a7.clientY;return a8}function Z(a8){for(var a7=0;a7<aM.length;a7++){if(aM[a7].identifier==a8){return aM[a7]}}}function af(){var a7=[];for(var a8=0;a8<=5;a8++){a7.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0})}return a7}function aE(a7,a8){a8=Math.max(a8,aP(a7));J[a7].distance=a8}function aP(a7){return J[a7].distance}function X(){var a7={};a7[o]=ar(o);a7[n]=ar(n);a7[d]=ar(d);a7[v]=ar(v);return a7}function ar(a7){return{direction:a7,distance:0}}function aI(){return aY-Q}function ap(ba,a9){var a8=Math.abs(ba.x-a9.x);var a7=Math.abs(ba.y-a9.y);return Math.round(Math.sqrt(a8*a8+a7*a7))}function a3(a7,a8){var a9=(a8/a7)*1;return a9.toFixed(2)}function an(){if(D<1){return w}else{return c}}function aO(a8,a7){return Math.round(Math.sqrt(Math.pow(a7.x-a8.x,2)+Math.pow(a7.y-a8.y,2)))}function aA(ba,a8){var a7=ba.x-a8.x;var bc=a8.y-ba.y;var a9=Math.atan2(bc,a7);var bb=Math.round(a9*180/Math.PI);if(bb<0){bb=360-Math.abs(bb)}return bb}function aH(a8,a7){var a9=aA(a8,a7);if((a9<=45)&&(a9>=0)){return o}else{if((a9<=360)&&(a9>=315)){return o}else{if((a9>=135)&&(a9<=225)){return n}else{if((a9>45)&&(a9<135)){return v}else{return d}}}}}function ao(){var a7=new Date();return a7.getTime()}function aU(a7){a7=e(a7);var a9=a7.offset();var a8={left:a9.left,right:a9.left+a7.outerWidth(),top:a9.top,bottom:a9.top+a7.outerHeight()};return a8}function B(a7,a8){return(a7.x>a8.left&&a7.x<a8.right&&a7.y>a8.top&&a7.y<a8.bottom)}}})(jQuery);
25649
25650
25651/* plugins/auto/zblobul_core/v6.9.30/plugins/liquidslider/js/jquery.liquid-slider.min.js?1790763342 */
25652"function"!=typeof Object.create&&(Object.create=function(a){"use strict";function b(){}return b.prototype=a,new b}),function(a,b,c,d){"use strict";a.fn.liquidSlider=function(b){return this.each(function(){var c=Object.create(LiquidSlider);c.init(b,this),a.data(this,"liquidSlider",c)})},a.fn.liquidSlider.options={autoHeight:!0,minHeight:0,heightEaseDuration:1500,heightEaseFunction:"easeInOutExpo",slideEaseDuration:1500,slideEaseFunction:"easeInOutExpo",slideEaseFunctionFallback:"swing",animateIn:"bounceInRight",animateOut:"bounceOutRight",continuous:!0,fadeInDuration:500,fadeOutDuration:500,autoSlide:!1,autoSlideDirection:"right",autoSlideInterval:6e3,forceAutoSlide:!1,pauseOnHover:!1,dynamicArrows:!0,dynamicArrowsGraphical:!0,dynamicArrowLeftText:"&#171; left",dynamicArrowRightText:"right &#187;",hideSideArrows:!1,hideSideArrowsDuration:750,hoverArrows:!0,hoverArrowDuration:250,dynamicTabs:!0,dynamicTabsHtml:!0,includeTitle:!0,panelTitleSelector:".title",dynamicTabsAlign:"left",dynamicTabsPosition:"top",navElementTag:"div",firstPanelToLoad:1,hashLinking:!1,hashTitleSelector:".title",keyboardNavigation:!1,leftKey:39,rightKey:37,panelKeys:{1:49,2:50,3:51,4:52},responsive:!0,mobileNavigation:!0,mobileNavDefaultText:"Menu",mobileUIThreshold:0,hideArrowsWhenMobile:!0,hideArrowsThreshold:0,useCSSMaxWidth:3e3,preload:function(){var a=this;jQuery(b).bind("load",function(){a.finalize()})},onload:function(){},pretransition:function(){this.transition()},callback:function(){},preloader:!1,swipe:!0,swipeArgs:d}}(jQuery,window,document);var LiquidSlider={};LiquidSlider.init=function(a,b){var c=this;c.elem=b,c.$elem=jQuery(b),jQuery(".no-js").removeClass("no-js"),c.sliderId="#"+c.$elem.attr("id"),c.$sliderId=jQuery(c.sliderId),c.options=jQuery.extend({},jQuery.fn.liquidSlider.options,a),c.pSign=c.options.responsive?"%":"px",c.determineAnimationType(),c.options.responsive||(c.options.mobileNavigation=!1,c.options.hideArrowsWhenMobile=!1),"animate.css"===c.options.slideEaseFunction&&(c.useCSS?(c.options.continuous=!1,c.animateCSS=!0):c.options.slideEaseFunction=c.options.slideEaseFunctionFallback),c.build(),c.events(),!c.options.responsive&&c.options.dynamicArrows&&c.$sliderWrap.width(c.$sliderId.outerWidth(!0)+c.leftArrow.outerWidth(!0)+c.rightArrow.outerWidth(!0)),c.loaded=!0,c.options.preload.call(c)},LiquidSlider.build=function(){var a,b=this;"ls-wrapper"!==b.$sliderId.parent().attr("class")&&b.$sliderId.wrap('<div id="'+b.$elem.attr("id")+'-wrapper" class="ls-wrapper"></div>'),b.$sliderWrap=jQuery(b.sliderId+"-wrapper"),b.options.preloader&&b.addPreloader(),jQuery(b.sliderId).children().addClass(b.$elem.attr("id")+"-panel ls-panel"),b.panelClass=b.sliderId+" ."+b.$elem.attr("id")+"-panel:not(.clone)",b.$panelClass=jQuery(b.panelClass),b.$panelClass.wrapAll('<div class="panel-container"></div>'),b.$panelClass.wrapInner('<div class="panel-wrapper"></div>'),b.panelContainer=b.$panelClass.parent(),b.$panelContainer=b.panelContainer,b.options.hashLinking&&b.buildHashTags(),"fade"===b.options.slideEaseFunction&&(b.$panelClass.addClass("fade"),b.options.continuous=!1,b.fade=!0),b.options.dynamicTabs?b.addNavigation():b.options.mobileNavigation=!1,b.options.dynamicArrows?b.addArrows():(b.options.hoverArrows=!1,b.options.hideSideArrows=!1,b.options.hideArrowsWhenMobile=!1),a=b.$leftArrow&&"absolute"===b.$leftArrow.css("position")?0:1,b.totalSliderWidth=b.$sliderId.outerWidth(!0)+jQuery(b.$leftArrow).outerWidth(!0)*a+jQuery(b.$rightArrow).outerWidth(!0)*a,jQuery(b.$sliderWrap).css("width",b.totalSliderWidth),b.options.dynamicTabs&&b.alignNavigation(),b.options.hideSideArrows&&(b.options.continuous=!1),b.options.continuous&&(b.$panelContainer.prepend(b.$panelContainer.children().last(
25652).clone().addClass("clone")),b.$panelContainer.append(b.$panelContainer.children().eq(1).clone().addClass("clone")));var c=b.options.continuous?2:0;b.panelCount=jQuery(b.panelClass).length,b.panelCountTotal=b.fade?1:b.panelCount+c,b.panelWidth=jQuery(b.panelClass).outerWidth(),b.totalWidth=b.panelCountTotal*b.panelWidth,jQuery(b.sliderId+" .panel-container").css("width",b.totalWidth),b.slideDistance=b.options.responsive?100:jQuery(b.sliderId).outerWidth(),b.useCSS&&b.options.responsive&&(b.totalWidth=100*b.panelCountTotal,b.slideDistance=100/b.panelCountTotal),b.options.responsive&&b.makeResponsive(),b.prepareTransition(b.getFirstPanel(),!0),b.updateClass()},LiquidSlider.determineAnimationType=function(){var a=this,b="animation",c="",d="Webkit Moz O ms Khtml".split(" "),e="",f=0;if(a.useCSS=!1,a.elem.style.animationName&&(a.useCSS=!0),a.useCSS===!1)for(f=0;f<d.length;f++)if(void 0!==a.elem.style[d[f]+"AnimationName"]){e=d[f],b=e+"Animation",c="-"+e.toLowerCase()+"-",a.useCSS=!0;break}document.documentElement.clientWidth>a.options.useCSSMaxWidth&&(a.useCSS=!1)},LiquidSlider.configureCSSTransitions=function(a,b){var c,d,e,f,g=this;g.easing={easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175,.885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"},e=g.easing[g.options.slideEaseFunction]||g.options.slideEaseFunction,f=g.easing[g.options.heightEaseFunction]||g.options.heightEaseFunction,g.useCSS&&(c="all "+(a||g.options.slideEaseDuration)+"ms "+e,d="all "+(b||g.options.heightEaseDuration)+"ms "+f,jQuery(g.panelContainer).css({"-webkit-transition":c,"-moz-transition":c,"-ms-transition":c,"-o-transition":c,transition:c}),g.options.autoHeight&&g.$sliderId.css({"-webkit-transition":d,"-moz-transition":d,"-ms-transition":d,"-o-transition":d,transition:d}))},LiquidSlider.transitionFade=function(){var a=this;jQuery(a.panelClass).eq(a.nextPanel).fadeTo(a.options.fadeInDuration,1).css("z-index",1),jQuery(a.panelClass).eq(a.prevPanel).fadeTo(a.options.fadeOutDuration,0).css("z-index",0),a.callback(a.options.callback,!0)},LiquidSlider.hover=function(){var a=this;a.$sliderWrap.hover(function(){a.options.hoverArrows&&a.hideShowArrows(a.options.fadeInDuration,!0,!0,!1),a.options.pauseOnHover&&clearTimeout(a.autoSlideTimeout)},function(){a.options.hoverArrows&&a.hideShowArrows(a.options.fadeOutnDuration,!0,!1,!0),a.options.pauseOnHover&&a.options.autoSlide&&a.startAutoSlide(!0)})},LiquidSlider.events=function(){var a=this;a.options.dynamicArrows&&a.registerArrows(),a.options.dynamicTabs&&a.registerNav(),a.options.swipe&&a.registerTouch(),a.options.keyboardNavigation&&a.registerKeyboard(),a.$sliderWrap.find("*").on("click",function(){a.options.forceAutoSlide?a.startAutoSlide(!0):a.options.autoSlide&&a.stopAutoSlide()}),a.hover()},LiquidSlider.setNextPanel=function(a){var b=this;a!==b.nextPanel&&(b.prevPanel=b.nextPanel,b.loaded&&("number"==typeof a?b.nextPanel=a:(b.nextPanel+=~~("right"===a)||-1,b.options.continuous||(b.nextPanel=b.nextPanel<0?b.panelCount-1:b.nextPanel%b.panelCount)),b.fade||b.animateCSS?b.prepareTransition(b.nextPanel):b.verifyPanel()))},LiquidSlider.getFirstPanel=function(){var a,b=this;return b.options.hashLinking&&(a=jQuery.inArray(b.convertRegex(window.location.hash),b.hashLinks),-1===a&&(a=0)),a?a:b.options.firstPanelToLoad-1},LiquidSlider.getFromPanel=function(a,b){var c=this;return c.convertRegex(c.$panelClass.find(a).eq(b).text())},LiquidSlider.convertRegex=function(a){return(a==null?'':String(a)).trim().replace(/[^\w -]+/g,"").replace(/ +/g,"-").toLowerCase()},LiquidSlider.updateClass=function(a){var b=this;b.options.dynamicTabs&&jQuery(b.$sliderWrap).find("> .ls-nav .tab"+b.sanitizeNumber(b.nextPanel)).addClass("current").siblings().removeClass("current"),b.$panelClass.eq(b.sanitizeNumber(b.nextPanel)-1).addClass("currentPanel").siblings().removeClass("currentPanel"),b.$clones=jQuery(b.sliderId+" .clone"),!b.options.continuous||-1!==b.nextPanel&&b.nextPanel!==b.panelCount?b.$clones.removeClass("currentPanel"):b.$clones.addClass("currentPanel"),a&&($(".ls-current").removeClass("ls-current"),a.addClass("ls-current"))}
25652,LiquidSlider.sanitizeNumber=function(a){var b=this;switch(!0){case a>=b.panelCount:return 1;case-1>=a:return b.panelCount;default:return a+1}},LiquidSlider.finalize=function(){var a=this,b=a.options.autoHeight?a.getHeight():a.getHeighestPanel(a.nextPanel);a.options.autoHeight&&a.adjustHeight(!0,b),a.options.autoSlide&&a.autoSlide(),a.options.preloader&&a.removePreloader(),a.onload()},LiquidSlider.callback=function(a,b){var c=this;a&&c.loaded&&(c.useCSS&&"undefined"!=typeof b?jQuery(".panel-container").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){a.call(c)}):setTimeout(function(){a.call(c)},c.options.slideEaseDuration+50))},LiquidSlider.onload=function(){var a=this;a.options.onload.call(a)},LiquidSlider.prepareTransition=function(a,b,c,d){var e=this;e.nextPanel=a||0,c||e.pretransition(e.options.pretransition),e.noAnimation=b,e.noPosttransition=d,!e.loaded||c?e.transition():e.options.pretransition.call(e)},LiquidSlider.pretransition=function(){var a=this;a.options.hashLinking&&a.updateHashTags(),a.options.mobileNavigation&&a.dropdownSelect.val("tab"+(a.nextPanel+1)),a.options.hideSideArrows&&a.hideShowArrows(),a.updateClass()},LiquidSlider.getTransitionMargin=function(){var a=this;return-(a.nextPanel*a.slideDistance)-a.slideDistance*~~a.options.continuous},LiquidSlider.transition=function(){var a=this,b=a.getTransitionMargin();if(a.animateCSS&&a.loaded)return a.transitionOutAnimateCSS(),!1;if(b+a.pSign!==a.panelContainer.css("margin-left")||-100!==b)switch(a.options.autoHeight&&!a.animateCSS&&a.adjustHeight(!0,a.getHeight()),!0){case a.fade:a.transitionFade();break;case a.animateCSS:a.transitionInAnimateCSS(b);break;case a.useCSS:a.transitionCSS(b,a.noAnimation);break;default:a.transitionjQuery(b,a.noAnimation)}a.noPosttransition||a.callback(a.options.callback)},LiquidSlider.transitionOutAnimateCSS=function(){var a=this;jQuery(a.panelClass).removeClass(a.options.animateIn+" animated"),jQuery(a.panelClass).eq(a.prevPanel).addClass("animated "+a.options.animateOut),a.callback(a.transitionInAnimateCSS,void 0)},LiquidSlider.transitionInAnimateCSS=function(){var a=this;a.options.autoHeight&&a.adjustHeight(!1,a.getHeight()),a.transitionCSS(a.getTransitionMargin(),!a.loaded),jQuery(a.panelClass).removeClass(a.options.animateOut+" animated"),jQuery(a.panelClass).eq(a.nextPanel).addClass("animated "+a.options.animateIn),a.callback(a.options.callback,void 0)},LiquidSlider.transitionCSS=function(a,b){var c=this;b&&c.configureCSSTransitions("0","0"),c.panelContainer.css({"-webkit-transform":"translate3d("+a+c.pSign+", 0, 0)","-moz-transform":"translate3d("+a+c.pSign+", 0, 0)","-ms-transform":"translate3d("+a+c.pSign+", 0, 0)","-o-transform":"translate3d("+a+c.pSign+", 0, 0)",transform:"translate3d("+a+c.pSign+", 0, 0)"}),b?c.callback(function(){c.configureCSSTransitions()}):c.configureCSSTransitions()},LiquidSlider.transitionjQuery=function(a,b){var c=this;b?c.panelContainer.css("margin-left",a+c.pSign):c.panelContainer.animate({"margin-left":a+c.pSign},{easing:jQuery.easing.hasOwnProperty(c.options.slideEaseFunction)?c.options.slideEaseFunction:c.options.slideEaseFunctionFallback,duration:c.options.slideEaseDuration,queue:!1})},LiquidSlider.getHeight=function(a){var b=this;return a=a||b.$panelClass.eq(b.sanitizeNumber(b.nextPanel)-1).outerHeight(!0),a=a<b.options.minHeight?b.options.minHeight:a},LiquidSlider.getHeighestPanel=function(){var a,b=this,c=0;return b.$panelClass.each(function(){a=jQuery(this).outerHeight(!0),c=a>c?a:c}),b.options.autoHeight?c:void 0},LiquidSlider.verifyPanel=function(){var a=this,b=!1;if(a.options.continuous)switch(!0){case a.nextPanel>a.panelCount:a.nextPanel=a.panelCount,a.setNextPanel(a.panelCount);break;case a.nextPanel<-1:a.nextPanel=-1,a.setNextPanel(-1);break;case b||a.nextPanel===a.panelCount||-1===a.nextPanel:a.prepareTransition(a.nextPanel),a.updateClass(),clearTimeout(c);var c=setTimeout(function(){a.nextPanel===a.panelCount?a.prepareTransition(0,!0,!0,!0):-1===a.nextPanel&&a.prepareTransition(a.panelCount-1,!0,!0,!0)},a.options.slideEaseDuration+50);break;default:b=!0,a.prepareTransition(a.nextPanel)}else a.nextPanel===a.panelCount?a.nextPanel=0:-1===a.nextPanel&&(a.nextPanel=a.panelCount-1),a.prepareTransition(a.nextPanel)},LiquidSlider.addNavigation=function(a){var b=this,c="<"+b.options.navElementTag+' class="ls-nav"><ul id="'+b.$elem.attr("id")+'-nav-ul"></ul></'+b.options.navElementTag+">";if("bottom"===b.options.dynamicTabsPosition?b.$sliderId.after(c):b.$sliderId.before(c),b.options.mobileNavigation){var d=b.options.mobileNavDefaultText?'<option disabled="disabled" selected="selected">'+b.options.mobileNavDefaultText+"</option>":null,e='<div class="ls-select-box"><select id="'+b.$elem.attr("id")+'-nav-select" name="navigation">'+d+"</select></div>";b.navigation=jQuery(b.sliderId+"-nav-ul").before(e),b.dropdown=jQuery(b.sliderId+"-wrapper .ls-select-box"),b.dropdownSelect=jQuery(b.sliderId+"-nav-select"),jQuery.each(b.$elem.find(b.options.panelTitleSelector),function(a){jQuery(b.$sliderWrap).find(".ls-select-box select").append('<option value="tab'+(a+1)+'">'+jQuery(this).text()+"</option>")})}jQuery.each(b.$elem.find(b.options.panelTitleSelector),function(c){jQuery(b.$sliderWrap).find(".ls-nav ul").append('<li class="tab'+(c+1)+'"><a class="'+(a||"")+'" href="#'+(c+1)+'">'+b.getNavInsides(this)+"</a></li>"),b.options.includeTitle||jQuery(this).remove()})},LiquidSlider.getNavInsides=function(a){return this.options.dynamicTabsHtml?jQuery(a).html():jQuery(a).text()},LiquidSlider.alignNavigation=function(){var a=this,b=a.options.dynamicArrowsGraphical?"-arrow":"";"center"!==a.options.dynamicTabsAlign&&(a.options.responsive||jQuery(a.$sliderWrap).find(".ls-nav ul").css("margin-"+a.options.dynamicTabsAlign,jQuery(a.$sliderWrap).find(".ls-nav-"+a.options.dynamicTabsAlign+b).outerWidth(!0)+parseInt(a.$sliderId.css("margin-"+a.options.dynamicTabsAlign),10)),jQuery(a.$sliderWrap).find(".ls-nav ul").css("float",a.options.dynamicTabsAlign)),a.totalNavWidth=jQuery(a.$sliderWrap).find(".ls-nav ul").outerWidth(!0),"center"===a.options.dynamicTabsAlign&&(a.totalNavWidth=0,jQuery(a.$sliderWrap).find(".ls-nav li a").each(function(){a.totalNavWidth+=jQuery(this).outerWidth(!0)}),jQuery(a.$sliderWrap).find(".ls-nav ul").css("width",a.totalNavWidth+1))},LiquidSlider.registerNav=function(){var a=this;a.$sliderWrap.find("[class^=ls-nav] li").on("click",function(b){return b.preventDefault(),a.setNextPanel(parseInt(j
25652Query(this).attr("class").split("tab")[1],10)-1),!1})},LiquidSlider.addArrows=function(a){var b=this,c=b.options.dynamicArrowsGraphical?"-arrow ":" ";b.$sliderWrap.addClass("arrows"),b.options.dynamicArrowsGraphical&&(b.options.dynamicArrowLeftText="",b.options.dynamicArrowRightText=""),b.$sliderId.before('<div class="ls-nav-left'+c+(a||"")+'"><a href="#">'+b.options.dynamicArrowLeftText+"</a></div>"),b.$sliderId.after('<div class="ls-nav-right'+c+(a||"")+'"><a href="#">'+b.options.dynamicArrowRightText+"</a></div>"),b.leftArrow=jQuery(b.sliderId+"-wrapper [class^=ls-nav-left]").css("visibility","hidden").addClass("ls-hidden"),b.rightArrow=jQuery(b.sliderId+"-wrapper [class^=ls-nav-right]").css("visibility","hidden").addClass("ls-hidden"),b.options.hoverArrows||b.hideShowArrows(void 0,!0,!0,!1)},LiquidSlider.hideShowArrows=function(a,b,c,d){var e=this,f="undefined"!=typeof a?a:e.options.fadeOutDuration,g="undefined"!=typeof a?a:e.options.fadeInDuration,h=b?"visible":"hidden";c||!d&&1!==e.sanitizeNumber(e.nextPanel)?(c||e.leftArrow.hasClass("ls-hidden"))&&e.leftArrow.stop().css("visibility","visible").fadeTo(g,1).removeClass("ls-hidden"):e.leftArrow.stop().fadeTo(f,0,function(){jQuery(this).css("visibility",h).addClass("ls-hidden")}),c||!d&&e.sanitizeNumber(e.nextPanel)!==e.panelCount?(c||e.rightArrow.hasClass("ls-hidden"))&&e.rightArrow.stop().css("visibility","visible").fadeTo(g,1).removeClass("ls-hidden"):e.rightArrow.stop().fadeTo(f,0,function(){jQuery(this).css("visibility",h).addClass("ls-hidden")})},LiquidSlider.registerArrows=function(){var a=this;jQuery(a.$sliderWrap.find("[class^=ls-nav-]")).on("click",function(b){b.preventDefault(),a.setNextPanel(jQuery(this).attr("class").split(" ")[0].split("-")[2])})},LiquidSlider.adjustHeight=function(a,b,c,d){var e=this;return a||e.useCSS?(a&&e.configureCSSTransitions("0","0"),e.$sliderId.height(b),void(a&&e.configureCSSTransitions())):void e.$sliderId.animate({height:b+"px"},{easing:jQuery.easing.hasOwnProperty(c||e.options.heightEaseFunction)?c||e.options.heightEaseFunction:e.options.slideEaseFunctionFallback,duration:d||e.options.heightEaseDuration,queue:!1})},LiquidSlider.autoSlide=function(){var a=this;a.options.autoSlideInterval<a.options.slideEaseDuration&&(a.options.autoSlideInterval=a.options.slideEaseDuration>a.options.heightEaseDuration?a.options.slideEaseDuration:a.options.heightEaseDuration),a.autoSlideTimeout=document.hasFocus()?setTimeout(function(){a.setNextPanel(a.options.autoSlideDirection),a.autoSlide()},a.options.autoSlideInterval):void 0,jQuery(window).on("focus",function(){a.startAutoSlide(!0)}),jQuery(window).on("blur",function(){a.stopAutoSlide()})},LiquidSlider.stopAutoSlide=function(){var a=this;a.options.autoSlide=!1,clearTimeout(a.autoSlideTimeout)},LiquidSlider.startAutoSlide=function(a){var b=this;b.options.autoSlide=!0,a||b.setNextPanel(b.options.autoSlideDirection),b.autoSlide(clearTimeout(b.autoSlideTimeout))},LiquidSlider.buildHashTags=function(){var a=this;a.hashLinks=[],jQuery(a.panelClass+" "+a.options.hashTitleSelector).each(function(){a.hashLinks.push(a.convertRegex($(this).text()))})},LiquidSlider.updateHashTags=function(){var a=this;window.location.hash=a.hashLinks[a.sanitizeNumber(a.nextPanel)-1]},LiquidSlider.registerKeyboard=function(){var a=this;jQuery(document).keydown(function(b){var c=b.keyCode||b.which;"textarea"!==b.target.type&&"textbox"!==b.target.type&&(a.options.forceAutoSlide||jQuery(this).trigger("click"),c===a.options.leftKey&&a.setNextPanel("r
25652ight"),c===a.options.rightKey&&a.setNextPanel("left"),jQuery.each(a.options.panelKeys,function(b,d){c===d&&a.setNextPanel(b-1)}))})},LiquidSlider.addPreloader=function(){var a=this;jQuery(a.sliderId+"-wrapper").append('<div class="ls-preloader"></div>')},LiquidSlider.removePreloader=function(){var a=this;jQuery(a.sliderId+"-wrapper .ls-preloader").fadeTo("slow",0,function(){jQuery(this).remove()})},LiquidSlider.makeResponsive=function(){var a=this;jQuery(a.sliderId+"-wrapper").addClass("ls-responsive").css({"max-width":jQuery(a.sliderId+" .ls-panel:first-child").width(),width:"100%"}),jQuery(a.sliderId+" .panel-container").css("width",100*a.panelCountTotal+a.pSign),jQuery(a.sliderId+" .ls-panel").css("width",100/a.panelCountTotal+a.pSign),jQuery(a.sliderId+" .ls-panel").css("width",jQuery(a.sliderId).outerWidth(!0)),a.options.hideArrowsWhenMobile&&(a.leftWrapperPadding=jQuery(a.sliderId+"-wrapper").css("padding-left"),a.rightWrapperPadding=a.$sliderWrap.css("padding-right")),a.responsiveEvents(),jQuery(window).bind("resize orientationchange",function(){a.responsiveEvents(),clearTimeout(a.resizingTimeout),a.resizingTimeout=setTimeout(function(){var b=a.options.autoHeight?a.getHeight():a.getHeighestPanel(a.nextPanel);a.adjustHeight(!1,b),jQuery(a.sliderId+" .ls-panel").css("width",jQuery(a.sliderId).outerWidth(!0))},500)})},LiquidSlider.responsiveEvents=function(){var a=this,b=a.options.hideArrowsThreshold||a.options.mobileUIThreshold||a.totalNavWidth+10;a.$sliderId.outerWidth()<b?(a.options.mobileNavigation&&(a.navigation.css("display","none"),a.dropdown.css("display","block"),a.dropdownSelect.css("display","block"),jQuery(a.sliderId+"-nav-select").val(a.options.mobileNavDefaultText)),a.options.dynamicArrows&&(a.options.hideArrowsWhenMobile?(a.leftArrow.remove().length=0,a.rightArrow.remove().length=0):a.options.dynamicArrowsGraphical||(a.leftArrow.css("margin-"+a.options.dynamicTabsPosition,"0"),a.rightArrow.css("margin-"+a.options.dynamicTabsPosition,"0")))):(a.options.mobileNavigation&&(a.navigation.css("display","block"),a.dropdown.css("display","none"),a.dropdownSelect.css("display","none")),a.options.dynamicArrows&&(!a.options.hideArrowsWhenMobile||a.leftArrow.length&&a.rightArrow.length?!a.options.dynamicArrowsGraphical&&a.options.mobileNavigation&&(a.leftArrow.css("margin-"+a.options.dynamicTabsPosition,a.navigation.css("height")),a.rightArrow.css("margin-"+a.options.dynamicTabsPosition,a.navigation.css("height"))):(a.addArrows(),a.registerArrows()))),jQuery(a.sliderId+"-wrapper").css("width","100%"),a.loaded&&jQuery(a.sliderId+" .ls-panel").width(100/a.panelCountTotal+a.pSign),a.options.mobileNavigation&&a.dropdownSelect.change(function(){a.setNextPanel(parseInt(jQuery(this).val().split("tab")[1],10)-1)})},LiquidSlider.registerTouch=function(){var a=this,b=a.options.swipeArgs||{fallbackToMouseEvents:!1,allowPageScroll:"vertical",swipe:function(b,c){return"up"===c||"down"===c?!1:(a.swipeDir="left"===c?"right":"left",void a.setNextPanel(a.swipeDir))}};jQuery(a.sliderId+" .ls-panel").swipe(b)};
25653
25654
25655/* plugins/auto/zblobul_core/v6.9.30/plugins/masonry/imagesloaded.pkgd.min.js?1790763342 */
25656
25657!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
25658function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;
vendor: 4,234 bytes, lines 25658-25661
25658function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
25659
25660
25661/* plugins/auto/zblobul_core/v6.9.30/plugins/masonry/masonry.pkgd.min.js?1790763342
vendor: 23,971 bytes, lines 25661-25663
25661 */
25662
25663!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
25663
25664
25665
25666/* plugins/auto/zblobul_core/v6.9.30/plugins/accordion/js/jquery.accordion.js?1790763342 */
25667(function(window,$,undefined){
25668var $event=$.event,resizeTimeout;
25669$event.special.smartresize={
25670setup:function(){
25671$(this).on("resize",$event.special.smartresize.handler);
25672},
25673teardown:function(){
25674$(this).off("resize",$event.special.smartresize.handler);
25675},
25676handler:function(event,execAsap){
25677var context=this,
25678args=arguments;
25679event.type="smartresize";
25680if(resizeTimeout){clearTimeout(resizeTimeout);}
25681resizeTimeout=setTimeout(function(){
25682jQuery.event.dispatch.apply(context,args);
25683},execAsap==="execAsap"?0:100);
25684}
25685};
25686$.fn.smartresize=function(fn){
25687return fn?this.on("smartresize",fn):this.trigger("smartresize",["execAsap"]);
25688};
25689$.Accordion=function(options,element){
25690this.$el=$(element);
25691this.$items=this.$el.children('ul').children('li');
25692this.itemsCount=this.$items.length;
25693this._init(options);
25694};
25695$.Accordion.defaults={
25696open:-1,
25697oneOpenedItem:false,
25698speed:600,
25699easing:'easeInOutExpo',
25700scrollSpeed:900,
25701scrollEasing:'easeInOutExpo'
25702};
25703$.Accordion.prototype={
25704_init:function(options){
25705this.options=$.extend(true,{},$.Accordion.defaults,options);
25706this._validate();
25707this.current=this.options.open;
25708this.$items.find('div.st-content').hide();
25709this._saveDimValues();
25710if(this.current!=-1)
25711this._toggleItem(this.$items.eq(this.current));
25712this._initEvents();
25713},
25714_saveDimValues:function(){
25715this.$items.each(function(){
25716var $item=$(this);
25717$item.data({
25718originalHeight:$item.find('a:first').height(),
25719offsetTop:$item.offset().top
25720});
25721});
25722},
25723_validate:function(){
25724if(this.options.open<-1||this.options.open>this.itemsCount-1)
25725this.options.open=-1;
25726},
25727_initEvents:function(){
25728var instance=this;
25729this.$items.find('a:first').bind('click.accordion',function(event){
25730var $item=$(this).parent();
25731if(instance.options.oneOpenedItem&&instance._isOpened()&&instance.current!==$item.index()){
25732instance._toggleItem(instance.$items.eq(instance.current));
25733}
25734instance._toggleItem($item);
25735return false;
25736});
25737$(window).bind('smartresize.accordion',function(event){
25738instance._saveDimValues();
25739instance.$el.find('li.st-open').each(function(){
25740var $this=$(this);
25741$this.css('height',$this.data('originalHeight')+$this.find('div.st-content').outerHeight(true));
25742});
25743});
25744},
25745_isOpened:function(){
25746return(this.$el.find('li.st-open').length>0);
25747},
25748_toggleItem:function($item){
25749var $content=$item.find('div.st-content');
25750($item.hasClass('st-open'))
25751?(this.current=-1,$content.stop(true,true).fadeOut(this.options.speed),$item.removeClass('st-open').stop().animate({
25752height:$item.data('originalHeight')
25753},this.options.speed,this.options.easing))
25754:(this.current=$item.index(),$content.stop(true,true).fadeIn(this.options.speed),$item.addClass('st-open').stop().animate({
25755height:$item.data('originalHeight')+$content.outerHeight(true)
25756},this.options.speed,this.options.easing)
25757)
25758},
25759_scroll:function(instance){
25760var instance=instance||this,current;
25761(instance.current!==-1)?current=instance.current:current=instance.$el.find('li.st-open:last').index();
25762$('html, body').stop().animate({
25763scrollTop:(instance.options.oneOpenedItem)?instance.$items.eq(current).data('offsetTop'):instance.$items.eq(current).offset().top
25764},instance.options.scrollSpeed,instance.options.scrollEasing);
25765}
25766};
25767var logError=function(message){
25768if(this.console){
25769console.error(message);
25770}
25771};
25772$.fn.accordion=function(options){
25773if(typeof options==='string'){
25774var args=Array.prototype.slice.call(arguments,1);
25775this.each(function(){
25776var instance=$.data(this,'accordion');
25777if(!instance){
25778logError("cannot call methods on accordion prior to initialization; "+
25779"attempted to call method '"+options+"'");
25780return;
25781}
25782if(typeof instance[options]!=="function"||options.charAt(0)==="_"){
25783logError("no such method '"+options+"' for accordion instance");
25784return;
25785}
25786instance[options].apply(instance,args);
25787});
25788}
25789else{
25790this.each(function(){
25791var instance=$.data(this,'accordion');
25792if(!instance){
25793$.data(this,'accordion',new $.Accordion(options,this));
25794}
25795});
25796}
25797return this;
25798};
25799})(window,jQuery);
25800
25801
25802/* plugins/auto/association/v6.10.2.3/javascript/inscription-evenement-tarifs.js?1790948514 */
25803
25804(function($){
25805function viderTarifMasque(saisie){
25806var selection=$(saisie).find('input[type="radio"]:checked');
25807if(!selection.length){
25808return;
25809}
25810selection.prop('checked',false);
25811window.setTimeout(function(){
25812selection.trigger('change');
25813},0);
25814}
25815$(document).on('afficher_si_masque_post','.association_tarif_numero',function(event){
25816if(event.target===this){
25817viderTarifMasque(this);
25818}
25819});
25820function nettoyerTarifsMasques(){
25821$('.association_tarif_numero.afficher_si_masque').each(function(){
25822viderTarifMasque(this);
25823});
25824}
25825$(nettoyerTarifsMasques);
25826if(typeof onAjaxLoad==='function'){
25827onAjaxLoad(nettoyerTarifsMasques);
25828}
25829})(jQuery);
25830
25831
25832/* plugins-dist/mediabox/lib/lity/lity.js?1790327464 */
25833
25834(function(window,factory){
25835if(typeof define==='function'&&define.amd){
25836define(['jquery'],function($){
25837return factory(window,$);
25838});
25839}else if(typeof module==='object'&&typeof module.exports==='object'){
25840module.exports=factory(window,require('jquery'));
25841}else{
25842window.lity=factory(window,window.jQuery||window.Zepto);
25843}
25844}(typeof window!=="undefined"?window:this,function(window,$){
25845'use strict';
25846var document=window.document;
25847var _win=$(window);
25848var _deferred=$.Deferred;
25849var _html=$('html');
25850var _instances=[];
25851var _attrAriaHidden='aria-hidden';
25852var _dataAriaHidden='lity-'+_attrAriaHidden;
25853var _focusableElementsSelector='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not
25853([tabindex^="-"])';
25854var _defaultOptions={
25855esc:true,
25856handler:null,
25857handlers:{
25858image:imageHandler,
25859inline:inlineHandler,
25860iframe:iframeHandler
25861},
25862forceFocusInside:false,
25863template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'
25864};
25865var _imageRegexp=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i;
25866var _transitionEndEvent=(function(){
25867var el=document.createElement('div');
25868var transEndEventNames={
25869WebkitTransition:'webkitTransitionEnd',
25870MozTransition:'transitionend',
25871OTransition:'oTransitionEnd otransitionend',
25872transition:'transitionend'
25873};
25874for(var name in transEndEventNames){
25875if(el.style[name]!==undefined){
25876return transEndEventNames[name];
25877}
25878}
25879return false;
25880})();
25881function transitionEnd(element){
25882var deferred=_deferred();
25883if(!_transitionEndEvent||!element.length){
25884deferred.resolve();
25885}else{
25886element.one(_transitionEndEvent,deferred.resolve);
25887setTimeout(deferred.resolve,500);
25888}
25889return deferred.promise();
25890}
25891function settings(currSettings,key,value){
25892if(arguments.length===1){
25893return $.extend({},currSettings);
25894}
25895if(typeof key==='string'){
25896if(typeof value==='undefined'){
25897return typeof currSettings[key]==='undefined'
25898?null
25899:currSettings[key];
25900}
25901currSettings[key]=value;
25902}else{
25903$.extend(currSettings,key);
25904}
25905return this;
25906}
25907function parseQueryParams(params){
25908var pos=params.indexOf('?');
25909if(pos>-1){
25910params=params.substr(pos+1);
25911}
25912var pairs=decodeURI(params.split('#')[0]).split('&');
25913var obj={},p;
25914for(var i=0,n=pairs.length;i<n;i++){
25915if(!pairs[i]){
25916continue;
25917}
25918p=pairs[i].split('=');
25919obj[p[0]]=p[1];
25920}
25921return obj;
25922}
25923function appendQueryParams(url,params){
25924if(!params){
25925return url;
25926}
25927if('string'===$.type(params)){
25928params=parseQueryParams(params);
25929}
25930if(url.indexOf('?')>-1){
25931var split=url.split('?');
25932url=split.shift();
25933params=$.extend(
25934{},
25935parseQueryParams(split[0]),
25936params
25937)
25938}
25939return url+'?'+$.param(params);
25940}
25941function transferHash(originalUrl,newUrl){
25942var pos=originalUrl.indexOf('#');
25943if(-1===pos){
25944return newUrl;
25945}
25946if(pos>0){
25947originalUrl=originalUrl.substr(pos);
25948}
25949return newUrl+originalUrl;
25950}
25951function iframe(iframeUrl,instance,queryParams,hashUrl){
25952instance&&instance.element().addClass('lity-iframe');
25953if(queryParams){
25954iframeUrl=appendQueryParams(iframeUrl,queryParams);
25955}
25956if(hashUrl){
25957iframeUrl=transferHash(hashUrl,iframeUrl);
25958}
25959return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+iframeUrl+'"/></div>';
25960}
25961function error(msg){
25962return $('<span class="lity-error"></span>').append(msg);
25963}
25964function imageHandler(target,instance){
25965var desc=(instance.opener()&&instance.opener().data('lity-desc'))||'Image with no description';
25966var img=$('<img src="'+target+'" alt="'+desc+'"/>');
25967var deferred=_deferred();
25968var failed=function(){
25969deferred.reject(error('Failed loading image'));
25970};
25971img
25972.on('load',function(){
25973if(this.naturalWidth===0){
25974return failed();
25975}
25976deferred.resolve(img);
25977})
25978.on('error',failed)
25979;
25980return deferred.promise();
25981}
25982imageHandler.test=function(target){
25983return _imageRegexp.test(target);
25984};
25985function inlineHandler(target,instance){
25986var el,placeholder,hasHideClass;
25987try{
25988el=$(target);
25989}catch(e){
25990return false;
25991}
25992if(!el.length){
25993return false;
25994}
25995placeholder=$('<i style="display:none !important"></i>');
25996hasHideClass=el.hasClass('lity-hide');
25997instance
25998.element()
25999.one('lity:remove',function(){
26000placeholder
26001.before(el)
26002.remove()
26003;
26004if(hasHideClass&&!el.closest('.lity-content').length){
26005el.addClass('lity-hide');
26006}
26007})
26008;
26009return el
26010.removeClass('lity-hide')
26011.after(placeholder)
26012;
26013}
26014function iframeHandler(target,instance){
26015return iframe(target,instance);
26016}
26017function winHeight(){
26018return document.documentElement.clientHeight
26019?document.documentElement.clientHeight
26020:Math.round(_win.height());
26021}
26022function keydown(e){
26023var current=currentInstance();
26024if(!current){
26025return;
26026}
26027if(e.keyCode===27&&!!current.options('esc')){
26028current.close();
26029}
26030if(e.keyCode===9){
26031handleTabKey(e,current);
26032}
26033}
26034function handleTabKey(e,instance){
26035var focusableElements=instance.element().find(_focusableElementsSelector);
26036var focusedIndex=focusableElements.index(document.activeElement);
26037if(e.shiftKey&&focusedIndex<=0){
26038focusableElements.get(focusableElements.length-1).focus();
26039e.preventDefault();
26040}else if(!e.shiftKey&&focusedIndex===focusableElements.length-1){
26041focusableElements.get(0).focus();
26042e.preventDefault();
26043}
26044if(focusedIndex===-1&&instance.options().forceFocusInside){
26045focusableElements.get(0).focus();
26046e.preventDefault();
26047}
26048}
26049function resize(){
26050$.each(_instances,function(i,instance){
26051instance.resize();
26052});
26053}
26054function registerInstance(instanceToRegister){
26055if(1===_instances.unshift(instanceToRegister)){
26056_html.addClass('lity-active');
26057_win
26058.on({
26059resize:resize,
26060keydown:keydown
26061})
26062;
26063}
26064$('body > *').not(instanceToRegister.element())
26065.addClass('lity-hidden')
26066.each(function(){
26067var el=$(this);
26068if(undefined!==el.data(_dataAriaHidden)){
26069return;
26070}
26071el.data(_dataAriaHidden,el.attr(_attrAriaHidden)||null);
26072})
26073.attr(_attrAriaHidden,'true')
26074;
26075}
26076function removeInstance(instanceToRemove){
26077var show;
26078instanceToRemove
26079.element()
26080.attr(_attrAriaHidden,'true')
26081;
26082if(1===_instances.length){
26083_html.removeClass('lity-active');
26084_win
26085.off({
26086resize:resize,
26087keydown:keydown
26088})
26089;
26090}
26091_instances=$.grep(_instances,function(instance){
26092return instanceToRemove!==instance;
26093});
26094if(!!_instances.length){
26095show=_instances[0].element();
26096}else{
26097show=$('.lity-hidden');
26098}
26099show
26100.removeClass('lity-hidden')
26101.each(function(){
26102var el=$(this),oldAttr=el.data(_dataAriaHidden);
26103if(!oldAttr){
26104el.removeAttr(_attrAriaHidden);
26105}else{
26106el.attr(_attrAriaHidden,oldAttr);
26107}
26108el.removeData(_dataAriaHidden);
26109})
26110;
26111}
26112function currentInstance(){
26113if(0===_instances.length){
26114return null;
26115}
26116return _instances[0];
26117}
26118function factory(target,instance,handlers,preferredHandler){
26119var handler='inline',content;
26120var currentHandlers=$.extend({},handlers);
26121if(preferredHandler&&currentHandlers[preferredHandler]){
26122content=currentHandlers[preferredHandler](target,instance);
26123handler=preferredHandler;
26124}else{
26125$.each(['inline','iframe'],function(i,name){
26126delete currentHandlers[name];
26127currentHandlers[name]=handlers[name];
26128});
26129$.each(currentHandlers,function(name,currentHandler){
26130if(!currentHandler){
26131return true;
26132}
26133if(
26134currentHandler.test&&
26135!currentHandler.test(target,instance)
26136){
26137return true;
26138}
26139content=currentHandler(target,instance);
26140if(false!==content){
26141handler=name;
26142return false;
26143}
26144});
26145}
26146return{handler:handler,content:content||''};
26147}
26148function Lity(target,options,opener,activeElement){
26149var self=this;
26150var result;
26151var isReady=false;
26152var isClosed=false;
26153var element;
26154var content;
26155options=$.extend(
26156{},
26157_defaultOptions,
26158options
26159);
26160element=$(options.template);
26161self.element=function(){
26162return element;
26163};
26164self.opener=function(){
26165return opener;
26166};
26167self.content=function(){
26168return content;
26169};
26170self.options=$.proxy(settings,self,options);
26171self.handlers=$.proxy(settings,self,options.handlers);
26172self.resize=function(){
26173if(!isReady||isClosed){
26174return;
26175}
26176content
26177.css('max-height',winHeight()+'px')
26178.trigger('lity:resize',[self])
26179;
26180};
26181self.close=function(){
26182if(isClosed){
26183return;
26184}
26185isClosed=true;
26186removeInstance(self);
26187var deferred=_deferred();
26188if(
26189activeElement&&
26190(
26191document.activeElement===element[0]||
26192$.contains(element[0],document.activeElement)
26193)
26194){
26195try{
26196activeElement.focus();
26197}catch(e){
26198}
26199}
26200var trigerable=(content?content:element);
26201trigerable.trigger('lity:close',[self]);
26202element
26203.removeClass('lity-opened')
26204.addClass('lity-closed')
26205;
26206transitionEnd(trigerable.add(element))
26207.always(function(){
26208trigerable.trigger('lity:remove',[self]);
26209element.remove();
26210element=undefined;
26211deferred.resolve();
26212})
26213;
26214return deferred.promise();
26215};
26216result=factory(target,self,options.handlers,options.handler);
26217element
26218.attr(_attrAriaHidden,'false')
26219.addClass('lity-loading lity-opened lity-'+result.handler)
26220.appendTo('body')
26221.focus()
26222.on('click','[data-lity-close]',function(e){
26223if($(e.target).is('[data-lity-close]')){
26224self.close();
26225}
26226})
26227.trigger('lity:open',[self])
26228;
26229registerInstance(self);
26230$.when(result.content)
26231.always(ready)
26232;
26233function ready(result){
26234if(isClosed){
26235return;
26236}
26237content=$(result)
26238.css('max-height',winHeight()+'px')
26239;
26240element
26241.find('.lity-loader')
26242.each(function(){
26243var loader=$(this);
26244transitionEnd(loader)
26245.always(function(){
26246loader.remove();
26247})
26248;
26249})
26250;
26251element
26252.removeClass('lity-loading')
26253.find('.lity-content')
26254.empty()
26255.append(content)
26256;
26257isReady=true;
26258content
26259.trigger('lity:ready',[self])
26260;
26261}
26262}
26263function lity(target,options,opener){
26264if(!target.preventDefault){
26265opener=$(opener);
26266}else{
26267target.preventDefault();
26268opener=$(this);
26269target=opener.data('lity-target')||opener.attr('href')||opener.attr('src');
26270}
26271var instance=new Lity(
26272target,
26273$.extend(
26274{},
26275opener.data('lity-options')||opener.data('lity'),
26276options
26277),
26278opener,
26279document.activeElement
26280);
26281if(!target.preventDefault){
26282return instance;
26283}
26284}
26285lity.version='3.0.0-dev';
26286lity.options=$.proxy(settings,lity,_defaultOptions);
26287lity.handlers=$.proxy(settings,lity,_defaultOptions.handlers);
26288lity.current=currentInstance;
26289lity.iframe=iframe;
26290$(document).on('click.lity','[data-lity]',lity);
26291return lity;
26292}));
26293
26294
26295/* plugins-dist/mediabox/lity/js/lity.mediabox.js?1790327464 */
26296;
26297(function($){
26298var litySpip={
26299nameSpace:'mediabox',
26300config:{
26301forceFocusInside:true,
26302},
26303strings:{
26304},
26305callbacks:{
26306onOpen:[],
26307onShow:[],
26308onClose:[]
26309},
26310focusedItem:[],
26311isTransition:false,
26312adjustHeight:function(instance){
26313var $content=instance.content();
26314var $containerHeight=instance.element().find('.lity-container').height();
26315if($containerHeight){
26316var h=Math.round($containerHeight)+'px';
26317$content
26318.css('max-height',h)
26319.find('[data-'+litySpip.nameSpace+'-force-max-height]')
26320.css('max-height',h);
26321}
26322},
26323template:function(cfg,type,groupName,groupPosition,groupLength){
26324var className='';
26325if(!!cfg.className){
26326className=' '+cfg.className;
26327}
26328if(cfg.transitionOnOpen){
26329className+=' lity-transition-on-open-'+cfg.transitionOnOpen;
26330}
26331if(!!cfg.noTransition){
26332className+=' lity-no-transition';
26333}
26334if(!!cfg.slideShow){
26335className+=' lity-slideshow';
26336}
26337var styles=[];
26338var styles_container='';
26339var styles_content='';
26340if(cfg.sideBar){
26341className+=' lity-sidebar lity-sidebar-'+cfg.sideBar;
26342if(cfg.sideBar==='start'||cfg.sideBar==='end'){
26343className+=' lity-sidebar-inline';
26344cfg.height='100vh';
26345cfg.maxHeight='100vh';
26346}
26347if(cfg.sideBar==='top'||cfg.sideBar==='bottom'){
26348className+=' lity-sidebar-block';
26349cfg.width='100vw';
26350cfg.maxWidth='100vw';
26351}
26352}
26353if(cfg.maxWidth){
26354styles.push("max-width:"+cfg.maxWidth.replace("%","vw"));
26355}
26356if(cfg.maxHeight){
26357styles.push("max-height:"+cfg.maxHeight.replace("%","vh"));
26358}
26359if(cfg.width){
26360styles.push("width:"+cfg.width.replace("%","vw"));
26361className+=' lity-width-set';
26362}
26363if(cfg.height){
26364styles.push("height:"+cfg.height.replace("%","vh"));
26365className+=' lity-height-set';
26366if(cfg.minHeight){
26367styles.push("min-height:"+cfg.minHeight.replace("%","vh"));
26368}
26369}
26370if(styles.length){
26371styles_container=' style="'+styles.join(';')+'"';
26372}
26373styles=[];
26374var max;
26375if(cfg.minWidth){
26376max=(cfg.maxWidth?cfg.maxWidth.replace("%","vw"):'95vw');
26377styles.push("min-width:min("+max+","+cfg.minWidth.replace("%","vw")+')');
26378}
26379if(cfg.minHeight&&!cfg.height){
26380max=(cfg.maxHeight?cfg.maxHeight.replace("%","vw"):'95vh');
26381styles.push("min-height:min("+max+","+cfg.minHeight.replace("%","vh")+')');
26382}
26383if(styles.length){
26384styles_content=' style="'+styles.join(';')+'"';
26385}
26386var button_next_prev='',
26387button_start_stop='',
26388group_info_text='',
26389group_info='';
26390if(groupName&&groupLength){
26391if(groupLength>1){
26392var newPosition=(groupPosition<=0?groupLength-1:groupPosition-1);
26393button_next_prev+='<button class="lity-previous" type="button" data-group-name="'+groupName+'" data-group-position="'+newPosition+'" aria-label="'+litySpip.strings.previous+'" data-lity-previous'
26394+'><b title="'+litySpip.strings.previous+'">❮</b></button>';
26395newPosition=(groupPosition>=groupLength-1?0:groupPosition+1);
26396button_next_prev+='<button class="lity-next" type="button" data-group-name="'+groupName+'" data-group-position="'+newPosition+'"  aria-label="'+litySpip.strings.next+'" data-lity-next'
26397+'><b title="'+litySpip.strings.next+'">❯</b></button>';
26398}
26399group_info_text=" "+litySpip.strings.current;
26400group_info_text=group_info_text.replace('{current}',(groupPosition+1)+'');
26401group_info_text=group_info_text.replace('{total}',groupLength+'');
26402button_start_stop+='<button class="lity-start-stop" type="button" data-lity-stop-start>'
26403+'<b class="lity-start" aria-label="'+litySpip.strings.slideshowStart+'" title="'+litySpip.strings.slideshowStart+'">▶</b>'
26404+'<b class="lity-stop" aria-label="'+litySpip.strings.slideshowStop+'" title="'+litySpip.strings.slideshowStop+'">□</b>'
26405+'</button>';
26406group_info='<div class="lity-group-caption">'
26407+'<span class="lity-group-start-stop">'+button_start_stop+'</span>'
26408+'<span class="lity-group-current">'+group_info_text+'</span>'
26409+'<span class="lity-group-next-prev">'+button_next_prev+'</span>'
26410+'<span class="lity-group-progress-bar"><span class="lity-group-progress-bar-status" style="width:0"></span></span>'
26411+'</div>';
26412}
26413var close_button_aria_label=litySpip.strings.close+' ('+litySpip.strings.press_escape+')';
26414var dialog_title=(type==='image'?litySpip.strings.dialog_title_med:litySpip.strings.dialog_title_def);
26415dialog_title+=group_info_text+' ('+litySpip.strings.press_escape+')';
26416var t=
26417'<dialog class="box_mediabox box_modalbox lity'+className+'" role="dialog" aria-label="'+dialog_title+'" tabindex="-1">'
26418+'<div class="lity-wrap"'+(cfg.overlayClose===false?'':' data-lity-close')+' role="document">'
26419+'<div class="lity-loader" aria-hidden="true" aria-label="'+litySpip.strings.loading+'"><span class="box-loading"></span></div>'
26420+'<div class="lity-container"'+styles_container+'>'
26421+'<button class="lity-close" type="button" aria-label="'+close_button_aria_label+'" data-lity-close><b data-lity-close title="'+litySpip.strings.close+'">&times;</b></button>'
26422+'<div class="lity-content"'+styles_content+'></div>'
26423+group_info
26424+'</div>'
26425+'</div>'
26426+'</dialog>';
26427return t;
26428},
26429failHandler:function(target,instance){
26430return'<div class="error lity-error">Failed loading content</div>';
26431},
26432ajaxHandler:function(target,instance){
26433var selector,
26434off=target.indexOf(" ");
26435if(off>-1){
26436selector=target.slice(off);
26437selector=selector.match(/[^\x20\t\r\n\f]+/g)||[];
26438selector=selector.join(" ");
26439target=target.slice(0,off);
26440}
26441if(jQuery.spip.preloaded_urls[target]){
26442var content=jQuery.spip.preloaded_urls[target];
26443if(selector){
26444content=$("<div>").append($.parseHTML(content)).find(selector);
26445}
26446return $('<div class="lity-content-inner"></div>').append(content);
26447}
26448var _deferred=$.Deferred;
26449var deferred=_deferred();
26450var failed=function(){
26451deferred.reject($('<span class="error lity-error"></span>').append('Failed loading ajax'));
26452};
26453$.get(target)
26454.done(function(content){
26455jQuery.spip.preloaded_urls[target]=content;
26456if(selector){
26457content=$("<div>").append($.parseHTML(content)).find(selector);
26458}
26459deferred.resolve($('<div class="lity-content-inner"></div>').append(content));
26460})
26461.fail(failed);
26462return deferred.promise();
26463},
26464imageBuildContent:function(img,desc,longdesc,defaultCaptionClass){
26465img.attr('alt',desc?desc:'');
26466desc=(longdesc?longdesc:desc);
26467if(desc){
26468defaultCaptionClass=(defaultCaptionClass?defaultCaptionClass:'expanded');
26469var id='lity-image-caption-'+Date.now().toString(36)+Math.random().toString(36).substr(2);
26470img.attr('aria-describedby',id);
26471img=$('<figure class="lity-image-figure"></figure>').append(img).append('<figcaption id="'+id+'" class="lity-image-caption '+defaultCaptionClass+'"><div class="lity-image-caption-text">'+desc+'</div></figcaption>');
26472}
26473else{
26474img=$('<figure class="lity-image-figure"></figure>').append(img);
26475}
26476return img;
26477},
26478imageHandler:function(target,instance){
26479var _deferred=$.Deferred;
26480var desc='';
26481var longdesc='';
26482var defaultCaptionClass=(instance.options().defaultCaptionState==='min'?'min':'expanded');
26483var opener=instance.opener();
26484if(opener){
26485desc=opener.attr('title')||$('img[alt]',opener).eq(0).attr('alt')||'';
26486var by=opener.attr('aria-describedby')||$('img[aria-describedby]',opener).eq(0).attr('aria-describedby')||'';
26487if(by){
26488longdesc=$('#'+by).html();
26489longdesc=longdesc.trim();
26490}
26491if(!desc){
26492desc=desc||instance.opener().attr('aria-label')||'';
26493}
26494desc=desc.trim();
26495}
26496var img;
26497var cache=opener.data('lity-image-cache')||{};
26498if(cache[target]){
26499img=cache[target];
26500img=litySpip.imageBuildContent(img,desc,longdesc,defaultCaptionClass);
26501return img;
26502}
26503img=$('<img src="'+target+'" class="lity-image-img" data-'+litySpip.nameSpace+'-force-max-height />');
26504var deferred=_deferred();
26505var failed=function(){
26506deferred.reject($('<span class="error lity-error"></span>').append('Failed loading image'));
26507};
26508img
26509.on('load',function(){
26510if(this.naturalWidth===0){
26511img.attr("style","width:25vw;");
26512}
26513cache[target]=img;
26514opener.data('lity-image-cache',cache);
26515deferred.resolve(litySpip.imageBuildContent(img,desc,longdesc,defaultCaptionClass));
26516})
26517.on('error',failed)
26518;
26519return deferred.promise();
26520},
26521groupElements:function(groupName){
26522return $('.lity-enabled[data-'+litySpip.nameSpace+'-group'+'='+groupName+']');
26523},
26524eventSet:{},
26525setEvents:function(what){
26526if(!litySpip.eventSet[what]){
26527switch(what){
26528case'opener':
26529$(document).on('click','.lity-enabled',litySpip.onClickOpener);
26530break;
26531case'listener':
26532$(document).on('click','.lity-previous,.lity-next',litySpip.onPrevNext);
26533$(document).on('click','.lity-start-stop',litySpip.onSlideShowToggle);
26534$(window).on('keyup',litySpip.onKeyUp);
26535$(document).on('click','.lity-image-caption',litySpip.onCaptionToggle);
26536break;
26537}
26538litySpip.eventSet[what]=true;
26539}
26540},
26541onKeyUp:function(event){
26542var c={37:"previous",39:"next"}[event.keyCode];
26543if(c){
26544var current=lity.current();
26545if(current){
26546jQuery('.lity-'+c,current.element()).trigger('click');
26547}
26548}
26549},
26550onCaptionToggle:function(event){
26551var $caption=$(this);
26552$caption.toggleClass('min expanded');
26553},
26554openerFromPrevNext($button){
26555var groupName=$button.data('group-name');
26556var groupPosition=$button.data('group-position');
26557return litySpip.groupElements(groupName).eq(groupPosition);
26558},
26559onPrevNext:function(event){
26560var $button=$(this);
26561var newEl=litySpip.openerFromPrevNext($button);
26562if(newEl){
26563var element=lity.current().element();
26564litySpip.isTransition={oldClosed:false,newOpened:true};
26565element.addClass('lity-no-transition').css('visibility','hidden');
26566litySpip.slideshowStop(element);
26567var options={transitionOnOpen:$button.is('.lity-next')?'slide-from-right':'slide-from-left'};
26568if(element.is('.lity-slideshow')){
26569options.slideShow=true;
26570}
26571lity.current().close();
26572litySpip.elementOpener(newEl,options);
26573}
26574},
26575slideshowStart:function(element){
26576var $progress=element.find('.lity-group-progress-bar-status');
26577$progress.attr('style','');
26578$progress.css('width','100%');
26579var delay=litySpip.config.slideshowSpeed;
26580setTimeout(function(){
26581$progress.css('transition','width '+((delay-200)/1000)+'s linear');
26582$progress.css('width','0');
26583},200);
26584timer=setTimeout(function(){element.find('.lity-next').trigger('click')},delay);
26585element.data('lity-timer',timer);
26586$('.lity-start',element).attr('aria-hidden','true');
26587$('.lity-stop',element).attr('aria-hidden','false');
26588jQuery('.lity-start-stop',element).focus();
26589},
26590slideshowStop:function(element){
26591timer=element.data('lity-timer');
26592if(timer){
26593clearTimeout(timer);
26594}
26595},
26596onSlideShowToggle:function(event){
26597var $button=$(this);
26598var element=$button.closest('.lity');
26599var slideShowState=(element.is('.lity-slideshow')?true:false);
26600var timer;
26601if(!slideShowState){
26602litySpip.slideshowStart(element);
26603}
26604else{
26605litySpip.slideshowStop(element);
26606$('.lity-start',element).attr('aria-hidden','false');
26607$('.lity-stop',element).attr('aria-hidden','true');
26608}
26609element.toggleClass('lity-slideshow');
26610},
26611onClickOpener:function(event){
26612event.preventDefault();
26613var opener=$(this);
26614litySpip.elementOpener(opener);
26615},
26616elementOpener:function(opener,options){
26617var cfg=opener.data('mediabox-options');
26618if(options){
26619cfg=$.extend({},cfg,options);
26620}
26621var target=opener.data('href-popin')||opener.data('href')||opener.attr('href')||opener.attr('src');
26622litySpip.lityOpener(target,cfg,opener.get(0));
26623},
26624lityOpener:function(target,cfg,opener){
26625litySpip.setEvents('listener');
26626if(!litySpip.isTransition){
26627litySpip.callbacks.onOpen.push(cfg.onOpen||false);
26628litySpip.callbacks.onShow.push(cfg.onShow||false);
26629litySpip.callbacks.onClose.push(cfg.onClose||false);
26630litySpip.focusedItem.push($(document.activeElement));
26631}
26632var type=cfg.type||'';
26633if(!type&&opener){
26634type=$(opener).data(litySpip.nameSpace+'-type')||'';
26635}
26636var handlers=lity.handlers();
26637if(type==='ajax'){
26638handlers.ajax=litySpip.ajaxHandler;
26639}
26640handlers.image=litySpip.imageHandler;
26641if(type==='inline'){
26642var el=[];
26643try{
26644el=$(target);
26645}catch(e){
26646el=[];
26647}
26648if(!el.length){
26649handlers.inline=litySpip.failHandler;
26650}
26651}
26652cfg=$.extend({handlers:handlers},cfg);
26653if(type&&['image','inline','ajax','iframe'].indexOf(type)!==-1){
26654cfg.handler=type;
26655}
26656if(opener&&typeof($.parseMediaboxOptions)!=="undefined"){
26657cfg=$.extend(cfg,$.parseMediaboxOptions(litySpip.nameSpace,opener));
26658}
26659if(!!cfg.preloadOnly){
26660litySpip.lityPreLoader(target,cfg,opener);
26661}
26662else{
26663var groupPosition=0;
26664var groupLength=0;
26665if(opener){
26666var groupName=cfg.rel||(opener?$(opener).data(litySpip.nameSpace+'-group'):'');
26667if(groupName){
26668var elements=litySpip.groupElements(groupName);
26669groupPosition=elements.index($(opener));
26670groupLength=elements.length;
26671}
26672}
26673cfg=$.extend({template:litySpip.template(cfg,type,groupName,groupPosition,groupLength)},cfg);
26674if(cfg.samePopin){
26675var l=lity.current();
26676if(l){
26677l.close();
26678}
26679}
26680lity(target,cfg,opener);
26681}
26682},
26683lityPreLoader:function(target,cfg,opener){
26684if(cfg.handler&&cfg.handlers[cfg.handler]){
26685if(cfg.handler==='image'||cfg.handler==='ajax'){
26686var instance={
26687opener:function(){return $(opener);},
26688options:function(){return cfg}
26689};
26690var content=cfg.handlers[cfg.handler](target,instance);
26691}
26692}
26693},
26694ajaxReloadElements:function(elements){
26695const targets=elements
26696.split(',')
26697.map(s=>s.trim())
26698.filter(Boolean);
26699targets.forEach(function(target){
26700try{
26701if(/^[.#[]/.test(target)){
26702const $element=$(target);
26703if($element.length){
26704$element.ajaxReload();
26705}
26706}else{
26707ajaxReload(target);
26708}
26709}catch(e){
26710console.warn("Mediabox ajaxReloadElements : erreur lors du traitement de '"+target+"'.",e);
26711}
26712});
26713}
26714}
26715jQuery.fn.extend({
26716mediabox:function(options){
26717var cfg=$.extend({},litySpip.config,options);
26718if(this===jQuery.fn){
26719var href=cfg.href||"";
26720litySpip.lityOpener(href,cfg,null);
26721return this;
26722}else{
26723if(cfg.rel){
26724this.attr('data-'+litySpip.nameSpace+'-group',cfg.rel);
26725}
26726else{
26727this.each(function(){
26728var rel=$(this).attr('rel');
26729if(rel){
26730$(this).attr('data-'+litySpip.nameSpace+'-group',rel);
26731}
26732});
26733}
26734litySpip.setEvents('opener');
26735this
26736.data('mediabox-options',cfg)
26737.addClass('lity-enabled');
26738(cfg.preload?this:this.filter('[data-'+litySpip.nameSpace+'-preload]')).each(function(){
26739litySpip.elementOpener($(this),{preloadOnly:true});
26740});
26741return this;
26742}
26743},
26744mediaboxClose:function(){
26745var $current=lity.current();
26746if($current){
26747$current.close();
26748return true;
26749}
26750return false;
26751}
26752});
26753var initConfig=function(){
26754var b=typeof(mediabox_settings)=='object'?mediabox_settings:{};
26755litySpip.nameSpace=b.ns?b.ns:'mediabox';
26756litySpip.strings.slideshowStart=b.str_ssStart;
26757litySpip.strings.slideshowStop=b.str_ssStop;
26758litySpip.strings.current=b.str_cur;
26759litySpip.strings.previous=b.str_prev;
26760litySpip.strings.next=b.str_next;
26761litySpip.strings.close=b.str_close;
26762litySpip.strings.loading=b.str_loading;
26763litySpip.strings.press_escape=b.str_petc;
26764litySpip.strings.dialog_title_def=b.str_dialTitDef;
26765litySpip.strings.dialog_title_med=b.str_dialTitMed;
26766litySpip.config.slideshowSpeed=(b.lity.slideshow_speed?b.lity.slideshow_speed:5000);
26767litySpip.config.defaultCaptionState=(b.lity.defaultCaptionState?b.lity.defaultCaptionState:'expanded');
26768var styles={
26769'container':'',
26770'content':'',
26771};
26772var max;
26773if(b.lity.minWidth){
26774max=(b.lity.maxWidth?b.lity.maxWidth.replace('%','vw'):'95vw');
26775styles.content+="min-width:min("+max+","+b.lity.minWidth.replace('%','vw')+');';
26776}
26777if(b.lity.maxWidth){
26778styles.container+="max-width:"+b.lity.maxWidth.replace('%','vw')+';';
26779}
26780if(b.lity.minHeight){
26781max=(b.lity.maxHeight?b.lity.maxHeight.replace('%','vw'):'95vh');
26782styles.content+="min-height:min("+max+","+b.lity.minHeight.replace('%','vh')+');';
26783}
26784if(b.lity.maxHeight){
26785styles.container+="max-height:"+b.lity.maxHeight.replace('%','vh')+';';
26786}
26787var insert='';
26788for(let key in styles){
26789if(styles[key]){
26790insert+='.box_mediabox .lity-'+key+'{'+styles[key]+'}';
26791}
26792}
26793if(b.lity.opacite){
26794insert+='.box_mediabox:before{opacity:'+b.lity.opacite+'}';
26795}
26796if(insert){
26797$('head').append($('<style type="text/css">'+insert+'</style>'));
26798}
26799$(document).on('lity:open',function(event,instance){
26800if(document.fullscreenElement){
26801document.fullscreenElement.appendChild(instance.element().get(0));
26802}
26803if(!instance.element().is('.lity-slideshow')){
26804jQuery('.lity-close',instance.element()).focus();
26805}
26806if(!litySpip.isTransition){
26807var callback=litySpip.callbacks.onOpen.pop();
26808if(callback){
26809callback(event,instance);
26810}
26811}
26812});
26813$(document).on('lity:ready',function(event,instance){
26814litySpip.adjustHeight(instance);
26815if(jQuery.spip){
26816jQuery.spip.triggerAjaxLoad(instance.element().get(0))
26817}
26818if(instance.element().addClass('lity-ready').is('.lity-slideshow')){
26819litySpip.slideshowStart(instance.element());
26820}
26821if(!litySpip.isTransition){
26822var callback=litySpip.callbacks.onShow.pop();
26823if(callback){
26824callback(event,instance);
26825}
26826}
26827else{
26828litySpip.isTransition.newOpened=true;
26829if(litySpip.isTransition.oldClosed){
26830litySpip.isTransition=false;
26831}
26832instance.content().trigger('lity:resize',[instance]);
26833}
26834var $next=instance.element().find('.lity-next');
26835if($next.length){
26836$next=litySpip.openerFromPrevNext($next);
26837if($next){
26838litySpip.elementOpener($next,{preloadOnly:true});
26839}
26840}
26841});
26842$(document).on('lity:close',function(event,instance){
26843if(!litySpip.isTransition){
26844if(litySpip.callbacks.onShow.length>litySpip.callbacks.onOpen.length){
26845litySpip.callbacks.onShow.pop();
26846}
26847var callback=litySpip.callbacks.onClose.pop();
26848if(callback){
26849callback(event,instance);
26850}
26851let options=instance.options();
26852let ajaxReloadArgs=options.ajaxReloadOnClose;
26853if(ajaxReloadArgs&&typeof(ajaxReloadArgs)==='string'){
26854litySpip.ajaxReloadElements(ajaxReloadArgs);
26855}
26856}
26857});
26858$(document).on('lity:remove',function(event,instance){
26859if(!litySpip.isTransition){
26860var focused=litySpip.focusedItem.pop();
26861if(focused){
26862try{
26863focused.focus();
26864}catch(e){
26865}
26866}
26867}
26868else{
26869litySpip.isTransition.oldClosed=true;
26870if(litySpip.isTransition.newOpened){
26871litySpip.isTransition=false;
26872}
26873}
26874});
26875$(document).on('lity:resize',function(event,instance){
26876litySpip.adjustHeight(instance);
26877});
26878}
26879initConfig();
26880})(jQuery);
26881
26882
26883/* plugins-dist/mediabox/javascript/spip.mediabox.js?1790327464 */
26884(function($){
26885$.mediabox
26886=function(options){
26887if(typeof(mediabox_autodetect_href)=='function'
26888&&options.href
26889&&!options.type){
26890options.type=mediabox_autodetect_href(options.href);
26891}
26892$.fn.mediabox(options);
26893};
26894$.modalboxload=$.modalbox=function(href,options){$.mediabox($.extend({href:href,overlayClose:true},options));};
26895$.modalboxclose=$.mediaboxClose=$.fn.mediaboxClose;
26896$.parseMediaboxOptions=function(nameSpace,opener){
26897var options={};
26898var data2options={
26899"width":"width",
26900"height":"height",
26901"min-width":"minWidth",
26902"min-height":"minHeight",
26903"max-width":"maxWidth",
26904"max-height":"maxHeight",
26905"caption-state":"defaultCaptionState",
26906"sidebar":"sideBar",
26907"class":"className",
26908"ajaxreload-on-close":"ajaxReloadOnClose",
26909};
26910var v;
26911for(var o in data2options){
26912v=($(opener).data(nameSpace+'-'+o)||'');
26913if(v){
26914options[data2options[o]]=v;
26915}
26916}
26917if(!options.length){
26918var eltclass=$(opener).prop('class');
26919if(eltclass){
26920if(eltclass.indexOf("boxWidth-")!==-1){
26921var w=eltclass.match(/boxWidth-([^\s'">]*)/);
26922w=w[1].replace(/pc/,'%');
26923options["width"]=w;
26924}
26925if(eltclass.indexOf("boxHeight-")!==-1){
26926var h=eltclass.match(/boxHeight-([^\s'">]*)/);
26927h=h[1].replace(/pc/,'%');
26928options["height"]=h;
26929}
26930if(eltclass.indexOf("boxIframe")!==-1){
26931options["type"]='iframe';
26932}
26933if(eltclass.indexOf("boxInline")!==-1){
26934options["type"]='inline';
26935}
26936}
26937}
26938data2options={"same-popin":"samePopin","type":"type"};
26939for(var o in data2options){
26940v=($(opener).data(nameSpace+'-'+o)||'');
26941if(v){
26942options[data2options[o]]=v;
26943}
26944}
26945return options;
26946}
26947})(jQuery);
26948var mediaboxInit=function(){
26949var b=$.extend({},mediabox_settings);
26950if(b.ns!=='box'){
26951$('[data-box-type]').each(function(i,e){
26952var $e=$(e);
26953var d=$e.attr('data-box-type');
26954$e.removeAttr('data-box-type').attr('data-'+b.ns+'-type',d);
26955});
26956}
26957if(b.auto_detect){
26958var $popins=$('[data-href-popin],[data-'+b.ns+'-type]'+(window.var_zajax_content?',[data-var_zajax],a.popin':''))
26959.add(b.sel_c)
26960.not(ajaxbloc_selecteur,'.ajaxbloc','.hasbox');
26961$popins.each(function(i,e){
26962var $e=$(e);
26963var url=$e.attr('href')||"./";
26964var popin=$e.attr('data-href-popin');
26965var type=$e.attr('data-'+b.ns+'-type')||'';
26966if(!popin){
26967var env=$e.attr('data-ajax-env');
26968if(env){
26969url=parametre_url(parametre_url(url,'var_ajax',1),'var_ajax_env',env)
26970$e.removeAttr('data-ajax-env');
26971type='ajax';
26972}
26973var za=$e.attr('data-var_zajax');
26974if(za!==undefined||$e.hasClass('popin')){
26975if(za==='content'&&window.var_zajax_content){
26976za=window.var_zajax_content;
26977}
26978url=parametre_url(url,'var_zajax',za||window.var_zajax_content);
26979$e.removeAttr('data-var_zajax');
26980type='ajax';
26981}
26982if((url!==$e.attr('href')||(!popin&&type))&&url!=="./"){
26983$e.attr('data-href-popin',url);
26984}
26985}
26986url=popin||url;
26987if(!type){
26988var attrs=$e.data();
26989var types=['inline','html','iframe','image','ajax'];
26990types.some(function(e){
26991var k=b.ns+e.charAt(0).toUpperCase()+e.slice(1);
26992if(attrs[k]){
26993type=e;
26994return true;
26995}
26996});
26997}
26998if(!type&&typeof(mediabox_autodetect_href)=='function'){
26999type=mediabox_autodetect_href(url);
27000}
27001if(!type||$e.hasClass('boxIframe')){
27002type="iframe";
27003$e.removeClass('boxIframe');
27004}
27005$e.attr('data-'+b.ns+'-type',type);
27006});
27007}
27008if(b.sel_g){
27009var $items=$();
27010$(b.sel_g).each(function(i,e){
27011$items=$items.add(
27012$(this).is('a[type^=\'image\']')
27013?$(this)
27014:$(this).find('a[type^=\'image\']')
27015);
27016});
27017$items
27018.not('.hasbox')
27019.removeAttr('onclick')
27020.mediabox({rel:'galerieauto',slideshow:true,slideshowAuto:false,type:'image'})
27021.addClass('hasbox');
27022}
27023if(b.tt_img){
27024$('a[type^="image"],a[href$=".png"],a[href$=".jpg"],a[href$=".jpeg"],a[href$=".svg"],a[href$=".webp"]')
27025.not('.hasbox')
27026.removeAttr('onclick')
27027.mediabox({type:'image'})
27028.addClass('hasbox')
27029;
27030}
27031$(b.sel_c)
27032.not('.hasbox')
27033.mediabox()
27034.addClass('hasbox')
27035;
27036$('[data-href-popin]',this)
27037.not('.hasbox')
27038.click(function(){if($.modalbox)$.modalbox($(this).attr('data-href-popin'),$.parseMediaboxOptions(b.ns,this));return false;})
27039.addClass('hasbox');
27040};
27041(function($){
27042if(typeof onAjaxLoad=='function')onAjaxLoad(mediaboxInit);
27043$(mediaboxInit);
27044})(jQuery);
27045function mediabox_autodetect_href(href,options){
27046options=$.extend({
27047breakMode:true,
27048tests:{
27049image:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
27050inline:/^[#.]\w/,
27051html:/^\s*<[\w!][^<]*>/,
27052ajax:/((\?|&(amp;)?)var_z?ajax=|cache-ajaxload\/)/i,
27053iframe:/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/i,
27054},
27055},options);
27056var matched=options.breakMode?false:[];
27057$.each(options.tests,function(type,regex){
27058if(href.match(regex)&&!href.match('/File:[^/]+(\\#|[?]|$)')){
27059if(options.breakMode){
27060matched=type;
27061return false;
27062}else{
27063matched.push(type);
27064}
27065}
27066});
27067return matched;
27068};
27069
27070
27071/* plugins-dist/porte_plume/javascript/jquery.markitup_pour_spip.js?1790327464 */
27072
27073;(function($){
27074$.fn.markItUp=function(settings,extraSettings){
27075var method,params,options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=false;
27076markitup_prompt=false;
27077if(typeof settings=='string'){
27078method=settings;
27079params=extraSettings;
27080}
27081options={id:'',
27082nameSpace:'',
27083root:'',
27084lang:'',
27085previewHandler:false,
27086previewInWindow:'',
27087previewInElement:'',
27088previewAutoRefresh:true,
27089previewPosition:'after',
27090previewTemplatePath:'~/templates/preview.html',
27091previewParser:false,
27092previewParserPath:'',
27093previewParserVar:'data',
27094previewParserAjaxType:'POST',
27095resizeHandle:true,
27096beforeInsert:'',
27097afterInsert:'',
27098onEnter:{},
27099onShiftEnter:{},
27100onCtrlEnter:{},
27101onTab:{},
27102markupSet:[{}]
27103};
27104$.extend(options,settings,extraSettings);
27105if(!options.root){
27106$('script').each(function(a,tag){
27107var miuScript=$(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
27108if(miuScript!==null){
27109options.root=miuScript[1];
27110}
27111});
27112}
27113var uaMatch=function(ua){
27114ua=ua.toLowerCase();
27115var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||
27116ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||
27117[];
27118return{
27119browser:match[1]||"",
27120version:match[2]||"0"
27121};
27122};
27123var matched=uaMatch(navigator.userAgent);
27124var browser={};
27125if(matched.browser){
27126browser[matched.browser]=true;
27127browser.version=matched.version;
27128}
27129if(browser.chrome){
27130browser.webkit=true;
27131}else if(browser.webkit){
27132browser.safari=true;
27133}
27134return this.each(function(){
27135var $$,textarea,levels,scrollPosition,caretPosition,
27136clicked,hash,header,footer,previewWindow,template,iFrame,abort,
27137before,after;
27138$$=$(this);
27139textarea=this;
27140levels=[];
27141abort=false;
27142scrollPosition=caretPosition=0;
27143caretOffset=-1;
27144options.previewParserPath=localize(options.previewParserPath);
27145options.previewTemplatePath=localize(options.previewTemplatePath);
27146if(method){
27147switch(method){
27148case'remove':
27149remove();
27150break;
27151case'insert':
27152markup(params);
27153break;
27154default:
27155$.error('Method '+method+' does not exist on jQuery.markItUp');
27156}
27157return;
27158}
27159function localize(data,inText){
27160if(inText){
27161return data.replace(/("|')~\//g,"$1"+options.root);
27162}
27163return data.replace(/^~\//,options.root);
27164}
27165function init(){
27166id='';nameSpace='';
27167if(options.id){
27168id='id="'+options.id+'"';
27169}else if($$.attr("id")){
27170id='id="markItUp'+($$.attr("id").substr(0,1).toUpperCase())+($$.attr("id").substr(1))+'"';
27171}
27172if(options.nameSpace){
27173nameSpace='class="'+options.nameSpace+'"';
27174}
27175currentScrollPosition=$$.scrollTop();
27176$$.wrap('<div '+nameSpace+'></div>');
27177$$.wrap('<div '+id+' class="markItUp"></div>');
27178$$.wrap('<div class="markItUpContainer"></div>');
27179$$.addClass("markItUpEditor");
27180$$.scrollTop(currentScrollPosition);
27181header=$('<div class="markItUpHeader"></div>').insertBefore($$);
27182$(dropMenus(options.markupSet)).appendTo(header);
27183$(header).find("li.markItUpDropMenu ul:empty").parent().remove();
27184footer=$('<div class="markItUpFooter"></div>').insertAfter($$);
27185if(options.resizeHandle===true&&browser.safari!==true){
27186resizeHandle=$('<div class="markItUpResizeHandle"></div>')
27187.insertAfter($$)
27188.on("mousedown.markItUp",function(e){
27189var h=$$.height(),y=e.clientY,mouseMove,mouseUp;
27190mouseMove=function(e){
27191$$.css("height",Math.max(20,e.clientY+h-y)+"px");
27192return false;
27193};
27194mouseUp=function(e){
27195$("html").off("mousemove.markItUp",mouseMove).off("mouseup.markItUp",mouseUp);
27196return false;
27197};
27198$("html").on("mousemove.markItUp",mouseMove).on("mouseup.markItUp",mouseUp);
27199});
27200footer.append(resizeHandle);
27201}
27202$$.on('keydown.markItUp',keyPressed).on('keyup',keyPressed);
27203$$.on("insertion.markItUp",function(e,settings){
27204if(settings.target!==false){
27205get();
27206}
27207if(textarea===$.markItUp.focused){
27208markup(settings);
27209}
27210});
27211$$.on('focus.markItUp',function(){
27212$.markItUp.focused=this;
27213});
27214if(options.previewInElement){
27215refreshPreview();
27216}
27217}
27218function dropMenus(markupSet){
27219var ul=$('<ul></ul>'),i=0;
27220var lang=($$.attr('lang')||options.lang);
27221$('li:hover > ul',ul).css('display','block');
27222$.each(markupSet,function(){
27223var button=this,t='',title,li,j;
27224if((!lang||!button.lang||($.inArray(lang,button.lang)!=-1))
27225&&(!button.lang_not||($.inArray(lang,button.lang_not)==-1))){
27226button.title?title=(button.key)?(button.title||'')+' [Ctrl+'+button.key+']':(button.title||''):title=(button.key)?(button.name||'')+' [Ctrl+'+button.key+']':(button.name||'');
27227key=(button.key)?'accesskey="'+button.key+'"':'';
27228if(button.separator){
27229li=$('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
27230}else{
27231i++;
27232for(j=levels.length-1;j>=0;j--){
27233t+=levels[j]+"-";
27234}
27235li=$('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="#" '+key+' title="'+title+'"><em>'+(button.name||'')+'</em></a></li>')
27236.on("contextmenu.markItUp",function(){
27237return false;
27238}).on('click.markItUp',function(e){
27239e.preventDefault();
27240}).on("focusin.markItUp",function(){
27241setTimeout(function(){
27242$$.focus();
27243},0);
27244}).on('mouseup',function(e){
27245if(button.call){
27246eval(button.call)(e);
27247}
27248setTimeout(function(){markup(button)},1);
27249return false;
27250}).on('mouseenter.markItUp',function(){
27251$('> a',this).addClass('active');
27252$('> ul',this).addClass('expanded');
27253$(document).one('click',function(){
27254$('ul a',header).removeClass('active');
27255$('ul ul',header).removeClass('expanded');
27256}
27257);
27258}).on('mouseleave.markItUp',function(){
27259$('> a',this).removeClass('active');
27260$('> ul',this).removeClass('expanded');
27261}).appendTo(ul);
27262if(button.dropMenu){
27263levels.push(i);
27264$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
27265}
27266}
27267}
27268});
27269levels.pop();
27270return ul;
27271}
27272function magicMarkups(string){
27273if(string){
27274string=string.toString();
27275string=string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,
27276function(x,a){
27277var b=a.split('|!|');
27278if(altKey===true){
27279return(b[1]!==undefined)?b[1]:b[0];
27280}else{
27281return(b[1]===undefined)?"":b[0];
27282}
27283}
27284);
27285string=string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,
27286function(x,a){
27287var b=a.split(':!:');
27288if(abort===true){
27289return false;
27290}
27291markitup_prompt=true;
27292value=prompt(b[0],(b[1])?b[1]:'');
27293if(value===null){
27294abort=true;
27295}
27296setTimeout(function(){markitup_prompt=false;},500);
27297return value;
27298}
27299);
27300return string;
27301}
27302return"";
27303}
27304function prepare(action){
27305if($.isFunction(action)){
27306action=action(hash);
27307}
27308return magicMarkups(action);
27309}
27310function build(string){
27311var openWith=prepare(clicked.openWith);
27312var placeHolder=prepare(clicked.placeHolder);
27313var replaceWith=prepare(clicked.replaceWith);
27314var closeWith=prepare(clicked.closeWith);
27315var openBlockWith=prepare(clicked.openBlockWith);
27316var closeBlockWith=prepare(clicked.closeBlockWith);
27317var multiline=clicked.multiline;
27318if(replaceWith!==""){
27319block=openWith+replaceWith+closeWith;
27320}else if(selection===''&&placeHolder!==''){
27321block=openWith+placeHolder+closeWith;
27322}else if(multiline===true){
27323string=string||selection;
27324var lines=[string],blocks=[];
27325if(multiline===true){
27326lines=string.split(/\r?\n/);
27327}
27328for(var l=0;l<lines.length;l++){
27329line=lines[l];
27330var trailingSpaces;
27331if(trailingSpaces=line.match(/ *$/)){
27332blocks.push(openWith+line.replace(/ *$/g,'')+closeWith+trailingSpaces);
27333}else{
27334blocks.push(openWith+line+closeWith);
27335}
27336}
27337block=blocks.join("\n");
27338}else{
27339block=openWith+(string||selection)+closeWith;
27340}
27341block=openBlockWith+block+closeBlockWith;
27342return{block:block,
27343openBlockWith:openBlockWith,
27344openWith:openWith,
27345replaceWith:replaceWith,
27346placeHolder:placeHolder,
27347closeWith:closeWith,
27348closeBlockWith:closeBlockWith
27349};
27350}
27351function selectWord(){
27352selectionBeforeAfter(/\s|[.,;:!¡?¿()]/);
27353selectionSave();
27354}
27355function selectLine(){
27356selectionBeforeAfter(/\r?\n/);
27357selectionSave();
27358}
27359function selectionRemoveLast(pattern){
27360if(!pattern)pattern=/\s/;
27361last=selection[selection.length-1];
27362if(last&&last.match(pattern)){
27363set(caretPosition,selection.length-1);
27364get();
27365$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});
27366}
27367}
27368function selectionBeforeAfter(pattern){
27369if(!pattern)pattern=/\s/;
27370sautAvantIE=sautApresIE=0;
27371if(browser.msie){
27372lenSelection=selection.length-fixIeBug(selection);
27373if(caretPosition){
27374set(caretPosition-1,2);
27375sautAvantIE=fixIeBug(document.selection.createRange().text);
27376}
27377set(caretPosition,2);
27378sautApresIE=fixIeBug(document.selection.createRange().text);
27379set(0,caretPosition);
27380before=document.selection.createRange().text;
27381set(caretPosition+lenSelection,textarea.value.length);
27382after=document.selection.createRange().text;
27383set(caretPosition,lenSelection);
27384selection=document.selection.createRange().text;
27385}else{
27386before=textarea.value.substring(0,caretPosition);
27387after=textarea.value.substring(caretPosition+selection.length-fixIeBug(selection));
27388}
27389before=before.split(pattern);
27390after=after.split(pattern);
27391if(sautAvantIE)before.push("");
27392if(sautApresIE)after.unshift("");
27393}
27394function selectionSave(){
27395nb_before=before?before[before.length-1].length:0;
27396nb_after=after?after[0].length:0;
27397nb=nb_before+selection.length+nb_after-fixIeBug(selection);
27398caretPosition=caretPosition-nb_before;
27399set(caretPosition,nb);
27400get();
27401$.extend(hash,{selection:selection,caretPosition:caretPosition,scrollPosition:scrollPosition});
27402}
27403function markup(button){
27404var len,j,n,i;
27405hash=clicked=button;
27406get();
27407$.extend(hash,{line:"",
27408root:options.root,
27409textarea:textarea,
27410selection:(selection||''),
27411caretPosition:caretPosition,
27412ctrlKey:ctrlKey,
27413shiftKey:shiftKey,
27414altKey:altKey
27415}
27416);
27417if(button.selectionType){
27418if(button.selectionType=="word"){
27419if(!selection){
27420selectWord();
27421}else{
27422selectionRemoveLast(/\s/);
27423}
27424}
27425if(button.selectionType=="line"){
27426selectLine();
27427}
27428if(button.selectionType=="return"){
27429if(!browser.msie){
27430selectionBeforeAfter(/\r?\n/);
27431before_last=before[before.length-1];
27432after='';
27433if(r=before_last.match(/^-([*#]+) ?(.*)$/)){
27434if(r[2]){
27435button.replaceWith="\n-"+r[1]+' ';
27436before_last='';
27437}else{
27438button.replaceWith="\n";
27439}
27440}else{
27441before_last='';
27442button.replaceWith="\n";
27443}
27444before[before.length-1]=before_last;
27445selectionSave();
27446}
27447}
27448}
27449prepare(options.beforeInsert);
27450prepare(clicked.beforeInsert);
27451if((ctrlKey===true&&shiftKey===true)||button.multiline===true){
27452prepare(clicked.beforeMultiInsert);
27453}
27454$.extend(hash,{line:1});
27455if((ctrlKey===true&&shiftKey===true)||button.forceMultiline===true){
27456lines=selection.split(/\r?\n/);
27457for(j=0,n=lines.length,i=0;i<n;i++){
27458if(n==1||$.trim(lines[i])!==''){
27459$.extend(hash,{line:++j,selection:lines[i]});
27460lines[i]=build(lines[i]).block;
27461}else{
27462lines[i]="";
27463}
27464}
27465string={block:lines.join('\n')};
27466start=caretPosition;
27467len=string.block.length+((browser.opera)?n-1:0);
27468}else if(ctrlKey===true){
27469string=build(selection);
27470start=caretPosition+string.openWith.length;
27471len=string.block.length-string.openWith.length-string.closeWith.length;
27472len=len-(string.block.match(/ $/)?1:0);
27473len-=fixIeBug(string.block);
27474}else if(shiftKey===true){
27475string=build(selection);
27476start=caretPosition;
27477len=string.block.length;
27478len-=fixIeBug(string.block);
27479}else{
27480string=build(selection);
27481start=caretPosition+string.block.length;
27482len=0;
27483start-=fixIeBug(string.block);
27484}
27485if((selection===''&&string.replaceWith==='')){
27486caretOffset+=fixOperaBug(string.block);
27487start=caretPosition+string.openBlockWith.length+string.openWith.length;
27488len=string.block.length-string.openBlockWith.length-string.openWith.length-string.closeWith.length-string.closeBlockWith.length;
27489caretOffset=$$.val().substring(caretPosition,$$.val().length).length;
27490caretOffset-=fixOperaBug($$.val().substring(0,caretPosition));
27491}
27492$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});
27493if(string.block!==selection&&abort===false){
27494insert(string.block);
27495set(start,len);
27496}else{
27497caretOffset=-1;
27498}
27499get();
27500$.extend(hash,{line:'',selection:selection});
27501if((ctrlKey===true&&shiftKey===true)||button.multiline===true){
27502prepare(clicked.afterMultiInsert);
27503}
27504prepare(clicked.afterInsert);
27505prepare(options.afterInsert);
27506if(previewWindow&&options.previewAutoRefresh){
27507refreshPreview();
27508}
27509textarea.dispatchEvent(new Event('input'));
27510shiftKey=altKey=ctrlKey=abort=false;
27511}
27512function fixOperaBug(string){
27513if(browser.opera){
27514return string.length-string.replace(/\n*/g,'').length;
27515}
27516return 0;
27517}
27518function fixIeBug(string){
27519if(browser.msie){
27520return string.length-string.replace(/\r*/g,'').length;
27521}
27522return 0;
27523}
27524function insert(block){
27525if(document.selection){
27526var newSelection=document.selection.createRange();
27527newSelection.text=block;
27528}else{
27529textarea.value=textarea.value.substring(0,caretPosition)+block+textarea.value.substring(caretPosition+selection.length,textarea.value.length);
27530}
27531}
27532function set(start,len){
27533if(textarea.createTextRange){
27534if(browser.opera&&browser.version>=9.5&&len==0){
27535return false;
27536}
27537range=textarea.createTextRange();
27538range.collapse(true);
27539range.moveStart('character',start);
27540range.moveEnd('character',len);
27541range.select();
27542}else if(textarea.setSelectionRange){
27543textarea.setSelectionRange(start,start+len);
27544}
27545textarea.scrollTop=scrollPosition;
27546textarea.focus();
27547}
27548function get(){
27549textarea.focus();
27550scrollPosition=textarea.scrollTop;
27551if(document.selection){
27552selection=document.selection.createRange().text;
27553if(browser.msie){
27554var range=document.selection.createRange(),rangeCopy=range.duplicate();
27555rangeCopy.moveToElementText(textarea);
27556caretPosition=-1;
27557while(rangeCopy.inRange(range)){
27558rangeCopy.moveStart('character');
27559caretPosition++;
27560}
27561}else{
27562caretPosition=textarea.selectionStart;
27563}
27564}else{
27565caretPosition=textarea.selectionStart;
27566selection=textarea.value.substring(caretPosition,textarea.selectionEnd);
27567}
27568return selection;
27569}
27570function preview(){
27571if(typeof options.previewHandler==='function'){
27572previewWindow=true;
27573}else if(options.previewInElement){
27574previewWindow=$(options.previewInElement);
27575}else if(!previewWindow||previewWindow.closed){
27576if(options.previewInWindow){
27577previewWindow=window.open('','preview',options.previewInWindow);
27578$(window).unload(function(){
27579previewWindow.close();
27580});
27581}else{
27582iFrame=$('<iframe class="markItUpPreviewFrame"></iframe>');
27583if(options.previewPosition=='after'){
27584iFrame.insertAfter(footer);
27585}else{
27586iFrame.insertBefore(header);
27587}
27588previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1];
27589}
27590}else if(altKey===true){
27591if(iFrame){
27592iFrame.remove();
27593}else{
27594previewWindow.close();
27595}
27596previewWindow=iFrame=false;
27597}
27598if(!options.previewAutoRefresh){
27599refreshPreview();
27600}
27601if(options.previewInWindow){
27602previewWindow.focus();
27603}
27604}
27605function refreshPreview(){
27606renderPreview();
27607}
27608function renderPreview(){
27609var phtml;
27610var parsedData=$$.val();
27611if(options.previewParser&&typeof options.previewParser==='function'){
27612parsedData=options.previewParser(parsedData);
27613}
27614if(options.previewHandler&&typeof options.previewHandler==='function'){
27615options.previewHandler(parsedData);
27616}else if(options.previewParserPath!==''){
27617$.ajax({
27618type:options.previewParserAjaxType,
27619dataType:'text',
27620global:false,
27621url:options.previewParserPath,
27622data:options.previewParserVar+'='+encodeURIComponent(parsedData),
27623success:function(data){
27624writeInPreview(localize(data,1));
27625}
27626});
27627}else{
27628if(!template){
27629$.ajax({
27630url:options.previewTemplatePath,
27631dataType:'text',
27632global:false,
27633success:function(data){
27634writeInPreview(localize(data,1).replace(/<!-- content -->/g,parsedData));
27635}
27636});
27637}
27638}
27639return false;
27640}
27641function writeInPreview(data){
27642if(options.previewInElement){
27643$(options.previewInElement).html(data);
27644}else if(previewWindow&&previewWindow.document){
27645try{
27646sp=previewWindow.document.documentElement.scrollTop
27647}catch(e){
27648sp=0;
27649}
27650previewWindow.document.open();
27651previewWindow.document.write(data);
27652previewWindow.document.close();
27653previewWindow.document.documentElement.scrollTop=sp;
27654}
27655}
27656function keyPressed(e){
27657shiftKey=e.shiftKey;
27658altKey=e.altKey;
27659ctrlKey=(!(e.altKey&&e.ctrlKey))?(e.ctrlKey||e.metaKey):false;
27660if(e.type==='keydown'){
27661if(ctrlKey===true){
27662li=$('a[accesskey="'+((e.keyCode==13)?'\\n':String.fromCharCode(e.keyCode))+'"]',header).parent('li');
27663if(li.length!==0){
27664ctrlKey=false;
27665setTimeout(function(){
27666li.triggerHandler('mouseup');
27667},1);
27668return false;
27669}
27670}
27671if(!browser.opera){
27672if(e.keyCode===13||e.keyCode===10){
27673if(ctrlKey===true){
27674ctrlKey=false;
27675markup(options.onCtrlEnter);
27676if(!options.onCtrlEnter.keepDefault){
27677textarea.dispatchEvent(new Event('input'));
27678}
27679return options.onCtrlEnter.keepDefault;
27680}else if(shiftKey===true){
27681shiftKey=false;
27682markup(options.onShiftEnter);
27683if(!options.onShiftEnter.keepDefault){
27684textarea.dispatchEvent(new Event('input'));
27685}
27686return options.onShiftEnter.keepDefault;
27687}else{
27688markup(options.onEnter);
27689if(!options.onEnter.keepDefault){
27690textarea.dispatchEvent(new Event('input'));
27691}
27692return options.onEnter.keepDefault;
27693}
27694}
27695if(e.keyCode===9){
27696if(shiftKey==true||ctrlKey==true||altKey==true){
27697return false;
27698}
27699if(caretOffset!==-1){
27700get();
27701caretOffset=$$.val().length-caretOffset;
27702set(caretOffset,0);
27703caretOffset=-1;
27704return false;
27705}else{
27706markup(options.onTab);
27707return options.onTab.keepDefault;
27708}
27709}
27710}
27711}
27712}
27713function remove(){
27714$$.off(".markItUp").removeClass('markItUpEditor');
27715$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
27716var relativeRef=$$.parent('div').parent('div.markItUp').parent('div');
27717if(relativeRef.length){
27718relativeRef.replaceWith($$);
27719}
27720$$.data('markItUp',null);
27721}
27722init();
27723});
27724};
27725$.fn.markItUpRemove=function(){
27726return this.each(function(){
27727$(this).markItUp('remove');
27728}
27729);
27730};
27731$.markItUp=function(settings){
27732var options={target:false};
27733$.extend(options,settings);
27734if(options.target){
27735return $(options.target).each(function(){
27736$(this).focus();
27737$(this).trigger('insertion',[options]);
27738});
27739}else{
27740$('textarea').trigger('insertion',[options]);
27741}
27742};
27743})(jQuery);
27744
27745
27746/* plugins-dist/porte_plume/javascript/jquery.previsu_spip.js?1790327464 */
27747;(function($){
27748$.fn.previsu_spip=function(settings){
27749var options;
27750options={
27751previewParserPath:'',
27752previewParserVar:'data',
27753textEditer:'Editer',
27754textVoir:'Voir',
27755textFullScreen:'Plein écran'
27756};
27757$.extend(options,settings);
27758return this.each(function(){
27759var $$,textarea,tabs,preview;
27760$$=$(this);
27761textarea=this;
27762function init(){
27763$$.addClass("pp_previsualisation");
27764if(!$$.parent().has('.markItUpContainer').length){
27765$$.barre_outils('vide');
27766}
27767var mark=$$.parent();
27768tabs=$('<div class="markItUpTabs"></div>').prependTo(mark);
27769$(tabs).append(
27770'<a href="#fullscreen" class="fullscreen">'+options.textFullScreen+'</a>'+
27771'<a href="#previsuVoir" class="previsuVoir">'+options.textVoir+'</a>'+
27772'<a href="#previsuEditer" class="previsuEditer on">'+options.textEditer+'</a>'
27773);
27774preview=$('<div class="markItUpPreview"></div>').insertAfter(mark.find('.markItUpHeader'));
27775preview.hide();
27776var is_full_screen=false;
27777var objet=mark.parents('.formulaire_spip')[0].className.match(/formulaire_editer_(\w+)/);
27778objet=(objet?objet[1]:'');
27779var champ=mark.parents('.editer')[0].className.match(/editer_(\w+)/);
27780champ=(champ?champ[1].toUpperCase():'');
27781var textarea=mark.find('textarea.pp_previsualisation');
27782var preview=mark.find('.markItUpPreview');
27783var dir=textarea.attr('dir');
27784if(dir){
27785preview.attr('dir',dir);
27786}
27787tabs.find('.fullscreen').click(function(){
27788if(!mark.is('.fullscreen')){
27789textarea.data('height-origin',textarea.css('height'));
27790}
27791mark.toggleClass('fullscreen');
27792if(mark.is('.fullscreen')){
27793$('body').addClass('markitup-fullscreen');
27794is_full_screen=true;
27795mark.find('.markItUpHeader a').show();
27796if(!mark.is('.livepreview')){
27797var original_texte="";
27798function refresh_preview(){
27799var texte=textarea.val();
27800if(original_texte==texte){
27801return;
27802}
27803renderPreview(preview.addClass('ajaxLoad'),texte,champ,objet);
27804original_texte=texte;
27805}
27806var timerPreview=null;
27807mark.addClass('livepreview').find('.markItUpEditor').on('keyup click change focus refreshpreview',function(e){
27808if(is_full_screen){
27809if(timerPreview)clearTimeout(timerPreview);
27810timerPreview=setTimeout(refresh_preview,500);
27811}
27812});
27813$(window).on('keyup',function(e){
27814if(is_full_screen){
27815if(e.type=='keyup'&&e.keyCode==27&&!markitup_prompt){
27816mark.removeClass('fullscreen');
27817$('body').removeClass('markitup-fullscreen');
27818textarea.css('height',textarea.data('height-origin'));
27819is_full_screen=false;
27820}
27821}
27822});
27823}
27824mark.find('.markItUpEditor').trigger('refreshpreview');
27825}
27826else{
27827$('body').removeClass('markitup-fullscreen');
27828textarea.css('height',textarea.data('height-origin'));
27829if($(this).next().hasClass('on')){
27830mark.find('.markItUpHeader a').hide();
27831}
27832is_full_screen=false;
27833}
27834return false;
27835});
27836tabs.find('.previsuVoir').click(function(){
27837preview.height(
27838mark.find('.markItUpEditor').height()
27839+mark.find('.markItUpFooter').height()
27840);
27841mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').hide();
27842$(this).addClass('on').next().removeClass('on');
27843renderPreview(
27844preview.show().addClass('ajaxLoad'),
27845mark.find('textarea.pp_previsualisation').val(),
27846champ,
27847objet,
27848false
27849);
27850return false;
27851});
27852tabs.find('.previsuEditer').click(function(){
27853mark.find('.markItUpPreview').hide();
27854mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').show();
27855$(this).addClass('on').prev().removeClass('on');
27856return false;
27857});
27858}
27859function renderPreview(node,val,champ,objet,async){
27860if(options.previewParserPath!==''){
27861$.ajax({
27862type:'POST',
27863async:typeof(async)=="undefined"?true:async,
27864url:options.previewParserPath,
27865data:'champ='+champ
27866+'&objet='+objet
27867+'&'+options.previewParserVar+'='+encodeURIComponent(val),
27868success:function(data){
27869node.html(data).removeClass('ajaxLoad');
27870$("a",node).attr("target","blank");
27871$(":input",node).attr("disabled","disabled");
27872}
27873});
27874}
27875}
27876init();
27877});
27878};
27879})(jQuery);
27880
27881
27882/* local/cache-js/jsdyn-javascript_porte_plume_start_js-6f94d35e.js?1790959678 */
27883
27884barre_outils_edition={
27885"nameSpace":"edition",
27886"previewAutoRefresh":false,
27887"onEnter":{
27888"keepDefault":false,
27889"selectionType":"return",
27890"replaceWith":"\n"
27891},
27892"onShiftEnter":{
27893"keepDefault":false,
27894"replaceWith":"\n_ "
27895},
27896"onCtrlEnter":{
27897"keepDefault":false,
27898"replaceWith":"\n\n"
27899},
27900"markupSet":[
27901{
27902"name":"Transformer en {{{intertitre}}}",
27903"key":"H",
27904"className":"outil_header1",
27905"openWith":"\n{{{",
27906"closeWith":"}}}\n",
27907"selectionType":"line",
27908"dropMenu":[
27909{
27910"id":"intertitre",
27911"name":"Transformer en {{{intertitre}}}",
27912"className":"outil_intertitre1",
27913"openWith":"\n{{{",
27914"closeWith":"}}}\n",
27915"display":true,
27916"selectionType":"line"
27917},
27918{
27919"id":"intertitre2",
27920"name":"Transformer en {{{**intertitre niveau deux}}}",
27921"className":"outil_intertitre2",
27922"openWith":"\n{{{**",
27923"closeWith":"}}}\n",
27924"display":true,
27925"selectionType":"line"
27926},
27927{
27928"id":"intertitre3",
27929"name":"Transformer en {{{***intertitre niveau trois}}}",
27930"className":"outil_intertitre3",
27931"openWith":"\n{{{***",
27932"closeWith":"}}}\n",
27933"display":true,
27934"selectionType":"line"
27935},
27936{
27937"id":"alignerdroite",
27938"name":"[\/Aligne \u00e0 droite\/] le paragraphe",
27939"className":"outil_alignerdroite",
27940"openWith":"\n[\/",
27941"closeWith":"\/]\n",
27942"display":true,
27943"selectionType":"line"
27944},
27945{
27946"id":"alignergauche",
27947"name":"[!Aligne \u00e0 gauche\u00a0!] le paragraphe",
27948"className":"outil_alignergauche",
27949"openWith":"\n[!",
27950"closeWith":"!]\n",
27951"display":true,
27952"lang":[
27953"ar",
27954"fa"
27955],
27956"selectionType":"line"
27957},
27958{
27959"id":"cadretexte",
27960"name":"[(Encadrer)] le paragraphe",
27961"className":"outil_cadretexte",
27962"openWith":"\n[(",
27963"closeWith":")]\n",
27964"display":true,
27965"selectionType":"line"
27966},
27967{
27968"id":"barre_cadre",
27969"name":"Placer dans une <cadre>zone de saisie de texte<\/cadre>",
27970"className":"outil_barre_cadre",
27971"openWith":"\n<cadre>",
27972"closeWith":"<\/cadre>\n",
27973"display":true,
27974"selectionType":"line"
27975}
27976]
27977},
27978{
27979"name":"Mettre en {{gras}}",
27980"key":"B",
27981"className":"outil_bold",
27982"replaceWith":function(h){return espace_si_accolade(h,'{{','}}');},
27983"selectionType":"word",
27984"dropMenu":[
27985{
27986"id":"italic",
27987"name":"Mettre en {italique}",
27988"key":"I",
27989"className":"outil_italic",
27990"replaceWith":function(h){return espace_si_accolade(h,'{','}');},
27991"display":true,
27992"selectionType":"word"
27993},
27994{
27995"id":"petitescapitales",
27996"name":"Mettre le texte en <sc>petites capitales<\/sc>",
27997"className":"outil_petitescapitales",
27998"openWith":"<sc>",
27999"closeWith":"<\/sc>",
28000"display":true,
28001"selectionType":"word"
28002},
28003{
28004"id":"stroke_through_et",
28005"name":"<del>Barrer<\/del> le texte",
28006"className":"outil_stroke_through_et",
28007"openWith":"<del>",
28008"closeWith":"<\/del>",
28009"display":true,
28010"selectionType":"word"
28011},
28012{
28013"id":"miseenevidence",
28014"name":"Mettre le texte en [*\u00e9vidence*]",
28015"className":"outil_miseenevidence",
28016"openWith":"[*",
28017"closeWith":"*]",
28018"display":true,
28019"selectionType":"word"
28020},
28021{
28022"id":"miseenevidence2",
28023"name":"Mettre le texte en [**\u00e9vidence*] (2e couleur)",
28024"className":"outil_miseenevidence2",
28025"openWith":"[**",
28026"closeWith":"*]",
28027"display":true,
28028"selectionType":"word"
28029},
28030{
28031"id":"exposant",
28032"name":"Mettre le texte en <sup>exposant<\/sup>",
28033"className":"outil_exposant",
28034"openWith":"<sup>",
28035"closeWith":"<\/sup>",
28036"display":true,
28037"selectionType":"word"
28038},
28039{
28040"id":"indice",
28041"name":"Mettre le texte en <sub>indice<\/sub>",
28042"className":"outil_indice",
28043"openWith":"<sub>",
28044"closeWith":"<\/sub>",
28045"display":true,
28046"selectionType":"word"
28047},
28048{
28049"id":"barre_code",
28050"name":"Mettre en forme un <code>code informatique<\/code>",
28051"className":"outil_barre_code",
28052"openWith":"<code>",
28053"closeWith":"<\/code>",
28054"display":true,
28055"selectionType":"word"
28056}
28057]
28058},
28059{
28060"name":"Mettre en liste",
28061"className":"outil_liste_ul separateur_avant",
28062"replaceWith":function(h){return outil_liste(h,'*');},
28063"selectionType":"line",
28064"forceMultiline":true,
28065"dropMenu":[
28066{
28067"id":"liste_ol",
28068"name":"Mettre en liste num\u00e9rot\u00e9e",
28069"className":"outil_liste_ol",
28070"replaceWith":function(h){return outil_liste(h,'#');},
28071"display":true,
28072"selectionType":"line",
28073"forceMultiline":true
28074},
28075{
28076"id":"desindenter",
28077"name":"D\u00e9sindenter une liste",
28078"className":"outil_desindenter",
28079"replaceWith":function(h){return outil_desindenter(h);},
28080"display":true,
28081"selectionType":"line",
28082"forceMultiline":true
28083},
28084{
28085"id":"indenter",
28086"name":"Indenter une liste",
28087"className":"outil_indenter",
28088"replaceWith":function(h){return outil_indenter(h);},
28089"display":true,
28090"selectionType":"line",
28091"forceMultiline":true
28092}
28093]
28094},
28095{
28096"name":"Transformer en [lien hypertexte->http:\/\/...]",
28097"key":"L",
28098"className":"outil_link separateur separateur_apres sepLink",
28099"openWith":"[",
28100"closeWith":"->[![Veuillez indiquer l\u2019adresse de votre lien (vous pouvez indiquer une adresse Internet sous la forme http:\/\/www.monsite.com, une adresse courriel, ou simplement indiquer le num\u00e9ro d\u2019un article de ce site.]!]]",
28101"dropMenu":[
28102{
28103"id":"notes",
28104"name":"Transformer en [[Note de bas de page]]",
28105"className":"outil_notes",
28106"openWith":"[[",
28107"closeWith":"]]",
28108"display":true,
28109"selectionType":"word"
28110}
28111]
28112},
28113{
28114"name":"Ins\u00e9rer\/modifier (le s\u00e9lectionner avant) un tableau",
28115"className":"outil_barre_tableau separateur_avant",
28116"replaceWith":function(markitup){zone_selection=markitup.textarea;jQuery.modalboxload('https://www.hhaccueil.de/spip.php?page=typoenluminee_tableau_edit&modalbox=oui',{minWidth:'90%',minHeight:'90%',iframe:true,type:'iframe'});},
28117"selectionType":"line"
28118},
28119{
28120"name":"<quote>Citer un message<\/quote>",
28121"key":"Q",
28122"className":"outil_quote separateur separateur_apres sepGuillemets",
28123"openWith":"<quote>",
28124"closeWith":"<\/quote>",
28125"selectionType":"word",
28126"dropMenu":[
28127{
28128"id":"barre_poesie",
28129"name":"Mettre en forme comme une <poesie>po\u00e9sie<\/poesie>",
28130"className":"outil_barre_poesie",
28131"openWith":"\n<poesie>\n",
28132"closeWith":"\n<\/poesie>\n",
28133"display":true,
28134"selectionType":"word"
28135}
28136]
28137},
28138{
28139"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
28140"className":"outil_guillemets",
28141"openWith":"«",
28142"closeWith":"»",
28143"lang":[
28144"fr",
28145"eo",
28146"cpf",
28147"ar",
28148"es"
28149],
28150"selectionType":"word",
28151"dropMenu":[
28152{
28153"id":"guillemets_simples",
28154"name":"Entourer de \u201cguillemets de second niveau\u201d",
28155"className":"outil_guillemets_simples",
28156"openWith":"“",
28157"closeWith":"”",
28158"display":true,
28159"lang":[
28160"fr",
28161"eo",
28162"cpf",
28163"ar",
28164"es"
28165],
28166"selectionType":"word"
28167}
28168]
28169},
28170{
28171"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
28172"className":"outil_guillemets_de",
28173"openWith":"„",
28174"closeWith":"“",
28175"lang":[
28176"bg",
28177"de",
28178"pl",
28179"hr",
28180"src"
28181],
28182"selectionType":"word",
28183"dropMenu":[
28184{
28185"id":"guillemets_de_simples",
28186"name":"Entourer de \u201cguillemets de second niveau\u201d",
28187"className":"outil_guillemets_de_simples",
28188"openWith":"&sbquo;",
28189"closeWith":"‘",
28190"display":true,
28191"lang":[
28192"bg",
28193"de",
28194"pl",
28195"hr",
28196"src"
28197],
28198"selectionType":"word"
28199}
28200]
28201},
28202{
28203"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
28204"className":"outil_guillemets_simples separateur_avant",
28205"openWith":"“",
28206"closeWith":"”",
28207"lang_not":[
28208"fr",
28209"eo",
28210"cpf",
28211"ar",
28212"es",
28213"bg",
28214"de",
28215"pl",
28216"hr",
28217"src"
28218],
28219"selectionType":"word",
28220"dropMenu":[
28221{
28222"id":"guillemets_autres_simples",
28223"name":"Entourer de \u201cguillemets de second niveau\u201d",
28224"className":"outil_guillemets_uniques",
28225"openWith":"‘",
28226"closeWith":"’",
28227"display":true,
28228"lang_not":[
28229"fr",
28230"eo",
28231"cpf",
28232"ar",
28233"es",
28234"bg",
28235"de",
28236"pl",
28237"hr",
28238"src"
28239],
28240"selectionType":"word"
28241}
28242]
28243},
28244{
28245"name":"Ins\u00e9rer des caract\u00e8res sp\u00e9cifiques",
28246"className":"outil_caracteres separateur separateur_apres sepCaracteres",
28247"dropMenu":[
28248{
28249"id":"A_grave",
28250"name":"Ins\u00e9rer un \u00c0",
28251"className":"outil_a_maj_grave",
28252"replaceWith":"À",
28253"display":true,
28254"lang":[
28255"fr",
28256"eo",
28257"cpf"
28258]
28259},
28260{
28261"id":"E_aigu",
28262"name":"Ins\u00e9rer un \u00c9",
28263"className":"outil_e_maj_aigu",
28264"replaceWith":"É",
28265"display":true,
28266"lang":[
28267"fr",
28268"eo",
28269"cpf"
28270]
28271},
28272{
28273"id":"E_grave",
28274"name":"Ins\u00e9rer un \u00c8",
28275"className":"outil_e_maj_grave",
28276"replaceWith":"È",
28277"display":true,
28278"lang":[
28279"fr",
28280"eo",
28281"cpf"
28282]
28283},
28284{
28285"id":"aelig",
28286"name":"Ins\u00e9rer un \u00e6",
28287"className":"outil_aelig",
28288"replaceWith":"æ",
28289"display":true,
28290"lang":[
28291"fr",
28292"eo",
28293"cpf"
28294]
28295},
28296{
28297"id":"AElig",
28298"name":"Ins\u00e9rer un \u00c6",
28299"className":"outil_aelig_maj",
28300"replaceWith":"Æ",
28301"display":true,
28302"lang":[
28303"fr",
28304"eo",
28305"cpf"
28306]
28307},
28308{
28309"id":"oe",
28310"name":"Ins\u00e9rer un \u0153",
28311"className":"outil_oe",
28312"replaceWith":"œ",
28313"display":true,
28314"lang":[
28315"fr"
28316]
28317},
28318{
28319"id":"OE",
28320"name":"Ins\u00e9rer un \u0152",
28321"className":"outil_oe_maj",
28322"replaceWith":"Œ",
28323"display":true,
28324"lang":[
28325"fr"
28326]
28327},
28328{
28329"id":"Ccedil",
28330"name":"Ins\u00e9rer un \u00c7",
28331"className":"outil_ccedil_maj",
28332"replaceWith":"Ç",
28333"display":true,
28334"lang":[
28335"fr",
28336"eo",
28337"cpf"
28338]
28339},
28340{
28341"id":"uppercase",
28342"name":"Passer en majuscules",
28343"className":"outil_uppercase",
28344"replaceWith":function(markitup){return markitup.selection.toUpperCase()},
28345"display":true,
28346"lang":[
28347"fr",
28348"en"
28349]
28350},
28351{
28352"id":"lowercase",
28353"name":"Passer en minuscules",
28354"className":"outil_lowercase",
28355"replaceWith":function(markitup){return markitup.selection.toLowerCase()},
28356"display":true,
28357"lang":[
28358"fr",
28359"en"
28360]
28361}
28362]
28363},
28364{
28365"name":"Utiliser un outil du Couteau Suisse",
28366"className":"couteau_suisse_drop",
28367"replaceWith":"",
28368"dropMenu":[
28369{
28370"id":"blocs_bloc",
28371"name":"Ins\u00e9rer un bloc repli\u00e9",
28372"className":"blocs_bloc",
28373"replaceWith":"\n<bloc>Un titre\n\nPlacez votre texte ici\n<\/bloc>\n",
28374"display":true
28375},
28376{
28377"id":"blocs_visible",
28378"name":"Ins\u00e9rer un bloc d\u00e9pli\u00e9",
28379"className":"blocs_visible",
28380"replaceWith":"\n<visible>Un titre\n\nPlacez votre texte ici\n<\/visible>\n",
28381"display":true
28382}
28383]
28384},
28385{
28386"name":"Ins\u00e9rer une frimousse ",
28387"className":"cs_smileys_drop",
28388"replaceWith":"",
28389"dropMenu":[
28390{
28391"id":"smiley_pleure_de_rire",
28392"name":"Ins\u00e9rer une frimousse :’-))",
28393"className":"smiley_pleure_de_rire",
28394"replaceWith":":’-))",
28395"display":true
28396},
28397{
28398"id":"smiley_triste",
28399"name":"Ins\u00e9rer une frimousse :’-(",
28400"className":"smiley_triste",
28401"replaceWith":":’-(",
28402"display":true
28403},
28404{
28405"id":"smiley_mort_de_rire",
28406"name":"Ins\u00e9rer une frimousse :-))",
28407"className":"smiley_mort_de_rire",
28408"replaceWith":":-))",
28409"display":true
28410},
28411{
28412"id":"smiley_en_colere",
28413"name":"Ins\u00e9rer une frimousse :-((",
28414"className":"smiley_en_colere",
28415"replaceWith":":-((",
28416"display":true
28417},
28418{
28419"id":"smiley_clin_d-oeil",
28420"name":"Ins\u00e9rer une frimousse ;-)",
28421"className":"smiley_clin_d-oeil",
28422"replaceWith":";-)",
28423"display":true
28424},
28425{
28426"id":"smiley_sourire",
28427"name":"Ins\u00e9rer une frimousse :-)",
28428"className":"smiley_sourire",
28429"replaceWith":":-)",
28430"display":true
28431},
28432{
28433"id":"smiley_pas_content",
28434"name":"Ins\u00e9rer une frimousse :-(",
28435"className":"smiley_pas_content",
28436"replaceWith":":-(",
28437"display":true
28438},
28439{
28440"id":"smiley_diable",
28441"name":"Ins\u00e9rer une frimousse :->",
28442"className":"smiley_diable",
28443"replaceWith":":->",
28444"display":true
28445},
28446{
28447"id":"smiley_rouge",
28448"name":"Ins\u00e9rer une frimousse |-)",
28449"className":"smiley_rouge",
28450"replaceWith":"|-)",
28451"display":true
28452},
28453{
28454"id":"smiley_rigolo",
28455"name":"Ins\u00e9rer une frimousse :o)",
28456"className":"smiley_rigolo",
28457"replaceWith":":o)",
28458"display":true
28459},
28460{
28461"id":"smiley_lunettes",
28462"name":"Ins\u00e9rer une frimousse B-)",
28463"className":"smiley_lunettes",
28464"replaceWith":"B-)",
28465"display":true
28466},
28467{
28468"id":"smiley_tire_la_langue",
28469"name":"Ins\u00e9rer une frimousse :-P",
28470"className":"smiley_tire_la_langue",
28471"replaceWith":":-P",
28472"display":true
28473},
28474{
28475"id":"smiley_bof",
28476"name":"Ins\u00e9rer une frimousse :-|",
28477"className":"smiley_bof",
28478"replaceWith":":-|",
28479"display":true
28480},
28481{
28482"id":"smiley_mouais",
28483"name":"Ins\u00e9rer une frimousse :-\/",
28484"className":"smiley_mouais",
28485"replaceWith":":-\/",
28486"display":true
28487},
28488{
28489"id":"smiley_surpris",
28490"name":"Ins\u00e9rer une frimousse :-O",
28491"className":"smiley_surpris",
28492"replaceWith":":-O",
28493"display":true
28494}
28495]
28496}
28497]
28498}
28499function outil_liste(h,c){
28500if((s=h.selection)&&(r=s.match(/^-([*#]+) (.*)$/))){
28501r[1]=r[1].replace(/[#*]/g,c);
28502s='-'+r[1]+' '+r[2];
28503}else{
28504s='-'+c+' '+s;
28505}
28506return s;
28507}
28508function outil_indenter(h){
28509if(s=h.selection){
28510if(s.substr(0,2)=='-*'){
28511s='-**'+s.substr(2);
28512}else if(s.substr(0,2)=='-#'){
28513s='-##'+s.substr(2);
28514}else{
28515s='-* '+s;
28516}
28517}
28518return s;
28519}
28520function outil_desindenter(h){
28521if(s=h.selection){
28522if(s.substr(0,3)=='-**'){
28523s='-*'+s.substr(3);
28524}else if(s.substr(0,3)=='-* '){
28525s=s.substr(3);
28526}else if(s.substr(0,3)=='-##'){
28527s='-#'+s.substr(3);
28528}else if(s.substr(0,3)=='-# '){
28529s=s.substr(3);
28530}
28531}
28532return s;
28533}
28534function espace_si_accolade(h,openWith,closeWith){
28535if(s=h.selection){
28536if(s.charAt(0)=='{'){
28537return openWith+' '+s+' '+closeWith;
28538}
28539else if(c=h.textarea.selectionStart){
28540if(h.textarea.value.charAt(c-1)=='{'){
28541return' '+openWith+s+closeWith+' ';
28542}
28543}
28544}
28545return openWith+s+closeWith;
28546}
28547barre_outils_forum={
28548"nameSpace":"forum",
28549"previewAutoRefresh":false,
28550"onEnter":{
28551"keepDefault":false,
28552"selectionType":"return",
28553"replaceWith":"\n"
28554},
28555"onShiftEnter":{
28556"keepDefault":false,
28557"replaceWith":"\n_ "
28558},
28559"onCtrlEnter":{
28560"keepDefault":false,
28561"replaceWith":"\n\n"
28562},
28563"markupSet":[
28564{
28565"name":"Mettre en {{gras}}",
28566"key":"B",
28567"className":"outil_bold",
28568"replaceWith":function(h){return espace_si_accolade(h,'{{','}}');},
28569"selectionType":"word"
28570},
28571{
28572"name":"Mettre en {italique}",
28573"key":"I",
28574"className":"outil_italic separateur_avant",
28575"replaceWith":function(h){return espace_si_accolade(h,'{','}');},
28576"selectionType":"word"
28577},
28578{
28579"name":"Transformer en [lien hypertexte->http:\/\/...]",
28580"key":"L",
28581"className":"outil_link separateur separateur_apres sepLink separateur_avant",
28582"openWith":"[",
28583"closeWith":"->[![Veuillez indiquer l\u2019adresse de votre lien (vous pouvez indiquer une adresse Internet sous la forme http:\/\/www.monsite.com, une adresse courriel, ou simplement indiquer le num\u00e9ro d\u2019un article de ce site.]!]]"
28584},
28585{
28586"name":"<quote>Citer un message<\/quote>",
28587"key":"Q",
28588"className":"outil_quote separateur separateur_apres sepGuillemets",
28589"openWith":"\n<quote>",
28590"closeWith":"<\/quote>\n",
28591"selectionType":"word"
28592},
28593{
28594"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
28595"className":"outil_guillemets",
28596"openWith":"«",
28597"closeWith":"»",
28598"lang":[
28599"fr",
28600"eo",
28601"cpf",
28602"ar",
28603"es"
28604],
28605"selectionType":"word",
28606"dropMenu":[
28607{
28608"id":"guillemets_simples",
28609"name":"Entourer de \u201cguillemets de second niveau\u201d",
28610"className":"outil_guillemets_simples",
28611"openWith":"“",
28612"closeWith":"”",
28613"display":true,
28614"lang":[
28615"fr",
28616"eo",
28617"cpf",
28618"ar",
28619"es"
28620],
28621"selectionType":"word"
28622}
28623]
28624},
28625{
28626"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
28627"className":"outil_guillemets_de",
28628"openWith":"„",
28629"closeWith":"“",
28630"lang":[
28631"bg",
28632"de",
28633"pl",
28634"hr",
28635"src"
28636],
28637"selectionType":"word",
28638"dropMenu":[
28639{
28640"id":"guillemets_de_simples",
28641"name":"Entourer de \u201cguillemets de second niveau\u201d",
28642"className":"outil_guillemets_de_simples",
28643"openWith":"&sbquo;",
28644"closeWith":"‘",
28645"display":true,
28646"lang":[
28647"bg",
28648"de",
28649"pl",
28650"hr",
28651"src"
28652],
28653"selectionType":"word"
28654}
28655]
28656},
28657{
28658"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
28659"className":"outil_guillemets_simples separateur_avant",
28660"openWith":"“",
28661"closeWith":"”",
28662"lang_not":[
28663"fr",
28664"eo",
28665"cpf",
28666"ar",
28667"es",
28668"bg",
28669"de",
28670"pl",
28671"hr",
28672"src"
28673],
28674"selectionType":"word",
28675"dropMenu":[
28676{
28677"id":"guillemets_autres_simples",
28678"name":"Entourer de \u201cguillemets de second niveau\u201d",
28679"className":"outil_guillemets_uniques",
28680"openWith":"‘",
28681"closeWith":"’",
28682"display":true,
28683"lang_not":[
28684"fr",
28685"eo",
28686"cpf",
28687"ar",
28688"es",
28689"bg",
28690"de",
28691"pl",
28692"hr",
28693"src"
28694],
28695"selectionType":"word"
28696}
28697]
28698},
28699{
28700"name":"Utiliser un outil du Couteau Suisse",
28701"className":"couteau_suisse_drop separateur separateur_apres sepCaracteres",
28702"replaceWith":"",
28703"dropMenu":[
28704{
28705"id":"blocs_bloc",
28706"name":"Ins\u00e9rer un bloc repli\u00e9",
28707"className":"blocs_bloc",
28708"replaceWith":"\n<bloc>Un titre\n\nPlacez votre texte ici\n<\/bloc>\n",
28709"display":true
28710},
28711{
28712"id":"blocs_visible",
28713"name":"Ins\u00e9rer un bloc d\u00e9pli\u00e9",
28714"className":"blocs_visible",
28715"replaceWith":"\n<visible>Un titre\n\nPlacez votre texte ici\n<\/visible>\n",
28716"display":true
28717}
28718]
28719},
28720{
28721"name":"Ins\u00e9rer une frimousse ",
28722"className":"cs_smileys_drop",
28723"replaceWith":"",
28724"dropMenu":[
28725{
28726"id":"smiley_pleure_de_rire",
28727"name":"Ins\u00e9rer une frimousse :’-))",
28728"className":"smiley_pleure_de_rire",
28729"replaceWith":":’-))",
28730"display":true
28731},
28732{
28733"id":"smiley_triste",
28734"name":"Ins\u00e9rer une frimousse :’-(",
28735"className":"smiley_triste",
28736"replaceWith":":’-(",
28737"display":true
28738},
28739{
28740"id":"smiley_mort_de_rire",
28741"name":"Ins\u00e9rer une frimousse :-))",
28742"className":"smiley_mort_de_rire",
28743"replaceWith":":-))",
28744"display":true
28745},
28746{
28747"id":"smiley_en_colere",
28748"name":"Ins\u00e9rer une frimousse :-((",
28749"className":"smiley_en_colere",
28750"replaceWith":":-((",
28751"display":true
28752},
28753{
28754"id":"smiley_clin_d-oeil",
28755"name":"Ins\u00e9rer une frimousse ;-)",
28756"className":"smiley_clin_d-oeil",
28757"replaceWith":";-)",
28758"display":true
28759},
28760{
28761"id":"smiley_sourire",
28762"name":"Ins\u00e9rer une frimousse :-)",
28763"className":"smiley_sourire",
28764"replaceWith":":-)",
28765"display":true
28766},
28767{
28768"id":"smiley_pas_content",
28769"name":"Ins\u00e9rer une frimousse :-(",
28770"className":"smiley_pas_content",
28771"replaceWith":":-(",
28772"display":true
28773},
28774{
28775"id":"smiley_diable",
28776"name":"Ins\u00e9rer une frimousse :->",
28777"className":"smiley_diable",
28778"replaceWith":":->",
28779"display":true
28780},
28781{
28782"id":"smiley_rouge",
28783"name":"Ins\u00e9rer une frimousse |-)",
28784"className":"smiley_rouge",
28785"replaceWith":"|-)",
28786"display":true
28787},
28788{
28789"id":"smiley_rigolo",
28790"name":"Ins\u00e9rer une frimousse :o)",
28791"className":"smiley_rigolo",
28792"replaceWith":":o)",
28793"display":true
28794},
28795{
28796"id":"smiley_lunettes",
28797"name":"Ins\u00e9rer une frimousse B-)",
28798"className":"smiley_lunettes",
28799"replaceWith":"B-)",
28800"display":true
28801},
28802{
28803"id":"smiley_tire_la_langue",
28804"name":"Ins\u00e9rer une frimousse :-P",
28805"className":"smiley_tire_la_langue",
28806"replaceWith":":-P",
28807"display":true
28808},
28809{
28810"id":"smiley_bof",
28811"name":"Ins\u00e9rer une frimousse :-|",
28812"className":"smiley_bof",
28813"replaceWith":":-|",
28814"display":true
28815},
28816{
28817"id":"smiley_mouais",
28818"name":"Ins\u00e9rer une frimousse :-\/",
28819"className":"smiley_mouais",
28820"replaceWith":":-\/",
28821"display":true
28822},
28823{
28824"id":"smiley_surpris",
28825"name":"Ins\u00e9rer une frimousse :-O",
28826"className":"smiley_surpris",
28827"replaceWith":":-O",
28828"display":true
28829}
28830]
28831}
28832]
28833}
28834function outil_liste(h,c){
28835if((s=h.selection)&&(r=s.match(/^-([*#]+) (.*)$/))){
28836r[1]=r[1].replace(/[#*]/g,c);
28837s='-'+r[1]+' '+r[2];
28838}else{
28839s='-'+c+' '+s;
28840}
28841return s;
28842}
28843function outil_indenter(h){
28844if(s=h.selection){
28845if(s.substr(0,2)=='-*'){
28846s='-**'+s.substr(2);
28847}else if(s.substr(0,2)=='-#'){
28848s='-##'+s.substr(2);
28849}else{
28850s='-* '+s;
28851}
28852}
28853return s;
28854}
28855function outil_desindenter(h){
28856if(s=h.selection){
28857if(s.substr(0,3)=='-**'){
28858s='-*'+s.substr(3);
28859}else if(s.substr(0,3)=='-* '){
28860s=s.substr(3);
28861}else if(s.substr(0,3)=='-##'){
28862s='-#'+s.substr(3);
28863}else if(s.substr(0,3)=='-# '){
28864s=s.substr(3);
28865}
28866}
28867return s;
28868}
28869function espace_si_accolade(h,openWith,closeWith){
28870if(s=h.selection){
28871if(s.charAt(0)=='{'){
28872return openWith+' '+s+' '+closeWith;
28873}
28874else if(c=h.textarea.selectionStart){
28875if(h.textarea.value.charAt(c-1)=='{'){
28876return' '+openWith+s+closeWith+' ';
28877}
28878}
28879}
28880return openWith+s+closeWith;
28881}
28882barre_outils_vide={
28883"nameSpace":"vide",
28884"previewAutoRefresh":false,
28885"markupSet":[]
28886}
28887;(function($){
28888$.fn.barre_outils=function(nom,settings){
28889options={
28890lang:'fr'
28891};
28892$.extend(options,settings);
28893return $(this)
28894.not('.markItUpEditor, .no_barre')
28895.markItUp(eval('barre_outils_'+nom),{lang:options.lang})
28896.trigger('markItUpEditor.loaded')
28897.parent().find('.markItUpButton a').attr('tabindex',-1)
28898.end();
28899};
28900$.fn.barre_previsualisation=function(settings){
28901options={
28902previewParserPath:"index.php?action=porte_plume_previsu",
28903textEditer:"Modifier",
28904textVoir:"Voir"
28905};
28906$.extend(options,settings);
28907return $(this)
28908.not('.pp_previsualisation, .no_previsualisation')
28909.previsu_spip(options)
28910.trigger('markItUpPreview.loaded')
28911.parent().find('.markItUpTabs a').attr('tabindex',-1)
28912.end();
28913};
28914$(window).on('load',function(){
28915function barrebouilles(){
28916$('.formulaire_spip textarea.inserer_barre_forum').barre_outils('forum');
28917$('.formulaire_spip textarea.inserer_barre_edition').barre_outils('edition');
28918$('.formulaire_spip textarea.inserer_previsualisation').barre_previsualisation();
28919$('textarea.textarea_forum').barre_outils('forum');
28920$('.formulaire_forum textarea[name=texte]').barre_outils('forum');
28921$('.formulaire_spip textarea[name=texte]')
28922.barre_outils('edition').end()
28923.barre_previsualisation();
28924}
28925barrebouilles();
28926onAjaxLoad(barrebouilles);
28927});
28928})(jQuery);
28929
28930
28931/* local/couteau-suisse/header.js */
28932var cs_prive=window.location.pathname.match(/\/ecrire\/$/)!=null;
28933jQuery.fn.cs_todo=function(){return this.not('.cs_done').addClass('cs_done');};
28934if(typeof(bloc_actif)=='undefined')
28935var bloc_actif='';
28936if(typeof(bloc_actif_num)=='undefined')
28937var bloc_actif_num='';
28938jQuery.fn.blocs_toggle_slide_dist=function(selector){
28939this.toggleClass('blocs_slide');
28940if(typeof jQuery.fn.blocs_toggle_slide=='function')
28941return this.blocs_toggle_slide();
28942return this.is(".blocs_slide")?this.slideUp(blocs_slide):this.slideDown(blocs_slide);
28943};
28944jQuery.fn.blocs_set_title=function(selector){
28945var title=this.parent().find('.blocs_title:last').text();
28946if(!title)title=blocs_title_def;
28947title=title.split(blocs_title_sep);
28948this.children('a').attr('title',title[jQuery(this).is('.blocs_replie')?0:1]);
28949return this;
28950};
28951jQuery.fn.blocs_toggle=function(){
28952if(!this.length)return this;
28953if(this.length>1){
28954this.each(function(){$(this).eq(0).blocs_toggle();});
28955return this;
28956}
28957var cible=this.is('.cs_blocs')?this.children('.blocs_titre').eq(0):this;
28958cible.toggleClass('blocs_replie').blocs_set_title();
28959var dest=this[0].id.match('^cs_bloc_id_')?jQuery('div.'+this[0].id):cible.next();
28960if(blocs_slide==='aucun'){
28961dest.toggleClass('blocs_invisible');
28962if(dest.is('div.blocs_resume'))dest.next().toggleClass('blocs_invisible');
28963}else{
28964dest.blocs_toggle_slide_dist();
28965if(dest.is('div.blocs_resume'))dest.next().blocs_toggle_slide_dist();
28966}
28967var lien=cible.children();
28968var url=lien.attr("href");
28969if(url!='javascript:;'&&!url.endsWith('#_foo')){
28970lien.attr("href",'#_foo');
28971cible.parent().children(".blocs_destination")
28972.load(url);
28973}
28974return this;
28975};
28976jQuery.fn.blocs_replie_tout=function(){
28977if(blocs_replier_tout){
28978var cible=this.is('.cs_blocs')?this:this.parents('div.cs_blocs');
28979var lignee=cible.children('.blocs_titre');
28980jQuery('.blocs_titre').not('.blocs_replie').not(lignee).blocs_toggle();
28981}
28982return this;
28983}
28984var blocs_clic_ajax=null;
28985function blocs_init(){
28986jQuery('.blocs_titre',this).cs_todo()
28987.click(function(){
28988jQuery(this).blocs_replie_tout().blocs_toggle();
28989return false;
28990})
28991.each(function(){
28992jQuery(this).blocs_set_title();
28993});
28994jQuery('.blocs_destination a.replier_bloc',this).cs_todo()
28995.click(function(){
28996var s=jQuery(this).parents('.cs_blocs:first');
28997if(typeof jQuery.fn.scrollTo=="function")
28998jQuery('body').scrollTo(s,500,
28999{margin:true,onAfter:function(){s.blocs_replie_tout().blocs_toggle();}});
29000else
29001s.blocs_replie_tout().blocs_toggle();
29002return false;
29003});
29004var blocs=blocs_get_blocs(window.location,true);
29005if(blocs&&(this==document))
29006blocs_clic_blocs(blocs,true);
29007blocs=blocs_get_blocs(window.location);
29008if(blocs&&(this==document))
29009blocs_clic_blocs(blocs);
29010jQuery('.spip_note['+cs_sel_jQuery+'name^=nb], .spip_note['+cs_sel_jQuery+'id^=nb]').each(function(i){
29011jQuery(this).click(function(e){
29012var href=this.href.substring(this.href.lastIndexOf("#"));
29013href=jQuery(href).parents('.cs_blocs').eq(0).children('.blocs_titre').eq(0);
29014old_blocs_slide=blocs_slide;
29015if(blocs_slide!='aucun')
29016blocs_slide=-1;
29017if(href.is('.blocs_replie'))
29018href.click();
29019blocs_slide=old_blocs_slide;
29020return true;
29021});
29022});
29023}
29024var valStyle=document.createElement('style');
29025var valHead=document.head||document.getElementsByTagName('head')[0];
29026valHead.appendChild(valStyle);
29027valStyle.type='text/css';
29028valStyle.appendChild(document.createTextNode('div.blocs_invisible { display:none; }'));
29029function cs_blocs_cookie(){
29030if(typeof jQuery.cookie!='function')return;
29031var blocs_cookie_name='blocs'+window.location.pathname+window.location.search
29032blocs_cookie_name=blocs_cookie_name.replace(/[ ;,=]/,'_');
29033var deplies=jQuery.cookie(blocs_cookie_name);
29034if(deplies){
29035jQuery(".cs_blocs[id^='deplier_num'] .blocs_titre").not('.blocs_replie').blocs_toggle();
29036jQuery(deplies).blocs_toggle();
29037}
29038jQuery(window).bind('unload',function(){
29039jQuery.cookie(blocs_cookie_name,blocs_deplies());
29040});
29041}
29042function blocs_deplies(){
29043var deplies='';
29044jQuery('.cs_blocs').each(function(){
29045var numero=/cs_bloc\d+/.exec(this.className);
29046if(numero==null)return;
29047replie=jQuery(this).children('.blocs_titre').eq(0).is('.blocs_replie');
29048if(!replie)deplies+=(deplies.length?', ':'')+'div.'+numero[0];
29049});
29050return deplies.length?deplies:null;
29051}
29052function blocs_clic_blocs(liste,numerote){
29053var blocs=liste.split(',');
29054for(var i=0;i<blocs.length;i++)
29055(numerote)
29056?jQuery('div.cs_bloc'+blocs[i]+' .blocs_titre').eq(0).click()
29057:jQuery('div.cs_blocs .blocs_titre').eq(blocs[i]).click();
29058}
29059function blocs_get_blocs(url,numerote){
29060tab=numerote
29061?url.search.match(/[?&]deplier_num=([0-9,]*)/)||url.hash.match(/#deplier_num([0-9,]*)/)
29062:url.search.match(/[?&]deplier=([0-9,]*)/)||url.hash.match(/#deplier([0-9,]*)/);
29063return tab==null?(numerote?bloc_actif_num:bloc_actif):tab[1];
29064}
29065function blocs_get_pagination(url){
29066tab=url.match(/#pagination([0-9]+)/);
29067return tab==null?bloc_actif:tab[1];
29068}
29069function blocs_deplier_pour_ancre(){
29070var ancre=window.location.hash;
29071if(ancre){
29072ancre=jQuery(ancre);
29073var bloc=ancre.parents('.cs_blocs').find('.blocs_titre.blocs_replie');
29074if(bloc.length&&(ancre.length==1)){
29075bloc.blocs_toggle();
29076jQuery('html,body').animate({scrollTop:ancre.offset().top},'slow');
29077}
29078}
29079};
29080var blocs_pagination=blocs_get_pagination(window.location.hash);
29081var blocs_replier_tout=0;
29082var blocs_millisec=300;
29083var blocs_slide=blocs_millisec;
29084var blocs_title_sep=/\|\|/g;
29085var blocs_title_def='Déplier||Replier';
29086var cs_init=function(){
29087blocs_init.apply(this);
29088}
29089if(typeof onAjaxLoad=='function')onAjaxLoad(cs_init);
29090if(window.jQuery){
29091var cs_sel_jQuery='';
29092var cs_CookiePlugin="prive/javascript/js.cookie.js";
29093jQuery(document).ready(function(){
29094cs_init.apply(document);
29095});
29096}
29097
29098

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.