PageSourceSearch

https://cnig.gouv.fr/local/cache-js/ff3d17cf7fe15f5cd201fdf19882efa8.js?1788525653

js cnig.gouv.fr collected 2026-09-24 18:01:46 UTC 261,669 bytes, 11,074 lines download raw bytes

vendor: 144,573 bytes, lines 1-6632
1/* compact [
2	prive/javascript/jquery.js?1788424554
3	prive/javascript/jquery.form.js?1788424599
4	prive/javascript/jquery.autosave.js?1788424554
5	prive/javascript/jquery.placeholder-label.js?1788424554
6	prive/javascript/ajaxCallback.js?1788424599
7	prive/javascript/js.cookie.js?1788424554
8	plugins-dist/vtimeline/javascript/vertical-timeline.js?1788424598
9	plugins-dist/mediabox/lib/lity/lity.js?1788424553
10	plugins-dist/mediabox/lity/js/lity.mediabox.js?1788424597
11	plugins-dist/mediabox/javascript/spip.mediabox.js?1788424597
12	plugins-dist/porte_plume/javascript/jquery.markitup_pour_spip.js?1788424553
13	plugins-dist/porte_plume/javascript/jquery.previsu_spip.js?1788424598
14	plugins-dist/ciwidget/_js/ciwidget_v2_2.js
15] 55.6% */
16
17/* prive/javascript/jquery.js?1788424554 */
18
19(function(global,factory){
20"use strict";
21if(typeof module==="object"&&typeof module.exports==="object"){
22module.exports=global.document?
23factory(global,true):
24function(w){
25if(!w.document){
26throw new Error("jQuery requires a window with a document");
27}
28return factory(w);
29};
30}else{
31factory(global);
32}
33})(typeof window!=="undefined"?window:this,function(window,noGlobal){
34"use strict";
35var arr=[];
36var getProto=Object.getPrototypeOf;
37var slice=arr.slice;
38var flat=arr.flat?function(array){
39return arr.flat.call(array);
40}:function(array){
41return arr.concat.apply([],array);
42};
43var push=arr.push;
44var indexOf=arr.indexOf;
45var class2type={};
46var toString=class2type.toString;
47var hasOwn=class2type.hasOwnProperty;
48var fnToString=hasOwn.toString;
49var ObjectFunctionString=fnToString.call(Object);
50var support={};
51var isFunction=function isFunction(obj){
52return typeof obj==="function"&&typeof obj.nodeType!=="number"&&
53typeof obj.item!=="function";
54};
55var isWindow=function isWindow(obj){
56return obj!=null&&obj===obj.window;
57};
58var document=window.document;
59var preservedScriptAttributes={
60type:true,
61src:true,
62nonce:true,
63noModule:true
64};
65function DOMEval(code,node,doc){
66doc=doc||document;
67var i,val,
68script=doc.createElement("script");
69script.text=code;
70if(node){
71for(i in preservedScriptAttributes){
72val=node[i]||node.getAttribute&&node.getAttribute(i);
73if(val){
74script.setAttribute(i,val);
75}
76}
77}
78doc.head.appendChild(script).parentNode.removeChild(script);
79}
80function toType(obj){
81if(obj==null){
82return obj+"";
83}
84return typeof obj==="object"||typeof obj==="function"?
85class2type[toString.call(obj)]||"object":
86typeof obj;
87}
88var version="3.7.1",
89rhtmlSuffix=/HTML$/i,
90jQuery=function(selector,context){
91return new jQuery.fn.init(selector,context);
92};
93jQuery.fn=jQuery.prototype={
94jquery:version,
95constructor:jQuery,
96length:0,
97toArray:function(){
98return slice.call(this);
99},
100get:function(num){
101if(num==null){
102return slice.call(this);
103}
104return num<0?this[num+this.length]:this[num];
105},
106pushStack:function(elems){
107var ret=jQuery.merge(this.constructor(),elems);
108ret.prevObject=this;
109return ret;
110},
111each:function(callback){
112return jQuery.each(this,callback);
113},
114map:function(callback){
115return this.pushStack(jQuery.map(this,function(elem,i){
116return callback.call(elem,i,elem);
117}));
118},
119slice:function(){
120return this.pushStack(slice.apply(this,arguments));
121},
122first:function(){
123return this.eq(0);
124},
125last:function(){
126return this.eq(-1);
127},
128even:function(){
129return this.pushStack(jQuery.grep(this,function(_elem,i){
130return(i+1)%2;
131}));
132},
133odd:function(){
134return this.pushStack(jQuery.grep(this,function(_elem,i){
135return i%2;
136}));
137},
138eq:function(i){
139var len=this.length,
140j=+i+(i<0?len:0);
141return this.pushStack(j>=0&&j<len?[this[j]]:[]);
142},
143end:function(){
144return this.prevObject||this.constructor();
145},
146push:push,
147sort:arr.sort,
148splice:arr.splice
149};
150jQuery.extend=jQuery.fn.extend=function(){
151var options,name,src,copy,copyIsArray,clone,
152target=arguments[0]||{},
153i=1,
154length=arguments.length,
155deep=false;
156if(typeof target==="boolean"){
157deep=target;
158target=arguments[i]||{};
159i++;
160}
161if(typeof target!=="object"&&!isFunction(target)){
162target={};
163}
164if(i===length){
165target=this;
166i--;
167}
168for(;i<length;i++){
169if((options=arguments[i])!=null){
170for(name in options){
171copy=options[name];
172if(name==="__proto__"||target===copy){
173continue;
174}
175if(deep&&copy&&(jQuery.isPlainObject(copy)||
176(copyIsArray=Array.isArray(copy)))){
177src=target[name];
178if(copyIsArray&&!Array.isArray(src)){
179clone=[];
180}else if(!copyIsArray&&!jQuery.isPlainObject(src)){
181clone={};
182}else{
183clone=src;
184}
185copyIsArray=false;
186target[name]=jQuery.extend(deep,clone,copy);
187}else if(copy!==undefined){
188target[name]=copy;
189}
190}
191}
192}
193return target;
194};
195jQuery.extend({
196expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),
197isReady:true,
198error:function(msg){
199throw new Error(msg);
200},
201noop:function(){},
202isPlainObject:function(obj){
203var proto,Ctor;
204if(!obj||toString.call(obj)!=="[object Object]"){
205return false;
206}
207proto=getProto(obj);
208if(!proto){
209return true;
210}
211Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;
212return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;
213},
214isEmptyObject:function(obj){
215var name;
216for(name in obj){
217return false;
218}
219return true;
220},
221globalEval:function(code,options,doc){
222DOMEval(code,{nonce:options&&options.nonce},doc);
223},
224each:function(obj,callback){
225var length,i=0;
226if(isArrayLike(obj)){
227length=obj.length;
228for(;i<length;i++){
229if(callback.call(obj[i],i,obj[i])===false){
230break;
231}
232}
233}else{
234for(i in obj){
235if(callback.call(obj[i],i,obj[i])===false){
236break;
237}
238}
239}
240return obj;
241},
242text:function(elem){
243var node,
244ret="",
245i=0,
246nodeType=elem.nodeType;
247if(!nodeType){
248while((node=elem[i++])){
249ret+=jQuery.text(node);
250}
251}
252if(nodeType===1||nodeType===11){
253return elem.textContent;
254}
255if(nodeType===9){
256return elem.documentElement.textContent;
257}
258if(nodeType===3||nodeType===4){
259return elem.nodeValue;
260}
261return ret;
262},
263makeArray:function(arr,results){
264var ret=results||[];
265if(arr!=null){
266if(isArrayLike(Object(arr))){
267jQuery.merge(ret,
268typeof arr==="string"?
269[arr]:arr
270);
271}else{
272push.call(ret,arr);
273}
274}
275return ret;
276},
277inArray:function(elem,arr,i){
278return arr==null?-1:indexOf.call(arr,elem,i);
279},
280isXMLDoc:function(elem){
281var namespace=elem&&elem.namespaceURI,
282docElem=elem&&(elem.ownerDocument||elem).documentElement;
283return!rhtmlSuffix.test(namespace||docElem&&docElem.nodeName||"HTML");
284},
285merge:function(first,second){
286var len=+second.length,
287j=0,
288i=first.length;
289for(;j<len;j++){
290first[i++]=second[j];
291}
292first.length=i;
293return first;
294},
295grep:function(elems,callback,invert){
296var callbackInverse,
297matches=[],
298i=0,
299length=elems.length,
300callbackExpect=!invert;
301for(;i<length;i++){
302callbackInverse=!callback(elems[i],i);
303if(callbackInverse!==callbackExpect){
304matches.push(elems[i]);
305}
306}
307return matches;
308},
309map:function(elems,callback,arg){
310var length,value,
311i=0,
312ret=[];
313if(isArrayLike(elems)){
314length=elems.length;
315for(;i<length;i++){
316value=callback(elems[i],i,arg);
317if(value!=null){
318ret.push(value);
319}
320}
321}else{
322for(i in elems){
323value=callback(elems[i],i,arg);
324if(value!=null){
325ret.push(value);
326}
327}
328}
329return flat(ret);
330},
331guid:1,
332support:support
333});
334if(typeof Symbol==="function"){
335jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];
336}
337jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
338function(_i,name){
339class2type["[object "+name+"]"]=name.toLowerCase();
340});
341function isArrayLike(obj){
342var length=!!obj&&"length"in obj&&obj.length,
343type=toType(obj);
344if(isFunction(obj)||isWindow(obj)){
345return false;
346}
347return type==="array"||length===0||
348typeof length==="number"&&length>0&&(length-1)in obj;
349}
350function nodeName(elem,name){
351return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();
352}
353var pop=arr.pop;
354var sort=arr.sort;
355var splice=arr.splice;
356var whitespace="[\\x20\\t\\r\\n\\f]";
357var rtrimCSS=new RegExp(
358"^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$",
359"g"
360);
361jQuery.contains=function(a,b){
362var bup=b&&b.parentNode;
363return a===bup||!!(bup&&bup.nodeType===1&&(
364a.contains?
365a.contains(bup):
366a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16
367));
368};
369var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
370function fcssescape(ch,asCodePoint){
371if(asCodePoint){
372if(ch==="\0"){
373return"\uFFFD";
374}
375return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";
376}
377return"\\"+ch;
378}
379jQuery.escapeSelector=function(sel){
380return(sel+"").replace(rcssescape,fcssescape);
381};
382var preferredDoc=document,
383pushNative=push;
384(function(){
385var i,
386Expr,
387outermostContext,
388sortInput,
389hasDuplicate,
390push=pushNative,
391document,
392documentElement,
393documentIsHTML,
394rbuggyQSA,
395matches,
396expando=jQuery.expando,
397dirruns=0,
398done=0,
399classCache=createCache(),
400tokenCache=createCache(),
401compilerCache=createCache(),
402nonnativeSelectorCache=createCache(),
403sortOrder=function(a,b){
404if(a===b){
405hasDuplicate=true;
406}
407return 0;
408},
409booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|"+
410"loop|multiple|open|readonly|required|scoped",
411identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+
412"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
413attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+
414"*([*^$|!~]?=)"+whitespace+
415"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+
416whitespace+"*\\]",
417pseudos=":("+identifier+")(?:\\(("+
418"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+
419"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+
420".*"+
421")\\)|)",
422rwhitespace=new RegExp(whitespace+"+","g"),
423rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),
424rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+
425whitespace+"*"),
426rdescend=new RegExp(whitespace+"|>"),
427rpseudo=new RegExp(pseudos),
428ridentifier=new RegExp("^"+identifier+"$"),
429matchExpr={
430ID:new RegExp("^#("+identifier+")"),
431CLASS:new RegExp("^\\.("+identifier+")"),
432TAG:new RegExp("^("+identifier+"|[*])"),
433ATTR:new RegExp("^"+attributes),
434PSEUDO:new RegExp("^"+pseudos),
435CHILD:new RegExp(
436"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+
437whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+
438whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),
439bool:new RegExp("^(?:"+booleans+")$","i"),
440needsContext:new RegExp("^"+whitespace+
441"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+
442"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")
443},
444rinputs=/^(?:input|select|textarea|button)$/i,
445rheader=/^h\d$/i,
446rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
447rsibling=/[+~]/,
448runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+
449"?|\\\\([^\\r\\n\\f])","g"),
450funescape=function(escape,nonHex){
451var high="0x"+escape.slice(1)-0x10000;
452if(nonHex){
453return nonHex;
454}
455return high<0?
456String.fromCharCode(high+0x10000):
457String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);
458},
459unloadHandler=function(){
460setDocument();
461},
462inDisabledFieldset=addCombinator(
463function(elem){
464return elem.disabled===true&&nodeName(elem,"fieldset");
465},
466{dir:"parentNode",next:"legend"}
467);
468function safeActiveElement(){
469try{
470return document.activeElement;
471}catch(err){}
472}
473try{
474push.apply(
475(arr=slice.call(preferredDoc.childNodes)),
476preferredDoc.childNodes
477);
478arr[preferredDoc.childNodes.length].nodeType;
479}catch(e){
480push={
481apply:function(target,els){
482pushNative.apply(target,slice.call(els));
483},
484call:function(target){
485pushNative.apply(target,slice.call(arguments,1));
486}
487};
488}
489function find(selector,context,results,seed){
490var m,i,elem,nid,match,groups,newSelector,
491newContext=context&&context.ownerDocument,
492nodeType=context?context.nodeType:9;
493results=results||[];
494if(typeof selector!=="string"||!selector||
495nodeType!==1&&nodeType!==9&&nodeType!==11){
496return results;
497}
498if(!seed){
499setDocument(context);
500context=context||document;
501if(documentIsHTML){
502if(nodeType!==11&&(match=rquickExpr.exec(selector))){
503if((m=match[1])){
504if(nodeType===9){
505if((elem=context.getElementById(m))){
506if(elem.id===m){
507push.call(results,elem);
508return results;
509}
510}else{
511return results;
512}
513}else{
514if(newContext&&(elem=newContext.getElementById(m))&&
515find.contains(context,elem)&&
516elem.id===m){
517push.call(results,elem);
518return results;
519}
520}
521}else if(match[2]){
522push.apply(results,context.getElementsByTagName(selector));
523return results;
524}else if((m=match[3])&&context.getElementsByClassName){
525push.apply(results,context.getElementsByClassName(m));
526return results;
527}
528}
529if(!nonnativeSelectorCache[selector+" "]&&
530(!rbuggyQSA||!rbuggyQSA.test(selector))){
531newSelector=selector;
532newContext=context;
533if(nodeType===1&&
534(rdescend.test(selector)||rleadingCombinator.test(selector))){
535newContext=rsibling.test(selector)&&testContext(context.parentNode)||
536context;
537if(newContext!=context||!support.scope){
538if((nid=context.getAttribute("id"))){
539nid=jQuery.escapeSelector(nid);
540}else{
541context.setAttribute("id",(nid=expando));
542}
543}
544groups=tokenize(selector);
545i=groups.length;
546while(i--){
547groups[i]=(nid?"#"+nid:":scope")+" "+
548toSelector(groups[i]);
549}
550newSelector=groups.join(",");
551}
552try{
553push.apply(results,
554newContext.querySelectorAll(newSelector)
555);
556return results;
557}catch(qsaError){
558nonnativeSelectorCache(selector,true);
559}finally{
560if(nid===expando){
561context.removeAttribute("id");
562}
563}
564}
565}
566}
567return select(selector.replace(rtrimCSS,"$1"),context,results,seed);
568}
569function createCache(){
570var keys=[];
571function cache(key,value){
572if(keys.push(key+" ")>Expr.cacheLength){
573delete cache[keys.shift()];
574}
575return(cache[key+" "]=value);
576}
577return cache;
578}
579function markFunction(fn){
580fn[expando]=true;
581return fn;
582}
583function assert(fn){
584var el=document.createElement("fieldset");
585try{
586return!!fn(el);
587}catch(e){
588return false;
589}finally{
590if(el.parentNode){
591el.parentNode.removeChild(el);
592}
593el=null;
594}
595}
596function createInputPseudo(type){
597return function(elem){
598return nodeName(elem,"input")&&elem.type===type;
599};
600}
601function createButtonPseudo(type){
602return function(elem){
603return(nodeName(elem,"input")||nodeName(elem,"button"))&&
604elem.type===type;
605};
606}
607function createDisabledPseudo(disabled){
608return function(elem){
609if("form"in elem){
610if(elem.parentNode&&elem.disabled===false){
611if("label"in elem){
612if("label"in elem.parentNode){
613return elem.parentNode.disabled===disabled;
614}else{
615return elem.disabled===disabled;
616}
617}
618return elem.isDisabled===disabled||
619elem.isDisabled!==!disabled&&
620inDisabledFieldset(elem)===disabled;
621}
622return elem.disabled===disabled;
623}else if("label"in elem){
624return elem.disabled===disabled;
625}
626return false;
627};
628}
629function createPositionalPseudo(fn){
630return markFunction(function(argument){
631argument=+argument;
632return markFunction(function(seed,matches){
633var j,
634matchIndexes=fn([],seed.length,argument),
635i=matchIndexes.length;
636while(i--){
637if(seed[(j=matchIndexes[i])]){
638seed[j]=!(matches[j]=seed[j]);
639}
640}
641});
642});
643}
644function testContext(context){
645return context&&typeof context.getElementsByTagName!=="undefined"&&context;
646}
647function setDocument(node){
648var subWindow,
649doc=node?node.ownerDocument||node:preferredDoc;
650if(doc==document||doc.nodeType!==9||!doc.documentElement){
651return document;
652}
653document=doc;
654documentElement=document.documentElement;
655documentIsHTML=!jQuery.isXMLDoc(document);
656matches=documentElement.matches||
657documentElement.webkitMatchesSelector||
658documentElement.msMatchesSelector;
659if(documentElement.msMatchesSelector&&
660preferredDoc!=document&&
661(subWindow=document.defaultView)&&subWindow.top!==subWindow){
662subWindow.addEventListener("unload",unloadHandler);
663}
664support.getById=assert(function(el){
665documentElement.appendChild(el).id=jQuery.expando;
666return!document.getElementsByName||
667!document.getElementsByName(jQuery.expando).length;
668});
669support.disconnectedMatch=assert(function(el){
670return matches.call(el,"*");
671});
672support.scope=assert(function(){
673return document.querySelectorAll(":scope");
674});
675support.cssHas=assert(function(){
676try{
677document.querySelector(":has(*,:jqfake)");
678return false;
679}catch(e){
680return true;
681}
682});
683if(support.getById){
684Expr.filter.ID=function(id){
685var attrId=id.replace(runescape,funescape);
686return function(elem){
687return elem.getAttribute("id")===attrId;
688};
689};
690Expr.find.ID=function(id,context){
691if(typeof context.getElementById!=="undefined"&&documentIsHTML){
692var elem=context.getElementById(id);
693return elem?[elem]:[];
694}
695};
696}else{
697Expr.filter.ID=function(id){
698var attrId=id.replace(runescape,funescape);
699return function(elem){
700var node=typeof elem.getAttributeNode!=="undefined"&&
701elem.getAttributeNode("id");
702return node&&node.value===attrId;
703};
704};
705Expr.find.ID=function(id,context){
706if(typeof context.getElementById!=="undefined"&&documentIsHTML){
707var node,i,elems,
708elem=context.getElementById(id);
709if(elem){
710node=elem.getAttributeNode("id");
711if(node&&node.value===id){
712return[elem];
713}
714elems=context.getElementsByName(id);
715i=0;
716while((elem=elems[i++])){
717node=elem.getAttributeNode("id");
718if(node&&node.value===id){
719return[elem];
720}
721}
722}
723return[];
724}
725};
726}
727Expr.find.TAG=function(tag,context){
728if(typeof context.getElementsByTagName!=="undefined"){
729return context.getElementsByTagName(tag);
730}else{
731return context.querySelectorAll(tag);
732}
733};
734Expr.find.CLASS=function(className,context){
735if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){
736return context.getElementsByClassName(className);
737}
738};
739rbuggyQSA=[];
740assert(function(el){
741var input;
742documentElement.appendChild(el).innerHTML=
743"<a id='"+expando+"' href='' disabled='disabled'></a>"+
744"<select id='"+expando+"-\r\\' disabled='disabled'>"+
745"<option selected=''></option></select>";
746if(!el.querySelectorAll("[selected]").length){
747rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");
748}
749if(!el.querySelectorAll("[id~="+expando+"-]").length){
750rbuggyQSA.push("~=");
751}
752if(!el.querySelectorAll("a#"+expando+"+*").length){
753rbuggyQSA.push(".#.+[+~]");
754}
755if(!el.querySelectorAll(":checked").length){
756rbuggyQSA.push(":checked");
757}
758input=document.createElement("input");
759input.setAttribute("type","hidden");
760el.appendChild(input).setAttribute("name","D");
761documentElement.appendChild(el).disabled=true;
762if(el.querySelectorAll(":disabled").length!==2){
763rbuggyQSA.push(":enabled",":disabled");
764}
765input=document.createElement("input");
766input.setAttribute("name","");
767el.appendChild(input);
768if(!el.querySelectorAll("[name='']").length){
769rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+
770whitespace+"*(?:''|\"\")");
771}
772});
773if(!support.cssHas){
774rbuggyQSA.push(":has");
775}
776rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));
777sortOrder=function(a,b){
778if(a===b){
779hasDuplicate=true;
780return 0;
781}
782var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;
783if(compare){
784return compare;
785}
786compare=(a.ownerDocument||a)==(b.ownerDocument||b)?
787a.compareDocumentPosition(b):
7881;
789if(compare&1||
790(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){
791if(a===document||a.ownerDocument==preferredDoc&&
792find.contains(preferredDoc,a)){
793return-1;
794}
795if(b===document||b.ownerDocument==preferredDoc&&
796find.contains(preferredDoc,b)){
797return 1;
798}
799return sortInput?
800(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):
8010;
802}
803return compare&4?-1:1;
804};
805return document;
806}
807find.matches=function(expr,elements){
808return find(expr,null,null,elements);
809};
810find.matchesSelector=function(elem,expr){
811setDocument(elem);
812if(documentIsHTML&&
813!nonnativeSelectorCache[expr+" "]&&
814(!rbuggyQSA||!rbuggyQSA.test(expr))){
815try{
816var ret=matches.call(elem,expr);
817if(ret||support.disconnectedMatch||
818elem.document&&elem.document.nodeType!==11){
819return ret;
820}
821}catch(e){
822nonnativeSelectorCache(expr,true);
823}
824}
825return find(expr,document,null,[elem]).length>0;
826};
827find.contains=function(context,elem){
828if((context.ownerDocument||context)!=document){
829setDocument(context);
830}
831return jQuery.contains(context,elem);
832};
833find.attr=function(elem,name){
834if((elem.ownerDocument||elem)!=document){
835setDocument(elem);
836}
837var fn=Expr.attrHandle[name.toLowerCase()],
838val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?
839fn(elem,name,!documentIsHTML):
840undefined;
841if(val!==undefined){
842return val;
843}
844return elem.getAttribute(name);
845};
846find.error=function(msg){
847throw new Error("Syntax error, unrecognized expression: "+msg);
848};
849jQuery.uniqueSort=function(results){
850var elem,
851duplicates=[],
852j=0,
853i=0;
854hasDuplicate=!support.sortStable;
855sortInput=!support.sortStable&&slice.call(results,0);
856sort.call(results,sortOrder);
857if(hasDuplicate){
858while((elem=results[i++])){
859if(elem===results[i]){
860j=duplicates.push(i);
861}
862}
863while(j--){
864splice.call(results,duplicates[j],1);
865}
866}
867sortInput=null;
868return results;
869};
870jQuery.fn.uniqueSort=function(){
871return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
872};
873Expr=jQuery.expr={
874cacheLength:50,
875createPseudo:markFunction,
876match:matchExpr,
877attrHandle:{},
878find:{},
879relative:{
880">":{dir:"parentNode",first:true},
881" ":{dir:"parentNode"},
882"+":{dir:"previousSibling",first:true},
883"~":{dir:"previousSibling"}
884},
885preFilter:{
886ATTR:function(match){
887match[1]=match[1].replace(runescape,funescape);
888match[3]=(match[3]||match[4]||match[5]||"")
889.replace(runescape,funescape);
890if(match[2]==="~="){
891match[3]=" "+match[3]+" ";
892}
893return match.slice(0,4);
894},
895CHILD:function(match){
896match[1]=match[1].toLowerCase();
897if(match[1].slice(0,3)==="nth"){
898if(!match[3]){
899find.error(match[0]);
900}
901match[4]=+(match[4]?
902match[5]+(match[6]||1):
9032*(match[3]==="even"||match[3]==="odd")
904);
905match[5]=+((match[7]+match[8])||match[3]==="odd");
906}else if(match[3]){
907find.error(match[0]);
908}
909return match;
910},
911PSEUDO:function(match){
912var excess,
913unquoted=!match[6]&&match[2];
914if(matchExpr.CHILD.test(match[0])){
915return null;
916}
917if(match[3]){
918match[2]=match[4]||match[5]||"";
919}else if(unquoted&&rpseudo.test(unquoted)&&
920(excess=tokenize(unquoted,true))&&
921(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){
922match[0]=match[0].slice(0,excess);
923match[2]=unquoted.slice(0,excess);
924}
925return match.slice(0,3);
926}
927},
928filter:{
929TAG:function(nodeNameSelector){
930var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();
931return nodeNameSelector==="*"?
932function(){
933return true;
934}:
935function(elem){
936return nodeName(elem,expectedNodeName);
937};
938},
939CLASS:function(className){
940var pattern=classCache[className+" "];
941return pattern||
942(pattern=new RegExp("(^|"+whitespace+")"+className+
943"("+whitespace+"|$)"))&&
944classCache(className,function(elem){
945return pattern.test(
946typeof elem.className==="string"&&elem.className||
947typeof elem.getAttribute!=="undefined"&&
948elem.getAttribute("class")||
949""
950);
951});
952},
953ATTR:function(name,operator,check){
954return function(elem){
955var result=find.attr(elem,name);
956if(result==null){
957return operator==="!=";
958}
959if(!operator){
960return true;
961}
962result+="";
963if(operator==="="){
964return result===check;
965}
966if(operator==="!="){
967return result!==check;
968}
969if(operator==="^="){
970return check&&result.indexOf(check)===0;
971}
972if(operator==="*="){
973return check&&result.indexOf(check)>-1;
974}
975if(operator==="$="){
976return check&&result.slice(-check.length)===check;
977}
978if(operator==="~="){
979return(" "+result.replace(rwhitespace," ")+" ")
980.indexOf(check)>-1;
981}
982if(operator==="|="){
983return result===check||result.slice(0,check.length+1)===check+"-";
984}
985return false;
986};
987},
988CHILD:function(type,what,_argument,first,last){
989var simple=type.slice(0,3)!=="nth",
990forward=type.slice(-4)!=="last",
991ofType=what==="of-type";
992return first===1&&last===0?
993function(elem){
994return!!elem.parentNode;
995}:
996function(elem,_context,xml){
997var cache,outerCache,node,nodeIndex,start,
998dir=simple!==forward?"nextSibling":"previousSibling",
999parent=elem.parentNode,
1000name=ofType&&elem.nodeName.toLowerCase(),
1001useCache=!xml&&!ofType,
1002diff=false;
1003if(parent){
1004if(simple){
1005while(dir){
1006node=elem;
1007while((node=node[dir])){
1008if(ofType?
1009nodeName(node,name):
1010node.nodeType===1){
1011return false;
1012}
1013}
1014start=dir=type==="only"&&!start&&"nextSibling";
1015}
1016return true;
1017}
1018start=[forward?parent.firstChild:parent.lastChild];
1019if(forward&&useCache){
1020outerCache=parent[expando]||(parent[expando]={});
1021cache=outerCache[type]||[];
1022nodeIndex=cache[0]===dirruns&&cache[1];
1023diff=nodeIndex&&cache[2];
1024node=nodeIndex&&parent.childNodes[nodeIndex];
1025while((node=++nodeIndex&&node&&node[dir]||
1026(diff=nodeIndex=0)||start.pop())){
1027if(node.nodeType===1&&++diff&&node===elem){
1028outerCache[type]=[dirruns,nodeIndex,diff];
1029break;
1030}
1031}
1032}else{
1033if(useCache){
1034outerCache=elem[expando]||(elem[expando]={});
1035cache=outerCache[type]||[];
1036nodeIndex=cache[0]===dirruns&&cache[1];
1037diff=nodeIndex;
1038}
1039if(diff===false){
1040while((node=++nodeIndex&&node&&node[dir]||
1041(diff=nodeIndex=0)||start.pop())){
1042if((ofType?
1043nodeName(node,name):
1044node.nodeType===1)&&
1045++diff){
1046if(useCache){
1047outerCache=node[expando]||
1048(node[expando]={});
1049outerCache[type]=[dirruns,diff];
1050}
1051if(node===elem){
1052break;
1053}
1054}
1055}
1056}
1057}
1058diff-=last;
1059return diff===first||(diff%first===0&&diff/first>=0);
1060}
1061};
1062},
1063PSEUDO:function(pseudo,argument){
1064var args,
1065fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||
1066find.error("unsupported pseudo: "+pseudo);
1067if(fn[expando]){
1068return fn(argument);
1069}
1070if(fn.length>1){
1071args=[pseudo,pseudo,"",argument];
1072return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?
1073markFunction(function(seed,matches){
1074var idx,
1075matched=fn(seed,argument),
1076i=matched.length;
1077while(i--){
1078idx=indexOf.call(seed,matched[i]);
1079seed[idx]=!(matches[idx]=matched[i]);
1080}
1081}):
1082function(elem){
1083return fn(elem,0,args);
1084};
1085}
1086return fn;
1087}
1088},
1089pseudos:{
1090not:markFunction(function(selector){
1091var input=[],
1092results=[],
1093matcher=compile(selector.replace(rtrimCSS,"$1"));
1094return matcher[expando]?
1095markFunction(function(seed,matches,_context,xml){
1096var elem,
1097unmatched=matcher(seed,null,xml,[]),
1098i=seed.length;
1099while(i--){
1100if((elem=unmatched[i])){
1101seed[i]=!(matches[i]=elem);
1102}
1103}
1104}):
1105function(elem,_context,xml){
1106input[0]=elem;
1107matcher(input,null,xml,results);
1108input[0]=null;
1109return!results.pop();
1110};
1111}),
1112has:markFunction(function(selector){
1113return function(elem){
1114return find(selector,elem).length>0;
1115};
1116}),
1117contains:markFunction(function(text){
1118text=text.replace(runescape,funescape);
1119return function(elem){
1120return(elem.textContent||jQuery.text(elem)).indexOf(text)>-1;
1121};
1122}),
1123lang:markFunction(function(lang){
1124if(!ridentifier.test(lang||"")){
1125find.error("unsupported lang: "+lang);
1126}
1127lang=lang.replace(runescape,funescape).toLowerCase();
1128return function(elem){
1129var elemLang;
1130do{
1131if((elemLang=documentIsHTML?
1132elem.lang:
1133elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){
1134elemLang=elemLang.toLowerCase();
1135return elemLang===lang||elemLang.indexOf(lang+"-")===0;
1136}
1137}while((elem=elem.parentNode)&&elem.nodeType===1);
1138return false;
1139};
1140}),
1141target:function(elem){
1142var hash=window.location&&window.location.hash;
1143return hash&&hash.slice(1)===elem.id;
1144},
1145root:function(elem){
1146return elem===documentElement;
1147},
1148focus:function(elem){
1149return elem===safeActiveElement()&&
1150document.hasFocus()&&
1151!!(elem.type||elem.href||~elem.tabIndex);
1152},
1153enabled:createDisabledPseudo(false),
1154disabled:createDisabledPseudo(true),
1155checked:function(elem){
1156return(nodeName(elem,"input")&&!!elem.checked)||
1157(nodeName(elem,"option")&&!!elem.selected);
1158},
1159selected:function(elem){
1160if(elem.parentNode){
1161elem.parentNode.selectedIndex;
1162}
1163return elem.selected===true;
1164},
1165empty:function(elem){
1166for(elem=elem.firstChild;elem;elem=elem.nextSibling){
1167if(elem.nodeType<6){
1168return false;
1169}
1170}
1171return true;
1172},
1173parent:function(elem){
1174return!Expr.pseudos.empty(elem);
1175},
1176header:function(elem){
1177return rheader.test(elem.nodeName);
1178},
1179input:function(elem){
1180return rinputs.test(elem.nodeName);
1181},
1182button:function(elem){
1183return nodeName(elem,"input")&&elem.type==="button"||
1184nodeName(elem,"button");
1185},
1186text:function(elem){
1187var attr;
1188return nodeName(elem,"input")&&elem.type==="text"&&
1189((attr=elem.getAttribute("type"))==null||
1190attr.toLowerCase()==="text");
1191},
1192first:createPositionalPseudo(function(){
1193return[0];
1194}),
1195last:createPositionalPseudo(function(_matchIndexes,length){
1196return[length-1];
1197}),
1198eq:createPositionalPseudo(function(_matchIndexes,length,argument){
1199return[argument<0?argument+length:argument];
1200}),
1201even:createPositionalPseudo(function(matchIndexes,length){
1202var i=0;
1203for(;i<length;i+=2){
1204matchIndexes.push(i);
1205}
1206return matchIndexes;
1207}),
1208odd:createPositionalPseudo(function(matchIndexes,length){
1209var i=1;
1210for(;i<length;i+=2){
1211matchIndexes.push(i);
1212}
1213return matchIndexes;
1214}),
1215lt:createPositionalPseudo(function(matchIndexes,length,argument){
1216var i;
1217if(argument<0){
1218i=argument+length;
1219}else if(argument>length){
1220i=length;
1221}else{
1222i=argument;
1223}
1224for(;--i>=0;){
1225matchIndexes.push(i);
1226}
1227return matchIndexes;
1228}),
1229gt:createPositionalPseudo(function(matchIndexes,length,argument){
1230var i=argument<0?argument+length:argument;
1231for(;++i<length;){
1232matchIndexes.push(i);
1233}
1234return matchIndexes;
1235})
1236}
1237};
1238Expr.pseudos.nth=Expr.pseudos.eq;
1239for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){
1240Expr.pseudos[i]=createInputPseudo(i);
1241}
1242for(i in{submit:true,reset:true}){
1243Expr.pseudos[i]=createButtonPseudo(i);
1244}
1245function setFilters(){}
1246setFilters.prototype=Expr.filters=Expr.pseudos;
1247Expr.setFilters=new setFilters();
1248function tokenize(selector,parseOnly){
1249var matched,match,tokens,type,
1250soFar,groups,preFilters,
1251cached=tokenCache[selector+" "];
1252if(cached){
1253return parseOnly?0:cached.slice(0);
1254}
1255soFar=selector;
1256groups=[];
1257preFilters=Expr.preFilter;
1258while(soFar){
1259if(!matched||(match=rcomma.exec(soFar))){
1260if(match){
1261soFar=soFar.slice(match[0].length)||soFar;
1262}
1263groups.push((tokens=[]));
1264}
1265matched=false;
1266if((match=rleadingCombinator.exec(soFar))){
1267matched=match.shift();
1268tokens.push({
1269value:matched,
1270type:match[0].replace(rtrimCSS," ")
1271});
1272soFar=soFar.slice(matched.length);
1273}
1274for(type in Expr.filter){
1275if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||
1276(match=preFilters[type](match)))){
1277matched=match.shift();
1278tokens.push({
1279value:matched,
1280type:type,
1281matches:match
1282});
1283soFar=soFar.slice(matched.length);
1284}
1285}
1286if(!matched){
1287break;
1288}
1289}
1290if(parseOnly){
1291return soFar.length;
1292}
1293return soFar?
1294find.error(selector):
1295tokenCache(selector,groups).slice(0);
1296}
1297function toSelector(tokens){
1298var i=0,
1299len=tokens.length,
1300selector="";
1301for(;i<len;i++){
1302selector+=tokens[i].value;
1303}
1304return selector;
1305}
1306function addCombinator(matcher,combinator,base){
1307var dir=combinator.dir,
1308skip=combinator.next,
1309key=skip||dir,
1310checkNonElements=base&&key==="parentNode",
1311doneName=done++;
1312return combinator.first?
1313function(elem,context,xml){
1314while((elem=elem[dir])){
1315if(elem.nodeType===1||checkNonElements){
1316return matcher(elem,context,xml);
1317}
1318}
1319return false;
1320}:
1321function(elem,context,xml){
1322var oldCache,outerCache,
1323newCache=[dirruns,doneName];
1324if(xml){
1325while((elem=elem[dir])){
1326if(elem.nodeType===1||checkNonElements){
1327if(matcher(elem,context,xml)){
1328return true;
1329}
1330}
1331}
1332}else{
1333while((elem=elem[dir])){
1334if(elem.nodeType===1||checkNonElements){
1335outerCache=elem[expando]||(elem[expando]={});
1336if(skip&&nodeName(elem,skip)){
1337elem=elem[dir]||elem;
1338}else if((oldCache=outerCache[key])&&
1339oldCache[0]===dirruns&&oldCache[1]===doneName){
1340return(newCache[2]=oldCache[2]);
1341}else{
1342outerCache[key]=newCache;
1343if((newCache[2]=matcher(elem,context,xml))){
1344return true;
1345}
1346}
1347}
1348}
1349}
1350return false;
1351};
1352}
1353function elementMatcher(matchers){
1354return matchers.length>1?
1355function(elem,context,xml){
1356var i=matchers.length;
1357while(i--){
1358if(!matchers[i](elem,context,xml)){
1359return false;
1360}
1361}
1362return true;
1363}:
1364matchers[0];
1365}
1366function multipleContexts(selector,contexts,results){
1367var i=0,
1368len=contexts.length;
1369for(;i<len;i++){
1370find(selector,contexts[i],results);
1371}
1372return results;
1373}
1374function condense(unmatched,map,filter,context,xml){
1375var elem,
1376newUnmatched=[],
1377i=0,
1378len=unmatched.length,
1379mapped=map!=null;
1380for(;i<len;i++){
1381if((elem=unmatched[i])){
1382if(!filter||filter(elem,context,xml)){
1383newUnmatched.push(elem);
1384if(mapped){
1385map.push(i);
1386}
1387}
1388}
1389}
1390return newUnmatched;
1391}
1392function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){
1393if(postFilter&&!postFilter[expando]){
1394postFilter=setMatcher(postFilter);
1395}
1396if(postFinder&&!postFinder[expando]){
1397postFinder=setMatcher(postFinder,postSelector);
1398}
1399return markFunction(function(seed,results,context,xml){
1400var temp,i,elem,matcherOut,
1401preMap=[],
1402postMap=[],
1403preexisting=results.length,
1404elems=seed||
1405multipleContexts(selector||"*",
1406context.nodeType?[context]:context,[]),
1407matcherIn=preFilter&&(seed||!selector)?
1408condense(elems,preMap,preFilter,context,xml):
1409elems;
1410if(matcher){
1411matcherOut=postFinder||(seed?preFilter:preexisting||postFilter)?
1412[]:
1413results;
1414matcher(matcherIn,matcherOut,context,xml);
1415}else{
1416matcherOut=matcherIn;
1417}
1418if(postFilter){
1419temp=condense(matcherOut,postMap);
1420postFilter(temp,[],context,xml);
1421i=temp.length;
1422while(i--){
1423if((elem=temp[i])){
1424matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);
1425}
1426}
1427}
1428if(seed){
1429if(postFinder||preFilter){
1430if(postFinder){
1431temp=[];
1432i=matcherOut.length;
1433while(i--){
1434if((elem=matcherOut[i])){
1435temp.push((matcherIn[i]=elem));
1436}
1437}
1438postFinder(null,(matcherOut=[]),temp,xml);
1439}
1440i=matcherOut.length;
1441while(i--){
1442if((elem=matcherOut[i])&&
1443(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1){
1444seed[temp]=!(results[temp]=elem);
1445}
1446}
1447}
1448}else{
1449matcherOut=condense(
1450matcherOut===results?
1451matcherOut.splice(preexisting,matcherOut.length):
1452matcherOut
1453);
1454if(postFinder){
1455postFinder(null,results,matcherOut,xml);
1456}else{
1457push.apply(results,matcherOut);
1458}
1459}
1460});
1461}
1462function matcherFromTokens(tokens){
1463var checkContext,matcher,j,
1464len=tokens.length,
1465leadingRelative=Expr.relative[tokens[0].type],
1466implicitRelative=leadingRelative||Expr.relative[" "],
1467i=leadingRelative?1:0,
1468matchContext=addCombinator(function(elem){
1469return elem===checkContext;
1470},implicitRelative,true),
1471matchAnyContext=addCombinator(function(elem){
1472return indexOf.call(checkContext,elem)>-1;
1473},implicitRelative,true),
1474matchers=[function(elem,context,xml){
1475var ret=(!leadingRelative&&(xml||context!=outermostContext))||(
1476(checkContext=context).nodeType?
1477matchContext(elem,context,xml):
1478matchAnyContext(elem,context,xml));
1479checkContext=null;
1480return ret;
1481}];
1482for(;i<len;i++){
1483if((matcher=Expr.relative[tokens[i].type])){
1484matchers=[addCombinator(elementMatcher(matchers),matcher)];
1485}else{
1486matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);
1487if(matcher[expando]){
1488j=++i;
1489for(;j<len;j++){
1490if(Expr.relative[tokens[j].type]){
1491break;
1492}
1493}
1494return setMatcher(
1495i>1&&elementMatcher(matchers),
1496i>1&&toSelector(
1497tokens.slice(0,i-1)
1498.concat({value:tokens[i-2].type===" "?"*":""})
1499).replace(rtrimCSS,"$1"),
1500matcher,
1501i<j&&matcherFromTokens(tokens.slice(i,j)),
1502j<len&&matcherFromTokens((tokens=tokens.slice(j))),
1503j<len&&toSelector(tokens)
1504);
1505}
1506matchers.push(matcher);
1507}
1508}
1509return elementMatcher(matchers);
1510}
1511function matcherFromGroupMatchers(elementMatchers,setMatchers){
1512var bySet=setMatchers.length>0,
1513byElement=elementMatchers.length>0,
1514superMatcher=function(seed,context,xml,results,outermost){
1515var elem,j,matcher,
1516matchedCount=0,
1517i="0",
1518unmatched=seed&&[],
1519setMatched=[],
1520contextBackup=outermostContext,
1521elems=seed||byElement&&Expr.find.TAG("*",outermost),
1522dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),
1523len=elems.length;
1524if(outermost){
1525outermostContext=context==document||context||outermost;
1526}
1527for(;i!==len&&(elem=elems[i])!=null;i++){
1528if(byElement&&elem){
1529j=0;
1530if(!context&&elem.ownerDocument!=document){
1531setDocument(elem);
1532xml=!documentIsHTML;
1533}
1534while((matcher=elementMatchers[j++])){
1535if(matcher(elem,context||document,xml)){
1536push.call(results,elem);
1537break;
1538}
1539}
1540if(outermost){
1541dirruns=dirrunsUnique;
1542}
1543}
1544if(bySet){
1545if((elem=!matcher&&elem)){
1546matchedCount--;
1547}
1548if(seed){
1549unmatched.push(elem);
1550}
1551}
1552}
1553matchedCount+=i;
1554if(bySet&&i!==matchedCount){
1555j=0;
1556while((matcher=setMatchers[j++])){
1557matcher(unmatched,setMatched,context,xml);
1558}
1559if(seed){
1560if(matchedCount>0){
1561while(i--){
1562if(!(unmatched[i]||setMatched[i])){
1563setMatched[i]=pop.call(results);
1564}
1565}
1566}
1567setMatched=condense(setMatched);
1568}
1569push.apply(results,setMatched);
1570if(outermost&&!seed&&setMatched.length>0&&
1571(matchedCount+setMatchers.length)>1){
1572jQuery.uniqueSort(results);
1573}
1574}
1575if(outermost){
1576dirruns=dirrunsUnique;
1577outermostContext=contextBackup;
1578}
1579return unmatched;
1580};
1581return bySet?
1582markFunction(superMatcher):
1583superMatcher;
1584}
1585function compile(selector,match){
1586var i,
1587setMatchers=[],
1588elementMatchers=[],
1589cached=compilerCache[selector+" "];
1590if(!cached){
1591if(!match){
1592match=tokenize(selector);
1593}
1594i=match.length;
1595while(i--){
1596cached=matcherFromTokens(match[i]);
1597if(cached[expando]){
1598setMatchers.push(cached);
1599}else{
1600elementMatchers.push(cached);
1601}
1602}
1603cached=compilerCache(selector,
1604matcherFromGroupMatchers(elementMatchers,setMatchers));
1605cached.selector=selector;
1606}
1607return cached;
1608}
1609function select(selector,context,results,seed){
1610var i,tokens,token,type,find,
1611compiled=typeof selector==="function"&&selector,
1612match=!seed&&tokenize((selector=compiled.selector||selector));
1613results=results||[];
1614if(match.length===1){
1615tokens=match[0]=match[0].slice(0);
1616if(tokens.length>2&&(token=tokens[0]).type==="ID"&&
1617context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){
1618context=(Expr.find.ID(
1619token.matches[0].replace(runescape,funescape),
1620context
1621)||[])[0];
1622if(!context){
1623return results;
1624}else if(compiled){
1625context=context.parentNode;
1626}
1627selector=selector.slice(tokens.shift().value.length);
1628}
1629i=matchExpr.needsContext.test(selector)?0:tokens.length;
1630while(i--){
1631token=tokens[i];
1632if(Expr.relative[(type=token.type)]){
1633break;
1634}
1635if((find=Expr.find[type])){
1636if((seed=find(
1637token.matches[0].replace(runescape,funescape),
1638rsibling.test(tokens[0].type)&&
1639testContext(context.parentNode)||context
1640))){
1641tokens.splice(i,1);
1642selector=seed.length&&toSelector(tokens);
1643if(!selector){
1644push.apply(results,seed);
1645return results;
1646}
1647break;
1648}
1649}
1650}
1651}
1652(compiled||compile(selector,match))(
1653seed,
1654context,
1655!documentIsHTML,
1656results,
1657!context||rsibling.test(selector)&&testContext(context.parentNode)||context
1658);
1659return results;
1660}
1661support.sortStable=expando.split("").sort(sortOrder).join("")===expando;
1662setDocument();
1663support.sortDetached=assert(function(el){
1664return el.compareDocumentPosition(document.createElement("fieldset"))&1;
1665});
1666jQuery.find=find;
1667jQuery.expr[":"]=jQuery.expr.pseudos;
1668jQuery.unique=jQuery.uniqueSort;
1669find.compile=compile;
1670find.select=select;
1671find.setDocument=setDocument;
1672find.tokenize=tokenize;
1673find.escape=jQuery.escapeSelector;
1674find.getText=jQuery.text;
1675find.isXML=jQuery.isXMLDoc;
1676find.selectors=jQuery.expr;
1677find.support=jQuery.support;
1678find.uniqueSort=jQuery.uniqueSort;
1679})();
1680var dir=function(elem,dir,until){
1681var matched=[],
1682truncate=until!==undefined;
1683while((elem=elem[dir])&&elem.nodeType!==9){
1684if(elem.nodeType===1){
1685if(truncate&&jQuery(elem).is(until)){
1686break;
1687}
1688matched.push(elem);
1689}
1690}
1691return matched;
1692};
1693var siblings=function(n,elem){
1694var matched=[];
1695for(;n;n=n.nextSibling){
1696if(n.nodeType===1&&n!==elem){
1697matched.push(n);
1698}
1699}
1700return matched;
1701};
1702var rneedsContext=jQuery.expr.match.needsContext;
1703var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);
1704function winnow(elements,qualifier,not){
1705if(isFunction(qualifier)){
1706return jQuery.grep(elements,function(elem,i){
1707return!!qualifier.call(elem,i,elem)!==not;
1708});
1709}
1710if(qualifier.nodeType){
1711return jQuery.grep(elements,function(elem){
1712return(elem===qualifier)!==not;
1713});
1714}
1715if(typeof qualifier!=="string"){
1716return jQuery.grep(elements,function(elem){
1717return(indexOf.call(qualifier,elem)>-1)!==not;
1718});
1719}
1720return jQuery.filter(qualifier,elements,not);
1721}
1722jQuery.filter=function(expr,elems,not){
1723var elem=elems[0];
1724if(not){
1725expr=":not("+expr+")";
1726}
1727if(elems.length===1&&elem.nodeType===1){
1728return jQuery.find.matchesSelector(elem,expr)?[elem]:[];
1729}
1730return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){
1731return elem.nodeType===1;
1732}));
1733};
1734jQuery.fn.extend({
1735find:function(selector){
1736var i,ret,
1737len=this.length,
1738self=this;
1739if(typeof selector!=="string"){
1740return this.pushStack(jQuery(selector).filter(function(){
1741for(i=0;i<len;i++){
1742if(jQuery.contains(self[i],this)){
1743return true;
1744}
1745}
1746}));
1747}
1748ret=this.pushStack([]);
1749for(i=0;i<len;i++){
1750jQuery.find(selector,self[i],ret);
1751}
1752return len>1?jQuery.uniqueSort(ret):ret;
1753},
1754filter:function(selector){
1755return this.pushStack(winnow(this,selector||[],false));
1756},
1757not:function(selector){
1758return this.pushStack(winnow(this,selector||[],true));
1759},
1760is:function(selector){
1761return!!winnow(
1762this,
1763typeof selector==="string"&&rneedsContext.test(selector)?
1764jQuery(selector):
1765selector||[],
1766false
1767).length;
1768}
1769});
1770var rootjQuery,
1771rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
1772init=jQuery.fn.init=function(selector,context,root){
1773var match,elem;
1774if(!selector){
1775return this;
1776}
1777root=root||rootjQuery;
1778if(typeof selector==="string"){
1779if(selector[0]==="<"&&
1780selector[selector.length-1]===">"&&
1781selector.length>=3){
1782match=[null,selector,null];
1783}else{
1784match=rquickExpr.exec(selector);
1785}
1786if(match&&(match[1]||!context)){
1787if(match[1]){
1788context=context instanceof jQuery?context[0]:context;
1789jQuery.merge(this,jQuery.parseHTML(
1790match[1],
1791context&&context.nodeType?context.ownerDocument||context:document,
1792true
1793));
1794if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){
1795for(match in context){
1796if(isFunction(this[match])){
1797this[match](context[match]);
1798}else{
1799this.attr(match,context[match]);
1800}
1801}
1802}
1803return this;
1804}else{
1805elem=document.getElementById(match[2]);
1806if(elem){
1807this[0]=elem;
1808this.length=1;
1809}
1810return this;
1811}
1812}else if(!context||context.jquery){
1813return(context||root).find(selector);
1814}else{
1815return this.constructor(context).find(selector);
1816}
1817}else if(selector.nodeType){
1818this[0]=selector;
1819this.length=1;
1820return this;
1821}else if(isFunction(selector)){
1822return root.ready!==undefined?
1823root.ready(selector):
1824selector(jQuery);
1825}
1826return jQuery.makeArray(selector,this);
1827};
1828init.prototype=jQuery.fn;
1829rootjQuery=jQuery(document);
1830var rparentsprev=/^(?:parents|prev(?:Until|All))/,
1831guaranteedUnique={
1832children:true,
1833contents:true,
1834next:true,
1835prev:true
1836};
1837jQuery.fn.extend({
1838has:function(target){
1839var targets=jQuery(target,this),
1840l=targets.length;
1841return this.filter(function(){
1842var i=0;
1843for(;i<l;i++){
1844if(jQuery.contains(this,targets[i])){
1845return true;
1846}
1847}
1848});
1849},
1850closest:function(selectors,context){
1851var cur,
1852i=0,
1853l=this.length,
1854matched=[],
1855targets=typeof selectors!=="string"&&jQuery(selectors);
1856if(!rneedsContext.test(selectors)){
1857for(;i<l;i++){
1858for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){
1859if(cur.nodeType<11&&(targets?
1860targets.index(cur)>-1:
1861cur.nodeType===1&&
1862jQuery.find.matchesSelector(cur,selectors))){
1863matched.push(cur);
1864break;
1865}
1866}
1867}
1868}
1869return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);
1870},
1871index:function(elem){
1872if(!elem){
1873return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;
1874}
1875if(typeof elem==="string"){
1876return indexOf.call(jQuery(elem),this[0]);
1877}
1878return indexOf.call(this,
1879elem.jquery?elem[0]:elem
1880);
1881},
1882add:function(selector,context){
1883return this.pushStack(
1884jQuery.uniqueSort(
1885jQuery.merge(this.get(),jQuery(selector,context))
1886)
1887);
1888},
1889addBack:function(selector){
1890return this.add(selector==null?
1891this.prevObject:this.prevObject.filter(selector)
1892);
1893}
1894});
1895function sibling(cur,dir){
1896while((cur=cur[dir])&&cur.nodeType!==1){}
1897return cur;
1898}
1899jQuery.each({
1900parent:function(elem){
1901var parent=elem.parentNode;
1902return parent&&parent.nodeType!==11?parent:null;
1903},
1904parents:function(elem){
1905return dir(elem,"parentNode");
1906},
1907parentsUntil:function(elem,_i,until){
1908return dir(elem,"parentNode",until);
1909},
1910next:function(elem){
1911return sibling(elem,"nextSibling");
1912},
1913prev:function(elem){
1914return sibling(elem,"previousSibling");
1915},
1916nextAll:function(elem){
1917return dir(elem,"nextSibling");
1918},
1919prevAll:function(elem){
1920return dir(elem,"previousSibling");
1921},
1922nextUntil:function(elem,_i,until){
1923return dir(elem,"nextSibling",until);
1924},
1925prevUntil:function(elem,_i,until){
1926return dir(elem,"previousSibling",until);
1927},
1928siblings:function(elem){
1929return siblings((elem.parentNode||{}).firstChild,elem);
1930},
1931children:function(elem){
1932return siblings(elem.firstChild);
1933},
1934contents:function(elem){
1935if(elem.contentDocument!=null&&
1936getProto(elem.contentDocument)){
1937return elem.contentDocument;
1938}
1939if(nodeName(elem,"template")){
1940elem=elem.content||elem;
1941}
1942return jQuery.merge([],elem.childNodes);
1943}
1944},function(name,fn){
1945jQuery.fn[name]=function(until,selector){
1946var matched=jQuery.map(this,fn,until);
1947if(name.slice(-5)!=="Until"){
1948selector=until;
1949}
1950if(selector&&typeof selector==="string"){
1951matched=jQuery.filter(selector,matched);
1952}
1953if(this.length>1){
1954if(!guaranteedUnique[name]){
1955jQuery.uniqueSort(matched);
1956}
1957if(rparentsprev.test(name)){
1958matched.reverse();
1959}
1960}
1961return this.pushStack(matched);
1962};
1963});
1964var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g);
1965function createOptions(options){
1966var object={};
1967jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){
1968object[flag]=true;
1969});
1970return object;
1971}
1972jQuery.Callbacks=function(options){
1973options=typeof options==="string"?
1974createOptions(options):
1975jQuery.extend({},options);
1976var
1977firing,
1978memory,
1979fired,
1980locked,
1981list=[],
1982queue=[],
1983firingIndex=-1,
1984fire=function(){
1985locked=locked||options.once;
1986fired=firing=true;
1987for(;queue.length;firingIndex=-1){
1988memory=queue.shift();
1989while(++firingIndex<list.length){
1990if(list[firingIndex].apply(memory[0],memory[1])===false&&
1991options.stopOnFalse){
1992firingIndex=list.length;
1993memory=false;
1994}
1995}
1996}
1997if(!options.memory){
1998memory=false;
1999}
2000firing=false;
2001if(locked){
2002if(memory){
2003list=[];
2004}else{
2005list="";
2006}
2007}
2008},
2009self={
2010add:function(){
2011if(list){
2012if(memory&&!firing){
2013firingIndex=list.length-1;
2014queue.push(memory);
2015}
2016(function add(args){
2017jQuery.each(args,function(_,arg){
2018if(isFunction(arg)){
2019if(!options.unique||!self.has(arg)){
2020list.push(arg);
2021}
2022}else if(arg&&arg.length&&toType(arg)!=="string"){
2023add(arg);
2024}
2025});
2026})(arguments);
2027if(memory&&!firing){
2028fire();
2029}
2030}
2031return this;
2032},
2033remove:function(){
2034jQuery.each(arguments,function(_,arg){
2035var index;
2036while((index=jQuery.inArray(arg,list,index))>-1){
2037list.splice(index,1);
2038if(index<=firingIndex){
2039firingIndex--;
2040}
2041}
2042});
2043return this;
2044},
2045has:function(fn){
2046return fn?
2047jQuery.inArray(fn,list)>-1:
2048list.length>0;
2049},
2050empty:function(){
2051if(list){
2052list=[];
2053}
2054return this;
2055},
2056disable:function(){
2057locked=queue=[];
2058list=memory="";
2059return this;
2060},
2061disabled:function(){
2062return!list;
2063},
2064lock:function(){
2065locked=queue=[];
2066if(!memory&&!firing){
2067list=memory="";
2068}
2069return this;
2070},
2071locked:function(){
2072return!!locked;
2073},
2074fireWith:function(context,args){
2075if(!locked){
2076args=args||[];
2077args=[context,args.slice?args.slice():args];
2078queue.push(args);
2079if(!firing){
2080fire();
2081}
2082}
2083return this;
2084},
2085fire:function(){
2086self.fireWith(this,arguments);
2087return this;
2088},
2089fired:function(){
2090return!!fired;
2091}
2092};
2093return self;
2094};
2095function Identity(v){
2096return v;
2097}
2098function Thrower(ex){
2099throw ex;
2100}
2101function adoptValue(value,resolve,reject,noValue){
2102var method;
2103try{
2104if(value&&isFunction((method=value.promise))){
2105method.call(value).done(resolve).fail(reject);
2106}else if(value&&isFunction((method=value.then))){
2107method.call(value,resolve,reject);
2108}else{
2109resolve.apply(undefined,[value].slice(noValue));
2110}
2111}catch(value){
2112reject.apply(undefined,[value]);
2113}
2114}
2115jQuery.extend({
2116Deferred:function(func){
2117var tuples=[
2118["notify","progress",jQuery.Callbacks("memory"),
2119jQuery.Callbacks("memory"),2],
2120["resolve","done",jQuery.Callbacks("once memory"),
2121jQuery.Callbacks("once memory"),0,"resolved"],
2122["reject","fail",jQuery.Callbacks("once memory"),
2123jQuery.Callbacks("once memory"),1,"rejected"]
2124],
2125state="pending",
2126promise={
2127state:function(){
2128return state;
2129},
2130always:function(){
2131deferred.done(arguments).fail(arguments);
2132return this;
2133},
2134"catch":function(fn){
2135return promise.then(null,fn);
2136},
2137pipe:function(){
2138var fns=arguments;
2139return jQuery.Deferred(function(newDefer){
2140jQuery.each(tuples,function(_i,tuple){
2141var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];
2142deferred[tuple[1]](function(){
2143var returned=fn&&fn.apply(this,arguments);
2144if(returned&&isFunction(returned.promise)){
2145returned.promise()
2146.progress(newDefer.notify)
2147.done(newDefer.resolve)
2148.fail(newDefer.reject);
2149}else{
2150newDefer[tuple[0]+"With"](
2151this,
2152fn?[returned]:arguments
2153);
2154}
2155});
2156});
2157fns=null;
2158}).promise();
2159},
2160then:function(onFulfilled,onRejected,onProgress){
2161var maxDepth=0;
2162function resolve(depth,deferred,handler,special){
2163return function(){
2164var that=this,
2165args=arguments,
2166mightThrow=function(){
2167var returned,then;
2168if(depth<maxDepth){
2169return;
2170}
2171returned=handler.apply(that,args);
2172if(returned===deferred.promise()){
2173throw new TypeError("Thenable self-resolution");
2174}
2175then=returned&&
2176(typeof returned==="object"||
2177typeof returned==="function")&&
2178returned.then;
2179if(isFunction(then)){
2180if(special){
2181then.call(
2182returned,
2183resolve(maxDepth,deferred,Identity,special),
2184resolve(maxDepth,deferred,Thrower,special)
2185);
2186}else{
2187maxDepth++;
2188then.call(
2189returned,
2190resolve(maxDepth,deferred,Identity,special),
2191resolve(maxDepth,deferred,Thrower,special),
2192resolve(maxDepth,deferred,Identity,
2193deferred.notifyWith)
2194);
2195}
2196}else{
2197if(handler!==Identity){
2198that=undefined;
2199args=[returned];
2200}
2201(special||deferred.resolveWith)(that,args);
2202}
2203},
2204process=special?
2205mightThrow:
2206function(){
2207try{
2208mightThrow();
2209}catch(e){
2210if(jQuery.Deferred.exceptionHook){
2211jQuery.Deferred.exceptionHook(e,
2212process.error);
2213}
2214if(depth+1>=maxDepth){
2215if(handler!==Thrower){
2216that=undefined;
2217args=[e];
2218}
2219deferred.rejectWith(that,args);
2220}
2221}
2222};
2223if(depth){
2224process();
2225}else{
2226if(jQuery.Deferred.getErrorHook){
2227process.error=jQuery.Deferred.getErrorHook();
2228}else if(jQuery.Deferred.getStackHook){
2229process.error=jQuery.Deferred.getStackHook();
2230}
2231window.setTimeout(process);
2232}
2233};
2234}
2235return jQuery.Deferred(function(newDefer){
2236tuples[0][3].add(
2237resolve(
22380,
2239newDefer,
2240isFunction(onProgress)?
2241onProgress:
2242Identity,
2243newDefer.notifyWith
2244)
2245);
2246tuples[1][3].add(
2247resolve(
22480,
2249newDefer,
2250isFunction(onFulfilled)?
2251onFulfilled:
2252Identity
2253)
2254);
2255tuples[2][3].add(
2256resolve(
22570,
2258newDefer,
2259isFunction(onRejected)?
2260onRejected:
2261Thrower
2262)
2263);
2264}).promise();
2265},
2266promise:function(obj){
2267return obj!=null?jQuery.extend(obj,promise):promise;
2268}
2269},
2270deferred={};
2271jQuery.each(tuples,function(i,tuple){
2272var list=tuple[2],
2273stateString=tuple[5];
2274promise[tuple[1]]=list.add;
2275if(stateString){
2276list.add(
2277function(){
2278state=stateString;
2279},
2280tuples[3-i][2].disable,
2281tuples[3-i][3].disable,
2282tuples[0][2].lock,
2283tuples[0][3].lock
2284);
2285}
2286list.add(tuple[3].fire);
2287deferred[tuple[0]]=function(){
2288deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);
2289return this;
2290};
2291deferred[tuple[0]+"With"]=list.fireWith;
2292});
2293promise.promise(deferred);
2294if(func){
2295func.call(deferred,deferred);
2296}
2297return deferred;
2298},
2299when:function(singleValue){
2300var
2301remaining=arguments.length,
2302i=remaining,
2303resolveContexts=Array(i),
2304resolveValues=slice.call(arguments),
2305primary=jQuery.Deferred(),
2306updateFunc=function(i){
2307return function(value){
2308resolveContexts[i]=this;
2309resolveValues[i]=arguments.length>1?slice.call(arguments):value;
2310if(!(--remaining)){
2311primary.resolveWith(resolveContexts,resolveValues);
2312}
2313};
2314};
2315if(remaining<=1){
2316adoptValue(singleValue,primary.done(updateFunc(i)).resolve,primary.reject,
2317!remaining);
2318if(primary.state()==="pending"||
2319isFunction(resolveValues[i]&&resolveValues[i].then)){
2320return primary.then();
2321}
2322}
2323while(i--){
2324adoptValue(resolveValues[i],updateFunc(i),primary.reject);
2325}
2326return primary.promise();
2327}
2328});
2329var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
2330jQuery.Deferred.exceptionHook=function(error,asyncError){
2331if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){
2332window.console.warn("jQuery.Deferred exception: "+error.message,
2333error.stack,asyncError);
2334}
2335};
2336jQuery.readyException=function(error){
2337window.setTimeout(function(){
2338throw error;
2339});
2340};
2341var readyList=jQuery.Deferred();
2342jQuery.fn.ready=function(fn){
2343readyList
2344.then(fn)
2345.catch(function(error){
2346jQuery.readyException(error);
2347});
2348return this;
2349};
2350jQuery.extend({
2351isReady:false,
2352readyWait:1,
2353ready:function(wait){
2354if(wait===true?--jQuery.readyWait:jQuery.isReady){
2355return;
2356}
2357jQuery.isReady=true;
2358if(wait!==true&&--jQuery.readyWait>0){
2359return;
2360}
2361readyList.resolveWith(document,[jQuery]);
2362}
2363});
2364jQuery.ready.then=readyList.then;
2365function completed(){
2366document.removeEventListener("DOMContentLoaded",completed);
2367window.removeEventListener("load",completed);
2368jQuery.ready();
2369}
2370if(document.readyState==="complete"||
2371(document.readyState!=="loading"&&!document.documentElement.doScroll)){
2372window.setTimeout(jQuery.ready);
2373}else{
2374document.addEventListener("DOMContentLoaded",completed);
2375window.addEventListener("load",completed);
2376}
2377var access=function(elems,fn,key,value,chainable,emptyGet,raw){
2378var i=0,
2379len=elems.length,
2380bulk=key==null;
2381if(toType(key)==="object"){
2382chainable=true;
2383for(i in key){
2384access(elems,fn,i,key[i],true,emptyGet,raw);
2385}
2386}else if(value!==undefined){
2387chainable=true;
2388if(!isFunction(value)){
2389raw=true;
2390}
2391if(bulk){
2392if(raw){
2393fn.call(elems,value);
2394fn=null;
2395}else{
2396bulk=fn;
2397fn=function(elem,_key,value){
2398return bulk.call(jQuery(elem),value);
2399};
2400}
2401}
2402if(fn){
2403for(;i<len;i++){
2404fn(
2405elems[i],key,raw?
2406value:
2407value.call(elems[i],i,fn(elems[i],key))
2408);
2409}
2410}
2411}
2412if(chainable){
2413return elems;
2414}
2415if(bulk){
2416return fn.call(elems);
2417}
2418return len?fn(elems[0],key):emptyGet;
2419};
2420var rmsPrefix=/^-ms-/,
2421rdashAlpha=/-([a-z])/g;
2422function fcamelCase(_all,letter){
2423return letter.toUpperCase();
2424}
2425function camelCase(string){
2426return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);
2427}
2428var acceptData=function(owner){
2429return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType);
2430};
2431function Data(){
2432this.expando=jQuery.expando+Data.uid++;
2433}
2434Data.uid=1;
2435Data.prototype={
2436cache:function(owner){
2437var value=owner[this.expando];
2438if(!value){
2439value={};
2440if(acceptData(owner)){
2441if(owner.nodeType){
2442owner[this.expando]=value;
2443}else{
2444Object.defineProperty(owner,this.expando,{
2445value:value,
2446configurable:true
2447});
2448}
2449}
2450}
2451return value;
2452},
2453set:function(owner,data,value){
2454var prop,
2455cache=this.cache(owner);
2456if(typeof data==="string"){
2457cache[camelCase(data)]=value;
2458}else{
2459for(prop in data){
2460cache[camelCase(prop)]=data[prop];
2461}
2462}
2463return cache;
2464},
2465get:function(owner,key){
2466return key===undefined?
2467this.cache(owner):
2468owner[this.expando]&&owner[this.expando][camelCase(key)];
2469},
2470access:function(owner,key,value){
2471if(key===undefined||
2472((key&&typeof key==="string")&&value===undefined)){
2473return this.get(owner,key);
2474}
2475this.set(owner,key,value);
2476return value!==undefined?value:key;
2477},
2478remove:function(owner,key){
2479var i,
2480cache=owner[this.expando];
2481if(cache===undefined){
2482return;
2483}
2484if(key!==undefined){
2485if(Array.isArray(key)){
2486key=key.map(camelCase);
2487}else{
2488key=camelCase(key);
2489key=key in cache?
2490[key]:
2491(key.match(rnothtmlwhite)||[]);
2492}
2493i=key.length;
2494while(i--){
2495delete cache[key[i]];
2496}
2497}
2498if(key===undefined||jQuery.isEmptyObject(cache)){
2499if(owner.nodeType){
2500owner[this.expando]=undefined;
2501}else{
2502delete owner[this.expando];
2503}
2504}
2505},
2506hasData:function(owner){
2507var cache=owner[this.expando];
2508return cache!==undefined&&!jQuery.isEmptyObject(cache);
2509}
2510};
2511var dataPriv=new Data();
2512var dataUser=new Data();
2513var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
2514rmultiDash=/[A-Z]/g;
2515function getData(data){
2516if(data==="true"){
2517return true;
2518}
2519if(data==="false"){
2520return false;
2521}
2522if(data==="null"){
2523return null;
2524}
2525if(data===+data+""){
2526return+data;
2527}
2528if(rbrace.test(data)){
2529return JSON.parse(data);
2530}
2531return data;
2532}
2533function dataAttr(elem,key,data){
2534var name;
2535if(data===undefined&&elem.nodeType===1){
2536name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();
2537data=elem.getAttribute(name);
2538if(typeof data==="string"){
2539try{
2540data=getData(data);
2541}catch(e){}
2542dataUser.set(elem,key,data);
2543}else{
2544data=undefined;
2545}
2546}
2547return data;
2548}
2549jQuery.extend({
2550hasData:function(elem){
2551return dataUser.hasData(elem)||dataPriv.hasData(elem);
2552},
2553data:function(elem,name,data){
2554return dataUser.access(elem,name,data);
2555},
2556removeData:function(elem,name){
2557dataUser.remove(elem,name);
2558},
2559_data:function(elem,name,data){
2560return dataPriv.access(elem,name,data);
2561},
2562_removeData:function(elem,name){
2563dataPriv.remove(elem,name);
2564}
2565});
2566jQuery.fn.extend({
2567data:function(key,value){
2568var i,name,data,
2569elem=this[0],
2570attrs=elem&&elem.attributes;
2571if(key===undefined){
2572if(this.length){
2573data=dataUser.get(elem);
2574if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){
2575i=attrs.length;
2576while(i--){
2577if(attrs[i]){
2578name=attrs[i].name;
2579if(name.indexOf("data-")===0){
2580name=camelCase(name.slice(5));
2581dataAttr(elem,name,data[name]);
2582}
2583}
2584}
2585dataPriv.set(elem,"hasDataAttrs",true);
2586}
2587}
2588return data;
2589}
2590if(typeof key==="object"){
2591return this.each(function(){
2592dataUser.set(this,key);
2593});
2594}
2595return access(this,function(value){
2596var data;
2597if(elem&&value===undefined){
2598data=dataUser.get(elem,key);
2599if(data!==undefined){
2600return data;
2601}
2602data=dataAttr(elem,key);
2603if(data!==undefined){
2604return data;
2605}
2606return;
2607}
2608this.each(function(){
2609dataUser.set(this,key,value);
2610});
2611},null,value,arguments.length>1,null,true);
2612},
2613removeData:function(key){
2614return this.each(function(){
2615dataUser.remove(this,key);
2616});
2617}
2618});
2619jQuery.extend({
2620queue:function(elem,type,data){
2621var queue;
2622if(elem){
2623type=(type||"fx")+"queue";
2624queue=dataPriv.get(elem,type);
2625if(data){
2626if(!queue||Array.isArray(data)){
2627queue=dataPriv.access(elem,type,jQuery.makeArray(data));
2628}else{
2629queue.push(data);
2630}
2631}
2632return queue||[];
2633}
2634},
2635dequeue:function(elem,type){
2636type=type||"fx";
2637var queue=jQuery.queue(elem,type),
2638startLength=queue.length,
2639fn=queue.shift(),
2640hooks=jQuery._queueHooks(elem,type),
2641next=function(){
2642jQuery.dequeue(elem,type);
2643};
2644if(fn==="inprogress"){
2645fn=queue.shift();
2646startLength--;
2647}
2648if(fn){
2649if(type==="fx"){
2650queue.unshift("inprogress");
2651}
2652delete hooks.stop;
2653fn.call(elem,next,hooks);
2654}
2655if(!startLength&&hooks){
2656hooks.empty.fire();
2657}
2658},
2659_queueHooks:function(elem,type){
2660var key=type+"queueHooks";
2661return dataPriv.get(elem,key)||dataPriv.access(elem,key,{
2662empty:jQuery.Callbacks("once memory").add(function(){
2663dataPriv.remove(elem,[type+"queue",key]);
2664})
2665});
2666}
2667});
2668jQuery.fn.extend({
2669queue:function(type,data){
2670var setter=2;
2671if(typeof type!=="string"){
2672data=type;
2673type="fx";
2674setter--;
2675}
2676if(arguments.length<setter){
2677return jQuery.queue(this[0],type);
2678}
2679return data===undefined?
2680this:
2681this.each(function(){
2682var queue=jQuery.queue(this,type,data);
2683jQuery._queueHooks(this,type);
2684if(type==="fx"&&queue[0]!=="inprogress"){
2685jQuery.dequeue(this,type);
2686}
2687});
2688},
2689dequeue:function(type){
2690return this.each(function(){
2691jQuery.dequeue(this,type);
2692});
2693},
2694clearQueue:function(type){
2695return this.queue(type||"fx",[]);
2696},
2697promise:function(type,obj){
2698var tmp,
2699count=1,
2700defer=jQuery.Deferred(),
2701elements=this,
2702i=this.length,
2703resolve=function(){
2704if(!(--count)){
2705defer.resolveWith(elements,[elements]);
2706}
2707};
2708if(typeof type!=="string"){
2709obj=type;
2710type=undefined;
2711}
2712type=type||"fx";
2713while(i--){
2714tmp=dataPriv.get(elements[i],type+"queueHooks");
2715if(tmp&&tmp.empty){
2716count++;
2717tmp.empty.add(resolve);
2718}
2719}
2720resolve();
2721return defer.promise(obj);
2722}
2723});
2724var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
2725var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");
2726var cssExpand=["Top","Right","Bottom","Left"];
2727var documentElement=document.documentElement;
2728var isAttached=function(elem){
2729return jQuery.contains(elem.ownerDocument,elem);
2730},
2731composed={composed:true};
2732if(documentElement.getRootNode){
2733isAttached=function(elem){
2734return jQuery.contains(elem.ownerDocument,elem)||
2735elem.getRootNode(composed)===elem.ownerDocument;
2736};
2737}
2738var isHiddenWithinTree=function(elem,el){
2739elem=el||elem;
2740return elem.style.display==="none"||
2741elem.style.display===""&&
2742isAttached(elem)&&
2743jQuery.css(elem,"display")==="none";
2744};
2745function adjustCSS(elem,prop,valueParts,tween){
2746var adjusted,scale,
2747maxIterations=20,
2748currentValue=tween?
2749function(){
2750return tween.cur();
2751}:
2752function(){
2753return jQuery.css(elem,prop,"");
2754},
2755initial=currentValue(),
2756unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),
2757initialInUnit=elem.nodeType&&
2758(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&
2759rcssNum.exec(jQuery.css(elem,prop));
2760if(initialInUnit&&initialInUnit[3]!==unit){
2761initial=initial/2;
2762unit=unit||initialInUnit[3];
2763initialInUnit=+initial||1;
2764while(maxIterations--){
2765jQuery.style(elem,prop,initialInUnit+unit);
2766if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){
2767maxIterations=0;
2768}
2769initialInUnit=initialInUnit/scale;
2770}
2771initialInUnit=initialInUnit*2;
2772jQuery.style(elem,prop,initialInUnit+unit);
2773valueParts=valueParts||[];
2774}
2775if(valueParts){
2776initialInUnit=+initialInUnit||+initial||0;
2777adjusted=valueParts[1]?
2778initialInUnit+(valueParts[1]+1)*valueParts[2]:
2779+valueParts[2];
2780if(tween){
2781tween.unit=unit;
2782tween.start=initialInUnit;
2783tween.end=adjusted;
2784}
2785}
2786return adjusted;
2787}
2788var defaultDisplayMap={};
2789function getDefaultDisplay(elem){
2790var temp,
2791doc=elem.ownerDocument,
2792nodeName=elem.nodeName,
2793display=defaultDisplayMap[nodeName];
2794if(display){
2795return display;
2796}
2797temp=doc.body.appendChild(doc.createElement(nodeName));
2798display=jQuery.css(temp,"display");
2799temp.parentNode.removeChild(temp);
2800if(display==="none"){
2801display="block";
2802}
2803defaultDisplayMap[nodeName]=display;
2804return display;
2805}
2806function showHide(elements,show){
2807var display,elem,
2808values=[],
2809index=0,
2810length=elements.length;
2811for(;index<length;index++){
2812elem=elements[index];
2813if(!elem.style){
2814continue;
2815}
2816display=elem.style.display;
2817if(show){
2818if(display==="none"){
2819values[index]=dataPriv.get(elem,"display")||null;
2820if(!values[index]){
2821elem.style.display="";
2822}
2823}
2824if(elem.style.display===""&&isHiddenWithinTree(elem)){
2825values[index]=getDefaultDisplay(elem);
2826}
2827}else{
2828if(display!=="none"){
2829values[index]="none";
2830dataPriv.set(elem,"display",display);
2831}
2832}
2833}
2834for(index=0;index<length;index++){
2835if(values[index]!=null){
2836elements[index].style.display=values[index];
2837}
2838}
2839return elements;
2840}
2841jQuery.fn.extend({
2842show:function(){
2843return showHide(this,true);
2844},
2845hide:function(){
2846return showHide(this);
2847},
2848toggle:function(state){
2849if(typeof state==="boolean"){
2850return state?this.show():this.hide();
2851}
2852return this.each(function(){
2853if(isHiddenWithinTree(this)){
2854jQuery(this).show();
2855}else{
2856jQuery(this).hide();
2857}
2858});
2859}
2860});
2861var rcheckableType=(/^(?:checkbox|radio)$/i);
2862var rtagName=(/<([a-z][^\/\0>\x20\t\r\n\f]*)/i);
2863var rscriptType=(/^$|^module$|\/(?:java|ecma)script/i);
2864(function(){
2865var fragment=document.createDocumentFragment(),
2866div=fragment.appendChild(document.createElement("div")),
2867input=document.createElement("input");
2868input.setAttribute("type","radio");
2869input.setAttribute("checked","checked");
2870input.setAttribute("name","t");
2871div.appendChild(input);
2872support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;
2873div.innerHTML="<textarea>x</textarea>";
2874support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;
2875div.innerHTML="<option></option>";
2876support.option=!!div.lastChild;
2877})();
2878var wrapMap={
2879thead:[1,"<table>","</table>"],
2880col:[2,"<table><colgroup>","</colgroup></table>"],
2881tr:[2,"<table><tbody>","</tbody></table>"],
2882td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
2883_default:[0,"",""]
2884};
2885wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;
2886wrapMap.th=wrapMap.td;
2887if(!support.option){
2888wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"];
2889}
2890function getAll(context,tag){
2891var ret;
2892if(typeof context.getElementsByTagName!=="undefined"){
2893ret=context.getElementsByTagName(tag||"*");
2894}else if(typeof context.querySelectorAll!=="undefined"){
2895ret=context.querySelectorAll(tag||"*");
2896}else{
2897ret=[];
2898}
2899if(tag===undefined||tag&&nodeName(context,tag)){
2900return jQuery.merge([context],ret);
2901}
2902return ret;
2903}
2904function setGlobalEval(elems,refElements){
2905var i=0,
2906l=elems.length;
2907for(;i<l;i++){
2908dataPriv.set(
2909elems[i],
2910"globalEval",
2911!refElements||dataPriv.get(refElements[i],"globalEval")
2912);
2913}
2914}
2915var rhtml=/<|&#?\w+;/;
2916function buildFragment(elems,context,scripts,selection,ignored){
2917var elem,tmp,tag,wrap,attached,j,
2918fragment=context.createDocumentFragment(),
2919nodes=[],
2920i=0,
2921l=elems.length;
2922for(;i<l;i++){
2923elem=elems[i];
2924if(elem||elem===0){
2925if(toType(elem)==="object"){
2926jQuery.merge(nodes,elem.nodeType?[elem]:elem);
2927}else if(!rhtml.test(elem)){
2928nodes.push(context.createTextNode(elem));
2929}else{
2930tmp=tmp||fragment.appendChild(context.createElement("div"));
2931tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();
2932wrap=wrapMap[tag]||wrapMap._default;
2933tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];
2934j=wrap[0];
2935while(j--){
2936tmp=tmp.lastChild;
2937}
2938jQuery.merge(nodes,tmp.childNodes);
2939tmp=fragment.firstChild;
2940tmp.textContent="";
2941}
2942}
2943}
2944fragment.textContent="";
2945i=0;
2946while((elem=nodes[i++])){
2947if(selection&&jQuery.inArray(elem,selection)>-1){
2948if(ignored){
2949ignored.push(elem);
2950}
2951continue;
2952}
2953attached=isAttached(elem);
2954tmp=getAll(fragment.appendChild(elem),"script");
2955if(attached){
2956setGlobalEval(tmp);
2957}
2958if(scripts){
2959j=0;
2960while((elem=tmp[j++])){
2961if(rscriptType.test(elem.type||"")){
2962scripts.push(elem);
2963}
2964}
2965}
2966}
2967return fragment;
2968}
2969var rtypenamespace=/^([^.]*)(?:\.(.+)|)/;
2970function returnTrue(){
2971return true;
2972}
2973function returnFalse(){
2974return false;
2975}
2976function on(elem,types,selector,data,fn,one){
2977var origFn,type;
2978if(typeof types==="object"){
2979if(typeof selector!=="string"){
2980data=data||selector;
2981selector=undefined;
2982}
2983for(type in types){
2984on(elem,type,selector,data,types[type],one);
2985}
2986return elem;
2987}
2988if(data==null&&fn==null){
2989fn=selector;
2990data=selector=undefined;
2991}else if(fn==null){
2992if(typeof selector==="string"){
2993fn=data;
2994data=undefined;
2995}else{
2996fn=data;
2997data=selector;
2998selector=undefined;
2999}
3000}
3001if(fn===false){
3002fn=returnFalse;
3003}else if(!fn){
3004return elem;
3005}
3006if(one===1){
3007origFn=fn;
3008fn=function(event){
3009jQuery().off(event);
3010return origFn.apply(this,arguments);
3011};
3012fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);
3013}
3014return elem.each(function(){
3015jQuery.event.add(this,types,fn,data,selector);
3016});
3017}
3018jQuery.event={
3019global:{},
3020add:function(elem,types,handler,data,selector){
3021var handleObjIn,eventHandle,tmp,
3022events,t,handleObj,
3023special,handlers,type,namespaces,origType,
3024elemData=dataPriv.get(elem);
3025if(!acceptData(elem)){
3026return;
3027}
3028if(handler.handler){
3029handleObjIn=handler;
3030handler=handleObjIn.handler;
3031selector=handleObjIn.selector;
3032}
3033if(selector){
3034jQuery.find.matchesSelector(documentElement,selector);
3035}
3036if(!handler.guid){
3037handler.guid=jQuery.guid++;
3038}
3039if(!(events=elemData.events)){
3040events=elemData.events=Object.create(null);
3041}
3042if(!(eventHandle=elemData.handle)){
3043eventHandle=elemData.handle=function(e){
3044return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?
3045jQuery.event.dispatch.apply(elem,arguments):undefined;
3046};
3047}
3048types=(types||"").match(rnothtmlwhite)||[""];
3049t=types.length;
3050while(t--){
3051tmp=rtypenamespace.exec(types[t])||[];
3052type=origType=tmp[1];
3053namespaces=(tmp[2]||"").split(".").sort();
3054if(!type){
3055continue;
3056}
3057special=jQuery.event.special[type]||{};
3058type=(selector?special.delegateType:special.bindType)||type;
3059special=jQuery.event.special[type]||{};
3060handleObj=jQuery.extend({
3061type:type,
3062origType:origType,
3063data:data,
3064handler:handler,
3065guid:handler.guid,
3066selector:selector,
3067needsContext:selector&&jQuery.expr.match.needsContext.test(selector),
3068namespace:namespaces.join(".")
3069},handleObjIn);
3070if(!(handlers=events[type])){
3071handlers=events[type]=[];
3072handlers.delegateCount=0;
3073if(!special.setup||
3074special.setup.call(elem,data,namespaces,eventHandle)===false){
3075if(elem.addEventListener){
3076elem.addEventListener(type,eventHandle);
3077}
3078}
3079}
3080if(special.add){
3081special.add.call(elem,handleObj);
3082if(!handleObj.handler.guid){
3083handleObj.handler.guid=handler.guid;
3084}
3085}
3086if(selector){
3087handlers.splice(handlers.delegateCount++,0,handleObj);
3088}else{
3089handlers.push(handleObj);
3090}
3091jQuery.event.global[type]=true;
3092}
3093},
3094remove:function(elem,types,handler,selector,mappedTypes){
3095var j,origCount,tmp,
3096events,t,handleObj,
3097special,handlers,type,namespaces,origType,
3098elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);
3099if(!elemData||!(events=elemData.events)){
3100return;
3101}
3102types=(types||"").match(rnothtmlwhite)||[""];
3103t=types.length;
3104while(t--){
3105tmp=rtypenamespace.exec(types[t])||[];
3106type=origType=tmp[1];
3107namespaces=(tmp[2]||"").split(".").sort();
3108if(!type){
3109for(type in events){
3110jQuery.event.remove(elem,type+types[t],handler,selector,true);
3111}
3112continue;
3113}
3114special=jQuery.event.special[type]||{};
3115type=(selector?special.delegateType:special.bindType)||type;
3116handlers=events[type]||[];
3117tmp=tmp[2]&&
3118new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");
3119origCount=j=handlers.length;
3120while(j--){
3121handleObj=handlers[j];
3122if((mappedTypes||origType===handleObj.origType)&&
3123(!handler||handler.guid===handleObj.guid)&&
3124(!tmp||tmp.test(handleObj.namespace))&&
3125(!selector||selector===handleObj.selector||
3126selector==="**"&&handleObj.selector)){
3127handlers.splice(j,1);
3128if(handleObj.selector){
3129handlers.delegateCount--;
3130}
3131if(special.remove){
3132special.remove.call(elem,handleObj);
3133}
3134}
3135}
3136if(origCount&&!handlers.length){
3137if(!special.teardown||
3138special.teardown.call(elem,namespaces,elemData.handle)===false){
3139jQuery.removeEvent(elem,type,elemData.handle);
3140}
3141delete events[type];
3142}
3143}
3144if(jQuery.isEmptyObject(events)){
3145dataPriv.remove(elem,"handle events");
3146}
3147},
3148dispatch:function(nativeEvent){
3149var i,j,ret,matched,handleObj,handlerQueue,
3150args=new Array(arguments.length),
3151event=jQuery.event.fix(nativeEvent),
3152handlers=(
3153dataPriv.get(this,"events")||Object.create(null)
3154)[event.type]||[],
3155special=jQuery.event.special[event.type]||{};
3156args[0]=event;
3157for(i=1;i<arguments.length;i++){
3158args[i]=arguments[i];
3159}
3160event.delegateTarget=this;
3161if(special.preDispatch&&special.preDispatch.call(this,event)===false){
3162return;
3163}
3164handlerQueue=jQuery.event.handlers.call(this,event,handlers);
3165i=0;
3166while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){
3167event.currentTarget=matched.elem;
3168j=0;
3169while((handleObj=matched.handlers[j++])&&
3170!event.isImmediatePropagationStopped()){
3171if(!event.rnamespace||handleObj.namespace===false||
3172event.rnamespace.test(handleObj.namespace)){
3173event.handleObj=handleObj;
3174event.data=handleObj.data;
3175ret=((jQuery.event.special[handleObj.origType]||{}).handle||
3176handleObj.handler).apply(matched.elem,args);
3177if(ret!==undefined){
3178if((event.result=ret)===false){
3179event.preventDefault();
3180event.stopPropagation();
3181}
3182}
3183}
3184}
3185}
3186if(special.postDispatch){
3187special.postDispatch.call(this,event);
3188}
3189return event.result;
3190},
3191handlers:function(event,handlers){
3192var i,handleObj,sel,matchedHandlers,matchedSelectors,
3193handlerQueue=[],
3194delegateCount=handlers.delegateCount,
3195cur=event.target;
3196if(delegateCount&&
3197cur.nodeType&&
3198!(event.type==="click"&&event.button>=1)){
3199for(;cur!==this;cur=cur.parentNode||this){
3200if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){
3201matchedHandlers=[];
3202matchedSelectors={};
3203for(i=0;i<delegateCount;i++){
3204handleObj=handlers[i];
3205sel=handleObj.selector+" ";
3206if(matchedSelectors[sel]===undefined){
3207matchedSelectors[sel]=handleObj.needsContext?
3208jQuery(sel,this).index(cur)>-1:
3209jQuery.find(sel,this,null,[cur]).length;
3210}
3211if(matchedSelectors[sel]){
3212matchedHandlers.push(handleObj);
3213}
3214}
3215if(matchedHandlers.length){
3216handlerQueue.push({elem:cur,handlers:matchedHandlers});
3217}
3218}
3219}
3220}
3221cur=this;
3222if(delegateCount<handlers.length){
3223handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)});
3224}
3225return handlerQueue;
3226},
3227addProp:function(name,hook){
3228Object.defineProperty(jQuery.Event.prototype,name,{
3229enumerable:true,
3230configurable:true,
3231get:isFunction(hook)?
3232function(){
3233if(this.originalEvent){
3234return hook(this.originalEvent);
3235}
3236}:
3237function(){
3238if(this.originalEvent){
3239return this.originalEvent[name];
3240}
3241},
3242set:function(value){
3243Object.defineProperty(this,name,{
3244enumerable:true,
3245configurable:true,
3246writable:true,
3247value:value
3248});
3249}
3250});
3251},
3252fix:function(originalEvent){
3253return originalEvent[jQuery.expando]?
3254originalEvent:
3255new jQuery.Event(originalEvent);
3256},
3257special:{
3258load:{
3259noBubble:true
3260},
3261click:{
3262setup:function(data){
3263var el=this||data;
3264if(rcheckableType.test(el.type)&&
3265el.click&&nodeName(el,"input")){
3266leverageNative(el,"click",true);
3267}
3268return false;
3269},
3270trigger:function(data){
3271var el=this||data;
3272if(rcheckableType.test(el.type)&&
3273el.click&&nodeName(el,"input")){
3274leverageNative(el,"click");
3275}
3276return true;
3277},
3278_default:function(event){
3279var target=event.target;
3280return rcheckableType.test(target.type)&&
3281target.click&&nodeName(target,"input")&&
3282dataPriv.get(target,"click")||
3283nodeName(target,"a");
3284}
3285},
3286beforeunload:{
3287postDispatch:function(event){
3288if(event.result!==undefined&&event.originalEvent){
3289event.originalEvent.returnValue=event.result;
3290}
3291}
3292}
3293}
3294};
3295function leverageNative(el,type,isSetup){
3296if(!isSetup){
3297if(dataPriv.get(el,type)===undefined){
3298jQuery.event.add(el,type,returnTrue);
3299}
3300return;
3301}
3302dataPriv.set(el,type,false);
3303jQuery.event.add(el,type,{
3304namespace:false,
3305handler:function(event){
3306var result,
3307saved=dataPriv.get(this,type);
3308if((event.isTrigger&1)&&this[type]){
3309if(!saved){
3310saved=slice.call(arguments);
3311dataPriv.set(this,type,saved);
3312this[type]();
3313result=dataPriv.get(this,type);
3314dataPriv.set(this,type,false);
3315if(saved!==result){
3316event.stopImmediatePropagation();
3317event.preventDefault();
3318return result;
3319}
3320}else if((jQuery.event.special[type]||{}).delegateType){
3321event.stopPropagation();
3322}
3323}else if(saved){
3324dataPriv.set(this,type,jQuery.event.trigger(
3325saved[0],
3326saved.slice(1),
3327this
3328));
3329event.stopPropagation();
3330event.isImmediatePropagationStopped=returnTrue;
3331}
3332}
3333});
3334}
3335jQuery.removeEvent=function(elem,type,handle){
3336if(elem.removeEventListener){
3337elem.removeEventListener(type,handle);
3338}
3339};
3340jQuery.Event=function(src,props){
3341if(!(this instanceof jQuery.Event)){
3342return new jQuery.Event(src,props);
3343}
3344if(src&&src.type){
3345this.originalEvent=src;
3346this.type=src.type;
3347this.isDefaultPrevented=src.defaultPrevented||
3348src.defaultPrevented===undefined&&
3349src.returnValue===false?
3350returnTrue:
3351returnFalse;
3352this.target=(src.target&&src.target.nodeType===3)?
3353src.target.parentNode:
3354src.target;
3355this.currentTarget=src.currentTarget;
3356this.relatedTarget=src.relatedTarget;
3357}else{
3358this.type=src;
3359}
3360if(props){
3361jQuery.extend(this,props);
3362}
3363this.timeStamp=src&&src.timeStamp||Date.now();
3364this[jQuery.expando]=true;
3365};
3366jQuery.Event.prototype={
3367constructor:jQuery.Event,
3368isDefaultPrevented:returnFalse,
3369isPropagationStopped:returnFalse,
3370isImmediatePropagationStopped:returnFalse,
3371isSimulated:false,
3372preventDefault:function(){
3373var e=this.originalEvent;
3374this.isDefaultPrevented=returnTrue;
3375if(e&&!this.isSimulated){
3376e.preventDefault();
3377}
3378},
3379stopPropagation:function(){
3380var e=this.originalEvent;
3381this.isPropagationStopped=returnTrue;
3382if(e&&!this.isSimulated){
3383e.stopPropagation();
3384}
3385},
3386stopImmediatePropagation:function(){
3387var e=this.originalEvent;
3388this.isImmediatePropagationStopped=returnTrue;
3389if(e&&!this.isSimulated){
3390e.stopImmediatePropagation();
3391}
3392this.stopPropagation();
3393}
3394};
3395jQuery.each({
3396altKey:true,
3397bubbles:true,
3398cancelable:true,
3399changedTouches:true,
3400ctrlKey:true,
3401detail:true,
3402eventPhase:true,
3403metaKey:true,
3404pageX:true,
3405pageY:true,
3406shiftKey:true,
3407view:true,
3408"char":true,
3409code:true,
3410charCode:true,
3411key:true,
3412keyCode:true,
3413button:true,
3414buttons:true,
3415clientX:true,
3416clientY:true,
3417offsetX:true,
3418offsetY:true,
3419pointerId:true,
3420pointerType:true,
3421screenX:true,
3422screenY:true,
3423targetTouches:true,
3424toElement:true,
3425touches:true,
3426which:true
3427},jQuery.event.addProp);
3428jQuery.each({focus:"focusin",blur:"focusout"},function(type,delegateType){
3429function focusMappedHandler(nativeEvent){
3430if(document.documentMode){
3431var handle=dataPriv.get(this,"handle"),
3432event=jQuery.event.fix(nativeEvent);
3433event.type=nativeEvent.type==="focusin"?"focus":"blur";
3434event.isSimulated=true;
3435handle(nativeEvent);
3436if(event.target===event.currentTarget){
3437handle(event);
3438}
3439}else{
3440jQuery.event.simulate(delegateType,nativeEvent.target,
3441jQuery.event.fix(nativeEvent));
3442}
3443}
3444jQuery.event.special[type]={
3445setup:function(){
3446var attaches;
3447leverageNative(this,type,true);
3448if(document.documentMode){
3449attaches=dataPriv.get(this,delegateType);
3450if(!attaches){
3451this.addEventListener(delegateType,focusMappedHandler);
3452}
3453dataPriv.set(this,delegateType,(attaches||0)+1);
3454}else{
3455return false;
3456}
3457},
3458trigger:function(){
3459leverageNative(this,type);
3460return true;
3461},
3462teardown:function(){
3463var attaches;
3464if(document.documentMode){
3465attaches=dataPriv.get(this,delegateType)-1;
3466if(!attaches){
3467this.removeEventListener(delegateType,focusMappedHandler);
3468dataPriv.remove(this,delegateType);
3469}else{
3470dataPriv.set(this,delegateType,attaches);
3471}
3472}else{
3473return false;
3474}
3475},
3476_default:function(event){
3477return dataPriv.get(event.target,type);
3478},
3479delegateType:delegateType
3480};
3481jQuery.event.special[delegateType]={
3482setup:function(){
3483var doc=this.ownerDocument||this.document||this,
3484dataHolder=document.documentMode?this:doc,
3485attaches=dataPriv.get(dataHolder,delegateType);
3486if(!attaches){
3487if(document.documentMode){
3488this.addEventListener(delegateType,focusMappedHandler);
3489}else{
3490doc.addEventListener(type,focusMappedHandler,true);
3491}
3492}
3493dataPriv.set(dataHolder,delegateType,(attaches||0)+1);
3494},
3495teardown:function(){
3496var doc=this.ownerDocument||this.document||this,
3497dataHolder=document.documentMode?this:doc,
3498attaches=dataPriv.get(dataHolder,delegateType)-1;
3499if(!attaches){
3500if(document.documentMode){
3501this.removeEventListener(delegateType,focusMappedHandler);
3502}else{
3503doc.removeEventListener(type,focusMappedHandler,true);
3504}
3505dataPriv.remove(dataHolder,delegateType);
3506}else{
3507dataPriv.set(dataHolder,delegateType,attaches);
3508}
3509}
3510};
3511});
3512jQuery.each({
3513mouseenter:"mouseover",
3514mouseleave:"mouseout",
3515pointerenter:"pointerover",
3516pointerleave:"pointerout"
3517},function(orig,fix){
3518jQuery.event.special[orig]={
3519delegateType:fix,
3520bindType:fix,
3521handle:function(event){
3522var ret,
3523target=this,
3524related=event.relatedTarget,
3525handleObj=event.handleObj;
3526if(!related||(related!==target&&!jQuery.contains(target,related))){
3527event.type=handleObj.origType;
3528ret=handleObj.handler.apply(this,arguments);
3529event.type=fix;
3530}
3531return ret;
3532}
3533};
3534});
3535jQuery.fn.extend({
3536on:function(types,selector,data,fn){
3537return on(this,types,selector,data,fn);
3538},
3539one:function(types,selector,data,fn){
3540return on(this,types,selector,data,fn,1);
3541},
3542off:function(types,selector,fn){
3543var handleObj,type;
3544if(types&&types.preventDefault&&types.handleObj){
3545handleObj=types.handleObj;
3546jQuery(types.delegateTarget).off(
3547handleObj.namespace?
3548handleObj.origType+"."+handleObj.namespace:
3549handleObj.origType,
3550handleObj.selector,
3551handleObj.handler
3552);
3553return this;
3554}
3555if(typeof types==="object"){
3556for(type in types){
3557this.off(type,selector,types[type]);
3558}
3559return this;
3560}
3561if(selector===false||typeof selector==="function"){
3562fn=selector;
3563selector=undefined;
3564}
3565if(fn===false){
3566fn=returnFalse;
3567}
3568return this.each(function(){
3569jQuery.event.remove(this,types,fn,selector);
3570});
3571}
3572});
3573var
3574rnoInnerhtml=/<script|<style|<link/i,
3575rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,
3576rcleanScript=/^\s*<!\[CDATA\[|\]\]>\s*$/g;
3577function manipulationTarget(elem,content){
3578if(nodeName(elem,"table")&&
3579nodeName(content.nodeType!==11?content:content.firstChild,"tr")){
3580return jQuery(elem).children("tbody")[0]||elem;
3581}
3582return elem;
3583}
3584function disableScript(elem){
3585elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;
3586return elem;
3587}
3588function restoreScript(elem){
3589if((elem.type||"").slice(0,5)==="true/"){
3590elem.type=elem.type.slice(5);
3591}else{
3592elem.removeAttribute("type");
3593}
3594return elem;
3595}
3596function cloneCopyEvent(src,dest){
3597var i,l,type,pdataOld,udataOld,udataCur,events;
3598if(dest.nodeType!==1){
3599return;
3600}
3601if(dataPriv.hasData(src)){
3602pdataOld=dataPriv.get(src);
3603events=pdataOld.events;
3604if(events){
3605dataPriv.remove(dest,"handle events");
3606for(type in events){
3607for(i=0,l=events[type].length;i<l;i++){
3608jQuery.event.add(dest,type,events[type][i]);
3609}
3610}
3611}
3612}
3613if(dataUser.hasData(src)){
3614udataOld=dataUser.access(src);
3615udataCur=jQuery.extend({},udataOld);
3616dataUser.set(dest,udataCur);
3617}
3618}
3619function fixInput(src,dest){
3620var nodeName=dest.nodeName.toLowerCase();
3621if(nodeName==="input"&&rcheckableType.test(src.type)){
3622dest.checked=src.checked;
3623}else if(nodeName==="input"||nodeName==="textarea"){
3624dest.defaultValue=src.defaultValue;
3625}
3626}
3627function domManip(collection,args,callback,ignored){
3628args=flat(args);
3629var fragment,first,scripts,hasScripts,node,doc,
3630i=0,
3631l=collection.length,
3632iNoClone=l-1,
3633value=args[0],
3634valueIsFunction=isFunction(value);
3635if(valueIsFunction||
3636(l>1&&typeof value==="string"&&
3637!support.checkClone&&rchecked.test(value))){
3638return collection.each(function(index){
3639var self=collection.eq(index);
3640if(valueIsFunction){
3641args[0]=value.call(this,index,self.html());
3642}
3643domManip(self,args,callback,ignored);
3644});
3645}
3646if(l){
3647fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);
3648first=fragment.firstChild;
3649if(fragment.childNodes.length===1){
3650fragment=first;
3651}
3652if(first||ignored){
3653scripts=jQuery.map(getAll(fragment,"script"),disableScript);
3654hasScripts=scripts.length;
3655for(;i<l;i++){
3656node=fragment;
3657if(i!==iNoClone){
3658node=jQuery.clone(node,true,true);
3659if(hasScripts){
3660jQuery.merge(scripts,getAll(node,"script"));
3661}
3662}
3663callback.call(collection[i],node,i);
3664}
3665if(hasScripts){
3666doc=scripts[scripts.length-1].ownerDocument;
3667jQuery.map(scripts,restoreScript);
3668for(i=0;i<hasScripts;i++){
3669node=scripts[i];
3670if(rscriptType.test(node.type||"")&&
3671!dataPriv.access(node,"globalEval")&&
3672jQuery.contains(doc,node)){
3673if(node.src&&(node.type||"").toLowerCase()!=="module"){
3674if(jQuery._evalUrl&&!node.noModule){
3675jQuery._evalUrl(node.src,{
3676nonce:node.nonce||node.getAttribute("nonce")
3677},doc);
3678}
3679}else{
3680DOMEval(node.textContent.replace(rcleanScript,""),node,doc);
3681}
3682}
3683}
3684}
3685}
3686}
3687return collection;
3688}
3689function remove(elem,selector,keepData){
3690var node,
3691nodes=selector?jQuery.filter(selector,elem):elem,
3692i=0;
3693for(;(node=nodes[i])!=null;i++){
3694if(!keepData&&node.nodeType===1){
3695jQuery.cleanData(getAll(node));
3696}
3697if(node.parentNode){
3698if(keepData&&isAttached(node)){
3699setGlobalEval(getAll(node,"script"));
3700}
3701node.parentNode.removeChild(node);
3702}
3703}
3704return elem;
3705}
3706jQuery.extend({
3707htmlPrefilter:function(html){
3708return html;
3709},
3710clone:function(elem,dataAndEvents,deepDataAndEvents){
3711var i,l,srcElements,destElements,
3712clone=elem.cloneNode(true),
3713inPage=isAttached(elem);
3714if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&
3715!jQuery.isXMLDoc(elem)){
3716destElements=getAll(clone);
3717srcElements=getAll(elem);
3718for(i=0,l=srcElements.length;i<l;i++){
3719fixInput(srcElements[i],destElements[i]);
3720}
3721}
3722if(dataAndEvents){
3723if(deepDataAndEvents){
3724srcElements=srcElements||getAll(elem);
3725destElements=destElements||getAll(clone);
3726for(i=0,l=srcElements.length;i<l;i++){
3727cloneCopyEvent(srcElements[i],destElements[i]);
3728}
3729}else{
3730cloneCopyEvent(elem,clone);
3731}
3732}
3733destElements=getAll(clone,"script");
3734if(destElements.length>0){
3735setGlobalEval(destElements,!inPage&&getAll(elem,"script"));
3736}
3737return clone;
3738},
3739cleanData:function(elems){
3740var data,elem,type,
3741special=jQuery.event.special,
3742i=0;
3743for(;(elem=elems[i])!==undefined;i++){
3744if(acceptData(elem)){
3745if((data=elem[dataPriv.expando])){
3746if(data.events){
3747for(type in data.events){
3748if(special[type]){
3749jQuery.event.remove(elem,type);
3750}else{
3751jQuery.removeEvent(elem,type,data.handle);
3752}
3753}
3754}
3755elem[dataPriv.expando]=undefined;
3756}
3757if(elem[dataUser.expando]){
3758elem[dataUser.expando]=undefined;
3759}
3760}
3761}
3762}
3763});
3764jQuery.fn.extend({
3765detach:function(selector){
3766return remove(this,selector,true);
3767},
3768remove:function(selector){
3769return remove(this,selector);
3770},
3771text:function(value){
3772return access(this,function(value){
3773return value===undefined?
3774jQuery.text(this):
3775this.empty().each(function(){
3776if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3777this.textContent=value;
3778}
3779});
3780},null,value,arguments.length);
3781},
3782append:function(){
3783return domManip(this,arguments,function(elem){
3784if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3785var target=manipulationTarget(this,elem);
3786target.appendChild(elem);
3787}
3788});
3789},
3790prepend:function(){
3791return domManip(this,arguments,function(elem){
3792if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
3793var target=manipulationTarget(this,elem);
3794target.insertBefore(elem,target.firstChild);
3795}
3796});
3797},
3798before:function(){
3799return domManip(this,arguments,function(elem){
3800if(this.parentNode){
3801this.parentNode.insertBefore(elem,this);
3802}
3803});
3804},
3805after:function(){
3806return domManip(this,arguments,function(elem){
3807if(this.parentNode){
3808this.parentNode.insertBefore(elem,this.nextSibling);
3809}
3810});
3811},
3812empty:function(){
3813var elem,
3814i=0;
3815for(;(elem=this[i])!=null;i++){
3816if(elem.nodeType===1){
3817jQuery.cleanData(getAll(elem,false));
3818elem.textContent="";
3819}
3820}
3821return this;
3822},
3823clone:function(dataAndEvents,deepDataAndEvents){
3824dataAndEvents=dataAndEvents==null?false:dataAndEvents;
3825deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;
3826return this.map(function(){
3827return jQuery.clone(this,dataAndEvents,deepDataAndEvents);
3828});
3829},
3830html:function(value){
3831return access(this,function(value){
3832var elem=this[0]||{},
3833i=0,
3834l=this.length;
3835if(value===undefined&&elem.nodeType===1){
3836return elem.innerHTML;
3837}
3838if(typeof value==="string"&&!rnoInnerhtml.test(value)&&
3839!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){
3840value=jQuery.htmlPrefilter(value);
3841try{
3842for(;i<l;i++){
3843elem=this[i]||{};
3844if(elem.nodeType===1){
3845jQuery.cleanData(getAll(elem,false));
3846elem.innerHTML=value;
3847}
3848}
3849elem=0;
3850}catch(e){}
3851}
3852if(elem){
3853this.empty().append(value);
3854}
3855},null,value,arguments.length);
3856},
3857replaceWith:function(){
3858var ignored=[];
3859return domManip(this,arguments,function(elem){
3860var parent=this.parentNode;
3861if(jQuery.inArray(this,ignored)<0){
3862jQuery.cleanData(getAll(this));
3863if(parent){
3864parent.replaceChild(elem,this);
3865}
3866}
3867},ignored);
3868}
3869});
3870jQuery.each({
3871appendTo:"append",
3872prependTo:"prepend",
3873insertBefore:"before",
3874insertAfter:"after",
3875replaceAll:"replaceWith"
3876},function(name,original){
3877jQuery.fn[name]=function(selector){
3878var elems,
3879ret=[],
3880insert=jQuery(selector),
3881last=insert.length-1,
3882i=0;
3883for(;i<=last;i++){
3884elems=i===last?this:this.clone(true);
3885jQuery(insert[i])[original](elems);
3886push.apply(ret,elems.get());
3887}
3888return this.pushStack(ret);
3889};
3890});
3891var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");
3892var rcustomProp=/^--/;
3893var getStyles=function(elem){
3894var view=elem.ownerDocument.defaultView;
3895if(!view||!view.opener){
3896view=window;
3897}
3898return view.getComputedStyle(elem);
3899};
3900var swap=function(elem,options,callback){
3901var ret,name,
3902old={};
3903for(name in options){
3904old[name]=elem.style[name];
3905elem.style[name]=options[name];
3906}
3907ret=callback.call(elem);
3908for(name in options){
3909elem.style[name]=old[name];
3910}
3911return ret;
3912};
3913var rboxStyle=new RegExp(cssExpand.join("|"),"i");
3914(function(){
3915function computeStyleTests(){
3916if(!div){
3917return;
3918}
3919container.style.cssText="position:absolute;left:-11111px;width:60px;"+
3920"margin-top:1px;padding:0;border:0";
3921div.style.cssText=
3922"position:relative;display:block;box-sizing:border-box;overflow:scroll;"+
3923"margin:auto;border:1px;padding:1px;"+
3924"width:60%;top:1%";
3925documentElement.appendChild(container).appendChild(div);
3926var divStyle=window.getComputedStyle(div);
3927pixelPositionVal=divStyle.top!=="1%";
3928reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;
3929div.style.right="60%";
3930pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;
3931boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;
3932div.style.position="absolute";
3933scrollboxSizeVal=roundPixelMeasures(div.offsetWidth/3)===12;
3934documentElement.removeChild(container);
3935div=null;
3936}
3937function roundPixelMeasures(measure){
3938return Math.round(parseFloat(measure));
3939}
3940var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,
3941reliableTrDimensionsVal,reliableMarginLeftVal,
3942container=document.createElement("div"),
3943div=document.createElement("div");
3944if(!div.style){
3945return;
3946}
3947div.style.backgroundClip="content-box";
3948div.cloneNode(true).style.backgroundClip="";
3949support.clearCloneStyle=div.style.backgroundClip==="content-box";
3950jQuery.extend(support,{
3951boxSizingReliable:function(){
3952computeStyleTests();
3953return boxSizingReliableVal;
3954},
3955pixelBoxStyles:function(){
3956computeStyleTests();
3957return pixelBoxStylesVal;
3958},
3959pixelPosition:function(){
3960computeStyleTests();
3961return pixelPositionVal;
3962},
3963reliableMarginLeft:function(){
3964computeStyleTests();
3965return reliableMarginLeftVal;
3966},
3967scrollboxSize:function(){
3968computeStyleTests();
3969return scrollboxSizeVal;
3970},
3971reliableTrDimensions:function(){
3972var table,tr,trChild,trStyle;
3973if(reliableTrDimensionsVal==null){
3974table=document.createElement("table");
3975tr=document.createElement("tr");
3976trChild=document.createElement("div");
3977table.style.cssText="position:absolute;left:-11111px;border-collapse:separate";
3978tr.style.cssText="box-sizing:content-box;border:1px solid";
3979tr.style.height="1px";
3980trChild.style.height="9px";
3981trChild.style.display="block";
3982documentElement
3983.appendChild(table)
3984.appendChild(tr)
3985.appendChild(trChild);
3986trStyle=window.getComputedStyle(tr);
3987reliableTrDimensionsVal=(parseInt(trStyle.height,10)+
3988parseInt(trStyle.borderTopWidth,10)+
3989parseInt(trStyle.borderBottomWidth,10))===tr.offsetHeight;
3990documentElement.removeChild(table);
3991}
3992return reliableTrDimensionsVal;
3993}
3994});
3995})();
3996function curCSS(elem,name,computed){
3997var width,minWidth,maxWidth,ret,
3998isCustomProp=rcustomProp.test(name),
3999style=elem.style;
4000computed=computed||getStyles(elem);
4001if(computed){
4002ret=computed.getPropertyValue(name)||computed[name];
4003if(isCustomProp&&ret){
4004ret=ret.replace(rtrimCSS,"$1")||undefined;
4005}
4006if(ret===""&&!isAttached(elem)){
4007ret=jQuery.style(elem,name);
4008}
4009if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){
4010width=style.width;
4011minWidth=style.minWidth;
4012maxWidth=style.maxWidth;
4013style.minWidth=style.maxWidth=style.width=ret;
4014ret=computed.width;
4015style.width=width;
4016style.minWidth=minWidth;
4017style.maxWidth=maxWidth;
4018}
4019}
4020return ret!==undefined?
4021ret+"":
4022ret;
4023}
4024function addGetHookIf(conditionFn,hookFn){
4025return{
4026get:function(){
4027if(conditionFn()){
4028delete this.get;
4029return;
4030}
4031return(this.get=hookFn).apply(this,arguments);
4032}
4033};
4034}
4035var cssPrefixes=["Webkit","Moz","ms"],
4036emptyStyle=document.createElement("div").style,
4037vendorProps={};
4038function vendorPropName(name){
4039var capName=name[0].toUpperCase()+name.slice(1),
4040i=cssPrefixes.length;
4041while(i--){
4042name=cssPrefixes[i]+capName;
4043if(name in emptyStyle){
4044return name;
4045}
4046}
4047}
4048function finalPropName(name){
4049var final=jQuery.cssProps[name]||vendorProps[name];
4050if(final){
4051return final;
4052}
4053if(name in emptyStyle){
4054return name;
4055}
4056return vendorProps[name]=vendorPropName(name)||name;
4057}
4058var
4059rdisplayswap=/^(none|table(?!-c[ea]).+)/,
4060cssShow={position:"absolute",visibility:"hidden",display:"block"},
4061cssNormalTransform={
4062letterSpacing:"0",
4063fontWeight:"400"
4064};
4065function setPositiveNumber(_elem,value,subtract){
4066var matches=rcssNum.exec(value);
4067return matches?
4068Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):
4069value;
4070}
4071function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){
4072var i=dimension==="width"?1:0,
4073extra=0,
4074delta=0,
4075marginDelta=0;
4076if(box===(isBorderBox?"border":"content")){
4077return 0;
4078}
4079for(;i<4;i+=2){
4080if(box==="margin"){
4081marginDelta+=jQuery.css(elem,box+cssExpand[i],true,styles);
4082}
4083if(!isBorderBox){
4084delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);
4085if(box!=="padding"){
4086delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4087}else{
4088extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4089}
4090}else{
4091if(box==="content"){
4092delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);
4093}
4094if(box!=="margin"){
4095delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
4096}
4097}
4098}
4099if(!isBorderBox&&computedVal>=0){
4100delta+=Math.max(0,Math.ceil(
4101elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
4102computedVal-
4103delta-
4104extra-
41050.5
4106))||0;
4107}
4108return delta+marginDelta;
4109}
4110function getWidthOrHeight(elem,dimension,extra){
4111var styles=getStyles(elem),
4112boxSizingNeeded=!support.boxSizingReliable()||extra,
4113isBorderBox=boxSizingNeeded&&
4114jQuery.css(elem,"boxSizing",false,styles)==="border-box",
4115valueIsBorderBox=isBorderBox,
4116val=curCSS(elem,dimension,styles),
4117offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);
4118if(rnumnonpx.test(val)){
4119if(!extra){
4120return val;
4121}
4122val="auto";
4123}
4124if((!support.boxSizingReliable()&&isBorderBox||
4125!support.reliableTrDimensions()&&nodeName(elem,"tr")||
4126val==="auto"||
4127!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline")&&
4128elem.getClientRects().length){
4129isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";
4130valueIsBorderBox=offsetProp in elem;
4131if(valueIsBorderBox){
4132val=elem[offsetProp];
4133}
4134}
4135val=parseFloat(val)||0;
4136return(val+
4137boxModelAdjustment(
4138elem,
4139dimension,
4140extra||(isBorderBox?"border":"content"),
4141valueIsBorderBox,
4142styles,
4143val
4144)
4145)+"px";
4146}
4147jQuery.extend({
4148cssHooks:{
4149opacity:{
4150get:function(elem,computed){
4151if(computed){
4152var ret=curCSS(elem,"opacity");
4153return ret===""?"1":ret;
4154}
4155}
4156}
4157},
4158cssNumber:{
4159animationIterationCount:true,
4160aspectRatio:true,
4161borderImageSlice:true,
4162columnCount:true,
4163flexGrow:true,
4164flexShrink:true,
4165fontWeight:true,
4166gridArea:true,
4167gridColumn:true,
4168gridColumnEnd:true,
4169gridColumnStart:true,
4170gridRow:true,
4171gridRowEnd:true,
4172gridRowStart:true,
4173lineHeight:true,
4174opacity:true,
4175order:true,
4176orphans:true,
4177scale:true,
4178widows:true,
4179zIndex:true,
4180zoom:true,
4181fillOpacity:true,
4182floodOpacity:true,
4183stopOpacity:true,
4184strokeMiterlimit:true,
4185strokeOpacity:true
4186},
4187cssProps:{},
4188style:function(elem,name,value,extra){
4189if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){
4190return;
4191}
4192var ret,type,hooks,
4193origName=camelCase(name),
4194isCustomProp=rcustomProp.test(name),
4195style=elem.style;
4196if(!isCustomProp){
4197name=finalPropName(origName);
4198}
4199hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];
4200if(value!==undefined){
4201type=typeof value;
4202if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){
4203value=adjustCSS(elem,name,ret);
4204type="number";
4205}
4206if(value==null||value!==value){
4207return;
4208}
4209if(type==="number"&&!isCustomProp){
4210value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");
4211}
4212if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){
4213style[name]="inherit";
4214}
4215if(!hooks||!("set"in hooks)||
4216(value=hooks.set(elem,value,extra))!==undefined){
4217if(isCustomProp){
4218style.setProperty(name,value);
4219}else{
4220style[name]=value;
4221}
4222}
4223}else{
4224if(hooks&&"get"in hooks&&
4225(ret=hooks.get(elem,false,extra))!==undefined){
4226return ret;
4227}
4228return style[name];
4229}
4230},
4231css:function(elem,name,extra,styles){
4232var val,num,hooks,
4233origName=camelCase(name),
4234isCustomProp=rcustomProp.test(name);
4235if(!isCustomProp){
4236name=finalPropName(origName);
4237}
4238hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];
4239if(hooks&&"get"in hooks){
4240val=hooks.get(elem,true,extra);
4241}
4242if(val===undefined){
4243val=curCSS(elem,name,styles);
4244}
4245if(val==="normal"&&name in cssNormalTransform){
4246val=cssNormalTransform[name];
4247}
4248if(extra===""||extra){
4249num=parseFloat(val);
4250return extra===true||isFinite(num)?num||0:val;
4251}
4252return val;
4253}
4254});
4255jQuery.each(["height","width"],function(_i,dimension){
4256jQuery.cssHooks[dimension]={
4257get:function(elem,computed,extra){
4258if(computed){
4259return rdisplayswap.test(jQuery.css(elem,"display"))&&
4260(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?
4261swap(elem,cssShow,function(){
4262return getWidthOrHeight(elem,dimension,extra);
4263}):
4264getWidthOrHeight(elem,dimension,extra);
4265}
4266},
4267set:function(elem,value,extra){
4268var matches,
4269styles=getStyles(elem),
4270scrollboxSizeBuggy=!support.scrollboxSize()&&
4271styles.position==="absolute",
4272boxSizingNeeded=scrollboxSizeBuggy||extra,
4273isBorderBox=boxSizingNeeded&&
4274jQuery.css(elem,"boxSizing",false,styles)==="border-box",
4275subtract=extra?
4276boxModelAdjustment(
4277elem,
4278dimension,
4279extra,
4280isBorderBox,
4281styles
4282):
42830;
4284if(isBorderBox&&scrollboxSizeBuggy){
4285subtract-=Math.ceil(
4286elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
4287parseFloat(styles[dimension])-
4288boxModelAdjustment(elem,dimension,"border",false,styles)-
42890.5
4290);
4291}
4292if(subtract&&(matches=rcssNum.exec(value))&&
4293(matches[3]||"px")!=="px"){
4294elem.style[dimension]=value;
4295value=jQuery.css(elem,dimension);
4296}
4297return setPositiveNumber(elem,value,subtract);
4298}
4299};
4300});
4301jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,
4302function(elem,computed){
4303if(computed){
4304return(parseFloat(curCSS(elem,"marginLeft"))||
4305elem.getBoundingClientRect().left-
4306swap(elem,{marginLeft:0},function(){
4307return elem.getBoundingClientRect().left;
4308})
4309)+"px";
4310}
4311}
4312);
4313jQuery.each({
4314margin:"",
4315padding:"",
4316border:"Width"
4317},function(prefix,suffix){
4318jQuery.cssHooks[prefix+suffix]={
4319expand:function(value){
4320var i=0,
4321expanded={},
4322parts=typeof value==="string"?value.split(" "):[value];
4323for(;i<4;i++){
4324expanded[prefix+cssExpand[i]+suffix]=
4325parts[i]||parts[i-2]||parts[0];
4326}
4327return expanded;
4328}
4329};
4330if(prefix!=="margin"){
4331jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;
4332}
4333});
4334jQuery.fn.extend({
4335css:function(name,value){
4336return access(this,function(elem,name,value){
4337var styles,len,
4338map={},
4339i=0;
4340if(Array.isArray(name)){
4341styles=getStyles(elem);
4342len=name.length;
4343for(;i<len;i++){
4344map[name[i]]=jQuery.css(elem,name[i],false,styles);
4345}
4346return map;
4347}
4348return value!==undefined?
4349jQuery.style(elem,name,value):
4350jQuery.css(elem,name);
4351},name,value,arguments.length>1);
4352}
4353});
4354function Tween(elem,options,prop,end,easing){
4355return new Tween.prototype.init(elem,options,prop,end,easing);
4356}
4357jQuery.Tween=Tween;
4358Tween.prototype={
4359constructor:Tween,
4360init:function(elem,options,prop,end,easing,unit){
4361this.elem=elem;
4362this.prop=prop;
4363this.easing=easing||jQuery.easing._default;
4364this.options=options;
4365this.start=this.now=this.cur();
4366this.end=end;
4367this.unit=unit||(jQuery.cssNumber[prop]?"":"px");
4368},
4369cur:function(){
4370var hooks=Tween.propHooks[this.prop];
4371return hooks&&hooks.get?
4372hooks.get(this):
4373Tween.propHooks._default.get(this);
4374},
4375run:function(percent){
4376var eased,
4377hooks=Tween.propHooks[this.prop];
4378if(this.options.duration){
4379this.pos=eased=jQuery.easing[this.easing](
4380percent,this.options.duration*percent,0,1,this.options.duration
4381);
4382}else{
4383this.pos=eased=percent;
4384}
4385this.now=(this.end-this.start)*eased+this.start;
4386if(this.options.step){
4387this.options.step.call(this.elem,this.now,this);
4388}
4389if(hooks&&hooks.set){
4390hooks.set(this);
4391}else{
4392Tween.propHooks._default.set(this);
4393}
4394return this;
4395}
4396};
4397Tween.prototype.init.prototype=Tween.prototype;
4398Tween.propHooks={
4399_default:{
4400get:function(tween){
4401var result;
4402if(tween.elem.nodeType!==1||
4403tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){
4404return tween.elem[tween.prop];
4405}
4406result=jQuery.css(tween.elem,tween.prop,"");
4407return!result||result==="auto"?0:result;
4408},
4409set:function(tween){
4410if(jQuery.fx.step[tween.prop]){
4411jQuery.fx.step[tween.prop](tween);
4412}else if(tween.elem.nodeType===1&&(
4413jQuery.cssHooks[tween.prop]||
4414tween.elem.style[finalPropName(tween.prop)]!=null)){
4415jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);
4416}else{
4417tween.elem[tween.prop]=tween.now;
4418}
4419}
4420}
4421};
4422Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={
4423set:function(tween){
4424if(tween.elem.nodeType&&tween.elem.parentNode){
4425tween.elem[tween.prop]=tween.now;
4426}
4427}
4428};
4429jQuery.easing={
4430linear:function(p){
4431return p;
4432},
4433swing:function(p){
4434return 0.5-Math.cos(p*Math.PI)/2;
4435},
4436_default:"swing"
4437};
4438jQuery.fx=Tween.prototype.init;
4439jQuery.fx.step={};
4440var
4441fxNow,inProgress,
4442rfxtypes=/^(?:toggle|show|hide)$/,
4443rrun=/queueHooks$/;
4444function schedule(){
4445if(inProgress){
4446if(document.hidden===false&&window.requestAnimationFrame){
4447window.requestAnimationFrame(schedule);
4448}else{
4449window.setTimeout(schedule,jQuery.fx.interval);
4450}
4451jQuery.fx.tick();
4452}
4453}
4454function createFxNow(){
4455window.setTimeout(function(){
4456fxNow=undefined;
4457});
4458return(fxNow=Date.now());
4459}
4460function genFx(type,includeWidth){
4461var which,
4462i=0,
4463attrs={height:type};
4464includeWidth=includeWidth?1:0;
4465for(;i<4;i+=2-includeWidth){
4466which=cssExpand[i];
4467attrs["margin"+which]=attrs["padding"+which]=type;
4468}
4469if(includeWidth){
4470attrs.opacity=attrs.width=type;
4471}
4472return attrs;
4473}
4474function createTween(value,prop,animation){
4475var tween,
4476collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),
4477index=0,
4478length=collection.length;
4479for(;index<length;index++){
4480if((tween=collection[index].call(animation,prop,value))){
4481return tween;
4482}
4483}
4484}
4485function defaultPrefilter(elem,props,opts){
4486var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,
4487isBox="width"in props||"height"in props,
4488anim=this,
4489orig={},
4490style=elem.style,
4491hidden=elem.nodeType&&isHiddenWithinTree(elem),
4492dataShow=dataPriv.get(elem,"fxshow");
4493if(!opts.queue){
4494hooks=jQuery._queueHooks(elem,"fx");
4495if(hooks.unqueued==null){
4496hooks.unqueued=0;
4497oldfire=hooks.empty.fire;
4498hooks.empty.fire=function(){
4499if(!hooks.unqueued){
4500oldfire();
4501}
4502};
4503}
4504hooks.unqueued++;
4505anim.always(function(){
4506anim.always(function(){
4507hooks.unqueued--;
4508if(!jQuery.queue(elem,"fx").length){
4509hooks.empty.fire();
4510}
4511});
4512});
4513}
4514for(prop in props){
4515value=props[prop];
4516if(rfxtypes.test(value)){
4517delete props[prop];
4518toggle=toggle||value==="toggle";
4519if(value===(hidden?"hide":"show")){
4520if(value==="show"&&dataShow&&dataShow[prop]!==undefined){
4521hidden=true;
4522}else{
4523continue;
4524}
4525}
4526orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);
4527}
4528}
4529propTween=!jQuery.isEmptyObject(props);
4530if(!propTween&&jQuery.isEmptyObject(orig)){
4531return;
4532}
4533if(isBox&&elem.nodeType===1){
4534opts.overflow=[style.overflow,style.overflowX,style.overflowY];
4535restoreDisplay=dataShow&&dataShow.display;
4536if(restoreDisplay==null){
4537restoreDisplay=dataPriv.get(elem,"display");
4538}
4539display=jQuery.css(elem,"display");
4540if(display==="none"){
4541if(restoreDisplay){
4542display=restoreDisplay;
4543}else{
4544showHide([elem],true);
4545restoreDisplay=elem.style.display||restoreDisplay;
4546display=jQuery.css(elem,"display");
4547showHide([elem]);
4548}
4549}
4550if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){
4551if(jQuery.css(elem,"float")==="none"){
4552if(!propTween){
4553anim.done(function(){
4554style.display=restoreDisplay;
4555});
4556if(restoreDisplay==null){
4557display=style.display;
4558restoreDisplay=display==="none"?"":display;
4559}
4560}
4561style.display="inline-block";
4562}
4563}
4564}
4565if(opts.overflow){
4566style.overflow="hidden";
4567anim.always(function(){
4568style.overflow=opts.overflow[0];
4569style.overflowX=opts.overflow[1];
4570style.overflowY=opts.overflow[2];
4571});
4572}
4573propTween=false;
4574for(prop in orig){
4575if(!propTween){
4576if(dataShow){
4577if("hidden"in dataShow){
4578hidden=dataShow.hidden;
4579}
4580}else{
4581dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});
4582}
4583if(toggle){
4584dataShow.hidden=!hidden;
4585}
4586if(hidden){
4587showHide([elem],true);
4588}
4589anim.done(function(){
4590if(!hidden){
4591showHide([elem]);
4592}
4593dataPriv.remove(elem,"fxshow");
4594for(prop in orig){
4595jQuery.style(elem,prop,orig[prop]);
4596}
4597});
4598}
4599propTween=createTween(hidden?dataShow[prop]:0,prop,anim);
4600if(!(prop in dataShow)){
4601dataShow[prop]=propTween.start;
4602if(hidden){
4603propTween.end=propTween.start;
4604propTween.start=0;
4605}
4606}
4607}
4608}
4609function propFilter(props,specialEasing){
4610var index,name,easing,value,hooks;
4611for(index in props){
4612name=camelCase(index);
4613easing=specialEasing[name];
4614value=props[index];
4615if(Array.isArray(value)){
4616easing=value[1];
4617value=props[index]=value[0];
4618}
4619if(index!==name){
4620props[name]=value;
4621delete props[index];
4622}
4623hooks=jQuery.cssHooks[name];
4624if(hooks&&"expand"in hooks){
4625value=hooks.expand(value);
4626delete props[name];
4627for(index in value){
4628if(!(index in props)){
4629props[index]=value[index];
4630specialEasing[index]=easing;
4631}
4632}
4633}else{
4634specialEasing[name]=easing;
4635}
4636}
4637}
4638function Animation(elem,properties,options){
4639var result,
4640stopped,
4641index=0,
4642length=Animation.prefilters.length,
4643deferred=jQuery.Deferred().always(function(){
4644delete tick.elem;
4645}),
4646tick=function(){
4647if(stopped){
4648return false;
4649}
4650var currentTime=fxNow||createFxNow(),
4651remaining=Math.max(0,animation.startTime+animation.duration-currentTime),
4652temp=remaining/animation.duration||0,
4653percent=1-temp,
4654index=0,
4655length=animation.tweens.length;
4656for(;index<length;index++){
4657animation.tweens[index].run(percent);
4658}
4659deferred.notifyWith(elem,[animation,percent,remaining]);
4660if(percent<1&&length){
4661return remaining;
4662}
4663if(!length){
4664deferred.notifyWith(elem,[animation,1,0]);
4665}
4666deferred.resolveWith(elem,[animation]);
4667return false;
4668},
4669animation=deferred.promise({
4670elem:elem,
4671props:jQuery.extend({},properties),
4672opts:jQuery.extend(true,{
4673specialEasing:{},
4674easing:jQuery.easing._default
4675},options),
4676originalProperties:properties,
4677originalOptions:options,
4678startTime:fxNow||createFxNow(),
4679duration:options.duration,
4680tweens:[],
4681createTween:function(prop,end){
4682var tween=jQuery.Tween(elem,animation.opts,prop,end,
4683animation.opts.specialEasing[prop]||animation.opts.easing);
4684animation.tweens.push(tween);
4685return tween;
4686},
4687stop:function(gotoEnd){
4688var index=0,
4689length=gotoEnd?animation.tweens.length:0;
4690if(stopped){
4691return this;
4692}
4693stopped=true;
4694for(;index<length;index++){
4695animation.tweens[index].run(1);
4696}
4697if(gotoEnd){
4698deferred.notifyWith(elem,[animation,1,0]);
4699deferred.resolveWith(elem,[animation,gotoEnd]);
4700}else{
4701deferred.rejectWith(elem,[animation,gotoEnd]);
4702}
4703return this;
4704}
4705}),
4706props=animation.props;
4707propFilter(props,animation.opts.specialEasing);
4708for(;index<length;index++){
4709result=Animation.prefilters[index].call(animation,elem,props,animation.opts);
4710if(result){
4711if(isFunction(result.stop)){
4712jQuery._queueHooks(animation.elem,animation.opts.queue).stop=
4713result.stop.bind(result);
4714}
4715return result;
4716}
4717}
4718jQuery.map(props,createTween,animation);
4719if(isFunction(animation.opts.start)){
4720animation.opts.start.call(elem,animation);
4721}
4722animation
4723.progress(animation.opts.progress)
4724.done(animation.opts.done,animation.opts.complete)
4725.fail(animation.opts.fail)
4726.always(animation.opts.always);
4727jQuery.fx.timer(
4728jQuery.extend(tick,{
4729elem:elem,
4730anim:animation,
4731queue:animation.opts.queue
4732})
4733);
4734return animation;
4735}
4736jQuery.Animation=jQuery.extend(Animation,{
4737tweeners:{
4738"*":[function(prop,value){
4739var tween=this.createTween(prop,value);
4740adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);
4741return tween;
4742}]
4743},
4744tweener:function(props,callback){
4745if(isFunction(props)){
4746callback=props;
4747props=["*"];
4748}else{
4749props=props.match(rnothtmlwhite);
4750}
4751var prop,
4752index=0,
4753length=props.length;
4754for(;index<length;index++){
4755prop=props[index];
4756Animation.tweeners[prop]=Animation.tweeners[prop]||[];
4757Animation.tweeners[prop].unshift(callback);
4758}
4759},
4760prefilters:[defaultPrefilter],
4761prefilter:function(callback,prepend){
4762if(prepend){
4763Animation.prefilters.unshift(callback);
4764}else{
4765Animation.prefilters.push(callback);
4766}
4767}
4768});
4769jQuery.speed=function(speed,easing,fn){
4770var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{
4771complete:fn||!fn&&easing||
4772isFunction(speed)&&speed,
4773duration:speed,
4774easing:fn&&easing||easing&&!isFunction(easing)&&easing
4775};
4776if(jQuery.fx.off){
4777opt.duration=0;
4778}else{
4779if(typeof opt.duration!=="number"){
4780if(opt.duration in jQuery.fx.speeds){
4781opt.duration=jQuery.fx.speeds[opt.duration];
4782}else{
4783opt.duration=jQuery.fx.speeds._default;
4784}
4785}
4786}
4787if(opt.queue==null||opt.queue===true){
4788opt.queue="fx";
4789}
4790opt.old=opt.complete;
4791opt.complete=function(){
4792if(isFunction(opt.old)){
4793opt.old.call(this);
4794}
4795if(opt.queue){
4796jQuery.dequeue(this,opt.queue);
4797}
4798};
4799return opt;
4800};
4801jQuery.fn.extend({
4802fadeTo:function(speed,to,easing,callback){
4803return this.filter(isHiddenWithinTree).css("opacity",0).show()
4804.end().animate({opacity:to},speed,easing,callback);
4805},
4806animate:function(prop,speed,easing,callback){
4807var empty=jQuery.isEmptyObject(prop),
4808optall=jQuery.speed(speed,easing,callback),
4809doAnimation=function(){
4810var anim=Animation(this,jQuery.extend({},prop),optall);
4811if(empty||dataPriv.get(this,"finish")){
4812anim.stop(true);
4813}
4814};
4815doAnimation.finish=doAnimation;
4816return empty||optall.queue===false?
4817this.each(doAnimation):
4818this.queue(optall.queue,doAnimation);
4819},
4820stop:function(type,clearQueue,gotoEnd){
4821var stopQueue=function(hooks){
4822var stop=hooks.stop;
4823delete hooks.stop;
4824stop(gotoEnd);
4825};
4826if(typeof type!=="string"){
4827gotoEnd=clearQueue;
4828clearQueue=type;
4829type=undefined;
4830}
4831if(clearQueue){
4832this.queue(type||"fx",[]);
4833}
4834return this.each(function(){
4835var dequeue=true,
4836index=type!=null&&type+"queueHooks",
4837timers=jQuery.timers,
4838data=dataPriv.get(this);
4839if(index){
4840if(data[index]&&data[index].stop){
4841stopQueue(data[index]);
4842}
4843}else{
4844for(index in data){
4845if(data[index]&&data[index].stop&&rrun.test(index)){
4846stopQueue(data[index]);
4847}
4848}
4849}
4850for(index=timers.length;index--;){
4851if(timers[index].elem===this&&
4852(type==null||timers[index].queue===type)){
4853timers[index].anim.stop(gotoEnd);
4854dequeue=false;
4855timers.splice(index,1);
4856}
4857}
4858if(dequeue||!gotoEnd){
4859jQuery.dequeue(this,type);
4860}
4861});
4862},
4863finish:function(type){
4864if(type!==false){
4865type=type||"fx";
4866}
4867return this.each(function(){
4868var index,
4869data=dataPriv.get(this),
4870queue=data[type+"queue"],
4871hooks=data[type+"queueHooks"],
4872timers=jQuery.timers,
4873length=queue?queue.length:0;
4874data.finish=true;
4875jQuery.queue(this,type,[]);
4876if(hooks&&hooks.stop){
4877hooks.stop.call(this,true);
4878}
4879for(index=timers.length;index--;){
4880if(timers[index].elem===this&&timers[index].queue===type){
4881timers[index].anim.stop(true);
4882timers.splice(index,1);
4883}
4884}
4885for(index=0;index<length;index++){
4886if(queue[index]&&queue[index].finish){
4887queue[index].finish.call(this);
4888}
4889}
4890delete data.finish;
4891});
4892}
4893});
4894jQuery.each(["toggle","show","hide"],function(_i,name){
4895var cssFn=jQuery.fn[name];
4896jQuery.fn[name]=function(speed,easing,callback){
4897return speed==null||typeof speed==="boolean"?
4898cssFn.apply(this,arguments):
4899this.animate(genFx(name,true),speed,easing,callback);
4900};
4901});
4902jQuery.each({
4903slideDown:genFx("show"),
4904slideUp:genFx("hide"),
4905slideToggle:genFx("toggle"),
4906fadeIn:{opacity:"show"},
4907fadeOut:{opacity:"hide"},
4908fadeToggle:{opacity:"toggle"}
4909},function(name,props){
4910jQuery.fn[name]=function(speed,easing,callback){
4911return this.animate(props,speed,easing,callback);
4912};
4913});
4914jQuery.timers=[];
4915jQuery.fx.tick=function(){
4916var timer,
4917i=0,
4918timers=jQuery.timers;
4919fxNow=Date.now();
4920for(;i<timers.length;i++){
4921timer=timers[i];
4922if(!timer()&&timers[i]===timer){
4923timers.splice(i--,1);
4924}
4925}
4926if(!timers.length){
4927jQuery.fx.stop();
4928}
4929fxNow=undefined;
4930};
4931jQuery.fx.timer=function(timer){
4932jQuery.timers.push(timer);
4933jQuery.fx.start();
4934};
4935jQuery.fx.interval=13;
4936jQuery.fx.start=function(){
4937if(inProgress){
4938return;
4939}
4940inProgress=true;
4941schedule();
4942};
4943jQuery.fx.stop=function(){
4944inProgress=null;
4945};
4946jQuery.fx.speeds={
4947slow:600,
4948fast:200,
4949_default:400
4950};
4951jQuery.fn.delay=function(time,type){
4952time=jQuery.fx?jQuery.fx.speeds[time]||time:time;
4953type=type||"fx";
4954return this.queue(type,function(next,hooks){
4955var timeout=window.setTimeout(next,time);
4956hooks.stop=function(){
4957window.clearTimeout(timeout);
4958};
4959});
4960};
4961(function(){
4962var input=document.createElement("input"),
4963select=document.createElement("select"),
4964opt=select.appendChild(document.createElement("option"));
4965input.type="checkbox";
4966support.checkOn=input.value!=="";
4967support.optSelected=opt.selected;
4968input=document.createElement("input");
4969input.value="t";
4970input.type="radio";
4971support.radioValue=input.value==="t";
4972})();
4973var boolHook,
4974attrHandle=jQuery.expr.attrHandle;
4975jQuery.fn.extend({
4976attr:function(name,value){
4977return access(this,jQuery.attr,name,value,arguments.length>1);
4978},
4979removeAttr:function(name){
4980return this.each(function(){
4981jQuery.removeAttr(this,name);
4982});
4983}
4984});
4985jQuery.extend({
4986attr:function(elem,name,value){
4987var ret,hooks,
4988nType=elem.nodeType;
4989if(nType===3||nType===8||nType===2){
4990return;
4991}
4992if(typeof elem.getAttribute==="undefined"){
4993return jQuery.prop(elem,name,value);
4994}
4995if(nType!==1||!jQuery.isXMLDoc(elem)){
4996hooks=jQuery.attrHooks[name.toLowerCase()]||
4997(jQuery.expr.match.bool.test(name)?boolHook:undefined);
4998}
4999if(value!==undefined){
5000if(value===null){
5001jQuery.removeAttr(elem,name);
5002return;
5003}
5004if(hooks&&"set"in hooks&&
5005(ret=hooks.set(elem,value,name))!==undefined){
5006return ret;
5007}
5008elem.setAttribute(name,value+"");
5009return value;
5010}
5011if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){
5012return ret;
5013}
5014ret=jQuery.find.attr(elem,name);
5015return ret==null?undefined:ret;
5016},
5017attrHooks:{
5018type:{
5019set:function(elem,value){
5020if(!support.radioValue&&value==="radio"&&
5021nodeName(elem,"input")){
5022var val=elem.value;
5023elem.setAttribute("type",value);
5024if(val){
5025elem.value=val;
5026}
5027return value;
5028}
5029}
5030}
5031},
5032removeAttr:function(elem,value){
5033var name,
5034i=0,
5035attrNames=value&&value.match(rnothtmlwhite);
5036if(attrNames&&elem.nodeType===1){
5037while((name=attrNames[i++])){
5038elem.removeAttribute(name);
5039}
5040}
5041}
5042});
5043boolHook={
5044set:function(elem,value,name){
5045if(value===false){
5046jQuery.removeAttr(elem,name);
5047}else{
5048elem.setAttribute(name,name);
5049}
5050return name;
5051}
5052};
5053jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){
5054var getter=attrHandle[name]||jQuery.find.attr;
5055attrHandle[name]=function(elem,name,isXML){
5056var ret,handle,
5057lowercaseName=name.toLowerCase();
5058if(!isXML){
5059handle=attrHandle[lowercaseName];
5060attrHandle[lowercaseName]=ret;
5061ret=getter(elem,name,isXML)!=null?
5062lowercaseName:
5063null;
5064attrHandle[lowercaseName]=handle;
5065}
5066return ret;
5067};
5068});
5069var rfocusable=/^(?:input|select|textarea|button)$/i,
5070rclickable=/^(?:a|area)$/i;
5071jQuery.fn.extend({
5072prop:function(name,value){
5073return access(this,jQuery.prop,name,value,arguments.length>1);
5074},
5075removeProp:function(name){
5076return this.each(function(){
5077delete this[jQuery.propFix[name]||name];
5078});
5079}
5080});
5081jQuery.extend({
5082prop:function(elem,name,value){
5083var ret,hooks,
5084nType=elem.nodeType;
5085if(nType===3||nType===8||nType===2){
5086return;
5087}
5088if(nType!==1||!jQuery.isXMLDoc(elem)){
5089name=jQuery.propFix[name]||name;
5090hooks=jQuery.propHooks[name];
5091}
5092if(value!==undefined){
5093if(hooks&&"set"in hooks&&
5094(ret=hooks.set(elem,value,name))!==undefined){
5095return ret;
5096}
5097return(elem[name]=value);
5098}
5099if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){
5100return ret;
5101}
5102return elem[name];
5103},
5104propHooks:{
5105tabIndex:{
5106get:function(elem){
5107var tabindex=jQuery.find.attr(elem,"tabindex");
5108if(tabindex){
5109return parseInt(tabindex,10);
5110}
5111if(
5112rfocusable.test(elem.nodeName)||
5113rclickable.test(elem.nodeName)&&
5114elem.href
5115){
5116return 0;
5117}
5118return-1;
5119}
5120}
5121},
5122propFix:{
5123"for":"htmlFor",
5124"class":"className"
5125}
5126});
5127if(!support.optSelected){
5128jQuery.propHooks.selected={
5129get:function(elem){
5130var parent=elem.parentNode;
5131if(parent&&parent.parentNode){
5132parent.parentNode.selectedIndex;
5133}
5134return null;
5135},
5136set:function(elem){
5137var parent=elem.parentNode;
5138if(parent){
5139parent.selectedIndex;
5140if(parent.parentNode){
5141parent.parentNode.selectedIndex;
5142}
5143}
5144}
5145};
5146}
5147jQuery.each([
5148"tabIndex",
5149"readOnly",
5150"maxLength",
5151"cellSpacing",
5152"cellPadding",
5153"rowSpan",
5154"colSpan",
5155"useMap",
5156"frameBorder",
5157"contentEditable"
5158],function(){
5159jQuery.propFix[this.toLowerCase()]=this;
5160});
5161function stripAndCollapse(value){
5162var tokens=value.match(rnothtmlwhite)||[];
5163return tokens.join(" ");
5164}
5165function getClass(elem){
5166return elem.getAttribute&&elem.getAttribute("class")||"";
5167}
5168function classesToArray(value){
5169if(Array.isArray(value)){
5170return value;
5171}
5172if(typeof value==="string"){
5173return value.match(rnothtmlwhite)||[];
5174}
5175return[];
5176}
5177jQuery.fn.extend({
5178addClass:function(value){
5179var classNames,cur,curValue,className,i,finalValue;
5180if(isFunction(value)){
5181return this.each(function(j){
5182jQuery(this).addClass(value.call(this,j,getClass(this)));
5183});
5184}
5185classNames=classesToArray(value);
5186if(classNames.length){
5187return this.each(function(){
5188curValue=getClass(this);
5189cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");
5190if(cur){
5191for(i=0;i<classNames.length;i++){
5192className=classNames[i];
5193if(cur.indexOf(" "+className+" ")<0){
5194cur+=className+" ";
5195}
5196}
5197finalValue=stripAndCollapse(cur);
5198if(curValue!==finalValue){
5199this.setAttribute("class",finalValue);
5200}
5201}
5202});
5203}
5204return this;
5205},
5206removeClass:function(value){
5207var classNames,cur,curValue,className,i,finalValue;
5208if(isFunction(value)){
5209return this.each(function(j){
5210jQuery(this).removeClass(value.call(this,j,getClass(this)));
5211});
5212}
5213if(!arguments.length){
5214return this.attr("class","");
5215}
5216classNames=classesToArray(value);
5217if(classNames.length){
5218return this.each(function(){
5219curValue=getClass(this);
5220cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");
5221if(cur){
5222for(i=0;i<classNames.length;i++){
5223className=classNames[i];
5224while(cur.indexOf(" "+className+" ")>-1){
5225cur=cur.replace(" "+className+" "," ");
5226}
5227}
5228finalValue=stripAndCollapse(cur);
5229if(curValue!==finalValue){
5230this.setAttribute("class",finalValue);
5231}
5232}
5233});
5234}
5235return this;
5236},
5237toggleClass:function(value,stateVal){
5238var classNames,className,i,self,
5239type=typeof value,
5240isValidValue=type==="string"||Array.isArray(value);
5241if(isFunction(value)){
5242return this.each(function(i){
5243jQuery(this).toggleClass(
5244value.call(this,i,getClass(this),stateVal),
5245stateVal
5246);
5247});
5248}
5249if(typeof stateVal==="boolean"&&isValidValue){
5250return stateVal?this.addClass(value):this.removeClass(value);
5251}
5252classNames=classesToArray(value);
5253return this.each(function(){
5254if(isValidValue){
5255self=jQuery(this);
5256for(i=0;i<classNames.length;i++){
5257className=classNames[i];
5258if(self.hasClass(className)){
5259self.removeClass(className);
5260}else{
5261self.addClass(className);
5262}
5263}
5264}else if(value===undefined||type==="boolean"){
5265className=getClass(this);
5266if(className){
5267dataPriv.set(this,"__className__",className);
5268}
5269if(this.setAttribute){
5270this.setAttribute("class",
5271className||value===false?
5272"":
5273dataPriv.get(this,"__className__")||""
5274);
5275}
5276}
5277});
5278},
5279hasClass:function(selector){
5280var className,elem,
5281i=0;
5282className=" "+selector+" ";
5283while((elem=this[i++])){
5284if(elem.nodeType===1&&
5285(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){
5286return true;
5287}
5288}
5289return false;
5290}
5291});
5292var rreturn=/\r/g;
5293jQuery.fn.extend({
5294val:function(value){
5295var hooks,ret,valueIsFunction,
5296elem=this[0];
5297if(!arguments.length){
5298if(elem){
5299hooks=jQuery.valHooks[elem.type]||
5300jQuery.valHooks[elem.nodeName.toLowerCase()];
5301if(hooks&&
5302"get"in hooks&&
5303(ret=hooks.get(elem,"value"))!==undefined
5304){
5305return ret;
5306}
5307ret=elem.value;
5308if(typeof ret==="string"){
5309return ret.replace(rreturn,"");
5310}
5311return ret==null?"":ret;
5312}
5313return;
5314}
5315valueIsFunction=isFunction(value);
5316return this.each(function(i){
5317var val;
5318if(this.nodeType!==1){
5319return;
5320}
5321if(valueIsFunction){
5322val=value.call(this,i,jQuery(this).val());
5323}else{
5324val=value;
5325}
5326if(val==null){
5327val="";
5328}else if(typeof val==="number"){
5329val+="";
5330}else if(Array.isArray(val)){
5331val=jQuery.map(val,function(value){
5332return value==null?"":value+"";
5333});
5334}
5335hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];
5336if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){
5337this.value=val;
5338}
5339});
5340}
5341});
5342jQuery.extend({
5343valHooks:{
5344option:{
5345get:function(elem){
5346var val=jQuery.find.attr(elem,"value");
5347return val!=null?
5348val:
5349stripAndCollapse(jQuery.text(elem));
5350}
5351},
5352select:{
5353get:function(elem){
5354var value,option,i,
5355options=elem.options,
5356index=elem.selectedIndex,
5357one=elem.type==="select-one",
5358values=one?null:[],
5359max=one?index+1:options.length;
5360if(index<0){
5361i=max;
5362}else{
5363i=one?index:0;
5364}
5365for(;i<max;i++){
5366option=options[i];
5367if((option.selected||i===index)&&
5368!option.disabled&&
5369(!option.parentNode.disabled||
5370!nodeName(option.parentNode,"optgroup"))){
5371value=jQuery(option).val();
5372if(one){
5373return value;
5374}
5375values.push(value);
5376}
5377}
5378return values;
5379},
5380set:function(elem,value){
5381var optionSet,option,
5382options=elem.options,
5383values=jQuery.makeArray(value),
5384i=options.length;
5385while(i--){
5386option=options[i];
5387if(option.selected=
5388jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1
5389){
5390optionSet=true;
5391}
5392}
5393if(!optionSet){
5394elem.selectedIndex=-1;
5395}
5396return values;
5397}
5398}
5399}
5400});
5401jQuery.each(["radio","checkbox"],function(){
5402jQuery.valHooks[this]={
5403set:function(elem,value){
5404if(Array.isArray(value)){
5405return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1);
5406}
5407}
5408};
5409if(!support.checkOn){
5410jQuery.valHooks[this].get=function(elem){
5411return elem.getAttribute("value")===null?"on":elem.value;
5412};
5413}
5414});
5415var location=window.location;
5416var nonce={guid:Date.now()};
5417var rquery=(/\?/);
5418jQuery.parseXML=function(data){
5419var xml,parserErrorElem;
5420if(!data||typeof data!=="string"){
5421return null;
5422}
5423try{
5424xml=(new window.DOMParser()).parseFromString(data,"text/xml");
5425}catch(e){}
5426parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0];
5427if(!xml||parserErrorElem){
5428jQuery.error("Invalid XML: "+(
5429parserErrorElem?
5430jQuery.map(parserErrorElem.childNodes,function(el){
5431return el.textContent;
5432}).join("\n"):
5433data
5434));
5435}
5436return xml;
5437};
5438var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,
5439stopPropagationCallback=function(e){
5440e.stopPropagation();
5441};
5442jQuery.extend(jQuery.event,{
5443trigger:function(event,data,elem,onlyHandlers){
5444var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,
5445eventPath=[elem||document],
5446type=hasOwn.call(event,"type")?event.type:event,
5447namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];
5448cur=lastElement=tmp=elem=elem||document;
5449if(elem.nodeType===3||elem.nodeType===8){
5450return;
5451}
5452if(rfocusMorph.test(type+jQuery.event.triggered)){
5453return;
5454}
5455if(type.indexOf(".")>-1){
5456namespaces=type.split(".");
5457type=namespaces.shift();
5458namespaces.sort();
5459}
5460ontype=type.indexOf(":")<0&&"on"+type;
5461event=event[jQuery.expando]?
5462event:
5463new jQuery.Event(type,typeof event==="object"&&event);
5464event.isTrigger=onlyHandlers?2:3;
5465event.namespace=namespaces.join(".");
5466event.rnamespace=event.namespace?
5467new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):
5468null;
5469event.result=undefined;
5470if(!event.target){
5471event.target=elem;
5472}
5473data=data==null?
5474[event]:
5475jQuery.makeArray(data,[event]);
5476special=jQuery.event.special[type]||{};
5477if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){
5478return;
5479}
5480if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){
5481bubbleType=special.delegateType||type;
5482if(!rfocusMorph.test(bubbleType+type)){
5483cur=cur.parentNode;
5484}
5485for(;cur;cur=cur.parentNode){
5486eventPath.push(cur);
5487tmp=cur;
5488}
5489if(tmp===(elem.ownerDocument||document)){
5490eventPath.push(tmp.defaultView||tmp.parentWindow||window);
5491}
5492}
5493i=0;
5494while((cur=eventPath[i++])&&!event.isPropagationStopped()){
5495lastElement=cur;
5496event.type=i>1?
5497bubbleType:
5498special.bindType||type;
5499handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&
5500dataPriv.get(cur,"handle");
5501if(handle){
5502handle.apply(cur,data);
5503}
5504handle=ontype&&cur[ontype];
5505if(handle&&handle.apply&&acceptData(cur)){
5506event.result=handle.apply(cur,data);
5507if(event.result===false){
5508event.preventDefault();
5509}
5510}
5511}
5512event.type=type;
5513if(!onlyHandlers&&!event.isDefaultPrevented()){
5514if((!special._default||
5515special._default.apply(eventPath.pop(),data)===false)&&
5516acceptData(elem)){
5517if(ontype&&isFunction(elem[type])&&!isWindow(elem)){
5518tmp=elem[ontype];
5519if(tmp){
5520elem[ontype]=null;
5521}
5522jQuery.event.triggered=type;
5523if(event.isPropagationStopped()){
5524lastElement.addEventListener(type,stopPropagationCallback);
5525}
5526elem[type]();
5527if(event.isPropagationStopped()){
5528lastElement.removeEventListener(type,stopPropagationCallback);
5529}
5530jQuery.event.triggered=undefined;
5531if(tmp){
5532elem[ontype]=tmp;
5533}
5534}
5535}
5536}
5537return event.result;
5538},
5539simulate:function(type,elem,event){
5540var e=jQuery.extend(
5541new jQuery.Event(),
5542event,
5543{
5544type:type,
5545isSimulated:true
5546}
5547);
5548jQuery.event.trigger(e,null,elem);
5549}
5550});
5551jQuery.fn.extend({
5552trigger:function(type,data){
5553return this.each(function(){
5554jQuery.event.trigger(type,data,this);
5555});
5556},
5557triggerHandler:function(type,data){
5558var elem=this[0];
5559if(elem){
5560return jQuery.event.trigger(type,data,elem,true);
5561}
5562}
5563});
5564var
5565rbracket=/\[\]$/,
5566rCRLF=/\r?\n/g,
5567rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,
5568rsubmittable=/^(?:input|select|textarea|keygen)/i;
5569function buildParams(prefix,obj,traditional,add){
5570var name;
5571if(Array.isArray(obj)){
5572jQuery.each(obj,function(i,v){
5573if(traditional||rbracket.test(prefix)){
5574add(prefix,v);
5575}else{
5576buildParams(
5577prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",
5578v,
5579traditional,
5580add
5581);
5582}
5583});
5584}else if(!traditional&&toType(obj)==="object"){
5585for(name in obj){
5586buildParams(prefix+"["+name+"]",obj[name],traditional,add);
5587}
5588}else{
5589add(prefix,obj);
5590}
5591}
5592jQuery.param=function(a,traditional){
5593var prefix,
5594s=[],
5595add=function(key,valueOrFunction){
5596var value=isFunction(valueOrFunction)?
5597valueOrFunction():
5598valueOrFunction;
5599s[s.length]=encodeURIComponent(key)+"="+
5600encodeURIComponent(value==null?"":value);
5601};
5602if(a==null){
5603return"";
5604}
5605if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){
5606jQuery.each(a,function(){
5607add(this.name,this.value);
5608});
5609}else{
5610for(prefix in a){
5611buildParams(prefix,a[prefix],traditional,add);
5612}
5613}
5614return s.join("&");
5615};
5616jQuery.fn.extend({
5617serialize:function(){
5618return jQuery.param(this.serializeArray());
5619},
5620serializeArray:function(){
5621return this.map(function(){
5622var elements=jQuery.prop(this,"elements");
5623return elements?jQuery.makeArray(elements):this;
5624}).filter(function(){
5625var type=this.type;
5626return this.name&&!jQuery(this).is(":disabled")&&
5627rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&
5628(this.checked||!rcheckableType.test(type));
5629}).map(function(_i,elem){
5630var val=jQuery(this).val();
5631if(val==null){
5632return null;
5633}
5634if(Array.isArray(val)){
5635return jQuery.map(val,function(val){
5636return{name:elem.name,value:val.replace(rCRLF,"\r\n")};
5637});
5638}
5639return{name:elem.name,value:val.replace(rCRLF,"\r\n")};
5640}).get();
5641}
5642});
5643var
5644r20=/%20/g,
5645rhash=/#.*$/,
5646rantiCache=/([?&])_=[^&]*/,
5647rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,
5648rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
5649rnoContent=/^(?:GET|HEAD)$/,
5650rprotocol=/^\/\//,
5651prefilters={},
5652transports={},
5653allTypes="*/".concat("*"),
5654originAnchor=document.createElement("a");
5655originAnchor.href=location.href;
5656function addToPrefiltersOrTransports(structure){
5657return function(dataTypeExpression,func){
5658if(typeof dataTypeExpression!=="string"){
5659func=dataTypeExpression;
5660dataTypeExpression="*";
5661}
5662var dataType,
5663i=0,
5664dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];
5665if(isFunction(func)){
5666while((dataType=dataTypes[i++])){
5667if(dataType[0]==="+"){
5668dataType=dataType.slice(1)||"*";
5669(structure[dataType]=structure[dataType]||[]).unshift(func);
5670}else{
5671(structure[dataType]=structure[dataType]||[]).push(func);
5672}
5673}
5674}
5675};
5676}
5677function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){
5678var inspected={},
5679seekingTransport=(structure===transports);
5680function inspect(dataType){
5681var selected;
5682inspected[dataType]=true;
5683jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){
5684var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);
5685if(typeof dataTypeOrTransport==="string"&&
5686!seekingTransport&&!inspected[dataTypeOrTransport]){
5687options.dataTypes.unshift(dataTypeOrTransport);
5688inspect(dataTypeOrTransport);
5689return false;
5690}else if(seekingTransport){
5691return!(selected=dataTypeOrTransport);
5692}
5693});
5694return selected;
5695}
5696return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");
5697}
5698function ajaxExtend(target,src){
5699var key,deep,
5700flatOptions=jQuery.ajaxSettings.flatOptions||{};
5701for(key in src){
5702if(src[key]!==undefined){
5703(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];
5704}
5705}
5706if(deep){
5707jQuery.extend(true,target,deep);
5708}
5709return target;
5710}
5711function ajaxHandleResponses(s,jqXHR,responses){
5712var ct,type,finalDataType,firstDataType,
5713contents=s.contents,
5714dataTypes=s.dataTypes;
5715while(dataTypes[0]==="*"){
5716dataTypes.shift();
5717if(ct===undefined){
5718ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");
5719}
5720}
5721if(ct){
5722for(type in contents){
5723if(contents[type]&&contents[type].test(ct)){
5724dataTypes.unshift(type);
5725break;
5726}
5727}
5728}
5729if(dataTypes[0]in responses){
5730finalDataType=dataTypes[0];
5731}else{
5732for(type in responses){
5733if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){
5734finalDataType=type;
5735break;
5736}
5737if(!firstDataType){
5738firstDataType=type;
5739}
5740}
5741finalDataType=finalDataType||firstDataType;
5742}
5743if(finalDataType){
5744if(finalDataType!==dataTypes[0]){
5745dataTypes.unshift(finalDataType);
5746}
5747return responses[finalDataType];
5748}
5749}
5750function ajaxConvert(s,response,jqXHR,isSuccess){
5751var conv2,current,conv,tmp,prev,
5752converters={},
5753dataTypes=s.dataTypes.slice();
5754if(dataTypes[1]){
5755for(conv in s.converters){
5756converters[conv.toLowerCase()]=s.converters[conv];
5757}
5758}
5759current=dataTypes.shift();
5760while(current){
5761if(s.responseFields[current]){
5762jqXHR[s.responseFields[current]]=response;
5763}
5764if(!prev&&isSuccess&&s.dataFilter){
5765response=s.dataFilter(response,s.dataType);
5766}
5767prev=current;
5768current=dataTypes.shift();
5769if(current){
5770if(current==="*"){
5771current=prev;
5772}else if(prev!=="*"&&prev!==current){
5773conv=converters[prev+" "+current]||converters["* "+current];
5774if(!conv){
5775for(conv2 in converters){
5776tmp=conv2.split(" ");
5777if(tmp[1]===current){
5778conv=converters[prev+" "+tmp[0]]||
5779converters["* "+tmp[0]];
5780if(conv){
5781if(conv===true){
5782conv=converters[conv2];
5783}else if(converters[conv2]!==true){
5784current=tmp[0];
5785dataTypes.unshift(tmp[1]);
5786}
5787break;
5788}
5789}
5790}
5791}
5792if(conv!==true){
5793if(conv&&s.throws){
5794response=conv(response);
5795}else{
5796try{
5797response=conv(response);
5798}catch(e){
5799return{
5800state:"parsererror",
5801error:conv?e:"No conversion from "+prev+" to "+current
5802};
5803}
5804}
5805}
5806}
5807}
5808}
5809return{state:"success",data:response};
5810}
5811jQuery.extend({
5812active:0,
5813lastModified:{},
5814etag:{},
5815ajaxSettings:{
5816url:location.href,
5817type:"GET",
5818isLocal:rlocalProtocol.test(location.protocol),
5819global:true,
5820processData:true,
5821async:true,
5822contentType:"application/x-www-form-urlencoded; charset=UTF-8",
5823accepts:{
5824"*":allTypes,
5825text:"text/plain",
5826html:"text/html",
5827xml:"application/xml, text/xml",
5828json:"application/json, text/javascript"
5829},
5830contents:{
5831xml:/\bxml\b/,
5832html:/\bhtml/,
5833json:/\bjson\b/
5834},
5835responseFields:{
5836xml:"responseXML",
5837text:"responseText",
5838json:"responseJSON"
5839},
5840converters:{
5841"* text":String,
5842"text html":true,
5843"text json":JSON.parse,
5844"text xml":jQuery.parseXML
5845},
5846flatOptions:{
5847url:true,
5848context:true
5849}
5850},
5851ajaxSetup:function(target,settings){
5852return settings?
5853ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):
5854ajaxExtend(jQuery.ajaxSettings,target);
5855},
5856ajaxPrefilter:addToPrefiltersOrTransports(prefilters),
5857ajaxTransport:addToPrefiltersOrTransports(transports),
5858ajax:function(url,options){
5859if(typeof url==="object"){
5860options=url;
5861url=undefined;
5862}
5863options=options||{};
5864var transport,
5865cacheURL,
5866responseHeadersString,
5867responseHeaders,
5868timeoutTimer,
5869urlAnchor,
5870completed,
5871fireGlobals,
5872i,
5873uncached,
5874s=jQuery.ajaxSetup({},options),
5875callbackContext=s.context||s,
5876globalEventContext=s.context&&
5877(callbackContext.nodeType||callbackContext.jquery)?
5878jQuery(callbackContext):
5879jQuery.event,
5880deferred=jQuery.Deferred(),
5881completeDeferred=jQuery.Callbacks("once memory"),
5882statusCode=s.statusCode||{},
5883requestHeaders={},
5884requestHeadersNames={},
5885strAbort="canceled",
5886jqXHR={
5887readyState:0,
5888getResponseHeader:function(key){
5889var match;
5890if(completed){
5891if(!responseHeaders){
5892responseHeaders={};
5893while((match=rheaders.exec(responseHeadersString))){
5894responseHeaders[match[1].toLowerCase()+" "]=
5895(responseHeaders[match[1].toLowerCase()+" "]||[])
5896.concat(match[2]);
5897}
5898}
5899match=responseHeaders[key.toLowerCase()+" "];
5900}
5901return match==null?null:match.join(", ");
5902},
5903getAllResponseHeaders:function(){
5904return completed?responseHeadersString:null;
5905},
5906setRequestHeader:function(name,value){
5907if(completed==null){
5908name=requestHeadersNames[name.toLowerCase()]=
5909requestHeadersNames[name.toLowerCase()]||name;
5910requestHeaders[name]=value;
5911}
5912return this;
5913},
5914overrideMimeType:function(type){
5915if(completed==null){
5916s.mimeType=type;
5917}
5918return this;
5919},
5920statusCode:function(map){
5921var code;
5922if(map){
5923if(completed){
5924jqXHR.always(map[jqXHR.status]);
5925}else{
5926for(code in map){
5927statusCode[code]=[statusCode[code],map[code]];
5928}
5929}
5930}
5931return this;
5932},
5933abort:function(statusText){
5934var finalText=statusText||strAbort;
5935if(transport){
5936transport.abort(finalText);
5937}
5938done(0,finalText);
5939return this;
5940}
5941};
5942deferred.promise(jqXHR);
5943s.url=((url||s.url||location.href)+"")
5944.replace(rprotocol,location.protocol+"//");
5945s.type=options.method||options.type||s.method||s.type;
5946s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];
5947if(s.crossDomain==null){
5948urlAnchor=document.createElement("a");
5949try{
5950urlAnchor.href=s.url;
5951urlAnchor.href=urlAnchor.href;
5952s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==
5953urlAnchor.protocol+"//"+urlAnchor.host;
5954}catch(e){
5955s.crossDomain=true;
5956}
5957}
5958if(s.data&&s.processData&&typeof s.data!=="string"){
5959s.data=jQuery.param(s.data,s.traditional);
5960}
5961inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);
5962if(completed){
5963return jqXHR;
5964}
5965fireGlobals=jQuery.event&&s.global;
5966if(fireGlobals&&jQuery.active++===0){
5967jQuery.event.trigger("ajaxStart");
5968}
5969s.type=s.type.toUpperCase();
5970s.hasContent=!rnoContent.test(s.type);
5971cacheURL=s.url.replace(rhash,"");
5972if(!s.hasContent){
5973uncached=s.url.slice(cacheURL.length);
5974if(s.data&&(s.processData||typeof s.data==="string")){
5975cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;
5976delete s.data;
5977}
5978if(s.cache===false){
5979cacheURL=cacheURL.replace(rantiCache,"$1");
5980uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce.guid++)+
5981uncached;
5982}
5983s.url=cacheURL+uncached;
5984}else if(s.data&&s.processData&&
5985(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){
5986s.data=s.data.replace(r20,"+");
5987}
5988if(s.ifModified){
5989if(jQuery.lastModified[cacheURL]){
5990jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);
5991}
5992if(jQuery.etag[cacheURL]){
5993jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);
5994}
5995}
5996if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){
5997jqXHR.setRequestHeader("Content-Type",s.contentType);
5998}
5999jqXHR.setRequestHeader(
6000"Accept",
6001s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?
6002s.accepts[s.dataTypes[0]]+
6003(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):
6004s.accepts["*"]
6005);
6006for(i in s.headers){
6007jqXHR.setRequestHeader(i,s.headers[i]);
6008}
6009if(s.beforeSend&&
6010(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){
6011return jqXHR.abort();
6012}
6013strAbort="abort";
6014completeDeferred.add(s.complete);
6015jqXHR.done(s.success);
6016jqXHR.fail(s.error);
6017transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);
6018if(!transport){
6019done(-1,"No Transport");
6020}else{
6021jqXHR.readyState=1;
6022if(fireGlobals){
6023globalEventContext.trigger("ajaxSend",[jqXHR,s]);
6024}
6025if(completed){
6026return jqXHR;
6027}
6028if(s.async&&s.timeout>0){
6029timeoutTimer=window.setTimeout(function(){
6030jqXHR.abort("timeout");
6031},s.timeout);
6032}
6033try{
6034completed=false;
6035transport.send(requestHeaders,done);
6036}catch(e){
6037if(completed){
6038throw e;
6039}
6040done(-1,e);
6041}
6042}
6043function done(status,nativeStatusText,responses,headers){
6044var isSuccess,success,error,response,modified,
6045statusText=nativeStatusText;
6046if(completed){
6047return;
6048}
6049completed=true;
6050if(timeoutTimer){
6051window.clearTimeout(timeoutTimer);
6052}
6053transport=undefined;
6054responseHeadersString=headers||"";
6055jqXHR.readyState=status>0?4:0;
6056isSuccess=status>=200&&status<300||status===304;
6057if(responses){
6058response=ajaxHandleResponses(s,jqXHR,responses);
6059}
6060if(!isSuccess&&
6061jQuery.inArray("script",s.dataTypes)>-1&&
6062jQuery.inArray("json",s.dataTypes)<0){
6063s.converters["text script"]=function(){};
6064}
6065response=ajaxConvert(s,response,jqXHR,isSuccess);
6066if(isSuccess){
6067if(s.ifModified){
6068modified=jqXHR.getResponseHeader("Last-Modified");
6069if(modified){
6070jQuery.lastModified[cacheURL]=modified;
6071}
6072modified=jqXHR.getResponseHeader("etag");
6073if(modified){
6074jQuery.etag[cacheURL]=modified;
6075}
6076}
6077if(status===204||s.type==="HEAD"){
6078statusText="nocontent";
6079}else if(status===304){
6080statusText="notmodified";
6081}else{
6082statusText=response.state;
6083success=response.data;
6084error=response.error;
6085isSuccess=!error;
6086}
6087}else{
6088error=statusText;
6089if(status||!statusText){
6090statusText="error";
6091if(status<0){
6092status=0;
6093}
6094}
6095}
6096jqXHR.status=status;
6097jqXHR.statusText=(nativeStatusText||statusText)+"";
6098if(isSuccess){
6099deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);
6100}else{
6101deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);
6102}
6103jqXHR.statusCode(statusCode);
6104statusCode=undefined;
6105if(fireGlobals){
6106globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",
6107[jqXHR,s,isSuccess?success:error]);
6108}
6109completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);
6110if(fireGlobals){
6111globalEventContext.trigger("ajaxComplete",[jqXHR,s]);
6112if(!(--jQuery.active)){
6113jQuery.event.trigger("ajaxStop");
6114}
6115}
6116}
6117return jqXHR;
6118},
6119getJSON:function(url,data,callback){
6120return jQuery.get(url,data,callback,"json");
6121},
6122getScript:function(url,callback){
6123return jQuery.get(url,undefined,callback,"script");
6124}
6125});
6126jQuery.each(["get","post"],function(_i,method){
6127jQuery[method]=function(url,data,callback,type){
6128if(isFunction(data)){
6129type=type||callback;
6130callback=data;
6131data=undefined;
6132}
6133return jQuery.ajax(jQuery.extend({
6134url:url,
6135type:method,
6136dataType:type,
6137data:data,
6138success:callback
6139},jQuery.isPlainObject(url)&&url));
6140};
6141});
6142jQuery.ajaxPrefilter(function(s){
6143var i;
6144for(i in s.headers){
6145if(i.toLowerCase()==="content-type"){
6146s.contentType=s.headers[i]||"";
6147}
6148}
6149});
6150jQuery._evalUrl=function(url,options,doc){
6151return jQuery.ajax({
6152url:url,
6153type:"GET",
6154dataType:"script",
6155cache:true,
6156async:false,
6157global:false,
6158converters:{
6159"text script":function(){}
6160},
6161dataFilter:function(response){
6162jQuery.globalEval(response,options,doc);
6163}
6164});
6165};
6166jQuery.fn.extend({
6167wrapAll:function(html){
6168var wrap;
6169if(this[0]){
6170if(isFunction(html)){
6171html=html.call(this[0]);
6172}
6173wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);
6174if(this[0].parentNode){
6175wrap.insertBefore(this[0]);
6176}
6177wrap.map(function(){
6178var elem=this;
6179while(elem.firstElementChild){
6180elem=elem.firstElementChild;
6181}
6182return elem;
6183}).append(this);
6184}
6185return this;
6186},
6187wrapInner:function(html){
6188if(isFunction(html)){
6189return this.each(function(i){
6190jQuery(this).wrapInner(html.call(this,i));
6191});
6192}
6193return this.each(function(){
6194var self=jQuery(this),
6195contents=self.contents();
6196if(contents.length){
6197contents.wrapAll(html);
6198}else{
6199self.append(html);
6200}
6201});
6202},
6203wrap:function(html){
6204var htmlIsFunction=isFunction(html);
6205return this.each(function(i){
6206jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);
6207});
6208},
6209unwrap:function(selector){
6210this.parent(selector).not("body").each(function(){
6211jQuery(this).replaceWith(this.childNodes);
6212});
6213return this;
6214}
6215});
6216jQuery.expr.pseudos.hidden=function(elem){
6217return!jQuery.expr.pseudos.visible(elem);
6218};
6219jQuery.expr.pseudos.visible=function(elem){
6220return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);
6221};
6222jQuery.ajaxSettings.xhr=function(){
6223try{
6224return new window.XMLHttpRequest();
6225}catch(e){}
6226};
6227var xhrSuccessStatus={
62280:200,
62291223:204
6230},
6231xhrSupported=jQuery.ajaxSettings.xhr();
6232support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);
6233support.ajax=xhrSupported=!!xhrSupported;
6234jQuery.ajaxTransport(function(options){
6235var callback,errorCallback;
6236if(support.cors||xhrSupported&&!options.crossDomain){
6237return{
6238send:function(headers,complete){
6239var i,
6240xhr=options.xhr();
6241xhr.open(
6242options.type,
6243options.url,
6244options.async,
6245options.username,
6246options.password
6247);
6248if(options.xhrFields){
6249for(i in options.xhrFields){
6250xhr[i]=options.xhrFields[i];
6251}
6252}
6253if(options.mimeType&&xhr.overrideMimeType){
6254xhr.overrideMimeType(options.mimeType);
6255}
6256if(!options.crossDomain&&!headers["X-Requested-With"]){
6257headers["X-Requested-With"]="XMLHttpRequest";
6258}
6259for(i in headers){
6260xhr.setRequestHeader(i,headers[i]);
6261}
6262callback=function(type){
6263return function(){
6264if(callback){
6265callback=errorCallback=xhr.onload=
6266xhr.onerror=xhr.onabort=xhr.ontimeout=
6267xhr.onreadystatechange=null;
6268if(type==="abort"){
6269xhr.abort();
6270}else if(type==="error"){
6271if(typeof xhr.status!=="number"){
6272complete(0,"error");
6273}else{
6274complete(
6275xhr.status,
6276xhr.statusText
6277);
6278}
6279}else{
6280complete(
6281xhrSuccessStatus[xhr.status]||xhr.status,
6282xhr.statusText,
6283(xhr.responseType||"text")!=="text"||
6284typeof xhr.responseText!=="string"?
6285{binary:xhr.response}:
6286{text:xhr.responseText},
6287xhr.getAllResponseHeaders()
6288);
6289}
6290}
6291};
6292};
6293xhr.onload=callback();
6294errorCallback=xhr.onerror=xhr.ontimeout=callback("error");
6295if(xhr.onabort!==undefined){
6296xhr.onabort=errorCallback;
6297}else{
6298xhr.onreadystatechange=function(){
6299if(xhr.readyState===4){
6300window.setTimeout(function(){
6301if(callback){
6302errorCallback();
6303}
6304});
6305}
6306};
6307}
6308callback=callback("abort");
6309try{
6310xhr.send(options.hasContent&&options.data||null);
6311}catch(e){
6312if(callback){
6313throw e;
6314}
6315}
6316},
6317abort:function(){
6318if(callback){
6319callback();
6320}
6321}
6322};
6323}
6324});
6325jQuery.ajaxPrefilter(function(s){
6326if(s.crossDomain){
6327s.contents.script=false;
6328}
6329});
6330jQuery.ajaxSetup({
6331accepts:{
6332script:"text/javascript, application/javascript, "+
6333"application/ecmascript, application/x-ecmascript"
6334},
6335contents:{
6336script:/\b(?:java|ecma)script\b/
6337},
6338converters:{
6339"text script":function(text){
6340jQuery.globalEval(text);
6341return text;
6342}
6343}
6344});
6345jQuery.ajaxPrefilter("script",function(s){
6346if(s.cache===undefined){
6347s.cache=false;
6348}
6349if(s.crossDomain){
6350s.type="GET";
6351}
6352});
6353jQuery.ajaxTransport("script",function(s){
6354if(s.crossDomain||s.scriptAttrs){
6355var script,callback;
6356return{
6357send:function(_,complete){
6358script=jQuery("<script>")
6359.attr(s.scriptAttrs||{})
6360.prop({charset:s.scriptCharset,src:s.url})
6361.on("load error",callback=function(evt){
6362script.remove();
6363callback=null;
6364if(evt){
6365complete(evt.type==="error"?404:200,evt.type);
6366}
6367});
6368document.head.appendChild(script[0]);
6369},
6370abort:function(){
6371if(callback){
6372callback();
6373}
6374}
6375};
6376}
6377});
6378var oldCallbacks=[],
6379rjsonp=/(=)\?(?=&|$)|\?\?/;
6380jQuery.ajaxSetup({
6381jsonp:"callback",
6382jsonpCallback:function(){
6383var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce.guid++));
6384this[callback]=true;
6385return callback;
6386}
6387});
6388jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){
6389var callbackName,overwritten,responseContainer,
6390jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?
6391"url":
6392typeof s.data==="string"&&
6393(s.contentType||"")
6394.indexOf("application/x-www-form-urlencoded")===0&&
6395rjsonp.test(s.data)&&"data"
6396);
6397if(jsonProp||s.dataTypes[0]==="jsonp"){
6398callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?
6399s.jsonpCallback():
6400s.jsonpCallback;
6401if(jsonProp){
6402s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);
6403}else if(s.jsonp!==false){
6404s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;
6405}
6406s.converters["script json"]=function(){
6407if(!responseContainer){
6408jQuery.error(callbackName+" was not called");
6409}
6410return responseContainer[0];
6411};
6412s.dataTypes[0]="json";
6413overwritten=window[callbackName];
6414window[callbackName]=function(){
6415responseContainer=arguments;
6416};
6417jqXHR.always(function(){
6418if(overwritten===undefined){
6419jQuery(window).removeProp(callbackName);
6420}else{
6421window[callbackName]=overwritten;
6422}
6423if(s[callbackName]){
6424s.jsonpCallback=originalSettings.jsonpCallback;
6425oldCallbacks.push(callbackName);
6426}
6427if(responseContainer&&isFunction(overwritten)){
6428overwritten(responseContainer[0]);
6429}
6430responseContainer=overwritten=undefined;
6431});
6432return"script";
6433}
6434});
6435support.createHTMLDocument=(function(){
6436var body=document.implementation.createHTMLDocument("").body;
6437body.innerHTML="<form></form><form></form>";
6438return body.childNodes.length===2;
6439})();
6440jQuery.parseHTML=function(data,context,keepScripts){
6441if(typeof data!=="string"){
6442return[];
6443}
6444if(typeof context==="boolean"){
6445keepScripts=context;
6446context=false;
6447}
6448var base,parsed,scripts;
6449if(!context){
6450if(support.createHTMLDocument){
6451context=document.implementation.createHTMLDocument("");
6452base=context.createElement("base");
6453base.href=document.location.href;
6454context.head.appendChild(base);
6455}else{
6456context=document;
6457}
6458}
6459parsed=rsingleTag.exec(data);
6460scripts=!keepScripts&&[];
6461if(parsed){
6462return[context.createElement(parsed[1])];
6463}
6464parsed=buildFragment([data],context,scripts);
6465if(scripts&&scripts.length){
6466jQuery(scripts).remove();
6467}
6468return jQuery.merge([],parsed.childNodes);
6469};
6470jQuery.fn.load=function(url,params,callback){
6471var selector,type,response,
6472self=this,
6473off=url.indexOf(" ");
6474if(off>-1){
6475selector=stripAndCollapse(url.slice(off));
6476url=url.slice(0,off);
6477}
6478if(isFunction(params)){
6479callback=params;
6480params=undefined;
6481}else if(params&&typeof params==="object"){
6482type="POST";
6483}
6484if(self.length>0){
6485jQuery.ajax({
6486url:url,
6487type:type||"GET",
6488dataType:"html",
6489data:params
6490}).done(function(responseText){
6491response=arguments;
6492self.html(selector?
6493jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):
6494responseText);
6495}).always(callback&&function(jqXHR,status){
6496self.each(function(){
6497callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);
6498});
6499});
6500}
6501return this;
6502};
6503jQuery.expr.pseudos.animated=function(elem){
6504return jQuery.grep(jQuery.timers,function(fn){
6505return elem===fn.elem;
6506}).length;
6507};
6508jQuery.offset={
6509setOffset:function(elem,options,i){
6510var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,
6511position=jQuery.css(elem,"position"),
6512curElem=jQuery(elem),
6513props={};
6514if(position==="static"){
6515elem.style.position="relative";
6516}
6517curOffset=curElem.offset();
6518curCSSTop=jQuery.css(elem,"top");
6519curCSSLeft=jQuery.css(elem,"left");
6520calculatePosition=(position==="absolute"||position==="fixed")&&
6521(curCSSTop+curCSSLeft).indexOf("auto")>-1;
6522if(calculatePosition){
6523curPosition=curElem.position();
6524curTop=curPosition.top;
6525curLeft=curPosition.left;
6526}else{
6527curTop=parseFloat(curCSSTop)||0;
6528curLeft=parseFloat(curCSSLeft)||0;
6529}
6530if(isFunction(options)){
6531options=options.call(elem,i,jQuery.extend({},curOffset));
6532}
6533if(options.top!=null){
6534props.top=(options.top-curOffset.top)+curTop;
6535}
6536if(options.left!=null){
6537props.left=(options.left-curOffset.left)+curLeft;
6538}
6539if("using"in options){
6540options.using.call(elem,props);
6541}else{
6542curElem.css(props);
6543}
6544}
6545};
6546jQuery.fn.extend({
6547offset:function(options){
6548if(arguments.length){
6549return options===undefined?
6550this:
6551this.each(function(i){
6552jQuery.offset.setOffset(this,options,i);
6553});
6554}
6555var rect,win,
6556elem=this[0];
6557if(!elem){
6558return;
6559}
6560if(!elem.getClientRects().length){
6561return{top:0,left:0};
6562}
6563rect=elem.getBoundingClientRect();
6564win=elem.ownerDocument.defaultView;
6565return{
6566top:rect.top+win.pageYOffset,
6567left:rect.left+win.pageXOffset
6568};
6569},
6570position:function(){
6571if(!this[0]){
6572return;
6573}
6574var offsetParent,offset,doc,
6575elem=this[0],
6576parentOffset={top:0,left:0};
6577if(jQuery.css(elem,"position")==="fixed"){
6578offset=elem.getBoundingClientRect();
6579}else{
6580offset=this.offset();
6581doc=elem.ownerDocument;
6582offsetParent=elem.offsetParent||doc.documentElement;
6583while(offsetParent&&
6584(offsetParent===doc.body||offsetParent===doc.documentElement)&&
6585jQuery.css(offsetParent,"position")==="static"){
6586offsetParent=offsetParent.parentNode;
6587}
6588if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){
6589parentOffset=jQuery(offsetParent).offset();
6590parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);
6591parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true);
6592}
6593}
6594return{
6595top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),
6596left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)
6597};
6598},
6599offsetParent:function(){
6600return this.map(function(){
6601var offsetParent=this.offsetParent;
6602while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){
6603offsetParent=offsetParent.offsetParent;
6604}
6605return offsetParent||documentElement;
6606});
6607}
6608});
6609jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){
6610var top="pageYOffset"===prop;
6611jQuery.fn[method]=function(val){
6612return access(this,function(elem,method,val){
6613var win;
6614if(isWindow(elem)){
6615win=elem;
6616}else if(elem.nodeType===9){
6617win=elem.defaultView;
6618}
6619if(val===undefined){
6620return win?win[prop]:elem[method];
6621}
6622if(win){
6623win.scrollTo(
6624!top?val:win.pageXOffset,
6625top?val:win.pageYOffset
6626);
6627}else{
6628elem[method]=val;
6629}
6630},method,val,arguments.length);
6631};
6632});
6633jQuery.each(["top","left"],function(_i,prop){
6634jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,
6635function(elem,computed){
6636if(computed){
6637computed=curCSS(elem,prop);
6638return rnumnonpx.test(computed)?
6639jQuery(elem).position()[prop]+"px":
6640computed;
6641}
6642}
6643);
6644});
6645jQuery.each({Height:"height",Width:"width"},function(name,type){
6646jQuery.each({
6647padding:"inner"+name,
6648content:type,
6649"":"outer"+name
6650},function(defaultExtra,funcName){
6651jQuery.fn[funcName]=function(margin,value){
6652var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),
6653extra=defaultExtra||(margin===true||value===true?"margin":"border");
6654return access(this,function(elem,type,value){
6655var doc;
6656if(isWindow(elem)){
6657return funcName.indexOf("outer")===0?
6658elem["inner"+name]:
6659elem.document.documentElement["client"+name];
6660}
6661if(elem.nodeType===9){
6662doc=elem.documentElement;
6663return Math.max(
6664elem.body["scroll"+name],doc["scroll"+name],
6665elem.body["offset"+name],doc["offset"+name],
6666doc["client"+name]
6667);
6668}
6669return value===undefined?
6670jQuery.css(elem,type,extra):
6671jQuery.style(elem,type,value,extra);
6672},type,chainable?margin:undefined,chainable);
6673};
6674});
6675});
6676jQuery.each([
6677"ajaxStart",
6678"ajaxStop",
6679"ajaxComplete",
6680"ajaxError",
6681"ajaxSuccess",
6682"ajaxSend"
6683],function(_i,type){
6684jQuery.fn[type]=function(fn){
6685return this.on(type,fn);
6686};
6687});
6688jQuery.fn.extend({
6689bind:function(types,data,fn){
6690return this.on(types,null,data,fn);
6691},
6692unbind:function(types,fn){
6693return this.off(types,null,fn);
6694},
6695delegate:function(selector,types,data,fn){
6696return this.on(types,selector,data,fn);
6697},
6698undelegate:function(selector,types,fn){
6699return arguments.length===1?
6700this.off(selector,"**"):
6701this.off(types,selector||"**",fn);
6702},
6703hover:function(fnOver,fnOut){
6704return this
6705.on("mouseenter",fnOver)
6706.on("mouseleave",fnOut||fnOver);
6707}
6708});
6709jQuery.each(
6710("blur focus focusin focusout resize scroll click dblclick "+
6711"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+
6712"change select submit keydown keypress keyup contextmenu").split(" "),
6713function(_i,name){
6714jQuery.fn[name]=function(data,fn){
6715return arguments.length>0?
6716this.on(name,null,data,fn):
6717this.trigger(name);
6718};
6719}
6720);
6721var rtrim=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
6722jQuery.proxy=function(fn,context){
6723var tmp,args,proxy;
6724if(typeof context==="string"){
6725tmp=fn[context];
6726context=fn;
6727fn=tmp;
6728}
6729if(!isFunction(fn)){
6730return undefined;
6731}
6732args=slice.call(arguments,2);
6733proxy=function(){
6734return fn.apply(context||this,args.concat(slice.call(arguments)));
6735};
6736proxy.guid=fn.guid=fn.guid||jQuery.guid++;
6737return proxy;
6738};
6739jQuery.holdReady=function(hold){
6740if(hold){
6741jQuery.readyWait++;
6742}else{
6743jQuery.ready(true);
6744}
6745};
6746jQuery.isArray=Array.isArray;
6747jQuery.parseJSON=JSON.parse;
6748jQuery.nodeName=nodeName;
6749jQuery.isFunction=isFunction;
6750jQuery.isWindow=isWindow;
6751jQuery.camelCase=camelCase;
6752jQuery.type=toType;
6753jQuery.now=Date.now;
6754jQuery.isNumeric=function(obj){
6755var type=jQuery.type(obj);
6756return(type==="number"||type==="string")&&
6757!isNaN(obj-parseFloat(obj));
6758};
6759jQuery.trim=function(text){
6760return text==null?
6761"":
6762(text+"").replace(rtrim,"$1");
6763};
6764if(typeof define==="function"&&define.amd){
6765define("jquery",[],function(){
6766return jQuery;
6767});
6768}
6769var
6770_jQuery=window.jQuery,
6771_$=window.$;
6772jQuery.noConflict=function(deep){
6773if(window.$===jQuery){
6774window.$=_$;
6775}
6776if(deep&&window.jQuery===jQuery){
6777window.jQuery=_jQuery;
6778}
6779return jQuery;
6780};
6781if(typeof noGlobal==="undefined"){
6782window.jQuery=window.$=jQuery;
6783}
6784return jQuery;
6785});
6786
6787
6788/* prive/javascript/jquery.form.js?1788424599 */
6789
6790(function(factory){
6791if(typeof define==='function'&&define.amd){
6792define(['jquery'],factory);
6793}else if(typeof module==='object'&&module.exports){
6794module.exports=function(root,jQuery){
6795if(typeof jQuery==='undefined'){
6796if(typeof window!=='undefined'){
6797jQuery=require('jquery');
6798}
6799else{
6800jQuery=require('jquery')(root);
6801}
6802}
6803factory(jQuery);
6804return jQuery;
6805};
6806}else{
6807factory(jQuery);
6808}
6809}(function($){
6810'use strict';
6811var rCRLF=/\r?\n/g;
6812var feature={};
6813feature.fileapi=$('<input type="file">').get(0).files!==undefined;
6814feature.formdata=(typeof window.FormData!=='undefined');
6815var hasProp=!!$.fn.prop;
6816$.fn.attr2=function(){
6817if(!hasProp){
6818return this.attr.apply(this,arguments);
6819}
6820var val=this.prop.apply(this,arguments);
6821if((val&&val.jquery)||typeof val==='string'){
6822return val;
6823}
6824return this.attr.apply(this,arguments);
6825};
6826$.fn.ajaxSubmit=function(options,data,dataType,onSuccess){
6827if(!this.length){
6828log('ajaxSubmit: skipping submit process - no element selected');
6829return this;
6830}
6831var method,action,url,isMsie,iframeSrc,$form=this;
6832if(typeof options==='function'){
6833options={success:options};
6834}else if(typeof options==='string'||(options===false&&arguments.length>0)){
6835options={
6836'url':options,
6837'data':data,
6838'dataType':dataType
6839};
6840if(typeof onSuccess==='function'){
6841options.success=onSuccess;
6842}
6843}else if(typeof options==='undefined'){
6844options={};
6845}
6846method=options.method||options.type||this.attr2('method');
6847action=options.url||this.attr2('action');
6848url=(typeof action==='string')?$.trim(action):'';
6849url=url||window.location.href||'';
6850if(url){
6851url=(url.match(/^([^#]+)/)||[])[1];
6852}
6853isMsie=/(MSIE|Trident)/.test(navigator.userAgent||'');
6854iframeSrc=(isMsie&&/^https/i.test(window.location.href||''))?'javascript:false':'about:blank';
6855options=$.extend(true,{
6856url:url,
6857success:$.ajaxSettings.success,
6858type:method||$.ajaxSettings.type,
6859iframeSrc:iframeSrc
6860},options);
6861var veto={};
6862this.trigger('form-pre-serialize',[this,options,veto]);
6863if(veto.veto){
6864log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
6865return this;
6866}
6867if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){
6868log('ajaxSubmit: submit aborted via beforeSerialize callback');
6869return this;
6870}
6871var traditional=options.traditional;
6872if(typeof traditional==='undefined'){
6873traditional=$.ajaxSettings.traditional;
6874}
6875var elements=[];
6876var qx,a=this.formToArray(options.semantic,elements,options.filtering);
6877if(options.data){
6878var optionsData=$.isFunction(options.data)?options.data(a):options.data;
6879options.extraData=optionsData;
6880qx=$.param(optionsData,traditional);
6881}
6882if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){
6883log('ajaxSubmit: submit aborted via beforeSubmit callback');
6884return this;
6885}
6886this.trigger('form-submit-validate',[a,this,options,veto]);
6887if(veto.veto){
6888log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
6889return this;
6890}
6891var q=$.param(a,traditional);
6892if(qx){
6893q=(q?(q+'&'+qx):qx);
6894}
6895if(options.type.toUpperCase()==='GET'){
6896options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;
6897options.data=null;
6898}else{
6899options.data=q;
6900}
6901var callbacks=[];
6902if(options.resetForm){
6903callbacks.push(function(){
6904$form.resetForm();
6905});
6906}
6907if(options.clearForm){
6908callbacks.push(function(){
6909$form.clearForm(options.includeHidden);
6910});
6911}
6912if(!options.dataType&&options.target){
6913var oldSuccess=options.success||function(){};
6914callbacks.push(function(data,textStatus,jqXHR){
6915var successArguments=arguments,
6916fn=options.replaceTarget?'replaceWith':'html';
6917if(fn=='html'){
6918data=$.parseHTML($("<div>").text(data).html())
6919};
6920$(options.target)[fn](data).each(function(){
6921oldSuccess.apply(this,successArguments);
6922});
6923});
6924}else if(options.success){
6925if($.isArray(options.success)){
6926$.merge(callbacks,options.success);
6927}else{
6928callbacks.push(options.success);
6929}
6930}
6931options.success=function(data,status,xhr){
6932var context=options.context||this;
6933for(var i=0,max=callbacks.length;i<max;i++){
6934callbacks[i].apply(context,[data,status,xhr||$form,$form]);
6935}
6936};
6937if(options.error){
6938var oldError=options.error;
6939options.error=function(xhr,status,error){
6940var context=options.context||this;
6941oldError.apply(context,[xhr,status,error,$form]);
6942};
6943}
6944if(options.complete){
6945var oldComplete=options.complete;
6946options.complete=function(xhr,status){
6947var context=options.context||this;
6948oldComplete.apply(context,[xhr,status,$form]);
6949};
6950}
6951var fileInputs=$('input[type=file]:enabled',this).filter(function(){
6952return $(this).val()!=='';
6953});
6954var hasFileInputs=fileInputs.length>0;
6955var mp='multipart/form-data';
6956var multipart=($form.attr('enctype')===mp||$form.attr('encoding')===mp);
6957var fileAPI=feature.fileapi&&feature.formdata;
6958log('fileAPI :'+fileAPI);
6959var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;
6960var jqxhr;
6961if(options.iframe!==false&&(options.iframe||shouldUseFrame)){
6962if(options.closeKeepAlive){
6963$.get(options.closeKeepAlive,function(){
6964jqxhr=fileUploadIframe(a);
6965});
6966}else{
6967jqxhr=fileUploadIframe(a);
6968}
6969}else if((hasFileInputs||multipart)&&fileAPI){
6970jqxhr=fileUploadXhr(a);
6971}else{
6972jqxhr=$.ajax(options);
6973}
6974$form.removeData('jqxhr').data('jqxhr',jqxhr);
6975for(var k=0;k<elements.length;k++){
6976elements[k]=null;
6977}
6978this.trigger('form-submit-notify',[this,options]);
6979return this;
6980function deepSerialize(extraData){
6981var serialized=$.param(extraData,options.traditional).split('&');
6982var len=serialized.length;
6983var result=[];
6984var i,part;
6985for(i=0;i<len;i++){
6986serialized[i]=serialized[i].replace(/\+/g,' ');
6987part=serialized[i].split('=');
6988result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]);
6989}
6990return result;
6991}
6992function fileUploadXhr(a){
6993var formdata=new FormData();
6994for(var i=0;i<a.length;i++){
6995formdata.append(a[i].name,a[i].value);
6996}
6997if(options.extraData){
6998var serializedData=deepSerialize(options.extraData);
6999for(i=0;i<serializedData.length;i++){
7000if(serializedData[i]){
7001formdata.append(serializedData[i][0],serializedData[i][1]);
7002}
7003}
7004}
7005options.data=null;
7006var s=$.extend(true,{},$.ajaxSettings,options,{
7007contentType:false,
7008processData:false,
7009cache:false,
7010type:method||'POST'
7011});
7012if(options.uploadProgress){
7013s.xhr=function(){
7014var xhr=$.ajaxSettings.xhr();
7015if(xhr.upload){
7016xhr.upload.addEventListener('progress',function(event){
7017var percent=0;
7018var position=event.loaded||event.position;
7019var total=event.total;
7020if(event.lengthComputable){
7021percent=Math.ceil(position/total*100);
7022}
7023options.uploadProgress(event,position,total,percent);
7024},false);
7025}
7026return xhr;
7027};
7028}
7029s.data=null;
7030var beforeSend=s.beforeSend;
7031s.beforeSend=function(xhr,o){
7032if(options.formData){
7033o.data=options.formData;
7034}else{
7035o.data=formdata;
7036}
7037if(beforeSend){
7038beforeSend.call(this,xhr,o);
7039}
7040};
7041return $.ajax(s);
7042}
7043function fileUploadIframe(a){
7044var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;
7045var deferred=$.Deferred();
7046deferred.abort=function(status){
7047xhr.abort(status);
7048};
7049if(a){
7050for(i=0;i<elements.length;i++){
7051el=$(elements[i]);
7052if(hasProp){
7053el.prop('disabled',false);
7054}else{
7055el.removeAttr('disabled');
7056}
7057}
7058}
7059s=$.extend(true,{},$.ajaxSettings,options);
7060s.context=s.context||s;
7061id='jqFormIO'+new Date().getTime();
7062var ownerDocument=form.ownerDocument;
7063var $body=$form.closest('body');
7064if(s.iframeTarget){
7065$io=$(s.iframeTarget,ownerDocument);
7066n=$io.attr2('name');
7067if(!n){
7068$io.attr2('name',id);
7069}else{
7070id=n;
7071}
7072}else{
7073$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'">',ownerDocument);
7074$io.css({position:'absolute',top:'-1000px',left:'-1000px'});
7075}
7076io=$io[0];
7077xhr={
7078aborted:0,
7079responseText:null,
7080responseXML:null,
7081status:0,
7082statusText:'n/a',
7083getAllResponseHeaders:function(){},
7084getResponseHeader:function(){},
7085setRequestHeader:function(){},
7086abort:function(status){
7087var e=(status==='timeout'?'timeout':'aborted');
7088log('aborting upload... '+e);
7089this.aborted=1;
7090try{
7091if(io.contentWindow.document.execCommand){
7092io.contentWindow.document.execCommand('Stop');
7093}
7094}catch(ignore){}
7095$io.attr('src',s.iframeSrc);
7096xhr.error=e;
7097if(s.error){
7098s.error.call(s.context,xhr,e,status);
7099}
7100if(g){
7101$.event.trigger('ajaxError',[xhr,s,e]);
7102}
7103if(s.complete){
7104s.complete.call(s.context,xhr,e);
7105}
7106}
7107};
7108g=s.global;
7109if(g&&$.active++===0){
7110$.event.trigger('ajaxStart');
7111}
7112if(g){
7113$.event.trigger('ajaxSend',[xhr,s]);
7114}
7115if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){
7116if(s.global){
7117$.active--;
7118}
7119deferred.reject();
7120return deferred;
7121}
7122if(xhr.aborted){
7123deferred.reject();
7124return deferred;
7125}
7126sub=form.clk;
7127if(sub){
7128n=sub.name;
7129if(n&&!sub.disabled){
7130s.extraData=s.extraData||{};
7131s.extraData[n]=sub.value;
7132if(sub.type==='image'){
7133s.extraData[n+'.x']=form.clk_x;
7134s.extraData[n+'.y']=form.clk_y;
7135}
7136}
7137}
7138var CLIENT_TIMEOUT_ABORT=1;
7139var SERVER_ABORT=2;
7140function getDoc(frame){
7141var doc=null;
7142try{
7143if(frame.contentWindow){
7144doc=frame.contentWindow.document;
7145}
7146}catch(err){
7147log('cannot get iframe.contentWindow document: '+err);
7148}
7149if(doc){
7150return doc;
7151}
7152try{
7153doc=frame.contentDocument?frame.contentDocument:frame.document;
7154}catch(err){
7155log('cannot get iframe.contentDocument: '+err);
7156doc=frame.document;
7157}
7158return doc;
7159}
7160var csrf_token=$('meta[name=csrf-token]').attr('content');
7161var csrf_param=$('meta[name=csrf-param]').attr('content');
7162if(csrf_param&&csrf_token){
7163s.extraData=s.extraData||{};
7164s.extraData[csrf_param]=csrf_token;
7165}
7166function doSubmit(){
7167var t=$form.attr2('target'),
7168a=$form.attr2('action'),
7169mp='multipart/form-data',
7170et=$form.attr('enctype')||$form.attr('encoding')||mp;
7171form.setAttribute('target',id);
7172if(!method||/post/i.test(method)){
7173form.setAttribute('method','POST');
7174}
7175if(a!==s.url){
7176form.setAttribute('action',s.url);
7177}
7178if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){
7179$form.attr({
7180encoding:'multipart/form-data',
7181enctype:'multipart/form-data'
7182});
7183}
7184if(s.timeout){
7185timeoutHandle=setTimeout(function(){
7186timedOut=true;cb(CLIENT_TIMEOUT_ABORT);
7187},s.timeout);
7188}
7189function checkState(){
7190try{
7191var state=getDoc(io).readyState;
7192log('state = '+state);
7193if(state&&state.toLowerCase()==='uninitialized'){
7194setTimeout(checkState,50);
7195}
7196}catch(e){
7197log('Server abort: ',e,' (',e.name,')');
7198cb(SERVER_ABORT);
7199if(timeoutHandle){
7200clearTimeout(timeoutHandle);
7201}
7202timeoutHandle=undefined;
7203}
7204}
7205var extraInputs=[];
7206try{
7207if(s.extraData){
7208for(var n in s.extraData){
7209if(s.extraData.hasOwnProperty(n)){
7210if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){
7211extraInputs.push(
7212$('<input type="hidden" name="'+s.extraData[n].name+'">',ownerDocument).val(s.extraData[n].value)
7213.appendTo(form)[0]);
7214}else{
7215extraInputs.push(
7216$('<input type="hidden" name="'+n+'">',ownerDocument).val(s.extraData[n])
7217.appendTo(form)[0]);
7218}
7219}
7220}
7221}
7222if(!s.iframeTarget){
7223$io.appendTo($body);
7224}
7225if(io.attachEvent){
7226io.attachEvent('onload',cb);
7227}else{
7228io.addEventListener('load',cb,false);
7229}
7230setTimeout(checkState,15);
7231try{
7232form.submit();
7233}catch(err){
7234var submitFn=document.createElement('form').submit;
7235submitFn.apply(form);
7236}
7237}finally{
7238form.setAttribute('action',a);
7239form.setAttribute('enctype',et);
7240if(t){
7241form.setAttribute('target',t);
7242}else{
7243$form.removeAttr('target');
7244}
7245$(extraInputs).remove();
7246}
7247}
7248if(s.forceSync){
7249doSubmit();
7250}else{
7251setTimeout(doSubmit,10);
7252}
7253var data,doc,domCheckCount=50,callbackProcessed;
7254function cb(e){
7255if(xhr.aborted||callbackProcessed){
7256return;
7257}
7258doc=getDoc(io);
7259if(!doc){
7260log('cannot access response document');
7261e=SERVER_ABORT;
7262}
7263if(e===CLIENT_TIMEOUT_ABORT&&xhr){
7264xhr.abort('timeout');
7265deferred.reject(xhr,'timeout');
7266return;
7267}
7268if(e===SERVER_ABORT&&xhr){
7269xhr.abort('server abort');
7270deferred.reject(xhr,'error','server abort');
7271return;
7272}
7273if(!doc||doc.location.href===s.iframeSrc){
7274if(!timedOut){
7275return;
7276}
7277}
7278if(io.detachEvent){
7279io.detachEvent('onload',cb);
7280}else{
7281io.removeEventListener('load',cb,false);
7282}
7283var status='success',errMsg;
7284try{
7285if(timedOut){
7286throw'timeout';
7287}
7288var isXml=s.dataType==='xml'||doc.XMLDocument||$.isXMLDoc(doc);
7289log('isXml='+isXml);
7290if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){
7291if(--domCheckCount){
7292log('requeing onLoad callback, DOM not available');
7293setTimeout(cb,250);
7294return;
7295}
7296}
7297var docRoot=doc.body?doc.body:doc.documentElement;
7298xhr.responseText=docRoot?docRoot.innerHTML:null;
7299xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;
7300if(isXml){
7301s.dataType='xml';
7302}
7303xhr.getResponseHeader=function(header){
7304var headers={'content-type':s.dataType};
7305return headers[header.toLowerCase()];
7306};
7307if(docRoot){
7308xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;
7309xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;
7310}
7311var dt=(s.dataType||'').toLowerCase();
7312var scr=/(json|script|text)/.test(dt);
7313if(scr||s.textarea){
7314var ta=doc.getElementsByTagName('textarea')[0];
7315if(ta){
7316xhr.responseText=ta.value;
7317xhr.status=Number(ta.getAttribute('status'))||xhr.status;
7318xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;
7319}else if(scr){
7320var pre=doc.getElementsByTagName('pre')[0];
7321var b=doc.getElementsByTagName('body')[0];
7322if(pre){
7323xhr.responseText=pre.textContent?pre.textContent:pre.innerText;
7324}else if(b){
7325xhr.responseText=b.textContent?b.textContent:b.innerText;
7326}
7327}
7328}else if(dt==='xml'&&!xhr.responseXML&&xhr.responseText){
7329xhr.responseXML=toXml(xhr.responseText);
7330}
7331try{
7332data=httpData(xhr,dt,s);
7333}catch(err){
7334status='parsererror';
7335xhr.error=errMsg=(err||status);
7336}
7337}catch(err){
7338log('error caught: ',err);
7339status='error';
7340xhr.error=errMsg=(err||status);
7341}
7342if(xhr.aborted){
7343log('upload aborted');
7344status=null;
7345}
7346if(xhr.status){
7347status=((xhr.status>=200&&xhr.status<300)||xhr.status===304)?'success':'error';
7348}
7349if(status==='success'){
7350if(s.success){
7351s.success.call(s.context,data,'success',xhr);
7352}
7353deferred.resolve(xhr.responseText,'success',xhr);
7354if(g){
7355$.event.trigger('ajaxSuccess',[xhr,s]);
7356}
7357}else if(status){
7358if(typeof errMsg==='undefined'){
7359errMsg=xhr.statusText;
7360}
7361if(s.error){
7362s.error.call(s.context,xhr,status,errMsg);
7363}
7364deferred.reject(xhr,'error',errMsg);
7365if(g){
7366$.event.trigger('ajaxError',[xhr,s,errMsg]);
7367}
7368}
7369if(g){
7370$.event.trigger('ajaxComplete',[xhr,s]);
7371}
7372if(g&&!--$.active){
7373$.event.trigger('ajaxStop');
7374}
7375if(s.complete){
7376s.complete.call(s.context,xhr,status);
7377}
7378callbackProcessed=true;
7379if(s.timeout){
7380clearTimeout(timeoutHandle);
7381}
7382setTimeout(function(){
7383if(!s.iframeTarget){
7384$io.remove();
7385}else{
7386$io.attr('src',s.iframeSrc);
7387}
7388xhr.responseXML=null;
7389},100);
7390}
7391var toXml=$.parseXML||function(s,doc){
7392if(window.ActiveXObject){
7393doc=new ActiveXObject('Microsoft.XMLDOM');
7394doc.async='false';
7395doc.loadXML(s);
7396}else{
7397doc=(new DOMParser()).parseFromString(s,'text/xml');
7398}
7399return(doc&&doc.documentElement&&doc.documentElement.nodeName!=='parsererror')?doc:null;
7400};
7401var parseJSON=$.parseJSON||function(s){
7402window.console.error('jquery.parseJSON is undefined');
7403return null;
7404};
7405var httpData=function(xhr,type,s){
7406var ct=xhr.getResponseHeader('content-type')||'',
7407xml=((type==='xml'||!type)&&ct.indexOf('xml')>=0),
7408data=xml?xhr.responseXML:xhr.responseText;
7409if(xml&&data.documentElement.nodeName==='parsererror'){
7410if($.error){
7411$.error('parsererror');
7412}
7413}
7414if(s&&s.dataFilter){
7415data=s.dataFilter(data,type);
7416}
7417if(typeof data==='string'){
7418if((type==='json'||!type)&&ct.indexOf('json')>=0){
7419data=parseJSON(data);
7420}else if((type==='script'||!type)&&ct.indexOf('javascript')>=0){
7421$.globalEval(data);
7422}
7423}
7424return data;
7425};
7426return deferred;
7427}
7428};
7429$.fn.ajaxForm=function(options,data,dataType,onSuccess){
7430if(typeof options==='string'||(options===false&&arguments.length>0)){
7431options={
7432'url':options,
7433'data':data,
7434'dataType':dataType
7435};
7436if(typeof onSuccess==='function'){
7437options.success=onSuccess;
7438}
7439}
7440options=options||{};
7441options.delegation=options.delegation&&$.isFunction($.fn.on);
7442if(!options.delegation&&this.length===0){
7443var o={s:this.selector,c:this.context};
7444if(!$.isReady&&o.s){
7445log('DOM not ready, queuing ajaxForm');
7446$(function(){
7447$(o.s,o.c).ajaxForm(options);
7448});
7449return this;
7450}
7451log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));
7452return this;
7453}
7454if(options.delegation){
7455$(document)
7456.off('submit.form-plugin',this.selector,doAjaxSubmit)
7457.off('click.form-plugin',this.selector,captureSubmittingElement)
7458.on('submit.form-plugin',this.selector,options,doAjaxSubmit)
7459.on('click.form-plugin',this.selector,options,captureSubmittingElement);
7460return this;
7461}
7462if(options.beforeFormUnbind){
7463options.beforeFormUnbind(this,options);
7464}
7465return this.ajaxFormUnbind()
7466.on('submit.form-plugin',options,doAjaxSubmit)
7467.on('click.form-plugin',options,captureSubmittingElement);
7468};
7469function doAjaxSubmit(e){
7470var options=e.data;
7471if(!e.isDefaultPrevented()){
7472e.preventDefault();
7473$(e.target).closest('form').ajaxSubmit(options);
7474}
7475}
7476function captureSubmittingElement(e){
7477var target=e.target;
7478var $el=$(target);
7479if(!$el.is('[type=submit],[type=image]')){
7480var t=$el.closest('[type=submit]');
7481if(t.length===0){
7482return;
7483}
7484target=t[0];
7485}
7486var form=target.form;
7487form.clk=target;
7488if(target.type==='image'){
7489if(typeof e.offsetX!=='undefined'){
7490form.clk_x=e.offsetX;
7491form.clk_y=e.offsetY;
7492}else if(typeof $.fn.offset==='function'){
7493var offset=$el.offset();
7494form.clk_x=e.pageX-offset.left;
7495form.clk_y=e.pageY-offset.top;
7496}else{
7497form.clk_x=e.pageX-target.offsetLeft;
7498form.clk_y=e.pageY-target.offsetTop;
7499}
7500}
7501setTimeout(function(){
7502form.clk=form.clk_x=form.clk_y=null;
7503},100);
7504}
7505$.fn.ajaxFormUnbind=function(){
7506return this.off('submit.form-plugin click.form-plugin');
7507};
7508$.fn.formToArray=function(semantic,elements,filtering){
7509var a=[];
7510if(this.length===0){
7511return a;
7512}
7513var form=this[0];
7514var formId=this.attr('id');
7515var els=(semantic||typeof form.elements==='undefined')?form.getElementsByTagName('*'):form.elements;
7516var els2;
7517if(els){
7518els=$.makeArray(els);
7519}
7520if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){
7521els2=$(':input[form="'+formId+'"]').get();
7522if(els2.length){
7523els=(els||[]).concat(els2);
7524}
7525}
7526if(!els||!els.length){
7527return a;
7528}
7529if($.isFunction(filtering)){
7530els=$.map(els,filtering);
7531}
7532var i,j,n,v,el,max,jmax;
7533for(i=0,max=els.length;i<max;i++){
7534el=els[i];
7535n=el.name;
7536if(!n||el.disabled){
7537continue;
7538}
7539if(semantic&&form.clk&&el.type==='image'){
7540if(form.clk===el){
7541a.push({name:n,value:$(el).val(),type:el.type});
7542a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});
7543}
7544continue;
7545}
7546v=$.fieldValue(el,true);
7547if(v&&v.constructor===Array){
7548if(elements){
7549elements.push(el);
7550}
7551for(j=0,jmax=v.length;j<jmax;j++){
7552a.push({name:n,value:v[j]});
7553}
7554}else if(feature.fileapi&&el.type==='file'){
7555if(elements){
7556elements.push(el);
7557}
7558var files=el.files;
7559if(files.length){
7560for(j=0;j<files.length;j++){
7561a.push({name:n,value:files[j],type:el.type});
7562}
7563}else{
7564a.push({name:n,value:'',type:el.type});
7565}
7566}else if(v!==null&&typeof v!=='undefined'){
7567if(elements){
7568elements.push(el);
7569}
7570a.push({name:n,value:v,type:el.type,required:el.required});
7571}
7572}
7573if(!semantic&&form.clk){
7574var $input=$(form.clk),input=$input[0];
7575n=input.name;
7576if(n&&!input.disabled&&input.type==='image'){
7577a.push({name:n,value:$input.val()});
7578a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});
7579}
7580}
7581return a;
7582};
7583$.fn.formSerialize=function(semantic){
7584return $.param(this.formToArray(semantic));
7585};
7586$.fn.fieldSerialize=function(successful){
7587var a=[];
7588this.each(function(){
7589var n=this.name;
7590if(!n){
7591return;
7592}
7593var v=$.fieldValue(this,successful);
7594if(v&&v.constructor===Array){
7595for(var i=0,max=v.length;i<max;i++){
7596a.push({name:n,value:v[i]});
7597}
7598}else if(v!==null&&typeof v!=='undefined'){
7599a.push({name:this.name,value:v});
7600}
7601});
7602return $.param(a);
7603};
7604$.fn.fieldValue=function(successful){
7605for(var val=[],i=0,max=this.length;i<max;i++){
7606var el=this[i];
7607var v=$.fieldValue(el,successful);
7608if(v===null||typeof v==='undefined'||(v.constructor===Array&&!v.length)){
7609continue;
7610}
7611if(v.constructor===Array){
7612$.merge(val,v);
7613}else{
7614val.push(v);
7615}
7616}
7617return val;
7618};
7619$.fieldValue=function(el,successful){
7620var n=el.name,t=el.type,tag=el.tagName.toLowerCase();
7621if(typeof successful==='undefined'){
7622successful=true;
7623}
7624if(successful&&(!n||el.disabled||t==='reset'||t==='button'||
7625(t==='checkbox'||t==='radio')&&!el.checked||
7626(t==='submit'||t==='image')&&el.form&&el.form.clk!==el||
7627tag==='select'&&el.selectedIndex===-1)){
7628return null;
7629}
7630if(tag==='select'){
7631var index=el.selectedIndex;
7632if(index<0){
7633return null;
7634}
7635var a=[],ops=el.options;
7636var one=(t==='select-one');
7637var max=(one?index+1:ops.length);
7638for(var i=(one?index:0);i<max;i++){
7639var op=ops[i];
7640if(op.selected&&!op.disabled){
7641var v=op.value;
7642if(!v){
7643v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value;
7644}
7645if(one){
7646return v;
7647}
7648a.push(v);
7649}
7650}
7651return a;
7652}
7653return $(el).val().replace(rCRLF,'\r\n');
7654};
7655$.fn.clearForm=function(includeHidden){
7656return this.each(function(){
7657$('input,select,textarea',this).clearFields(includeHidden);
7658});
7659};
7660$.fn.clearFields=$.fn.clearInputs=function(includeHidden){
7661var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;
7662return this.each(function(){
7663var t=this.type,tag=this.tagName.toLowerCase();
7664if(re.test(t)||tag==='textarea'){
7665this.value='';
7666}else if(t==='checkbox'||t==='radio'){
7667this.checked=false;
7668}else if(tag==='select'){
7669this.selectedIndex=-1;
7670}else if(t==='file'){
7671if(/MSIE/.test(navigator.userAgent)){
7672$(this).replaceWith($(this).clone(true));
7673}else{
7674$(this).val('');
7675}
7676}else if(includeHidden){
7677if((includeHidden===true&&/hidden/.test(t))||
7678(typeof includeHidden==='string'&&$(this).is(includeHidden))){
7679this.value='';
7680}
7681}
7682});
7683};
7684$.fn.resetForm=function(){
7685return this.each(function(){
7686var el=$(this);
7687var tag=this.tagName.toLowerCase();
7688switch(tag){
7689case'input':
7690this.checked=this.defaultChecked;
7691case'textarea':
7692this.value=this.defaultValue;
7693return true;
7694case'option':
7695case'optgroup':
7696var select=el.parents('select');
7697if(select.length&&select[0].multiple){
7698if(tag==='option'){
7699this.selected=this.defaultSelected;
7700}else{
7701el.find('option').resetForm();
7702}
7703}else{
7704select.resetForm();
7705}
7706return true;
7707case'select':
7708el.find('option').each(function(i){
7709this.selected=this.defaultSelected;
7710if(this.defaultSelected&&!el[0].multiple){
7711el[0].selectedIndex=i;
7712return false;
7713}
7714});
7715return true;
7716case'label':
7717var forEl=$(el.attr('for'));
7718var list=el.find('input,select,textarea');
7719if(forEl[0]){
7720list.unshift(forEl[0]);
7721}
7722list.resetForm();
7723return true;
7724case'form':
7725if(typeof this.reset==='function'||(typeof this.reset==='object'&&!this.reset.nodeType)){
7726this.reset();
7727}
7728return true;
7729default:
7730el.find('form,input,label,select,textarea').resetForm();
7731return true;
7732}
7733});
7734};
7735$.fn.enable=function(b){
7736if(typeof b==='undefined'){
7737b=true;
7738}
7739return this.each(function(){
7740this.disabled=!b;
7741});
7742};
7743$.fn.selected=function(select){
7744if(typeof select==='undefined'){
7745select=true;
7746}
7747return this.each(function(){
7748var t=this.type;
7749if(t==='checkbox'||t==='radio'){
7750this.checked=select;
7751}else if(this.tagName.toLowerCase()==='option'){
7752var $sel=$(this).parent('select');
7753if(select&&$sel[0]&&$sel[0].type==='select-one'){
7754$sel.find('option').selected(false);
7755}
7756this.selected=select;
7757}
7758});
7759};
7760$.fn.ajaxSubmit.debug=false;
7761function log(){
7762if(!$.fn.ajaxSubmit.debug){
7763return;
7764}
7765var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');
7766if(window.console&&window.console.log){
7767window.console.log(msg);
7768}else if(window.opera&&window.opera.postError){
7769window.opera.postError(msg);
7770}
7771}
7772}));
7773
7774
7775/* prive/javascript/jquery.autosave.js?1788424554 */
7776
7777(function($){
7778$.fn.autosave=function(opt){
7779opt=$.extend({
7780url:window.location,
7781confirm:false,
7782confirmstring:'Sauvegarder ?'
7783},opt);
7784var save_changed=function(){
7785$('form.autosavechanged')
7786.each(function(){
7787if(!opt.confirm||confirm(opt.confirmstring)){
7788var contenu=$(this).serialize();
7789var d=new Date();
7790contenu=contenu+"&__timestamp="+Math.round(d.getTime()/1000);
7791$.post(opt.url,{
7792'action':'session',
7793'var':'autosave_'+$('input[name=autosave]',this).val(),
7794'val':contenu
7795});
7796}
7797}).removeClass('autosavechanged');
7798};
7799$(window).on('unload',save_changed);
7800return this
7801.on('keyup',function(){
7802$(this).addClass('autosavechanged');
7803})
7804.on('change',function(){
7805$(this).addClass('autosavechanged');
7806save_changed();
7807})
7808.on('submit',function(){
7809save_changed();
7810});
7811};
7812})(jQuery);
7813
7814
7815/* prive/javascript/jquery.placeholder-label.js?1788424554 */
7816
7817(function($){
7818$.placeholderLabel={
7819placeholder_class:null,
7820add_placeholder:function(){
7821if($(this).val()==$(this).attr('placeholder')){
7822$(this).val('').removeClass($.placeholderLabel.placeholder_class);
7823}
7824},
7825remove_placeholder:function(){
7826if($(this).val()==''){
7827$(this).val($(this).attr('placeholder')).addClass($.placeholderLabel.placeholder_class);
7828}
7829},
7830disable_placeholder_fields:function(){
7831$(this).find("input[placeholder]").each(function(){
7832if($(this).val()==$(this).attr('placeholder')){
7833$(this).val('');
7834}
7835});
7836return true;
7837}
7838};
7839$.fn.placeholderLabel=function(options){
7840var dummy=document.createElement('input');
7841if(dummy.placeholder!=undefined){
7842return this;
7843}
7844var config={
7845placeholder_class:'placeholder'
7846};
7847if(options)$.extend(config,options);
7848$.placeholderLabel.placeholder_class=config.placeholder_class;
7849this.each(function(){
7850var input=$(this);
7851input.focus($.placeholderLabel.add_placeholder);
7852input.blur($.placeholderLabel.remove_placeholder);
7853input.triggerHandler('focus');
7854input.triggerHandler('blur');
7855$(this.form).submit($.placeholderL
7855abel.disable_placeholder_fields);
7856});
7857return this;
7858}
7859})(jQuery);
7860
7861
7862/* prive/javascript/ajaxCallback.js?1788424599 */
7863jQuery.spip=jQuery.spip||{};
7864jQuery.spip.log=function(){
7865if(jQuery.spip.debug&&window.console&&window.console.log)
7866window.console.log.apply(this,arguments);
7867}
7868jQuery.spip.test_espace_prive=function(){
7869if(typeof spipConfig.core.test_espace_prive!=undefined&&spipConfig.core.test_espace_prive){
7870return true;
7871}
7872return false;
7873}
7874if(!jQuery.spip.load_handlers){
7875jQuery.spip.load_handlers=new Array();
7876function onAjaxLoad(f){
7877jQuery.spip.load_handlers.push(f);
7878};
7879jQuery.spip.triggerAjaxLoad=function(root){
7880jQuery.spip.log('triggerAjaxLoad');
7881jQuery.spip.log(root);
7882for(var i=0;i<jQuery.spip.load_handlers.length;i++)
7883jQuery.spip.load_handlers[i].apply(root);
7884};
7885jQuery.spip.intercepted={};
7886jQuery.spip.intercepted.load=jQuery.fn.load;
7887jQuery.fn.load=function(url,params,callback){
7888if(typeof url!=="string"){
7889return jQuery.spip.intercepted.load.apply(this,arguments);
7890}
7891callback=callback||function(){};
7892if(params){
7893if(params.constructor==Function){
7894callback=params;
7895params=null;
7896}
7897}
7898params=jQuery.extend(params,{triggerAjaxLoad:false});
7899var callback2=function(){jQuery.spip.log('jQuery.load');jQuery.spip.triggerAjaxLoad(this);callback.apply(this,arguments);};
7900return jQuery.spip.intercepted.load.apply(this,[url,params,callback2]);
7901};
7902jQuery.spip.intercepted.ajaxSubmit=jQuery.fn.ajaxSubmit;
7903jQuery.fn.ajaxSubmit=function(options){
7904options=options||{};
7905if(typeof options.onAjaxLoad=="undefined"||options.onAjaxLoad!=false){
7906var me=jQuery(this).parents('div.ajax');
7907if(me.length)
7908me=me.parent();
7909else
7910me=document;
7911if(typeof options=='function')
7912options={success:options};
7913var callback=options.success||function(){};
7914options.success=function(){callback.apply(this,arguments);jQuery.spip.log('jQuery.ajaxSubmit');jQuery.spip.triggerAjaxLoad(me);}
7915}
7916return jQuery.spip.intercepted.ajaxSubmit.apply(this,[options]);
7917}
7918jQuery.spip.intercepted.ajax=jQuery.ajax;
7919jQuery.ajax=function(url,settings){
7920if(typeof settings=='undefined'){
7921settings={};
7922if(typeof url=='object'){
7923settings=url;
7924url=null;
7925}
7926}
7927if(typeof url=='string'){
7928settings['url']=url;
7929}
7930if(settings.data&&settings.data['triggerAjaxLoad']===false){
7931settings.data['triggerAjaxLoad']=null;
7932return jQuery.spip.intercepted.ajax(settings);
7933}
7934var s=jQuery.extend(true,{},jQuery.ajaxSettings,settings);
7935var callbackContext=s.context||s;
7936try{
7937if(jQuery.ajax.caller==jQuery.spip.intercepted.load||jQuery.ajax.caller==jQuery.spip.intercepted.ajaxSubmit)
7938return jQuery.spip.intercepted.ajax(settings);
7939}
7940catch(err){}
7941var orig_complete=s.complete||function(){};
7942settings.complete=function(res,status){
7943var dataType=settings.dataType;
7944var ct=(res&&(typeof res.getResponseHeader=='function'))
7945?res.getResponseHeader("content-type"):'';
7946var xml=!dataType&&ct&&ct.indexOf("xml")>=0;
7947orig_complete.call(callbackContext,res,status);
7948if((!dataType&&!xml)||dataType=="html"){
7949jQuery.spip.log('jQuery.ajax');
7950if(typeof s.onAjaxLoad=="undefined"||s.onAjaxLoad!=false)
7951jQuery.spip.triggerAjaxLoad(s.ajaxTarget?s.ajaxTarget:document);
7952}
7953};
7954return jQuery.spip.intercepted.ajax(settings);
7955};
7956}
7957jQuery.uaMatch=function(ua){
7958ua=ua.toLowerCase();
7959var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||
7960ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||
7961[];
7962return{
7963browser:match[1]||"",
7964version:match[2]||"0"
7965};
7966};
7967if(!jQuery.browser){
7968matched=jQuery.uaMatch(navigator.userAgent);
7969browser={};
7970if(matched.browser){
7971browser[matched.browser]=true;
7972browser.version=matched.version;
7973}
7974if(browser.chrome){
7975browser.webkit=true;
7976}else if(browser.webkit){
7977browser.safari=true;
7978}
7979jQuery.browser=browser;
7980}
7981jQuery.getScript=function(url,callback){
7982return $.ajax({
7983url:url,
7984dataType:"script",
7985success:callback,
7986cache:true
7987});
7988}
7989jQuery.fn.positionner=function(force,setfocus){
7990if(!this.length){
7991return this;
7992}
7993var offset=jQuery(this).offset();
7994var hauteur=parseInt(jQuery(this).css('height'));
7995var marge=jQuery.spip.positionner_marge||5;
7996var scrolltop=self['pageYOffset']||
7997jQuery.boxModel&&document.documentElement['scrollTop']||
7998document.body['scrollTop'];
7999var h=jQuery(window).height();
8000var scroll=0;
8001if(force||(offset&&offset['top']-marge<=scrolltop)){
8002scroll=offset['top']-marge;
8003}
8004else if(offset&&offset['top']+hauteur-h+marge>scrolltop){
8005scroll=Math.min(offset['top']-marge-15,offset['top']+hauteur-h+40);
8006}
8007if(scroll)
8008jQuery('html,body')
8009.animate({scrollTop:scroll},300);
8010if(setfocus!==false)
8011jQuery(jQuery('*',this).filter('input[type=text],textarea')[0]).focus();
8012return this;
8013}
8014jQuery.spip.virtualbuffer_id='spip_virtualbufferupdate';
8015jQuery.spip.initReaderBuffer=function(){
8016if(jQuery('#'+jQuery.spip.virtualbuffer_id).length)return;
8017jQuery('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>');
8018}
8019jQuery.spip.updateReaderBuffer=function(){
8020var i=jQuery('#'+jQuery.spip.virtualbuffer_id);
8021if(!i.length)return;
8022i.val(parseInt(i.val())+1);
8023}
8024jQuery.fn.formulaire_setContainer=function(){
8025if(!this.closest('.ajax-form-container').length){
8026this.find('script').remove();
8027var aria=this.data('aria');
8028var $container=jQuery('<div class="ajax-form-container"></div>');
8029if(aria&&typeof aria==='object'){
8030for(var i in aria){
8031$container=$container.attr(i,aria[i]);
8032}
8033}
8034else{
8035aria=false;
8036}
8037this.wrap($container);
8038if(aria){
8039jQuery('form',this).not('[aria-live]').attr('aria-live','off');
8040}
8041}
8042return this;
8043}
8044jQuery.fn.formulaire_dyn_ajax=function(target){
8045if(this.length)
8046jQuery.spip.initReaderBuffer();
8047return this.each(function(){
8048var scrollwhensubmit=!jQuery(this).is('.noscroll');
8049var cible=target||this;
8050jQuery(cible).formulaire_setContainer();
8051jQuery('form:not(.noajax):not(.bouton_action_post)',this).each(function(){
8052var leform=this;
8053var leclk,leclk_x,leclk_y;
8054var onError=function(xhr,status,error,$form){
8055jQuery(leform).ajaxFormUnbind().find('input[name="var_ajax"]').remove();
8056var msg="Erreur";
8057if(typeof(error_on_ajaxform)!=="undefined")msg=error_on_ajaxform;
8058jQuery(leform).prepend("<p class='error ajax-error none'>"+msg+"</p>").find('.ajax-error').show('fast');
8059jQuery(cible).closest('.ajax-form-container').endLoading(true);
8060}
8061jQuery(this).prepend("<input type='hidden' name='var_ajax' value='form'>")
8062.ajaxForm({
8063beforeSubmit:function(){
8064leclk=leform.clk;
8065var scrollwhensubmit_button=true;
8066if(leclk){
8067scrollwhensubmit_button=!jQuery(leclk).is('.noscroll');
8068var n=leclk.name;
8069if(n&&!leclk.disabled&&leclk.type==="image"){
8070leclk_x=leform.clk_x;
8071leclk_y=leform.clk_y;
8072}
8073}
8074jQuery(cible).wrap('<div />');
8075cible=jQuery(cible).parent();
8076jQuery(cible).closest('.ajax-form-container').animateLoading();
8077if(scrollwhensubmit&&scrollwhensubmit_button){
8078jQuery(cible).positionner(false,false);
8079}
8080},
8081error:onError,
8082success:function(c,status,xhr,$form){
8083if(c.match(/^\s*noajax\s*$/)){
8084jQuery("input[name=var_ajax]",leform).remove();
8085if(leclk){
8086var n=leclk.name;
8087if(n&&!leclk.disabled){
8088jQuery(leform).prepend("<input type='hidden' name='"+n+"' value='"+leclk.value+"'>");
8089if(leclk.type==="image"){
8090jQuery(leform).prepend("<input type='hidden' name='"+n+".x' value='"+leform.clk_x+"'>");
8091jQuery(leform).prepend("<input type='hidden' name='"+n+".y' value='"+leform.clk_y+"'>");
8092}
8093}
8094}
8095jQuery(leform).ajaxFormUnbind().closest('.formulaire_spip').addClass('resubmit-noajax');
8096try{
8097leform.submit();
8098}catch(err){
8099var submitFn=document.createElement('form').submit;
8100submitFn.apply(leform);
8101}
8102}
8103else{
8104if(!c.length||c.indexOf("ajax-form-is-ok")==-1)
8105return onError.apply(this,[status,xhr,$form]);
8106var preloaded=jQuery.spip.preloaded_urls;
8107jQuery.spip.preloaded_urls={};
8108jQuery(cible).html(c);
8109var a=jQuery('a:first',cible).eq(0);
8110var d=jQuery('div.ajax',cible);
8111if(!d.length){
8112jQuery(cible).addClass('ajax');
8113if(!scrollwhensubmit)
8114jQuery(cible).addClass('noscroll');
8115}
8116else{
8117d.siblings('br.bugajaxie').remove();
8118cible=jQuery(":first",cible);
8119cible.unwrap();
8120}
8121if(a.length
8122&&a.is('a[name=ajax_ancre]')
8123&&jQuery(a.attr('href'),cible).length){
8124a=a.attr('href');
8125if(jQuery(a,cible).length)
8126setTimeout(function(){
8127jQuery(a,cible).positionner(false);
8128},10);
8129jQuery(cible).closest('.ajax-form-container').endLoading(true);
8130}
8131else{
8132if(a.length&&a.is('a[name=ajax_redirect]')){
8133a=a.get(0).href;
8134setTimeout(function(){
8135var cur=window.location.href.split('#');
8136document.location.replace(a);
8137if(cur[0]==a.split('#')[0]){
8138window.location.reload();
8139}
8140},10);
8141jQuery(cible).closest('.ajax-form-container').animateLoading();
8142}
8143else{
8144jQuery(cible).closest('.ajax-form-container').endLoading(true);
8145}
8146}
8147if(!jQuery('.reponse_formulaire_ok',cible).length)
8148jQuery.spip.preloaded_urls=preloaded;
8149jQuery.spip.updateReaderBuffer();
8150}
8151}
8152})
8153.addClass('noajax hasajax');
8154});
8155});
8156}
8157jQuery.fn.formulaire_verifier=function(callback,champ){
8158var erreurs={'message_erreur':'form non ajax'};
8159var me=this;
8160if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true'){
8161if(jQuery(me).is('form.hasajax')){
8162jQuery(me).ajaxSubmit({
8163dataType:"json",
8164data:{formulaire_action_verifier_json:true},
8165success:function(errs){
8166var args=[errs,champ]
8167if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true')
8168callback.apply(me,args);
8169}
8170});
8171}
8172else
8173callback.apply(me,[erreurs,champ]);
8174}
8175return this;
8176}
8177jQuery.fn.formulaire_activer_verif_auto=function(callback){
8178callback=callback||formulaire_actualiser_erreurs;
8179var me=jQuery(this).closest('.ajax-form-container');
8180var check=function(){
8181var name=jQuery(this).attr('name');
8182setTimeout(function(){me.find('form').formulaire_verifier(callback,name);},50);
8183}
8184var activer=function(){
8185if(me.find('form').attr('data-verifjson')!='on'){
8186me
8187.find('form')
8188.attr('data-verifjson','on')
8189.find('input,select,textarea')
8190.on('change',check);
8191}
8192}
8193jQuery(activer);
8194onAjaxLoad(function(){setTimeout(activer,150);});
8195}
8196function formulaire_actualiser_erreurs(erreurs){
8197var parent=jQuery(this).closest('.formulaire_spip');
8198if(!parent.length)return;
8199parent.find('.reponse_formulaire,.erreur_message').fadeOut().remove();
8200parent.find('.erreur').removeClass('erreur');
8201if(erreurs['message_ok'])
8202parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_ok">'+erreurs['message_ok']+'</p>');
8203if(erreurs['message_erreur'])
8204parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_erreur">'+erreurs['message_erreur']+'</p>');
8205for(var k in erreurs){
8206var saisie=parent.find('.editer_'+k);
8207if(saisie.length){
8208saisie.addClass('erreur');
8209saisie.find('label').after('<span class="erreur_message">'+erreurs[k]+'</span>');
8210}
8211}
8212}
8213var ajax_confirm=true;
8214var ajax_confirm_date=0;
8215var spip_confirm=window.confirm;
8216function _confirm(message){
8217ajax_confirm=spip_confirm(message);
8218if(!ajax_confirm){
8219var d=new Date();
8220ajax_confirm_date=d.getTime();
8221}
8222return ajax_confirm;
8223}
8224window.confirm=_confirm;
8225var ajaxbloc_selecteur;
8226jQuery.spip.preloaded_urls={};
8227jQuery.spip.on_ajax_loaded=function(blocfrag,c,href,history){
8228history=history||(history==null);
8229if(typeof href==undefined||href==null)
8230history=false;
8231if(history)
8232jQuery.spip.setHistoryState(blocfrag);
8233if(jQuery(blocfrag).attr('data-loaded-callback')){
8234var callback=eval(jQuery(blocfrag).attr('data-loaded-callback'));
8235callback.call(blocfrag,c,href,history);
8236}
8237else{
8238jQuery(blocfrag)
8239.html(c)
8240.endLoading();
8241}
8242if(typeof href!=undefined)
8243jQuery(blocfrag).attr('data-url',href);
8244if(history){
8245var href_history=href;
8246if(href_history.indexOf('var_nullify')!==-1){
8247href_history=parametre_url(href_history,'var_nullify','');
8248}
8249jQuery.spip.pushHistoryState(href_history);
8250jQuery.spip.setHistoryState(blocfrag);
8251}
8252var a=jQuery('a:first',jQuery(blocfrag)).eq(0);
8253if(a.length
8254&&a.is('a[name=ajax_ancre]')
8255&&jQuery(a.attr('href'),blocfrag).length){
8256a=a.attr('href');
8257jQuery(a,blocfrag).positionner(false);
8258}
8259jQuery.spip.log('on_ajax_loaded');
8260jQuery.spip.triggerAjaxLoad(blocfrag);
8261a=jQuery(blocfrag).parents('form.hasajax')
8262if(a.length)
8263a.eq(0).removeClass('noajax').parents('div.ajax').formulaire_dyn_ajax();
8264jQuery.spip.updateReaderBuffer();
8265}
8266jQuery.spip.on_ajax_failed=function(blocfrag,statusCode,href,history){
8267jQuery(blocfrag).addClass('invalid');
8268jQuery.spip.log("Echec AJAX statusCode "+statusCode)
8269history=history||(history==null);
8270if(history){
8271if(jQuery.spip.debug){
8272jQuery.spip.log("On redirige sur sur "+href)
8273}
8274else{
8275window.location.href=href;
8276}
8277}
8278}
8279jQuery.spip.stateId=0;
8280jQuery.spip.setHistoryState=function(blocfrag){
8281if(!window.history.replaceState)return;
8282if(!blocfrag.attr('id')){
8283while(jQuery('#ghsid'+jQuery.spip.stateId).length)
8284jQuery.spip.stateId++;
8285blocfrag.attr('id','ghsid'+jQuery.spip.stateId);
8286}
8287var href=blocfrag.attr('data-url')||blocfrag.attr('data-origin');
8288href=jQuery("<"+"a href='"+href+"'></a>").get(0).href;
8289var state={
8290id:blocfrag.attr('id'),
8291href:href
8292};
8293var ajaxid=blocfrag.attr('class').match(/\bajax-id-[\w-]+\b/);
8294if(ajaxid&&ajaxid.length)
8295state["ajaxid"]=ajaxid[0];
8296window.history.replaceState(state,window.document.title,window.document.location);
8297}
8298jQuery.spip.pushHistoryState=function(href,title){
8299if(!window.history.pushState)
8300return false;
8301window.history.pushState({},title,href);
8302}
8303window.onpopstate=function(popState){
8304if(popState.state&&popState.state.href){
8305var blocfrag=false;
8306if(popState.state.id){
8307blocfrag=jQuery('#'+popState.state.id);
8308}
8309if((!blocfrag||!blocfrag.length)&&popState.state.ajaxid){
8310blocfrag=jQuery('.ajaxbloc.'+popState.state.ajaxid);
8311}
8312if(blocfrag&&blocfrag.length==1){
8313jQuery.spip.ajaxClick(blocfrag,popState.state.href,{history:false});
8314return true;
8315}
8316else{
8317window.location.href=popState.state.href;
8318}
8319}
8320}
8321jQuery.spip.loadAjax=function(blocfrag,url,href,options){
8322var force=options.force||false;
8323if(jQuery(blocfrag).attr('data-loading-callback')){
8324var callback=eval(jQuery(blocfrag).attr('data-loading-callback'));
8325callback.call(blocfrag,url,href,options);
8326}
8327else{
8328jQuery(blocfrag).animateLoading();
8329}
8330if(jQuery.spip.preloaded_urls[url]&&!force){
8331if(jQuery.spip.preloaded_urls[url]=="<!--loading-->"){
8332setTimeout(function(){jQuery.spip.loadAjax(blocfrag,url,href,options);},100);
8333return;
8334}
8335jQuery.spip.on_ajax_loaded(blocfrag,jQuery.spip.preloaded_urls[url],href,options.history);
8336}else{
8337var d=new Date();
8338jQuery.spip.preloaded_urls[url]="<!--loading-->";
8339jQuery.ajax({
8340url:parametre_url(url,'var_t',d.getTime()),
8341onAjaxLoad:false,
8342success:function(c){
8343jQuery.spip.on_ajax_loaded(blocfrag,c,href,options.history);
8344jQuery.spip.preloaded_urls[url]=c;
8345if(options.callback&&typeof options.callback=="function")
8346options.callback.apply(blocfrag);
8347},
8348error:function(e){
8349jQuery.spip.preloaded_urls[url]='';
8350jQuery.spip.on_ajax_failed(blocfrag,e.status,href,options.history);
8351}
8352});
8353}
8354}
8355jQuery.spip.makeAjaxUrl=function(href,ajax_env,origin){
8356var url=href.split('#');
8357url[0]=parametre_url(url[0],'var_ajax',1);
8358url[0]=parametre_url(url[0],'var_ajax_env',ajax_env);
8359if(origin){
8360if(origin.indexOf('var_nullify')!==-1){
8361origin=parametre_url(origin,'var_nullify','');
8362}
8363var p=origin.indexOf('?');
8364var nullify=[];
8365if(p!==-1){
8366var args=origin.substring(p+1).split('&');
8367var val;
8368var arg;
8369for(var n=0;n<args.length;n++){
8370arg=args[n].split('=');
8371arg=decodeURIComponent(arg[0]);
8372p=arg.indexOf('[');
8373if(p!==-1)
8374arg=arg.substring(0,p);
8375val=parametre_url(href,arg);
8376if((typeof val=="undefined"||val==null)&&nullify.indexOf(arg)===-1){
8377nullify.push(arg);
8378}
8379}
8380if(nullify.length){
8381url[0]=url[0]+'&'+'var_nullify='+encodeURIComponent(nullify.join('|'));
8382}
8383}
8384}
8385if(url[1])
8386url[0]=parametre_url(url[0],'var_ajax_ancre',url[1]);
8387return url[0];
8388}
8389jQuery.spip.ajaxReload=function(blocfrag,options){
8390var ajax_env=blocfrag.attr('data-ajax-env');
8391if(!ajax_env||ajax_env==undefined)return;
8392var href=options.href||blocfrag.attr('data-url')||blocfrag.attr('data-origin');
8393if(href&&typeof href!=undefined){
8394if(href.indexOf('var_nullify')!==-1){
8395href=parametre_url(href,'var_nullify','');
8396}
8397options=options||{};
8398var callback=options.callback||null;
8399var history=options.history||false;
8400var args=options.args||{};
8401for(var key in args){
8402href=parametre_url(href,key,args[key]==undefined?'':args[key],'&',args[key]==undefined?false:true);
8403}
8404var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8405jQuery.spip.loadAjax(blocfrag,url,href,{force:true,callback:callback,history:history});
8406return true;
8407}
8408}
8409jQuery.spip.ajaxClick=function(blocfrag,href,options){
8410var ajax_env=blocfrag.attr('data-ajax-env');
8411if(!ajax_env||ajax_env==undefined)return;
8412if(!ajax_confirm){
8413ajax_confirm=true;
8414var d=new Date();
8415if((d.getTime()-ajax_confirm_date)<=2)
8416return false;
8417}
8418var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8419jQuery.spip.loadAjax(blocfrag,url,href,options);
8420return false;
8421}
8422jQuery.fn.ajaxbloc=function(){
8423if(this.length)
8424jQuery.spip.initReaderBuffer();
8425if(ajaxbloc_selecteur==undefined)
8426ajaxbloc_selecteur='.pagination a,a.ajax';
8427return this.each(function(){
8428jQuery('div.ajaxbloc',this).ajaxbloc();
8429var blocfrag=jQuery(this);
8430var ajax_env=blocfrag.attr('data-ajax-env');
8431if(!ajax_env||ajax_env==undefined)return;
8432blocfrag.not('.bind-ajaxReload').on('ajaxReload',function(event,options){
8433if(jQuery.spip.ajaxReload(blocfrag,options))
8434event.stopPropagation();
8435}).addClass('bind-ajaxReload');
8436jQuery(ajaxbloc_selecteur,this).not('.noajax,.bind-ajax')
8437.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)});})
8438.addClass('bind-ajax')
8439.filter('.preload').each(function(){
8440var href=this.href;
8441var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
8442if(!jQuery.spip.preloaded_urls[url]){
8443jQuery.spip.preloaded_urls[url]='<!--loading-->';
8444jQuery.ajax({url:url,onAjaxLoad:false,success:function(r){jQuery.spip.preloaded_urls[url]=r;},error:function(){jQuery.spip.preloaded_urls[url]='';}});
8445}
8446});
8447jQuery('form.bouton_action_post.ajax',this).not('.noajax,.bind-ajax').each(function(){
8448var leform=this;
8449var url=jQuery(this).attr('action').split('#');
8450var scrollwhensubmit=(!jQuery(this).is('.noscroll')&&!jQuery('.submit',this).is('.noscroll'));
8451jQuery(this)
8452.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]+"'>":""))
8453.ajaxForm({
8454beforeSubmit:function(){
8455jQuery(blocfrag).animateLoading();
8456if(scrollwhensubmit){
8457jQuery(blocfrag).positionner(false);
8458}
8459},
8460onAjaxLoad:false,
8461success:function(c){
8462jQuery.spip.on_ajax_loaded(blocfrag,c);
8463jQuery.spip.preloaded_urls={};
8464},
8465error:function(e){
8466jQuery.spip.preloaded_urls={};
8467var href=parametre_url(url,'redirect');
8468if(!href){
8469href=window.location.href;
8470}
8471jQuery.spip.on_ajax_failed(blocfrag,e.status,href,e.status===400);
8472}
8473})
8474.addClass('bind-ajax');
8475});
8476});
8477};
8478jQuery.fn.followLink=function(){
8479$(this).click();
8480if(!$(this).is('.bind-ajax'))
8481window.location.href=$(this).get(0).href;
8482return this;
8483}
8484function ajaxReload(ajaxid,options){
8485jQuery('div.ajaxbloc.ajax-id-'+ajaxid).ajaxReload(options);
8486}
8487jQuery.fn.ajaxReload=function(options){
8488options=options||{};
8489jQuery(this).trigger('ajaxReload',[options]);
8490return this;
8491}
8492jQuery.fn.animateLoading=function(){
8493this.attr('aria-busy','true').addClass('loading').children().css('opacity',0.5);
8494if(typeof ajax_image_searching!='undefined'){
8495var i=(this).find('.image_loading');
8496if(i.length)i.eq(0).html(ajax_image_searching);
8497else this.prepend('<span class="image_loading">'+ajax_image_searching+'</span>');
8498}
8499return this;
8500}
8501jQuery.fn.animeajax=jQuery.fn.animateLoading;
8502jQuery.fn.endLoading=function(hard){
8503hard=hard||false;
8504this.attr('aria-busy','false').removeClass('loading');
8505if(hard){
8506this.children().css('opacity','');
8507this.find('.image_loading').html('');
8508}
8509return this;
8510}
8511jQuery.fn.animateRemove=function(callback){
8512if(this.length){
8513var me=this;
8514var color=$("<div class='remove'></div>").css('background-color');
8515var sel=$(this);
8516if(sel.is('tr'))
8517sel=sel.add('>td',sel);
8518sel.addClass('remove').css({backgroundColor:color}).animate({opacity:"0.0"},'fast',function(){
8519sel.removeClass('remove').css({backgroundColor:''});
8520if(callback)
8521callback.apply(me);
8522});
8523}
8524return this;
8525}
8526jQuery.fn.animateAppend=function(callback){
8527if(this.length){
8528var me=this;
8529var color=$("<div class='append'></div>").css('background-color');
8530var origin=$(this).css('background-color')||'#ffffff';
8531if(origin=='transparent')origin='#ffffff';
8532var sel=$(this);
8533if(sel.is('tr'))
8534sel=sel.add('>td',sel);
8535sel.css('opacity','0.0').addClass('append').css({backgroundColor:color}).animate({opacity:"1.0"},1000,function(){
8536sel.animate({backgroundColor:origin},3000,function(){
8537sel.removeClass('append').css({backgroundColor:''});
8538if(callback)
8539callback.apply(me);
8540});
8541});
8542}
8543return this;
8544}
8545function parametre_url(url,c,v,sep,force_vide){
8546if(typeof(url)=='undefined'){
8547url='';
8548}
8549var p;
8550var ancre='';
8551var a='./';
8552var args=[];
8553p=url.indexOf('#');
8554if(p!=-1){
8555ancre=url.substring(p);
8556url=url.substring(0,p);
8557}
8558p=url.indexOf('?');
8559if(p!==-1){
8560if(p>0)a=url.substring(0,p);
8561args=url.substring(p+1).split('&');
8562}
8563else
8564a=url;
8565var regexp=new RegExp('^('+c.replace('[]','\\[\\]')+'\\[?\\]?)(=.*)?$');
8566var ajouts=[];
8567var u=(typeof(v)!=='object')?encodeURIComponent(v):v;
8568var na=[];
8569var v_read=null;
8570for(var n=0;n<args.length;n++){
8571var val=args[n];
8572try{
8573val=decodeURIComponent(val);
8574}catch(e){}
8575var r=val.match(regexp);
8576if(r&&r.length){
8577if(v==null){
8578if(r[1].substr(-2)=='[]'){
8579if(!v_read)v_read=[];
8580v_read.push((r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):'');
8581}
8582else{
8583return(r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):'';
8584}
8585}
8586else if(!v.length){
8587}
8588else if(r[1].substr(-2)!='[]'){
8589na.push(r[1]+'='+u);
8590ajouts.push(r[1]);
8591}
8592}
8593else
8594na.push(args[n]);
8595}
8596if(v==null)return v_read;
8597if(v||v.length||force_vide){
8598ajouts="="+ajouts.join("=")+"=";
8599var all=c.split('|');
8600for(n=0;n<all.length;n++){
8601if(ajouts.search("="+all[n]+"=")==-1){
8602if(typeof(v)!=='object'){
8603na.push(all[n]+'='+u);
8604}
8605else{
8606var id=((all[n].substring(-2)=='[]')?all[n]:all[n]+"[]");
8607for(p=0;p<v.length;p++)
8608na.push(id+'='+encodeURIComponent(v[p]));
8609}
8610}
8611}
8612}
8613if(na.length){
8614if(!sep)sep='&';
8615a=a+"?"+na.join(sep);
8616}
8617return a+ancre;
8618}
8619function spip_logo_survol_hover(){
8620var me=jQuery(this);
8621if(me.attr('data-src-hover')){
8622me.attr('data-src-original',me.attr('src'));
8623me.attr('src',me.attr('data-src-hover'));
8624}
8625}
8626function spip_logo_survol_out(){
8627var me=jQuery(this);
8628if(me.attr('data-src-original')){
8629me.attr('src',me.attr('data-src-original'));
8630}
8631}
8632function disableClickAfterFormSubmit(){
8633if(jQuery(this).is('.processing-submitted-form')){
8634return false;
8635}
8636jQuery(this)
8637.addClass('processing-submitted-form')
8638.find('button[type="submit"]')
8639.attr('disabled','disabled')
8640.addClass('disabled')
8641}
8642function puce_enable_survol(){
8643jQuery('span.puce_objet_popup a',this).not('.puce-survol-enabled').click(function(){
8644selec_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'));
8645return false;
8646}).addClass('puce-survol-enabled');
8647jQuery('span.puce_objet',this).not('.puce-survol-enabled').mouseover(function(){
8648if(!this.puce_loaded){
8649this.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'));
8650}
8651}).addClass('puce-survol-enabled');
8652}
8653if(!window.var_zajax_content)
8654window.var_zajax_content='contenu';
8655jQuery(function(){
8656jQuery('form:not(.bouton_action_post)').parents('div.ajax')
8657.formulaire_dyn_ajax();
8658jQuery('div.ajaxbloc').ajaxbloc();
8659jQuery("input[placeholder]:text").placeholderLabel();
8660jQuery('.spip_logo_survol').hover(spip_logo_survol_hover,spip_logo_survol_out);
8661puce_enable_survol.apply(this);
8662jQuery('body').on('submit','form.bouton_action_post',disableClickAfterFormSubmit);
8663});
8664onAjaxLoad(function(){
8665if(jQuery){
8666jQuery('form:not(.bouton_action_post)',this).parents('div.ajax')
8667.formulaire_dyn_ajax();
8668if(jQuery(this).is('div.ajaxbloc'))
8669jQuery(this).ajaxbloc();
8670else if(jQuery(this).closest('div.ajaxbloc').length)
8671jQuery(this).closest('div.ajaxbloc').ajaxbloc();
8672else
8673jQuery('div.ajaxbloc',this).ajaxbloc();
8674jQuery("input[placeholder]:text",this).placeholderLabel();
8675jQuery('.spip_logo_survol',this).hover(spip_logo_survol_hover,spip_logo_survol_out);
8676puce_enable_survol.apply(this);
8677}
8678});
8679
8680
8681/* prive/javascript/js.cookie.js?1788424554 */
8682
8683;
8684(function(global,factory){
8685typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():
8686typeof define==='function'&&define.amd?define(factory):
8687(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){
8688var current=global.Cookies;
8689var exports=global.Cookies=factory();
8690exports.noConflict=function(){global.Cookies=current;return exports;};
8691})());
8692})(this,(function(){'use strict';
8693function assign(target){
8694for(var i=1;i<arguments.length;i++){
8695var source=arguments[i];
8696for(var key in source){
8697target[key]=source[key];
8698}
8699}
8700return target
8701}
8702var defaultConverter={
8703read:function(value){
8704if(value[0]==='"'){
8705value=value.slice(1,-1);
8706}
8707return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)
8708},
8709write:function(value){
8710return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
8711decodeURIComponent
8712)
8713}
8714};
8715function init(converter,defaultAttributes){
8716function set(name,value,attributes){
8717if(typeof document==='undefined'){
8718return
8719}
8720attributes=assign({},defaultAttributes,attributes);
8721if(typeof attributes.expires==='number'){
8722attributes.expires=new Date(Date.now()+attributes.expires*864e5);
8723}
8724if(attributes.expires){
8725attributes.expires=attributes.expires.toUTCString();
8726}
8727name=encodeURIComponent(name)
8728.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent)
8729.replace(/[()]/g,escape);
8730var stringifiedAttributes='';
8731for(var attributeName in attributes){
8732if(!attributes[attributeName]){
8733continue
8734}
8735stringifiedAttributes+='; '+attributeName;
8736if(attributes[attributeName]===true){
8737continue
8738}
8739stringifiedAttributes+='='+attributes[attributeName].split(';')[0];
8740}
8741return(document.cookie=
8742name+'='+converter.write(value,name)+stringifiedAttributes)
8743}
8744function get(name){
8745if(typeof document==='undefined'||(arguments.length&&!name)){
8746return
8747}
8748var cookies=document.cookie?document.cookie.split('; '):[];
8749var jar={};
8750for(var i=0;i<cookies.length;i++){
8751var parts=cookies[i].split('=');
8752var value=parts.slice(1).join('=');
8753try{
8754var found=decodeURIComponent(parts[0]);
8755jar[found]=converter.read(value,found);
8756if(name===found){
8757break
8758}
8759}catch(e){}
8760}
8761return name?jar[name]:jar
8762}
8763return Object.create(
8764{
8765set,
8766get,
8767remove:function(name,attributes){
8768set(
8769name,
8770'',
8771assign({},attributes,{
8772expires:-1
8773})
8774);
8775},
8776withAttributes:function(attributes){
8777return init(this.converter,assign({},this.attributes,attributes))
8778},
8779withConverter:function(converter){
8780return init(assign({},this.converter,converter),this.attributes)
8781}
8782},
8783{
8784attributes:{value:Object.freeze(defaultAttributes)},
8785converter:{value:Object.freeze(converter)}
8786}
8787)
8788}
8789var api=init(defaultConverter,{path:'/'});
8790return api;
8791}));
8792
8793
8794/* plugins-dist/vtimeline/javascript/vertical-timeline.js?1788424598 */
8795
8796(function($){
8797var checkViewport=function(elem){
8798var rect=elem.getBoundingClientRect();
8799return(
8800rect.top>=0&&
8801rect.left>=0&&
8802rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&
8803rect.right<=(window.innerWidth||document.documentElement.clientWidth)
8804);
8805}
8806$.fn.verticalTimeline=function(options){
8807var settings=$.extend({
8808startSide:'left',
8809alternate:true,
8810animate:null,
8811theme:null,
8812addMarkup:null
8813},options);
8814return this.each(function(){
8815$this=$(this);
8816$userContent=$this.children('div');
8817$this.addClass('vtimeline');
8818$userContent.each(function(){
8819if(settings.addMarkup===true){
8820$(this).addClass('vtimeline-content')
8821.wrap('<div class="vtimeline-point"><div class="vtimeline-block"></div></div>');
8822}
8823}
8823);
8824$this.find('.vtimeline-point').each(function(){
8825if(settings.addMarkup===true){
8826$(this).prepend('<div class="vtimeline-icon"></div>');
8827}
8828});
8829if(!settings.alternate){
8830$this.addClass('vtimeline-align-'+settings.startSide);
8831}
8832if(settings.alternate&&settings.startSide=='left'){
8833$this.find('.vtimeline-point:odd').each(function(){
8834$(this).addClass('vtimeline-right');
8835});
8836}else if(settings.alternate&&settings.startSide=='right'){
8837$this.find('.vtimeline-point:even').each(function(){
8838$(this).addClass('vtimeline-right');
8839});
8840}
8841$this.find('.vtimeline-content').each(function(){
8842if(settings.addMarkup===true){
8843var date=$(this).data('vtdate');
8844if($(this).data('vtdate')){
8845$(this).parent().prepend('<time class="vtimeline-date">'+date+'</time>');
8846}
8847}
8848});
8849if(settings.animate=="fade"){
8850var animateType=settings.animate;
8851$this.find('.vtimeline-block').addClass("vt-"+animateType);
8852$this.find('.vtimeline-block.vt-'+animateType).each(function(){
8853if(checkViewport($(this)[0])){
8854$(this).removeClass("vt-"+animateType);
8855}
8856});
8857$(window).on("scroll",function(){
8858$this.find('.vtimeline-block.vt-'+animateType).each(function(){
8859if(checkViewport($(this)[0])){
8860$(this).removeClass("vt-"+animateType);
8861}
8862});
8863});
8864}
8865});
8866};
8867}(jQuery));
8868
8869
8870/* plugins-dist/mediabox/lib/lity/lity.js?1788424553 */
8871
8872(function(window,factory){
8873if(typeof define==='function'&&define.amd){
8874define(['jquery'],function($){
8875return factory(window,$);
8876});
8877}else if(typeof module==='object'&&typeof module.exports==='object'){
8878module.exports=factory(window,require('jquery'));
8879}else{
8880window.lity=factory(window,window.jQuery||window.Zepto);
8881}
8882}(typeof window!=="undefined"?window:this,function(window,$){
8883'use strict';
8884var document=window.document;
8885var _win=$(window);
8886var _deferred=$.Deferred;
8887var _html=$('html');
8888var _instances=[];
8889var _attrAriaHidden='aria-hidden';
8890var _dataAriaHidden='lity-'+_attrAriaHidden;
8891var _focusableElementsSelector='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])';
8892var _defaultOptions={
8893esc:true,
8894handler:null,
8895handlers:{
8896image:imageHandler,
8897inline:inlineHandler,
8898iframe:iframeHandler
8899},
8900forceFocusInside:false,
8901template:'<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>'
8902};
8903var _imageRegexp=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i;
8904var _transitionEndEvent=(function(){
8905var el=document.createElement('div');
8906var transEndEventNames={
8907WebkitTransition:'webkitTransitionEnd',
8908MozTransition:'transitionend',
8909OTransition:'oTransitionEnd otransitionend',
8910transition:'transitionend'
8911};
8912for(var name in transEndEventNames){
8913if(el.style[name]!==undefined){
8914return transEndEventNames[name];
8915}
8916}
8917return false;
8918})();
8919function transitionEnd(element){
8920var deferred=_deferred();
8921if(!_transitionEndEvent||!element.length){
8922deferred.resolve();
8923}else{
8924element.one(_transitionEndEvent,deferred.resolve);
8925setTimeout(deferred.resolve,500);
8926}
8927return deferred.promise();
8928}
8929function settings(currSettings,key,value){
8930if(arguments.length===1){
8931return $.extend({},currSettings);
8932}
8933if(typeof key==='string'){
8934if(typeof value==='undefined'){
8935return typeof currSettings[key]==='undefined'
8936?null
8937:currSettings[key];
8938}
8939currSettings[key]=value;
8940}else{
8941$.extend(currSettings,key);
8942}
8943return this;
8944}
8945function parseQueryParams(params){
8946var pos=params.indexOf('?');
8947if(pos>-1){
8948params=params.substr(pos+1);
8949}
8950var pairs=decodeURI(params.split('#')[0]).split('&');
8951var obj={},p;
8952for(var i=0,n=pairs.length;i<n;i++){
8953if(!pairs[i]){
8954continue;
8955}
8956p=pairs[i].split('=');
8957obj[p[0]]=p[1];
8958}
8959return obj;
8960}
8961function appendQueryParams(url,params){
8962if(!params){
8963return url;
8964}
8965if('string'===$.type(params)){
8966params=parseQueryParams(params);
8967}
8968if(url.indexOf('?')>-1){
8969var split=url.split('?');
8970url=split.shift();
8971params=$.extend(
8972{},
8973parseQueryParams(split[0]),
8974params
8975)
8976}
8977return url+'?'+$.param(params);
8978}
8979function transferHash(originalUrl,newUrl){
8980var pos=originalUrl.indexOf('#');
8981if(-1===pos){
8982return newUrl;
8983}
8984if(pos>0){
8985originalUrl=originalUrl.substr(pos);
8986}
8987return newUrl+originalUrl;
8988}
8989function iframe(iframeUrl,instance,queryParams,hashUrl){
8990instance&&instance.element().addClass('lity-iframe');
8991if(queryParams){
8992iframeUrl=appendQueryParams(iframeUrl,queryParams);
8993}
8994if(hashUrl){
8995iframeUrl=transferHash(hashUrl,iframeUrl);
8996}
8997return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+iframeUrl+'"/></div>';
8998}
8999function error(msg){
9000return $('<span class="lity-error"></span>').append(msg);
9001}
9002function imageHandler(target,instance){
9003var desc=(instance.opener()&&instance.opener().data('lity-desc'))||'Image with no description';
9004var img=$('<img src="'+target+'" alt="'+desc+'"/>');
9005var deferred=_deferred();
9006var failed=function(){
9007deferred.reject(error('Failed loading image'));
9008};
9009img
9010.on('load',function(){
vendor: 4,416 bytes, lines 9011-9237
9011if(this.naturalWidth===0){
9012return failed();
9013}
9014deferred.resolve(img);
9015})
9016.on('error',failed)
9017;
9018return deferred.promise();
9019}
9020imageHandler.test=function(target){
9021return _imageRegexp.test(target);
9022};
9023function inlineHandler(target,instance){
9024var el,placeholder,hasHideClass;
9025try{
9026el=$(target);
9027}catch(e){
9028return false;
9029}
9030if(!el.length){
9031return false;
9032}
9033placeholder=$('<i style="display:none !important"></i>');
9034hasHideClass=el.hasClass('lity-hide');
9035instance
9036.element()
9037.one('lity:remove',function(){
9038placeholder
9039.before(el)
9040.remove()
9041;
9042if(hasHideClass&&!el.closest('.lity-content').length){
9043el.addClass('lity-hide');
9044}
9045})
9046;
9047return el
9048.removeClass('lity-hide')
9049.after(placeholder)
9050;
9051}
9052function iframeHandler(target,instance){
9053return iframe(target,instance);
9054}
9055function winHeight(){
9056return document.documentElement.clientHeight
9057?document.documentElement.clientHeight
9058:Math.round(_win.height());
9059}
9060function keydown(e){
9061var current=currentInstance();
9062if(!current){
9063return;
9064}
9065if(e.keyCode===27&&!!current.options('esc')){
9066current.close();
9067}
9068if(e.keyCode===9){
9069handleTabKey(e,current);
9070}
9071}
9072function handleTabKey(e,instance){
9073var focusableElements=instance.element().find(_focusableElementsSelector);
9074var focusedIndex=focusableElements.index(document.activeElement);
9075if(e.shiftKey&&focusedIndex<=0){
9076focusableElements.get(focusableElements.length-1).focus();
9077e.preventDefault();
9078}else if(!e.shiftKey&&focusedIndex===focusableElements.length-1){
9079focusableElements.get(0).focus();
9080e.preventDefault();
9081}
9082if(focusedIndex===-1&&instance.options().forceFocusInside){
9083focusableElements.get(0).focus();
9084e.preventDefault();
9085}
9086}
9087function resize(){
9088$.each(_instances,function(i,instance){
9089instance.resize();
9090});
9091}
9092function registerInstance(instanceToRegister){
9093if(1===_instances.unshift(instanceToRegister)){
9094_html.addClass('lity-active');
9095_win
9096.on({
9097resize:resize,
9098keydown:keydown
9099})
9100;
9101}
9102$('body > *').not(instanceToRegister.element())
9103.addClass('lity-hidden')
9104.each(function(){
9105var el=$(this);
9106if(undefined!==el.data(_dataAriaHidden)){
9107return;
9108}
9109el.data(_dataAriaHidden,el.attr(_attrAriaHidden)||null);
9110})
9111.attr(_attrAriaHidden,'true')
9112;
9113}
9114function removeInstance(instanceToRemove){
9115var show;
9116instanceToRemove
9117.element()
9118.attr(_attrAriaHidden,'true')
9119;
9120if(1===_instances.length){
9121_html.removeClass('lity-active');
9122_win
9123.off({
9124resize:resize,
9125keydown:keydown
9126})
9127;
9128}
9129_instances=$.grep(_instances,function(instance){
9130return instanceToRemove!==instance;
9131});
9132if(!!_instances.length){
9133show=_instances[0].element();
9134}else{
9135show=$('.lity-hidden');
9136}
9137show
9138.removeClass('lity-hidden')
9139.each(function(){
9140var el=$(this),oldAttr=el.data(_dataAriaHidden);
9141if(!oldAttr){
9142el.removeAttr(_attrAriaHidden);
9143}else{
9144el.attr(_attrAriaHidden,oldAttr);
9145}
9146el.removeData(_dataAriaHidden);
9147})
9148;
9149}
9150function currentInstance(){
9151if(0===_instances.length){
9152return null;
9153}
9154return _instances[0];
9155}
9156function factory(target,instance,handlers,preferredHandler){
9157var handler='inline',content;
9158var currentHandlers=$.extend({},handlers);
9159if(preferredHandler&&currentHandlers[preferredHandler]){
9160content=currentHandlers[preferredHandler](target,instance);
9161handler=preferredHandler;
9162}else{
9163$.each(['inline','iframe'],function(i,name){
9164delete currentHandlers[name];
9165currentHandlers[name]=handlers[name];
9166});
9167$.each(currentHandlers,function(name,currentHandler){
9168if(!currentHandler){
9169return true;
9170}
9171if(
9172currentHandler.test&&
9173!currentHandler.test(target,instance)
9174){
9175return true;
9176}
9177content=currentHandler(target,instance);
9178if(false!==content){
9179handler=name;
9180return false;
9181}
9182});
9183}
9184return{handler:handler,content:content||''};
9185}
9186function Lity(target,options,opener,activeElement){
9187var self=this;
9188var result;
9189var isReady=false;
9190var isClosed=false;
9191var element;
9192var content;
9193options=$.extend(
9194{},
9195_defaultOptions,
9196options
9197);
9198element=$(options.template);
9199self.element=function(){
9200return element;
9201};
9202self.opener=function(){
9203return opener;
9204};
9205self.content=function(){
9206return content;
9207};
9208self.options=$.proxy(settings,self,options);
9209self.handlers=$.proxy(settings,self,options.handlers);
9210self.resize=function(){
9211if(!isReady||isClosed){
9212return;
9213}
9214content
9215.css('max-height',winHeight()+'px')
9216.trigger('lity:resize',[self])
9217;
9218};
9219self.close=function(){
9220if(isClosed){
9221return;
9222}
9223isClosed=true;
9224removeInstance(self);
9225var deferred=_deferred();
9226if(
9227activeElement&&
9228(
9229document.activeElement===element[0]||
9230$.contains(element[0],document.activeElement)
9231)
9232){
9233try{
9234activeElement.focus();
9235}catch(e){
9236}
9237}
9238var trigerable=(content?content:element);
9239trigerable.trigger('lity:close',[self]);
9240element
9241.removeClass('lity-opened')
9242.addClass('lity-closed')
9243;
9244transitionEnd(trigerable.add(element))
9245.always(function(){
9246trigerable.trigger('lity:remove',[self]);
9247element.remove();
9248element=undefined;
9249deferred.resolve();
9250})
9251;
9252return deferred.promise();
9253};
9254result=factory(target,self,options.handlers,options.handler);
9255element
9256.attr(_attrAriaHidden,'false')
9257.addClass('lity-loading lity-opened lity-'+result.handler)
9258.appendTo('body')
9259.focus()
9260.on('click','[data-lity-close]',function(e){
9261if($(e.target).is('[data-lity-close]')){
9262self.close();
9263}
9264})
9265.trigger('lity:open',[self])
9266;
9267registerInstance(self);
9268$.when(result.content)
9269.always(ready)
9270;
9271function ready(result){
9272if(isClosed){
9273return;
9274}
9275content=$(result)
9276.css('max-height',winHeight()+'px')
9277;
9278element
9279.find('.lity-loader')
9280.each(function(){
9281var loader=$(this);
9282transitionEnd(loader)
9283.always(function(){
9284loader.remove();
9285})
9286;
9287})
9288;
9289element
9290.removeClass('lity-loading')
9291.find('.lity-content')
9292.empty()
9293.append(content)
9294;
9295isReady=true;
9296content
9297.trigger('lity:ready',[self])
9298;
9299}
9300}
9301function lity(target,options,opener){
9302if(!target.preventDefault){
9303opener=$(opener);
9304}else{
9305target.preventDefault();
9306opener=$(this);
9307target=opener.data('lity-target')||opener.attr('href')||opener.attr('src');
9308}
9309var instance=new Lity(
9310target,
9311$.extend(
9312{},
9313opener.data('lity-options')||opener.data('lity'),
9314options
9315),
9316opener,
9317document.activeElement
9318);
9319if(!target.preventDefault){
9320return instance;
9321}
9322}
9323lity.version='3.0.0-dev';
9324lity.options=$.proxy(settings,lity,_defaultOptions);
9325lity.handlers=$.proxy(settings,lity,_defaultOptions.handlers);
9326lity.current=currentInstance;
9327lity.iframe=iframe;
9328$(document).on('click.lity','[data-lity]',lity);
9329return lity;
9330}));
9331
9332
9333/* plugins-dist/mediabox/lity/js/lity.mediabox.js?1788424597 */
9334;
9335(function($){
9336var litySpip={
9337nameSpace:'mediabox',
9338config:{
9339forceFocusInside:true,
9340},
9341strings:{
9342},
9343callbacks:{
9344onOpen:[],
9345onShow:[],
9346onClose:[]
9347},
9348focusedItem:[],
9349isTransition:false,
9350adjustHeight:function(instance){
9351var $content=instance.content();
9352var $containerHeight=instance.element().find('.lity-container').height();
9353if($containerHeight){
9354var h=Math.round($containerHeight)+'px';
9355$content
9356.css('max-height',h)
9357.find('[data-'+litySpip.nameSpace+'-force-max-height]')
9358.css('max-height',h);
9359}
9360},
9361template:function(cfg,type,groupName,groupPosition,groupLength){
9362var className='';
9363if(!!cfg.className){
9364className=' '+cfg.className;
9365}
9366if(cfg.transitionOnOpen){
9367className+=' lity-transition-on-open-'+cfg.transitionOnOpen;
9368}
9369if(!!cfg.noTransition){
9370className+=' lity-no-transition';
9371}
9372if(!!cfg.slideShow){
9373className+=' lity-slideshow';
9374}
9375var styles=[];
9376var styles_container='';
9377var styles_content='';
9378if(cfg.sideBar){
9379className+=' lity-sidebar lity-sidebar-'+cfg.sideBar;
9380if(cfg.sideBar==='start'||cfg.sideBar==='end'){
9381className+=' lity-sidebar-inline';
9382cfg.height='100vh';
9383cfg.maxHeight='100vh';
9384}
9385if(cfg.sideBar==='top'||cfg.sideBar==='bottom'){
9386className+=' lity-sidebar-block';
9387cfg.width='100vw';
9388cfg.maxWidth='100vw';
9389}
9390}
9391if(cfg.maxWidth){
9392styles.push("max-width:"+cfg.maxWidth.replace("%","vw"));
9393}
9394if(cfg.maxHeight){
9395styles.push("max-height:"+cfg.maxHeight.replace("%","vh"));
9396}
9397if(cfg.width){
9398styles.push("width:"+cfg.width.replace("%","vw"));
9399className+=' lity-width-set';
9400}
9401if(cfg.height){
9402styles.push("height:"+cfg.height.replace("%","vh"));
9403className+=' lity-height-set';
9404if(cfg.minHeight){
9405styles.push("min-height:"+cfg.minHeight.replace("%","vh"));
9406}
9407}
9408if(styles.length){
9409styles_container=' style="'+styles.join(';')+'"';
9410}
9411styles=[];
9412var max;
9413if(cfg.minWidth){
9414max=(cfg.maxWidth?cfg.maxWidth.replace("%","vw"):'95vw');
9415styles.push("min-width:min("+max+","+cfg.minWidth.replace("%","vw")+')');
9416}
9417if(cfg.minHeight&&!cfg.height){
9418max=(cfg.maxHeight?cfg.maxHeight.replace("%","vw"):'95vh');
9419styles.push("min-height:min("+max+","+cfg.minHeight.replace("%","vh")+')');
9420}
9421if(styles.length){
9422styles_content=' style="'+styles.join(';')+'"';
9423}
9424var button_next_prev='',
9425button_start_stop='',
9426group_info_text='',
9427group_info='';
9428if(groupName&&groupLength){
9429if(groupLength>1){
9430var newPosition=(groupPosition<=0?groupLength-1:groupPosition-1);
9431button_next_prev+='<button class="lity-previous" type="button" data-group-name="'+groupName+'" data-group-position="'+newPosition+'" aria-label="'+litySpip.strings.previous+'" data-lity-previous'
9432+'><b title="'+litySpip.strings.previous+'">❮</b></button>';
9433newPosition=(groupPosition>=groupLength-1?0:groupPosition+1);
9434button_next_prev+='<button class="lity-next" type="button" data-group-name="'+groupName+'" data-group-position="'+newPosition+'"  aria-label="'+litySpip.strings.next+'" data-lity-next'
9435+'><b title="'+litySpip.strings.next+'">❯</b></button>';
9436}
9437group_info_text=" "+litySpip.strings.current;
9438group_info_text=group_info_text.replace('{current}',(groupPosition+1)+'');
9439group_info_text=group_info_text.replace('{total}',groupLength+'');
9440button_start_stop+='<button class="lity-start-stop" type="button" data-lity-stop-start>'
9441+'<b class="lity-start" aria-label="'+litySpip.strings.slideshowStart+'" title="'+litySpip.strings.slideshowStart+'">▶</b>'
9442+'<b class="lity-stop" aria-label="'+litySpip.strings.slideshowStop+'" title="'+litySpip.strings.slideshowStop+'">□</b>'
9443+'</button>';
9444group_info='<div class="lity-group-caption">'
9445+'<span class="lity-group-start-stop">'+button_start_stop+'</span>'
9446+'<span class="lity-group-current">'+group_info_text+'</span>'
9447+'<span class="lity-group-next-prev">'+button_next_prev+'</span>'
9448+'<span class="lity-group-progress-bar"><span class="lity-group-progress-bar-status" style="width:0"></span></span>'
9449+'</div>';
9450}
9451var close_button_aria_label=litySpip.strings.close+' ('+litySpip.strings.press_escape+')';
9452var dialog_title=(type==='image'?litySpip.strings.dialog_title_med:litySpip.strings.dialog_title_def);
9453dialog_title+=group_info_text+' ('+litySpip.strings.press_escape+')';
9454var t=
9455'<dialog class="box_mediabox box_modalbox lity'+className+'" role="dialog" aria-label="'+dialog_title+'" tabindex="-1">'
9456+'<div class="lity-wrap"'+(cfg.overlayClose===false?'':' data-lity-close')+' role="document">'
9457+'<div class="lity-loader" aria-hidden="true" aria-label="'+litySpip.strings.loading+'"><span class="box-loading"></span></div>'
9458+'<div class="lity-container"'+styles_container+'>'
9459+'<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>'
9460+'<div class="lity-content"'+styles_content+'></div>'
9461+group_info
9462+'</div>'
9463+'</div>'
9464+'</dialog>';
9465return t;
9466},
9467failHandler:function(target,instance){
9468return'<div class="error lity-error">Failed loading content</div>';
9469},
9470ajaxHandler:function(target,instance){
9471var selector,
9472off=target.indexOf(" ");
9473if(off>-1){
9474selector=target.slice(off);
9475selector=selector.match(/[^\x20\t\r\n\f]+/g)||[];
9476selector=selector.join(" ");
9477target=target.slice(0,off);
9478}
9479if(jQuery.spip.preloaded_urls[target]){
9480var content=jQuery.spip.preloaded_urls[target];
9481if(selector){
9482content=$("<div>").append($.parseHTML(content)).find(selector);
9483}
9484return $('<div class="lity-content-inner"></div>').append(content);
9485}
9486var _deferred=$.Deferred;
9487var deferred=_deferred();
9488var failed=function(){
9489deferred.reject($('<span class="error lity-error"></span>').append('Failed loading ajax'));
9490};
9491$.get(target)
9492.done(function(content){
9493jQuery.spip.preloaded_urls[target]=content;
9494if(selector){
9495content=$("<div>").append($.parseHTML(content)).find(selector);
9496}
9497deferred.resolve($('<div class="lity-content-inner"></div>').append(content));
9498})
9499.fail(failed);
9500return deferred.promise();
9501},
9502imageBuildContent:function(img,desc,longdesc,defaultCaptionClass){
9503img.attr('alt',desc?desc:'');
9504desc=(longdesc?longdesc:desc);
9505if(desc){
9506defaultCaptionClass=(defaultCaptionClass?defaultCaptionClass:'expanded');
9507var id='lity-image-caption-'+Date.now().toString(36)+Math.random().toString(36).substr(2);
9508img.attr('aria-describedby',id);
9509img=$('<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>');
9510}
9511else{
9512img=$('<figure class="lity-image-figure"></figure>').append(img);
9513}
9514return img;
9515},
9516imageHandler:function(target,instance){
9517var _deferred=$.Deferred;
9518var desc='';
9519var longdesc='';
9520var defaultCaptionClass=(instance.options().defaultCaptionState==='min'?'min':'expanded');
9521var opener=instance.opener();
9522if(opener){
9523desc=opener.attr('title')||$('img[alt]',opener).eq(0).attr('alt')||'';
9524var by=opener.attr('aria-describedby')||$('img[aria-describedby]',opener).eq(0).attr('aria-describedby')||'';
9525if(by){
9526longdesc=$('#'+by).html();
9527longdesc=longdesc.trim();
9528}
9529if(!desc){
9530desc=desc||instance.opener().attr('aria-label')||'';
9531}
9532desc=desc.trim();
9533}
9534var img;
9535var cache=opener.data('lity-image-cache')||{};
9536if(cache[target]){
9537img=cache[target];
9538img=litySpip.imageBuildContent(img,desc,longdesc,defaultCaptionClass);
9539return img;
9540}
9541img=$('<img src="'+target+'" class="lity-image-img" data-'+litySpip.nameSpace+'-force-max-height />');
9542var deferred=_deferred();
9543var failed=function(){
9544deferred.reject($('<span class="error lity-error"></span>').append('Failed loading image'));
9545};
9546img
9547.on('load',function(){
9548if(this.naturalWidth===0){
9549img.attr("style","width:25vw;");
9550}
9551cache[target]=img;
9552opener.data('lity-image-cache',cache);
9553deferred.resolve(litySpip.imageBuildContent(img,desc,longdesc,defaultCaptionClass));
9554})
9555.on('error',failed)
9556;
9557return deferred.promise();
9558},
9559groupElements:function(groupName){
9560return $('.lity-enabled[data-'+litySpip.nameSpace+'-group'+'='+groupName+']');
9561},
9562eventSet:{},
9563setEvents:function(what){
9564if(!litySpip.eventSet[what]){
9565switch(what){
9566case'opener':
9567$(document).on('click','.lity-enabled',litySpip.onClickOpener);
9568break;
9569case'listener':
9570$(document).on('click','.lity-previous,.lity-next',litySpip.onPrevNext);
9571$(document).on('click','.lity-start-stop',litySpip.onSlideShowToggle);
9572$(window).on('keyup',litySpip.onKeyUp);
9573$(document).on('click','.lity-image-caption',litySpip.onCaptionToggle);
9574break;
9575}
9576litySpip.eventSet[what]=true;
9577}
9578},
9579onKeyUp:function(event){
9580var c={37:"previous",39:"next"}[event.keyCode];
9581if(c){
9582var current=lity.current();
9583if(current){
9584jQuery('.lity-'+c,current.element()).trigger('click');
9585}
9586}
9587},
9588onCaptionToggle:function(event){
9589var $caption=$(this);
9590$caption.toggleClass('min expanded');
9591},
9592openerFromPrevNext($button){
9593var groupName=$button.data('group-name');
9594var groupPosition=$button.data('group-position');
9595return litySpip.groupElements(groupName).eq(groupPosition);
9596},
9597onPrevNext:function(event){
9598var $button=$(this);
9599var newEl=litySpip.openerFromPrevNext($button);
9600if(newEl){
9601var element=lity.current().element();
9602litySpip.isTransition={oldClosed:false,newOpened:true};
9603element.addClass('lity-no-transition').css('visibility','hidden');
9604litySpip.slideshowStop(element);
9605var options={transitionOnOpen:$button.is('.lity-next')?'slide-from-right':'slide-from-left'};
9606if(element.is('.lity-slideshow')){
9607options.slideShow=true;
9608}
9609lity.current().close();
9610litySpip.elementOpener(newEl,options);
9611}
9612},
9613slideshowStart:function(element){
9614var $progress=element.find('.lity-group-progress-bar-status');
9615$progress.attr('style','');
9616$progress.css('width','100%');
9617var delay=litySpip.config.slideshowSpeed;
9618setTimeout(function(){
9619$progress.css('transition','width '+((delay-200)/1000)+'s linear');
9620$progress.css('width','0');
9621},200);
9622timer=setTimeout(function(){element.find('.lity-next').trigger('click')},delay);
9623element.data('lity-timer',timer);
9624$('.lity-start',element).attr('aria-hidden','true');
9625$('.lity-stop',element).attr('aria-hidden','false');
9626jQuery('.lity-start-stop',element).focus();
9627},
9628slideshowStop:function(element){
9629timer=element.data('lity-timer');
9630if(timer){
9631clearTimeout(timer);
9632}
9633},
9634onSlideShowToggle:function(event){
9635var $button=$(this);
9636var element=$button.closest('.lity');
9637var slideShowState=(element.is('.lity-slideshow')?true:false);
9638var timer;
9639if(!slideShowState){
9640litySpip.slideshowStart(element);
9641}
9642else{
9643litySpip.slideshowStop(element);
9644$('.lity-start',element).attr('aria-hidden','false');
9645$('.lity-stop',element).attr('aria-hidden','true');
9646}
9647element.toggleClass('lity-slideshow');
9648},
9649onClickOpener:function(event){
9650event.preventDefault();
9651var opener=$(this);
9652litySpip.elementOpener(opener);
9653},
9654elementOpener:function(opener,options){
9655var cfg=opener.data('mediabox-options');
9656if(options){
9657cfg=$.extend({},cfg,options);
9658}
9659var target=opener.data('href-popin')||opener.data('href')||opener.attr('href')||opener.attr('src');
9660litySpip.lityOpener(target,cfg,opener.get(0));
9661},
9662lityOpener:function(target,cfg,opener){
9663litySpip.setEvents('listener');
9664if(!litySpip.isTransition){
9665litySpip.callbacks.onOpen.push(cfg.onOpen||false);
9666litySpip.callbacks.onShow.push(cfg.onShow||false);
9667litySpip.callbacks.onClose.push(cfg.onClose||false);
9668litySpip.focusedItem.push($(document.activeElement));
9669}
9670var type=cfg.type||'';
9671if(!type&&opener){
9672type=$(opener).data(litySpip.nameSpace+'-type')||'';
9673}
9674var handlers=lity.handlers();
9675if(type==='ajax'){
9676handlers.ajax=litySpip.ajaxHandler;
9677}
9678handlers.image=litySpip.imageHandler;
9679if(type==='inline'){
9680var el=[];
9681try{
9682el=$(target);
9683}catch(e){
9684el=[];
9685}
9686if(!el.length){
9687handlers.inline=litySpip.failHandler;
9688}
9689}
9690cfg=$.extend({handlers:handlers},cfg);
9691if(type&&['image','inline','ajax','iframe'].indexOf(type)!==-1){
9692cfg.handler=type;
9693}
9694if(opener&&typeof($.parseMediaboxOptions)!=="undefined"){
9695cfg=$.extend(cfg,$.parseMediaboxOptions(litySpip.nameSpace,opener));
9696}
9697if(!!cfg.preloadOnly){
9698litySpip.lityPreLoader(target,cfg,opener);
9699}
9700else{
9701var groupPosition=0;
9702var groupLength=0;
9703if(opener){
9704var groupName=cfg.rel||(opener?$(opener).data(litySpip.nameSpace+'-group'):'');
9705if(groupName){
9706var elements=litySpip.groupElements(groupName);
9707groupPosition=elements.index($(opener));
9708groupLength=elements.length;
9709}
9710}
9711cfg=$.extend({template:litySpip.template(cfg,type,groupName,groupPosition,groupLength)},cfg);
9712if(cfg.samePopin){
9713var l=lity.current();
9714if(l){
9715l.close();
9716}
9717}
9718lity(target,cfg,opener);
9719}
9720},
9721lityPreLoader:function(target,cfg,opener){
9722if(cfg.handler&&cfg.handlers[cfg.handler]){
9723if(cfg.handler==='image'||cfg.handler==='ajax'){
9724var instance={
9725opener:function(){return $(opener);},
9726options:function(){return cfg}
9727};
9728var content=cfg.handlers[cfg.handler](target,instance);
9729}
9730}
9731},
9732ajaxReloadElements:function(elements){
9733const targets=elements
9734.split(',')
9735.map(s=>s.trim())
9736.filter(Boolean);
9737targets.forEach(function(target){
9738try{
9739if(/^[.#[]/.test(target)){
9740const $element=$(target);
9741if($element.length){
9742$element.ajaxReload();
9743}
9744}else{
9745ajaxReload(target);
9746}
9747}catch(e){
9748console.warn("Mediabox ajaxReloadElements : erreur lors du traitement de '"+target+"'.",e);
9749}
9750});
9751}
9752}
9753jQuery.fn.extend({
9754mediabox:function(options){
9755var cfg=$.extend({},litySpip.config,options);
9756if(this===jQuery.fn){
9757var href=cfg.href||"";
9758litySpip.lityOpener(href,cfg,null);
9759return this;
9760}else{
9761if(cfg.rel){
9762this.attr('data-'+litySpip.nameSpace+'-group',cfg.rel);
9763}
9764else{
9765this.each(function(){
9766var rel=$(this).attr('rel');
9767if(rel){
9768$(this).attr('data-'+litySpip.nameSpace+'-group',rel);
9769}
9770});
9771}
9772litySpip.setEvents('opener');
9773this
9774.data('mediabox-options',cfg)
9775.addClass('lity-enabled');
9776(cfg.preload?this:this.filter('[data-'+litySpip.nameSpace+'-preload]')).each(function(){
9777litySpip.elementOpener($(this),{preloadOnly:true});
9778});
9779return this;
9780}
9781},
9782mediaboxClose:function(){
9783var $current=lity.current();
9784if($current){
9785$current.close();
9786return true;
9787}
9788return false;
9789}
9790});
9791var initConfig=function(){
9792var b=typeof(mediabox_settings)=='object'?mediabox_settings:{};
9793litySpip.nameSpace=b.ns?b.ns:'mediabox';
9794litySpip.strings.slideshowStart=b.str_ssStart;
9795litySpip.strings.slideshowStop=b.str_ssStop;
9796litySpip.strings.current=b.str_cur;
9797litySpip.strings.previous=b.str_prev;
9798litySpip.strings.next=b.str_next;
9799litySpip.strings.close=b.str_close;
9800litySpip.strings.loading=b.str_loading;
9801litySpip.strings.press_escape=b.str_petc;
9802litySpip.strings.dialog_title_def=b.str_dialTitDef;
9803litySpip.strings.dialog_title_med=b.str_dialTitMed;
9804litySpip.config.slideshowSpeed=(b.lity.slideshow_speed?b.lity.slideshow_speed:5000);
9805litySpip.config.defaultCaptionState=(b.lity.defaultCaptionState?b.lity.defaultCaptionState:'expanded');
9806var styles={
9807'container':'',
9808'content':'',
9809};
9810var max;
9811if(b.lity.minWidth){
9812max=(b.lity.maxWidth?b.lity.maxWidth.replace('%','vw'):'95vw');
9813styles.content+="min-width:min("+max+","+b.lity.minWidth.replace('%','vw')+');';
9814}
9815if(b.lity.maxWidth){
9816styles.container+="max-width:"+b.lity.maxWidth.replace('%','vw')+';';
9817}
9818if(b.lity.minHeight){
9819max=(b.lity.maxHeight?b.lity.maxHeight.replace('%','vw'):'95vh');
9820styles.content+="min-height:min("+max+","+b.lity.minHeight.replace('%','vh')+');';
9821}
9822if(b.lity.maxHeight){
9823styles.container+="max-height:"+b.lity.maxHeight.replace('%','vh')+';';
9824}
9825var insert='';
9826for(let key in styles){
9827if(styles[key]){
9828insert+='.box_mediabox .lity-'+key+'{'+styles[key]+'}';
9829}
9830}
9831if(b.lity.opacite){
9832insert+='.box_mediabox:before{opacity:'+b.lity.opacite+'}';
9833}
9834if(insert){
9835$('head').append($('<style type="text/css">'+insert+'</style>'));
9836}
9837$(document).on('lity:open',function(event,instance){
9838if(document.fullscreenElement){
9839document.fullscreenElement.appendChild(instance.element().get(0));
9840}
9841if(!instance.element().is('.lity-slideshow')){
9842jQuery('.lity-close',instance.element()).focus();
9843}
9844if(!litySpip.isTransition){
9845var callback=litySpip.callbacks.onOpen.pop();
9846if(callback){
9847callback(event,instance);
9848}
9849}
9850});
9851$(document).on('lity:ready',function(event,instance){
9852litySpip.adjustHeight(instance);
9853if(jQuery.spip){
9854jQuery.spip.triggerAjaxLoad(instance.element().get(0))
9855}
9856if(instance.element().addClass('lity-ready').is('.lity-slideshow')){
9857litySpip.slideshowStart(instance.element());
9858}
9859if(!litySpip.isTransition){
9860var callback=litySpip.callbacks.onShow.pop();
9861if(callback){
9862callback(event,instance);
9863}
9864}
9865else{
9866litySpip.isTransition.newOpened=true;
9867if(litySpip.isTransition.oldClosed){
9868litySpip.isTransition=false;
9869}
9870instance.content().trigger('lity:resize',[instance]);
9871}
9872var $next=instance.element().find('.lity-next');
9873if($next.length){
9874$next=litySpip.openerFromPrevNext($next);
9875if($next){
9876litySpip.elementOpener($next,{preloadOnly:true});
9877}
9878}
9879});
9880$(document).on('lity:close',function(event,instance){
9881if(!litySpip.isTransition){
9882if(litySpip.callbacks.onShow.length>litySpip.callbacks.onOpen.length){
9883litySpip.callbacks.onShow.pop();
9884}
9885var callback=litySpip.callbacks.onClose.pop();
9886if(callback){
9887callback(event,instance);
9888}
9889let options=instance.options();
9890let ajaxReloadArgs=options.ajaxReloadOnClose;
9891if(ajaxReloadArgs&&typeof(ajaxReloadArgs)==='string'){
9892litySpip.ajaxReloadElements(ajaxReloadArgs);
9893}
9894}
9895});
9896$(document).on('lity:remove',function(event,instance){
9897if(!litySpip.isTransition){
9898var focused=litySpip.focusedItem.pop();
9899if(focused){
9900try{
9901focused.focus();
9902}catch(e){
9903}
9904}
9905}
9906else{
9907litySpip.isTransition.oldClosed=true;
9908if(litySpip.isTransition.newOpened){
9909litySpip.isTransition=false;
9910}
9911}
9912});
9913$(document).on('lity:resize',function(event,instance){
9914litySpip.adjustHeight(instance);
9915});
9916}
9917initConfig();
9918})(jQuery);
9919
9920
9921/* plugins-dist/mediabox/javascript/spip.mediabox.js?1788424597 */
9922(function($){
9923$.mediabox
9924=function(options){
9925if(typeof(mediabox_autodetect_href)=='function'
9926&&options.href
9927&&!options.type){
9928options.type=mediabox_autodetect_href(options.href);
9929}
9930$.fn.mediabox(options);
9931};
9932$.modalboxload=$.modalbox=function(href,options){$.mediabox($.extend({href:href,overlayClose:true},options));};
9933$.modalboxclose=$.mediaboxClose=$.fn.mediaboxClose;
9934$.parseMediaboxOptions=function(nameSpace,opener){
9935var options={};
9936var data2options={
9937"width":"width",
9938"height":"height",
9939"min-width":"minWidth",
9940"min-height":"minHeight",
9941"max-width":"maxWidth",
9942"max-height":"maxHeight",
9943"caption-state":"defaultCaptionState",
9944"sidebar":"sideBar",
9945"class":"className",
9946"ajaxreload-on-close":"ajaxReloadOnClose",
9947};
9948var v;
9949for(var o in data2options){
9950v=($(opener).data(nameSpace+'-'+o)||'');
9951if(v){
9952options[data2options[o]]=v;
9953}
9954}
9955if(!options.length){
9956var eltclass=$(opener).prop('class');
9957if(eltclass){
9958if(eltclass.indexOf("boxWidth-")!==-1){
9959var w=eltclass.match(/boxWidth-([^\s'">]*)/);
9960w=w[1].replace(/pc/,'%');
9961options["width"]=w;
9962}
9963if(eltclass.indexOf("boxHeight-")!==-1){
9964var h=eltclass.match(/boxHeight-([^\s'">]*)/);
9965h=h[1].replace(/pc/,'%');
9966options["height"]=h;
9967}
9968if(eltclass.indexOf("boxIframe")!==-1){
9969options["type"]='iframe';
9970}
9971if(eltclass.indexOf("boxInline")!==-1){
9972options["type"]='inline';
9973}
9974}
9975}
9976data2options={"same-popin":"samePopin","type":"type"};
9977for(var o in data2options){
9978v=($(opener).data(nameSpace+'-'+o)||'');
9979if(v){
9980options[data2options[o]]=v;
9981}
9982}
9983return options;
9984}
9985})(jQuery);
9986var mediaboxInit=function(){
9987var b=$.extend({},mediabox_settings);
9988if(b.ns!=='box'){
9989$('[data-box-type]').each(function(i,e){
9990var $e=$(e);
9991var d=$e.attr('data-box-type');
9992$e.removeAttr('data-box-type').attr('data-'+b.ns+'-type',d);
9993});
9994}
9995if(b.auto_detect){
9996var $popins=$('[data-href-popin],[data-'+b.ns+'-type]'+(window.var_zajax_content?',[data-var_zajax],a.popin':''))
9997.add(b.sel_c)
9998.not(ajaxbloc_selecteur,'.ajaxbloc','.hasbox');
9999$popins.each(function(i,e){
10000var $e=$(e);
10001var url=$e.attr('href')||"./";
10002var popin=$e.attr('data-href-popin');
10003var type=$e.attr('data-'+b.ns+'-type')||'';
10004if(!popin){
10005var env=$e.attr('data-ajax-env');
10006if(env){
10007url=parametre_url(parametre_url(url,'var_ajax',1),'var_ajax_env',env)
10008$e.removeAttr('data-ajax-env');
10009type='ajax';
10010}
10011var za=$e.attr('data-var_zajax');
10012if(za!==undefined||$e.hasClass('popin')){
10013if(za==='content'&&window.var_zajax_content){
10014za=window.var_zajax_content;
10015}
10016url=parametre_url(url,'var_zajax',za||window.var_zajax_content);
10017$e.removeAttr('data-var_zajax');
10018type='ajax';
10019}
10020if((url!==$e.attr('href')||(!popin&&type))&&url!=="./"){
10021$e.attr('data-href-popin',url);
10022}
10023}
10024url=popin||url;
10025if(!type){
10026var attrs=$e.data();
10027var types=['inline','html','iframe','image','ajax'];
10028types.some(function(e){
10029var k=b.ns+e.charAt(0).toUpperCase()+e.slice(1);
10030if(attrs[k]){
10031type=e;
10032return true;
10033}
10034});
10035}
10036if(!type&&typeof(mediabox_autodetect_href)=='function'){
10037type=mediabox_autodetect_href(url);
10038}
10039if(!type||$e.hasClass('boxIframe')){
10040type="iframe";
10041$e.removeClass('boxIframe');
10042}
10043$e.attr('data-'+b.ns+'-type',type);
10044});
10045}
10046if(b.sel_g){
10047var $items=$();
10048$(b.sel_g).each(function(i,e){
10049$items=$items.add(
10050$(this).is('a[type^=\'image\']')
10051?$(this)
10052:$(this).find('a[type^=\'image\']')
10053);
10054});
10055$items
10056.not('.hasbox')
10057.removeAttr('onclick')
10058.mediabox({rel:'galerieauto',slideshow:true,slideshowAuto:false,type:'image'})
10059.addClass('hasbox');
10060}
10061if(b.tt_img){
10062$('a[type^="image"],a[href$=".png"],a[href$=".jpg"],a[href$=".jpeg"],a[href$=".svg"],a[href$=".webp"]')
10063.not('.hasbox')
10064.removeAttr('onclick')
10065.mediabox({type:'image'})
10066.addClass('hasbox')
10067;
10068}
10069$(b.sel_c)
10070.not('.hasbox')
10071.mediabox()
10072.addClass('hasbox')
10073;
10074$('[data-href-popin]',this)
10075.not('.hasbox')
10076.click(function(){if($.modalbox)$.modalbox($(this).attr('data-href-popin'),$.parseMediaboxOptions(b.ns,this));return false;})
10077.addClass('hasbox');
10078};
10079(function($){
10080if(typeof onAjaxLoad=='function')onAjaxLoad(mediaboxInit);
10081$(mediaboxInit);
10082})(jQuery);
10083function mediabox_autodetect_href(href,options){
10084options=$.extend({
10085breakMode:true,
10086tests:{
10087image:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
10088inline:/^[#.]\w/,
10089html:/^\s*<[\w!][^<]*>/,
10090ajax:/((\?|&(amp;)?)var_z?ajax=|cache-ajaxload\/)/i,
10091iframe:/^(?:(?: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,
10092},
10093},options);
10094var matched=options.breakMode?false:[];
10095$.each(options.tests,function(type,regex){
10096if(href.match(regex)&&!href.match('/File:[^/]+(\\#|[?]|$)')){
10097if(options.breakMode){
10098matched=type;
10099return false;
10100}else{
10101matched.push(type);
10102}
10103}
10104});
10105return matched;
10106};
10107
10108
10109/* plugins-dist/porte_plume/javascript/jquery.markitup_pour_spip.js?1788424553 */
10110
10111;(function($){
10112$.fn.markItUp=function(settings,extraSettings){
10113var method,params,options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=false;
10114markitup_prompt=false;
10115if(typeof settings=='string'){
10116method=settings;
10117params=extraSettings;
10118}
10119options={id:'',
10120nameSpace:'',
10121root:'',
10122lang:'',
10123previewHandler:false,
10124previewInWindow:'',
10125previewInElement:'',
10126previewAutoRefresh:true,
10127previewPosition:'after',
10128previewTemplatePath:'~/templates/preview.html',
10129previewParser:false,
10130previewParserPath:'',
10131previewParserVar:'data',
10132previewParserAjaxType:'POST',
10133resizeHandle:true,
10134beforeInsert:'',
10135afterInsert:'',
10136onEnter:{},
10137onShiftEnter:{},
10138onCtrlEnter:{},
10139onTab:{},
10140markupSet:[{}]
10141};
10142$.extend(options,settings,extraSettings);
10143if(!options.root){
10144$('script').each(function(a,tag){
10145var miuScript=$(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
10146if(miuScript!==null){
10147options.root=miuScript[1];
10148}
10149});
10150}
10151var uaMatch=function(ua){
10152ua=ua.toLowerCase();
10153var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||
10154ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||
10155[];
10156return{
10157browser:match[1]||"",
10158version:match[2]||"0"
10159};
10160};
10161var matched=uaMatch(navigator.userAgent);
10162var browser={};
10163if(matched.browser){
10164browser[matched.browser]=true;
10165browser.version=matched.version;
10166}
10167if(browser.chrome){
10168browser.webkit=true;
10169}else if(browser.webkit){
10170browser.safari=true;
10171}
10172return this.each(function(){
10173var $$,textarea,levels,scrollPosition,caretPosition,
10174clicked,hash,header,footer,previewWindow,template,iFrame,abort,
10175before,after;
10176$$=$(this);
10177textarea=this;
10178levels=[];
10179abort=false;
10180scrollPosition=caretPosition=0;
10181caretOffset=-1;
10182options.previewParserPath=localize(options.previewParserPath);
10183options.previewTemplatePath=localize(options.previewTemplatePath);
10184if(method){
10185switch(method){
10186case'remove':
10187remove();
10188break;
10189case'insert':
10190markup(params);
10191break;
10192default:
10193$.error('Method '+method+' does not exist on jQuery.markItUp');
10194}
10195return;
10196}
10197function localize(data,inText){
10198if(inText){
10199return data.replace(/("|')~\//g,"$1"+options.root);
10200}
10201return data.replace(/^~\//,options.root);
10202}
10203function init(){
10204id='';nameSpace='';
10205if(options.id){
10206id='id="'+options.id+'"';
10207}else if($$.attr("id")){
10208id='id="markItUp'+($$.attr("id").substr(0,1).toUpperCase())+($$.attr("id").substr(1))+'"';
10209}
10210if(options.nameSpace){
10211nameSpace='class="'+options.nameSpace+'"';
10212}
10213currentScrollPosition=$$.scrollTop();
10214$$.wrap('<div '+nameSpace+'></div>');
10215$$.wrap('<div '+id+' class="markItUp"></div>');
10216$$.wrap('<div class="markItUpContainer"></div>');
10217$$.addClass("markItUpEditor");
10218$$.scrollTop(currentScrollPosition);
10219header=$('<div class="markItUpHeader"></div>').insertBefore($$);
10220$(dropMenus(options.markupSet)).appendTo(header);
10221$(header).find("li.markItUpDropMenu ul:empty").parent().remove();
10222footer=$('<div class="markItUpFooter"></div>').insertAfter($$);
10223if(options.resizeHandle===true&&browser.safari!==true){
10224resizeHandle=$('<div class="markItUpResizeHandle"></div>')
10225.insertAfter($$)
10226.on("mousedown.markItUp",function(e){
10227var h=$$.height(),y=e.clientY,mouseMove,mouseUp;
10228mouseMove=function(e){
10229$$.css("height",Math.max(20,e.clientY+h-y)+"px");
10230return false;
10231};
10232mouseUp=function(e){
10233$("html").off("mousemove.markItUp",mouseMove).off("mouseup.markItUp",mouseUp);
10234return false;
10235};
10236$("html").on("mousemove.markItUp",mouseMove).on("mouseup.markItUp",mouseUp);
10237});
10238footer.append(resizeHandle);
10239}
10240$$.on('keydown.markItUp',keyPressed).on('keyup',keyPressed);
10241$$.on("insertion.markItUp",function(e,settings){
10242if(settings.target!==false){
10243get();
10244}
10245if(textarea===$.markItUp.focused){
10246markup(settings);
10247}
10248});
10249$$.on('focus.markItUp',function(){
10250$.markItUp.focused=this;
10251});
10252if(options.previewInElement){
10253refreshPreview();
10254}
10255}
10256function dropMenus(markupSet){
10257var ul=$('<ul></ul>'),i=0;
10258var lang=($$.attr('lang')||options.lang);
10259$('li:hover > ul',ul).css('display','block');
10260$.each(markupSet,function(){
10261var button=this,t='',title,li,j;
10262if((!lang||!button.lang||($.inArray(lang,button.lang)!=-1))
10263&&(!button.lang_not||($.inArray(lang,button.lang_not)==-1))){
10264button.title?title=(button.key)?(button.title||'')+' [Ctrl+'+button.key+']':(button.title||''):title=(button.key)?(button.name||'')+' [Ctrl+'+button.key+']':(button.name||'');
10265key=(button.key)?'accesskey="'+button.key+'"':'';
10266if(button.separator){
10267li=$('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
10268}else{
10269i++;
10270for(j=levels.length-1;j>=0;j--){
10271t+=levels[j]+"-";
10272}
10273li=$('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="#" '+key+' title="'+title+'"><em>'+(button.name||'')+'</em></a></li>')
10274.on("contextmenu.markItUp",function(){
10275return false;
10276}).on('click.markItUp',function(e){
10277e.preventDefault();
10278}).on("focusin.markItUp",function(){
10279setTimeout(function(){
10280$$.focus();
10281},0);
10282}).on('mouseup',function(e){
10283if(button.call){
10284eval(button.call)(e);
10285}
10286setTimeout(function(){markup(button)},1);
10287return false;
10288}).on('mouseenter.markItUp',function(){
10289$('> a',this).addClass('active');
10290$('> ul',this).addClass('expanded');
10291$(document).one('click',function(){
10292$('ul a',header).removeClass('active');
10293$('ul ul',header).removeClass('expanded');
10294}
10295);
10296}).on('mouseleave.markItUp',function(){
10297$('> a',this).removeClass('active');
10298$('> ul',this).removeClass('expanded');
10299}).appendTo(ul);
10300if(button.dropMenu){
10301levels.push(i);
10302$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
10303}
10304}
10305}
10306});
10307levels.pop();
10308return ul;
10309}
10310function magicMarkups(string){
10311if(string){
10312string=string.toString();
10313string=string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,
10314function(x,a){
10315var b=a.split('|!|');
10316if(altKey===true){
10317return(b[1]!==undefined)?b[1]:b[0];
10318}else{
10319return(b[1]===undefined)?"":b[0];
10320}
10321}
10322);
10323string=string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,
10324function(x,a){
10325var b=a.split(':!:');
10326if(abort===true){
10327return false;
10328}
10329markitup_prompt=true;
10330value=prompt(b[0],(b[1])?b[1]:'');
10331if(value===null){
10332abort=true;
10333}
10334setTimeout(function(){markitup_prompt=false;},500);
10335return value;
10336}
10337);
10338return string;
10339}
10340return"";
10341}
10342function prepare(action){
10343if($.isFunction(action)){
10344action=action(hash);
10345}
10346return magicMarkups(action);
10347}
10348function build(string){
10349var openWith=prepare(clicked.openWith);
10350var placeHolder=prepare(clicked.placeHolder);
10351var replaceWith=prepare(clicked.replaceWith);
10352var closeWith=prepare(clicked.closeWith);
10353var openBlockWith=prepare(clicked.openBlockWith);
10354var closeBlockWith=prepare(clicked.closeBlockWith);
10355var multiline=clicked.multiline;
10356if(replaceWith!==""){
10357block=openWith+replaceWith+closeWith;
10358}else if(selection===''&&placeHolder!==''){
10359block=openWith+placeHolder+closeWith;
10360}else if(multiline===true){
10361string=string||selection;
10362var lines=[string],blocks=[];
10363if(multiline===true){
10364lines=string.split(/\r?\n/);
10365}
10366for(var l=0;l<lines.length;l++){
10367line=lines[l];
10368var trailingSpaces;
10369if(trailingSpaces=line.match(/ *$/)){
10370blocks.push(openWith+line.replace(/ *$/g,'')+closeWith+trailingSpaces);
10371}else{
10372blocks.push(openWith+line+closeWith);
10373}
10374}
10375block=blocks.join("\n");
10376}else{
10377block=openWith+(string||selection)+closeWith;
10378}
10379block=openBlockWith+block+closeBlockWith;
10380return{block:block,
10381openBlockWith:openBlockWith,
10382openWith:openWith,
10383replaceWith:replaceWith,
10384placeHolder:placeHolder,
10385closeWith:closeWith,
10386closeBlockWith:closeBlockWith
10387};
10388}
10389function selectWord(){
10390selectionBeforeAfter(/\s|[.,;:!¡?¿()]/);
10391selectionSave();
10392}
10393function selectLine(){
10394selectionBeforeAfter(/\r?\n/);
10395selectionSave();
10396}
10397function selectionRemoveLast(pattern){
10398if(!pattern)pattern=/\s/;
10399last=selection[selection.length-1];
10400if(last&&last.match(pattern)){
10401set(caretPosition,selection.length-1);
10402get();
10403$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});
10404}
10405}
10406function selectionBeforeAfter(pattern){
10407if(!pattern)pattern=/\s/;
10408sautAvantIE=sautApresIE=0;
10409if(browser.msie){
10410lenSelection=selection.length-fixIeBug(selection);
10411if(caretPosition){
10412set(caretPosition-1,2);
10413sautAvantIE=fixIeBug(document.selection.createRange().text);
10414}
10415set(caretPosition,2);
10416sautApresIE=fixIeBug(document.selection.createRange().text);
10417set(0,caretPosition);
10418before=document.selection.createRange().text;
10419set(caretPosition+lenSelection,textarea.value.length);
10420after=document.selection.createRange().text;
10421set(caretPosition,lenSelection);
10422selection=document.selection.createRange().text;
10423}else{
10424before=textarea.value.substring(0,caretPosition);
10425after=textarea.value.substring(caretPosition+selection.length-fixIeBug(selection));
10426}
10427before=before.split(pattern);
10428after=after.split(pattern);
10429if(sautAvantIE)before.push("");
10430if(sautApresIE)after.unshift("");
10431}
10432function selectionSave(){
10433nb_before=before?before[before.length-1].length:0;
10434nb_after=after?after[0].length:0;
10435nb=nb_before+selection.length+nb_after-fixIeBug(selection);
10436caretPosition=caretPosition-nb_before;
10437set(caretPosition,nb);
10438get();
10439$.extend(hash,{selection:selection,caretPosition:caretPosition,scrollPosition:scrollPosition});
10440}
10441function markup(button){
10442var len,j,n,i;
10443hash=clicked=button;
10444get();
10445$.extend(hash,{line:"",
10446root:options.root,
10447textarea:textarea,
10448selection:(selection||''),
10449caretPosition:caretPosition,
10450ctrlKey:ctrlKey,
10451shiftKey:shiftKey,
10452altKey:altKey
10453}
10454);
10455if(button.selectionType){
10456if(button.selectionType=="word"){
10457if(!selection){
10458selectWord();
10459}else{
10460selectionRemoveLast(/\s/);
10461}
10462}
10463if(button.selectionType=="line"){
10464selectLine();
10465}
10466if(button.selectionType=="return"){
10467if(!browser.msie){
10468selectionBeforeAfter(/\r?\n/);
10469before_last=before[before.length-1];
10470after='';
10471if(r=before_last.match(/^-([*#]+) ?(.*)$/)){
10472if(r[2]){
10473button.replaceWith="\n-"+r[1]+' ';
10474before_last='';
10475}else{
10476button.replaceWith="\n";
10477}
10478}else{
10479before_last='';
10480button.replaceWith="\n";
10481}
10482before[before.length-1]=before_last;
10483selectionSave();
10484}
10485}
10486}
10487prepare(options.beforeInsert);
10488prepare(clicked.beforeInsert);
10489if((ctrlKey===true&&shiftKey===true)||button.multiline===true){
10490prepare(clicked.beforeMultiInsert);
10491}
10492$.extend(hash,{line:1});
10493if((ctrlKey===true&&shiftKey===true)||button.forceMultiline===true){
10494lines=selection.split(/\r?\n/);
10495for(j=0,n=lines.length,i=0;i<n;i++){
10496if(n==1||$.trim(lines[i])!==''){
10497$.extend(hash,{line:++j,selection:lines[i]});
10498lines[i]=build(lines[i]).block;
10499}else{
10500lines[i]="";
10501}
10502}
10503string={block:lines.join('\n')};
10504start=caretPosition;
10505len=string.block.length+((browser.opera)?n-1:0);
10506}else if(ctrlKey===true){
10507string=build(selection);
10508start=caretPosition+string.openWith.length;
10509len=string.block.length-string.openWith.length-string.closeWith.length;
10510len=len-(string.block.match(/ $/)?1:0);
10511len-=fixIeBug(string.block);
10512}else if(shiftKey===true){
10513string=build(selection);
10514start=caretPosition;
10515len=string.block.length;
10516len-=fixIeBug(string.block);
10517}else{
10518string=build(selection);
10519start=caretPosition+string.block.length;
10520len=0;
10521start-=fixIeBug(string.block);
10522}
10523if((selection===''&&string.replaceWith==='')){
10524caretOffset+=fixOperaBug(string.block);
10525start=caretPosition+string.openBlockWith.length+string.openWith.length;
10526len=string.block.length-string.openBlockWith.length-string.openWith.length-string.closeWith.length-string.closeBlockWith.length;
10527caretOffset=$$.val().substring(caretPosition,$$.val().length).length;
10528caretOffset-=fixOperaBug($$.val().substring(0,caretPosition));
10529}
10530$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});
10531if(string.block!==selection&&abort===false){
10532insert(string.block);
10533set(start,len);
10534}else{
10535caretOffset=-1;
10536}
10537get();
10538$.extend(hash,{line:'',selection:selection});
10539if((ctrlKey===true&&shiftKey===true)||button.multiline===true){
10540prepare(clicked.afterMultiInsert);
10541}
10542prepare(clicked.afterInsert);
10543prepare(options.afterInsert);
10544if(previewWindow&&options.previewAutoRefresh){
10545refreshPreview();
10546}
10547textarea.dispatchEvent(new Event('input'));
10548shiftKey=altKey=ctrlKey=abort=false;
10549}
10550function fixOperaBug(string){
10551if(browser.opera){
10552return string.length-string.replace(/\n*/g,'').length;
10553}
10554return 0;
10555}
10556function fixIeBug(string){
10557if(browser.msie){
10558return string.length-string.replace(/\r*/g,'').length;
10559}
10560return 0;
10561}
10562function insert(block){
10563if(document.selection){
10564var newSelection=document.selection.createRange();
10565newSelection.text=block;
10566}else{
10567textarea.value=textarea.value.substring(0,caretPosition)+block+textarea.value.substring(caretPosition+selection.length,textarea.value.length);
10568}
10569}
10570function set(start,len){
10571if(textarea.createTextRange){
10572if(browser.opera&&browser.version>=9.5&&len==0){
10573return false;
10574}
10575range=textarea.createTextRange();
10576range.collapse(true);
10577range.moveStart('character',start);
10578range.moveEnd('character',len);
10579range.select();
10580}else if(textarea.setSelectionRange){
10581textarea.setSelectionRange(start,start+len);
10582}
10583textarea.scrollTop=scrollPosition;
10584textarea.focus();
10585}
10586function get(){
10587textarea.focus();
10588scrollPosition=textarea.scrollTop;
10589if(document.selection){
10590selection=document.selection.createRange().text;
10591if(browser.msie){
10592var range=document.selection.createRange(),rangeCopy=range.duplicate();
10593rangeCopy.moveToElementText(textarea);
10594caretPosition=-1;
10595while(rangeCopy.inRange(range)){
10596rangeCopy.moveStart('character');
10597caretPosition++;
10598}
10599}else{
10600caretPosition=textarea.selectionStart;
10601}
10602}else{
10603caretPosition=textarea.selectionStart;
10604selection=textarea.value.substring(caretPosition,textarea.selectionEnd);
10605}
10606return selection;
10607}
10608function preview(){
10609if(typeof options.previewHandler==='function'){
10610previewWindow=true;
10611}else if(options.previewInElement){
10612previewWindow=$(options.previewInElement);
10613}else if(!previewWindow||previewWindow.closed){
10614if(options.previewInWindow){
10615previewWindow=window.open('','preview',options.previewInWindow);
10616$(window).unload(function(){
10617previewWindow.close();
10618});
10619}else{
10620iFrame=$('<iframe class="markItUpPreviewFrame"></iframe>');
10621if(options.previewPosition=='after'){
10622iFrame.insertAfter(footer);
10623}else{
10624iFrame.insertBefore(header);
10625}
10626previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1];
10627}
10628}else if(altKey===true){
10629if(iFrame){
10630iFrame.remove();
10631}else{
10632previewWindow.close();
10633}
10634previewWindow=iFrame=false;
10635}
10636if(!options.previewAutoRefresh){
10637refreshPreview();
10638}
10639if(options.previewInWindow){
10640previewWindow.focus();
10641}
10642}
10643function refreshPreview(){
10644renderPreview();
10645}
10646function renderPreview(){
10647var phtml;
10648var parsedData=$$.val();
10649if(options.previewParser&&typeof options.previewParser==='function'){
10650parsedData=options.previewParser(parsedData);
10651}
10652if(options.previewHandler&&typeof options.previewHandler==='function'){
10653options.previewHandler(parsedData);
10654}else if(options.previewParserPath!==''){
10655$.ajax({
10656type:options.previewParserAjaxType,
10657dataType:'text',
10658global:false,
10659url:options.previewParserPath,
10660data:options.previewParserVar+'='+encodeURIComponent(parsedData),
10661success:function(data){
10662writeInPreview(localize(data,1));
10663}
10664});
10665}else{
10666if(!template){
10667$.ajax({
10668url:options.previewTemplatePath,
10669dataType:'text',
10670global:false,
10671success:function(data){
10672writeInPreview(localize(data,1).replace(/<!-- content -->/g,parsedData));
10673}
10674});
10675}
10676}
10677return false;
10678}
10679function writeInPreview(data){
10680if(options.previewInElement){
10681$(options.previewInElement).html(data);
10682}else if(previewWindow&&previewWindow.document){
10683try{
10684sp=previewWindow.document.documentElement.scrollTop
10685}catch(e){
10686sp=0;
10687}
10688previewWindow.document.open();
10689previewWindow.document.write(data);
10690previewWindow.document.close();
10691previewWindow.document.documentElement.scrollTop=sp;
10692}
10693}
10694function keyPressed(e){
10695shiftKey=e.shiftKey;
10696altKey=e.altKey;
10697ctrlKey=(!(e.altKey&&e.ctrlKey))?(e.ctrlKey||e.metaKey):false;
10698if(e.type==='keydown'){
10699if(ctrlKey===true){
10700li=$('a[accesskey="'+((e.keyCode==13)?'\\n':String.fromCharCode(e.keyCode))+'"]',header).parent('li');
10701if(li.length!==0){
10702ctrlKey=false;
10703setTimeout(function(){
10704li.triggerHandler('mouseup');
10705},1);
10706return false;
10707}
10708}
10709if(!browser.opera){
10710if(e.keyCode===13||e.keyCode===10){
10711if(ctrlKey===true){
10712ctrlKey=false;
10713markup(options.onCtrlEnter);
10714if(!options.onCtrlEnter.keepDefault){
10715textarea.dispatchEvent(new Event('input'));
10716}
10717return options.onCtrlEnter.keepDefault;
10718}else if(shiftKey===true){
10719shiftKey=false;
10720markup(options.onShiftEnter);
10721if(!options.onShiftEnter.keepDefault){
10722textarea.dispatchEvent(new Event('input'));
10723}
10724return options.onShiftEnter.keepDefault;
10725}else{
10726markup(options.onEnter);
10727if(!options.onEnter.keepDefault){
10728textarea.dispatchEvent(new Event('input'));
10729}
10730return options.onEnter.keepDefault;
10731}
10732}
10733if(e.keyCode===9){
10734if(shiftKey==true||ctrlKey==true||altKey==true){
10735return false;
10736}
10737if(caretOffset!==-1){
10738get();
10739caretOffset=$$.val().length-caretOffset;
10740set(caretOffset,0);
10741caretOffset=-1;
10742return false;
10743}else{
10744markup(options.onTab);
10745return options.onTab.keepDefault;
10746}
10747}
10748}
10749}
10750}
10751function remove(){
10752$$.off(".markItUp").removeClass('markItUpEditor');
10753$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
10754var relativeRef=$$.parent('div').parent('div.markItUp').parent('div');
10755if(relativeRef.length){
10756relativeRef.replaceWith($$);
10757}
10758$$.data('markItUp',null);
10759}
10760init();
10761});
10762};
10763$.fn.markItUpRemove=function(){
10764return this.each(function(){
10765$(this).markItUp('remove');
10766}
10767);
10768};
10769$.markItUp=function(settings){
10770var options={target:false};
10771$.extend(options,settings);
10772if(options.target){
10773return $(options.target).each(function(){
10774$(this).focus();
10775$(this).trigger('insertion',[options]);
10776});
10777}else{
10778$('textarea').trigger('insertion',[options]);
10779}
10780};
10781})(jQuery);
10782
10783
10784/* plugins-dist/porte_plume/javascript/jquery.previsu_spip.js?1788424598 */
10785;(function($){
10786$.fn.previsu_spip=function(settings){
10787var options;
10788options={
10789previewParserPath:'',
10790previewParserVar:'data',
10791textEditer:'Editer',
10792textVoir:'Voir',
10793textFullScreen:'Plein écran'
10794};
10795$.extend(options,settings);
10796return this.each(function(){
10797var $$,textarea,tabs,preview;
10798$$=$(this);
10799textarea=this;
10800function init(){
10801$$.addClass("pp_previsualisation");
10802if(!$$.parent().has('.markItUpContainer').length){
10803$$.barre_outils('vide');
10804}
10805var mark=$$.parent();
10806tabs=$('<div class="markItUpTabs"></div>').prependTo(mark);
10807$(tabs).append(
10808'<a href="#fullscreen" class="fullscreen">'+options.textFullScreen+'</a>'+
10809'<a href="#previsuVoir" class="previsuVoir">'+options.textVoir+'</a>'+
10810'<a href="#previsuEditer" class="previsuEditer on">'+options.textEditer+'</a>'
10811);
10812preview=$('<div class="markItUpPreview"></div>').insertAfter(mark.find('.markItUpHeader'));
10813preview.hide();
10814var is_full_screen=false;
10815var objet=mark.parents('.formulaire_spip')[0].className.match(/formulaire_editer_(\w+)/);
10816objet=(objet?objet[1]:'');
10817var champ=mark.parents('.editer')[0].className.match(/editer_(\w+)/);
10818champ=(champ?champ[1].toUpperCase():'');
10819var textarea=mark.find('textarea.pp_previsualisation');
10820var preview=mark.find('.markItUpPreview');
10821var dir=textarea.attr('dir');
10822if(dir){
10823preview.attr('dir',dir);
10824}
10825tabs.find('.fullscreen').click(function(){
10826if(!mark.is('.fullscreen')){
10827textarea.data('height-origin',textarea.css('height'));
10828}
10829mark.toggleClass('fullscreen');
10830if(mark.is('.fullscreen')){
10831$('body').addClass('markitup-fullscreen');
10832is_full_screen=true;
10833mark.find('.markItUpHeader a').show();
10834if(!mark.is('.livepreview')){
10835var original_texte="";
10836function refresh_preview(){
10837var texte=textarea.val();
10838if(original_texte==texte){
10839return;
10840}
10841renderPreview(preview.addClass('ajaxLoad'),texte,champ,objet);
10842original_texte=texte;
10843}
10844var timerPreview=null;
10845mark.addClass('livepreview').find('.markItUpEditor').on('keyup click change focus refreshpreview',function(e){
10846if(is_full_screen){
10847if(timerPreview)clearTimeout(timerPreview);
10848timerPreview=setTimeout(refresh_preview,500);
10849}
10850});
10851$(window).on('keyup',function(e){
10852if(is_full_screen){
10853if(e.type=='keyup'&&e.keyCode==27&&!markitup_prompt){
10854mark.removeClass('fullscreen');
10855$('body').removeClass('markitup-fullscreen');
10856textarea.css('height',textarea.data('height-origin'));
10857is_full_screen=false;
10858}
10859}
10860});
10861}
10862mark.find('.markItUpEditor').trigger('refreshpreview');
10863}
10864else{
10865$('body').removeClass('markitup-fullscreen');
10866textarea.css('height',textarea.data('height-origin'));
10867if($(this).next().hasClass('on')){
10868mark.find('.markItUpHeader a').hide();
10869}
10870is_full_screen=false;
10871}
10872return false;
10873});
10874tabs.find('.previsuVoir').click(function(){
10875preview.height(
10876mark.find('.markItUpEditor').height()
10877+mark.find('.markItUpFooter').height()
10878);
10879mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').hide();
10880$(this).addClass('on').next().removeClass('on');
10881renderPreview(
10882preview.show().addClass('ajaxLoad'),
10883mark.find('textarea.pp_previsualisation').val(),
10884champ,
10885objet,
10886false
10887);
10888return false;
10889});
10890tabs.find('.previsuEditer').click(function(){
10891mark.find('.markItUpPreview').hide();
10892mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').show();
10893$(this).addClass('on').prev().removeClass('on');
10894return false;
10895});
10896}
10897function renderPreview(node,val,champ,objet,async){
10898if(options.previewParserPath!==''){
10899$.ajax({
10900type:'POST',
10901async:typeof(async)=="undefined"?true:async,
10902url:options.previewParserPath,
10903data:'champ='+champ
10904+'&objet='+objet
10905+'&'+options.previewParserVar+'='+encodeURIComponent(val),
10906success:function(data){
10907node.html(data).removeClass('ajaxLoad');
10908$("a",node).attr("target","blank");
10909$(":input",node).attr("disabled","disabled");
10910}
10911});
10912}
10913}
10914init();
10915});
10916};
10917})(jQuery);
10918
10919
10920/* plugins-dist/ciwidget/_js/ciwidget_v2_2.js */
10921
10922jQuery(document).ready(function(){
10923if(typeof cicacheselect!=='function'){
10924if(!$('.bouton_version_texte').hasClass('ciclick')){
10925$('.version_texte').addClass('ciwidget_hidden');
10926$('.bouton_version_texte').addClass('ciclick');
10927$('.bouton_version_texte').click(function(e){
10928if($(this).attr('aria-controls')){
10929var $versiontexte=$('#'+$(this).attr('aria-controls'));
10930if($versiontexte.hasClass('ciwidget_hidden')){
10931$versiontexte.removeClass('ciwidget_hidden');
10932$versiontexte.addClass('actif');
10933$(this).text($(this).attr('data-show'));
10934}else if($versiontexte.hasClass('actif')){
10935$versiontexte.removeClass('actif');
10936$versiontexte.addClass('ciwidget_hidden');
10937$(this).text($(this).attr('data-hide'));
10938}
10939}
10940e.stopPropagation();
10941return false;
10942});
10943}
10944}
10945for(let ciDocClickXiti of document.querySelectorAll('.ciwidget_doc_click_xiti')){
10946ciDocClickXiti.addEventListener("click",ciwidgetDocumentClickXiti);
10947};
10948for(let ciwidgetAudio of document.querySelectorAll('.ciwidget_audio__copier')){
10949ciwidgetAudio.removeEventListener("click",ciwidgetAudioClick);
10950ciwidgetAudio.addEventListener("click",ciwidgetAudioClick);
10951};
10952for(let ciwidgetGalerie of document.querySelectorAll('.ciwidget_galerie .ciwidget_sansclic_lien, .ciwidget_galerie .galerie__lien')){
10953ciwidgetGalerie.removeEventListener("click",ciwidgetGalerieClick);
10954ciwidgetGalerie.addEventListener("click",ciwidgetGalerieClick);
10955};
10956for(let ciwidgetInfographie of document.querySelectorAll('.ciwidget_infographie > a')){
10957ciwidgetInfographie.removeEventListener("click",ciwidgetInfographieClick);
10958ciwidgetInfographie.addEventListener("click",ciwidgetInfographieClick);
10959};
10960for(let ciwidgetDailyMotion of document.querySelectorAll('.ciwidget_dailymotion .bouton_dailymotion_svg')){
10961ciwidgetDailyMotion.removeEventListener("click",ciwidgetDailyMotionClick);
10962ciwidgetDailyMotion.addEventListener("click",ciwidgetDailyMotionClick);
10963ciwidgetDailyMotion.removeEventListener("onmouseenter",ciwidgetDailyMotionEnter);
10964ciwidgetDailyMotion.addEventListener("onmouseenter",ciwidgetDailyMotionEnter);
10965};
10966});
10967jQuery(document).ajaxComplete(function(event,xhr,settings){
10968if(settings.url.indexOf("/ecrire/")!=-1){
10969if(typeof cicacheselect!=='function'){
10970if(!$('.bouton_version_texte').hasClass('ciclick')){
10971$('.version_texte').addClass('ciwidget_hidden');
10972$('.bouton_version_texte').addClass('ciclick');
10973$('.bouton_version_texte').click(function(e){
10974if($(this).attr('aria-controls')){
10975var $versiontexte=$('#'+$(this).attr('aria-controls'));
10976if($versiontexte.hasClass('ciwidget_hidden')){
10977$versiontexte.removeClass('ciwidget_hidden');
10978$versiontexte.addClass('actif');
10979$(this).text($(this).attr('data-show'));
10980}else if($versiontexte.hasClass('actif')){
10981$versiontexte.removeClass('actif');
10982$versiontexte.addClass('ciwidget_hidden');
10983$(this).text($(this).attr('data-hide'));
10984}
10985}
10986e.stopPropagation();
10987return false;
10988});
10989}
10990}
10991for(let ciwidgetAudio of document.querySelectorAll('.ciwidget_audio__copier')){
10992ciwidgetAudio.removeEventListener("click",ciwidgetAudioClick);
10993ciwidgetAudio.addEventListener("click",ciwidgetAudioClick);
10994};
10995for(let ciwidgetGalerie of document.querySelectorAll('.ciwidget_galerie .ciwidget_sansclic_lien, .ciwidget_galerie .galerie__lien')){
10996ciwidgetGalerie.removeEventListener("click",ciwidgetGalerieClick);
10997ciwidgetGalerie.addEventListener("click",ciwidgetGalerieClick);
10998};
10999for(let ciwidgetInfographie of document.querySelectorAll('.ciwidget_infographie > a')){
11000ciwidgetInfographie.removeEventListener("click",ciwidgetInfographieClick);
11001ciwidgetInfographie.addEventListener("click",ciwidgetInfographieClick);
11002};
11003for(let ciwidgetDailyMotion of document.querySelectorAll('.ciwidget_dailymotion .bouton_dailymotion_svg')){
11004ciwidgetDailyMotion.removeEventListener("click",ciwidgetDailyMotionClick);
11005ciwidgetDailyMotion.addEventListener("click",ciwidgetDailyMotionClick);
11006ciwidgetDailyMotion.removeEventListener("onmouseenter",ciwidgetDailyMotionEnter);
11007ciwidgetDailyMotion.addEventListener("onmouseenter",ciwidgetDailyMotionEnter);
11008};
11009}
11010});
11011function ciwidget_affiche_version_texte(element){
11012if(typeof cicacheselect!=='function'){
11013if(!$(element).hasClass('ciclick')){
11014if($(element).attr('aria-controls')){
11015var versiontexte=$('#'+$(element).attr('aria-controls'));
11016if(versiontexte.hasClass('ciwidget_hidden')){
11017versiontexte.removeClass('ciwidget_hidden');
11018versiontexte.addClass('actif');
11019$(element).text($(element).attr('data-show'));
11020}else if(versiontexte.hasClass('actif')){
11021versiontexte.removeClass('actif');
11022versiontexte.addClass('ciwidget_hidden');
11023$(element).text($(element).attr('data-hide'));
11024}
11025}
11026}
11027}
11028}
11029function ciwidget_copyToClipboard(str,msg){
11030const el=document.createElement('textarea');
11031el.value=str;
11032el.setAttribute('readonly','');
11033el.style.position='absolute';
11034el.style.left='-9999px';
11035document.body.appendChild(el);
11036el.select();
11037document.execCommand('copy');
11038document.body.removeChild(el);
11039if(typeof msg!=='undefined'&&msg!=null){
11040alert(msg);
11041}
11042}
11043function ciwidgetAudioClick(event){
11044event.preventDefault();
11045ciwidget_copyToClipboard(this.dataset.url,this.dataset.msg);
11046}
11047function ciwidgetDailyMotionClick(event){
11048event.preventDefault();
11049ciwidgetAfficheDailymotion(this.dataset.id);
11050}
11051function ciwidgetDailyMotionEnter(event){
11052event.preventDefault();
11053this.style.textDecoration='none';
11054this.style.backgroundColor='#FFF';
11055}
11056function ciwidgetInfographieClick(event){
11057event.preventDefault();
11058let citop=Math.round((screen.availHeight-this.dataset.fen_height)/2);
11059let cileft=Math.round((screen.availWidth-this.dataset.fen_width)/2);
11060window.open(this.href,'ciwidget_image','width=this.dataset.fen_width, height=this.dataset.fen_height, top='+citop+', left='+cileft+', toolbar=no, menubar=no, location=no, resizable=yes, scrollbars=no, status=no');
11061}
11062function ciwidgetGalerieClick(event){
11063event.preventDefault();
11064if(jQuery.modalbox){
11065jQuery.modalbox(this.dataset.popin_url);
11066}
11067}
11068function ciwidgetDocumentClickXiti(event){
11069if(typeof xt_med==='function'){
11070xt_med(this.dataset.p1,this.dataset.p2,this.dataset.p3,this.dataset.p4);
11071}
11072}
11073
11074

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.