vendor: 145,320 bytes, lines 1-6643
1/* compact [ 2 prive/javascript/jquery.js?1790181870 3 prive/javascript/jquery.form.js?1790181870 4 prive/javascript/jquery.autosave.js?1790181870 5 prive/javascript/jquery.placeholder-label.js?1790181870 6 prive/javascript/ajaxCallback.js?1790181870 7 prive/javascript/js.cookie.js?1790181870 8 squelettes/plugins/spip-contrib-extensions/coordonnees/javascript/coordonnees_adresses.js?1750150156 9 plugins-dist/dist/core/porte_plume/javascript/jquery.markitup_pour_spip.js?1790181875 10 plugins-dist/dist/core/porte_plume/javascript/jquery.previsu_spip.js?1790181875 11 local/cache-js/jsdyn-javascript_porte_plume_start_js-5bc16697.js?1790183638 12 prive/javascript/js.cookie.js?1790181870 13 local/cache-js/jsdyn-socialtags_js-67080869.js?1790183628 14 squelettes/plugins/fidh/theme/bower_components/modernizr/modernizr.js 15 squelettes/plugins/fidh/theme/bower_components/fastclick/lib/fastclick.js 16 squelettes/plugins/fidh/theme/bower_components/foundation/js/foundation.min.js 17 squelettes/plugins/fidh/theme/js/imageMapResizer.min.js 18 squelettes/plugins/fidh/theme/js/jquery.imagemapster.min.js 19 squelettes/plugins/fidh/theme/js/fixto.min.js 20 squelettes/plugins/fidh/theme/js/countUp.min.js 21 squelettes/plugins/fidh/theme/js/jquery-migrate-1.4.1.min.js 22 squelettes/plugins/fidh/theme/js/app.js 23 squelettes/plugins/fidh/theme/dflip/js/dflip.js 24 plugins/dist/plugins/inserer_modeles/javascript/autosize.min.js 25 squelettes/plugins/spip-contrib-extensions/slick/lib/slick/slick.min.js 26] 64.5% */ 27 28/* prive/javascript/jquery.js?1790181870 */ 29 30(function(global,factory){ 31"use strict"; 32if(typeof module==="object"&&typeof module.exports==="object"){ 33module.exports=global.document? 34factory(global,true): 35function(w){ 36if(!w.document){ 37throw new Error("jQuery requires a window with a document"); 38} 39return factory(w); 40}; 41}else{ 42factory(global); 43} 44})(typeof window!=="undefined"?window:this,function(window,noGlobal){ 45"use strict"; 46var arr=[]; 47var getProto=Object.getPrototypeOf; 48var slice=arr.slice; 49var flat=arr.flat?function(array){ 50return arr.flat.call(array); 51}:function(array){ 52return arr.concat.apply([],array); 53}; 54var push=arr.push; 55var indexOf=arr.indexOf; 56var class2type={}; 57var toString=class2type.toString; 58var hasOwn=class2type.hasOwnProperty; 59var fnToString=hasOwn.toString; 60var ObjectFunctionString=fnToString.call(Object); 61var support={}; 62var isFunction=function isFunction(obj){ 63return typeof obj==="function"&&typeof obj.nodeType!=="number"&& 64typeof obj.item!=="function"; 65}; 66var isWindow=function isWindow(obj){ 67return obj!=null&&obj===obj.window; 68}; 69var document=window.document; 70var preservedScriptAttributes={ 71type:true, 72src:true, 73nonce:true, 74noModule:true 75}; 76function DOMEval(code,node,doc){ 77doc=doc||document; 78var i,val, 79script=doc.createElement("script"); 80script.text=code; 81if(node){ 82for(i in preservedScriptAttributes){ 83val=node[i]||node.getAttribute&&node.getAttribute(i); 84if(val){ 85script.setAttribute(i,val); 86} 87} 88} 89doc.head.appendChild(script).parentNode.removeChild(script); 90} 91function toType(obj){ 92if(obj==null){ 93return obj+""; 94} 95return typeof obj==="object"||typeof obj==="function"? 96class2type[toString.call(obj)]||"object": 97typeof obj; 98} 99var version="3.7.1", 100rhtmlSuffix=/HTML$/i, 101jQuery=function(selector,context){ 102return new jQuery.fn.init(selector,context); 103}; 104jQuery.fn=jQuery.prototype={ 105jquery:version, 106constructor:jQuery, 107length:0, 108toArray:function(){ 109return slice.call(this); 110}, 111get:function(num){ 112if(num==null){ 113return slice.call(this); 114} 115return num<0?this[num+this.length]:this[num]; 116}, 117pushStack:function(elems){ 118var ret=jQuery.merge(this.constructor(),elems); 119ret.prevObject=this; 120return ret; 121}, 122each:function(callback){ 123return jQuery.each(this,callback); 124}, 125map:function(callback){ 126return this.pushStack(jQuery.map(this,function(elem,i){ 127return callback.call(elem,i,elem); 128})); 129}, 130slice:function(){ 131return this.pushStack(slice.apply(this,arguments)); 132}, 133first:function(){ 134return this.eq(0); 135}, 136last:function(){ 137return this.eq(-1); 138}, 139even:function(){ 140return this.pushStack(jQuery.grep(this,function(_elem,i){ 141return(i+1)%2; 142})); 143}, 144odd:function(){ 145return this.pushStack(jQuery.grep(this,function(_elem,i){ 146return i%2; 147})); 148}, 149eq:function(i){ 150var len=this.length, 151j=+i+(i<0?len:0); 152return this.pushStack(j>=0&&j<len?[this[j]]:[]); 153}, 154end:function(){ 155return this.prevObject||this.constructor(); 156}, 157push:push, 158sort:arr.sort, 159splice:arr.splice 160}; 161jQuery.extend=jQuery.fn.extend=function(){ 162var options,name,src,copy,copyIsArray,clone, 163target=arguments[0]||{}, 164i=1, 165length=arguments.length, 166deep=false; 167if(typeof target==="boolean"){ 168deep=target; 169target=arguments[i]||{}; 170i++; 171} 172if(typeof target!=="object"&&!isFunction(target)){ 173target={}; 174} 175if(i===length){ 176target=this; 177i--; 178} 179for(;i<length;i++){ 180if((options=arguments[i])!=null){ 181for(name in options){ 182copy=options[name]; 183if(name==="__proto__"||target===copy){ 184continue; 185} 186if(deep&©&&(jQuery.isPlainObject(copy)|| 187(copyIsArray=Array.isArray(copy)))){ 188src=target[name]; 189if(copyIsArray&&!Array.isArray(src)){ 190clone=[]; 191}else if(!copyIsArray&&!jQuery.isPlainObject(src)){ 192clone={}; 193}else{ 194clone=src; 195} 196copyIsArray=false; 197target[name]=jQuery.extend(deep,clone,copy); 198}else if(copy!==undefined){ 199target[name]=copy; 200} 201} 202} 203} 204return target; 205}; 206jQuery.extend({ 207expando:"jQuery"+(version+Math.random()).replace(/\D/g,""), 208isReady:true, 209error:function(msg){ 210throw new Error(msg); 211}, 212noop:function(){}, 213isPlainObject:function(obj){ 214var proto,Ctor; 215if(!obj||toString.call(obj)!=="[object Object]"){ 216return false; 217} 218proto=getProto(obj); 219if(!proto){ 220return true; 221} 222Ctor=hasOwn.call(proto,"constructor")&&proto.constructor; 223return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString; 224}, 225isEmptyObject:function(obj){ 226var name; 227for(name in obj){ 228return false; 229} 230return true; 231}, 232globalEval:function(code,options,doc){ 233DOMEval(code,{nonce:options&&options.nonce},doc); 234}, 235each:function(obj,callback){ 236var length,i=0; 237if(isArrayLike(obj)){ 238length=obj.length; 239for(;i<length;i++){ 240if(callback.call(obj[i],i,obj[i])===false){ 241break; 242} 243} 244}else{ 245for(i in obj){ 246if(callback.call(obj[i],i,obj[i])===false){ 247break; 248} 249} 250} 251return obj; 252}, 253text:function(elem){ 254var node, 255ret="", 256i=0, 257nodeType=elem.nodeType; 258if(!nodeType){ 259while((node=elem[i++])){ 260ret+=jQuery.text(node); 261} 262} 263if(nodeType===1||nodeType===11){ 264return elem.textContent; 265} 266if(nodeType===9){ 267return elem.documentElement.textContent; 268} 269if(nodeType===3||nodeType===4){ 270return elem.nodeValue; 271} 272return ret; 273}, 274makeArray:function(arr,results){ 275var ret=results||[]; 276if(arr!=null){ 277if(isArrayLike(Object(arr))){ 278jQuery.merge(ret, 279typeof arr==="string"? 280[arr]:arr 281); 282}else{ 283push.call(ret,arr); 284} 285} 286return ret; 287}, 288inArray:function(elem,arr,i){ 289return arr==null?-1:indexOf.call(arr,elem,i); 290}, 291isXMLDoc:function(elem){ 292var namespace=elem&&elem.namespaceURI, 293docElem=elem&&(elem.ownerDocument||elem).documentElement; 294return!rhtmlSuffix.test(namespace||docElem&&docElem.nodeName||"HTML"); 295}, 296merge:function(first,second){ 297var len=+second.length, 298j=0, 299i=first.length; 300for(;j<len;j++){ 301first[i++]=second[j]; 302} 303first.length=i; 304return first; 305}, 306grep:function(elems,callback,invert){ 307var callbackInverse, 308matches=[], 309i=0, 310length=elems.length, 311callbackExpect=!invert; 312for(;i<length;i++){ 313callbackInverse=!callback(elems[i],i); 314if(callbackInverse!==callbackExpect){ 315matches.push(elems[i]); 316} 317} 318return matches; 319}, 320map:function(elems,callback,arg){ 321var length,value, 322i=0, 323ret=[]; 324if(isArrayLike(elems)){ 325length=elems.length; 326for(;i<length;i++){ 327value=callback(elems[i],i,arg); 328if(value!=null){ 329ret.push(value); 330} 331} 332}else{ 333for(i in elems){ 334value=callback(elems[i],i,arg); 335if(value!=null){ 336ret.push(value); 337} 338} 339} 340return flat(ret); 341}, 342guid:1, 343support:support 344}); 345if(typeof Symbol==="function"){ 346jQuery.fn[Symbol.iterator]=arr[Symbol.iterator]; 347} 348jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), 349function(_i,name){ 350class2type["[object "+name+"]"]=name.toLowerCase(); 351}); 352function isArrayLike(obj){ 353var length=!!obj&&"length"in obj&&obj.length, 354type=toType(obj); 355if(isFunction(obj)||isWindow(obj)){ 356return false; 357} 358return type==="array"||length===0|| 359typeof length==="number"&&length>0&&(length-1)in obj; 360} 361function nodeName(elem,name){ 362return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase(); 363} 364var pop=arr.pop; 365var sort=arr.sort; 366var splice=arr.splice; 367var whitespace="[\\x20\\t\\r\\n\\f]"; 368var rtrimCSS=new RegExp( 369"^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$", 370"g" 371); 372jQuery.contains=function(a,b){ 373var bup=b&&b.parentNode; 374return a===bup||!!(bup&&bup.nodeType===1&&( 375a.contains? 376a.contains(bup): 377a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16 378)); 379}; 380var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; 381function fcssescape(ch,asCodePoint){ 382if(asCodePoint){ 383if(ch==="\0"){ 384return"\uFFFD"; 385} 386return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" "; 387} 388return"\\"+ch; 389} 390jQuery.escapeSelector=function(sel){ 391return(sel+"").replace(rcssescape,fcssescape); 392}; 393var preferredDoc=document, 394pushNative=push; 395(function(){ 396var i, 397Expr, 398outermostContext, 399sortInput, 400hasDuplicate, 401push=pushNative, 402document, 403documentElement, 404documentIsHTML, 405rbuggyQSA, 406matches, 407expando=jQuery.expando, 408dirruns=0, 409done=0, 410classCache=createCache(), 411tokenCache=createCache(), 412compilerCache=createCache(), 413nonnativeSelectorCache=createCache(), 414sortOrder=function(a,b){ 415if(a===b){ 416hasDuplicate=true; 417} 418return 0; 419}, 420booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|"+ 421"loop|multiple|open|readonly|required|scoped", 422identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+ 423"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", 424attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+ 425"*([*^$|!~]?=)"+whitespace+ 426"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+ 427whitespace+"*\\]", 428pseudos=":("+identifier+")(?:\\(("+ 429"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+ 430"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+ 431".*"+ 432")\\)|)", 433rwhitespace=new RegExp(whitespace+"+","g"), 434rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"), 435rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+ 436whitespace+"*"), 437rdescend=new RegExp(whitespace+"|>"), 438rpseudo=new RegExp(pseudos), 439ridentifier=new RegExp("^"+identifier+"$"), 440matchExpr={ 441ID:new RegExp("^#("+identifier+")"), 442CLASS:new RegExp("^\\.("+identifier+")"), 443TAG:new RegExp("^("+identifier+"|[*])"), 444ATTR:new RegExp("^"+attributes), 445PSEUDO:new RegExp("^"+pseudos), 446CHILD:new RegExp( 447"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ 448whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+ 449whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"), 450bool:new RegExp("^(?:"+booleans+")$","i"), 451needsContext:new RegExp("^"+whitespace+ 452"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+ 453"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i") 454}, 455rinputs=/^(?:input|select|textarea|button)$/i, 456rheader=/^h\d$/i, 457rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 458rsibling=/[+~]/, 459runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+ 460"?|\\\\([^\\r\\n\\f])","g"), 461funescape=function(escape,nonHex){ 462var high="0x"+escape.slice(1)-0x10000; 463if(nonHex){ 464return nonHex; 465} 466return high<0? 467String.fromCharCode(high+0x10000): 468String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00); 469}, 470unloadHandler=function(){ 471setDocument(); 472}, 473inDisabledFieldset=addCombinator( 474function(elem){ 475return elem.disabled===true&&nodeName(elem,"fieldset"); 476}, 477{dir:"parentNode",next:"legend"} 478); 479function safeActiveElement(){ 480try{ 481return document.activeElement; 482}catch(err){} 483} 484try{ 485push.apply( 486(arr=slice.call(preferredDoc.childNodes)), 487preferredDoc.childNodes 488); 489arr[preferredDoc.childNodes.length].nodeType; 490}catch(e){ 491push={ 492apply:function(target,els){ 493pushNative.apply(target,slice.call(els)); 494}, 495call:function(target){ 496pushNative.apply(target,slice.call(arguments,1)); 497} 498}; 499} 500function find(selector,context,results,seed){ 501var m,i,elem,nid,match,groups,newSelector, 502newContext=context&&context.ownerDocument, 503nodeType=context?context.nodeType:9; 504results=results||[]; 505if(typeof selector!=="string"||!selector|| 506nodeType!==1&&nodeType!==9&&nodeType!==11){ 507return results; 508} 509if(!seed){ 510setDocument(context); 511context=context||document; 512if(documentIsHTML){ 513if(nodeType!==11&&(match=rquickExpr.exec(selector))){ 514if((m=match[1])){ 515if(nodeType===9){ 516if((elem=context.getElementById(m))){ 517if(elem.id===m){ 518push.call(results,elem); 519return results; 520} 521}else{ 522return results; 523} 524}else{ 525if(newContext&&(elem=newContext.getElementById(m))&& 526find.contains(context,elem)&& 527elem.id===m){ 528push.call(results,elem); 529return results; 530} 531} 532}else if(match[2]){ 533push.apply(results,context.getElementsByTagName(selector)); 534return results; 535}else if((m=match[3])&&context.getElementsByClassName){ 536push.apply(results,context.getElementsByClassName(m)); 537return results; 538} 539} 540if(!nonnativeSelectorCache[selector+" "]&& 541(!rbuggyQSA||!rbuggyQSA.test(selector))){ 542newSelector=selector; 543newContext=context; 544if(nodeType===1&& 545(rdescend.test(selector)||rleadingCombinator.test(selector))){ 546newContext=rsibling.test(selector)&&testContext(context.parentNode)|| 547context; 548if(newContext!=context||!support.scope){ 549if((nid=context.getAttribute("id"))){ 550nid=jQuery.escapeSelector(nid); 551}else{ 552context.setAttribute("id",(nid=expando)); 553} 554} 555groups=tokenize(selector); 556i=groups.length; 557while(i--){ 558groups[i]=(nid?"#"+nid:":scope")+" "+ 559toSelector(groups[i]); 560} 561newSelector=groups.join(","); 562} 563try{ 564push.apply(results, 565newContext.querySelectorAll(newSelector) 566); 567return results; 568}catch(qsaError){ 569nonnativeSelectorCache(selector,true); 570}finally{ 571if(nid===expando){ 572context.removeAttribute("id"); 573} 574} 575} 576} 577} 578return select(selector.replace(rtrimCSS,"$1"),context,results,seed); 579} 580function createCache(){ 581var keys=[]; 582function cache(key,value){ 583if(keys.push(key+" ")>Expr.cacheLength){ 584delete cache[keys.shift()]; 585} 586return(cache[key+" "]=value); 587} 588return cache; 589} 590function markFunction(fn){ 591fn[expando]=true; 592return fn; 593} 594function assert(fn){ 595var el=document.createElement("fieldset"); 596try{ 597return!!fn(el); 598}catch(e){ 599return false; 600}finally{ 601if(el.parentNode){ 602el.parentNode.removeChild(el); 603} 604el=null; 605} 606} 607function createInputPseudo(type){ 608return function(elem){ 609return nodeName(elem,"input")&&elem.type===type; 610}; 611} 612function createButtonPseudo(type){ 613return function(elem){ 614return(nodeName(elem,"input")||nodeName(elem,"button"))&& 615elem.type===type; 616}; 617} 618function createDisabledPseudo(disabled){ 619return function(elem){ 620if("form"in elem){ 621if(elem.parentNode&&elem.disabled===false){ 622if("label"in elem){ 623if("label"in elem.parentNode){ 624return elem.parentNode.disabled===disabled; 625}else{ 626return elem.disabled===disabled; 627} 628} 629return elem.isDisabled===disabled|| 630elem.isDisabled!==!disabled&& 631inDisabledFieldset(elem)===disabled; 632} 633return elem.disabled===disabled; 634}else if("label"in elem){ 635return elem.disabled===disabled; 636} 637return false; 638}; 639} 640function createPositionalPseudo(fn){ 641return markFunction(function(argument){ 642argument=+argument; 643return markFunction(function(seed,matches){ 644var j, 645matchIndexes=fn([],seed.length,argument), 646i=matchIndexes.length; 647while(i--){ 648if(seed[(j=matchIndexes[i])]){ 649seed[j]=!(matches[j]=seed[j]); 650} 651} 652}); 653}); 654} 655function testContext(context){ 656return context&&typeof context.getElementsByTagName!=="undefined"&&context; 657} 658function setDocument(node){ 659var subWindow, 660doc=node?node.ownerDocument||node:preferredDoc; 661if(doc==document||doc.nodeType!==9||!doc.documentElement){ 662return document; 663} 664document=doc; 665documentElement=document.documentElement; 666documentIsHTML=!jQuery.isXMLDoc(document); 667matches=documentElement.matches|| 668documentElement.webkitMatchesSelector|| 669documentElement.msMatchesSelector; 670if(documentElement.msMatchesSelector&& 671preferredDoc!=document&& 672(subWindow=document.defaultView)&&subWindow.top!==subWindow){ 673subWindow.addEventListener("unload",unloadHandler); 674} 675support.getById=assert(function(el){ 676documentElement.appendChild(el).id=jQuery.expando; 677return!document.getElementsByName|| 678!document.getElementsByName(jQuery.expando).length; 679}); 680support.disconnectedMatch=assert(function(el){ 681return matches.call(el,"*"); 682}); 683support.scope=assert(function(){ 684return document.querySelectorAll(":scope"); 685}); 686support.cssHas=assert(function(){ 687try{ 688document.querySelector(":has(*,:jqfake)"); 689return false; 690}catch(e){ 691return true; 692} 693}); 694if(support.getById){ 695Expr.filter.ID=function(id){ 696var attrId=id.replace(runescape,funescape); 697return function(elem){ 698return elem.getAttribute("id")===attrId; 699}; 700}; 701Expr.find.ID=function(id,context){ 702if(typeof context.getElementById!=="undefined"&&documentIsHTML){ 703var elem=context.getElementById(id); 704return elem?[elem]:[]; 705} 706}; 707}else{ 708Expr.filter.ID=function(id){ 709var attrId=id.replace(runescape,funescape); 710return function(elem){ 711var node=typeof elem.getAttributeNode!=="undefined"&& 712elem.getAttributeNode("id"); 713return node&&node.value===attrId; 714}; 715}; 716Expr.find.ID=function(id,context){ 717if(typeof context.getElementById!=="undefined"&&documentIsHTML){ 718var node,i,elems, 719elem=context.getElementById(id); 720if(elem){ 721node=elem.getAttributeNode("id"); 722if(node&&node.value===id){ 723return[elem]; 724} 725elems=context.getElementsByName(id); 726i=0; 727while((elem=elems[i++])){ 728node=elem.getAttributeNode("id"); 729if(node&&node.value===id){ 730return[elem]; 731} 732} 733} 734return[]; 735} 736}; 737} 738Expr.find.TAG=function(tag,context){ 739if(typeof context.getElementsByTagName!=="undefined"){ 740return context.getElementsByTagName(tag); 741}else{ 742return context.querySelectorAll(tag); 743} 744}; 745Expr.find.CLASS=function(className,context){ 746if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){ 747return context.getElementsByClassName(className); 748} 749}; 750rbuggyQSA=[]; 751assert(function(el){ 752var input; 753documentElement.appendChild(el).innerHTML= 754"<a id='"+expando+"' href='' disabled='disabled'></a>"+ 755"<select id='"+expando+"-\r\\' disabled='disabled'>"+ 756"<option selected=''></option></select>"; 757if(!el.querySelectorAll("[selected]").length){ 758rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")"); 759} 760if(!el.querySelectorAll("[id~="+expando+"-]").length){ 761rbuggyQSA.push("~="); 762} 763if(!el.querySelectorAll("a#"+expando+"+*").length){ 764rbuggyQSA.push(".#.+[+~]"); 765} 766if(!el.querySelectorAll(":checked").length){ 767rbuggyQSA.push(":checked"); 768} 769input=document.createElement("input"); 770input.setAttribute("type","hidden"); 771el.appendChild(input).setAttribute("name","D"); 772documentElement.appendChild(el).disabled=true; 773if(el.querySelectorAll(":disabled").length!==2){ 774rbuggyQSA.push(":enabled",":disabled"); 775} 776input=document.createElement("input"); 777input.setAttribute("name",""); 778el.appendChild(input); 779if(!el.querySelectorAll("[name='']").length){ 780rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+ 781whitespace+"*(?:''|\"\")"); 782} 783}); 784if(!support.cssHas){ 785rbuggyQSA.push(":has"); 786} 787rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")); 788sortOrder=function(a,b){ 789if(a===b){ 790hasDuplicate=true; 791return 0; 792} 793var compare=!a.compareDocumentPosition-!b.compareDocumentPosition; 794if(compare){ 795return compare; 796} 797compare=(a.ownerDocument||a)==(b.ownerDocument||b)? 798a.compareDocumentPosition(b): 7991; 800if(compare&1|| 801(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){ 802if(a===document||a.ownerDocument==preferredDoc&& 803find.contains(preferredDoc,a)){ 804return-1; 805} 806if(b===document||b.ownerDocument==preferredDoc&& 807find.contains(preferredDoc,b)){ 808return 1; 809} 810return sortInput? 811(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)): 8120; 813} 814return compare&4?-1:1; 815}; 816return document; 817} 818find.matches=function(expr,elements){ 819return find(expr,null,null,elements); 820}; 821find.matchesSelector=function(elem,expr){ 822setDocument(elem); 823if(documentIsHTML&& 824!nonnativeSelectorCache[expr+" "]&& 825(!rbuggyQSA||!rbuggyQSA.test(expr))){ 826try{ 827var ret=matches.call(elem,expr); 828if(ret||support.disconnectedMatch|| 829elem.document&&elem.document.nodeType!==11){ 830return ret; 831} 832}catch(e){ 833nonnativeSelectorCache(expr,true); 834} 835} 836return find(expr,document,null,[elem]).length>0; 837}; 838find.contains=function(context,elem){ 839if((context.ownerDocument||context)!=document){ 840setDocument(context); 841} 842return jQuery.contains(context,elem); 843}; 844find.attr=function(elem,name){ 845if((elem.ownerDocument||elem)!=document){ 846setDocument(elem); 847} 848var fn=Expr.attrHandle[name.toLowerCase()], 849val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())? 850fn(elem,name,!documentIsHTML): 851undefined; 852if(val!==undefined){ 853return val; 854} 855return elem.getAttribute(name); 856}; 857find.error=function(msg){ 858throw new Error("Syntax error, unrecognized expression: "+msg); 859}; 860jQuery.uniqueSort=function(results){ 861var elem, 862duplicates=[], 863j=0, 864i=0; 865hasDuplicate=!support.sortStable; 866sortInput=!support.sortStable&&slice.call(results,0); 867sort.call(results,sortOrder); 868if(hasDuplicate){ 869while((elem=results[i++])){ 870if(elem===results[i]){ 871j=duplicates.push(i); 872} 873} 874while(j--){ 875splice.call(results,duplicates[j],1); 876} 877} 878sortInput=null; 879return results; 880}; 881jQuery.fn.uniqueSort=function(){ 882return this.pushStack(jQuery.uniqueSort(slice.apply(this))); 883}; 884Expr=jQuery.expr={ 885cacheLength:50, 886createPseudo:markFunction, 887match:matchExpr, 888attrHandle:{}, 889find:{}, 890relative:{ 891">":{dir:"parentNode",first:true}, 892" ":{dir:"parentNode"}, 893"+":{dir:"previousSibling",first:true}, 894"~":{dir:"previousSibling"} 895}, 896preFilter:{ 897ATTR:function(match){ 898match[1]=match[1].replace(runescape,funescape); 899match[3]=(match[3]||match[4]||match[5]||"") 900.replace(runescape,funescape); 901if(match[2]==="~="){ 902match[3]=" "+match[3]+" "; 903} 904return match.slice(0,4); 905}, 906CHILD:function(match){ 907match[1]=match[1].toLowerCase(); 908if(match[1].slice(0,3)==="nth"){ 909if(!match[3]){ 910find.error(match[0]); 911} 912match[4]=+(match[4]? 913match[5]+(match[6]||1): 9142*(match[3]==="even"||match[3]==="odd") 915); 916match[5]=+((match[7]+match[8])||match[3]==="odd"); 917}else if(match[3]){ 918find.error(match[0]); 919} 920return match; 921}, 922PSEUDO:function(match){ 923var excess, 924unquoted=!match[6]&&match[2]; 925if(matchExpr.CHILD.test(match[0])){ 926return null; 927} 928if(match[3]){ 929match[2]=match[4]||match[5]||""; 930}else if(unquoted&&rpseudo.test(unquoted)&& 931(excess=tokenize(unquoted,true))&& 932(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){ 933match[0]=match[0].slice(0,excess); 934match[2]=unquoted.slice(0,excess); 935} 936return match.slice(0,3); 937} 938}, 939filter:{ 940TAG:function(nodeNameSelector){ 941var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase(); 942return nodeNameSelector==="*"? 943function(){ 944return true; 945}: 946function(elem){ 947return nodeName(elem,expectedNodeName); 948}; 949}, 950CLASS:function(className){ 951var pattern=classCache[className+" "]; 952return pattern|| 953(pattern=new RegExp("(^|"+whitespace+")"+className+ 954"("+whitespace+"|$)"))&& 955classCache(className,function(elem){ 956return pattern.test( 957typeof elem.className==="string"&&elem.className|| 958typeof elem.getAttribute!=="undefined"&& 959elem.getAttribute("class")|| 960"" 961); 962}); 963}, 964ATTR:function(name,operator,check){ 965return function(elem){ 966var result=find.attr(elem,name); 967if(result==null){ 968return operator==="!="; 969} 970if(!operator){ 971return true; 972} 973result+=""; 974if(operator==="="){ 975return result===check; 976} 977if(operator==="!="){ 978return result!==check; 979} 980if(operator==="^="){ 981return check&&result.indexOf(check)===0; 982} 983if(operator==="*="){ 984return check&&result.indexOf(check)>-1; 985} 986if(operator==="$="){ 987return check&&result.slice(-check.length)===check; 988} 989if(operator==="~="){ 990return(" "+result.replace(rwhitespace," ")+" ") 991.indexOf(check)>-1; 992} 993if(operator==="|="){ 994return result===check||result.slice(0,check.length+1)===check+"-"; 995} 996return false; 997}; 998}, 999CHILD:function(type,what,_argument,first,last){ 1000var simple=type.slice(0,3)!=="nth", 1001forward=type.slice(-4)!=="last", 1002ofType=what==="of-type"; 1003return first===1&&last===0? 1004function(elem){ 1005return!!elem.parentNode; 1006}: 1007function(elem,_context,xml){ 1008var cache,outerCache,node,nodeIndex,start, 1009dir=simple!==forward?"nextSibling":"previousSibling", 1010parent=elem.parentNode, 1011name=ofType&&elem.nodeName.toLowerCase(), 1012useCache=!xml&&!ofType, 1013diff=false; 1014if(parent){ 1015if(simple){ 1016while(dir){ 1017node=elem; 1018while((node=node[dir])){ 1019if(ofType? 1020nodeName(node,name): 1021node.nodeType===1){ 1022return false; 1023} 1024} 1025start=dir=type==="only"&&!start&&"nextSibling"; 1026} 1027return true; 1028} 1029start=[forward?parent.firstChild:parent.lastChild]; 1030if(forward&&useCache){ 1031outerCache=parent[expando]||(parent[expando]={}); 1032cache=outerCache[type]||[]; 1033nodeIndex=cache[0]===dirruns&&cache[1]; 1034diff=nodeIndex&&cache[2]; 1035node=nodeIndex&&parent.childNodes[nodeIndex]; 1036while((node=++nodeIndex&&node&&node[dir]|| 1037(diff=nodeIndex=0)||start.pop())){ 1038if(node.nodeType===1&&++diff&&node===elem){ 1039outerCache[type]=[dirruns,nodeIndex,diff]; 1040break; 1041} 1042} 1043}else{ 1044if(useCache){ 1045outerCache=elem[expando]||(elem[expando]={}); 1046cache=outerCache[type]||[]; 1047nodeIndex=cache[0]===dirruns&&cache[1]; 1048diff=nodeIndex; 1049} 1050if(diff===false){ 1051while((node=++nodeIndex&&node&&node[dir]|| 1052(diff=nodeIndex=0)||start.pop())){ 1053if((ofType? 1054nodeName(node,name): 1055node.nodeType===1)&& 1056++diff){ 1057if(useCache){ 1058outerCache=node[expando]|| 1059(node[expando]={}); 1060outerCache[type]=[dirruns,diff]; 1061} 1062if(node===elem){ 1063break; 1064} 1065} 1066} 1067} 1068} 1069diff-=last; 1070return diff===first||(diff%first===0&&diff/first>=0); 1071} 1072}; 1073}, 1074PSEUDO:function(pseudo,argument){ 1075var args, 1076fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]|| 1077find.error("unsupported pseudo: "+pseudo); 1078if(fn[expando]){ 1079return fn(argument); 1080} 1081if(fn.length>1){ 1082args=[pseudo,pseudo,"",argument]; 1083return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())? 1084markFunction(function(seed,matches){ 1085var idx, 1086matched=fn(seed,argument), 1087i=matched.length; 1088while(i--){ 1089idx=indexOf.call(seed,matched[i]); 1090seed[idx]=!(matches[idx]=matched[i]); 1091} 1092}): 1093function(elem){ 1094return fn(elem,0,args); 1095}; 1096} 1097return fn; 1098} 1099}, 1100pseudos:{ 1101not:markFunction(function(selector){ 1102var input=[], 1103results=[], 1104matcher=compile(selector.replace(rtrimCSS,"$1")); 1105return matcher[expando]? 1106markFunction(function(seed,matches,_context,xml){ 1107var elem, 1108unmatched=matcher(seed,null,xml,[]), 1109i=seed.length; 1110while(i--){ 1111if((elem=unmatched[i])){ 1112seed[i]=!(matches[i]=elem); 1113} 1114} 1115}): 1116function(elem,_context,xml){ 1117input[0]=elem; 1118matcher(input,null,xml,results); 1119input[0]=null; 1120return!results.pop(); 1121}; 1122}), 1123has:markFunction(function(selector){ 1124return function(elem){ 1125return find(selector,elem).length>0; 1126}; 1127}), 1128contains:markFunction(function(text){ 1129text=text.replace(runescape,funescape); 1130return function(elem){ 1131return(elem.textContent||jQuery.text(elem)).indexOf(text)>-1; 1132}; 1133}), 1134lang:markFunction(function(lang){ 1135if(!ridentifier.test(lang||"")){ 1136find.error("unsupported lang: "+lang); 1137} 1138lang=lang.replace(runescape,funescape).toLowerCase(); 1139return function(elem){ 1140var elemLang; 1141do{ 1142if((elemLang=documentIsHTML? 1143elem.lang: 1144elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){ 1145elemLang=elemLang.toLowerCase(); 1146return elemLang===lang||elemLang.indexOf(lang+"-")===0; 1147} 1148}while((elem=elem.parentNode)&&elem.nodeType===1); 1149return false; 1150}; 1151}), 1152target:function(elem){ 1153var hash=window.location&&window.location.hash; 1154return hash&&hash.slice(1)===elem.id; 1155}, 1156root:function(elem){ 1157return elem===documentElement; 1158}, 1159focus:function(elem){ 1160return elem===safeActiveElement()&& 1161document.hasFocus()&& 1162!!(elem.type||elem.href||~elem.tabIndex); 1163}, 1164enabled:createDisabledPseudo(false), 1165disabled:createDisabledPseudo(true), 1166checked:function(elem){ 1167return(nodeName(elem,"input")&&!!elem.checked)|| 1168(nodeName(elem,"option")&&!!elem.selected); 1169}, 1170selected:function(elem){ 1171if(elem.parentNode){ 1172elem.parentNode.selectedIndex; 1173} 1174return elem.selected===true; 1175}, 1176empty:function(elem){ 1177for(elem=elem.firstChild;elem;elem=elem.nextSibling){ 1178if(elem.nodeType<6){ 1179return false; 1180} 1181} 1182return true; 1183}, 1184parent:function(elem){ 1185return!Expr.pseudos.empty(elem); 1186}, 1187header:function(elem){ 1188return rheader.test(elem.nodeName); 1189}, 1190input:function(elem){ 1191return rinputs.test(elem.nodeName); 1192}, 1193button:function(elem){ 1194return nodeName(elem,"input")&&elem.type==="button"|| 1195nodeName(elem,"button"); 1196}, 1197text:function(elem){ 1198var attr; 1199return nodeName(elem,"input")&&elem.type==="text"&& 1200((attr=elem.getAttribute("type"))==null|| 1201attr.toLowerCase()==="text"); 1202}, 1203first:createPositionalPseudo(function(){ 1204return[0]; 1205}), 1206last:createPositionalPseudo(function(_matchIndexes,length){ 1207return[length-1]; 1208}), 1209eq:createPositionalPseudo(function(_matchIndexes,length,argument){ 1210return[argument<0?argument+length:argument]; 1211}), 1212even:createPositionalPseudo(function(matchIndexes,length){ 1213var i=0; 1214for(;i<length;i+=2){ 1215matchIndexes.push(i); 1216} 1217return matchIndexes; 1218}), 1219odd:createPositionalPseudo(function(matchIndexes,length){ 1220var i=1; 1221for(;i<length;i+=2){ 1222matchIndexes.push(i); 1223} 1224return matchIndexes; 1225}), 1226lt:createPositionalPseudo(function(matchIndexes,length,argument){ 1227var i; 1228if(argument<0){ 1229i=argument+length; 1230}else if(argument>length){ 1231i=length; 1232}else{ 1233i=argument; 1234} 1235for(;--i>=0;){ 1236matchIndexes.push(i); 1237} 1238return matchIndexes; 1239}), 1240gt:createPositionalPseudo(function(matchIndexes,length,argument){ 1241var i=argument<0?argument+length:argument; 1242for(;++i<length;){ 1243matchIndexes.push(i); 1244} 1245return matchIndexes; 1246}) 1247} 1248}; 1249Expr.pseudos.nth=Expr.pseudos.eq; 1250for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){ 1251Expr.pseudos[i]=createInputPseudo(i); 1252} 1253for(i in{submit:true,reset:true}){ 1254Expr.pseudos[i]=createButtonPseudo(i); 1255} 1256function setFilters(){} 1257setFilters.prototype=Expr.filters=Expr.pseudos; 1258Expr.setFilters=new setFilters(); 1259function tokenize(selector,parseOnly){ 1260var matched,match,tokens,type, 1261soFar,groups,preFilters, 1262cached=tokenCache[selector+" "]; 1263if(cached){ 1264return parseOnly?0:cached.slice(0); 1265} 1266soFar=selector; 1267groups=[]; 1268preFilters=Expr.preFilter; 1269while(soFar){ 1270if(!matched||(match=rcomma.exec(soFar))){ 1271if(match){ 1272soFar=soFar.slice(match[0].length)||soFar; 1273} 1274groups.push((tokens=[])); 1275} 1276matched=false; 1277if((match=rleadingCombinator.exec(soFar))){ 1278matched=match.shift(); 1279tokens.push({ 1280value:matched, 1281type:match[0].replace(rtrimCSS," ") 1282}); 1283soFar=soFar.slice(matched.length); 1284} 1285for(type in Expr.filter){ 1286if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]|| 1287(match=preFilters[type](match)))){ 1288matched=match.shift(); 1289tokens.push({ 1290value:matched, 1291type:type, 1292matches:match 1293}); 1294soFar=soFar.slice(matched.length); 1295} 1296} 1297if(!matched){ 1298break; 1299} 1300} 1301if(parseOnly){ 1302return soFar.length; 1303} 1304return soFar? 1305find.error(selector): 1306tokenCache(selector,groups).slice(0); 1307} 1308function toSelector(tokens){ 1309var i=0, 1310len=tokens.length, 1311selector=""; 1312for(;i<len;i++){ 1313selector+=tokens[i].value; 1314} 1315return selector; 1316} 1317function addCombinator(matcher,combinator,base){ 1318var dir=combinator.dir, 1319skip=combinator.next, 1320key=skip||dir, 1321checkNonElements=base&&key==="parentNode", 1322doneName=done++; 1323return combinator.first? 1324function(elem,context,xml){ 1325while((elem=elem[dir])){ 1326if(elem.nodeType===1||checkNonElements){ 1327return matcher(elem,context,xml); 1328} 1329} 1330return false; 1331}: 1332function(elem,context,xml){ 1333var oldCache,outerCache, 1334newCache=[dirruns,doneName]; 1335if(xml){ 1336while((elem=elem[dir])){ 1337if(elem.nodeType===1||checkNonElements){ 1338if(matcher(elem,context,xml)){ 1339return true; 1340} 1341} 1342} 1343}else{ 1344while((elem=elem[dir])){ 1345if(elem.nodeType===1||checkNonElements){ 1346outerCache=elem[expando]||(elem[expando]={}); 1347if(skip&&nodeName(elem,skip)){ 1348elem=elem[dir]||elem; 1349}else if((oldCache=outerCache[key])&& 1350oldCache[0]===dirruns&&oldCache[1]===doneName){ 1351return(newCache[2]=oldCache[2]); 1352}else{ 1353outerCache[key]=newCache; 1354if((newCache[2]=matcher(elem,context,xml))){ 1355return true; 1356} 1357} 1358} 1359} 1360} 1361return false; 1362}; 1363} 1364function elementMatcher(matchers){ 1365return matchers.length>1? 1366function(elem,context,xml){ 1367var i=matchers.length; 1368while(i--){ 1369if(!matchers[i](elem,context,xml)){ 1370return false; 1371} 1372} 1373return true; 1374}: 1375matchers[0]; 1376} 1377function multipleContexts(selector,contexts,results){ 1378var i=0, 1379len=contexts.length; 1380for(;i<len;i++){ 1381find(selector,contexts[i],results); 1382} 1383return results; 1384} 1385function condense(unmatched,map,filter,context,xml){ 1386var elem, 1387newUnmatched=[], 1388i=0, 1389len=unmatched.length, 1390mapped=map!=null; 1391for(;i<len;i++){ 1392if((elem=unmatched[i])){ 1393if(!filter||filter(elem,context,xml)){ 1394newUnmatched.push(elem); 1395if(mapped){ 1396map.push(i); 1397} 1398} 1399} 1400} 1401return newUnmatched; 1402} 1403function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){ 1404if(postFilter&&!postFilter[expando]){ 1405postFilter=setMatcher(postFilter); 1406} 1407if(postFinder&&!postFinder[expando]){ 1408postFinder=setMatcher(postFinder,postSelector); 1409} 1410return markFunction(function(seed,results,context,xml){ 1411var temp,i,elem,matcherOut, 1412preMap=[], 1413postMap=[], 1414preexisting=results.length, 1415elems=seed|| 1416multipleContexts(selector||"*", 1417context.nodeType?[context]:context,[]), 1418matcherIn=preFilter&&(seed||!selector)? 1419condense(elems,preMap,preFilter,context,xml): 1420elems; 1421if(matcher){ 1422matcherOut=postFinder||(seed?preFilter:preexisting||postFilter)? 1423[]: 1424results; 1425matcher(matcherIn,matcherOut,context,xml); 1426}else{ 1427matcherOut=matcherIn; 1428} 1429if(postFilter){ 1430temp=condense(matcherOut,postMap); 1431postFilter(temp,[],context,xml); 1432i=temp.length; 1433while(i--){ 1434if((elem=temp[i])){ 1435matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem); 1436} 1437} 1438} 1439if(seed){ 1440if(postFinder||preFilter){ 1441if(postFinder){ 1442temp=[]; 1443i=matcherOut.length; 1444while(i--){ 1445if((elem=matcherOut[i])){ 1446temp.push((matcherIn[i]=elem)); 1447} 1448} 1449postFinder(null,(matcherOut=[]),temp,xml); 1450} 1451i=matcherOut.length; 1452while(i--){ 1453if((elem=matcherOut[i])&& 1454(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1){ 1455seed[temp]=!(results[temp]=elem); 1456} 1457} 1458} 1459}else{ 1460matcherOut=condense( 1461matcherOut===results? 1462matcherOut.splice(preexisting,matcherOut.length): 1463matcherOut 1464); 1465if(postFinder){ 1466postFinder(null,results,matcherOut,xml); 1467}else{ 1468push.apply(results,matcherOut); 1469} 1470} 1471}); 1472} 1473function matcherFromTokens(tokens){ 1474var checkContext,matcher,j, 1475len=tokens.length, 1476leadingRelative=Expr.relative[tokens[0].type], 1477implicitRelative=leadingRelative||Expr.relative[" "], 1478i=leadingRelative?1:0, 1479matchContext=addCombinator(function(elem){ 1480return elem===checkContext; 1481},implicitRelative,true), 1482matchAnyContext=addCombinator(function(elem){ 1483return indexOf.call(checkContext,elem)>-1; 1484},implicitRelative,true), 1485matchers=[function(elem,context,xml){ 1486var ret=(!leadingRelative&&(xml||context!=outermostContext))||( 1487(checkContext=context).nodeType? 1488matchContext(elem,context,xml): 1489matchAnyContext(elem,context,xml)); 1490checkContext=null; 1491return ret; 1492}]; 1493for(;i<len;i++){ 1494if((matcher=Expr.relative[tokens[i].type])){ 1495matchers=[addCombinator(elementMatcher(matchers),matcher)]; 1496}else{ 1497matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches); 1498if(matcher[expando]){ 1499j=++i; 1500for(;j<len;j++){ 1501if(Expr.relative[tokens[j].type]){ 1502break; 1503} 1504} 1505return setMatcher( 1506i>1&&elementMatcher(matchers), 1507i>1&&toSelector( 1508tokens.slice(0,i-1) 1509.concat({value:tokens[i-2].type===" "?"*":""}) 1510).replace(rtrimCSS,"$1"), 1511matcher, 1512i<j&&matcherFromTokens(tokens.slice(i,j)), 1513j<len&&matcherFromTokens((tokens=tokens.slice(j))), 1514j<len&&toSelector(tokens) 1515); 1516} 1517matchers.push(matcher); 1518} 1519} 1520return elementMatcher(matchers); 1521} 1522function matcherFromGroupMatchers(elementMatchers,setMatchers){ 1523var bySet=setMatchers.length>0, 1524byElement=elementMatchers.length>0, 1525superMatcher=function(seed,context,xml,results,outermost){ 1526var elem,j,matcher, 1527matchedCount=0, 1528i="0", 1529unmatched=seed&&[], 1530setMatched=[], 1531contextBackup=outermostContext, 1532elems=seed||byElement&&Expr.find.TAG("*",outermost), 1533dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1), 1534len=elems.length; 1535if(outermost){ 1536outermostContext=context==document||context||outermost; 1537} 1538for(;i!==len&&(elem=elems[i])!=null;i++){ 1539if(byElement&&elem){ 1540j=0; 1541if(!context&&elem.ownerDocument!=document){ 1542setDocument(elem); 1543xml=!documentIsHTML; 1544} 1545while((matcher=elementMatchers[j++])){ 1546if(matcher(elem,context||document,xml)){ 1547push.call(results,elem); 1548break; 1549} 1550} 1551if(outermost){ 1552dirruns=dirrunsUnique; 1553} 1554} 1555if(bySet){ 1556if((elem=!matcher&&elem)){ 1557matchedCount--; 1558} 1559if(seed){ 1560unmatched.push(elem); 1561} 1562} 1563} 1564matchedCount+=i; 1565if(bySet&&i!==matchedCount){ 1566j=0; 1567while((matcher=setMatchers[j++])){ 1568matcher(unmatched,setMatched,context,xml); 1569} 1570if(seed){ 1571if(matchedCount>0){ 1572while(i--){ 1573if(!(unmatched[i]||setMatched[i])){ 1574setMatched[i]=pop.call(results); 1575} 1576} 1577} 1578setMatched=condense(setMatched); 1579} 1580push.apply(results,setMatched); 1581if(outermost&&!seed&&setMatched.length>0&& 1582(matchedCount+setMatchers.length)>1){ 1583jQuery.uniqueSort(results); 1584} 1585} 1586if(outermost){ 1587dirruns=dirrunsUnique; 1588outermostContext=contextBackup; 1589} 1590return unmatched; 1591}; 1592return bySet? 1593markFunction(superMatcher): 1594superMatcher; 1595} 1596function compile(selector,match){ 1597var i, 1598setMatchers=[], 1599elementMatchers=[], 1600cached=compilerCache[selector+" "]; 1601if(!cached){ 1602if(!match){ 1603match=tokenize(selector); 1604} 1605i=match.length; 1606while(i--){ 1607cached=matcherFromTokens(match[i]); 1608if(cached[expando]){ 1609setMatchers.push(cached); 1610}else{ 1611elementMatchers.push(cached); 1612} 1613} 1614cached=compilerCache(selector, 1615matcherFromGroupMatchers(elementMatchers,setMatchers)); 1616cached.selector=selector; 1617} 1618return cached; 1619} 1620function select(selector,context,results,seed){ 1621var i,tokens,token,type,find, 1622compiled=typeof selector==="function"&&selector, 1623match=!seed&&tokenize((selector=compiled.selector||selector)); 1624results=results||[]; 1625if(match.length===1){ 1626tokens=match[0]=match[0].slice(0); 1627if(tokens.length>2&&(token=tokens[0]).type==="ID"&& 1628context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){ 1629context=(Expr.find.ID( 1630token.matches[0].replace(runescape,funescape), 1631context 1632)||[])[0]; 1633if(!context){ 1634return results; 1635}else if(compiled){ 1636context=context.parentNode; 1637} 1638selector=selector.slice(tokens.shift().value.length); 1639} 1640i=matchExpr.needsContext.test(selector)?0:tokens.length; 1641while(i--){ 1642token=tokens[i]; 1643if(Expr.relative[(type=token.type)]){ 1644break; 1645} 1646if((find=Expr.find[type])){ 1647if((seed=find( 1648token.matches[0].replace(runescape,funescape), 1649rsibling.test(tokens[0].type)&& 1650testContext(context.parentNode)||context 1651))){ 1652tokens.splice(i,1); 1653selector=seed.length&&toSelector(tokens); 1654if(!selector){ 1655push.apply(results,seed); 1656return results; 1657} 1658break; 1659} 1660} 1661} 1662} 1663(compiled||compile(selector,match))( 1664seed, 1665context, 1666!documentIsHTML, 1667results, 1668!context||rsibling.test(selector)&&testContext(context.parentNode)||context 1669); 1670return results; 1671} 1672support.sortStable=expando.split("").sort(sortOrder).join("")===expando; 1673setDocument(); 1674support.sortDetached=assert(function(el){ 1675return el.compareDocumentPosition(document.createElement("fieldset"))&1; 1676}); 1677jQuery.find=find; 1678jQuery.expr[":"]=jQuery.expr.pseudos; 1679jQuery.unique=jQuery.uniqueSort; 1680find.compile=compile; 1681find.select=select; 1682find.setDocument=setDocument; 1683find.tokenize=tokenize; 1684find.escape=jQuery.escapeSelector; 1685find.getText=jQuery.text; 1686find.isXML=jQuery.isXMLDoc; 1687find.selectors=jQuery.expr; 1688find.support=jQuery.support; 1689find.uniqueSort=jQuery.uniqueSort; 1690})(); 1691var dir=function(elem,dir,until){ 1692var matched=[], 1693truncate=until!==undefined; 1694while((elem=elem[dir])&&elem.nodeType!==9){ 1695if(elem.nodeType===1){ 1696if(truncate&&jQuery(elem).is(until)){ 1697break; 1698} 1699matched.push(elem); 1700} 1701} 1702return matched; 1703}; 1704var siblings=function(n,elem){ 1705var matched=[]; 1706for(;n;n=n.nextSibling){ 1707if(n.nodeType===1&&n!==elem){ 1708matched.push(n); 1709} 1710} 1711return matched; 1712}; 1713var rneedsContext=jQuery.expr.match.needsContext; 1714var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i); 1715function winnow(elements,qualifier,not){ 1716if(isFunction(qualifier)){ 1717return jQuery.grep(elements,function(elem,i){ 1718return!!qualifier.call(elem,i,elem)!==not; 1719}); 1720} 1721if(qualifier.nodeType){ 1722return jQuery.grep(elements,function(elem){ 1723return(elem===qualifier)!==not; 1724}); 1725} 1726if(typeof qualifier!=="string"){ 1727return jQuery.grep(elements,function(elem){ 1728return(indexOf.call(qualifier,elem)>-1)!==not; 1729}); 1730} 1731return jQuery.filter(qualifier,elements,not); 1732} 1733jQuery.filter=function(expr,elems,not){ 1734var elem=elems[0]; 1735if(not){ 1736expr=":not("+expr+")"; 1737} 1738if(elems.length===1&&elem.nodeType===1){ 1739return jQuery.find.matchesSelector(elem,expr)?[elem]:[]; 1740} 1741return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){ 1742return elem.nodeType===1; 1743})); 1744}; 1745jQuery.fn.extend({ 1746find:function(selector){ 1747var i,ret, 1748len=this.length, 1749self=this; 1750if(typeof selector!=="string"){ 1751return this.pushStack(jQuery(selector).filter(function(){ 1752for(i=0;i<len;i++){ 1753if(jQuery.contains(self[i],this)){ 1754return true; 1755} 1756} 1757})); 1758} 1759ret=this.pushStack([]); 1760for(i=0;i<len;i++){ 1761jQuery.find(selector,self[i],ret); 1762} 1763return len>1?jQuery.uniqueSort(ret):ret; 1764}, 1765filter:function(selector){ 1766return this.pushStack(winnow(this,selector||[],false)); 1767}, 1768not:function(selector){ 1769return this.pushStack(winnow(this,selector||[],true)); 1770}, 1771is:function(selector){ 1772return!!winnow( 1773this, 1774typeof selector==="string"&&rneedsContext.test(selector)? 1775jQuery(selector): 1776selector||[], 1777false 1778).length; 1779} 1780}); 1781var rootjQuery, 1782rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, 1783init=jQuery.fn.init=function(selector,context,root){ 1784var match,elem; 1785if(!selector){ 1786return this; 1787} 1788root=root||rootjQuery; 1789if(typeof selector==="string"){ 1790if(selector[0]==="<"&& 1791selector[selector.length-1]===">"&& 1792selector.length>=3){ 1793match=[null,selector,null]; 1794}else{ 1795match=rquickExpr.exec(selector); 1796} 1797if(match&&(match[1]||!context)){ 1798if(match[1]){ 1799context=context instanceof jQuery?context[0]:context; 1800jQuery.merge(this,jQuery.parseHTML( 1801match[1], 1802context&&context.nodeType?context.ownerDocument||context:document, 1803true 1804)); 1805if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){ 1806for(match in context){ 1807if(isFunction(this[match])){ 1808this[match](context[match]); 1809}else{ 1810this.attr(match,context[match]); 1811} 1812} 1813} 1814return this; 1815}else{ 1816elem=document.getElementById(match[2]); 1817if(elem){ 1818this[0]=elem; 1819this.length=1; 1820} 1821return this; 1822} 1823}else if(!context||context.jquery){ 1824return(context||root).find(selector); 1825}else{ 1826return this.constructor(context).find(selector); 1827} 1828}else if(selector.nodeType){ 1829this[0]=selector; 1830this.length=1; 1831return this; 1832}else if(isFunction(selector)){ 1833return root.ready!==undefined? 1834root.ready(selector): 1835selector(jQuery); 1836} 1837return jQuery.makeArray(selector,this); 1838}; 1839init.prototype=jQuery.fn; 1840rootjQuery=jQuery(document); 1841var rparentsprev=/^(?:parents|prev(?:Until|All))/, 1842guaranteedUnique={ 1843children:true, 1844contents:true, 1845next:true, 1846prev:true 1847}; 1848jQuery.fn.extend({ 1849has:function(target){ 1850var targets=jQuery(target,this), 1851l=targets.length; 1852return this.filter(function(){ 1853var i=0; 1854for(;i<l;i++){ 1855if(jQuery.contains(this,targets[i])){ 1856return true; 1857} 1858} 1859}); 1860}, 1861closest:function(selectors,context){ 1862var cur, 1863i=0, 1864l=this.length, 1865matched=[], 1866targets=typeof selectors!=="string"&&jQuery(selectors); 1867if(!rneedsContext.test(selectors)){ 1868for(;i<l;i++){ 1869for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){ 1870if(cur.nodeType<11&&(targets? 1871targets.index(cur)>-1: 1872cur.nodeType===1&& 1873jQuery.find.matchesSelector(cur,selectors))){ 1874matched.push(cur); 1875break; 1876} 1877} 1878} 1879} 1880return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched); 1881}, 1882index:function(elem){ 1883if(!elem){ 1884return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1; 1885} 1886if(typeof elem==="string"){ 1887return indexOf.call(jQuery(elem),this[0]); 1888} 1889return indexOf.call(this, 1890elem.jquery?elem[0]:elem 1891); 1892}, 1893add:function(selector,context){ 1894return this.pushStack( 1895jQuery.uniqueSort( 1896jQuery.merge(this.get(),jQuery(selector,context)) 1897) 1898); 1899}, 1900addBack:function(selector){ 1901return this.add(selector==null? 1902this.prevObject:this.prevObject.filter(selector) 1903); 1904} 1905}); 1906function sibling(cur,dir){ 1907while((cur=cur[dir])&&cur.nodeType!==1){} 1908return cur; 1909} 1910jQuery.each({ 1911parent:function(elem){ 1912var parent=elem.parentNode; 1913return parent&&parent.nodeType!==11?parent:null; 1914}, 1915parents:function(elem){ 1916return dir(elem,"parentNode"); 1917}, 1918parentsUntil:function(elem,_i,until){ 1919return dir(elem,"parentNode",until); 1920}, 1921next:function(elem){ 1922return sibling(elem,"nextSibling"); 1923}, 1924prev:function(elem){ 1925return sibling(elem,"previousSibling"); 1926}, 1927nextAll:function(elem){ 1928return dir(elem,"nextSibling"); 1929}, 1930prevAll:function(elem){ 1931return dir(elem,"previousSibling"); 1932}, 1933nextUntil:function(elem,_i,until){ 1934return dir(elem,"nextSibling",until); 1935}, 1936prevUntil:function(elem,_i,until){ 1937return dir(elem,"previousSibling",until); 1938}, 1939siblings:function(elem){ 1940return siblings((elem.parentNode||{}).firstChild,elem); 1941}, 1942children:function(elem){ 1943return siblings(elem.firstChild); 1944}, 1945contents:function(elem){ 1946if(elem.contentDocument!=null&& 1947getProto(elem.contentDocument)){ 1948return elem.contentDocument; 1949} 1950if(nodeName(elem,"template")){ 1951elem=elem.content||elem; 1952} 1953return jQuery.merge([],elem.childNodes); 1954} 1955},function(name,fn){ 1956jQuery.fn[name]=function(until,selector){ 1957var matched=jQuery.map(this,fn,until); 1958if(name.slice(-5)!=="Until"){ 1959selector=until; 1960} 1961if(selector&&typeof selector==="string"){ 1962matched=jQuery.filter(selector,matched); 1963} 1964if(this.length>1){ 1965if(!guaranteedUnique[name]){ 1966jQuery.uniqueSort(matched); 1967} 1968if(rparentsprev.test(name)){ 1969matched.reverse(); 1970} 1971} 1972return this.pushStack(matched); 1973}; 1974}); 1975var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g); 1976function createOptions(options){ 1977var object={}; 1978jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){ 1979object[flag]=true; 1980}); 1981return object; 1982} 1983jQuery.Callbacks=function(options){ 1984options=typeof options==="string"? 1985createOptions(options): 1986jQuery.extend({},options); 1987var 1988firing, 1989memory, 1990fired, 1991locked, 1992list=[], 1993queue=[], 1994firingIndex=-1, 1995fire=function(){ 1996locked=locked||options.once; 1997fired=firing=true; 1998for(;queue.length;firingIndex=-1){ 1999memory=queue.shift(); 2000while(++firingIndex<list.length){ 2001if(list[firingIndex].apply(memory[0],memory[1])===false&& 2002options.stopOnFalse){ 2003firingIndex=list.length; 2004memory=false; 2005} 2006} 2007} 2008if(!options.memory){ 2009memory=false; 2010} 2011firing=false; 2012if(locked){ 2013if(memory){ 2014list=[]; 2015}else{ 2016list=""; 2017} 2018} 2019}, 2020self={ 2021add:function(){ 2022if(list){ 2023if(memory&&!firing){ 2024firingIndex=list.length-1; 2025queue.push(memory); 2026} 2027(function add(args){ 2028jQuery.each(args,function(_,arg){ 2029if(isFunction(arg)){ 2030if(!options.unique||!self.has(arg)){ 2031list.push(arg); 2032} 2033}else if(arg&&arg.length&&toType(arg)!=="string"){ 2034add(arg); 2035} 2036}); 2037})(arguments); 2038if(memory&&!firing){ 2039fire(); 2040} 2041} 2042return this; 2043}, 2044remove:function(){ 2045jQuery.each(arguments,function(_,arg){ 2046var index; 2047while((index=jQuery.inArray(arg,list,index))>-1){ 2048list.splice(index,1); 2049if(index<=firingIndex){ 2050firingIndex--; 2051} 2052} 2053}); 2054return this; 2055}, 2056has:function(fn){ 2057return fn? 2058jQuery.inArray(fn,list)>-1: 2059list.length>0; 2060}, 2061empty:function(){ 2062if(list){ 2063list=[]; 2064} 2065return this; 2066}, 2067disable:function(){ 2068locked=queue=[]; 2069list=memory=""; 2070return this; 2071}, 2072disabled:function(){ 2073return!list; 2074}, 2075lock:function(){ 2076locked=queue=[]; 2077if(!memory&&!firing){ 2078list=memory=""; 2079} 2080return this; 2081}, 2082locked:function(){ 2083return!!locked; 2084}, 2085fireWith:function(context,args){ 2086if(!locked){ 2087args=args||[]; 2088args=[context,args.slice?args.slice():args]; 2089queue.push(args); 2090if(!firing){ 2091fire(); 2092} 2093} 2094return this; 2095}, 2096fire:function(){ 2097self.fireWith(this,arguments); 2098return this; 2099}, 2100fired:function(){ 2101return!!fired; 2102} 2103}; 2104return self; 2105}; 2106function Identity(v){ 2107return v; 2108} 2109function Thrower(ex){ 2110throw ex; 2111} 2112function adoptValue(value,resolve,reject,noValue){ 2113var method; 2114try{ 2115if(value&&isFunction((method=value.promise))){ 2116method.call(value).done(resolve).fail(reject); 2117}else if(value&&isFunction((method=value.then))){ 2118method.call(value,resolve,reject); 2119}else{ 2120resolve.apply(undefined,[value].slice(noValue)); 2121} 2122}catch(value){ 2123reject.apply(undefined,[value]); 2124} 2125} 2126jQuery.extend({ 2127Deferred:function(func){ 2128var tuples=[ 2129["notify","progress",jQuery.Callbacks("memory"), 2130jQuery.Callbacks("memory"),2], 2131["resolve","done",jQuery.Callbacks("once memory"), 2132jQuery.Callbacks("once memory"),0,"resolved"], 2133["reject","fail",jQuery.Callbacks("once memory"), 2134jQuery.Callbacks("once memory"),1,"rejected"] 2135], 2136state="pending", 2137promise={ 2138state:function(){ 2139return state; 2140}, 2141always:function(){ 2142deferred.done(arguments).fail(arguments); 2143return this; 2144}, 2145"catch":function(fn){ 2146return promise.then(null,fn); 2147}, 2148pipe:function(){ 2149var fns=arguments; 2150return jQuery.Deferred(function(newDefer){ 2151jQuery.each(tuples,function(_i,tuple){ 2152var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]]; 2153deferred[tuple[1]](function(){ 2154var returned=fn&&fn.apply(this,arguments); 2155if(returned&&isFunction(returned.promise)){ 2156returned.promise() 2157.progress(newDefer.notify) 2158.done(newDefer.resolve) 2159.fail(newDefer.reject); 2160}else{ 2161newDefer[tuple[0]+"With"]( 2162this, 2163fn?[returned]:arguments 2164); 2165} 2166}); 2167}); 2168fns=null; 2169}).promise(); 2170}, 2171then:function(onFulfilled,onRejected,onProgress){ 2172var maxDepth=0; 2173function resolve(depth,deferred,handler,special){ 2174return function(){ 2175var that=this, 2176args=arguments, 2177mightThrow=function(){ 2178var returned,then; 2179if(depth<maxDepth){ 2180return; 2181} 2182returned=handler.apply(that,args); 2183if(returned===deferred.promise()){ 2184throw new TypeError("Thenable self-resolution"); 2185} 2186then=returned&& 2187(typeof returned==="object"|| 2188typeof returned==="function")&& 2189returned.then; 2190if(isFunction(then)){ 2191if(special){ 2192then.call( 2193returned, 2194resolve(maxDepth,deferred,Identity,special), 2195resolve(maxDepth,deferred,Thrower,special) 2196); 2197}else{ 2198maxDepth++; 2199then.call( 2200returned, 2201resolve(maxDepth,deferred,Identity,special), 2202resolve(maxDepth,deferred,Thrower,special), 2203resolve(maxDepth,deferred,Identity, 2204deferred.notifyWith) 2205); 2206} 2207}else{ 2208if(handler!==Identity){ 2209that=undefined; 2210args=[returned]; 2211} 2212(special||deferred.resolveWith)(that,args); 2213} 2214}, 2215process=special? 2216mightThrow: 2217function(){ 2218try{ 2219mightThrow(); 2220}catch(e){ 2221if(jQuery.Deferred.exceptionHook){ 2222jQuery.Deferred.exceptionHook(e, 2223process.error); 2224} 2225if(depth+1>=maxDepth){ 2226if(handler!==Thrower){ 2227that=undefined; 2228args=[e]; 2229} 2230deferred.rejectWith(that,args); 2231} 2232} 2233}; 2234if(depth){ 2235process(); 2236}else{ 2237if(jQuery.Deferred.getErrorHook){ 2238process.error=jQuery.Deferred.getErrorHook(); 2239}else if(jQuery.Deferred.getStackHook){ 2240process.error=jQuery.Deferred.getStackHook(); 2241} 2242window.setTimeout(process); 2243} 2244}; 2245} 2246return jQuery.Deferred(function(newDefer){ 2247tuples[0][3].add( 2248resolve( 22490, 2250newDefer, 2251isFunction(onProgress)? 2252onProgress: 2253Identity, 2254newDefer.notifyWith 2255) 2256); 2257tuples[1][3].add( 2258resolve( 22590, 2260newDefer, 2261isFunction(onFulfilled)? 2262onFulfilled: 2263Identity 2264) 2265); 2266tuples[2][3].add( 2267resolve( 22680, 2269newDefer, 2270isFunction(onRejected)? 2271onRejected: 2272Thrower 2273) 2274); 2275}).promise(); 2276}, 2277promise:function(obj){ 2278return obj!=null?jQuery.extend(obj,promise):promise; 2279} 2280}, 2281deferred={}; 2282jQuery.each(tuples,function(i,tuple){ 2283var list=tuple[2], 2284stateString=tuple[5]; 2285promise[tuple[1]]=list.add; 2286if(stateString){ 2287list.add( 2288function(){ 2289state=stateString; 2290}, 2291tuples[3-i][2].disable, 2292tuples[3-i][3].disable, 2293tuples[0][2].lock, 2294tuples[0][3].lock 2295); 2296} 2297list.add(tuple[3].fire); 2298deferred[tuple[0]]=function(){ 2299deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments); 2300return this; 2301}; 2302deferred[tuple[0]+"With"]=list.fireWith; 2303}); 2304promise.promise(deferred); 2305if(func){ 2306func.call(deferred,deferred); 2307} 2308return deferred; 2309}, 2310when:function(singleValue){ 2311var 2312remaining=arguments.length, 2313i=remaining, 2314resolveContexts=Array(i), 2315resolveValues=slice.call(arguments), 2316primary=jQuery.Deferred(), 2317updateFunc=function(i){ 2318return function(value){ 2319resolveContexts[i]=this; 2320resolveValues[i]=arguments.length>1?slice.call(arguments):value; 2321if(!(--remaining)){ 2322primary.resolveWith(resolveContexts,resolveValues); 2323} 2324}; 2325}; 2326if(remaining<=1){ 2327adoptValue(singleValue,primary.done(updateFunc(i)).resolve,primary.reject, 2328!remaining); 2329if(primary.state()==="pending"|| 2330isFunction(resolveValues[i]&&resolveValues[i].then)){ 2331return primary.then(); 2332} 2333} 2334while(i--){ 2335adoptValue(resolveValues[i],updateFunc(i),primary.reject); 2336} 2337return primary.promise(); 2338} 2339}); 2340var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 2341jQuery.Deferred.exceptionHook=function(error,asyncError){ 2342if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){ 2343window.console.warn("jQuery.Deferred exception: "+error.message, 2344error.stack,asyncError); 2345} 2346}; 2347jQuery.readyException=function(error){ 2348window.setTimeout(function(){ 2349throw error; 2350}); 2351}; 2352var readyList=jQuery.Deferred(); 2353jQuery.fn.ready=function(fn){ 2354readyList 2355.then(fn) 2356.catch(function(error){ 2357jQuery.readyException(error); 2358}); 2359return this; 2360}; 2361jQuery.extend({ 2362isReady:false, 2363readyWait:1, 2364ready:function(wait){ 2365if(wait===true?--jQuery.readyWait:jQuery.isReady){ 2366return; 2367} 2368jQuery.isReady=true; 2369if(wait!==true&&--jQuery.readyWait>0){ 2370return; 2371} 2372readyList.resolveWith(document,[jQuery]); 2373} 2374}); 2375jQuery.ready.then=readyList.then; 2376function completed(){ 2377document.removeEventListener("DOMContentLoaded",completed); 2378window.removeEventListener("load",completed); 2379jQuery.ready(); 2380} 2381if(document.readyState==="complete"|| 2382(document.readyState!=="loading"&&!document.documentElement.doScroll)){ 2383window.setTimeout(jQuery.ready); 2384}else{ 2385document.addEventListener("DOMContentLoaded",completed); 2386window.addEventListener("load",completed); 2387} 2388var access=function(elems,fn,key,value,chainable,emptyGet,raw){ 2389var i=0, 2390len=elems.length, 2391bulk=key==null; 2392if(toType(key)==="object"){ 2393chainable=true; 2394for(i in key){ 2395access(elems,fn,i,key[i],true,emptyGet,raw); 2396} 2397}else if(value!==undefined){ 2398chainable=true; 2399if(!isFunction(value)){ 2400raw=true; 2401} 2402if(bulk){ 2403if(raw){ 2404fn.call(elems,value); 2405fn=null; 2406}else{ 2407bulk=fn; 2408fn=function(elem,_key,value){ 2409return bulk.call(jQuery(elem),value); 2410}; 2411} 2412} 2413if(fn){ 2414for(;i<len;i++){ 2415fn( 2416elems[i],key,raw? 2417value: 2418value.call(elems[i],i,fn(elems[i],key)) 2419); 2420} 2421} 2422} 2423if(chainable){ 2424return elems; 2425} 2426if(bulk){ 2427return fn.call(elems); 2428} 2429return len?fn(elems[0],key):emptyGet; 2430}; 2431var rmsPrefix=/^-ms-/, 2432rdashAlpha=/-([a-z])/g; 2433function fcamelCase(_all,letter){ 2434return letter.toUpperCase(); 2435} 2436function camelCase(string){ 2437return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase); 2438} 2439var acceptData=function(owner){ 2440return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType); 2441}; 2442function Data(){ 2443this.expando=jQuery.expando+Data.uid++; 2444} 2445Data.uid=1; 2446Data.prototype={ 2447cache:function(owner){ 2448var value=owner[this.expando]; 2449if(!value){ 2450value={}; 2451if(acceptData(owner)){ 2452if(owner.nodeType){ 2453owner[this.expando]=value; 2454}else{ 2455Object.defineProperty(owner,this.expando,{ 2456value:value, 2457configurable:true 2458}); 2459} 2460} 2461} 2462return value; 2463}, 2464set:function(owner,data,value){ 2465var prop, 2466cache=this.cache(owner); 2467if(typeof data==="string"){ 2468cache[camelCase(data)]=value; 2469}else{ 2470for(prop in data){ 2471cache[camelCase(prop)]=data[prop]; 2472} 2473} 2474return cache; 2475}, 2476get:function(owner,key){ 2477return key===undefined? 2478this.cache(owner): 2479owner[this.expando]&&owner[this.expando][camelCase(key)]; 2480}, 2481access:function(owner,key,value){ 2482if(key===undefined|| 2483((key&&typeof key==="string")&&value===undefined)){ 2484return this.get(owner,key); 2485} 2486this.set(owner,key,value); 2487return value!==undefined?value:key; 2488}, 2489remove:function(owner,key){ 2490var i, 2491cache=owner[this.expando]; 2492if(cache===undefined){ 2493return; 2494} 2495if(key!==undefined){ 2496if(Array.isArray(key)){ 2497key=key.map(camelCase); 2498}else{ 2499key=camelCase(key); 2500key=key in cache? 2501[key]: 2502(key.match(rnothtmlwhite)||[]); 2503} 2504i=key.length; 2505while(i--){ 2506delete cache[key[i]]; 2507} 2508} 2509if(key===undefined||jQuery.isEmptyObject(cache)){ 2510if(owner.nodeType){ 2511owner[this.expando]=undefined; 2512}else{ 2513delete owner[this.expando]; 2514} 2515} 2516}, 2517hasData:function(owner){ 2518var cache=owner[this.expando]; 2519return cache!==undefined&&!jQuery.isEmptyObject(cache); 2520} 2521}; 2522var dataPriv=new Data(); 2523var dataUser=new Data(); 2524var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 2525rmultiDash=/[A-Z]/g; 2526function getData(data){ 2527if(data==="true"){ 2528return true; 2529} 2530if(data==="false"){ 2531return false; 2532} 2533if(data==="null"){ 2534return null; 2535} 2536if(data===+data+""){ 2537return+data; 2538} 2539if(rbrace.test(data)){ 2540return JSON.parse(data); 2541} 2542return data; 2543} 2544function dataAttr(elem,key,data){ 2545var name; 2546if(data===undefined&&elem.nodeType===1){ 2547name="data-"+key.replace(rmultiDash,"-$&").toLowerCase(); 2548data=elem.getAttribute(name); 2549if(typeof data==="string"){ 2550try{ 2551data=getData(data); 2552}catch(e){} 2553dataUser.set(elem,key,data); 2554}else{ 2555data=undefined; 2556} 2557} 2558return data; 2559} 2560jQuery.extend({ 2561hasData:function(elem){ 2562return dataUser.hasData(elem)||dataPriv.hasData(elem); 2563}, 2564data:function(elem,name,data){ 2565return dataUser.access(elem,name,data); 2566}, 2567removeData:function(elem,name){ 2568dataUser.remove(elem,name); 2569}, 2570_data:function(elem,name,data){ 2571return dataPriv.access(elem,name,data); 2572}, 2573_removeData:function(elem,name){ 2574dataPriv.remove(elem,name); 2575} 2576}); 2577jQuery.fn.extend({ 2578data:function(key,value){ 2579var i,name,data, 2580elem=this[0], 2581attrs=elem&&elem.attributes; 2582if(key===undefined){ 2583if(this.length){ 2584data=dataUser.get(elem); 2585if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){ 2586i=attrs.length; 2587while(i--){ 2588if(attrs[i]){ 2589name=attrs[i].name; 2590if(name.indexOf("data-")===0){ 2591name=camelCase(name.slice(5)); 2592dataAttr(elem,name,data[name]); 2593} 2594} 2595} 2596dataPriv.set(elem,"hasDataAttrs",true); 2597} 2598} 2599return data; 2600} 2601if(typeof key==="object"){ 2602return this.each(function(){ 2603dataUser.set(this,key); 2604}); 2605} 2606return access(this,function(value){ 2607var data; 2608if(elem&&value===undefined){ 2609data=dataUser.get(elem,key); 2610if(data!==undefined){ 2611return data; 2612} 2613data=dataAttr(elem,key); 2614if(data!==undefined){ 2615return data; 2616} 2617return; 2618} 2619this.each(function(){ 2620dataUser.set(this,key,value); 2621}); 2622},null,value,arguments.length>1,null,true); 2623}, 2624removeData:function(key){ 2625return this.each(function(){ 2626dataUser.remove(this,key); 2627}); 2628} 2629}); 2630jQuery.extend({ 2631queue:function(elem,type,data){ 2632var queue; 2633if(elem){ 2634type=(type||"fx")+"queue"; 2635queue=dataPriv.get(elem,type); 2636if(data){ 2637if(!queue||Array.isArray(data)){ 2638queue=dataPriv.access(elem,type,jQuery.makeArray(data)); 2639}else{ 2640queue.push(data); 2641} 2642} 2643return queue||[]; 2644} 2645}, 2646dequeue:function(elem,type){ 2647type=type||"fx"; 2648var queue=jQuery.queue(elem,type), 2649startLength=queue.length, 2650fn=queue.shift(), 2651hooks=jQuery._queueHooks(elem,type), 2652next=function(){ 2653jQuery.dequeue(elem,type); 2654}; 2655if(fn==="inprogress"){ 2656fn=queue.shift(); 2657startLength--; 2658} 2659if(fn){ 2660if(type==="fx"){ 2661queue.unshift("inprogress"); 2662} 2663delete hooks.stop; 2664fn.call(elem,next,hooks); 2665} 2666if(!startLength&&hooks){ 2667hooks.empty.fire(); 2668} 2669}, 2670_queueHooks:function(elem,type){ 2671var key=type+"queueHooks"; 2672return dataPriv.get(elem,key)||dataPriv.access(elem,key,{ 2673empty:jQuery.Callbacks("once memory").add(function(){ 2674dataPriv.remove(elem,[type+"queue",key]); 2675}) 2676}); 2677} 2678}); 2679jQuery.fn.extend({ 2680queue:function(type,data){ 2681var setter=2; 2682if(typeof type!=="string"){ 2683data=type; 2684type="fx"; 2685setter--; 2686} 2687if(arguments.length<setter){ 2688return jQuery.queue(this[0],type); 2689} 2690return data===undefined? 2691this: 2692this.each(function(){ 2693var queue=jQuery.queue(this,type,data); 2694jQuery._queueHooks(this,type); 2695if(type==="fx"&&queue[0]!=="inprogress"){ 2696jQuery.dequeue(this,type); 2697} 2698}); 2699}, 2700dequeue:function(type){ 2701return this.each(function(){ 2702jQuery.dequeue(this,type); 2703}); 2704}, 2705clearQueue:function(type){ 2706return this.queue(type||"fx",[]); 2707}, 2708promise:function(type,obj){ 2709var tmp, 2710count=1, 2711defer=jQuery.Deferred(), 2712elements=this, 2713i=this.length, 2714resolve=function(){ 2715if(!(--count)){ 2716defer.resolveWith(elements,[elements]); 2717} 2718}; 2719if(typeof type!=="string"){ 2720obj=type; 2721type=undefined; 2722} 2723type=type||"fx"; 2724while(i--){ 2725tmp=dataPriv.get(elements[i],type+"queueHooks"); 2726if(tmp&&tmp.empty){ 2727count++; 2728tmp.empty.add(resolve); 2729} 2730} 2731resolve(); 2732return defer.promise(obj); 2733} 2734}); 2735var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; 2736var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"); 2737var cssExpand=["Top","Right","Bottom","Left"]; 2738var documentElement=document.documentElement; 2739var isAttached=function(elem){ 2740return jQuery.contains(elem.ownerDocument,elem); 2741}, 2742composed={composed:true}; 2743if(documentElement.getRootNode){ 2744isAttached=function(elem){ 2745return jQuery.contains(elem.ownerDocument,elem)|| 2746elem.getRootNode(composed)===elem.ownerDocument; 2747}; 2748} 2749var isHiddenWithinTree=function(elem,el){ 2750elem=el||elem; 2751return elem.style.display==="none"|| 2752elem.style.display===""&& 2753isAttached(elem)&& 2754jQuery.css(elem,"display")==="none"; 2755}; 2756function adjustCSS(elem,prop,valueParts,tween){ 2757var adjusted,scale, 2758maxIterations=20, 2759currentValue=tween? 2760function(){ 2761return tween.cur(); 2762}: 2763function(){ 2764return jQuery.css(elem,prop,""); 2765}, 2766initial=currentValue(), 2767unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"), 2768initialInUnit=elem.nodeType&& 2769(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&& 2770rcssNum.exec(jQuery.css(elem,prop)); 2771if(initialInUnit&&initialInUnit[3]!==unit){ 2772initial=initial/2; 2773unit=unit||initialInUnit[3]; 2774initialInUnit=+initial||1; 2775while(maxIterations--){ 2776jQuery.style(elem,prop,initialInUnit+unit); 2777if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){ 2778maxIterations=0; 2779} 2780initialInUnit=initialInUnit/scale; 2781} 2782initialInUnit=initialInUnit*2; 2783jQuery.style(elem,prop,initialInUnit+unit); 2784valueParts=valueParts||[]; 2785} 2786if(valueParts){ 2787initialInUnit=+initialInUnit||+initial||0; 2788adjusted=valueParts[1]? 2789initialInUnit+(valueParts[1]+1)*valueParts[2]: 2790+valueParts[2]; 2791if(tween){ 2792tween.unit=unit; 2793tween.start=initialInUnit; 2794tween.end=adjusted; 2795} 2796} 2797return adjusted; 2798} 2799var defaultDisplayMap={}; 2800function getDefaultDisplay(elem){ 2801var temp, 2802doc=elem.ownerDocument, 2803nodeName=elem.nodeName, 2804display=defaultDisplayMap[nodeName]; 2805if(display){ 2806return display; 2807} 2808temp=doc.body.appendChild(doc.createElement(nodeName)); 2809display=jQuery.css(temp,"display"); 2810temp.parentNode.removeChild(temp); 2811if(display==="none"){ 2812display="block"; 2813} 2814defaultDisplayMap[nodeName]=display; 2815return display; 2816} 2817function showHide(elements,show){ 2818var display,elem, 2819values=[], 2820index=0, 2821length=elements.length; 2822for(;index<length;index++){ 2823elem=elements[index]; 2824if(!elem.style){ 2825continue; 2826} 2827display=elem.style.display; 2828if(show){ 2829if(display==="none"){ 2830values[index]=dataPriv.get(elem,"display")||null; 2831if(!values[index]){ 2832elem.style.display=""; 2833} 2834} 2835if(elem.style.display===""&&isHiddenWithinTree(elem)){ 2836values[index]=getDefaultDisplay(elem); 2837} 2838}else{ 2839if(display!=="none"){ 2840values[index]="none"; 2841dataPriv.set(elem,"display",display); 2842} 2843} 2844} 2845for(index=0;index<length;index++){ 2846if(values[index]!=null){ 2847elements[index].style.display=values[index]; 2848} 2849} 2850return elements; 2851} 2852jQuery.fn.extend({ 2853show:function(){ 2854return showHide(this,true); 2855}, 2856hide:function(){ 2857return showHide(this); 2858}, 2859toggle:function(state){ 2860if(typeof state==="boolean"){ 2861return state?this.show():this.hide(); 2862} 2863return this.each(function(){ 2864if(isHiddenWithinTree(this)){ 2865jQuery(this).show(); 2866}else{ 2867jQuery(this).hide(); 2868} 2869}); 2870} 2871}); 2872var rcheckableType=(/^(?:checkbox|radio)$/i); 2873var rtagName=(/<([a-z][^\/\0>\x20\t\r\n\f]*)/i); 2874var rscriptType=(/^$|^module$|\/(?:java|ecma)script/i); 2875(function(){ 2876var fragment=document.createDocumentFragment(), 2877div=fragment.appendChild(document.createElement("div")), 2878input=document.createElement("input"); 2879input.setAttribute("type","radio"); 2880input.setAttribute("checked","checked"); 2881input.setAttribute("name","t"); 2882div.appendChild(input); 2883support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked; 2884div.innerHTML="<textarea>x</textarea>"; 2885support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue; 2886div.innerHTML="<option></option>"; 2887support.option=!!div.lastChild; 2888})(); 2889var wrapMap={ 2890thead:[1,"<table>","</table>"], 2891col:[2,"<table><colgroup>","</colgroup></table>"], 2892tr:[2,"<table><tbody>","</tbody></table>"], 2893td:[3,"<table><tbody><tr>","</tr></tbody></table>"], 2894_default:[0,"",""] 2895}; 2896wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead; 2897wrapMap.th=wrapMap.td; 2898if(!support.option){ 2899wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"]; 2900} 2901function getAll(context,tag){ 2902var ret; 2903if(typeof context.getElementsByTagName!=="undefined"){ 2904ret=context.getElementsByTagName(tag||"*"); 2905}else if(typeof context.querySelectorAll!=="undefined"){ 2906ret=context.querySelectorAll(tag||"*"); 2907}else{ 2908ret=[]; 2909} 2910if(tag===undefined||tag&&nodeName(context,tag)){ 2911return jQuery.merge([context],ret); 2912} 2913return ret; 2914} 2915function setGlobalEval(elems,refElements){ 2916var i=0, 2917l=elems.length; 2918for(;i<l;i++){ 2919dataPriv.set( 2920elems[i], 2921"globalEval", 2922!refElements||dataPriv.get(refElements[i],"globalEval") 2923); 2924} 2925} 2926var rhtml=/<|&#?\w+;/; 2927function buildFragment(elems,context,scripts,selection,ignored){ 2928var elem,tmp,tag,wrap,attached,j, 2929fragment=context.createDocumentFragment(), 2930nodes=[], 2931i=0, 2932l=elems.length; 2933for(;i<l;i++){ 2934elem=elems[i]; 2935if(elem||elem===0){ 2936if(toType(elem)==="object"){ 2937jQuery.merge(nodes,elem.nodeType?[elem]:elem); 2938}else if(!rhtml.test(elem)){ 2939nodes.push(context.createTextNode(elem)); 2940}else{ 2941tmp=tmp||fragment.appendChild(context.createElement("div")); 2942tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(); 2943wrap=wrapMap[tag]||wrapMap._default; 2944tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2]; 2945j=wrap[0]; 2946while(j--){ 2947tmp=tmp.lastChild; 2948} 2949jQuery.merge(nodes,tmp.childNodes); 2950tmp=fragment.firstChild; 2951tmp.textContent=""; 2952} 2953} 2954} 2955fragment.textContent=""; 2956i=0; 2957while((elem=nodes[i++])){ 2958if(selection&&jQuery.inArray(elem,selection)>-1){ 2959if(ignored){ 2960ignored.push(elem); 2961} 2962continue; 2963} 2964attached=isAttached(elem); 2965tmp=getAll(fragment.appendChild(elem),"script"); 2966if(attached){ 2967setGlobalEval(tmp); 2968} 2969if(scripts){ 2970j=0; 2971while((elem=tmp[j++])){ 2972if(rscriptType.test(elem.type||"")){ 2973scripts.push(elem); 2974} 2975} 2976} 2977} 2978return fragment; 2979} 2980var rtypenamespace=/^([^.]*)(?:\.(.+)|)/; 2981function returnTrue(){ 2982return true; 2983} 2984function returnFalse(){ 2985return false; 2986} 2987function on(elem,types,selector,data,fn,one){ 2988var origFn,type; 2989if(typeof types==="object"){ 2990if(typeof selector!=="string"){ 2991data=data||selector; 2992selector=undefined; 2993} 2994for(type in types){ 2995on(elem,type,selector,data,types[type],one); 2996} 2997return elem; 2998} 2999if(data==null&&fn==null){ 3000fn=selector; 3001data=selector=undefined; 3002}else if(fn==null){ 3003if(typeof selector==="string"){ 3004fn=data; 3005data=undefined; 3006}else{ 3007fn=data; 3008data=selector; 3009selector=undefined; 3010} 3011} 3012if(fn===false){ 3013fn=returnFalse; 3014}else if(!fn){ 3015return elem; 3016} 3017if(one===1){ 3018origFn=fn; 3019fn=function(event){ 3020jQuery().off(event); 3021return origFn.apply(this,arguments); 3022}; 3023fn.guid=origFn.guid||(origFn.guid=jQuery.guid++); 3024} 3025return elem.each(function(){ 3026jQuery.event.add(this,types,fn,data,selector); 3027}); 3028} 3029jQuery.event={ 3030global:{}, 3031add:function(elem,types,handler,data,selector){ 3032var handleObjIn,eventHandle,tmp, 3033events,t,handleObj, 3034special,handlers,type,namespaces,origType, 3035elemData=dataPriv.get(elem); 3036if(!acceptData(elem)){ 3037return; 3038} 3039if(handler.handler){ 3040handleObjIn=handler; 3041handler=handleObjIn.handler; 3042selector=handleObjIn.selector; 3043} 3044if(selector){ 3045jQuery.find.matchesSelector(documentElement,selector); 3046} 3047if(!handler.guid){ 3048handler.guid=jQuery.guid++; 3049} 3050if(!(events=elemData.events)){ 3051events=elemData.events=Object.create(null); 3052} 3053if(!(eventHandle=elemData.handle)){ 3054eventHandle=elemData.handle=function(e){ 3055return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type? 3056jQuery.event.dispatch.apply(elem,arguments):undefined; 3057}; 3058} 3059types=(types||"").match(rnothtmlwhite)||[""]; 3060t=types.length; 3061while(t--){ 3062tmp=rtypenamespace.exec(types[t])||[]; 3063type=origType=tmp[1]; 3064namespaces=(tmp[2]||"").split(".").sort(); 3065if(!type){ 3066continue; 3067} 3068special=jQuery.event.special[type]||{}; 3069type=(selector?special.delegateType:special.bindType)||type; 3070special=jQuery.event.special[type]||{}; 3071handleObj=jQuery.extend({ 3072type:type, 3073origType:origType, 3074data:data, 3075handler:handler, 3076guid:handler.guid, 3077selector:selector, 3078needsContext:selector&&jQuery.expr.match.needsContext.test(selector), 3079namespace:namespaces.join(".") 3080},handleObjIn); 3081if(!(handlers=events[type])){ 3082handlers=events[type]=[]; 3083handlers.delegateCount=0; 3084if(!special.setup|| 3085special.setup.call(elem,data,namespaces,eventHandle)===false){ 3086if(elem.addEventListener){ 3087elem.addEventListener(type,eventHandle); 3088} 3089} 3090} 3091if(special.add){ 3092special.add.call(elem,handleObj); 3093if(!handleObj.handler.guid){ 3094handleObj.handler.guid=handler.guid; 3095} 3096} 3097if(selector){ 3098handlers.splice(handlers.delegateCount++,0,handleObj); 3099}else{ 3100handlers.push(handleObj); 3101} 3102jQuery.event.global[type]=true; 3103} 3104}, 3105remove:function(elem,types,handler,selector,mappedTypes){ 3106var j,origCount,tmp, 3107events,t,handleObj, 3108special,handlers,type,namespaces,origType, 3109elemData=dataPriv.hasData(elem)&&dataPriv.get(elem); 3110if(!elemData||!(events=elemData.events)){ 3111return; 3112} 3113types=(types||"").match(rnothtmlwhite)||[""]; 3114t=types.length; 3115while(t--){ 3116tmp=rtypenamespace.exec(types[t])||[]; 3117type=origType=tmp[1]; 3118namespaces=(tmp[2]||"").split(".").sort(); 3119if(!type){ 3120for(type in events){ 3121jQuery.event.remove(elem,type+types[t],handler,selector,true); 3122} 3123continue; 3124} 3125special=jQuery.event.special[type]||{}; 3126type=(selector?special.delegateType:special.bindType)||type; 3127handlers=events[type]||[]; 3128tmp=tmp[2]&& 3129new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"); 3130origCount=j=handlers.length; 3131while(j--){ 3132handleObj=handlers[j]; 3133if((mappedTypes||origType===handleObj.origType)&& 3134(!handler||handler.guid===handleObj.guid)&& 3135(!tmp||tmp.test(handleObj.namespace))&& 3136(!selector||selector===handleObj.selector|| 3137selector==="**"&&handleObj.selector)){ 3138handlers.splice(j,1); 3139if(handleObj.selector){ 3140handlers.delegateCount--; 3141} 3142if(special.remove){ 3143special.remove.call(elem,handleObj); 3144} 3145} 3146} 3147if(origCount&&!handlers.length){ 3148if(!special.teardown|| 3149special.teardown.call(elem,namespaces,elemData.handle)===false){ 3150jQuery.removeEvent(elem,type,elemData.handle); 3151} 3152delete events[type]; 3153} 3154} 3155if(jQuery.isEmptyObject(events)){ 3156dataPriv.remove(elem,"handle events"); 3157} 3158}, 3159dispatch:function(nativeEvent){ 3160var i,j,ret,matched,handleObj,handlerQueue, 3161args=new Array(arguments.length), 3162event=jQuery.event.fix(nativeEvent), 3163handlers=( 3164dataPriv.get(this,"events")||Object.create(null) 3165)[event.type]||[], 3166special=jQuery.event.special[event.type]||{}; 3167args[0]=event; 3168for(i=1;i<arguments.length;i++){ 3169args[i]=arguments[i]; 3170} 3171event.delegateTarget=this; 3172if(special.preDispatch&&special.preDispatch.call(this,event)===false){ 3173return; 3174} 3175handlerQueue=jQuery.event.handlers.call(this,event,handlers); 3176i=0; 3177while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){ 3178event.currentTarget=matched.elem; 3179j=0; 3180while((handleObj=matched.handlers[j++])&& 3181!event.isImmediatePropagationStopped()){ 3182if(!event.rnamespace||handleObj.namespace===false|| 3183event.rnamespace.test(handleObj.namespace)){ 3184event.handleObj=handleObj; 3185event.data=handleObj.data; 3186ret=((jQuery.event.special[handleObj.origType]||{}).handle|| 3187handleObj.handler).apply(matched.elem,args); 3188if(ret!==undefined){ 3189if((event.result=ret)===false){ 3190event.preventDefault(); 3191event.stopPropagation(); 3192} 3193} 3194} 3195} 3196} 3197if(special.postDispatch){ 3198special.postDispatch.call(this,event); 3199} 3200return event.result; 3201}, 3202handlers:function(event,handlers){ 3203var i,handleObj,sel,matchedHandlers,matchedSelectors, 3204handlerQueue=[], 3205delegateCount=handlers.delegateCount, 3206cur=event.target; 3207if(delegateCount&& 3208cur.nodeType&& 3209!(event.type==="click"&&event.button>=1)){ 3210for(;cur!==this;cur=cur.parentNode||this){ 3211if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){ 3212matchedHandlers=[]; 3213matchedSelectors={}; 3214for(i=0;i<delegateCount;i++){ 3215handleObj=handlers[i]; 3216sel=handleObj.selector+" "; 3217if(matchedSelectors[sel]===undefined){ 3218matchedSelectors[sel]=handleObj.needsContext? 3219jQuery(sel,this).index(cur)>-1: 3220jQuery.find(sel,this,null,[cur]).length; 3221} 3222if(matchedSelectors[sel]){ 3223matchedHandlers.push(handleObj); 3224} 3225} 3226if(matchedHandlers.length){ 3227handlerQueue.push({elem:cur,handlers:matchedHandlers}); 3228} 3229} 3230} 3231} 3232cur=this; 3233if(delegateCount<handlers.length){ 3234handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)}); 3235} 3236return handlerQueue; 3237}, 3238addProp:function(name,hook){ 3239Object.defineProperty(jQuery.Event.prototype,name,{ 3240enumerable:true, 3241configurable:true, 3242get:isFunction(hook)? 3243function(){ 3244if(this.originalEvent){ 3245return hook(this.originalEvent); 3246} 3247}: 3248function(){ 3249if(this.originalEvent){ 3250return this.originalEvent[name]; 3251} 3252}, 3253set:function(value){ 3254Object.defineProperty(this,name,{ 3255enumerable:true, 3256configurable:true, 3257writable:true, 3258value:value 3259}); 3260} 3261}); 3262}, 3263fix:function(originalEvent){ 3264return originalEvent[jQuery.expando]? 3265originalEvent: 3266new jQuery.Event(originalEvent); 3267}, 3268special:{ 3269load:{ 3270noBubble:true 3271}, 3272click:{ 3273setup:function(data){ 3274var el=this||data; 3275if(rcheckableType.test(el.type)&& 3276el.click&&nodeName(el,"input")){ 3277leverageNative(el,"click",true); 3278} 3279return false; 3280}, 3281trigger:function(data){ 3282var el=this||data; 3283if(rcheckableType.test(el.type)&& 3284el.click&&nodeName(el,"input")){ 3285leverageNative(el,"click"); 3286} 3287return true; 3288}, 3289_default:function(event){ 3290var target=event.target; 3291return rcheckableType.test(target.type)&& 3292target.click&&nodeName(target,"input")&& 3293dataPriv.get(target,"click")|| 3294nodeName(target,"a"); 3295} 3296}, 3297beforeunload:{ 3298postDispatch:function(event){ 3299if(event.result!==undefined&&event.originalEvent){ 3300event.originalEvent.returnValue=event.result; 3301} 3302} 3303} 3304} 3305}; 3306function leverageNative(el,type,isSetup){ 3307if(!isSetup){ 3308if(dataPriv.get(el,type)===undefined){ 3309jQuery.event.add(el,type,returnTrue); 3310} 3311return; 3312} 3313dataPriv.set(el,type,false); 3314jQuery.event.add(el,type,{ 3315namespace:false, 3316handler:function(event){ 3317var result, 3318saved=dataPriv.get(this,type); 3319if((event.isTrigger&1)&&this[type]){ 3320if(!saved){ 3321saved=slice.call(arguments); 3322dataPriv.set(this,type,saved); 3323this[type](); 3324result=dataPriv.get(this,type); 3325dataPriv.set(this,type,false); 3326if(saved!==result){ 3327event.stopImmediatePropagation(); 3328event.preventDefault(); 3329return result; 3330} 3331}else if((jQuery.event.special[type]||{}).delegateType){ 3332event.stopPropagation(); 3333} 3334}else if(saved){ 3335dataPriv.set(this,type,jQuery.event.trigger( 3336saved[0], 3337saved.slice(1), 3338this 3339)); 3340event.stopPropagation(); 3341event.isImmediatePropagationStopped=returnTrue; 3342} 3343} 3344}); 3345} 3346jQuery.removeEvent=function(elem,type,handle){ 3347if(elem.removeEventListener){ 3348elem.removeEventListener(type,handle); 3349} 3350}; 3351jQuery.Event=function(src,props){ 3352if(!(this instanceof jQuery.Event)){ 3353return new jQuery.Event(src,props); 3354} 3355if(src&&src.type){ 3356this.originalEvent=src; 3357this.type=src.type; 3358this.isDefaultPrevented=src.defaultPrevented|| 3359src.defaultPrevented===undefined&& 3360src.returnValue===false? 3361returnTrue: 3362returnFalse; 3363this.target=(src.target&&src.target.nodeType===3)? 3364src.target.parentNode: 3365src.target; 3366this.currentTarget=src.currentTarget; 3367this.relatedTarget=src.relatedTarget; 3368}else{ 3369this.type=src; 3370} 3371if(props){ 3372jQuery.extend(this,props); 3373} 3374this.timeStamp=src&&src.timeStamp||Date.now(); 3375this[jQuery.expando]=true; 3376}; 3377jQuery.Event.prototype={ 3378constructor:jQuery.Event, 3379isDefaultPrevented:returnFalse, 3380isPropagationStopped:returnFalse, 3381isImmediatePropagationStopped:returnFalse, 3382isSimulated:false, 3383preventDefault:function(){ 3384var e=this.originalEvent; 3385this.isDefaultPrevented=returnTrue; 3386if(e&&!this.isSimulated){ 3387e.preventDefault(); 3388} 3389}, 3390stopPropagation:function(){ 3391var e=this.originalEvent; 3392this.isPropagationStopped=returnTrue; 3393if(e&&!this.isSimulated){ 3394e.stopPropagation(); 3395} 3396}, 3397stopImmediatePropagation:function(){ 3398var e=this.originalEvent; 3399this.isImmediatePropagationStopped=returnTrue; 3400if(e&&!this.isSimulated){ 3401e.stopImmediatePropagation(); 3402} 3403this.stopPropagation(); 3404} 3405}; 3406jQuery.each({ 3407altKey:true, 3408bubbles:true, 3409cancelable:true, 3410changedTouches:true, 3411ctrlKey:true, 3412detail:true, 3413eventPhase:true, 3414metaKey:true, 3415pageX:true, 3416pageY:true, 3417shiftKey:true, 3418view:true, 3419"char":true, 3420code:true, 3421charCode:true, 3422key:true, 3423keyCode:true, 3424button:true, 3425buttons:true, 3426clientX:true, 3427clientY:true, 3428offsetX:true, 3429offsetY:true, 3430pointerId:true, 3431pointerType:true, 3432screenX:true, 3433screenY:true, 3434targetTouches:true, 3435toElement:true, 3436touches:true, 3437which:true 3438},jQuery.event.addProp); 3439jQuery.each({focus:"focusin",blur:"focusout"},function(type,delegateType){ 3440function focusMappedHandler(nativeEvent){ 3441if(document.documentMode){ 3442var handle=dataPriv.get(this,"handle"), 3443event=jQuery.event.fix(nativeEvent); 3444event.type=nativeEvent.type==="focusin"?"focus":"blur"; 3445event.isSimulated=true; 3446handle(nativeEvent); 3447if(event.target===event.currentTarget){ 3448handle(event); 3449} 3450}else{ 3451jQuery.event.simulate(delegateType,nativeEvent.target, 3452jQuery.event.fix(nativeEvent)); 3453} 3454} 3455jQuery.event.special[type]={ 3456setup:function(){ 3457var attaches; 3458leverageNative(this,type,true); 3459if(document.documentMode){ 3460attaches=dataPriv.get(this,delegateType); 3461if(!attaches){ 3462this.addEventListener(delegateType,focusMappedHandler); 3463} 3464dataPriv.set(this,delegateType,(attaches||0)+1); 3465}else{ 3466return false; 3467} 3468}, 3469trigger:function(){ 3470leverageNative(this,type); 3471return true; 3472}, 3473teardown:function(){ 3474var attaches; 3475if(document.documentMode){ 3476attaches=dataPriv.get(this,delegateType)-1; 3477if(!attaches){ 3478this.removeEventListener(delegateType,focusMappedHandler); 3479dataPriv.remove(this,delegateType); 3480}else{ 3481dataPriv.set(this,delegateType,attaches); 3482} 3483}else{ 3484return false; 3485} 3486}, 3487_default:function(event){ 3488return dataPriv.get(event.target,type); 3489}, 3490delegateType:delegateType 3491}; 3492jQuery.event.special[delegateType]={ 3493setup:function(){ 3494var doc=this.ownerDocument||this.document||this, 3495dataHolder=document.documentMode?this:doc, 3496attaches=dataPriv.get(dataHolder,delegateType); 3497if(!attaches){ 3498if(document.documentMode){ 3499this.addEventListener(delegateType,focusMappedHandler); 3500}else{ 3501doc.addEventListener(type,focusMappedHandler,true); 3502} 3503} 3504dataPriv.set(dataHolder,delegateType,(attaches||0)+1); 3505}, 3506teardown:function(){ 3507var doc=this.ownerDocument||this.document||this, 3508dataHolder=document.documentMode?this:doc, 3509attaches=dataPriv.get(dataHolder,delegateType)-1; 3510if(!attaches){ 3511if(document.documentMode){ 3512this.removeEventListener(delegateType,focusMappedHandler); 3513}else{ 3514doc.removeEventListener(type,focusMappedHandler,true); 3515} 3516dataPriv.remove(dataHolder,delegateType); 3517}else{ 3518dataPriv.set(dataHolder,delegateType,attaches); 3519} 3520} 3521}; 3522}); 3523jQuery.each({ 3524mouseenter:"mouseover", 3525mouseleave:"mouseout", 3526pointerenter:"pointerover", 3527pointerleave:"pointerout" 3528},function(orig,fix){ 3529jQuery.event.special[orig]={ 3530delegateType:fix, 3531bindType:fix, 3532handle:function(event){ 3533var ret, 3534target=this, 3535related=event.relatedTarget, 3536handleObj=event.handleObj; 3537if(!related||(related!==target&&!jQuery.contains(target,related))){ 3538event.type=handleObj.origType; 3539ret=handleObj.handler.apply(this,arguments); 3540event.type=fix; 3541} 3542return ret; 3543} 3544}; 3545}); 3546jQuery.fn.extend({ 3547on:function(types,selector,data,fn){ 3548return on(this,types,selector,data,fn); 3549}, 3550one:function(types,selector,data,fn){ 3551return on(this,types,selector,data,fn,1); 3552}, 3553off:function(types,selector,fn){ 3554var handleObj,type; 3555if(types&&types.preventDefault&&types.handleObj){ 3556handleObj=types.handleObj; 3557jQuery(types.delegateTarget).off( 3558handleObj.namespace? 3559handleObj.origType+"."+handleObj.namespace: 3560handleObj.origType, 3561handleObj.selector, 3562handleObj.handler 3563); 3564return this; 3565} 3566if(typeof types==="object"){ 3567for(type in types){ 3568this.off(type,selector,types[type]); 3569} 3570return this; 3571} 3572if(selector===false||typeof selector==="function"){ 3573fn=selector; 3574selector=undefined; 3575} 3576if(fn===false){ 3577fn=returnFalse; 3578} 3579return this.each(function(){ 3580jQuery.event.remove(this,types,fn,selector); 3581}); 3582} 3583}); 3584var 3585rnoInnerhtml=/<script|<style|<link/i, 3586rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i, 3587rcleanScript=/^\s*<!\[CDATA\[|\]\]>\s*$/g; 3588function manipulationTarget(elem,content){ 3589if(nodeName(elem,"table")&& 3590nodeName(content.nodeType!==11?content:content.firstChild,"tr")){ 3591return jQuery(elem).children("tbody")[0]||elem; 3592} 3593return elem; 3594} 3595function disableScript(elem){ 3596elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type; 3597return elem; 3598} 3599function restoreScript(elem){ 3600if((elem.type||"").slice(0,5)==="true/"){ 3601elem.type=elem.type.slice(5); 3602}else{ 3603elem.removeAttribute("type"); 3604} 3605return elem; 3606} 3607function cloneCopyEvent(src,dest){ 3608var i,l,type,pdataOld,udataOld,udataCur,events; 3609if(dest.nodeType!==1){ 3610return; 3611} 3612if(dataPriv.hasData(src)){ 3613pdataOld=dataPriv.get(src); 3614events=pdataOld.events; 3615if(events){ 3616dataPriv.remove(dest,"handle events"); 3617for(type in events){ 3618for(i=0,l=events[type].length;i<l;i++){ 3619jQuery.event.add(dest,type,events[type][i]); 3620} 3621} 3622} 3623} 3624if(dataUser.hasData(src)){ 3625udataOld=dataUser.access(src); 3626udataCur=jQuery.extend({},udataOld); 3627dataUser.set(dest,udataCur); 3628} 3629} 3630function fixInput(src,dest){ 3631var nodeName=dest.nodeName.toLowerCase(); 3632if(nodeName==="input"&&rcheckableType.test(src.type)){ 3633dest.checked=src.checked; 3634}else if(nodeName==="input"||nodeName==="textarea"){ 3635dest.defaultValue=src.defaultValue; 3636} 3637} 3638function domManip(collection,args,callback,ignored){ 3639args=flat(args); 3640var fragment,first,scripts,hasScripts,node,doc, 3641i=0, 3642l=collection.length, 3643iNoClone=l-1, 3644value=args[0], 3645valueIsFunction=isFunction(value); 3646if(valueIsFunction|| 3647(l>1&&typeof value==="string"&& 3648!support.checkClone&&rchecked.test(value))){ 3649return collection.each(function(index){ 3650var self=collection.eq(index); 3651if(valueIsFunction){ 3652args[0]=value.call(this,index,self.html()); 3653} 3654domManip(self,args,callback,ignored); 3655}); 3656} 3657if(l){ 3658fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored); 3659first=fragment.firstChild; 3660if(fragment.childNodes.length===1){ 3661fragment=first; 3662} 3663if(first||ignored){ 3664scripts=jQuery.map(getAll(fragment,"script"),disableScript); 3665hasScripts=scripts.length; 3666for(;i<l;i++){ 3667node=fragment; 3668if(i!==iNoClone){ 3669node=jQuery.clone(node,true,true); 3670if(hasScripts){ 3671jQuery.merge(scripts,getAll(node,"script")); 3672} 3673} 3674callback.call(collection[i],node,i); 3675} 3676if(hasScripts){ 3677doc=scripts[scripts.length-1].ownerDocument; 3678jQuery.map(scripts,restoreScript); 3679for(i=0;i<hasScripts;i++){ 3680node=scripts[i]; 3681if(rscriptType.test(node.type||"")&& 3682!dataPriv.access(node,"globalEval")&& 3683jQuery.contains(doc,node)){ 3684if(node.src&&(node.type||"").toLowerCase()!=="module"){ 3685if(jQuery._evalUrl&&!node.noModule){ 3686jQuery._evalUrl(node.src,{ 3687nonce:node.nonce||node.getAttribute("nonce") 3688},doc); 3689} 3690}else{ 3691DOMEval(node.textContent.replace(rcleanScript,""),node,doc); 3692} 3693} 3694} 3695} 3696} 3697} 3698return collection; 3699} 3700function remove(elem,selector,keepData){ 3701var node, 3702nodes=selector?jQuery.filter(selector,elem):elem, 3703i=0; 3704for(;(node=nodes[i])!=null;i++){ 3705if(!keepData&&node.nodeType===1){ 3706jQuery.cleanData(getAll(node)); 3707} 3708if(node.parentNode){ 3709if(keepData&&isAttached(node)){ 3710setGlobalEval(getAll(node,"script")); 3711} 3712node.parentNode.removeChild(node); 3713} 3714} 3715return elem; 3716} 3717jQuery.extend({ 3718htmlPrefilter:function(html){ 3719return html; 3720}, 3721clone:function(elem,dataAndEvents,deepDataAndEvents){ 3722var i,l,srcElements,destElements, 3723clone=elem.cloneNode(true), 3724inPage=isAttached(elem); 3725if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&& 3726!jQuery.isXMLDoc(elem)){ 3727destElements=getAll(clone); 3728srcElements=getAll(elem); 3729for(i=0,l=srcElements.length;i<l;i++){ 3730fixInput(srcElements[i],destElements[i]); 3731} 3732} 3733if(dataAndEvents){ 3734if(deepDataAndEvents){ 3735srcElements=srcElements||getAll(elem); 3736destElements=destElements||getAll(clone); 3737for(i=0,l=srcElements.length;i<l;i++){ 3738cloneCopyEvent(srcElements[i],destElements[i]); 3739} 3740}else{ 3741cloneCopyEvent(elem,clone); 3742} 3743} 3744destElements=getAll(clone,"script"); 3745if(destElements.length>0){ 3746setGlobalEval(destElements,!inPage&&getAll(elem,"script")); 3747} 3748return clone; 3749}, 3750cleanData:function(elems){ 3751var data,elem,type, 3752special=jQuery.event.special, 3753i=0; 3754for(;(elem=elems[i])!==undefined;i++){ 3755if(acceptData(elem)){ 3756if((data=elem[dataPriv.expando])){ 3757if(data.events){ 3758for(type in data.events){ 3759if(special[type]){ 3760jQuery.event.remove(elem,type); 3761}else{ 3762jQuery.removeEvent(elem,type,data.handle); 3763} 3764} 3765} 3766elem[dataPriv.expando]=undefined; 3767} 3768if(elem[dataUser.expando]){ 3769elem[dataUser.expando]=undefined; 3770} 3771} 3772} 3773} 3774}); 3775jQuery.fn.extend({ 3776detach:function(selector){ 3777return remove(this,selector,true); 3778}, 3779remove:function(selector){ 3780return remove(this,selector); 3781}, 3782text:function(value){ 3783return access(this,function(value){ 3784return value===undefined? 3785jQuery.text(this): 3786this.empty().each(function(){ 3787if(this.nodeType===1||this.nodeType===11||this.nodeType===9){ 3788this.textContent=value; 3789} 3790}); 3791},null,value,arguments.length); 3792}, 3793append:function(){ 3794return domManip(this,arguments,function(elem){ 3795if(this.nodeType===1||this.nodeType===11||this.nodeType===9){ 3796var target=manipulationTarget(this,elem); 3797target.appendChild(elem); 3798} 3799}); 3800}, 3801prepend:function(){ 3802return domManip(this,arguments,function(elem){ 3803if(this.nodeType===1||this.nodeType===11||this.nodeType===9){ 3804var target=manipulationTarget(this,elem); 3805target.insertBefore(elem,target.firstChild); 3806} 3807}); 3808}, 3809before:function(){ 3810return domManip(this,arguments,function(elem){ 3811if(this.parentNode){ 3812this.parentNode.insertBefore(elem,this); 3813} 3814}); 3815}, 3816after:function(){ 3817return domManip(this,arguments,function(elem){ 3818if(this.parentNode){ 3819this.parentNode.insertBefore(elem,this.nextSibling); 3820} 3821}); 3822}, 3823empty:function(){ 3824var elem, 3825i=0; 3826for(;(elem=this[i])!=null;i++){ 3827if(elem.nodeType===1){ 3828jQuery.cleanData(getAll(elem,false)); 3829elem.textContent=""; 3830} 3831} 3832return this; 3833}, 3834clone:function(dataAndEvents,deepDataAndEvents){ 3835dataAndEvents=dataAndEvents==null?false:dataAndEvents; 3836deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents; 3837return this.map(function(){ 3838return jQuery.clone(this,dataAndEvents,deepDataAndEvents); 3839}); 3840}, 3841html:function(value){ 3842return access(this,function(value){ 3843var elem=this[0]||{}, 3844i=0, 3845l=this.length; 3846if(value===undefined&&elem.nodeType===1){ 3847return elem.innerHTML; 3848} 3849if(typeof value==="string"&&!rnoInnerhtml.test(value)&& 3850!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){ 3851value=jQuery.htmlPrefilter(value); 3852try{ 3853for(;i<l;i++){ 3854elem=this[i]||{}; 3855if(elem.nodeType===1){ 3856jQuery.cleanData(getAll(elem,false)); 3857elem.innerHTML=value; 3858} 3859} 3860elem=0; 3861}catch(e){} 3862} 3863if(elem){ 3864this.empty().append(value); 3865} 3866},null,value,arguments.length); 3867}, 3868replaceWith:function(){ 3869var ignored=[]; 3870return domManip(this,arguments,function(elem){ 3871var parent=this.parentNode; 3872if(jQuery.inArray(this,ignored)<0){ 3873jQuery.cleanData(getAll(this)); 3874if(parent){ 3875parent.replaceChild(elem,this); 3876} 3877} 3878},ignored); 3879} 3880}); 3881jQuery.each({ 3882appendTo:"append", 3883prependTo:"prepend", 3884insertBefore:"before", 3885insertAfter:"after", 3886replaceAll:"replaceWith" 3887},function(name,original){ 3888jQuery.fn[name]=function(selector){ 3889var elems, 3890ret=[], 3891insert=jQuery(selector), 3892last=insert.length-1, 3893i=0; 3894for(;i<=last;i++){ 3895elems=i===last?this:this.clone(true); 3896jQuery(insert[i])[original](elems); 3897push.apply(ret,elems.get()); 3898} 3899return this.pushStack(ret); 3900}; 3901}); 3902var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i"); 3903var rcustomProp=/^--/; 3904var getStyles=function(elem){ 3905var view=elem.ownerDocument.defaultView; 3906if(!view||!view.opener){ 3907view=window; 3908} 3909return view.getComputedStyle(elem); 3910}; 3911var swap=function(elem,options,callback){ 3912var ret,name, 3913old={}; 3914for(name in options){ 3915old[name]=elem.style[name]; 3916elem.style[name]=options[name]; 3917} 3918ret=callback.call(elem); 3919for(name in options){ 3920elem.style[name]=old[name]; 3921} 3922return ret; 3923}; 3924var rboxStyle=new RegExp(cssExpand.join("|"),"i"); 3925(function(){ 3926function computeStyleTests(){ 3927if(!div){ 3928return; 3929} 3930container.style.cssText="position:absolute;left:-11111px;width:60px;"+ 3931"margin-top:1px;padding:0;border:0"; 3932div.style.cssText= 3933"position:relative;display:block;box-sizing:border-box;overflow:scroll;"+ 3934"margin:auto;border:1px;padding:1px;"+ 3935"width:60%;top:1%"; 3936documentElement.appendChild(container).appendChild(div); 3937var divStyle=window.getComputedStyle(div); 3938pixelPositionVal=divStyle.top!=="1%"; 3939reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12; 3940div.style.right="60%"; 3941pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36; 3942boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36; 3943div.style.position="absolute"; 3944scrollboxSizeVal=roundPixelMeasures(div.offsetWidth/3)===12; 3945documentElement.removeChild(container); 3946div=null; 3947} 3948function roundPixelMeasures(measure){ 3949return Math.round(parseFloat(measure)); 3950} 3951var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal, 3952reliableTrDimensionsVal,reliableMarginLeftVal, 3953container=document.createElement("div"), 3954div=document.createElement("div"); 3955if(!div.style){ 3956return; 3957} 3958div.style.backgroundClip="content-box"; 3959div.cloneNode(true).style.backgroundClip=""; 3960support.clearCloneStyle=div.style.backgroundClip==="content-box"; 3961jQuery.extend(support,{ 3962boxSizingReliable:function(){ 3963computeStyleTests(); 3964return boxSizingReliableVal; 3965}, 3966pixelBoxStyles:function(){ 3967computeStyleTests(); 3968return pixelBoxStylesVal; 3969}, 3970pixelPosition:function(){ 3971computeStyleTests(); 3972return pixelPositionVal; 3973}, 3974reliableMarginLeft:function(){ 3975computeStyleTests(); 3976return reliableMarginLeftVal; 3977}, 3978scrollboxSize:function(){ 3979computeStyleTests(); 3980return scrollboxSizeVal; 3981}, 3982reliableTrDimensions:function(){ 3983var table,tr,trChild,trStyle; 3984if(reliableTrDimensionsVal==null){ 3985table=document.createElement("table"); 3986tr=document.createElement("tr"); 3987trChild=document.createElement("div"); 3988table.style.cssText="position:absolute;left:-11111px;border-collapse:separate"; 3989tr.style.cssText="box-sizing:content-box;border:1px solid"; 3990tr.style.height="1px"; 3991trChild.style.height="9px"; 3992trChild.style.display="block"; 3993documentElement 3994.appendChild(table) 3995.appendChild(tr) 3996.appendChild(trChild); 3997trStyle=window.getComputedStyle(tr); 3998reliableTrDimensionsVal=(parseInt(trStyle.height,10)+ 3999parseInt(trStyle.borderTopWidth,10)+ 4000parseInt(trStyle.borderBottomWidth,10))===tr.offsetHeight; 4001documentElement.removeChild(table); 4002} 4003return reliableTrDimensionsVal; 4004} 4005}); 4006})(); 4007function curCSS(elem,name,computed){ 4008var width,minWidth,maxWidth,ret, 4009isCustomProp=rcustomProp.test(name), 4010style=elem.style; 4011computed=computed||getStyles(elem); 4012if(computed){ 4013ret=computed.getPropertyValue(name)||computed[name]; 4014if(isCustomProp&&ret){ 4015ret=ret.replace(rtrimCSS,"$1")||undefined; 4016} 4017if(ret===""&&!isAttached(elem)){ 4018ret=jQuery.style(elem,name); 4019} 4020if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){ 4021width=style.width; 4022minWidth=style.minWidth; 4023maxWidth=style.maxWidth; 4024style.minWidth=style.maxWidth=style.width=ret; 4025ret=computed.width; 4026style.width=width; 4027style.minWidth=minWidth; 4028style.maxWidth=maxWidth; 4029} 4030} 4031return ret!==undefined? 4032ret+"": 4033ret; 4034} 4035function addGetHookIf(conditionFn,hookFn){ 4036return{ 4037get:function(){ 4038if(conditionFn()){ 4039delete this.get; 4040return; 4041} 4042return(this.get=hookFn).apply(this,arguments); 4043} 4044}; 4045} 4046var cssPrefixes=["Webkit","Moz","ms"], 4047emptyStyle=document.createElement("div").style, 4048vendorProps={}; 4049function vendorPropName(name){ 4050var capName=name[0].toUpperCase()+name.slice(1), 4051i=cssPrefixes.length; 4052while(i--){ 4053name=cssPrefixes[i]+capName; 4054if(name in emptyStyle){ 4055return name; 4056} 4057} 4058} 4059function finalPropName(name){ 4060var final=jQuery.cssProps[name]||vendorProps[name]; 4061if(final){ 4062return final; 4063} 4064if(name in emptyStyle){ 4065return name; 4066} 4067return vendorProps[name]=vendorPropName(name)||name; 4068} 4069var 4070rdisplayswap=/^(none|table(?!-c[ea]).+)/, 4071cssShow={position:"absolute",visibility:"hidden",display:"block"}, 4072cssNormalTransform={ 4073letterSpacing:"0", 4074fontWeight:"400" 4075}; 4076function setPositiveNumber(_elem,value,subtract){ 4077var matches=rcssNum.exec(value); 4078return matches? 4079Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"): 4080value; 4081} 4082function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){ 4083var i=dimension==="width"?1:0, 4084extra=0, 4085delta=0, 4086marginDelta=0; 4087if(box===(isBorderBox?"border":"content")){ 4088return 0; 4089} 4090for(;i<4;i+=2){ 4091if(box==="margin"){ 4092marginDelta+=jQuery.css(elem,box+cssExpand[i],true,styles); 4093} 4094if(!isBorderBox){ 4095delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles); 4096if(box!=="padding"){ 4097delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles); 4098}else{ 4099extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles); 4100} 4101}else{ 4102if(box==="content"){ 4103delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles); 4104} 4105if(box!=="margin"){ 4106delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles); 4107} 4108} 4109} 4110if(!isBorderBox&&computedVal>=0){ 4111delta+=Math.max(0,Math.ceil( 4112elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]- 4113computedVal- 4114delta- 4115extra- 41160.5 4117))||0; 4118} 4119return delta+marginDelta; 4120} 4121function getWidthOrHeight(elem,dimension,extra){ 4122var styles=getStyles(elem), 4123boxSizingNeeded=!support.boxSizingReliable()||extra, 4124isBorderBox=boxSizingNeeded&& 4125jQuery.css(elem,"boxSizing",false,styles)==="border-box", 4126valueIsBorderBox=isBorderBox, 4127val=curCSS(elem,dimension,styles), 4128offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1); 4129if(rnumnonpx.test(val)){ 4130if(!extra){ 4131return val; 4132} 4133val="auto"; 4134} 4135if((!support.boxSizingReliable()&&isBorderBox|| 4136!support.reliableTrDimensions()&&nodeName(elem,"tr")|| 4137val==="auto"|| 4138!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline")&& 4139elem.getClientRects().length){ 4140isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box"; 4141valueIsBorderBox=offsetProp in elem; 4142if(valueIsBorderBox){ 4143val=elem[offsetProp]; 4144} 4145} 4146val=parseFloat(val)||0; 4147return(val+ 4148boxModelAdjustment( 4149elem, 4150dimension, 4151extra||(isBorderBox?"border":"content"), 4152valueIsBorderBox, 4153styles, 4154val 4155) 4156)+"px"; 4157} 4158jQuery.extend({ 4159cssHooks:{ 4160opacity:{ 4161get:function(elem,computed){ 4162if(computed){ 4163var ret=curCSS(elem,"opacity"); 4164return ret===""?"1":ret; 4165} 4166} 4167} 4168}, 4169cssNumber:{ 4170animationIterationCount:true, 4171aspectRatio:true, 4172borderImageSlice:true, 4173columnCount:true, 4174flexGrow:true, 4175flexShrink:true, 4176fontWeight:true, 4177gridArea:true, 4178gridColumn:true, 4179gridColumnEnd:true, 4180gridColumnStart:true, 4181gridRow:true, 4182gridRowEnd:true, 4183gridRowStart:true, 4184lineHeight:true, 4185opacity:true, 4186order:true, 4187orphans:true, 4188scale:true, 4189widows:true, 4190zIndex:true, 4191zoom:true, 4192fillOpacity:true, 4193floodOpacity:true, 4194stopOpacity:true, 4195strokeMiterlimit:true, 4196strokeOpacity:true 4197}, 4198cssProps:{}, 4199style:function(elem,name,value,extra){ 4200if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){ 4201return; 4202} 4203var ret,type,hooks, 4204origName=camelCase(name), 4205isCustomProp=rcustomProp.test(name), 4206style=elem.style; 4207if(!isCustomProp){ 4208name=finalPropName(origName); 4209} 4210hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName]; 4211if(value!==undefined){ 4212type=typeof value; 4213if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){ 4214value=adjustCSS(elem,name,ret); 4215type="number"; 4216} 4217if(value==null||value!==value){ 4218return; 4219} 4220if(type==="number"&&!isCustomProp){ 4221value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px"); 4222} 4223if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){ 4224style[name]="inherit"; 4225} 4226if(!hooks||!("set"in hooks)|| 4227(value=hooks.set(elem,value,extra))!==undefined){ 4228if(isCustomProp){ 4229style.setProperty(name,value); 4230}else{ 4231style[name]=value; 4232} 4233} 4234}else{ 4235if(hooks&&"get"in hooks&& 4236(ret=hooks.get(elem,false,extra))!==undefined){ 4237return ret; 4238} 4239return style[name]; 4240} 4241}, 4242css:function(elem,name,extra,styles){ 4243var val,num,hooks, 4244origName=camelCase(name), 4245isCustomProp=rcustomProp.test(name); 4246if(!isCustomProp){ 4247name=finalPropName(origName); 4248} 4249hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName]; 4250if(hooks&&"get"in hooks){ 4251val=hooks.get(elem,true,extra); 4252} 4253if(val===undefined){ 4254val=curCSS(elem,name,styles); 4255} 4256if(val==="normal"&&name in cssNormalTransform){ 4257val=cssNormalTransform[name]; 4258} 4259if(extra===""||extra){ 4260num=parseFloat(val); 4261return extra===true||isFinite(num)?num||0:val; 4262} 4263return val; 4264} 4265}); 4266jQuery.each(["height","width"],function(_i,dimension){ 4267jQuery.cssHooks[dimension]={ 4268get:function(elem,computed,extra){ 4269if(computed){ 4270return rdisplayswap.test(jQuery.css(elem,"display"))&& 4271(!elem.getClientRects().length||!elem.getBoundingClientRect().width)? 4272swap(elem,cssShow,function(){ 4273return getWidthOrHeight(elem,dimension,extra); 4274}): 4275getWidthOrHeight(elem,dimension,extra); 4276} 4277}, 4278set:function(elem,value,extra){ 4279var matches, 4280styles=getStyles(elem), 4281scrollboxSizeBuggy=!support.scrollboxSize()&& 4282styles.position==="absolute", 4283boxSizingNeeded=scrollboxSizeBuggy||extra, 4284isBorderBox=boxSizingNeeded&& 4285jQuery.css(elem,"boxSizing",false,styles)==="border-box", 4286subtract=extra? 4287boxModelAdjustment( 4288elem, 4289dimension, 4290extra, 4291isBorderBox, 4292styles 4293): 42940; 4295if(isBorderBox&&scrollboxSizeBuggy){ 4296subtract-=Math.ceil( 4297elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]- 4298parseFloat(styles[dimension])- 4299boxModelAdjustment(elem,dimension,"border",false,styles)- 43000.5 4301); 4302} 4303if(subtract&&(matches=rcssNum.exec(value))&& 4304(matches[3]||"px")!=="px"){ 4305elem.style[dimension]=value; 4306value=jQuery.css(elem,dimension); 4307} 4308return setPositiveNumber(elem,value,subtract); 4309} 4310}; 4311}); 4312jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft, 4313function(elem,computed){ 4314if(computed){ 4315return(parseFloat(curCSS(elem,"marginLeft"))|| 4316elem.getBoundingClientRect().left- 4317swap(elem,{marginLeft:0},function(){ 4318return elem.getBoundingClientRect().left; 4319}) 4320)+"px"; 4321} 4322} 4323); 4324jQuery.each({ 4325margin:"", 4326padding:"", 4327border:"Width" 4328},function(prefix,suffix){ 4329jQuery.cssHooks[prefix+suffix]={ 4330expand:function(value){ 4331var i=0, 4332expanded={}, 4333parts=typeof value==="string"?value.split(" "):[value]; 4334for(;i<4;i++){ 4335expanded[prefix+cssExpand[i]+suffix]= 4336parts[i]||parts[i-2]||parts[0]; 4337} 4338return expanded; 4339} 4340}; 4341if(prefix!=="margin"){ 4342jQuery.cssHooks[prefix+suffix].set=setPositiveNumber; 4343} 4344}); 4345jQuery.fn.extend({ 4346css:function(name,value){ 4347return access(this,function(elem,name,value){ 4348var styles,len, 4349map={}, 4350i=0; 4351if(Array.isArray(name)){ 4352styles=getStyles(elem); 4353len=name.length; 4354for(;i<len;i++){ 4355map[name[i]]=jQuery.css(elem,name[i],false,styles); 4356} 4357return map; 4358} 4359return value!==undefined? 4360jQuery.style(elem,name,value): 4361jQuery.css(elem,name); 4362},name,value,arguments.length>1); 4363} 4364}); 4365function Tween(elem,options,prop,end,easing){ 4366return new Tween.prototype.init(elem,options,prop,end,easing); 4367} 4368jQuery.Tween=Tween; 4369Tween.prototype={ 4370constructor:Tween, 4371init:function(elem,options,prop,end,easing,unit){ 4372this.elem=elem; 4373this.prop=prop; 4374this.easing=easing||jQuery.easing._default; 4375this.options=options; 4376this.start=this.now=this.cur(); 4377this.end=end; 4378this.unit=unit||(jQuery.cssNumber[prop]?"":"px"); 4379}, 4380cur:function(){ 4381var hooks=Tween.propHooks[this.prop]; 4382return hooks&&hooks.get? 4383hooks.get(this): 4384Tween.propHooks._default.get(this); 4385}, 4386run:function(percent){ 4387var eased, 4388hooks=Tween.propHooks[this.prop]; 4389if(this.options.duration){ 4390this.pos=eased=jQuery.easing[this.easing]( 4391percent,this.options.duration*percent,0,1,this.options.duration 4392); 4393}else{ 4394this.pos=eased=percent; 4395} 4396this.now=(this.end-this.start)*eased+this.start; 4397if(this.options.step){ 4398this.options.step.call(this.elem,this.now,this); 4399} 4400if(hooks&&hooks.set){ 4401hooks.set(this); 4402}else{ 4403Tween.propHooks._default.set(this); 4404} 4405return this; 4406} 4407}; 4408Tween.prototype.init.prototype=Tween.prototype; 4409Tween.propHooks={ 4410_default:{ 4411get:function(tween){ 4412var result; 4413if(tween.elem.nodeType!==1|| 4414tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){ 4415return tween.elem[tween.prop]; 4416} 4417result=jQuery.css(tween.elem,tween.prop,""); 4418return!result||result==="auto"?0:result; 4419}, 4420set:function(tween){ 4421if(jQuery.fx.step[tween.prop]){ 4422jQuery.fx.step[tween.prop](tween); 4423}else if(tween.elem.nodeType===1&&( 4424jQuery.cssHooks[tween.prop]|| 4425tween.elem.style[finalPropName(tween.prop)]!=null)){ 4426jQuery.style(tween.elem,tween.prop,tween.now+tween.unit); 4427}else{ 4428tween.elem[tween.prop]=tween.now; 4429} 4430} 4431} 4432}; 4433Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={ 4434set:function(tween){ 4435if(tween.elem.nodeType&&tween.elem.parentNode){ 4436tween.elem[tween.prop]=tween.now; 4437} 4438} 4439}; 4440jQuery.easing={ 4441linear:function(p){ 4442return p; 4443}, 4444swing:function(p){ 4445return 0.5-Math.cos(p*Math.PI)/2; 4446}, 4447_default:"swing" 4448}; 4449jQuery.fx=Tween.prototype.init; 4450jQuery.fx.step={}; 4451var 4452fxNow,inProgress, 4453rfxtypes=/^(?:toggle|show|hide)$/, 4454rrun=/queueHooks$/; 4455function schedule(){ 4456if(inProgress){ 4457if(document.hidden===false&&window.requestAnimationFrame){ 4458window.requestAnimationFrame(schedule); 4459}else{ 4460window.setTimeout(schedule,jQuery.fx.interval); 4461} 4462jQuery.fx.tick(); 4463} 4464} 4465function createFxNow(){ 4466window.setTimeout(function(){ 4467fxNow=undefined; 4468}); 4469return(fxNow=Date.now()); 4470} 4471function genFx(type,includeWidth){ 4472var which, 4473i=0, 4474attrs={height:type}; 4475includeWidth=includeWidth?1:0; 4476for(;i<4;i+=2-includeWidth){ 4477which=cssExpand[i]; 4478attrs["margin"+which]=attrs["padding"+which]=type; 4479} 4480if(includeWidth){ 4481attrs.opacity=attrs.width=type; 4482} 4483return attrs; 4484} 4485function createTween(value,prop,animation){ 4486var tween, 4487collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]), 4488index=0, 4489length=collection.length; 4490for(;index<length;index++){ 4491if((tween=collection[index].call(animation,prop,value))){ 4492return tween; 4493} 4494} 4495} 4496function defaultPrefilter(elem,props,opts){ 4497var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display, 4498isBox="width"in props||"height"in props, 4499anim=this, 4500orig={}, 4501style=elem.style, 4502hidden=elem.nodeType&&isHiddenWithinTree(elem), 4503dataShow=dataPriv.get(elem,"fxshow"); 4504if(!opts.queue){ 4505hooks=jQuery._queueHooks(elem,"fx"); 4506if(hooks.unqueued==null){ 4507hooks.unqueued=0; 4508oldfire=hooks.empty.fire; 4509hooks.empty.fire=function(){ 4510if(!hooks.unqueued){ 4511oldfire(); 4512} 4513}; 4514} 4515hooks.unqueued++; 4516anim.always(function(){ 4517anim.always(function(){ 4518hooks.unqueued--; 4519if(!jQuery.queue(elem,"fx").length){ 4520hooks.empty.fire(); 4521} 4522}); 4523}); 4524} 4525for(prop in props){ 4526value=props[prop]; 4527if(rfxtypes.test(value)){ 4528delete props[prop]; 4529toggle=toggle||value==="toggle"; 4530if(value===(hidden?"hide":"show")){ 4531if(value==="show"&&dataShow&&dataShow[prop]!==undefined){ 4532hidden=true; 4533}else{ 4534continue; 4535} 4536} 4537orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop); 4538} 4539} 4540propTween=!jQuery.isEmptyObject(props); 4541if(!propTween&&jQuery.isEmptyObject(orig)){ 4542return; 4543} 4544if(isBox&&elem.nodeType===1){ 4545opts.overflow=[style.overflow,style.overflowX,style.overflowY]; 4546restoreDisplay=dataShow&&dataShow.display; 4547if(restoreDisplay==null){ 4548restoreDisplay=dataPriv.get(elem,"display"); 4549} 4550display=jQuery.css(elem,"display"); 4551if(display==="none"){ 4552if(restoreDisplay){ 4553display=restoreDisplay; 4554}else{ 4555showHide([elem],true); 4556restoreDisplay=elem.style.display||restoreDisplay; 4557display=jQuery.css(elem,"display"); 4558showHide([elem]); 4559} 4560} 4561if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){ 4562if(jQuery.css(elem,"float")==="none"){ 4563if(!propTween){ 4564anim.done(function(){ 4565style.display=restoreDisplay; 4566}); 4567if(restoreDisplay==null){ 4568display=style.display; 4569restoreDisplay=display==="none"?"":display; 4570} 4571} 4572style.display="inline-block"; 4573} 4574} 4575} 4576if(opts.overflow){ 4577style.overflow="hidden"; 4578anim.always(function(){ 4579style.overflow=opts.overflow[0]; 4580style.overflowX=opts.overflow[1]; 4581style.overflowY=opts.overflow[2]; 4582}); 4583} 4584propTween=false; 4585for(prop in orig){ 4586if(!propTween){ 4587if(dataShow){ 4588if("hidden"in dataShow){ 4589hidden=dataShow.hidden; 4590} 4591}else{ 4592dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay}); 4593} 4594if(toggle){ 4595dataShow.hidden=!hidden; 4596} 4597if(hidden){ 4598showHide([elem],true); 4599} 4600anim.done(function(){ 4601if(!hidden){ 4602showHide([elem]); 4603} 4604dataPriv.remove(elem,"fxshow"); 4605for(prop in orig){ 4606jQuery.style(elem,prop,orig[prop]); 4607} 4608}); 4609} 4610propTween=createTween(hidden?dataShow[prop]:0,prop,anim); 4611if(!(prop in dataShow)){ 4612dataShow[prop]=propTween.start; 4613if(hidden){ 4614propTween.end=propTween.start; 4615propTween.start=0; 4616} 4617} 4618} 4619} 4620function propFilter(props,specialEasing){ 4621var index,name,easing,value,hooks; 4622for(index in props){ 4623name=camelCase(index); 4624easing=specialEasing[name]; 4625value=props[index]; 4626if(Array.isArray(value)){ 4627easing=value[1]; 4628value=props[index]=value[0]; 4629} 4630if(index!==name){ 4631props[name]=value; 4632delete props[index]; 4633} 4634hooks=jQuery.cssHooks[name]; 4635if(hooks&&"expand"in hooks){ 4636value=hooks.expand(value); 4637delete props[name]; 4638for(index in value){ 4639if(!(index in props)){ 4640props[index]=value[index]; 4641specialEasing[index]=easing; 4642} 4643} 4644}else{ 4645specialEasing[name]=easing; 4646} 4647} 4648} 4649function Animation(elem,properties,options){ 4650var result, 4651stopped, 4652index=0, 4653length=Animation.prefilters.length, 4654deferred=jQuery.Deferred().always(function(){ 4655delete tick.elem; 4656}), 4657tick=function(){ 4658if(stopped){ 4659return false; 4660} 4661var currentTime=fxNow||createFxNow(), 4662remaining=Math.max(0,animation.startTime+animation.duration-currentTime), 4663temp=remaining/animation.duration||0, 4664percent=1-temp, 4665index=0, 4666length=animation.tweens.length; 4667for(;index<length;index++){ 4668animation.tweens[index].run(percent); 4669} 4670deferred.notifyWith(elem,[animation,percent,remaining]); 4671if(percent<1&&length){ 4672return remaining; 4673} 4674if(!length){ 4675deferred.notifyWith(elem,[animation,1,0]); 4676} 4677deferred.resolveWith(elem,[animation]); 4678return false; 4679}, 4680animation=deferred.promise({ 4681elem:elem, 4682props:jQuery.extend({},properties), 4683opts:jQuery.extend(true,{ 4684specialEasing:{}, 4685easing:jQuery.easing._default 4686},options), 4687originalProperties:properties, 4688originalOptions:options, 4689startTime:fxNow||createFxNow(), 4690duration:options.duration, 4691tweens:[], 4692createTween:function(prop,end){ 4693var tween=jQuery.Tween(elem,animation.opts,prop,end, 4694animation.opts.specialEasing[prop]||animation.opts.easing); 4695animation.tweens.push(tween); 4696return tween; 4697}, 4698stop:function(gotoEnd){ 4699var index=0, 4700length=gotoEnd?animation.tweens.length:0; 4701if(stopped){ 4702return this; 4703} 4704stopped=true; 4705for(;index<length;index++){ 4706animation.tweens[index].run(1); 4707} 4708if(gotoEnd){ 4709deferred.notifyWith(elem,[animation,1,0]); 4710deferred.resolveWith(elem,[animation,gotoEnd]); 4711}else{ 4712deferred.rejectWith(elem,[animation,gotoEnd]); 4713} 4714return this; 4715} 4716}), 4717props=animation.props; 4718propFilter(props,animation.opts.specialEasing); 4719for(;index<length;index++){ 4720result=Animation.prefilters[index].call(animation,elem,props,animation.opts); 4721if(result){ 4722if(isFunction(result.stop)){ 4723jQuery._queueHooks(animation.elem,animation.opts.queue).stop= 4724result.stop.bind(result); 4725} 4726return result; 4727} 4728} 4729jQuery.map(props,createTween,animation); 4730if(isFunction(animation.opts.start)){ 4731animation.opts.start.call(elem,animation); 4732} 4733animation 4734.progress(animation.opts.progress) 4735.done(animation.opts.done,animation.opts.complete) 4736.fail(animation.opts.fail) 4737.always(animation.opts.always); 4738jQuery.fx.timer( 4739jQuery.extend(tick,{ 4740elem:elem, 4741anim:animation, 4742queue:animation.opts.queue 4743}) 4744); 4745return animation; 4746} 4747jQuery.Animation=jQuery.extend(Animation,{ 4748tweeners:{ 4749"*":[function(prop,value){ 4750var tween=this.createTween(prop,value); 4751adjustCSS(tween.elem,prop,rcssNum.exec(value),tween); 4752return tween; 4753}] 4754}, 4755tweener:function(props,callback){ 4756if(isFunction(props)){ 4757callback=props; 4758props=["*"]; 4759}else{ 4760props=props.match(rnothtmlwhite); 4761} 4762var prop, 4763index=0, 4764length=props.length; 4765for(;index<length;index++){ 4766prop=props[index]; 4767Animation.tweeners[prop]=Animation.tweeners[prop]||[]; 4768Animation.tweeners[prop].unshift(callback); 4769} 4770}, 4771prefilters:[defaultPrefilter], 4772prefilter:function(callback,prepend){ 4773if(prepend){ 4774Animation.prefilters.unshift(callback); 4775}else{ 4776Animation.prefilters.push(callback); 4777} 4778} 4779}); 4780jQuery.speed=function(speed,easing,fn){ 4781var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{ 4782complete:fn||!fn&&easing|| 4783isFunction(speed)&&speed, 4784duration:speed, 4785easing:fn&&easing||easing&&!isFunction(easing)&&easing 4786}; 4787if(jQuery.fx.off){ 4788opt.duration=0; 4789}else{ 4790if(typeof opt.duration!=="number"){ 4791if(opt.duration in jQuery.fx.speeds){ 4792opt.duration=jQuery.fx.speeds[opt.duration]; 4793}else{ 4794opt.duration=jQuery.fx.speeds._default; 4795} 4796} 4797} 4798if(opt.queue==null||opt.queue===true){ 4799opt.queue="fx"; 4800} 4801opt.old=opt.complete; 4802opt.complete=function(){ 4803if(isFunction(opt.old)){ 4804opt.old.call(this); 4805} 4806if(opt.queue){ 4807jQuery.dequeue(this,opt.queue); 4808} 4809}; 4810return opt; 4811}; 4812jQuery.fn.extend({ 4813fadeTo:function(speed,to,easing,callback){ 4814return this.filter(isHiddenWithinTree).css("opacity",0).show() 4815.end().animate({opacity:to},speed,easing,callback); 4816}, 4817animate:function(prop,speed,easing,callback){ 4818var empty=jQuery.isEmptyObject(prop), 4819optall=jQuery.speed(speed,easing,callback), 4820doAnimation=function(){ 4821var anim=Animation(this,jQuery.extend({},prop),optall); 4822if(empty||dataPriv.get(this,"finish")){ 4823anim.stop(true); 4824} 4825}; 4826doAnimation.finish=doAnimation; 4827return empty||optall.queue===false? 4828this.each(doAnimation): 4829this.queue(optall.queue,doAnimation); 4830}, 4831stop:function(type,clearQueue,gotoEnd){ 4832var stopQueue=function(hooks){ 4833var stop=hooks.stop; 4834delete hooks.stop; 4835stop(gotoEnd); 4836}; 4837if(typeof type!=="string"){ 4838gotoEnd=clearQueue; 4839clearQueue=type; 4840type=undefined; 4841} 4842if(clearQueue){ 4843this.queue(type||"fx",[]); 4844} 4845return this.each(function(){ 4846var dequeue=true, 4847index=type!=null&&type+"queueHooks", 4848timers=jQuery.timers, 4849data=dataPriv.get(this); 4850if(index){ 4851if(data[index]&&data[index].stop){ 4852stopQueue(data[index]); 4853} 4854}else{ 4855for(index in data){ 4856if(data[index]&&data[index].stop&&rrun.test(index)){ 4857stopQueue(data[index]); 4858} 4859} 4860} 4861for(index=timers.length;index--;){ 4862if(timers[index].elem===this&& 4863(type==null||timers[index].queue===type)){ 4864timers[index].anim.stop(gotoEnd); 4865dequeue=false; 4866timers.splice(index,1); 4867} 4868} 4869if(dequeue||!gotoEnd){ 4870jQuery.dequeue(this,type); 4871} 4872}); 4873}, 4874finish:function(type){ 4875if(type!==false){ 4876type=type||"fx"; 4877} 4878return this.each(function(){ 4879var index, 4880data=dataPriv.get(this), 4881queue=data[type+"queue"], 4882hooks=data[type+"queueHooks"], 4883timers=jQuery.timers, 4884length=queue?queue.length:0; 4885data.finish=true; 4886jQuery.queue(this,type,[]); 4887if(hooks&&hooks.stop){ 4888hooks.stop.call(this,true); 4889} 4890for(index=timers.length;index--;){ 4891if(timers[index].elem===this&&timers[index].queue===type){ 4892timers[index].anim.stop(true); 4893timers.splice(index,1); 4894} 4895} 4896for(index=0;index<length;index++){ 4897if(queue[index]&&queue[index].finish){ 4898queue[index].finish.call(this); 4899} 4900} 4901delete data.finish; 4902}); 4903} 4904}); 4905jQuery.each(["toggle","show","hide"],function(_i,name){ 4906var cssFn=jQuery.fn[name]; 4907jQuery.fn[name]=function(speed,easing,callback){ 4908return speed==null||typeof speed==="boolean"? 4909cssFn.apply(this,arguments): 4910this.animate(genFx(name,true),speed,easing,callback); 4911}; 4912}); 4913jQuery.each({ 4914slideDown:genFx("show"), 4915slideUp:genFx("hide"), 4916slideToggle:genFx("toggle"), 4917fadeIn:{opacity:"show"}, 4918fadeOut:{opacity:"hide"}, 4919fadeToggle:{opacity:"toggle"} 4920},function(name,props){ 4921jQuery.fn[name]=function(speed,easing,callback){ 4922return this.animate(props,speed,easing,callback); 4923}; 4924}); 4925jQuery.timers=[]; 4926jQuery.fx.tick=function(){ 4927var timer, 4928i=0, 4929timers=jQuery.timers; 4930fxNow=Date.now(); 4931for(;i<timers.length;i++){ 4932timer=timers[i]; 4933if(!timer()&&timers[i]===timer){ 4934timers.splice(i--,1); 4935} 4936} 4937if(!timers.length){ 4938jQuery.fx.stop(); 4939} 4940fxNow=undefined; 4941}; 4942jQuery.fx.timer=function(timer){ 4943jQuery.timers.push(timer); 4944jQuery.fx.start(); 4945}; 4946jQuery.fx.interval=13; 4947jQuery.fx.start=function(){ 4948if(inProgress){ 4949return; 4950} 4951inProgress=true; 4952schedule(); 4953}; 4954jQuery.fx.stop=function(){ 4955inProgress=null; 4956}; 4957jQuery.fx.speeds={ 4958slow:600, 4959fast:200, 4960_default:400 4961}; 4962jQuery.fn.delay=function(time,type){ 4963time=jQuery.fx?jQuery.fx.speeds[time]||time:time; 4964type=type||"fx"; 4965return this.queue(type,function(next,hooks){ 4966var timeout=window.setTimeout(next,time); 4967hooks.stop=function(){ 4968window.clearTimeout(timeout); 4969}; 4970}); 4971}; 4972(function(){ 4973var input=document.createElement("input"), 4974select=document.createElement("select"), 4975opt=select.appendChild(document.createElement("option")); 4976input.type="checkbox"; 4977support.checkOn=input.value!==""; 4978support.optSelected=opt.selected; 4979input=document.createElement("input"); 4980input.value="t"; 4981input.type="radio"; 4982support.radioValue=input.value==="t"; 4983})(); 4984var boolHook, 4985attrHandle=jQuery.expr.attrHandle; 4986jQuery.fn.extend({ 4987attr:function(name,value){ 4988return access(this,jQuery.attr,name,value,arguments.length>1); 4989}, 4990removeAttr:function(name){ 4991return this.each(function(){ 4992jQuery.removeAttr(this,name); 4993}); 4994} 4995}); 4996jQuery.extend({ 4997attr:function(elem,name,value){ 4998var ret,hooks, 4999nType=elem.nodeType; 5000if(nType===3||nType===8||nType===2){ 5001return; 5002} 5003if(typeof elem.getAttribute==="undefined"){ 5004return jQuery.prop(elem,name,value); 5005} 5006if(nType!==1||!jQuery.isXMLDoc(elem)){ 5007hooks=jQuery.attrHooks[name.toLowerCase()]|| 5008(jQuery.expr.match.bool.test(name)?boolHook:undefined); 5009} 5010if(value!==undefined){ 5011if(value===null){ 5012jQuery.removeAttr(elem,name); 5013return; 5014} 5015if(hooks&&"set"in hooks&& 5016(ret=hooks.set(elem,value,name))!==undefined){ 5017return ret; 5018} 5019elem.setAttribute(name,value+""); 5020return value; 5021} 5022if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){ 5023return ret; 5024} 5025ret=jQuery.find.attr(elem,name); 5026return ret==null?undefined:ret; 5027}, 5028attrHooks:{ 5029type:{ 5030set:function(elem,value){ 5031if(!support.radioValue&&value==="radio"&& 5032nodeName(elem,"input")){ 5033var val=elem.value; 5034elem.setAttribute("type",value); 5035if(val){ 5036elem.value=val; 5037} 5038return value; 5039} 5040} 5041} 5042}, 5043removeAttr:function(elem,value){ 5044var name, 5045i=0, 5046attrNames=value&&value.match(rnothtmlwhite); 5047if(attrNames&&elem.nodeType===1){ 5048while((name=attrNames[i++])){ 5049elem.removeAttribute(name); 5050} 5051} 5052} 5053}); 5054boolHook={ 5055set:function(elem,value,name){ 5056if(value===false){ 5057jQuery.removeAttr(elem,name); 5058}else{ 5059elem.setAttribute(name,name); 5060} 5061return name; 5062} 5063}; 5064jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){ 5065var getter=attrHandle[name]||jQuery.find.attr; 5066attrHandle[name]=function(elem,name,isXML){ 5067var ret,handle, 5068lowercaseName=name.toLowerCase(); 5069if(!isXML){ 5070handle=attrHandle[lowercaseName]; 5071attrHandle[lowercaseName]=ret; 5072ret=getter(elem,name,isXML)!=null? 5073lowercaseName: 5074null; 5075attrHandle[lowercaseName]=handle; 5076} 5077return ret; 5078}; 5079}); 5080var rfocusable=/^(?:input|select|textarea|button)$/i, 5081rclickable=/^(?:a|area)$/i; 5082jQuery.fn.extend({ 5083prop:function(name,value){ 5084return access(this,jQuery.prop,name,value,arguments.length>1); 5085}, 5086removeProp:function(name){ 5087return this.each(function(){ 5088delete this[jQuery.propFix[name]||name]; 5089}); 5090} 5091}); 5092jQuery.extend({ 5093prop:function(elem,name,value){ 5094var ret,hooks, 5095nType=elem.nodeType; 5096if(nType===3||nType===8||nType===2){ 5097return; 5098} 5099if(nType!==1||!jQuery.isXMLDoc(elem)){ 5100name=jQuery.propFix[name]||name; 5101hooks=jQuery.propHooks[name]; 5102} 5103if(value!==undefined){ 5104if(hooks&&"set"in hooks&& 5105(ret=hooks.set(elem,value,name))!==undefined){ 5106return ret; 5107} 5108return(elem[name]=value); 5109} 5110if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){ 5111return ret; 5112} 5113return elem[name]; 5114}, 5115propHooks:{ 5116tabIndex:{ 5117get:function(elem){ 5118var tabindex=jQuery.find.attr(elem,"tabindex"); 5119if(tabindex){ 5120return parseInt(tabindex,10); 5121} 5122if( 5123rfocusable.test(elem.nodeName)|| 5124rclickable.test(elem.nodeName)&& 5125elem.href 5126){ 5127return 0; 5128} 5129return-1; 5130} 5131} 5132}, 5133propFix:{ 5134"for":"htmlFor", 5135"class":"className" 5136} 5137}); 5138if(!support.optSelected){ 5139jQuery.propHooks.selected={ 5140get:function(elem){ 5141var parent=elem.parentNode; 5142if(parent&&parent.parentNode){ 5143parent.parentNode.selectedIndex; 5144} 5145return null; 5146}, 5147set:function(elem){ 5148var parent=elem.parentNode; 5149if(parent){ 5150parent.selectedIndex; 5151if(parent.parentNode){ 5152parent.parentNode.selectedIndex; 5153} 5154} 5155} 5156}; 5157} 5158jQuery.each([ 5159"tabIndex", 5160"readOnly", 5161"maxLength", 5162"cellSpacing", 5163"cellPadding", 5164"rowSpan", 5165"colSpan", 5166"useMap", 5167"frameBorder", 5168"contentEditable" 5169],function(){ 5170jQuery.propFix[this.toLowerCase()]=this; 5171}); 5172function stripAndCollapse(value){ 5173var tokens=value.match(rnothtmlwhite)||[]; 5174return tokens.join(" "); 5175} 5176function getClass(elem){ 5177return elem.getAttribute&&elem.getAttribute("class")||""; 5178} 5179function classesToArray(value){ 5180if(Array.isArray(value)){ 5181return value; 5182} 5183if(typeof value==="string"){ 5184return value.match(rnothtmlwhite)||[]; 5185} 5186return[]; 5187} 5188jQuery.fn.extend({ 5189addClass:function(value){ 5190var classNames,cur,curValue,className,i,finalValue; 5191if(isFunction(value)){ 5192return this.each(function(j){ 5193jQuery(this).addClass(value.call(this,j,getClass(this))); 5194}); 5195} 5196classNames=classesToArray(value); 5197if(classNames.length){ 5198return this.each(function(){ 5199curValue=getClass(this); 5200cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" "); 5201if(cur){ 5202for(i=0;i<classNames.length;i++){ 5203className=classNames[i]; 5204if(cur.indexOf(" "+className+" ")<0){ 5205cur+=className+" "; 5206} 5207} 5208finalValue=stripAndCollapse(cur); 5209if(curValue!==finalValue){ 5210this.setAttribute("class",finalValue); 5211} 5212} 5213}); 5214} 5215return this; 5216}, 5217removeClass:function(value){ 5218var classNames,cur,curValue,className,i,finalValue; 5219if(isFunction(value)){ 5220return this.each(function(j){ 5221jQuery(this).removeClass(value.call(this,j,getClass(this))); 5222}); 5223} 5224if(!arguments.length){ 5225return this.attr("class",""); 5226} 5227classNames=classesToArray(value); 5228if(classNames.length){ 5229return this.each(function(){ 5230curValue=getClass(this); 5231cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" "); 5232if(cur){ 5233for(i=0;i<classNames.length;i++){ 5234className=classNames[i]; 5235while(cur.indexOf(" "+className+" ")>-1){ 5236cur=cur.replace(" "+className+" "," "); 5237} 5238} 5239finalValue=stripAndCollapse(cur); 5240if(curValue!==finalValue){ 5241this.setAttribute("class",finalValue); 5242} 5243} 5244}); 5245} 5246return this; 5247}, 5248toggleClass:function(value,stateVal){ 5249var classNames,className,i,self, 5250type=typeof value, 5251isValidValue=type==="string"||Array.isArray(value); 5252if(isFunction(value)){ 5253return this.each(function(i){ 5254jQuery(this).toggleClass( 5255value.call(this,i,getClass(this),stateVal), 5256stateVal 5257); 5258}); 5259} 5260if(typeof stateVal==="boolean"&&isValidValue){ 5261return stateVal?this.addClass(value):this.removeClass(value); 5262} 5263classNames=classesToArray(value); 5264return this.each(function(){ 5265if(isValidValue){ 5266self=jQuery(this); 5267for(i=0;i<classNames.length;i++){ 5268className=classNames[i]; 5269if(self.hasClass(className)){ 5270self.removeClass(className); 5271}else{ 5272self.addClass(className); 5273} 5274} 5275}else if(value===undefined||type==="boolean"){ 5276className=getClass(this); 5277if(className){ 5278dataPriv.set(this,"__className__",className); 5279} 5280if(this.setAttribute){ 5281this.setAttribute("class", 5282className||value===false? 5283"": 5284dataPriv.get(this,"__className__")||"" 5285); 5286} 5287} 5288}); 5289}, 5290hasClass:function(selector){ 5291var className,elem, 5292i=0; 5293className=" "+selector+" "; 5294while((elem=this[i++])){ 5295if(elem.nodeType===1&& 5296(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){ 5297return true; 5298} 5299} 5300return false; 5301} 5302}); 5303var rreturn=/\r/g; 5304jQuery.fn.extend({ 5305val:function(value){ 5306var hooks,ret,valueIsFunction, 5307elem=this[0]; 5308if(!arguments.length){ 5309if(elem){ 5310hooks=jQuery.valHooks[elem.type]|| 5311jQuery.valHooks[elem.nodeName.toLowerCase()]; 5312if(hooks&& 5313"get"in hooks&& 5314(ret=hooks.get(elem,"value"))!==undefined 5315){ 5316return ret; 5317} 5318ret=elem.value; 5319if(typeof ret==="string"){ 5320return ret.replace(rreturn,""); 5321} 5322return ret==null?"":ret; 5323} 5324return; 5325} 5326valueIsFunction=isFunction(value); 5327return this.each(function(i){ 5328var val; 5329if(this.nodeType!==1){ 5330return; 5331} 5332if(valueIsFunction){ 5333val=value.call(this,i,jQuery(this).val()); 5334}else{ 5335val=value; 5336} 5337if(val==null){ 5338val=""; 5339}else if(typeof val==="number"){ 5340val+=""; 5341}else if(Array.isArray(val)){ 5342val=jQuery.map(val,function(value){ 5343return value==null?"":value+""; 5344}); 5345} 5346hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()]; 5347if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){ 5348this.value=val; 5349} 5350}); 5351} 5352}); 5353jQuery.extend({ 5354valHooks:{ 5355option:{ 5356get:function(elem){ 5357var val=jQuery.find.attr(elem,"value"); 5358return val!=null? 5359val: 5360stripAndCollapse(jQuery.text(elem)); 5361} 5362}, 5363select:{ 5364get:function(elem){ 5365var value,option,i, 5366options=elem.options, 5367index=elem.selectedIndex, 5368one=elem.type==="select-one", 5369values=one?null:[], 5370max=one?index+1:options.length; 5371if(index<0){ 5372i=max; 5373}else{ 5374i=one?index:0; 5375} 5376for(;i<max;i++){ 5377option=options[i]; 5378if((option.selected||i===index)&& 5379!option.disabled&& 5380(!option.parentNode.disabled|| 5381!nodeName(option.parentNode,"optgroup"))){ 5382value=jQuery(option).val(); 5383if(one){ 5384return value; 5385} 5386values.push(value); 5387} 5388} 5389return values; 5390}, 5391set:function(elem,value){ 5392var optionSet,option, 5393options=elem.options, 5394values=jQuery.makeArray(value), 5395i=options.length; 5396while(i--){ 5397option=options[i]; 5398if(option.selected= 5399jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1 5400){ 5401optionSet=true; 5402} 5403} 5404if(!optionSet){ 5405elem.selectedIndex=-1; 5406} 5407return values; 5408} 5409} 5410} 5411}); 5412jQuery.each(["radio","checkbox"],function(){ 5413jQuery.valHooks[this]={ 5414set:function(elem,value){ 5415if(Array.isArray(value)){ 5416return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1); 5417} 5418} 5419}; 5420if(!support.checkOn){ 5421jQuery.valHooks[this].get=function(elem){ 5422return elem.getAttribute("value")===null?"on":elem.value; 5423}; 5424} 5425}); 5426var location=window.location; 5427var nonce={guid:Date.now()}; 5428var rquery=(/\?/); 5429jQuery.parseXML=function(data){ 5430var xml,parserErrorElem; 5431if(!data||typeof data!=="string"){ 5432return null; 5433} 5434try{ 5435xml=(new window.DOMParser()).parseFromString(data,"text/xml"); 5436}catch(e){} 5437parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0]; 5438if(!xml||parserErrorElem){ 5439jQuery.error("Invalid XML: "+( 5440parserErrorElem? 5441jQuery.map(parserErrorElem.childNodes,function(el){ 5442return el.textContent; 5443}).join("\n"): 5444data 5445)); 5446} 5447return xml; 5448}; 5449var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/, 5450stopPropagationCallback=function(e){ 5451e.stopPropagation(); 5452}; 5453jQuery.extend(jQuery.event,{ 5454trigger:function(event,data,elem,onlyHandlers){ 5455var i,cur,tmp,bubbleType,ontype,handle,special,lastElement, 5456eventPath=[elem||document], 5457type=hasOwn.call(event,"type")?event.type:event, 5458namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[]; 5459cur=lastElement=tmp=elem=elem||document; 5460if(elem.nodeType===3||elem.nodeType===8){ 5461return; 5462} 5463if(rfocusMorph.test(type+jQuery.event.triggered)){ 5464return; 5465} 5466if(type.indexOf(".")>-1){ 5467namespaces=type.split("."); 5468type=namespaces.shift(); 5469namespaces.sort(); 5470} 5471ontype=type.indexOf(":")<0&&"on"+type; 5472event=event[jQuery.expando]? 5473event: 5474new jQuery.Event(type,typeof event==="object"&&event); 5475event.isTrigger=onlyHandlers?2:3; 5476event.namespace=namespaces.join("."); 5477event.rnamespace=event.namespace? 5478new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"): 5479null; 5480event.result=undefined; 5481if(!event.target){ 5482event.target=elem; 5483} 5484data=data==null? 5485[event]: 5486jQuery.makeArray(data,[event]); 5487special=jQuery.event.special[type]||{}; 5488if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){ 5489return; 5490} 5491if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){ 5492bubbleType=special.delegateType||type; 5493if(!rfocusMorph.test(bubbleType+type)){ 5494cur=cur.parentNode; 5495} 5496for(;cur;cur=cur.parentNode){ 5497eventPath.push(cur); 5498tmp=cur; 5499} 5500if(tmp===(elem.ownerDocument||document)){ 5501eventPath.push(tmp.defaultView||tmp.parentWindow||window); 5502} 5503} 5504i=0; 5505while((cur=eventPath[i++])&&!event.isPropagationStopped()){ 5506lastElement=cur; 5507event.type=i>1? 5508bubbleType: 5509special.bindType||type; 5510handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&& 5511dataPriv.get(cur,"handle"); 5512if(handle){ 5513handle.apply(cur,data); 5514} 5515handle=ontype&&cur[ontype]; 5516if(handle&&handle.apply&&acceptData(cur)){ 5517event.result=handle.apply(cur,data); 5518if(event.result===false){ 5519event.preventDefault(); 5520} 5521} 5522} 5523event.type=type; 5524if(!onlyHandlers&&!event.isDefaultPrevented()){ 5525if((!special._default|| 5526special._default.apply(eventPath.pop(),data)===false)&& 5527acceptData(elem)){ 5528if(ontype&&isFunction(elem[type])&&!isWindow(elem)){ 5529tmp=elem[ontype]; 5530if(tmp){ 5531elem[ontype]=null; 5532} 5533jQuery.event.triggered=type; 5534if(event.isPropagationStopped()){ 5535lastElement.addEventListener(type,stopPropagationCallback); 5536} 5537elem[type](); 5538if(event.isPropagationStopped()){ 5539lastElement.removeEventListener(type,stopPropagationCallback); 5540} 5541jQuery.event.triggered=undefined; 5542if(tmp){ 5543elem[ontype]=tmp; 5544} 5545} 5546} 5547} 5548return event.result; 5549}, 5550simulate:function(type,elem,event){ 5551var e=jQuery.extend( 5552new jQuery.Event(), 5553event, 5554{ 5555type:type, 5556isSimulated:true 5557} 5558); 5559jQuery.event.trigger(e,null,elem); 5560} 5561}); 5562jQuery.fn.extend({ 5563trigger:function(type,data){ 5564return this.each(function(){ 5565jQuery.event.trigger(type,data,this); 5566}); 5567}, 5568triggerHandler:function(type,data){ 5569var elem=this[0]; 5570if(elem){ 5571return jQuery.event.trigger(type,data,elem,true); 5572} 5573} 5574}); 5575var 5576rbracket=/\[\]$/, 5577rCRLF=/\r?\n/g, 5578rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i, 5579rsubmittable=/^(?:input|select|textarea|keygen)/i; 5580function buildParams(prefix,obj,traditional,add){ 5581var name; 5582if(Array.isArray(obj)){ 5583jQuery.each(obj,function(i,v){ 5584if(traditional||rbracket.test(prefix)){ 5585add(prefix,v); 5586}else{ 5587buildParams( 5588prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]", 5589v, 5590traditional, 5591add 5592); 5593} 5594}); 5595}else if(!traditional&&toType(obj)==="object"){ 5596for(name in obj){ 5597buildParams(prefix+"["+name+"]",obj[name],traditional,add); 5598} 5599}else{ 5600add(prefix,obj); 5601} 5602} 5603jQuery.param=function(a,traditional){ 5604var prefix, 5605s=[], 5606add=function(key,valueOrFunction){ 5607var value=isFunction(valueOrFunction)? 5608valueOrFunction(): 5609valueOrFunction; 5610s[s.length]=encodeURIComponent(key)+"="+ 5611encodeURIComponent(value==null?"":value); 5612}; 5613if(a==null){ 5614return""; 5615} 5616if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){ 5617jQuery.each(a,function(){ 5618add(this.name,this.value); 5619}); 5620}else{ 5621for(prefix in a){ 5622buildParams(prefix,a[prefix],traditional,add); 5623} 5624} 5625return s.join("&"); 5626}; 5627jQuery.fn.extend({ 5628serialize:function(){ 5629return jQuery.param(this.serializeArray()); 5630}, 5631serializeArray:function(){ 5632return this.map(function(){ 5633var elements=jQuery.prop(this,"elements"); 5634return elements?jQuery.makeArray(elements):this; 5635}).filter(function(){ 5636var type=this.type; 5637return this.name&&!jQuery(this).is(":disabled")&& 5638rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&& 5639(this.checked||!rcheckableType.test(type)); 5640}).map(function(_i,elem){ 5641var val=jQuery(this).val(); 5642if(val==null){ 5643return null; 5644} 5645if(Array.isArray(val)){ 5646return jQuery.map(val,function(val){ 5647return{name:elem.name,value:val.replace(rCRLF,"\r\n")}; 5648}); 5649} 5650return{name:elem.name,value:val.replace(rCRLF,"\r\n")}; 5651}).get(); 5652} 5653}); 5654var 5655r20=/%20/g, 5656rhash=/#.*$/, 5657rantiCache=/([?&])_=[^&]*/, 5658rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg, 5659rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 5660rnoContent=/^(?:GET|HEAD)$/, 5661rprotocol=/^\/\//, 5662prefilters={}, 5663transports={}, 5664allTypes="*/".concat("*"), 5665originAnchor=document.createElement("a"); 5666originAnchor.href=location.href; 5667function addToPrefiltersOrTransports(structure){ 5668return function(dataTypeExpression,func){ 5669if(typeof dataTypeExpression!=="string"){ 5670func=dataTypeExpression; 5671dataTypeExpression="*"; 5672} 5673var dataType, 5674i=0, 5675dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[]; 5676if(isFunction(func)){ 5677while((dataType=dataTypes[i++])){ 5678if(dataType[0]==="+"){ 5679dataType=dataType.slice(1)||"*"; 5680(structure[dataType]=structure[dataType]||[]).unshift(func); 5681}else{ 5682(structure[dataType]=structure[dataType]||[]).push(func); 5683} 5684} 5685} 5686}; 5687} 5688function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){ 5689var inspected={}, 5690seekingTransport=(structure===transports); 5691function inspect(dataType){ 5692var selected; 5693inspected[dataType]=true; 5694jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){ 5695var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR); 5696if(typeof dataTypeOrTransport==="string"&& 5697!seekingTransport&&!inspected[dataTypeOrTransport]){ 5698options.dataTypes.unshift(dataTypeOrTransport); 5699inspect(dataTypeOrTransport); 5700return false; 5701}else if(seekingTransport){ 5702return!(selected=dataTypeOrTransport); 5703} 5704}); 5705return selected; 5706} 5707return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*"); 5708} 5709function ajaxExtend(target,src){ 5710var key,deep, 5711flatOptions=jQuery.ajaxSettings.flatOptions||{}; 5712for(key in src){ 5713if(src[key]!==undefined){ 5714(flatOptions[key]?target:(deep||(deep={})))[key]=src[key]; 5715} 5716} 5717if(deep){ 5718jQuery.extend(true,target,deep); 5719} 5720return target; 5721} 5722function ajaxHandleResponses(s,jqXHR,responses){ 5723var ct,type,finalDataType,firstDataType, 5724contents=s.contents, 5725dataTypes=s.dataTypes; 5726while(dataTypes[0]==="*"){ 5727dataTypes.shift(); 5728if(ct===undefined){ 5729ct=s.mimeType||jqXHR.getResponseHeader("Content-Type"); 5730} 5731} 5732if(ct){ 5733for(type in contents){ 5734if(contents[type]&&contents[type].test(ct)){ 5735dataTypes.unshift(type); 5736break; 5737} 5738} 5739} 5740if(dataTypes[0]in responses){ 5741finalDataType=dataTypes[0]; 5742}else{ 5743for(type in responses){ 5744if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){ 5745finalDataType=type; 5746break; 5747} 5748if(!firstDataType){ 5749firstDataType=type; 5750} 5751} 5752finalDataType=finalDataType||firstDataType; 5753} 5754if(finalDataType){ 5755if(finalDataType!==dataTypes[0]){ 5756dataTypes.unshift(finalDataType); 5757} 5758return responses[finalDataType]; 5759} 5760} 5761function ajaxConvert(s,response,jqXHR,isSuccess){ 5762var conv2,current,conv,tmp,prev, 5763converters={}, 5764dataTypes=s.dataTypes.slice(); 5765if(dataTypes[1]){ 5766for(conv in s.converters){ 5767converters[conv.toLowerCase()]=s.converters[conv]; 5768} 5769} 5770current=dataTypes.shift(); 5771while(current){ 5772if(s.responseFields[current]){ 5773jqXHR[s.responseFields[current]]=response; 5774} 5775if(!prev&&isSuccess&&s.dataFilter){ 5776response=s.dataFilter(response,s.dataType); 5777} 5778prev=current; 5779current=dataTypes.shift(); 5780if(current){ 5781if(current==="*"){ 5782current=prev; 5783}else if(prev!=="*"&&prev!==current){ 5784conv=converters[prev+" "+current]||converters["* "+current]; 5785if(!conv){ 5786for(conv2 in converters){ 5787tmp=conv2.split(" "); 5788if(tmp[1]===current){ 5789conv=converters[prev+" "+tmp[0]]|| 5790converters["* "+tmp[0]]; 5791if(conv){ 5792if(conv===true){ 5793conv=converters[conv2]; 5794}else if(converters[conv2]!==true){ 5795current=tmp[0]; 5796dataTypes.unshift(tmp[1]); 5797} 5798break; 5799} 5800} 5801} 5802} 5803if(conv!==true){ 5804if(conv&&s.throws){ 5805response=conv(response); 5806}else{ 5807try{ 5808response=conv(response); 5809}catch(e){ 5810return{ 5811state:"parsererror", 5812error:conv?e:"No conversion from "+prev+" to "+current 5813}; 5814} 5815} 5816} 5817} 5818} 5819} 5820return{state:"success",data:response}; 5821} 5822jQuery.extend({ 5823active:0, 5824lastModified:{}, 5825etag:{}, 5826ajaxSettings:{ 5827url:location.href, 5828type:"GET", 5829isLocal:rlocalProtocol.test(location.protocol), 5830global:true, 5831processData:true, 5832async:true, 5833contentType:"application/x-www-form-urlencoded; charset=UTF-8", 5834accepts:{ 5835"*":allTypes, 5836text:"text/plain", 5837html:"text/html", 5838xml:"application/xml, text/xml", 5839json:"application/json, text/javascript" 5840}, 5841contents:{ 5842xml:/\bxml\b/, 5843html:/\bhtml/, 5844json:/\bjson\b/ 5845}, 5846responseFields:{ 5847xml:"responseXML", 5848text:"responseText", 5849json:"responseJSON" 5850}, 5851converters:{ 5852"* text":String, 5853"text html":true, 5854"text json":JSON.parse, 5855"text xml":jQuery.parseXML 5856}, 5857flatOptions:{ 5858url:true, 5859context:true 5860} 5861}, 5862ajaxSetup:function(target,settings){ 5863return settings? 5864ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings): 5865ajaxExtend(jQuery.ajaxSettings,target); 5866}, 5867ajaxPrefilter:addToPrefiltersOrTransports(prefilters), 5868ajaxTransport:addToPrefiltersOrTransports(transports), 5869ajax:function(url,options){ 5870if(typeof url==="object"){ 5871options=url; 5872url=undefined; 5873} 5874options=options||{}; 5875var transport, 5876cacheURL, 5877responseHeadersString, 5878responseHeaders, 5879timeoutTimer, 5880urlAnchor, 5881completed, 5882fireGlobals, 5883i, 5884uncached, 5885s=jQuery.ajaxSetup({},options), 5886callbackContext=s.context||s, 5887globalEventContext=s.context&& 5888(callbackContext.nodeType||callbackContext.jquery)? 5889jQuery(callbackContext): 5890jQuery.event, 5891deferred=jQuery.Deferred(), 5892completeDeferred=jQuery.Callbacks("once memory"), 5893statusCode=s.statusCode||{}, 5894requestHeaders={}, 5895requestHeadersNames={}, 5896strAbort="canceled", 5897jqXHR={ 5898readyState:0, 5899getResponseHeader:function(key){ 5900var match; 5901if(completed){ 5902if(!responseHeaders){ 5903responseHeaders={}; 5904while((match=rheaders.exec(responseHeadersString))){ 5905responseHeaders[match[1].toLowerCase()+" "]= 5906(responseHeaders[match[1].toLowerCase()+" "]||[]) 5907.concat(match[2]); 5908} 5909} 5910match=responseHeaders[key.toLowerCase()+" "]; 5911} 5912return match==null?null:match.join(", "); 5913}, 5914getAllResponseHeaders:function(){ 5915return completed?responseHeadersString:null; 5916}, 5917setRequestHeader:function(name,value){ 5918if(completed==null){ 5919name=requestHeadersNames[name.toLowerCase()]= 5920requestHeadersNames[name.toLowerCase()]||name; 5921requestHeaders[name]=value; 5922} 5923return this; 5924}, 5925overrideMimeType:function(type){ 5926if(completed==null){ 5927s.mimeType=type; 5928} 5929return this; 5930}, 5931statusCode:function(map){ 5932var code; 5933if(map){ 5934if(completed){ 5935jqXHR.always(map[jqXHR.status]); 5936}else{ 5937for(code in map){ 5938statusCode[code]=[statusCode[code],map[code]]; 5939} 5940} 5941} 5942return this; 5943}, 5944abort:function(statusText){ 5945var finalText=statusText||strAbort; 5946if(transport){ 5947transport.abort(finalText); 5948} 5949done(0,finalText); 5950return this; 5951} 5952}; 5953deferred.promise(jqXHR); 5954s.url=((url||s.url||location.href)+"") 5955.replace(rprotocol,location.protocol+"//"); 5956s.type=options.method||options.type||s.method||s.type; 5957s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""]; 5958if(s.crossDomain==null){ 5959urlAnchor=document.createElement("a"); 5960try{ 5961urlAnchor.href=s.url; 5962urlAnchor.href=urlAnchor.href; 5963s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!== 5964urlAnchor.protocol+"//"+urlAnchor.host; 5965}catch(e){ 5966s.crossDomain=true; 5967} 5968} 5969if(s.data&&s.processData&&typeof s.data!=="string"){ 5970s.data=jQuery.param(s.data,s.traditional); 5971} 5972inspectPrefiltersOrTransports(prefilters,s,options,jqXHR); 5973if(completed){ 5974return jqXHR; 5975} 5976fireGlobals=jQuery.event&&s.global; 5977if(fireGlobals&&jQuery.active++===0){ 5978jQuery.event.trigger("ajaxStart"); 5979} 5980s.type=s.type.toUpperCase(); 5981s.hasContent=!rnoContent.test(s.type); 5982cacheURL=s.url.replace(rhash,""); 5983if(!s.hasContent){ 5984uncached=s.url.slice(cacheURL.length); 5985if(s.data&&(s.processData||typeof s.data==="string")){ 5986cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data; 5987delete s.data; 5988} 5989if(s.cache===false){ 5990cacheURL=cacheURL.replace(rantiCache,"$1"); 5991uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce.guid++)+ 5992uncached; 5993} 5994s.url=cacheURL+uncached; 5995}else if(s.data&&s.processData&& 5996(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){ 5997s.data=s.data.replace(r20,"+"); 5998} 5999if(s.ifModified){ 6000if(jQuery.lastModified[cacheURL]){ 6001jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]); 6002} 6003if(jQuery.etag[cacheURL]){ 6004jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]); 6005} 6006} 6007if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){ 6008jqXHR.setRequestHeader("Content-Type",s.contentType); 6009} 6010jqXHR.setRequestHeader( 6011"Accept", 6012s.dataTypes[0]&&s.accepts[s.dataTypes[0]]? 6013s.accepts[s.dataTypes[0]]+ 6014(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""): 6015s.accepts["*"] 6016); 6017for(i in s.headers){ 6018jqXHR.setRequestHeader(i,s.headers[i]); 6019} 6020if(s.beforeSend&& 6021(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){ 6022return jqXHR.abort(); 6023} 6024strAbort="abort"; 6025completeDeferred.add(s.complete); 6026jqXHR.done(s.success); 6027jqXHR.fail(s.error); 6028transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR); 6029if(!transport){ 6030done(-1,"No Transport"); 6031}else{ 6032jqXHR.readyState=1; 6033if(fireGlobals){ 6034globalEventContext.trigger("ajaxSend",[jqXHR,s]); 6035} 6036if(completed){ 6037return jqXHR; 6038} 6039if(s.async&&s.timeout>0){ 6040timeoutTimer=window.setTimeout(function(){ 6041jqXHR.abort("timeout"); 6042},s.timeout); 6043} 6044try{ 6045completed=false; 6046transport.send(requestHeaders,done); 6047}catch(e){ 6048if(completed){ 6049throw e; 6050} 6051done(-1,e); 6052} 6053} 6054function done(status,nativeStatusText,responses,headers){ 6055var isSuccess,success,error,response,modified, 6056statusText=nativeStatusText; 6057if(completed){ 6058return; 6059} 6060completed=true; 6061if(timeoutTimer){ 6062window.clearTimeout(timeoutTimer); 6063} 6064transport=undefined; 6065responseHeadersString=headers||""; 6066jqXHR.readyState=status>0?4:0; 6067isSuccess=status>=200&&status<300||status===304; 6068if(responses){ 6069response=ajaxHandleResponses(s,jqXHR,responses); 6070} 6071if(!isSuccess&& 6072jQuery.inArray("script",s.dataTypes)>-1&& 6073jQuery.inArray("json",s.dataTypes)<0){ 6074s.converters["text script"]=function(){}; 6075} 6076response=ajaxConvert(s,response,jqXHR,isSuccess); 6077if(isSuccess){ 6078if(s.ifModified){ 6079modified=jqXHR.getResponseHeader("Last-Modified"); 6080if(modified){ 6081jQuery.lastModified[cacheURL]=modified; 6082} 6083modified=jqXHR.getResponseHeader("etag"); 6084if(modified){ 6085jQuery.etag[cacheURL]=modified; 6086} 6087} 6088if(status===204||s.type==="HEAD"){ 6089statusText="nocontent"; 6090}else if(status===304){ 6091statusText="notmodified"; 6092}else{ 6093statusText=response.state; 6094success=response.data; 6095error=response.error; 6096isSuccess=!error; 6097} 6098}else{ 6099error=statusText; 6100if(status||!statusText){ 6101statusText="error"; 6102if(status<0){ 6103status=0; 6104} 6105} 6106} 6107jqXHR.status=status; 6108jqXHR.statusText=(nativeStatusText||statusText)+""; 6109if(isSuccess){ 6110deferred.resolveWith(callbackContext,[success,statusText,jqXHR]); 6111}else{ 6112deferred.rejectWith(callbackContext,[jqXHR,statusText,error]); 6113} 6114jqXHR.statusCode(statusCode); 6115statusCode=undefined; 6116if(fireGlobals){ 6117globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError", 6118[jqXHR,s,isSuccess?success:error]); 6119} 6120completeDeferred.fireWith(callbackContext,[jqXHR,statusText]); 6121if(fireGlobals){ 6122globalEventContext.trigger("ajaxComplete",[jqXHR,s]); 6123if(!(--jQuery.active)){ 6124jQuery.event.trigger("ajaxStop"); 6125} 6126} 6127} 6128return jqXHR; 6129}, 6130getJSON:function(url,data,callback){ 6131return jQuery.get(url,data,callback,"json"); 6132}, 6133getScript:function(url,callback){ 6134return jQuery.get(url,undefined,callback,"script"); 6135} 6136}); 6137jQuery.each(["get","post"],function(_i,method){ 6138jQuery[method]=function(url,data,callback,type){ 6139if(isFunction(data)){ 6140type=type||callback; 6141callback=data; 6142data=undefined; 6143} 6144return jQuery.ajax(jQuery.extend({ 6145url:url, 6146type:method, 6147dataType:type, 6148data:data, 6149success:callback 6150},jQuery.isPlainObject(url)&&url)); 6151}; 6152}); 6153jQuery.ajaxPrefilter(function(s){ 6154var i; 6155for(i in s.headers){ 6156if(i.toLowerCase()==="content-type"){ 6157s.contentType=s.headers[i]||""; 6158} 6159} 6160}); 6161jQuery._evalUrl=function(url,options,doc){ 6162return jQuery.ajax({ 6163url:url, 6164type:"GET", 6165dataType:"script", 6166cache:true, 6167async:false, 6168global:false, 6169converters:{ 6170"text script":function(){} 6171}, 6172dataFilter:function(response){ 6173jQuery.globalEval(response,options,doc); 6174} 6175}); 6176}; 6177jQuery.fn.extend({ 6178wrapAll:function(html){ 6179var wrap; 6180if(this[0]){ 6181if(isFunction(html)){ 6182html=html.call(this[0]); 6183} 6184wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true); 6185if(this[0].parentNode){ 6186wrap.insertBefore(this[0]); 6187} 6188wrap.map(function(){ 6189var elem=this; 6190while(elem.firstElementChild){ 6191elem=elem.firstElementChild; 6192} 6193return elem; 6194}).append(this); 6195} 6196return this; 6197}, 6198wrapInner:function(html){ 6199if(isFunction(html)){ 6200return this.each(function(i){ 6201jQuery(this).wrapInner(html.call(this,i)); 6202}); 6203} 6204return this.each(function(){ 6205var self=jQuery(this), 6206contents=self.contents(); 6207if(contents.length){ 6208contents.wrapAll(html); 6209}else{ 6210self.append(html); 6211} 6212}); 6213}, 6214wrap:function(html){ 6215var htmlIsFunction=isFunction(html); 6216return this.each(function(i){ 6217jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html); 6218}); 6219}, 6220unwrap:function(selector){ 6221this.parent(selector).not("body").each(function(){ 6222jQuery(this).replaceWith(this.childNodes); 6223}); 6224return this; 6225} 6226}); 6227jQuery.expr.pseudos.hidden=function(elem){ 6228return!jQuery.expr.pseudos.visible(elem); 6229}; 6230jQuery.expr.pseudos.visible=function(elem){ 6231return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length); 6232}; 6233jQuery.ajaxSettings.xhr=function(){ 6234try{ 6235return new window.XMLHttpRequest(); 6236}catch(e){} 6237}; 6238var xhrSuccessStatus={ 62390:200, 62401223:204 6241}, 6242xhrSupported=jQuery.ajaxSettings.xhr(); 6243support.cors=!!xhrSupported&&("withCredentials"in xhrSupported); 6244support.ajax=xhrSupported=!!xhrSupported; 6245jQuery.ajaxTransport(function(options){ 6246var callback,errorCallback; 6247if(support.cors||xhrSupported&&!options.crossDomain){ 6248return{ 6249send:function(headers,complete){ 6250var i, 6251xhr=options.xhr(); 6252xhr.open( 6253options.type, 6254options.url, 6255options.async, 6256options.username, 6257options.password 6258); 6259if(options.xhrFields){ 6260for(i in options.xhrFields){ 6261xhr[i]=options.xhrFields[i]; 6262} 6263} 6264if(options.mimeType&&xhr.overrideMimeType){ 6265xhr.overrideMimeType(options.mimeType); 6266} 6267if(!options.crossDomain&&!headers["X-Requested-With"]){ 6268headers["X-Requested-With"]="XMLHttpRequest"; 6269} 6270for(i in headers){ 6271xhr.setRequestHeader(i,headers[i]); 6272} 6273callback=function(type){ 6274return function(){ 6275if(callback){ 6276callback=errorCallback=xhr.onload= 6277xhr.onerror=xhr.onabort=xhr.ontimeout= 6278xhr.onreadystatechange=null; 6279if(type==="abort"){ 6280xhr.abort(); 6281}else if(type==="error"){ 6282if(typeof xhr.status!=="number"){ 6283complete(0,"error"); 6284}else{ 6285complete( 6286xhr.status, 6287xhr.statusText 6288); 6289} 6290}else{ 6291complete( 6292xhrSuccessStatus[xhr.status]||xhr.status, 6293xhr.statusText, 6294(xhr.responseType||"text")!=="text"|| 6295typeof xhr.responseText!=="string"? 6296{binary:xhr.response}: 6297{text:xhr.responseText}, 6298xhr.getAllResponseHeaders() 6299); 6300} 6301} 6302}; 6303}; 6304xhr.onload=callback(); 6305errorCallback=xhr.onerror=xhr.ontimeout=callback("error"); 6306if(xhr.onabort!==undefined){ 6307xhr.onabort=errorCallback; 6308}else{ 6309xhr.onreadystatechange=function(){ 6310if(xhr.readyState===4){ 6311window.setTimeout(function(){ 6312if(callback){ 6313errorCallback(); 6314} 6315}); 6316} 6317}; 6318} 6319callback=callback("abort"); 6320try{ 6321xhr.send(options.hasContent&&options.data||null); 6322}catch(e){ 6323if(callback){ 6324throw e; 6325} 6326} 6327}, 6328abort:function(){ 6329if(callback){ 6330callback(); 6331} 6332} 6333}; 6334} 6335}); 6336jQuery.ajaxPrefilter(function(s){ 6337if(s.crossDomain){ 6338s.contents.script=false; 6339} 6340}); 6341jQuery.ajaxSetup({ 6342accepts:{ 6343script:"text/javascript, application/javascript, "+ 6344"application/ecmascript, application/x-ecmascript" 6345}, 6346contents:{ 6347script:/\b(?:java|ecma)script\b/ 6348}, 6349converters:{ 6350"text script":function(text){ 6351jQuery.globalEval(text); 6352return text; 6353} 6354} 6355}); 6356jQuery.ajaxPrefilter("script",function(s){ 6357if(s.cache===undefined){ 6358s.cache=false; 6359} 6360if(s.crossDomain){ 6361s.type="GET"; 6362} 6363}); 6364jQuery.ajaxTransport("script",function(s){ 6365if(s.crossDomain||s.scriptAttrs){ 6366var script,callback; 6367return{ 6368send:function(_,complete){ 6369script=jQuery("<script>") 6370.attr(s.scriptAttrs||{}) 6371.prop({charset:s.scriptCharset,src:s.url}) 6372.on("load error",callback=function(evt){ 6373script.remove(); 6374callback=null; 6375if(evt){ 6376complete(evt.type==="error"?404:200,evt.type); 6377} 6378}); 6379document.head.appendChild(script[0]); 6380}, 6381abort:function(){ 6382if(callback){ 6383callback(); 6384} 6385} 6386}; 6387} 6388}); 6389var oldCallbacks=[], 6390rjsonp=/(=)\?(?=&|$)|\?\?/; 6391jQuery.ajaxSetup({ 6392jsonp:"callback", 6393jsonpCallback:function(){ 6394var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce.guid++)); 6395this[callback]=true; 6396return callback; 6397} 6398}); 6399jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){ 6400var callbackName,overwritten,responseContainer, 6401jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)? 6402"url": 6403typeof s.data==="string"&& 6404(s.contentType||"") 6405.indexOf("application/x-www-form-urlencoded")===0&& 6406rjsonp.test(s.data)&&"data" 6407); 6408if(jsonProp||s.dataTypes[0]==="jsonp"){ 6409callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)? 6410s.jsonpCallback(): 6411s.jsonpCallback; 6412if(jsonProp){ 6413s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName); 6414}else if(s.jsonp!==false){ 6415s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName; 6416} 6417s.converters["script json"]=function(){ 6418if(!responseContainer){ 6419jQuery.error(callbackName+" was not called"); 6420} 6421return responseContainer[0]; 6422}; 6423s.dataTypes[0]="json"; 6424overwritten=window[callbackName]; 6425window[callbackName]=function(){ 6426responseContainer=arguments; 6427}; 6428jqXHR.always(function(){ 6429if(overwritten===undefined){ 6430jQuery(window).removeProp(callbackName); 6431}else{ 6432window[callbackName]=overwritten; 6433} 6434if(s[callbackName]){ 6435s.jsonpCallback=originalSettings.jsonpCallback; 6436oldCallbacks.push(callbackName); 6437} 6438if(responseContainer&&isFunction(overwritten)){ 6439overwritten(responseContainer[0]); 6440} 6441responseContainer=overwritten=undefined; 6442}); 6443return"script"; 6444} 6445}); 6446support.createHTMLDocument=(function(){ 6447var body=document.implementation.createHTMLDocument("").body; 6448body.innerHTML="<form></form><form></form>"; 6449return body.childNodes.length===2; 6450})(); 6451jQuery.parseHTML=function(data,context,keepScripts){ 6452if(typeof data!=="string"){ 6453return[]; 6454} 6455if(typeof context==="boolean"){ 6456keepScripts=context; 6457context=false; 6458} 6459var base,parsed,scripts; 6460if(!context){ 6461if(support.createHTMLDocument){ 6462context=document.implementation.createHTMLDocument(""); 6463base=context.createElement("base"); 6464base.href=document.location.href; 6465context.head.appendChild(base); 6466}else{ 6467context=document; 6468} 6469} 6470parsed=rsingleTag.exec(data); 6471scripts=!keepScripts&&[]; 6472if(parsed){ 6473return[context.createElement(parsed[1])]; 6474} 6475parsed=buildFragment([data],context,scripts); 6476if(scripts&&scripts.length){ 6477jQuery(scripts).remove(); 6478} 6479return jQuery.merge([],parsed.childNodes); 6480}; 6481jQuery.fn.load=function(url,params,callback){ 6482var selector,type,response, 6483self=this, 6484off=url.indexOf(" "); 6485if(off>-1){ 6486selector=stripAndCollapse(url.slice(off)); 6487url=url.slice(0,off); 6488} 6489if(isFunction(params)){ 6490callback=params; 6491params=undefined; 6492}else if(params&&typeof params==="object"){ 6493type="POST"; 6494} 6495if(self.length>0){ 6496jQuery.ajax({ 6497url:url, 6498type:type||"GET", 6499dataType:"html", 6500data:params 6501}).done(function(responseText){ 6502response=arguments; 6503self.html(selector? 6504jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector): 6505responseText); 6506}).always(callback&&function(jqXHR,status){ 6507self.each(function(){ 6508callback.apply(this,response||[jqXHR.responseText,status,jqXHR]); 6509}); 6510}); 6511} 6512return this; 6513}; 6514jQuery.expr.pseudos.animated=function(elem){ 6515return jQuery.grep(jQuery.timers,function(fn){ 6516return elem===fn.elem; 6517}).length; 6518}; 6519jQuery.offset={ 6520setOffset:function(elem,options,i){ 6521var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition, 6522position=jQuery.css(elem,"position"), 6523curElem=jQuery(elem), 6524props={}; 6525if(position==="static"){ 6526elem.style.position="relative"; 6527} 6528curOffset=curElem.offset(); 6529curCSSTop=jQuery.css(elem,"top"); 6530curCSSLeft=jQuery.css(elem,"left"); 6531calculatePosition=(position==="absolute"||position==="fixed")&& 6532(curCSSTop+curCSSLeft).indexOf("auto")>-1; 6533if(calculatePosition){ 6534curPosition=curElem.position(); 6535curTop=curPosition.top; 6536curLeft=curPosition.left; 6537}else{ 6538curTop=parseFloat(curCSSTop)||0; 6539curLeft=parseFloat(curCSSLeft)||0; 6540} 6541if(isFunction(options)){ 6542options=options.call(elem,i,jQuery.extend({},curOffset)); 6543} 6544if(options.top!=null){ 6545props.top=(options.top-curOffset.top)+curTop; 6546} 6547if(options.left!=null){ 6548props.left=(options.left-curOffset.left)+curLeft; 6549} 6550if("using"in options){ 6551options.using.call(elem,props); 6552}else{ 6553curElem.css(props); 6554} 6555} 6556}; 6557jQuery.fn.extend({ 6558offset:function(options){ 6559if(arguments.length){ 6560return options===undefined? 6561this: 6562this.each(function(i){ 6563jQuery.offset.setOffset(this,options,i); 6564}); 6565} 6566var rect,win, 6567elem=this[0]; 6568if(!elem){ 6569return; 6570} 6571if(!elem.getClientRects().length){ 6572return{top:0,left:0}; 6573} 6574rect=elem.getBoundingClientRect(); 6575win=elem.ownerDocument.defaultView; 6576return{ 6577top:rect.top+win.pageYOffset, 6578left:rect.left+win.pageXOffset 6579}; 6580}, 6581position:function(){ 6582if(!this[0]){ 6583return; 6584} 6585var offsetParent,offset,doc, 6586elem=this[0], 6587parentOffset={top:0,left:0}; 6588if(jQuery.css(elem,"position")==="fixed"){ 6589offset=elem.getBoundingClientRect(); 6590}else{ 6591offset=this.offset(); 6592doc=elem.ownerDocument; 6593offsetParent=elem.offsetParent||doc.documentElement; 6594while(offsetParent&& 6595(offsetParent===doc.body||offsetParent===doc.documentElement)&& 6596jQuery.css(offsetParent,"position")==="static"){ 6597offsetParent=offsetParent.parentNode; 6598} 6599if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){ 6600parentOffset=jQuery(offsetParent).offset(); 6601parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true); 6602parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true); 6603} 6604} 6605return{ 6606top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true), 6607left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true) 6608}; 6609}, 6610offsetParent:function(){ 6611return this.map(function(){ 6612var offsetParent=this.offsetParent; 6613while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){ 6614offsetParent=offsetParent.offsetParent; 6615} 6616return offsetParent||documentElement; 6617}); 6618} 6619}); 6620jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){ 6621var top="pageYOffset"===prop; 6622jQuery.fn[method]=function(val){ 6623return access(this,function(elem,method,val){ 6624var win; 6625if(isWindow(elem)){ 6626win=elem; 6627}else if(elem.nodeType===9){ 6628win=elem.defaultView; 6629} 6630if(val===undefined){ 6631return win?win[prop]:elem[method]; 6632} 6633if(win){ 6634win.scrollTo( 6635!top?val:win.pageXOffset, 6636top?val:win.pageYOffset 6637); 6638}else{ 6639elem[method]=val; 6640} 6641},method,val,arguments.length); 6642}; 6643});
6644jQuery.each(["top","left"],function(_i,prop){ 6645jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition, 6646function(elem,computed){ 6647if(computed){ 6648computed=curCSS(elem,prop); 6649return rnumnonpx.test(computed)? 6650jQuery(elem).position()[prop]+"px": 6651computed; 6652} 6653} 6654); 6655}); 6656jQuery.each({Height:"height",Width:"width"},function(name,type){ 6657jQuery.each({ 6658padding:"inner"+name, 6659content:type, 6660"":"outer"+name 6661},function(defaultExtra,funcName){ 6662jQuery.fn[funcName]=function(margin,value){ 6663var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"), 6664extra=defaultExtra||(margin===true||value===true?"margin":"border"); 6665return access(this,function(elem,type,value){ 6666var doc; 6667if(isWindow(elem)){ 6668return funcName.indexOf("outer")===0? 6669elem["inner"+name]: 6670elem.document.documentElement["client"+name]; 6671} 6672if(elem.nodeType===9){ 6673doc=elem.documentElement; 6674return Math.max( 6675elem.body["scroll"+name],doc["scroll"+name], 6676elem.body["offset"+name],doc["offset"+name], 6677doc["client"+name] 6678); 6679} 6680return value===undefined? 6681jQuery.css(elem,type,extra): 6682jQuery.style(elem,type,value,extra); 6683},type,chainable?margin:undefined,chainable); 6684}; 6685}); 6686}); 6687jQuery.each([ 6688"ajaxStart", 6689"ajaxStop", 6690"ajaxComplete", 6691"ajaxError", 6692"ajaxSuccess", 6693"ajaxSend" 6694],function(_i,type){ 6695jQuery.fn[type]=function(fn){ 6696return this.on(type,fn); 6697}; 6698}); 6699jQuery.fn.extend({ 6700bind:function(types,data,fn){ 6701return this.on(types,null,data,fn); 6702}, 6703unbind:function(types,fn){ 6704return this.off(types,null,fn); 6705}, 6706delegate:function(selector,types,data,fn){ 6707return this.on(types,selector,data,fn); 6708}, 6709undelegate:function(selector,types,fn){ 6710return arguments.length===1? 6711this.off(selector,"**"): 6712this.off(types,selector||"**",fn); 6713}, 6714hover:function(fnOver,fnOut){ 6715return this 6716.on("mouseenter",fnOver) 6717.on("mouseleave",fnOut||fnOver); 6718} 6719}); 6720jQuery.each( 6721("blur focus focusin focusout resize scroll click dblclick "+ 6722"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+ 6723"change select submit keydown keypress keyup contextmenu").split(" "), 6724function(_i,name){ 6725jQuery.fn[name]=function(data,fn){ 6726return arguments.length>0? 6727this.on(name,null,data,fn): 6728this.trigger(name); 6729}; 6730} 6731); 6732var rtrim=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g; 6733jQuery.proxy=function(fn,context){ 6734var tmp,args,proxy; 6735if(typeof context==="string"){ 6736tmp=fn[context]; 6737context=fn; 6738fn=tmp; 6739} 6740if(!isFunction(fn)){ 6741return undefined; 6742} 6743args=slice.call(arguments,2); 6744proxy=function(){ 6745return fn.apply(context||this,args.concat(slice.call(arguments))); 6746}; 6747proxy.guid=fn.guid=fn.guid||jQuery.guid++; 6748return proxy; 6749}; 6750jQuery.holdReady=function(hold){ 6751if(hold){ 6752jQuery.readyWait++; 6753}else{ 6754jQuery.ready(true); 6755} 6756}; 6757jQuery.isArray=Array.isArray; 6758jQuery.parseJSON=JSON.parse; 6759jQuery.nodeName=nodeName; 6760jQuery.isFunction=isFunction; 6761jQuery.isWindow=isWindow; 6762jQuery.camelCase=camelCase; 6763jQuery.type=toType; 6764jQuery.now=Date.now; 6765jQuery.isNumeric=function(obj){ 6766var type=jQuery.type(obj); 6767return(type==="number"||type==="string")&& 6768!isNaN(obj-parseFloat(obj)); 6769}; 6770jQuery.trim=function(text){ 6771return text==null? 6772"": 6773(text+"").replace(rtrim,"$1"); 6774}; 6775if(typeof define==="function"&&define.amd){ 6776define("jquery",[],function(){ 6777return jQuery; 6778}); 6779} 6780var 6781_jQuery=window.jQuery, 6782_$=window.$; 6783jQuery.noConflict=function(deep){ 6784if(window.$===jQuery){ 6785window.$=_$; 6786} 6787if(deep&&window.jQuery===jQuery){ 6788window.jQuery=_jQuery; 6789} 6790return jQuery; 6791}; 6792if(typeof noGlobal==="undefined"){ 6793window.jQuery=window.$=jQuery; 6794} 6795return jQuery; 6796}); 6797 6798 6799/* prive/javascript/jquery.form.js?1790181870 */ 6800 6801(function(factory){ 6802if(typeof define==='function'&&define.amd){ 6803define(['jquery'],factory); 6804}else if(typeof module==='object'&&module.exports){ 6805module.exports=function(root,jQuery){ 6806if(typeof jQuery==='undefined'){ 6807if(typeof window!=='undefined'){ 6808jQuery=require('jquery'); 6809} 6810else{ 6811jQuery=require('jquery')(root); 6812} 6813} 6814factory(jQuery); 6815return jQuery; 6816}; 6817}else{ 6818factory(jQuery); 6819} 6820}(function($){ 6821'use strict'; 6822var rCRLF=/\r?\n/g; 6823var feature={}; 6824feature.fileapi=$('<input type="file">').get(0).files!==undefined; 6825feature.formdata=(typeof window.FormData!=='undefined'); 6826var hasProp=!!$.fn.prop; 6827$.fn.attr2=function(){ 6828if(!hasProp){ 6829return this.attr.apply(this,arguments); 6830} 6831var val=this.prop.apply(this,arguments); 6832if((val&&val.jquery)||typeof val==='string'){ 6833return val; 6834} 6835return this.attr.apply(this,arguments); 6836}; 6837$.fn.ajaxSubmit=function(options,data,dataType,onSuccess){ 6838if(!this.length){
6839log('ajaxSubmit: skipping submit process - no element selected'); 6840return this; 6841} 6842var method,action,url,isMsie,iframeSrc,$form=this; 6843if(typeof options==='function'){ 6844options={success:options}; 6845}else if(typeof options==='string'||(options===false&&arguments.length>0)){ 6846options={ 6847'url':options, 6848'data':data, 6849'dataType':dataType 6850}; 6851if(typeof onSuccess==='function'){ 6852options.success=onSuccess; 6853} 6854}else if(typeof options==='undefined'){ 6855options={}; 6856} 6857method=options.method||options.type||this.attr2('method'); 6858action=options.url||this.attr2('action'); 6859url=(typeof action==='string')?$.trim(action):''; 6860url=url||window.location.href||''; 6861if(url){ 6862url=(url.match(/^([^#]+)/)||[])[1]; 6863} 6864isMsie=/(MSIE|Trident)/.test(navigator.userAgent||''); 6865iframeSrc=(isMsie&&/^https/i.test(window.location.href||''))?'javascript:false':'about:blank'; 6866options=$.extend(true,{ 6867url:url, 6868success:$.ajaxSettings.success, 6869type:method||$.ajaxSettings.type, 6870iframeSrc:iframeSrc 6871},options); 6872var veto={}; 6873this.trigger('form-pre-serialize',[this,options,veto]); 6874if(veto.veto){ 6875log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); 6876return this; 6877} 6878if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){ 6879log('ajaxSubmit: submit aborted via beforeSerialize callback'); 6880return this; 6881} 6882var traditional=options.traditional; 6883if(typeof traditional==='undefined'){ 6884traditional=$.ajaxSettings.traditional; 6885} 6886var elements=[]; 6887var qx,a=this.formToArray(options.semantic,elements,options.filtering); 6888if(options.data){ 6889var optionsData=$.isFunction(options.data)?options.data(a):options.data; 6890options.extraData=optionsData; 6891qx=$.param(optionsData,traditional); 6892} 6893if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){ 6894log('ajaxSubmit: submit aborted via beforeSubmit callback'); 6895return this; 6896} 6897this.trigger('form-submit-validate',[a,this,options,veto]); 6898if(veto.veto){ 6899log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); 6900return this; 6901} 6902var q=$.param(a,traditional); 6903if(qx){ 6904q=(q?(q+'&'+qx):qx); 6905} 6906if(options.type.toUpperCase()==='GET'){ 6907options.url+=(options.url.indexOf('?')>=0?'&':'?')+q; 6908options.data=null; 6909}else{ 6910options.data=q; 6911} 6912var callbacks=[]; 6913if(options.resetForm){ 6914callbacks.push(function(){ 6915$form.resetForm(); 6916}); 6917} 6918if(options.clearForm){ 6919callbacks.push(function(){ 6920$form.clearForm(options.includeHidden); 6921}); 6922} 6923if(!options.dataType&&options.target){ 6924var oldSuccess=options.success||function(){}; 6925callbacks.push(function(data,textStatus,jqXHR){ 6926var successArguments=arguments, 6927fn=options.replaceTarget?'replaceWith':'html'; 6928if(fn=='html'){ 6929data=$.parseHTML($("<div>").text(data).html()) 6930}; 6931$(options.target)[fn](data).each(function(){ 6932oldSuccess.apply(this,successArguments); 6933}); 6934}); 6935}else if(options.success){ 6936if($.isArray(options.success)){ 6937$.merge(callbacks,options.success); 6938}else{ 6939callbacks.push(options.success); 6940} 6941} 6942options.success=function(data,status,xhr){ 6943var context=options.context||this; 6944for(var i=0,max=callbacks.length;i<max;i++){ 6945callbacks[i].apply(context,[data,status,xhr||$form,$form]); 6946} 6947}; 6948if(options.error){ 6949var oldError=options.error; 6950options.error=function(xhr,status,error){ 6951var context=options.context||this; 6952oldError.apply(context,[xhr,status,error,$form]); 6953}; 6954} 6955if(options.complete){ 6956var oldComplete=options.complete; 6957options.complete=function(xhr,status){ 6958var context=options.context||this; 6959oldComplete.apply(context,[xhr,status,$form]); 6960}; 6961} 6962var fileInputs=$('input[type=file]:enabled',this).filter(function(){ 6963return $(this).val()!==''; 6964}); 6965var hasFileInputs=fileInputs.length>0; 6966var mp='multipart/form-data'; 6967var multipart=($form.attr('enctype')===mp||$form.attr('encoding')===mp); 6968var fileAPI=feature.fileapi&&feature.formdata; 6969log('fileAPI :'+fileAPI); 6970var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI; 6971var jqxhr; 6972if(options.iframe!==false&&(options.iframe||shouldUseFrame)){ 6973if(options.closeKeepAlive){ 6974$.get(options.closeKeepAlive,function(){ 6975jqxhr=fileUploadIframe(a); 6976}); 6977}else{ 6978jqxhr=fileUploadIframe(a); 6979} 6980}else if((hasFileInputs||multipart)&&fileAPI){ 6981jqxhr=fileUploadXhr(a); 6982}else{ 6983jqxhr=$.ajax(options); 6984} 6985$form.removeData('jqxhr').data('jqxhr',jqxhr); 6986for(var k=0;k<elements.length;k++){ 6987elements[k]=null; 6988} 6989this.trigger('form-submit-notify',[this,options]); 6990return this; 6991function deepSerialize(extraData){ 6992var serialized=$.param(extraData,options.traditional).split('&'); 6993var len=serialized.length; 6994var result=[]; 6995var i,part; 6996for(i=0;i<len;i++){ 6997serialized[i]=serialized[i].replace(/\+/g,' '); 6998part=serialized[i].split('='); 6999result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]); 7000} 7001return result; 7002} 7003function fileUploadXhr(a){ 7004var formdata=new FormData(); 7005for(var i=0;i<a.length;i++){ 7006formdata.append(a[i].name,a[i].value); 7007} 7008if(options.extraData){ 7009var serializedData=deepSerialize(options.extraData); 7010for(i=0;i<serializedData.length;i++){ 7011if(serializedData[i]){ 7012formdata.append(serializedData[i][0],serializedData[i][1]); 7013} 7014} 7015} 7016options.data=null; 7017var s=$.extend(true,{},$.ajaxSettings,options,{ 7018contentType:false, 7019processData:false, 7020cache:false, 7021type:method||'POST' 7022}); 7023if(options.uploadProgress){ 7024s.xhr=function(){ 7025var xhr=$.ajaxSettings.xhr(); 7026if(xhr.upload){ 7027xhr.upload.addEventListener('progress',function(event){ 7028var percent=0; 7029var position=event.loaded||event.position; 7030var total=event.total; 7031if(event.lengthComputable){ 7032percent=Math.ceil(position/total*100); 7033} 7034options.uploadProgress(event,position,total,percent); 7035},false); 7036} 7037return xhr; 7038}; 7039} 7040s.data=null; 7041var beforeSend=s.beforeSend; 7042s.beforeSend=function(xhr,o){ 7043if(options.formData){ 7044o.data=options.formData; 7045}else{ 7046o.data=formdata; 7047} 7048if(beforeSend){
7049beforeSend.call(this,xhr,o); 7050} 7051}; 7052return $.ajax(s); 7053} 7054function fileUploadIframe(a){ 7055var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle; 7056var deferred=$.Deferred(); 7057deferred.abort=function(status){ 7058xhr.abort(status); 7059}; 7060if(a){ 7061for(i=0;i<elements.length;i++){ 7062el=$(elements[i]); 7063if(hasProp){ 7064el.prop('disabled',false); 7065}else{ 7066el.removeAttr('disabled'); 7067} 7068} 7069} 7070s=$.extend(true,{},$.ajaxSettings,options); 7071s.context=s.context||s; 7072id='jqFormIO'+new Date().getTime(); 7073var ownerDocument=form.ownerDocument; 7074var $body=$form.closest('body'); 7075if(s.iframeTarget){ 7076$io=$(s.iframeTarget,ownerDocument); 7077n=$io.attr2('name'); 7078if(!n){ 7079$io.attr2('name',id); 7080}else{ 7081id=n; 7082} 7083}else{ 7084$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'">',ownerDocument); 7085$io.css({position:'absolute',top:'-1000px',left:'-1000px'}); 7086} 7087io=$io[0]; 7088xhr={ 7089aborted:0, 7090responseText:null, 7091responseXML:null, 7092status:0, 7093statusText:'n/a', 7094getAllResponseHeaders:function(){}, 7095getResponseHeader:function(){}, 7096setRequestHeader:function(){}, 7097abort:function(status){ 7098var e=(status==='timeout'?'timeout':'aborted'); 7099log('aborting upload... '+e); 7100this.aborted=1; 7101try{ 7102if(io.contentWindow.document.execCommand){ 7103io.contentWindow.document.execCommand('Stop'); 7104} 7105}catch(ignore){} 7106$io.attr('src',s.iframeSrc); 7107xhr.error=e; 7108if(s.error){ 7109s.error.call(s.context,xhr,e,status); 7110} 7111if(g){ 7112$.event.trigger('ajaxError',[xhr,s,e]); 7113} 7114if(s.complete){ 7115s.complete.call(s.context,xhr,e); 7116} 7117} 7118}; 7119g=s.global; 7120if(g&&$.active++===0){ 7121$.event.trigger('ajaxStart'); 7122} 7123if(g){ 7124$.event.trigger('ajaxSend',[xhr,s]); 7125} 7126if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){ 7127if(s.global){ 7128$.active--; 7129} 7130deferred.reject(); 7131return deferred; 7132} 7133if(xhr.aborted){ 7134deferred.reject(); 7135return deferred; 7136} 7137sub=form.clk; 7138if(sub){ 7139n=sub.name; 7140if(n&&!sub.disabled){ 7141s.extraData=s.extraData||{}; 7142s.extraData[n]=sub.value; 7143if(sub.type==='image'){ 7144s.extraData[n+'.x']=form.clk_x; 7145s.extraData[n+'.y']=form.clk_y; 7146} 7147} 7148} 7149var CLIENT_TIMEOUT_ABORT=1; 7150var SERVER_ABORT=2; 7151function getDoc(frame){ 7152var doc=null; 7153try{ 7154if(frame.contentWindow){ 7155doc=frame.contentWindow.document; 7156} 7157}catch(err){ 7158log('cannot get iframe.contentWindow document: '+err); 7159} 7160if(doc){ 7161return doc; 7162} 7163try{ 7164doc=frame.contentDocument?frame.contentDocument:frame.document; 7165}catch(err){ 7166log('cannot get iframe.contentDocument: '+err); 7167doc=frame.document; 7168} 7169return doc; 7170} 7171var csrf_token=$('meta[name=csrf-token]').attr('content'); 7172var csrf_param=$('meta[name=csrf-param]').attr('content'); 7173if(csrf_param&&csrf_token){ 7174s.extraData=s.extraData||{}; 7175s.extraData[csrf_param]=csrf_token; 7176} 7177function doSubmit(){ 7178var t=$form.attr2('target'), 7179a=$form.attr2('action'), 7180mp='multipart/form-data', 7181et=$form.attr('enctype')||$form.attr('encoding')||mp; 7182form.setAttribute('target',id); 7183if(!method||/post/i.test(method)){ 7184form.setAttribute('method','POST'); 7185} 7186if(a!==s.url){ 7187form.setAttribute('action',s.url); 7188} 7189if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){ 7190$form.attr({ 7191encoding:'multipart/form-data', 7192enctype:'multipart/form-data' 7193}); 7194} 7195if(s.timeout){ 7196timeoutHandle=setTimeout(function(){ 7197timedOut=true;cb(CLIENT_TIMEOUT_ABORT); 7198},s.timeout); 7199} 7200function checkState(){ 7201try{ 7202var state=getDoc(io).readyState; 7203log('state = '+state); 7204if(state&&state.toLowerCase()==='uninitialized'){ 7205setTimeout(checkState,50); 7206} 7207}catch(e){ 7208log('Server abort: ',e,' (',e.name,')'); 7209cb(SERVER_ABORT); 7210if(timeoutHandle){ 7211clearTimeout(timeoutHandle); 7212} 7213timeoutHandle=undefined; 7214} 7215} 7216var extraInputs=[]; 7217try{ 7218if(s.extraData){ 7219for(var n in s.extraData){ 7220if(s.extraData.hasOwnProperty(n)){ 7221if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){ 7222extraInputs.push( 7223$('<input type="hidden" name="'+s.extraData[n].name+'">',ownerDocument).val(s.extraData[n].value) 7224.appendTo(form)[0]); 7225}else{ 7226extraInputs.push( 7227$('<input type="hidden" name="'+n+'">',ownerDocument).val(s.extraData[n]) 7228.appendTo(form)[0]); 7229} 7230} 7231} 7232} 7233if(!s.iframeTarget){ 7234$io.appendTo($body); 7235} 7236if(io.attachEvent){ 7237io.attachEvent('onload',cb); 7238}else{ 7239io.addEventListener('load',cb,false); 7240} 7241setTimeout(checkState,15); 7242try{ 7243form.submit(); 7244}catch(err){ 7245var submitFn=document.createElement('form').submit; 7246submitFn.apply(form); 7247} 7248}finally{ 7249form.setAttribute('action',a); 7250form.setAttribute('enctype',et); 7251if(t){ 7252form.setAttribute('target',t); 7253}else{ 7254$form.removeAttr('target'); 7255} 7256$(extraInputs).remove(); 7257} 7258} 7259if(s.forceSync){ 7260doSubmit(); 7261}else{ 7262setTimeout(doSubmit,10); 7263} 7264var data,doc,domCheckCount=50,callbackProcessed; 7265function cb(e){ 7266if(xhr.aborted||callbackProcessed){ 7267return; 7268} 7269doc=getDoc(io); 7270if(!doc){ 7271log('cannot access response document'); 7272e=SERVER_ABORT; 7273} 7274if(e===CLIENT_TIMEOUT_ABORT&&xhr){ 7275xhr.abort('timeout'); 7276deferred.reject(xhr,'timeout'); 7277return; 7278} 7279if(e===SERVER_ABORT&&xhr){ 7280xhr.abort('server abort'); 7281deferred.reject(xhr,'error','server abort'); 7282return; 7283} 7284if(!doc||doc.location.href===s.iframeSrc){ 7285if(!timedOut){ 7286return; 7287} 7288} 7289if(io.detachEvent){ 7290io.detachEvent('onload',cb); 7291}else{ 7292io.removeEventListener('load',cb,false); 7293} 7294var status='success',errMsg; 7295try{ 7296if(timedOut){ 7297throw'timeout'; 7298} 7299var isXml=s.dataType==='xml'||doc.XMLDocument||$.isXMLDoc(doc); 7300log('isXml='+isXml); 7301if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){ 7302if(--domCheckCount){ 7303log('requeing onLoad callback, DOM not available'); 7304setTimeout(cb,250); 7305return; 7306} 7307} 7308var docRoot=doc.body?doc.body:doc.documentElement; 7309xhr.responseText=docRoot?docRoot.innerHTML:null; 7310xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc; 7311if(isXml){ 7312s.dataType='xml'; 7313} 7314xhr.getResponseHeader=function(header){ 7315var headers={'content-type':s.dataType}; 7316return headers[header.toLowerCase()]; 7317}; 7318if(docRoot){ 7319xhr.status=Number(docRoot.getAttribute('status'))||xhr.status; 7320xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText; 7321} 7322var dt=(s.dataType||'').toLowerCase(); 7323var scr=/(json|script|text)/.test(dt); 7324if(scr||s.textarea){ 7325var ta=doc.getElementsByTagName('textarea')[0]; 7326if(ta){ 7327xhr.responseText=ta.value; 7328xhr.status=Number(ta.getAttribute('status'))||xhr.status; 7329xhr.statusText=ta.getAttribute('statusText')||xhr.statusText; 7330}else if(scr){ 7331var pre=doc.getElementsByTagName('pre')[0]; 7332var b=doc.getElementsByTagName('body')[0]; 7333if(pre){ 7334xhr.responseText=pre.textContent?pre.textContent:pre.innerText; 7335}else if(b){ 7336xhr.responseText=b.textContent?b.textContent:b.innerText; 7337} 7338} 7339}else if(dt==='xml'&&!xhr.responseXML&&xhr.responseText){ 7340xhr.responseXML=toXml(xhr.responseText); 7341} 7342try{ 7343data=httpData(xhr,dt,s); 7344}catch(err){ 7345status='parsererror'; 7346xhr.error=errMsg=(err||status); 7347} 7348}catch(err){ 7349log('error caught: ',err); 7350status='error'; 7351xhr.error=errMsg=(err||status); 7352} 7353if(xhr.aborted){ 7354log('upload aborted'); 7355status=null; 7356} 7357if(xhr.status){ 7358status=((xhr.status>=200&&xhr.status<300)||xhr.status===304)?'success':'error'; 7359} 7360if(status==='success'){ 7361if(s.success){ 7362s.success.call(s.context,data,'success',xhr); 7363} 7364deferred.resolve(xhr.responseText,'success',xhr); 7365if(g){
7366$.event.trigger('ajaxSuccess',[xhr,s]); 7367} 7368}else if(status){ 7369if(typeof errMsg==='undefined'){ 7370errMsg=xhr.statusText; 7371} 7372if(s.error){ 7373s.error.call(s.context,xhr,status,errMsg); 7374} 7375deferred.reject(xhr,'error',errMsg); 7376if(g){ 7377$.event.trigger('ajaxError',[xhr,s,errMsg]); 7378} 7379} 7380if(g){ 7381$.event.trigger('ajaxComplete',[xhr,s]); 7382} 7383if(g&&!--$.active){ 7384$.event.trigger('ajaxStop'); 7385} 7386if(s.complete){ 7387s.complete.call(s.context,xhr,status); 7388} 7389callbackProcessed=true; 7390if(s.timeout){ 7391clearTimeout(timeoutHandle); 7392} 7393setTimeout(function(){ 7394if(!s.iframeTarget){ 7395$io.remove(); 7396}else{ 7397$io.attr('src',s.iframeSrc); 7398} 7399xhr.responseXML=null; 7400},100); 7401} 7402var toXml=$.parseXML||function(s,doc){ 7403if(window.ActiveXObject){ 7404doc=new ActiveXObject('Microsoft.XMLDOM'); 7405doc.async='false'; 7406doc.loadXML(s); 7407}else{ 7408doc=(new DOMParser()).parseFromString(s,'text/xml'); 7409} 7410return(doc&&doc.documentElement&&doc.documentElement.nodeName!=='parsererror')?doc:null; 7411}; 7412var parseJSON=$.parseJSON||function(s){ 7413window.console.error('jquery.parseJSON is undefined'); 7414return null; 7415}; 7416var httpData=function(xhr,type,s){ 7417var ct=xhr.getResponseHeader('content-type')||'', 7418xml=((type==='xml'||!type)&&ct.indexOf('xml')>=0), 7419data=xml?xhr.responseXML:xhr.responseText; 7420if(xml&&data.documentElement.nodeName==='parsererror'){ 7421if($.error){ 7422$.error('parsererror'); 7423} 7424} 7425if(s&&s.dataFilter){ 7426data=s.dataFilter(data,type); 7427} 7428if(typeof data==='string'){ 7429if((type==='json'||!type)&&ct.indexOf('json')>=0){ 7430data=parseJSON(data); 7431}else if((type==='script'||!type)&&ct.indexOf('javascript')>=0){ 7432$.globalEval(data); 7433} 7434} 7435return data; 7436}; 7437return deferred; 7438} 7439}; 7440$.fn.ajaxForm=function(options,data,dataType,onSuccess){ 7441if(typeof options==='string'||(options===false&&arguments.length>0)){ 7442options={ 7443'url':options, 7444'data':data, 7445'dataType':dataType 7446}; 7447if(typeof onSuccess==='function'){ 7448options.success=onSuccess; 7449} 7450} 7451options=options||{}; 7452options.delegation=options.delegation&&$.isFunction($.fn.on); 7453if(!options.delegation&&this.length===0){ 7454var o={s:this.selector,c:this.context}; 7455if(!$.isReady&&o.s){ 7456log('DOM not ready, queuing ajaxForm'); 7457$(function(){ 7458$(o.s,o.c).ajaxForm(options); 7459}); 7460return this; 7461} 7462log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)')); 7463return this; 7464} 7465if(options.delegation){ 7466$(document) 7467.off('submit.form-plugin',this.selector,doAjaxSubmit) 7468.off('click.form-plugin',this.selector,captureSubmittingElement) 7469.on('submit.form-plugin',this.selector,options,doAjaxSubmit) 7470.on('click.form-plugin',this.selector,options,captureSubmittingElement); 7471return this; 7472} 7473if(options.beforeFormUnbind){ 7474options.beforeFormUnbind(this,options); 7475} 7476return this.ajaxFormUnbind() 7477.on('submit.form-plugin',options,doAjaxSubmit) 7478.on('click.form-plugin',options,captureSubmittingElement); 7479}; 7480function doAjaxSubmit(e){ 7481var options=e.data; 7482if(!e.isDefaultPrevented()){ 7483e.preventDefault(); 7484$(e.target).closest('form').ajaxSubmit(options); 7485} 7486} 7487function captureSubmittingElement(e){ 7488var target=e.target; 7489var $el=$(target); 7490if(!$el.is('[type=submit],[type=image]')){ 7491var t=$el.closest('[type=submit]'); 7492if(t.length===0){ 7493return; 7494} 7495target=t[0]; 7496} 7497var form=target.form; 7498form.clk=target; 7499if(target.type==='image'){ 7500if(typeof e.offsetX!=='undefined'){ 7501form.clk_x=e.offsetX; 7502form.clk_y=e.offsetY; 7503}else if(typeof $.fn.offset==='function'){ 7504var offset=$el.offset(); 7505form.clk_x=e.pageX-offset.left; 7506form.clk_y=e.pageY-offset.top; 7507}else{ 7508form.clk_x=e.pageX-target.offsetLeft; 7509form.clk_y=e.pageY-target.offsetTop; 7510} 7511} 7512setTimeout(function(){ 7513form.clk=form.clk_x=form.clk_y=null; 7514},100); 7515} 7516$.fn.ajaxFormUnbind=function(){ 7517return this.off('submit.form-plugin click.form-plugin'); 7518}; 7519$.fn.formToArray=function(semantic,elements,filtering){ 7520var a=[]; 7521if(this.length===0){ 7522return a; 7523} 7524var form=this[0]; 7525var formId=this.attr('id'); 7526var els=(semantic||typeof form.elements==='undefined')?form.getElementsByTagName('*'):form.elements; 7527var els2; 7528if(els){ 7529els=$.makeArray(els); 7530} 7531if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){ 7532els2=$(':input[form="'+formId+'"]').get(); 7533if(els2.length){ 7534els=(els||[]).concat(els2); 7535} 7536} 7537if(!els||!els.length){ 7538return a; 7539}
7540if($.isFunction(filtering)){ 7541els=$.map(els,filtering); 7542} 7543var i,j,n,v,el,max,jmax; 7544for(i=0,max=els.length;i<max;i++){ 7545el=els[i]; 7546n=el.name; 7547if(!n||el.disabled){ 7548continue; 7549} 7550if(semantic&&form.clk&&el.type==='image'){ 7551if(form.clk===el){ 7552a.push({name:n,value:$(el).val(),type:el.type}); 7553a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y}); 7554} 7555continue; 7556} 7557v=$.fieldValue(el,true); 7558if(v&&v.constructor===Array){ 7559if(elements){ 7560elements.push(el); 7561} 7562for(j=0,jmax=v.length;j<jmax;j++){ 7563a.push({name:n,value:v[j]}); 7564} 7565}else if(feature.fileapi&&el.type==='file'){ 7566if(elements){ 7567elements.push(el); 7568} 7569var files=el.files; 7570if(files.length){ 7571for(j=0;j<files.length;j++){ 7572a.push({name:n,value:files[j],type:el.type}); 7573} 7574}else{ 7575a.push({name:n,value:'',type:el.type}); 7576} 7577}else if(v!==null&&typeof v!=='undefined'){ 7578if(elements){ 7579elements.push(el); 7580} 7581a.push({name:n,value:v,type:el.type,required:el.required}); 7582} 7583} 7584if(!semantic&&form.clk){ 7585var $input=$(form.clk),input=$input[0]; 7586n=input.name; 7587if(n&&!input.disabled&&input.type==='image'){ 7588a.push({name:n,value:$input.val()}); 7589a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y}); 7590} 7591} 7592return a; 7593}; 7594$.fn.formSerialize=function(semantic){ 7595return $.param(this.formToArray(semantic)); 7596}; 7597$.fn.fieldSerialize=function(successful){ 7598var a=[]; 7599this.each(function(){ 7600var n=this.name; 7601if(!n){ 7602return; 7603} 7604var v=$.fieldValue(this,successful); 7605if(v&&v.constructor===Array){ 7606for(var i=0,max=v.length;i<max;i++){ 7607a.push({name:n,value:v[i]}); 7608} 7609}else if(v!==null&&typeof v!=='undefined'){ 7610a.push({name:this.name,value:v}); 7611} 7612}); 7613return $.param(a); 7614}; 7615$.fn.fieldValue=function(successful){ 7616for(var val=[],i=0,max=this.length;i<max;i++){ 7617var el=this[i]; 7618var v=$.fieldValue(el,successful); 7619if(v===null||typeof v==='undefined'||(v.constructor===Array&&!v.length)){ 7620continue; 7621} 7622if(v.constructor===Array){ 7623$.merge(val,v); 7624}else{ 7625val.push(v); 7626} 7627} 7628return val; 7629}; 7630$.fieldValue=function(el,successful){ 7631var n=el.name,t=el.type,tag=el.tagName.toLowerCase(); 7632if(typeof successful==='undefined'){ 7633successful=true; 7634} 7635if(successful&&(!n||el.disabled||t==='reset'||t==='button'|| 7636(t==='checkbox'||t==='radio')&&!el.checked|| 7637(t==='submit'||t==='image')&&el.form&&el.form.clk!==el|| 7638tag==='select'&&el.selectedIndex===-1)){ 7639return null; 7640} 7641if(tag==='select'){ 7642var index=el.selectedIndex; 7643if(index<0){ 7644return null; 7645} 7646var a=[],ops=el.options; 7647var one=(t==='select-one'); 7648var max=(one?index+1:ops.length); 7649for(var i=(one?index:0);i<max;i++){ 7650var op=ops[i]; 7651if(op.selected&&!op.disabled){ 7652var v=op.value; 7653if(!v){ 7654v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value; 7655} 7656if(one){ 7657return v; 7658} 7659a.push(v); 7660} 7661} 7662return a; 7663} 7664return $(el).val().replace(rCRLF,'\r\n'); 7665}; 7666$.fn.clearForm=function(includeHidden){ 7667return this.each(function(){ 7668$('input,select,textarea',this).clearFields(includeHidden); 7669}); 7670}; 7671$.fn.clearFields=$.fn.clearInputs=function(includeHidden){ 7672var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; 7673return this.each(function(){ 7674var t=this.type,tag=this.tagName.toLowerCase(); 7675if(re.test(t)||tag==='textarea'){ 7676this.value=''; 7677}else if(t==='checkbox'||t==='radio'){ 7678this.checked=false; 7679}else if(tag==='select'){ 7680this.selectedIndex=-1; 7681}else if(t==='file'){ 7682if(/MSIE/.test(navigator.userAgent)){ 7683$(this).replaceWith($(this).clone(true)); 7684}else{ 7685$(this).val(''); 7686} 7687}else if(includeHidden){ 7688if((includeHidden===true&&/hidden/.test(t))|| 7689(typeof includeHidden==='string'&&$(this).is(includeHidden))){ 7690this.value=''; 7691} 7692} 7693}); 7694}; 7695$.fn.resetForm=function(){ 7696return this.each(function(){ 7697var el=$(this); 7698var tag=this.tagName.toLowerCase(); 7699switch(tag){ 7700case'input': 7701this.checked=this.defaultChecked; 7702case'textarea': 7703this.value=this.defaultValue; 7704return true; 7705case'option': 7706case'optgroup': 7707var select=el.parents('select'); 7708if(select.length&&select[0].multiple){ 7709if(tag==='option'){ 7710this.selected=this.defaultSelected; 7711}else{ 7712el.find('option').resetForm(); 7713} 7714}else{ 7715select.resetForm(); 7716} 7717return true; 7718case'select': 7719el.find('option').each(function(i){ 7720this.selected=this.defaultSelected; 7721if(this.defaultSelected&&!el[0].multiple){ 7722el[0].selectedIndex=i; 7723return false;
7724} 7725}); 7726return true; 7727case'label': 7728var forEl=$(el.attr('for')); 7729var list=el.find('input,select,textarea'); 7730if(forEl[0]){ 7731list.unshift(forEl[0]); 7732} 7733list.resetForm(); 7734return true; 7735case'form': 7736if(typeof this.reset==='function'||(typeof this.reset==='object'&&!this.reset.nodeType)){ 7737this.reset(); 7738} 7739return true; 7740default: 7741el.find('form,input,label,select,textarea').resetForm(); 7742return true; 7743} 7744}); 7745}; 7746$.fn.enable=function(b){ 7747if(typeof b==='undefined'){ 7748b=true; 7749} 7750return this.each(function(){ 7751this.disabled=!b; 7752}); 7753}; 7754$.fn.selected=function(select){ 7755if(typeof select==='undefined'){ 7756select=true; 7757} 7758return this.each(function(){ 7759var t=this.type; 7760if(t==='checkbox'||t==='radio'){ 7761this.checked=select; 7762}else if(this.tagName.toLowerCase()==='option'){ 7763var $sel=$(this).parent('select'); 7764if(select&&$sel[0]&&$sel[0].type==='select-one'){ 7765$sel.find('option').selected(false); 7766} 7767this.selected=select; 7768} 7769}); 7770}; 7771$.fn.ajaxSubmit.debug=false; 7772function log(){ 7773if(!$.fn.ajaxSubmit.debug){ 7774return; 7775} 7776var msg='[jquery.form] '+Array.prototype.join.call(arguments,''); 7777if(window.console&&window.console.log){ 7778window.console.log(msg); 7779}else if(window.opera&&window.opera.postError){ 7780window.opera.postError(msg); 7781} 7782} 7783})); 7784 7785 7786/* prive/javascript/jquery.autosave.js?1790181870 */ 7787 7788(function($){ 7789$.fn.autosave=function(opt){ 7790opt=$.extend({ 7791url:window.location, 7792confirm:false, 7793confirmstring:'Sauvegarder ?' 7794},opt); 7795var save_changed=function(){ 7796$('form.autosavechanged') 7797.each(function(){ 7798if(!opt.confirm||confirm(opt.confirmstring)){ 7799var contenu=$(this).serialize(); 7800var d=new Date(); 7801contenu=contenu+"&__timestamp="+Math.round(d.getTime()/1000); 7802$.post(opt.url,{ 7803'action':'session', 7804'var':'autosave_'+$('input[name=autosave]',this).val(), 7805'val':contenu 7806}); 7807} 7808}).removeClass('autosavechanged'); 7809}; 7810$(window).on('unload',save_changed); 7811return this 7812.on('keyup',function(){ 7813$(this).addClass('autosavechanged'); 7814}) 7815.on('change',function(){ 7816$(this).addClass('autosavechanged'); 7817save_changed(); 7818}) 7819.on('submit',function(){ 7820save_changed(); 7821}); 7822}; 7823})(jQuery); 7824 7825 7826/* prive/javascript/jquery.placeholder-label.js?1790181870 */ 7827 7828(function($){
7829$.placeholderLabel={ 7830placeholder_class:null, 7831add_placeholder:function(){ 7832if($(this).val()==$(this).attr('placeholder')){ 7833$(this).val('').removeClass($.placeholderLabel.placeholder_class); 7834} 7835}, 7836remove_placeholder:function(){ 7837if($(this).val()==''){ 7838$(this).val($(this).attr('placeholder')).addClass($.placeholderLabel.placeholder_class); 7839} 7840}, 7841disable_placeholder_fields:function(){ 7842$(this).find("input[placeholder]").each(function(){ 7843if($(this).val()==$(this).attr('placeholder')){ 7844$(this).val(''); 7845} 7846}); 7847return true; 7848} 7849}; 7850$.fn.placeholderLabel=function(options){ 7851var dummy=document.createElement('input'); 7852if(dummy.placeholder!=undefined){ 7853return this; 7854} 7855var config={ 7856placeholder_class:'placeholder' 7857}; 7858if(options)$.extend(config,options); 7859$.placeholderLabel.placeholder_class=config.placeholder_class; 7860this.each(function(){ 7861var input=$(this); 7862input.focus($.placeholderLabel.add_placeholder); 7863input.blur($.placeholderLabel.remove_placeholder); 7864input.triggerHandler('focus'); 7865input.triggerHandler('blur'); 7866$(this.form).submit($.placeholderL
7866abel.disable_placeholder_fields); 7867}); 7868return this; 7869} 7870})(jQuery); 7871 7872 7873/* prive/javascript/ajaxCallback.js?1790181870 */ 7874jQuery.spip=jQuery.spip||{}; 7875jQuery.spip.log=function(){ 7876if(jQuery.spip.debug&&window.console&&window.console.log) 7877window.console.log.apply(this,arguments); 7878} 7879jQuery.spip.test_espace_prive=function(){ 7880if(typeof spipConfig.core.test_espace_prive!=undefined&&spipConfig.core.test_espace_prive){ 7881return true; 7882} 7883return false; 7884} 7885if(!jQuery.spip.load_handlers){ 7886jQuery.spip.load_handlers=new Array(); 7887function onAjaxLoad(f){ 7888jQuery.spip.load_handlers.push(f); 7889}; 7890jQuery.spip.triggerAjaxLoad=function(root){ 7891jQuery.spip.log('triggerAjaxLoad'); 7892jQuery.spip.log(root); 7893for(var i=0;i<jQuery.spip.load_handlers.length;i++) 7894jQuery.spip.load_handlers[i].apply(root); 7895}; 7896jQuery.spip.intercepted={}; 7897jQuery.spip.intercepted.load=jQuery.fn.load; 7898jQuery.fn.load=function(url,params,callback){ 7899if(typeof url!=="string"){ 7900return jQuery.spip.intercepted.load.apply(this,arguments); 7901} 7902callback=callback||function(){}; 7903if(params){ 7904if(params.constructor==Function){ 7905callback=params; 7906params=null; 7907} 7908} 7909params=jQuery.extend(params,{triggerAjaxLoad:false}); 7910var callback2=function(){jQuery.spip.log('jQuery.load');jQuery.spip.triggerAjaxLoad(this);callback.apply(this,arguments);}; 7911return jQuery.spip.intercepted.load.apply(this,[url,params,callback2]); 7912}; 7913jQuery.spip.intercepted.ajaxSubmit=jQuery.fn.ajaxSubmit; 7914jQuery.fn.ajaxSubmit=function(options){ 7915options=options||{}; 7916if(typeof options.onAjaxLoad=="undefined"||options.onAjaxLoad!=false){ 7917var me=jQuery(this).parents('div.ajax'); 7918if(me.length) 7919me=me.parent(); 7920else 7921me=document; 7922if(typeof options=='function') 7923options={success:options}; 7924var callback=options.success||function(){}; 7925options.success=function(){callback.apply(this,arguments);jQuery.spip.log('jQuery.ajaxSubmit');jQuery.spip.triggerAjaxLoad(me);} 7926} 7927return jQuery.spip.intercepted.ajaxSubmit.apply(this,[options]); 7928} 7929jQuery.spip.intercepted.ajax=jQuery.ajax; 7930jQuery.ajax=function(url,settings){ 7931if(typeof settings=='undefined'){ 7932settings={}; 7933if(typeof url=='object'){ 7934settings=url; 7935url=null; 7936} 7937} 7938if(typeof url=='string'){ 7939settings['url']=url; 7940} 7941if(settings.data&&settings.data['triggerAjaxLoad']===false){ 7942settings.data['triggerAjaxLoad']=null; 7943return jQuery.spip.intercepted.ajax(settings); 7944} 7945var s=jQuery.extend(true,{},jQuery.ajaxSettings,settings); 7946var callbackContext=s.context||s; 7947try{ 7948if(jQuery.ajax.caller==jQuery.spip.intercepted.load||jQuery.ajax.caller==jQuery.spip.intercepted.ajaxSubmit) 7949return jQuery.spip.intercepted.ajax(settings); 7950} 7951catch(err){} 7952var orig_complete=s.complete||function(){}; 7953settings.complete=function(res,status){
7954var dataType=settings.dataType; 7955var ct=(res&&(typeof res.getResponseHeader=='function')) 7956?res.getResponseHeader("content-type"):''; 7957var xml=!dataType&&ct&&ct.indexOf("xml")>=0; 7958orig_complete.call(callbackContext,res,status); 7959if((!dataType&&!xml)||dataType=="html"){ 7960jQuery.spip.log('jQuery.ajax'); 7961if(typeof s.onAjaxLoad=="undefined"||s.onAjaxLoad!=false) 7962jQuery.spip.triggerAjaxLoad(s.ajaxTarget?s.ajaxTarget:document); 7963} 7964}; 7965return jQuery.spip.intercepted.ajax(settings); 7966}; 7967} 7968jQuery.uaMatch=function(ua){ 7969ua=ua.toLowerCase(); 7970var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)|| 7971ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)|| 7972[]; 7973return{ 7974browser:match[1]||"", 7975version:match[2]||"0" 7976}; 7977}; 7978if(!jQuery.browser){ 7979matched=jQuery.uaMatch(navigator.userAgent); 7980browser={}; 7981if(matched.browser){ 7982browser[matched.browser]=true; 7983browser.version=matched.version; 7984} 7985if(browser.chrome){ 7986browser.webkit=true; 7987}else if(browser.webkit){ 7988browser.safari=true; 7989} 7990jQuery.browser=browser; 7991} 7992jQuery.getScript=function(url,callback){ 7993return $.ajax({ 7994url:url, 7995dataType:"script", 7996success:callback, 7997cache:true 7998}); 7999} 8000jQuery.fn.positionner=function(force,setfocus){ 8001if(!this.length){ 8002return this; 8003} 8004var offset=jQuery(this).offset(); 8005var hauteur=parseInt(jQuery(this).css('height')); 8006var marge=jQuery.spip.positionner_marge||5; 8007var scrolltop=self['pageYOffset']|| 8008jQuery.boxModel&&document.documentElement['scrollTop']|| 8009document.body['scrollTop']; 8010var h=jQuery(window).height(); 8011var scroll=0; 8012if(force||(offset&&offset['top']-marge<=scrolltop)){ 8013scroll=offset['top']-marge; 8014} 8015else if(offset&&offset['top']+hauteur-h+marge>scrolltop){ 8016scroll=Math.min(offset['top']-marge-15,offset['top']+hauteur-h+40); 8017} 8018if(scroll) 8019jQuery('html,body') 8020.animate({scrollTop:scroll},300); 8021if(setfocus!==false) 8022jQuery(jQuery('*',this).filter('input[type=text],textarea')[0]).focus(); 8023return this; 8024} 8025jQuery.spip.virtualbuffer_id='spip_virtualbufferupdate'; 8026jQuery.spip.initReaderBuffer=function(){ 8027if(jQuery('#'+jQuery.spip.virtualbuffer_id).length)return; 8028jQuery('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>'); 8029} 8030jQuery.spip.updateReaderBuffer=function(){ 8031var i=jQuery('#'+jQuery.spip.virtualbuffer_id); 8032if(!i.length)return; 8033i.val(parseInt(i.val())+1); 8034} 8035jQuery.fn.formulaire_setContainer=function(){ 8036if(!this.closest('.ajax-form-container').length){ 8037this.find('script').remove(); 8038var aria=this.data('aria'); 8039var $container=jQuery('<div class="ajax-form-container"></div>'); 8040if(aria&&typeof aria==='object'){ 8041for(var i in aria){ 8042$container=$container.attr(i,aria[i]); 8043} 8044} 8045else{ 8046aria=false; 8047} 8048this.wrap($container); 8049if(aria){ 8050jQuery('form',this).not('[aria-live]').attr('aria-live','off'); 8051} 8052} 8053return this; 8054} 8055jQuery.fn.formulaire_dyn_ajax=function(target){ 8056if(this.length) 8057jQuery.spip.initReaderBuffer(); 8058return this.each(function(){ 8059var scrollwhensubmit=!jQuery(this).is('.noscroll'); 8060var cible=target||this; 8061jQuery(cible).formulaire_setContainer(); 8062jQuery('form:not(.noajax):not(.bouton_action_post)',this).each(function(){ 8063var leform=this; 8064var leclk,leclk_x,leclk_y; 8065var onError=function(xhr,status,error,$form){
8066jQuery(leform).ajaxFormUnbind().find('input[name="var_ajax"]').remove(); 8067var msg="Erreur"; 8068if(typeof(error_on_ajaxform)!=="undefined")msg=error_on_ajaxform; 8069jQuery(leform).prepend("<p class='error ajax-error none'>"+msg+"</p>").find('.ajax-error').show('fast'); 8070jQuery(cible).closest('.ajax-form-container').endLoading(true); 8071} 8072jQuery(this).prepend("<input type='hidden' name='var_ajax' value='form'>") 8073.ajaxForm({ 8074beforeSubmit:function(){ 8075leclk=leform.clk; 8076var scrollwhensubmit_button=true; 8077if(leclk){ 8078scrollwhensubmit_button=!jQuery(leclk).is('.noscroll'); 8079var n=leclk.name; 8080if(n&&!leclk.disabled&&leclk.type==="image"){ 8081leclk_x=leform.clk_x; 8082leclk_y=leform.clk_y; 8083} 8084} 8085jQuery(cible).wrap('<div />'); 8086cible=jQuery(cible).parent(); 8087jQuery(cible).closest('.ajax-form-container').animateLoading(); 8088if(scrollwhensubmit&&scrollwhensubmit_button){ 8089jQuery(cible).positionner(false,false); 8090} 8091}, 8092error:onError, 8093success:function(c,status,xhr,$form){ 8094if(c.match(/^\s*noajax\s*$/)){ 8095jQuery("input[name=var_ajax]",leform).remove(); 8096if(leclk){ 8097var n=leclk.name; 8098if(n&&!leclk.disabled){ 8099jQuery(leform).prepend("<input type='hidden' name='"+n+"' value='"+leclk.value+"'>"); 8100if(leclk.type==="image"){ 8101jQuery(leform).prepend("<input type='hidden' name='"+n+".x' value='"+leform.clk_x+"'>"); 8102jQuery(leform).prepend("<input type='hidden' name='"+n+".y' value='"+leform.clk_y+"'>"); 8103} 8104} 8105}
8106jQuery(leform).ajaxFormUnbind().closest('.formulaire_spip').addClass('resubmit-noajax'); 8107try{ 8108leform.submit(); 8109}catch(err){ 8110var submitFn=document.createElement('form').submit; 8111submitFn.apply(leform); 8112} 8113} 8114else{ 8115if(!c.length||c.indexOf("ajax-form-is-ok")==-1) 8116return onError.apply(this,[status,xhr,$form]); 8117var preloaded=jQuery.spip.preloaded_urls; 8118jQuery.spip.preloaded_urls={}; 8119jQuery(cible).html(c); 8120var a=jQuery('a:first',cible).eq(0); 8121var d=jQuery('div.ajax',cible); 8122if(!d.length){ 8123jQuery(cible).addClass('ajax'); 8124if(!scrollwhensubmit) 8125jQuery(cible).addClass('noscroll'); 8126} 8127else{ 8128d.siblings('br.bugajaxie').remove(); 8129cible=jQuery(":first",cible); 8130cible.unwrap(); 8131} 8132if(a.length 8133&&a.is('a[name=ajax_ancre]') 8134&&jQuery(a.attr('href'),cible).length){ 8135a=a.attr('href'); 8136if(jQuery(a,cible).length) 8137setTimeout(function(){ 8138jQuery(a,cible).positionner(false); 8139},10); 8140jQuery(cible).closest('.ajax-form-container').endLoading(true); 8141} 8142else{ 8143if(a.length&&a.is('a[name=ajax_redirect]')){ 8144a=a.get(0).href; 8145setTimeout(function(){ 8146var cur=window.location.href.split('#'); 8147document.location.replace(a); 8148if(cur[0]==a.split('#')[0]){ 8149window.location.reload(); 8150} 8151},10); 8152jQuery(cible).closest('.ajax-form-container').animateLoading(); 8153} 8154else{ 8155jQuery(cible).closest('.ajax-form-container').endLoading(true); 8156} 8157} 8158if(!jQuery('.reponse_formulaire_ok',cible).length) 8159jQuery.spip.preloaded_urls=preloaded; 8160jQuery.spip.updateReaderBuffer(); 8161} 8162} 8163}) 8164.addClass('noajax hasajax'); 8165}); 8166}); 8167} 8168jQuery.fn.formulaire_verifier=function(callback,champ){ 8169var erreurs={'message_erreur':'form non ajax'}; 8170var me=this; 8171if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true'){ 8172if(jQuery(me).is('form.hasajax')){ 8173jQuery(me).ajaxSubmit({ 8174dataType:"json", 8175data:{formulaire_action_verifier_json:true}, 8176success:function(errs){ 8177var args=[errs,champ] 8178if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true') 8179callback.apply(me,args); 8180} 8181}); 8182} 8183else 8184callback.apply(me,[erreurs,champ]); 8185} 8186return this; 8187} 8188jQuery.fn.formulaire_activer_verif_auto=function(callback){ 8189callback=callback||formulaire_actualiser_erreurs; 8190var me=jQuery(this).closest('.ajax-form-container'); 8191var check=function(){ 8192var name=jQuery(this).attr('name'); 8193setTimeout(function(){me.find('form').formulaire_verifier(callback,name);},50); 8194} 8195var activer=function(){ 8196if(me.find('form').attr('data-verifjson')!='on'){ 8197me 8198.find('form') 8199.attr('data-verifjson','on') 8200.find('input,select,textarea') 8201.on('change',check); 8202} 8203} 8204jQuery(activer); 8205onAjaxLoad(function(){setTimeout(activer,150);}); 8206} 8207function formulaire_actualiser_erreurs(erreurs){ 8208var parent=jQuery(this).closest('.formulaire_spip'); 8209if(!parent.length)return; 8210parent.find('.reponse_formulaire,.erreur_message').fadeOut().remove(); 8211parent.find('.erreur').removeClass('erreur'); 8212if(erreurs['message_ok']) 8213parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_ok">'+erreurs['message_ok']+'</p>'); 8214if(erreurs['message_erreur']) 8215parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_erreur">'+erreurs['message_erreur']+'</p>'); 8216for(var k in erreurs){ 8217var saisie=parent.find('.editer_'+k); 8218if(saisie.length){ 8219saisie.addClass('erreur'); 8220saisie.find('label').after('<span class="erreur_message">'+erreurs[k]+'</span>'); 8221} 8222} 8223} 8224var ajax_confirm=true; 8225var ajax_confirm_date=0; 8226var spip_confirm=window.confirm; 8227function _confirm(message){ 8228ajax_confirm=spip_confirm(message); 8229if(!ajax_confirm){ 8230var d=new Date(); 8231ajax_confirm_date=d.getTime(); 8232} 8233return ajax_confirm; 8234} 8235window.confirm=_confirm; 8236var ajaxbloc_selecteur; 8237jQuery.spip.preloaded_urls={}; 8238jQuery.spip.on_ajax_loaded=function(blocfrag,c,href,history){ 8239history=history||(history==null); 8240if(typeof href==undefined||href==null) 8241history=false; 8242if(history) 8243jQuery.spip.setHistoryState(blocfrag); 8244if(jQuery(blocfrag).attr('data-loaded-callback')){ 8245var callback=eval(jQuery(blocfrag).attr('data-loaded-callback')); 8246callback.call(blocfrag,c,href,history); 8247} 8248else{ 8249jQuery(blocfrag) 8250.html(c) 8251.endLoading(); 8252} 8253if(typeof href!=undefined) 8254jQuery(blocfrag).attr('data-url',href); 8255if(history){ 8256var href_history=href; 8257if(href_history.indexOf('var_nullify')!==-1){ 8258href_history=parametre_url(href_history,'var_nullify',''); 8259} 8260jQuery.spip.pushHistoryState(href_history); 8261jQuery.spip.setHistoryState(blocfrag); 8262} 8263var a=jQuery('a:first',jQuery(blocfrag)).eq(0); 8264if(a.length 8265&&a.is('a[name=ajax_ancre]') 8266&&jQuery(a.attr('href'),blocfrag).length){ 8267a=a.attr('href'); 8268jQuery(a,blocfrag).positionner(false); 8269} 8270jQuery.spip.log('on_ajax_loaded'); 8271jQuery.spip.triggerAjaxLoad(blocfrag); 8272a=jQuery(blocfrag).parents('form.hasajax') 8273if(a.length) 8274a.eq(0).removeClass('noajax').parents('div.ajax').formulaire_dyn_ajax(); 8275jQuery.spip.updateReaderBuffer(); 8276} 8277jQuery.spip.on_ajax_failed=function(blocfrag,statusCode,href,history){ 8278jQuery(blocfrag).addClass('invalid'); 8279jQuery.spip.log("Echec AJAX statusCode "+statusCode) 8280history=history||(history==null); 8281if(history){ 8282if(jQuery.spip.debug){ 8283jQuery.spip.log("On redirige sur sur "+href) 8284} 8285else{ 8286window.location.href=href; 8287} 8288} 8289} 8290jQuery.spip.stateId=0; 8291jQuery.spip.setHistoryState=function(blocfrag){ 8292if(!window.history.replaceState)return; 8293if(!blocfrag.attr('id')){ 8294while(jQuery('#ghsid'+jQuery.spip.stateId).length) 8295jQuery.spip.stateId++; 8296blocfrag.attr('id','ghsid'+jQuery.spip.stateId); 8297} 8298var href=blocfrag.attr('data-url')||blocfrag.attr('data-origin'); 8299href=jQuery("<"+"a href='"+href+"'></a>").get(0).href; 8300var state={ 8301id:blocfrag.attr('id'), 8302href:href 8303}; 8304var ajaxid=blocfrag.attr('class').match(/\bajax-id-[\w-]+\b/); 8305if(ajaxid&&ajaxid.length) 8306state["ajaxid"]=ajaxid[0]; 8307window.history.replaceState(state,window.document.title,window.document.location); 8308} 8309jQuery.spip.pushHistoryState=function(href,title){ 8310if(!window.history.pushState) 8311return false;
8312window.history.pushState({},title,href); 8313} 8314window.onpopstate=function(popState){ 8315if(popState.state&&popState.state.href){ 8316var blocfrag=false; 8317if(popState.state.id){ 8318blocfrag=jQuery('#'+popState.state.id); 8319} 8320if((!blocfrag||!blocfrag.length)&&popState.state.ajaxid){ 8321blocfrag=jQuery('.ajaxbloc.'+popState.state.ajaxid); 8322} 8323if(blocfrag&&blocfrag.length==1){ 8324jQuery.spip.ajaxClick(blocfrag,popState.state.href,{history:false}); 8325return true; 8326} 8327else{ 8328window.location.href=popState.state.href; 8329} 8330} 8331} 8332jQuery.spip.loadAjax=function(blocfrag,url,href,options){ 8333var force=options.force||false; 8334if(jQuery(blocfrag).attr('data-loading-callback')){ 8335var callback=eval(jQuery(blocfrag).attr('data-loading-callback')); 8336callback.call(blocfrag,url,href,options); 8337} 8338else{ 8339jQuery(blocfrag).animateLoading(); 8340} 8341if(jQuery.spip.preloaded_urls[url]&&!force){ 8342if(jQuery.spip.preloaded_urls[url]=="<!--loading-->"){ 8343setTimeout(function(){jQuery.spip.loadAjax(blocfrag,url,href,options);},100); 8344return; 8345} 8346jQuery.spip.on_ajax_loaded(blocfrag,jQuery.spip.preloaded_urls[url],href,options.history); 8347}else{ 8348var d=new Date(); 8349jQuery.spip.preloaded_urls[url]="<!--loading-->"; 8350jQuery.ajax({ 8351url:parametre_url(url,'var_t',d.getTime()), 8352onAjaxLoad:false, 8353success:function(c){ 8354jQuery.spip.on_ajax_loaded(blocfrag,c,href,options.history); 8355jQuery.spip.preloaded_urls[url]=c; 8356if(options.callback&&typeof options.callback=="function") 8357options.callback.apply(blocfrag); 8358}, 8359error:function(e){ 8360jQuery.spip.preloaded_urls[url]=''; 8361jQuery.spip.on_ajax_failed(blocfrag,e.status,href,options.history); 8362} 8363}); 8364} 8365} 8366jQuery.spip.makeAjaxUrl=function(href,ajax_env,origin){ 8367var url=href.split('#'); 8368url[0]=parametre_url(url[0],'var_ajax',1); 8369url[0]=parametre_url(url[0],'var_ajax_env',ajax_env); 8370if(origin){ 8371if(origin.indexOf('var_nullify')!==-1){ 8372origin=parametre_url(origin,'var_nullify',''); 8373} 8374var p=origin.indexOf('?'); 8375var nullify=[]; 8376if(p!==-1){ 8377var args=origin.substring(p+1).split('&'); 8378var val; 8379var arg; 8380for(var n=0;n<args.length;n++){ 8381arg=args[n].split('='); 8382arg=decodeURIComponent(arg[0]); 8383p=arg.indexOf('['); 8384if(p!==-1) 8385arg=arg.substring(0,p); 8386val=parametre_url(href,arg); 8387if((typeof val=="undefined"||val==null)&&nullify.indexOf(arg)===-1){ 8388nullify.push(arg); 8389} 8390} 8391if(nullify.length){ 8392url[0]=url[0]+'&'+'var_nullify='+encodeURIComponent(nullify.join('|')); 8393} 8394} 8395} 8396if(url[1]) 8397url[0]=parametre_url(url[0],'var_ajax_ancre',url[1]); 8398return url[0]; 8399} 8400jQuery.spip.ajaxReload=function(blocfrag,options){ 8401var ajax_env=blocfrag.attr('data-ajax-env'); 8402if(!ajax_env||ajax_env==undefined)return; 8403var href=options.href||blocfrag.attr('data-url')||blocfrag.attr('data-origin'); 8404if(href&&typeof href!=undefined){ 8405if(href.indexOf('var_nullify')!==-1){ 8406href=parametre_url(href,'var_nullify',''); 8407} 8408options=options||{}; 8409var callback=options.callback||null; 8410var history=options.history||false; 8411var args=options.args||{}; 8412for(var key in args){ 8413href=parametre_url(href,key,args[key]==undefined?'':args[key],'&',args[key]==undefined?false:true); 8414} 8415var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin')); 8416jQuery.spip.loadAjax(blocfrag,url,href,{force:true,callback:callback,history:history}); 8417return true; 8418} 8419} 8420jQuery.spip.ajaxClick=function(blocfrag,href,options){ 8421var ajax_env=blocfrag.attr('data-ajax-env'); 8422if(!ajax_env||ajax_env==undefined)return; 8423if(!ajax_confirm){ 8424ajax_confirm=true; 8425var d=new Date(); 8426if((d.getTime()-ajax_confirm_date)<=2) 8427return false; 8428} 8429var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin')); 8430jQuery.spip.loadAjax(blocfrag,url,href,options); 8431return false; 8432} 8433jQuery.fn.ajaxbloc=function(){ 8434if(this.length) 8435jQuery.spip.initReaderBuffer(); 8436if(ajaxbloc_selecteur==undefined) 8437ajaxbloc_selecteur='.pagination a,a.ajax'; 8438return this.each(function(){ 8439jQuery('div.ajaxbloc',this).ajaxbloc(); 8440var blocfrag=jQuery(this); 8441var ajax_env=blocfrag.attr('data-ajax-env'); 8442if(!ajax_env||ajax_env==undefined)return; 8443blocfrag.not('.bind-ajaxReload').on('ajaxReload',function(event,options){ 8444if(jQuery.spip.ajaxReload(blocfrag,options)) 8445event.stopPropagation(); 8446}).addClass('bind-ajaxReload'); 8447jQuery(ajaxbloc_selecteur,this).not('.noajax,.bind-ajax') 8448.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)});}) 8449.addClass('bind-ajax') 8450.filter('.preload').each(function(){ 8451var href=this.href; 8452var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin')); 8453if(!jQuery.spip.preloaded_urls[url]){ 8454jQuery.spip.preloaded_urls[url]='<!--loading-->'; 8455jQuery.ajax({url:url,onAjaxLoad:false,success:function(r){jQuery.spip.preloaded_urls[url]=r;},error:function(){jQuery.spip.preloaded_urls[url]='';}}); 8456} 8457}); 8458jQuery('form.bouton_action_post.ajax',this).not('.noajax,.bind-ajax').each(function(){ 8459var leform=this; 8460var url=jQuery(this).attr('action').split('#'); 8461var scrollwhensubmit=(!jQuery(this).is('.noscroll')&&!jQuery('.submit',this).is('.noscroll')); 8462jQuery(this) 8463.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]+"'>":"")) 8464.ajaxForm({ 8465beforeSubmit:function(){ 8466jQuery(blocfrag).animateLoading(); 8467if(scrollwhensubmit){ 8468jQuery(blocfrag).positionner(false); 8469} 8470}, 8471onAjaxLoad:false, 8472success:function(c){ 8473jQuery.spip.on_ajax_loaded(blocfrag,c); 8474jQuery.spip.preloaded_urls={}; 8475}, 8476error:function(e){ 8477jQuery.spip.preloaded_urls={}; 8478var href=parametre_url(url,'redirect'); 8479if(!href){ 8480href=window.location.href; 8481} 8482jQuery.spip.on_ajax_failed(blocfrag,e.status,href,e.status===400); 8483} 8484}) 8485.addClass('bind-ajax'); 8486}); 8487}); 8488}; 8489jQuery.fn.followLink=function(){ 8490$(this).click(); 8491if(!$(this).is('.bind-ajax')) 8492window.location.href=$(this).get(0).href; 8493return this; 8494} 8495function ajaxReload(ajaxid,options){ 8496jQuery('div.ajaxbloc.ajax-id-'+ajaxid).ajaxReload(options); 8497} 8498jQuery.fn.ajaxReload=function(options){ 8499options=options||{};
8500jQuery(this).trigger('ajaxReload',[options]); 8501return this; 8502} 8503jQuery.fn.animateLoading=function(){ 8504this.attr('aria-busy','true').addClass('loading').children().css('opacity',0.5); 8505if(typeof ajax_image_searching!='undefined'){ 8506var i=(this).find('.image_loading'); 8507if(i.length)i.eq(0).html(ajax_image_searching); 8508else this.prepend('<span class="image_loading">'+ajax_image_searching+'</span>'); 8509} 8510return this; 8511} 8512jQuery.fn.animeajax=jQuery.fn.animateLoading; 8513jQuery.fn.endLoading=function(hard){ 8514hard=hard||false; 8515this.attr('aria-busy','false').removeClass('loading'); 8516if(hard){ 8517this.children().css('opacity',''); 8518this.find('.image_loading').html(''); 8519} 8520return this; 8521} 8522jQuery.fn.animateRemove=function(callback){ 8523if(this.length){ 8524var me=this; 8525var color=$("<div class='remove'></div>").css('background-color'); 8526var sel=$(this); 8527if(sel.is('tr')) 8528sel=sel.add('>td',sel); 8529sel.addClass('remove').css({backgroundColor:color}).animate({opacity:"0.0"},'fast',function(){ 8530sel.removeClass('remove').css({backgroundColor:''}); 8531if(callback) 8532callback.apply(me); 8533}); 8534} 8535return this; 8536} 8537jQuery.fn.animateAppend=function(callback){ 8538if(this.length){ 8539var me=this; 8540var color=$("<div class='append'></div>").css('background-color'); 8541var origin=$(this).css('background-color')||'#ffffff'; 8542if(origin=='transparent')origin='#ffffff'; 8543var sel=$(this); 8544if(sel.is('tr')) 8545sel=sel.add('>td',sel); 8546sel.css('opacity','0.0').addClass('append').css({backgroundColor:color}).animate({opacity:"1.0"},1000,function(){ 8547sel.animate({backgroundColor:origin},3000,function(){ 8548sel.removeClass('append').css({backgroundColor:''}); 8549if(callback) 8550callback.apply(me); 8551}); 8552}); 8553} 8554return this; 8555} 8556function parametre_url(url,c,v,sep,force_vide){ 8557if(typeof(url)=='undefined'){ 8558url=''; 8559} 8560var p; 8561var ancre=''; 8562var a='./'; 8563var args=[]; 8564p=url.indexOf('#'); 8565if(p!=-1){ 8566ancre=url.substring(p); 8567url=url.substring(0,p); 8568} 8569p=url.indexOf('?'); 8570if(p!==-1){ 8571if(p>0)a=url.substring(0,p); 8572args=url.substring(p+1).split('&'); 8573} 8574else 8575a=url; 8576var regexp=new RegExp('^('+c.replace('[]','\\[\\]')+'\\[?\\]?)(=.*)?$'); 8577var ajouts=[]; 8578var u=(typeof(v)!=='object')?encodeURIComponent(v):v; 8579var na=[]; 8580var v_read=null; 8581for(var n=0;n<args.length;n++){ 8582var val=args[n]; 8583try{ 8584val=decodeURIComponent(val); 8585}catch(e){} 8586var r=val.match(regexp); 8587if(r&&r.length){ 8588if(v==null){ 8589if(r[1].substr(-2)=='[]'){ 8590if(!v_read)v_read=[]; 8591v_read.push((r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):''); 8592} 8593else{ 8594return(r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):''; 8595} 8596} 8597else if(!v.length){ 8598} 8599else if(r[1].substr(-2)!='[]'){ 8600na.push(r[1]+'='+u); 8601ajouts.push(r[1]); 8602} 8603} 8604else 8605na.push(args[n]); 8606} 8607if(v==null)return v_read; 8608if(v||v.length||force_vide){ 8609ajouts="="+ajouts.join("=")+"="; 8610var all=c.split('|'); 8611for(n=0;n<all.length;n++){ 8612if(ajouts.search("="+all[n]+"=")==-1){ 8613if(typeof(v)!=='object'){ 8614na.push(all[n]+'='+u); 8615} 8616else{ 8617var id=((all[n].substring(-2)=='[]')?all[n]:all[n]+"[]"); 8618for(p=0;p<v.length;p++) 8619na.push(id+'='+encodeURIComponent(v[p])); 8620} 8621} 8622} 8623} 8624if(na.length){ 8625if(!sep)sep='&'; 8626a=a+"?"+na.join(sep); 8627} 8628return a+ancre; 8629} 8630function spip_logo_survol_hover(){ 8631var me=jQuery(this); 8632if(me.attr('data-src-hover')){ 8633me.attr('data-src-original',me.attr('src')); 8634me.attr('src',me.attr('data-src-hover')); 8635} 8636} 8637function spip_logo_survol_out(){ 8638var me=jQuery(this); 8639if(me.attr('data-src-original')){ 8640me.attr('src',me.attr('data-src-original')); 8641} 8642} 8643function disableClickAfterFormSubmit(){ 8644if(jQuery(this).is('.processing-submitted-form')){ 8645return false; 8646} 8647jQuery(this) 8648.addClass('processing-submitted-form') 8649.find('button[type="submit"]') 8650.attr('disabled','disabled') 8651.addClass('disabled') 8652} 8653function puce_enable_survol(){ 8654jQuery('span.puce_objet_popup a',this).not('.puce-survol-enabled').click(function(){ 8655selec_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')); 8656return false; 8657}).addClass('puce-survol-enabled'); 8658jQuery('span.puce_objet',this).not('.puce-survol-enabled').mouseover(function(){ 8659if(!this.puce_loaded){ 8660this.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')); 8661} 8662}).addClass('puce-survol-enabled'); 8663} 8664if(!window.var_zajax_content) 8665window.var_zajax_content='contenu'; 8666jQuery(function(){ 8667jQuery('form:not(.bouton_action_post)').parents('div.ajax') 8668.formulaire_dyn_ajax();
8669jQuery('div.ajaxbloc').ajaxbloc(); 8670jQuery("input[placeholder]:text").placeholderLabel(); 8671jQuery('.spip_logo_survol').hover(spip_logo_survol_hover,spip_logo_survol_out); 8672puce_enable_survol.apply(this); 8673jQuery('body').on('submit','form.bouton_action_post',disableClickAfterFormSubmit); 8674}); 8675onAjaxLoad(function(){ 8676if(jQuery){ 8677jQuery('form:not(.bouton_action_post)',this).parents('div.ajax') 8678.formulaire_dyn_ajax(); 8679if(jQuery(this).is('div.ajaxbloc')) 8680jQuery(this).ajaxbloc(); 8681else if(jQuery(this).closest('div.ajaxbloc').length) 8682jQuery(this).closest('div.ajaxbloc').ajaxbloc(); 8683else 8684jQuery('div.ajaxbloc',this).ajaxbloc(); 8685jQuery("input[placeholder]:text",this).placeholderLabel(); 8686jQuery('.spip_logo_survol',this).hover(spip_logo_survol_hover,spip_logo_survol_out); 8687puce_enable_survol.apply(this); 8688} 8689}); 8690 8691 8692/* prive/javascript/js.cookie.js?1790181870 */ 8693 8694; 8695(function(global,factory){ 8696typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(): 8697typeof define==='function'&&define.amd?define(factory): 8698(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){ 8699var current=global.Cookies; 8700var exports=global.Cookies=factory(); 8701exports.noConflict=function(){global.Cookies=current;return exports;}; 8702})()); 8703})(this,(function(){'use strict'; 8704function assign(target){ 8705for(var i=1;i<arguments.length;i++){ 8706var source=arguments[i]; 8707for(var key in source){ 8708target[key]=source[key]; 8709} 8710} 8711return target 8712} 8713var defaultConverter={ 8714read:function(value){ 8715if(value[0]==='"'){ 8716value=value.slice(1,-1); 8717} 8718return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent) 8719}, 8720write:function(value){ 8721return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, 8722decodeURIComponent 8723) 8724} 8725}; 8726function init(converter,defaultAttributes){ 8727function set(name,value,attributes){ 8728if(typeof document==='undefined'){ 8729return 8730} 8731attributes=assign({},defaultAttributes,attributes); 8732if(typeof attributes.expires==='number'){ 8733attributes.expires=new Date(Date.now()+attributes.expires*864e5); 8734} 8735if(attributes.expires){ 8736attributes.expires=attributes.expires.toUTCString(); 8737} 8738name=encodeURIComponent(name) 8739.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent) 8740.replace(/[()]/g,escape); 8741var stringifiedAttributes=''; 8742for(var attributeName in attributes){ 8743if(!attributes[attributeName]){ 8744continue 8745} 8746stringifiedAttributes+='; '+attributeName; 8747if(attributes[attributeName]===true){ 8748continue 8749} 8750stringifiedAttributes+='='+attributes[attributeName].split(';')[0]; 8751} 8752return(document.cookie= 8753name+'='+converter.write(value,name)+stringifiedAttributes) 8754} 8755function get(name){ 8756if(typeof document==='undefined'||(arguments.length&&!name)){ 8757return 8758} 8759var cookies=document.cookie?document.cookie.split('; '):[]; 8760var jar={}; 8761for(var i=0;i<cookies.length;i++){ 8762var parts=cookies[i].split('='); 8763var value=parts.slice(1).join('='); 8764try{ 8765var found=decodeURIComponent(parts[0]); 8766jar[found]=converter.read(value,found); 8767if(name===found){ 8768break 8769} 8770}catch(e){} 8771} 8772return name?jar[name]:jar 8773} 8774return Object.create( 8775{ 8776set, 8777get, 8778remove:function(name,attributes){ 8779set( 8780name, 8781'', 8782assign({},attributes,{ 8783expires:-1 8784}) 8785); 8786}, 8787withAttributes:function(attributes){ 8788return init(this.converter,assign({},this.attributes,attributes)) 8789}, 8790withConverter:function(converter){ 8791return init(assign({},this.converter,converter),this.attributes) 8792} 8793}, 8794{ 8795attributes:{value:Object.freeze(defaultAttributes)}, 8796converter:{value:Object.freeze(converter)} 8797} 8798) 8799} 8800var api=init(defaultConverter,{path:'/'}); 8801return api; 8802})); 8803 8804 8805/* squelettes/plugins/spip-contrib-extensions/coordonnees/javascript/coordonnees_adresses.js?1750150156 */ 8806;(function($){ 8807function coordonnees_adresses_par_pays(){ 8808$('.saisie_pays select[data-adresse-id]:not(.js_active)').change(function(){ 8809var select=$(this); 8810var saisie_pays=select.parents('.editer').eq(0); 8811var obligatoire=saisie_pays.is('.obligatoire')?'oui':''; 8812var identifiant=select.data('adresse-id'); 8813var code_pays=select.val(); 8814var name=select.attr('name'); 8815var api='adresses_par_pays.api/'; 8816if(typeof spip_ecrire!=='undefined'&&spip_ecrire){ 8817api='../'+api; 8818} 8819var env=['adresse-id='+identifiant,'obligatoire='+obligatoire,'modele_name='+name]; 8820env.push(saisie_pays.siblings('.editer').find('[data-adresse-id='+identifiant+']').serialize()); 8821env=env.join('&'); 8822$.get(api+code_pays,env,function(html){ 8823saisie_pays.siblings('.editer:has([data-adresse-id='+identifiant+'])').remove(); 8824saisie_pays.after(html); 8825}); 8826}) 8827.addClass('js_active'); 8828} 8829$(function(){ 8830coordonnees_adresses_par_pays(); 8831onAjaxLoad(coordonnees_adresses_par_pays); 8832}); 8833})(jQuery); 8834 8835 8836/* plugins-dist/dist/core/porte_plume/javascript/jquery.markitup_pour_spip.js?1790181875 */ 8837 8838;(function($){ 8839$.fn.markItUp=function(settings,extraSettings){ 8840var method,params,options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=false; 8841markitup_prompt=false; 8842if(typeof settings=='string'){ 8843method=settings; 8844params=extraSettings; 8845} 8846options={id:'', 8847nameSpace:'', 8848root:'', 8849lang:'', 8850previewHandler:false, 8851previewInWindow:'', 8852previewInElement:'', 8853previewAutoRefresh:true, 8854previewPosition:'after', 8855previewTemplatePath:'~/templates/preview.html', 8856previewParser:false, 8857previewParserPath:'', 8858previewParserVar:'data', 8859previewParserAjaxType:'POST', 8860resizeHandle:true, 8861beforeInsert:'', 8862afterInsert:'', 8863onEnter:{}, 8864onShiftEnter:{}, 8865onCtrlEnter:{}, 8866onTab:{}, 8867markupSet:[{}] 8868}; 8869$.extend(options,settings,extraSettings); 8870if(!options.root){ 8871$('script').each(function(a,tag){ 8872var miuScript=$(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/); 8873if(miuScript!==null){ 8874options.root=miuScript[1]; 8875} 8876}); 8877} 8878var uaMatch=function(ua){ 8879ua=ua.toLowerCase(); 8880var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)|| 8881ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)|| 8882[]; 8883return{ 8884browser:match[1]||"", 8885version:match[2]||"0" 8886}; 8887}; 8888var matched=uaMatch(navigator.userAgent); 8889var browser={}; 8890if(matched.browser){ 8891browser[matched.browser]=true; 8892browser.version=matched.version; 8893} 8894if(browser.chrome){ 8895browser.webkit=true; 8896}else if(browser.webkit){ 8897browser.safari=true; 8898} 8899return this.each(function(){ 8900var $$,textarea,levels,scrollPosition,caretPosition, 8901clicked,hash,header,footer,previewWindow,template,iFrame,abort, 8902before,after; 8903$$=$(this); 8904textarea=this; 8905levels=[]; 8906abort=false; 8907scrollPosition=caretPosition=0; 8908caretOffset=-1; 8909options.previewParserPath=localize(options.previewParserPath); 8910options.previewTemplatePath=localize(options.previewTemplatePath); 8911if(method){
8912switch(method){ 8913case'remove': 8914remove(); 8915break; 8916case'insert': 8917markup(params); 8918break; 8919default: 8920$.error('Method '+method+' does not exist on jQuery.markItUp'); 8921} 8922return; 8923} 8924function localize(data,inText){ 8925if(inText){ 8926return data.replace(/("|')~\//g,"$1"+options.root); 8927} 8928return data.replace(/^~\//,options.root); 8929} 8930function init(){ 8931id='';nameSpace=''; 8932if(options.id){ 8933id='id="'+options.id+'"'; 8934}else if($$.attr("id")){ 8935id='id="markItUp'+($$.attr("id").substr(0,1).toUpperCase())+($$.attr("id").substr(1))+'"'; 8936} 8937if(options.nameSpace){ 8938nameSpace='class="'+options.nameSpace+'"'; 8939} 8940currentScrollPosition=$$.scrollTop(); 8941$$.wrap('<div '+nameSpace+'></div>'); 8942$$.wrap('<div '+id+' class="markItUp"></div>'); 8943$$.wrap('<div class="markItUpContainer"></div>'); 8944$$.addClass("markItUpEditor"); 8945$$.scrollTop(currentScrollPosition); 8946header=$('<div class="markItUpHeader"></div>').insertBefore($$); 8947$(dropMenus(options.markupSet)).appendTo(header); 8948$(header).find("li.markItUpDropMenu ul:empty").parent().remove(); 8949footer=$('<div class="markItUpFooter"></div>').insertAfter($$); 8950if(options.resizeHandle===true&&browser.safari!==true){ 8951resizeHandle=$('<div class="markItUpResizeHandle"></div>') 8952.insertAfter($$) 8953.on("mousedown.markItUp",function(e){ 8954var h=$$.height(),y=e.clientY,mouseMove,mouseUp; 8955mouseMove=function(e){ 8956$$.css("height",Math.max(20,e.clientY+h-y)+"px"); 8957return false; 8958}; 8959mouseUp=function(e){ 8960$("html").off("mousemove.markItUp",mouseMove).off("mouseup.markItUp",mouseUp); 8961return false; 8962}; 8963$("html").on("mousemove.markItUp",mouseMove).on("mouseup.markItUp",mouseUp); 8964}); 8965footer.append(resizeHandle); 8966} 8967$$.on('keydown.markItUp',keyPressed).on('keyup',keyPressed); 8968$$.on("insertion.markItUp",function(e,settings){ 8969if(settings.target!==false){ 8970get(); 8971} 8972if(textarea===$.markItUp.focused){ 8973markup(settings); 8974} 8975}); 8976$$.on('focus.markItUp',function(){ 8977$.markItUp.focused=this; 8978}); 8979if(options.previewInElement){ 8980refreshPreview(); 8981} 8982} 8983function dropMenus(markupSet){ 8984var ul=$('<ul></ul>'),i=0; 8985var lang=($$.attr('lang')||options.lang); 8986$('li:hover > ul',ul).css('display','block'); 8987$.each(markupSet,function(){ 8988var button=this,t='',title,li,j; 8989if((!lang||!button.lang||($.inArray(lang,button.lang)!=-1)) 8990&&(!button.lang_not||($.inArray(lang,button.lang_not)==-1))){ 8991button.title?title=(button.key)?(button.title||'')+' [Ctrl+'+button.key+']':(button.title||''):title=(button.key)?(button.name||'')+' [Ctrl+'+button.key+']':(button.name||''); 8992key=(button.key)?'accesskey="'+button.key+'"':''; 8993if(button.separator){ 8994li=$('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul); 8995}else{ 8996i++; 8997for(j=levels.length-1;j>=0;j--){ 8998t+=levels[j]+"-"; 8999} 9000li=$('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="#" '+key+' title="'+title+'"><em>'+(button.name||'')+'</em></a></li>') 9001.on("contextmenu.markItUp",function(){ 9002return false; 9003}).on('click.markItUp',function(e){ 9004e.preventDefault(); 9005}).on("focusin.markItUp",function(){ 9006setTimeout(function(){ 9007$$.focus(); 9008},0); 9009}).on('mouseup',function(e){ 9010if(button.call){ 9011eval(button.call)(e); 9012} 9013setTimeout(function(){markup(button)},1); 9014return false; 9015}).on('mouseenter.markItUp',function(){ 9016$('> a',this).addClass('active'); 9017$('> ul',this).addClass('expanded'); 9018$(document).one('click',function(){ 9019$('ul a',header).removeClass('active'); 9020$('ul ul',header).removeClass('expanded'); 9021} 9022); 9023}).on('mouseleave.markItUp',function(){ 9024$('> a',this).removeClass('active'); 9025$('> ul',this).removeClass('expanded'); 9026}).appendTo(ul); 9027if(button.dropMenu){ 9028levels.push(i); 9029$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu)); 9030} 9031} 9032} 9033}); 9034levels.pop(); 9035return ul; 9036} 9037function magicMarkups(string){ 9038if(string){ 9039string=string.toString(); 9040string=string.replace(/\(\!\(([\s\S]*?)\)\!\)/g, 9041function(x,a){ 9042var b=a.split('|!|'); 9043if(altKey===true){ 9044return(b[1]!==undefined)?b[1]:b[0]; 9045}else{ 9046return(b[1]===undefined)?"":b[0]; 9047} 9048} 9049); 9050string=string.replace(/\[\!\[([\s\S]*?)\]\!\]/g, 9051function(x,a){ 9052var b=a.split(':!:'); 9053if(abort===true){ 9054return false; 9055} 9056markitup_prompt=true; 9057value=prompt(b[0],(b[1])?b[1]:''); 9058if(value===null){ 9059abort=true; 9060} 9061setTimeout(function(){markitup_prompt=false;},500); 9062return value; 9063} 9064); 9065return string; 9066} 9067return""; 9068} 9069function prepare(action){ 9070if($.isFunction(action)){ 9071action=action(hash); 9072} 9073return magicMarkups(action); 9074} 9075function build(string){ 9076var openWith=prepare(clicked.openWith); 9077var placeHolder=prepare(clicked.placeHolder); 9078var replaceWith=prepare(clicked.replaceWith); 9079var closeWith=prepare(clicked.closeWith); 9080var openBlockWith=prepare(clicked.openBlockWith); 9081var closeBlockWith=prepare(clicked.closeBlockWith); 9082var multiline=clicked.multiline; 9083if(replaceWith!==""){ 9084block=openWith+replaceWith+closeWith; 9085}else if(selection===''&&placeHolder!==''){ 9086block=openWith+placeHolder+closeWith; 9087}else if(multiline===true){ 9088string=string||selection; 9089var lines=[string],blocks=[]; 9090if(multiline===true){ 9091lines=string.split(/\r?\n/); 9092} 9093for(var l=0;l<lines.length;l++){ 9094line=lines[l]; 9095var trailingSpaces; 9096if(trailingSpaces=line.match(/ *$/)){ 9097blocks.push(openWith+line.replace(/ *$/g,'')+closeWith+trailingSpaces); 9098}else{ 9099blocks.push(openWith+line+closeWith); 9100} 9101} 9102block=blocks.join("\n"); 9103}else{ 9104block=openWith+(string||selection)+closeWith; 9105} 9106block=openBlockWith+block+closeBlockWith; 9107return{block:block, 9108openBlockWith:openBlockWith, 9109openWith:openWith, 9110replaceWith:replaceWith, 9111placeHolder:placeHolder, 9112closeWith:closeWith, 9113closeBlockWith:closeBlockWith 9114}; 9115} 9116function selectWord(){ 9117selectionBeforeAfter(/\s|[.,;:!¡?¿()]/); 9118selectionSave(); 9119} 9120function selectLine(){ 9121selectionBeforeAfter(/\r?\n/); 9122selectionSave(); 9123} 9124function selectionRemoveLast(pattern){ 9125if(!pattern)pattern=/\s/; 9126last=selection[selection.length-1]; 9127if(last&&last.match(pattern)){ 9128set(caretPosition,selection.length-1); 9129get(); 9130$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition}); 9131} 9132} 9133function selectionBeforeAfter(pattern){ 9134if(!pattern)pattern=/\s/; 9135sautAvantIE=sautApresIE=0; 9136if(browser.msie){ 9137lenSelection=selection.length-fixIeBug(selection); 9138if(caretPosition){ 9139set(caretPosition-1,2); 9140sautAvantIE=fixIeBug(document.selection.createRange().text); 9141} 9142set(caretPosition,2); 9143sautApresIE=fixIeBug(document.selection.createRange().text); 9144set(0,caretPosition); 9145before=document.selection.createRange().text; 9146set(caretPosition+lenSelection,textarea.value.length);
9147after=document.selection.createRange().text; 9148set(caretPosition,lenSelection); 9149selection=document.selection.createRange().text; 9150}else{ 9151before=textarea.value.substring(0,caretPosition); 9152after=textarea.value.substring(caretPosition+selection.length-fixIeBug(selection)); 9153} 9154before=before.split(pattern); 9155after=after.split(pattern); 9156if(sautAvantIE)before.push(""); 9157if(sautApresIE)after.unshift(""); 9158} 9159function selectionSave(){ 9160nb_before=before?before[before.length-1].length:0; 9161nb_after=after?after[0].length:0; 9162nb=nb_before+selection.length+nb_after-fixIeBug(selection); 9163caretPosition=caretPosition-nb_before; 9164set(caretPosition,nb); 9165get(); 9166$.extend(hash,{selection:selection,caretPosition:caretPosition,scrollPosition:scrollPosition}); 9167} 9168function markup(button){ 9169var len,j,n,i; 9170hash=clicked=button; 9171get(); 9172$.extend(hash,{line:"", 9173root:options.root, 9174textarea:textarea, 9175selection:(selection||''), 9176caretPosition:caretPosition, 9177ctrlKey:ctrlKey, 9178shiftKey:shiftKey, 9179altKey:altKey 9180} 9181); 9182if(button.selectionType){ 9183if(button.selectionType=="word"){ 9184if(!selection){ 9185selectWord(); 9186}else{ 9187selectionRemoveLast(/\s/); 9188} 9189} 9190if(button.selectionType=="line"){ 9191selectLine(); 9192} 9193if(button.selectionType=="return"){ 9194if(!browser.msie){ 9195selectionBeforeAfter(/\r?\n/); 9196before_last=before[before.length-1]; 9197after=''; 9198if(r=before_last.match(/^-([*#]+) ?(.*)$/)){ 9199if(r[2]){ 9200button.replaceWith="\n-"+r[1]+' '; 9201before_last=''; 9202}else{ 9203button.replaceWith="\n"; 9204} 9205}else{ 9206before_last=''; 9207button.replaceWith="\n"; 9208} 9209before[before.length-1]=before_last; 9210selectionSave(); 9211} 9212} 9213} 9214prepare(options.beforeInsert); 9215prepare(clicked.beforeInsert); 9216if((ctrlKey===true&&shiftKey===true)||button.multiline===true){ 9217prepare(clicked.beforeMultiInsert); 9218} 9219$.extend(hash,{line:1}); 9220if((ctrlKey===true&&shiftKey===true)||button.forceMultiline===true){ 9221lines=selection.split(/\r?\n/); 9222for(j=0,n=lines.length,i=0;i<n;i++){ 9223if(n==1||$.trim(lines[i])!==''){ 9224$.extend(hash,{line:++j,selection:lines[i]}); 9225lines[i]=build(lines[i]).block; 9226}else{ 9227lines[i]=""; 9228} 9229} 9230string={block:lines.join('\n')}; 9231start=caretPosition; 9232len=string.block.length+((browser.opera)?n-1:0); 9233}else if(ctrlKey===true){ 9234string=build(selection); 9235start=caretPosition+string.openWith.length; 9236len=string.block.length-string.openWith.length-string.closeWith.length; 9237len=len-(string.block.match(/ $/)?1:0); 9238len-=fixIeBug(string.block); 9239}else if(shiftKey===true){ 9240string=build(selection); 9241start=caretPosition; 9242len=string.block.length; 9243len-=fixIeBug(string.block); 9244}else{ 9245string=build(selection); 9246start=caretPosition+string.block.length; 9247len=0; 9248start-=fixIeBug(string.block); 9249} 9250if((selection===''&&string.replaceWith==='')){ 9251caretOffset+=fixOperaBug(string.block); 9252start=caretPosition+string.openBlockWith.length+string.openWith.length; 9253len=string.block.length-string.openBlockWith.length-string.openWith.length-string.closeWith.length-string.closeBlockWith.length; 9254caretOffset=$$.val().substring(caretPosition,$$.val().length).length; 9255caretOffset-=fixOperaBug($$.val().substring(0,caretPosition)); 9256} 9257$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition}); 9258if(string.block!==selection&&abort===false){ 9259insert(string.block); 9260set(start,len); 9261}else{ 9262caretOffset=-1; 9263} 9264get(); 9265$.extend(hash,{line:'',selection:selection}); 9266if((ctrlKey===true&&shiftKey===true)||button.multiline===true){ 9267prepare(clicked.afterMultiInsert); 9268} 9269prepare(clicked.afterInsert); 9270prepare(options.afterInsert); 9271if(previewWindow&&options.previewAutoRefresh){ 9272refreshPreview(); 9273} 9274textarea.dispatchEvent(new Event('input')); 9275shiftKey=altKey=ctrlKey=abort=false; 9276} 9277function fixOperaBug(string){ 9278if(browser.opera){ 9279return string.length-string.replace(/\n*/g,'').length; 9280} 9281return 0; 9282} 9283function fixIeBug(string){ 9284if(browser.msie){ 9285return string.length-string.replace(/\r*/g,'').length; 9286} 9287return 0; 9288} 9289function insert(block){ 9290if(document.selection){ 9291var newSelection=document.selection.createRange(); 9292newSelection.text=block; 9293}else{ 9294textarea.value=textarea.value.substring(0,caretPosition)+block+textarea.value.substring(caretPosition+selection.length,textarea.value.length); 9295} 9296} 9297function set(start,len){ 9298if(textarea.createTextRange){ 9299if(browser.opera&&browser.version>=9.5&&len==0){ 9300return false;
9301} 9302range=textarea.createTextRange(); 9303range.collapse(true); 9304range.moveStart('character',start); 9305range.moveEnd('character',len); 9306range.select(); 9307}else if(textarea.setSelectionRange){ 9308textarea.setSelectionRange(start,start+len); 9309} 9310textarea.scrollTop=scrollPosition; 9311textarea.focus(); 9312} 9313function get(){ 9314textarea.focus(); 9315scrollPosition=textarea.scrollTop; 9316if(document.selection){ 9317selection=document.selection.createRange().text; 9318if(browser.msie){ 9319var range=document.selection.createRange(),rangeCopy=range.duplicate(); 9320rangeCopy.moveToElementText(textarea); 9321caretPosition=-1; 9322while(rangeCopy.inRange(range)){ 9323rangeCopy.moveStart('character'); 9324caretPosition++; 9325} 9326}else{ 9327caretPosition=textarea.selectionStart; 9328} 9329}else{ 9330caretPosition=textarea.selectionStart; 9331selection=textarea.value.substring(caretPosition,textarea.selectionEnd); 9332} 9333return selection; 9334} 9335function preview(){ 9336if(typeof options.previewHandler==='function'){ 9337previewWindow=true; 9338}else if(options.previewInElement){ 9339previewWindow=$(options.previewInElement); 9340}else if(!previewWindow||previewWindow.closed){ 9341if(options.previewInWindow){ 9342previewWindow=window.open('','preview',options.previewInWindow); 9343$(window).unload(function(){ 9344previewWindow.close(); 9345}); 9346}else{ 9347iFrame=$('<iframe class="markItUpPreviewFrame"></iframe>'); 9348if(options.previewPosition=='after'){ 9349iFrame.insertAfter(footer); 9350}else{ 9351iFrame.insertBefore(header); 9352} 9353previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1]; 9354} 9355}else if(altKey===true){ 9356if(iFrame){ 9357iFrame.remove(); 9358}else{ 9359previewWindow.close(); 9360} 9361previewWindow=iFrame=false; 9362} 9363if(!options.previewAutoRefresh){ 9364refreshPreview(); 9365} 9366if(options.previewInWindow){ 9367previewWindow.focus(); 9368} 9369} 9370function refreshPreview(){ 9371renderPreview(); 9372} 9373function renderPreview(){ 9374var phtml; 9375var parsedData=$$.val(); 9376if(options.previewParser&&typeof options.previewParser==='function'){ 9377parsedData=options.previewParser(parsedData); 9378} 9379if(options.previewHandler&&typeof options.previewHandler==='function'){ 9380options.previewHandler(parsedData); 9381}else if(options.previewParserPath!==''){ 9382$.ajax({ 9383type:options.previewParserAjaxType, 9384dataType:'text', 9385global:false, 9386url:options.previewParserPath, 9387data:options.previewParserVar+'='+encodeURIComponent(parsedData), 9388success:function(data){ 9389writeInPreview(localize(data,1)); 9390} 9391}); 9392}else{ 9393if(!template){ 9394$.ajax({ 9395url:options.previewTemplatePath, 9396dataType:'text', 9397global:false, 9398success:function(data){ 9399writeInPreview(localize(data,1).replace(/<!-- content -->/g,parsedData)); 9400} 9401}); 9402} 9403} 9404return false; 9405} 9406function writeInPreview(data){ 9407if(options.previewInElement){ 9408$(options.previewInElement).html(data); 9409}else if(previewWindow&&previewWindow.document){ 9410try{ 9411sp=previewWindow.document.documentElement.scrollTop 9412}catch(e){ 9413sp=0; 9414} 9415previewWindow.document.open(); 9416previewWindow.document.write(data); 9417previewWindow.document.close(); 9418previewWindow.document.documentElement.scrollTop=sp; 9419} 9420} 9421function keyPressed(e){ 9422shiftKey=e.shiftKey; 9423altKey=e.altKey; 9424ctrlKey=(!(e.altKey&&e.ctrlKey))?(e.ctrlKey||e.metaKey):false; 9425if(e.type==='keydown'){ 9426if(ctrlKey===true){ 9427li=$('a[accesskey="'+((e.keyCode==13)?'\\n':String.fromCharCode(e.keyCode))+'"]',header).parent('li'); 9428if(li.length!==0){ 9429ctrlKey=false; 9430setTimeout(function(){ 9431li.triggerHandler('mouseup'); 9432},1); 9433return false; 9434} 9435} 9436if(!browser.opera){ 9437if(e.keyCode===13||e.keyCode===10){ 9438if(ctrlKey===true){ 9439ctrlKey=false; 9440markup(options.onCtrlEnter); 9441if(!options.onCtrlEnter.keepDefault){ 9442textarea.dispatchEvent(new Event('input')); 9443} 9444return options.onCtrlEnter.keepDefault; 9445}else if(shiftKey===true){ 9446shiftKey=false; 9447markup(options.onShiftEnter); 9448if(!options.onShiftEnter.keepDefault){ 9449textarea.dispatchEvent(new Event('input')); 9450} 9451return options.onShiftEnter.keepDefault; 9452}else{ 9453markup(options.onEnter); 9454if(!options.onEnter.keepDefault){ 9455textarea.dispatchEvent(new Event('input')); 9456} 9457return options.onEnter.keepDefault; 9458} 9459} 9460if(e.keyCode===9){ 9461if(shiftKey==true||ctrlKey==true||altKey==true){ 9462return false; 9463} 9464if(caretOffset!==-1){ 9465get(); 9466caretOffset=$$.val().length-caretOffset; 9467set(caretOffset,0); 9468caretOffset=-1; 9469return false; 9470}else{ 9471markup(options.onTab); 9472return options.onTab.keepDefault; 9473} 9474} 9475} 9476} 9477} 9478function remove(){ 9479$$.off(".markItUp").removeClass('markItUpEditor'); 9480$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$); 9481var relativeRef=$$.parent('div').parent('div.markItUp').parent('div'); 9482if(relativeRef.length){ 9483relativeRef.replaceWith($$); 9484} 9485$$.data('markItUp',null); 9486} 9487init(); 9488}); 9489}; 9490$.fn.markItUpRemove=function(){ 9491return this.each(function(){ 9492$(this).markItUp('remove'); 9493} 9494); 9495}; 9496$.markItUp=function(settings){ 9497var options={target:false}; 9498$.extend(options,settings); 9499if(options.target){ 9500return $(options.target).each(function(){ 9501$(this).focus(); 9502$(this).trigger('insertion',[options]); 9503}); 9504}else{ 9505$('textarea').trigger('insertion',[options]); 9506} 9507}; 9508})(jQuery); 9509 9510 9511/* plugins-dist/dist/core/porte_plume/javascript/jquery.previsu_spip.js?1790181875 */ 9512;(function($){ 9513$.fn.previsu_spip=function(settings){ 9514var options; 9515options={ 9516previewParserPath:'', 9517previewParserVar:'data', 9518textEditer:'Editer', 9519textVoir:'Voir', 9520textFullScreen:'Plein écran' 9521}; 9522$.extend(options,settings); 9523return this.each(function(){ 9524var $$,textarea,tabs,preview; 9525$$=$(this); 9526textarea=this;
9527function init(){ 9528$$.addClass("pp_previsualisation"); 9529if(!$$.parent().has('.markItUpContainer').length){ 9530$$.barre_outils('vide'); 9531} 9532var mark=$$.parent(); 9533tabs=$('<div class="markItUpTabs"></div>').prependTo(mark); 9534$(tabs).append( 9535'<a href="#fullscreen" class="fullscreen">'+options.textFullScreen+'</a>'+ 9536'<a href="#previsuVoir" class="previsuVoir">'+options.textVoir+'</a>'+ 9537'<a href="#previsuEditer" class="previsuEditer on">'+options.textEditer+'</a>' 9538); 9539preview=$('<div class="markItUpPreview"></div>').insertAfter(mark.find('.markItUpHeader')); 9540preview.hide(); 9541var is_full_screen=false; 9542var objet=mark.parents('.formulaire_spip')[0].className.match(/formulaire_editer_(\w+)/); 9543objet=(objet?objet[1]:''); 9544var champ=mark.parents('.editer')[0].className.match(/editer_(\w+)/); 9545champ=(champ?champ[1].toUpperCase():''); 9546var textarea=mark.find('textarea.pp_previsualisation'); 9547var preview=mark.find('.markItUpPreview'); 9548var dir=textarea.attr('dir'); 9549if(dir){ 9550preview.attr('dir',dir); 9551} 9552tabs.find('.fullscreen').click(function(){ 9553if(!mark.is('.fullscreen')){ 9554textarea.data('height-origin',textarea.css('height')); 9555} 9556mark.toggleClass('fullscreen'); 9557if(mark.is('.fullscreen')){ 9558$('body').addClass('markitup-fullscreen'); 9559is_full_screen=true; 9560mark.find('.markItUpHeader a').show(); 9561if(!mark.is('.livepreview')){ 9562var original_texte=""; 9563function refresh_preview(){ 9564var texte=textarea.val(); 9565if(original_texte==texte){ 9566return; 9567} 9568renderPreview(preview.addClass('ajaxLoad'),texte,champ,objet); 9569original_texte=texte; 9570} 9571var timerPreview=null; 9572mark.addClass('livepreview').find('.markItUpEditor').on('keyup click change focus refreshpreview',function(e){ 9573if(is_full_screen){ 9574if(timerPreview)clearTimeout(timerPreview); 9575timerPreview=setTimeout(refresh_preview,500); 9576} 9577}); 9578$(window).on('keyup',function(e){ 9579if(is_full_screen){ 9580if(e.type=='keyup'&&e.keyCode==27&&!markitup_prompt){ 9581mark.removeClass('fullscreen'); 9582$('body').removeClass('markitup-fullscreen'); 9583textarea.css('height',textarea.data('height-origin')); 9584is_full_screen=false; 9585} 9586} 9587}); 9588} 9589mark.find('.markItUpEditor').trigger('refreshpreview'); 9590} 9591else{ 9592$('body').removeClass('markitup-fullscreen'); 9593textarea.css('height',textarea.data('height-origin')); 9594if($(this).next().hasClass('on')){ 9595mark.find('.markItUpHeader a').hide(); 9596} 9597is_full_screen=false; 9598} 9599return false; 9600}); 9601tabs.find('.previsuVoir').click(function(){ 9602preview.height( 9603mark.find('.markItUpEditor').height() 9604+mark.find('.markItUpFooter').height() 9605); 9606mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').hide(); 9607$(this).addClass('on').next().removeClass('on'); 9608renderPreview( 9609preview.show().addClass('ajaxLoad'), 9610mark.find('textarea.pp_previsualisation').val(), 9611champ, 9612objet, 9613false 9614); 9615return false; 9616}); 9617tabs.find('.previsuEditer').click(function(){ 9618mark.find('.markItUpPreview').hide(); 9619mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').show(); 9620$(this).addClass('on').prev().removeClass('on'); 9621return false; 9622}); 9623} 9624function renderPreview(node,val,champ,objet,async){ 9625if(options.previewParserPath!==''){ 9626$.ajax({ 9627type:'POST', 9628async:typeof(async)=="undefined"?true:async, 9629url:options.previewParserPath, 9630data:'champ='+champ 9631+'&objet='+objet 9632+'&'+options.previewParserVar+'='+encodeURIComponent(val), 9633success:function(data){ 9634node.html(data).removeClass('ajaxLoad'); 9635$("a",node).attr("target","blank"); 9636$(":input",node).attr("disabled","disabled"); 9637} 9638}); 9639} 9640} 9641init(); 9642}); 9643}; 9644})(jQuery); 9645 9646 9647/* local/cache-js/jsdyn-javascript_porte_plume_start_js-5bc16697.js?1790183638 */ 9648 9649barre_outils_edition={ 9650"nameSpace":"edition", 9651"previewAutoRefresh":false, 9652"onEnter":{ 9653"keepDefault":false, 9654"selectionType":"return", 9655"replaceWith":"\n" 9656}, 9657"onShiftEnter":{ 9658"keepDefault":false, 9659"replaceWith":"\n_ " 9660}, 9661"onCtrlEnter":{ 9662"keepDefault":false, 9663"replaceWith":"\n\n" 9664}, 9665"markupSet":[ 9666{ 9667"name":"Transformer en {{{intertitre}}}", 9668"key":"H", 9669"className":"outil_header1", 9670"openWith":"\n{{{", 9671"closeWith":"}}}\n", 9672"selectionType":"line" 9673}, 9674{ 9675"name":"Mettre en {{gras}}", 9676"key":"B", 9677"className":"outil_bold", 9678"replaceWith":function(h){return espace_si_accolade(h,'{{','}}');}, 9679"selectionType":"word" 9680}, 9681{ 9682"name":"Mettre en {italique}", 9683"key":"I", 9684"className":"outil_italic", 9685"replaceWith":function(h){return espace_si_accolade(h,'{','}');}, 9686"selectionType":"word" 9687}, 9688{ 9689"name":"Mettre en liste", 9690"className":"outil_liste_ul separateur_avant", 9691"replaceWith":function(h){return outil_liste(h,'*');}, 9692"selectionType":"line", 9693"forceMultiline":true, 9694"dropMenu":[ 9695{ 9696"id":"liste_ol", 9697"name":"Mettre en liste num\u00e9rot\u00e9e", 9698"className":"outil_liste_ol", 9699"replaceWith":function(h){return outil_liste(h,'#');}, 9700"display":true, 9701"selectionType":"line", 9702"forceMultiline":true 9703}, 9704{ 9705"id":"desindenter", 9706"name":"D\u00e9sindenter une liste", 9707"className":"outil_desindenter", 9708"replaceWith":function(h){return outil_desindenter(h);}, 9709"display":true, 9710"selectionType":"line", 9711"forceMultiline":true 9712}, 9713{ 9714"id":"indenter", 9715"name":"Indenter une liste", 9716"className":"outil_indenter", 9717"replaceWith":function(h){return outil_indenter(h);}, 9718"display":true, 9719"selectionType":"line", 9720"forceMultiline":true 9721} 9722] 9723}, 9724{ 9725"name":"Transformer en [lien hypertexte->http:\/\/...]", 9726"key":"L", 9727"className":"outil_link separateur separateur_apres sepLink", 9728"openWith":"[", 9729"closeWith":"->[![Veuillez indiquer l\u2019adresse de votre lien (vous pouvez indiquer une adresse Internet sous la forme http:\/\/www.monsite.com, une adresse courriel, ou simplement indiquer le num\u00e9ro d\u2019un article de ce site.]!]]" 9730}, 9731{ 9732"name":"Transformer en [[Note de bas de page]]", 9733"className":"outil_notes separateur_avant", 9734"openWith":"[[", 9735"closeWith":"]]", 9736"selectionType":"word" 9737}, 9738{ 9739"name":"<quote>Citer un message<\/quote>", 9740"key":"Q", 9741"className":"outil_quote separateur separateur_apres sepGuillemets", 9742"openWith":"\n<quote>", 9743"closeWith":"<\/quote>\n", 9744"selectionType":"word", 9745"dropMenu":[ 9746{ 9747"id":"barre_poesie", 9748"name":"Mettre en forme comme une <poesie>po\u00e9sie<\/poesie>", 9749"className":"outil_poesie", 9750"openWith":"\n<poesie>", 9751"closeWith":"<\/poesie>\n", 9752"display":true, 9753"selectionType":"line" 9754} 9755] 9756}, 9757{
9758"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb", 9759"className":"outil_guillemets", 9760"openWith":"«", 9761"closeWith":"»", 9762"lang":[ 9763"fr", 9764"eo", 9765"cpf", 9766"ar", 9767"es" 9768], 9769"selectionType":"word", 9770"dropMenu":[ 9771{ 9772"id":"guillemets_simples", 9773"name":"Entourer de \u201cguillemets de second niveau\u201d", 9774"className":"outil_guillemets_simples", 9775"openWith":"â", 9776"closeWith":"â", 9777"display":true, 9778"lang":[ 9779"fr", 9780"eo", 9781"cpf", 9782"ar", 9783"es" 9784], 9785"selectionType":"word" 9786} 9787] 9788}, 9789{ 9790"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb", 9791"className":"outil_guillemets_de", 9792"openWith":"â", 9793"closeWith":"â", 9794"lang":[ 9795"bg", 9796"de", 9797"pl", 9798"hr", 9799"src" 9800], 9801"selectionType":"word", 9802"dropMenu":[ 9803{ 9804"id":"guillemets_de_simples", 9805"name":"Entourer de \u201cguillemets de second niveau\u201d", 9806"className":"outil_guillemets_de_simples", 9807"openWith":"‚", 9808"closeWith":"â", 9809"display":true, 9810"lang":[ 9811"bg", 9812"de", 9813"pl", 9814"hr", 9815"src" 9816], 9817"selectionType":"word" 9818} 9819] 9820}, 9821{ 9822"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb", 9823"className":"outil_guillemets_simples separateur_avant", 9824"openWith":"â", 9825"closeWith":"â", 9826"lang_not":[ 9827"fr", 9828"eo", 9829"cpf", 9830"ar", 9831"es", 9832"bg", 9833"de", 9834"pl", 9835"hr", 9836"src" 9837], 9838"selectionType":"word", 9839"dropMenu":[ 9840{ 9841"id":"guillemets_autres_simples", 9842"name":"Entourer de \u201cguillemets de second niveau\u201d", 9843"className":"outil_guillemets_uniques", 9844"openWith":"â", 9845"closeWith":"â", 9846"display":true, 9847"lang_not":[ 9848"fr", 9849"eo", 9850"cpf", 9851"ar", 9852"es", 9853"bg", 9854"de", 9855"pl", 9856"hr", 9857"src" 9858], 9859"selectionType":"word" 9860} 9861] 9862}, 9863{ 9864"name":"Ins\u00e9rer des caract\u00e8res sp\u00e9cifiques", 9865"className":"outil_caracteres separateur separateur_apres sepCaracteres separateur_avant", 9866"dropMenu":[ 9867{ 9868"id":"A_grave", 9869"name":"Ins\u00e9rer un \u00c0", 9870"className":"outil_a_maj_grave", 9871"replaceWith":"Ã", 9872"display":true, 9873"lang":[ 9874"fr", 9875"eo", 9876"cpf" 9877] 9878}, 9879{ 9880"id":"E_aigu", 9881"name":"Ins\u00e9rer un \u00c9", 9882"className":"outil_e_maj_aigu", 9883"replaceWith":"Ã", 9884"display":true, 9885"lang":[ 9886"fr", 9887"eo", 9888"cpf" 9889] 9890}, 9891{ 9892"id":"E_grave", 9893"name":"Ins\u00e9rer un \u00c8", 9894"className":"outil_e_maj_grave", 9895"replaceWith":"Ã", 9896"display":true, 9897"lang":[ 9898"fr", 9899"eo", 9900"cpf" 9901] 9902}, 9903{ 9904"id":"aelig", 9905"name":"Ins\u00e9rer un \u00e6", 9906"className":"outil_aelig", 9907"replaceWith":"æ", 9908"display":true, 9909"lang":[ 9910"fr", 9911"eo", 9912"cpf" 9913] 9914}, 9915{ 9916"id":"AElig", 9917"name":"Ins\u00e9rer un \u00c6", 9918"className":"outil_aelig_maj", 9919"replaceWith":"Ã", 9920"display":true, 9921"lang":[ 9922"fr", 9923"eo", 9924"cpf" 9925] 9926}, 9927{ 9928"id":"oe", 9929"name":"Ins\u00e9rer un \u0153", 9930"className":"outil_oe", 9931"replaceWith":"Å", 9932"display":true, 9933"lang":[ 9934"fr" 9935] 9936}, 9937{ 9938"id":"OE", 9939"name":"Ins\u00e9rer un \u0152", 9940"className":"outil_oe_maj", 9941"replaceWith":"Å", 9942"display":true, 9943"lang":[ 9944"fr" 9945] 9946}, 9947{ 9948"id":"Ccedil", 9949"name":"Ins\u00e9rer un \u00c7", 9950"className":"outil_ccedil_maj", 9951"replaceWith":"Ã", 9952"display":true, 9953"lang":[ 9954"fr", 9955"eo", 9956"cpf" 9957] 9958}, 9959{ 9960"id":"uppercase", 9961"name":"Passer en majuscules", 9962"className":"outil_uppercase", 9963"replaceWith":function(markitup){return markitup.selection.toUpperCase()}, 9964"display":true, 9965"lang":[ 9966"fr", 9967"en" 9968] 9969}, 9970{ 9971"id":"lowercase", 9972"name":"Passer en minuscules", 9973"className":"outil_lowercase", 9974"replaceWith":function(markitup){return markitup.selection.toLowerCase()}, 9975"display":true, 9976"lang":[ 9977"fr", 9978"en" 9979] 9980} 9981] 9982}, 9983{ 9984"name":"Ins\u00e9rer un code informatique (`)", 9985"className":"outil_code separateur separateur_apres sepCode", 9986"openWith":"`", 9987"closeWith":"`", 9988"dropMenu":[ 9989{ 9990"id":"cadre", 9991"name":"Ins\u00e9rer un code pr\u00e9format\u00e9 (```)", 9992"className":"outil_cadre", 9993"openWith":"```\n", 9994"closeWith":"\n```", 9995"display":true 9996} 9997] 9998} 9999] 10000} 10001function outil_liste(h,c){ 10002if((s=h.selection)&&(r=s.match(/^-([*#]+) (.*)$/))){ 10003r[1]=r[1].replace(/[#*]/g,c); 10004s='-'+r[1]+' '+r[2]; 10005}else{ 10006s='-'+c+' '+s; 10007} 10008return s; 10009} 10010function outil_indenter(h){ 10011if(s=h.selection){ 10012if(s.substr(0,2)=='-*'){ 10013s='-**'+s.substr(2); 10014}else if(s.substr(0,2)=='-#'){ 10015s='-##'+s.substr(2); 10016}else{ 10017s='-* '+s; 10018} 10019} 10020return s; 10021} 10022function outil_desindenter(h){ 10023if(s=h.selection){ 10024if(s.substr(0,3)=='-**'){ 10025s='-*'+s.substr(3); 10026}else if(s.substr(0,3)=='-* '){ 10027s=s.substr(3); 10028}else if(s.substr(0,3)=='-##'){ 10029s='-#'+s.substr(3); 10030}else if(s.substr(0,3)=='-# '){ 10031s=s.substr(3); 10032} 10033} 10034return s; 10035} 10036function espace_si_accolade(h,openWith,closeWith){ 10037if(s=h.selection){ 10038if(s.charAt(0)=='{'){ 10039return openWith+' '+s+' '+closeWith; 10040} 10041else if(c=h.textarea.selectionStart){ 10042if(h.textarea.value.charAt(c-1)=='{'){ 10043return' '+openWith+s+closeWith+' '; 10044} 10045} 10046} 10047return openWith+s+closeWith; 10048} 10049barre_outils_forum={ 10050"nameSpace":"forum", 10051"previewAutoRefresh":false, 10052"onEnter":{ 10053"keepDefault":false, 10054"selectionType":"return", 10055"replaceWith":"\n" 10056}, 10057"onShiftEnter":{ 10058"keepDefault":false, 10059"replaceWith":"\n_ " 10060}, 10061"onCtrlEnter":{ 10062"keepDefault":false, 10063"replaceWith":"\n\n" 10064}, 10065"markupSet":[ 10066{ 10067"name":"Mettre en {{gras}}", 10068"key":"B", 10069"className":"outil_bold", 10070"replaceWith":function(h){return espace_si_accolade(h,'{{','}}');}, 10071"selectionType":"word" 10072}, 10073{ 10074"name":"Mettre en {italique}", 10075"key":"I", 10076"className":"outil_italic separateur_avant", 10077"replaceWith":function(h){return espace_si_accolade(h,'{','}');}, 10078"selectionType":"word" 10079}, 10080{ 10081"name":"Transformer en [lien hypertexte->http:\/\/...]", 10082"key":"L", 10083"className":"outil_link separateur separateur_apres sepLink separateur_avant", 10084"openWith":"[", 10085"closeWith":"->[![Veuillez indiquer l\u2019adresse de votre lien (vous pouvez indiquer une adresse Internet sous la forme http:\/\/www.monsite.com, une adresse courriel, ou simplement indiquer le num\u00e9ro d\u2019un article de ce site.]!]]" 10086}, 10087{ 10088"name":"<quote>Citer un message<\/quote>", 10089"key":"Q", 10090"className":"outil_quote separateur separateur_apres sepGuillemets", 10091"openWith":"\n<quote>", 10092"closeWith":"<\/quote>\n", 10093"selectionType":"word" 10094}, 10095{
10096"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb", 10097"className":"outil_guillemets", 10098"openWith":"«", 10099"closeWith":"»", 10100"lang":[ 10101"fr", 10102"eo", 10103"cpf", 10104"ar", 10105"es" 10106], 10107"selectionType":"word", 10108"dropMenu":[ 10109{ 10110"id":"guillemets_simples", 10111"name":"Entourer de \u201cguillemets de second niveau\u201d", 10112"className":"outil_guillemets_simples", 10113"openWith":"â", 10114"closeWith":"â", 10115"display":true, 10116"lang":[ 10117"fr", 10118"eo", 10119"cpf", 10120"ar", 10121"es" 10122], 10123"selectionType":"word" 10124} 10125] 10126}, 10127{ 10128"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb", 10129"className":"outil_guillemets_de", 10130"openWith":"â", 10131"closeWith":"â", 10132"lang":[ 10133"bg", 10134"de", 10135"pl", 10136"hr", 10137"src" 10138], 10139"selectionType":"word", 10140"dropMenu":[ 10141{ 10142"id":"guillemets_de_simples", 10143"name":"Entourer de \u201cguillemets de second niveau\u201d", 10144"className":"outil_guillemets_de_simples", 10145"openWith":"‚", 10146"closeWith":"â", 10147"display":true, 10148"lang":[ 10149"bg", 10150"de", 10151"pl", 10152"hr", 10153"src" 10154], 10155"selectionType":"word" 10156} 10157] 10158}, 10159{ 10160"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb", 10161"className":"outil_guillemets_simples separateur_avant", 10162"openWith":"â", 10163"closeWith":"â", 10164"lang_not":[ 10165"fr", 10166"eo", 10167"cpf", 10168"ar", 10169"es", 10170"bg", 10171"de", 10172"pl", 10173"hr", 10174"src" 10175], 10176"selectionType":"word", 10177"dropMenu":[ 10178{ 10179"id":"guillemets_autres_simples", 10180"name":"Entourer de \u201cguillemets de second niveau\u201d", 10181"className":"outil_guillemets_uniques", 10182"openWith":"â", 10183"closeWith":"â", 10184"display":true, 10185"lang_not":[ 10186"fr", 10187"eo", 10188"cpf", 10189"ar", 10190"es", 10191"bg", 10192"de", 10193"pl", 10194"hr", 10195"src" 10196], 10197"selectionType":"word" 10198} 10199] 10200} 10201] 10202} 10203function outil_liste(h,c){ 10204if((s=h.selection)&&(r=s.match(/^-([*#]+) (.*)$/))){ 10205r[1]=r[1].replace(/[#*]/g,c); 10206s='-'+r[1]+' '+r[2]; 10207}else{ 10208s='-'+c+' '+s; 10209} 10210return s; 10211} 10212function outil_indenter(h){ 10213if(s=h.selection){ 10214if(s.substr(0,2)=='-*'){ 10215s='-**'+s.substr(2); 10216}else if(s.substr(0,2)=='-#'){ 10217s='-##'+s.substr(2); 10218}else{ 10219s='-* '+s; 10220} 10221} 10222return s; 10223} 10224function outil_desindenter(h){ 10225if(s=h.selection){ 10226if(s.substr(0,3)=='-**'){ 10227s='-*'+s.substr(3); 10228}else if(s.substr(0,3)=='-* '){ 10229s=s.substr(3); 10230}else if(s.substr(0,3)=='-##'){ 10231s='-#'+s.substr(3); 10232}else if(s.substr(0,3)=='-# '){ 10233s=s.substr(3); 10234} 10235} 10236return s; 10237} 10238function espace_si_accolade(h,openWith,closeWith){ 10239if(s=h.selection){ 10240if(s.charAt(0)=='{'){ 10241return openWith+' '+s+' '+closeWith; 10242} 10243else if(c=h.textarea.selectionStart){ 10244if(h.textarea.value.charAt(c-1)=='{'){ 10245return' '+openWith+s+closeWith+' '; 10246} 10247} 10248} 10249return openWith+s+closeWith; 10250} 10251barre_outils_vide={ 10252"nameSpace":"vide", 10253"previewAutoRefresh":false, 10254"markupSet":[] 10255} 10256;(function($){ 10257$.fn.barre_outils=function(nom,settings){ 10258options={ 10259lang:'fr' 10260}; 10261$.extend(options,settings); 10262return $(this) 10263.not('.markItUpEditor, .no_barre') 10264.markItUp(eval('barre_outils_'+nom),{lang:options.lang}) 10265.trigger('markItUpEditor.loaded') 10266.parent().find('.markItUpButton a').attr('tabindex',-1) 10267.end(); 10268}; 10269$.fn.barre_previsualisation=function(settings){ 10270options={ 10271previewParserPath:"index.php?action=porte_plume_previsu", 10272textEditer:"Modifier", 10273textVoir:"Voir" 10274}; 10275$.extend(options,settings); 10276return $(this) 10277.not('.pp_previsualisation, .no_previsualisation') 10278.previsu_spip(options) 10279.trigger('markItUpPreview.loaded') 10280.parent().find('.markItUpTabs a').attr('tabindex',-1) 10281.end(); 10282}; 10283$(window).on('load',function(){ 10284function barrebouilles(){ 10285$('.formulaire_spip textarea.inserer_barre_forum').barre_outils('forum'); 10286$('.formulaire_spip textarea.inserer_barre_edition').barre_outils('edition'); 10287$('.formulaire_spip textarea.inserer_previsualisation').barre_previsualisation(); 10288$('textarea.textarea_forum').barre_outils('forum'); 10289$('.formulaire_spip:not(#formulaire_forum) textarea[name=texte]') 10290.barre_outils('edition').end() 10291.barre_previsualisation(); 10292} 10293barrebouilles(); 10294onAjaxLoad(barrebouilles); 10295}); 10296})(jQuery); 10297 10298 10299/* prive/javascript/js.cookie.js?1790181870 */ 10300 10301; 10302(function(global,factory){ 10303typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(): 10304typeof define==='function'&&define.amd?define(factory): 10305(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){ 10306var current=global.Cookies; 10307var exports=global.Cookies=factory(); 10308exports.noConflict=function(){global.Cookies=current;return exports;}; 10309})()); 10310})(this,(function(){'use strict'; 10311function assign(target){ 10312for(var i=1;i<arguments.length;i++){ 10313var source=arguments[i]; 10314for(var key in source){ 10315target[key]=source[key]; 10316} 10317} 10318return target 10319} 10320var defaultConverter={ 10321read:function(value){ 10322if(value[0]==='"'){ 10323value=value.slice(1,-1); 10324} 10325return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent) 10326}, 10327write:function(value){ 10328return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, 10329decodeURIComponent 10330) 10331} 10332}; 10333function init(converter,defaultAttributes){ 10334function set(name,value,attributes){ 10335if(typeof document==='undefined'){ 10336return 10337} 10338attributes=assign({},defaultAttributes,attributes); 10339if(typeof attributes.expires==='number'){ 10340attributes.expires=new Date(Date.now()+attributes.expires*864e5); 10341} 10342if(attributes.expires){ 10343attributes.expires=attributes.expires.toUTCString(); 10344} 10345name=encodeURIComponent(name)
10346.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent) 10347.replace(/[()]/g,escape); 10348var stringifiedAttributes=''; 10349for(var attributeName in attributes){ 10350if(!attributes[attributeName]){ 10351continue 10352} 10353stringifiedAttributes+='; '+attributeName; 10354if(attributes[attributeName]===true){ 10355continue 10356} 10357stringifiedAttributes+='='+attributes[attributeName].split(';')[0]; 10358} 10359return(document.cookie= 10360name+'='+converter.write(value,name)+stringifiedAttributes) 10361} 10362function get(name){ 10363if(typeof document==='undefined'||(arguments.length&&!name)){ 10364return 10365} 10366var cookies=document.cookie?document.cookie.split('; '):[]; 10367var jar={}; 10368for(var i=0;i<cookies.length;i++){ 10369var parts=cookies[i].split('='); 10370var value=parts.slice(1).join('='); 10371try{ 10372var found=decodeURIComponent(parts[0]); 10373jar[found]=converter.read(value,found); 10374if(name===found){ 10375break 10376} 10377}catch(e){} 10378} 10379return name?jar[name]:jar 10380} 10381return Object.create( 10382{ 10383set, 10384get, 10385remove:function(name,attributes){ 10386set( 10387name, 10388'', 10389assign({},attributes,{ 10390expires:-1 10391}) 10392); 10393}, 10394withAttributes:function(attributes){ 10395return init(this.converter,assign({},this.attributes,attributes)) 10396}, 10397withConverter:function(converter){ 10398return init(assign({},this.converter,converter),this.attributes) 10399} 10400}, 10401{ 10402attributes:{value:Object.freeze(defaultAttributes)}, 10403converter:{value:Object.freeze(converter)} 10404} 10405) 10406} 10407var api=init(defaultConverter,{path:'/'}); 10408return api; 10409})); 10410 10411 10412/* local/cache-js/jsdyn-socialtags_js-67080869.js?1790183628 */ 10413 10414;var socialtags_addfavorite=function(u,t){ 10415if(document.all)window.external.AddFavorite(u,t); 10416}; 10417(function($){ 10418var socialtags_init=function(){ 10419var selector=$('.contenu_article'); 10420if(!selector.length)return; 10421var socialtags=[ 10422{a:'facebook',n:'Facebook',i:'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQgNjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDY0IDY0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cgkuc3Qxe2ZpbGw6IzNBNTU5Rjt9Cjwvc3R5bGU+CjxnPgoJPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMzIiIGN5PSIzMiIgcj0iMjQuMSIvPgoJPGc+CgkJPHJlY3QgeT0iMCIgY2xhc3M9InN0MSIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzkuOSwzMy4xaC01LjJjMCw4LjQsMCwxOC42LDAsMTguNmgtNy42YzAsMCwwLTEwLjIsMC0xOC42aC0zLjZ2LTYuNmgzLjZ2LTQuM2MwLTMsMS4yLTcuNiw3LjYtNy42aDUuOHY2LjQKCQkJYzAsMC0zLjQsMC00LjEsMGMtMC42LDAtMS41LDAuMi0xLjUsMnYzLjhoNS41TDM5LjksMzMuMXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K',w:0,h:0,u:'http://www.facebook.com/sharer/sharer.php?u=%u&t=%t',u_site:'https://www.fidh.org'}, 10423{a:'twitter',n:'Twitter',i:'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQgNjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDY0IDY0OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6IzBFMEYwRDt9Cgkuc3Qxe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+CjxnIGlkPSJYIj4KCTxyZWN0IHg9IjAiIHk9IjAiIGNsYXNzPSJzdDAiIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIvPgoJPGcgaWQ9ImxheWVyMSI+CgkJPHBhdGggaWQ9InBhdGgxMDA5IiBjbGFzcz0ic3QxIiBkPSJNMTEuMywxMi41bDE2LDIxLjRsLTE2LDE3LjVoMy42bDE0LjEtMTUuMWwxMS4zLDE1LjFoMTIuNEwzNS44LDI4LjhsMTUtMTYuM2gtMy42TDM0LjIsMjYuNgoJCQlMMjMuNywxMi41SDExLjN6IE0xNi42LDE1LjRoNS44bDI1LDMzLjZoLTUuNUwxNi42LDE1LjR6Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+Cg==',w:0,h:0,u:'http://twitter.com/intent/tweet?text=%t&via=%via&url=%u',u_site:'https://www.fidh.org'} 10424]; 10425var title=$('head > title').text()||''; 10426var description=($('meta[name=description]').attr('content')||'').substr(0,250); 10427var cano=$('link[rel=canonical]')[0]; 10428var url=cano?cano.href:document.location.href.split("%23")[0].split("#")[0]; 10429var ul=$('<ul><\/ul>'); 10430var esc=function(x){return encodeURIComponent(x).replace(/\s/g,' ');}; 10431var ref=document.referrer.match(/^.*\/\/([^\/]+)\//); 10432var via=$('meta[name="twitter:account"]').attr("content"); 10433if(ref&&ref[1].match(/\.facebook\./)) 10434Cookies.set('social_facebook',1,{path:'/',expires:30}); 10435$.each(socialtags,function(){if(this.u){ 10436if(this.a=='bookmark'&&!document.all)return; 10437$('<a rel="nofollow" onclick="if (this.href.lastIndexOf("javascript:") != 0 ) { window.open(this.href, "_blank", "screenX=50,left=50,screenY=50,top=50, width=550, height=450,toolbar=no, location=no,resizable=yes, scrollbars=yes");return false; }"><img class="socialtags-hovers" src="'+this.i+'" width="'+this.w+'" height="'+this.h+'" alt="'+this.a+'"\/><\/a>') 10438.attr('href', 10439this.u 10440.replace(/%u/g,esc(url)) 10441.replace(/%t/g,esc(title)) 10442.replace(/%d/g,esc(description)) 10443.replace(/%u_site/g,esc(this.u_site)) 10444.replace(/%via/g,esc(via)) 10445) 10446.attr('title',this.n).wrap('<li class="'+this.a+'"><\/li>') 10447.parent().appendTo(ul); 10448}}); 10449selector.after(ul.wrap('<div class="socialtags"><\/div>').parent()); 10450}; 10451$(function(){ 10452$(socialtags_init); 10453}); 10454})(jQuery); 10455 10456 10457/* squelettes/plugins/fidh/theme/bower_components/modernizr/modernizr.js */ 10458 10459window.Modernizr=(function(window,document,undefined){ 10460var version='2.8.3', 10461Modernizr={}, 10462enableClasses=true, 10463docElement=document.documentElement, 10464mod='modernizr', 10465modElem=document.createElement(mod), 10466mStyle=modElem.style, 10467inputElem=document.createElement('input'), 10468smile=':)', 10469toString={}.toString, 10470prefixes=' -webkit- -moz- -o- -ms- '.split(' '), 10471omPrefixes='Webkit Moz O ms', 10472cssomPrefixes=omPrefixes.split(' '), 10473domPrefixes=omPrefixes.toLowerCase().split(' '), 10474ns={'svg':'http://www.w3.org/2000/svg'}, 10475tests={}, 10476inputs={}, 10477attrs={}, 10478classes=[], 10479slice=classes.slice, 10480featureName, 10481injectElementWithStyles=function(rule,callback,nodes,testnames){ 10482var style,ret,node,docOverflow, 10483div=document.createElement('div'), 10484body=document.body, 10485fakeBody=body||document.createElement('body'); 10486if(parseInt(nodes,10)){ 10487while(nodes--){ 10488node=document.createElement('div'); 10489node.id=testnames?testnames[nodes]:mod+(nodes+1); 10490div.appendChild(node); 10491} 10492} 10493style=['­','<style id="s',mod,'">',rule,'</style>'].join(''); 10494div.id=mod; 10495(body?div:fakeBody).innerHTML+=style; 10496fakeBody.appendChild(div); 10497if(!body){ 10498fakeBody.style.background=''; 10499fakeBody.style.overflow='hidden'; 10500docOverflow=docElement.style.overflow; 10501docElement.style.overflow='hidden'; 10502docElement.appendChild(fakeBody); 10503} 10504ret=callback(div,rule); 10505if(!body){ 10506fakeBody.parentNode.removeChild(fakeBody); 10507docElement.style.overflow=docOverflow; 10508}else{ 10509div.parentNode.removeChild(div); 10510} 10511return!!ret; 10512}, 10513testMediaQuery=function(mq){ 10514var matchMedia=window.matchMedia||window.msMatchMedia; 10515if(matchMedia){ 10516return matchMedia(mq)&&matchMedia(mq).matches||false; 10517} 10518var bool; 10519injectElementWithStyles('@media '+mq+' { #'+mod+' { position: absolute; } }',function(node){ 10520bool=(window.getComputedStyle? 10521getComputedStyle(node,null): 10522node.currentStyle)['position']=='absolute'; 10523}); 10524return bool; 10525}, 10526isEventSupported=(function(){ 10527var TAGNAMES={ 10528'select':'input','change':'input', 10529'submit':'form','reset':'form', 10530'error':'img','load':'img','abort':'img' 10531}; 10532function isEventSupported(eventName,element){ 10533element=element||document.createElement(TAGNAMES[eventName]||'div'); 10534eventName='on'+eventName; 10535var isSupported=eventName in element; 10536if(!isSupported){ 10537if(!element.setAttribute){ 10538element=document.createElement('div'); 10539} 10540if(element.setAttribute&&element.removeAttribute){ 10541element.setAttribute(eventName,''); 10542isSupported=is(element[eventName],'function'); 10543if(!is(element[eventName],'undefined')){
10544element[eventName]=undefined; 10545} 10546element.removeAttribute(eventName); 10547} 10548} 10549element=null; 10550return isSupported; 10551} 10552return isEventSupported; 10553})(), 10554_hasOwnProperty=({}).hasOwnProperty,hasOwnProp; 10555if(!is(_hasOwnProperty,'undefined')&&!is(_hasOwnProperty.call,'undefined')){ 10556hasOwnProp=function(object,property){ 10557return _hasOwnProperty.call(object,property); 10558}; 10559} 10560else{ 10561hasOwnProp=function(object,property){ 10562return((property in object)&&is(object.constructor.prototype[property],'undefined')); 10563}; 10564} 10565if(!Function.prototype.bind){ 10566Function.prototype.bind=function bind(that){ 10567var target=this; 10568if(typeof target!="function"){ 10569throw new TypeError(); 10570} 10571var args=slice.call(arguments,1), 10572bound=function(){ 10573if(this instanceof bound){ 10574var F=function(){}; 10575F.prototype=target.prototype; 10576var self=new F(); 10577var result=target.apply( 10578self, 10579args.concat(slice.call(arguments)) 10580); 10581if(Object(result)===result){ 10582return result; 10583} 10584return self; 10585}else{ 10586return target.apply( 10587that, 10588args.concat(slice.call(arguments)) 10589); 10590} 10591}; 10592return bound; 10593}; 10594} 10595function setCss(str){ 10596mStyle.cssText=str; 10597} 10598function setCssAll(str1,str2){ 10599return setCss(prefixes.join(str1+';')+(str2||'')); 10600} 10601function is(obj,type){ 10602return typeof obj===type; 10603} 10604function contains(str,substr){ 10605return!!~(''+str).indexOf(substr); 10606} 10607function testProps(props,prefixed){ 10608for(var i in props){ 10609var prop=props[i]; 10610if(!contains(prop,"-")&&mStyle[prop]!==undefined){ 10611return prefixed=='pfx'?prop:true; 10612} 10613} 10614return false; 10615} 10616function testDOMProps(props,obj,elem){ 10617for(var i in props){ 10618var item=obj[props[i]]; 10619if(item!==undefined){ 10620if(elem===false)return props[i]; 10621if(is(item,'function')){ 10622return item.bind(elem||obj); 10623} 10624return item; 10625} 10626} 10627return false; 10628} 10629function testPropsAll(prop,prefixed,elem){ 10630var ucProp=prop.charAt(0).toUpperCase()+prop.slice(1), 10631props=(prop+' '+cssomPrefixes.join(ucProp+' ')+ucProp).split(' '); 10632if(is(prefixed,"string")||is(prefixed,"undefined")){ 10633return testProps(props,prefixed); 10634}else{ 10635props=(prop+' '+(domPrefixes).join(ucProp+' ')+ucProp).split(' '); 10636return testDOMProps(props,prefixed,elem); 10637} 10638} 10639tests['flexbox']=function(){ 10640return testPropsAll('flexWrap'); 10641}; 10642tests['flexboxlegacy']=function(){ 10643return testPropsAll('boxDirection'); 10644}; 10645tests['canvas']=function(){ 10646var elem=document.createElement('canvas'); 10647return!!(elem.getContext&&elem.getContext('2d')); 10648}; 10649tests['canvastext']=function(){ 10650return!!(Modernizr['canvas']&&is(document.createElement('canvas').getContext('2d').fillText,'function')); 10651}; 10652tests['webgl']=function(){ 10653return!!window.WebGLRenderingContext; 10654}; 10655tests['touch']=function(){ 10656var bool; 10657if(('ontouchstart'in window)||window.DocumentTouch&&document instanceof DocumentTouch){ 10658bool=true; 10659}else{ 10660injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''),function(node){ 10661bool=node.offsetTop===9; 10662}); 10663} 10664return bool; 10665}; 10666tests['geolocation']=function(){ 10667return'geolocation'in navigator; 10668}; 10669tests['postmessage']=function(){ 10670return!!window.postMessage; 10671}; 10672tests['websqldatabase']=function(){ 10673return!!window.openDatabase; 10674}; 10675tests['indexedDB']=function(){ 10676return!!testPropsAll("indexedDB",window); 10677}; 10678tests['hashchange']=function(){ 10679return isEventSupported('hashchange',window)&&(document.documentMode===undefined||document.documentMode>7); 10680}; 10681tests['history']=function(){ 10682return!!(window.history&&history.pushState); 10683}; 10684tests['draganddrop']=function(){ 10685var div=document.createElement('div'); 10686return('draggable'in div)||('ondragstart'in div&&'ondrop'in div); 10687}; 10688tests['websockets']=function(){ 10689return'WebSocket'in window||'MozWebSocket'in window; 10690}; 10691tests['rgba']=function(){ 10692setCss('background-color:rgba(150,255,150,.5)'); 10693return contains(mStyle.backgroundColor,'rgba'); 10694}; 10695tests['hsla']=function(){ 10696setCss('background-color:hsla(120,40%,100%,.5)'); 10697return contains(mStyle.backgroundColor,'rgba')||contains(mStyle.backgroundColor,'hsla'); 10698}; 10699tests['multiplebgs']=function(){ 10700setCss('background:url(https://),url(https://),red url(https://)'); 10701return(/(url\s*\(.*?){3}/).test(mStyle.background); 10702}; 10703tests['backgroundsize']=function(){ 10704return testPropsAll('backgroundSize'); 10705}; 10706tests['borderimage']=function(){ 10707return testPropsAll('borderImage'); 10708};
10709tests['borderradius']=function(){ 10710return testPropsAll('borderRadius'); 10711}; 10712tests['boxshadow']=function(){ 10713return testPropsAll('boxShadow'); 10714}; 10715tests['textshadow']=function(){ 10716return document.createElement('div').style.textShadow===''; 10717}; 10718tests['opacity']=function(){ 10719setCssAll('opacity:.55'); 10720return(/^0.55$/).test(mStyle.opacity); 10721}; 10722tests['cssanimations']=function(){ 10723return testPropsAll('animationName'); 10724}; 10725tests['csscolumns']=function(){ 10726return testPropsAll('columnCount'); 10727}; 10728tests['cssgradients']=function(){ 10729var str1='background-image:', 10730str2='gradient(linear,left top,right bottom,from(#9f9),to(white));', 10731str3='linear-gradient(left top,#9f9, white);'; 10732setCss( 10733(str1+'-webkit- '.split(' ').join(str2+str1)+ 10734prefixes.join(str3+str1)).slice(0,-str1.length) 10735); 10736return contains(mStyle.backgroundImage,'gradient'); 10737}; 10738tests['cssreflections']=function(){ 10739return testPropsAll('boxReflect'); 10740}; 10741tests['csstransforms']=function(){ 10742return!!testPropsAll('transform'); 10743}; 10744tests['csstransforms3d']=function(){ 10745var ret=!!testPropsAll('perspective'); 10746if(ret&&'webkitPerspective'in docElement.style){ 10747injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}',function(node,rule){ 10748ret=node.offsetLeft===9&&node.offsetHeight===3; 10749}); 10750} 10751return ret; 10752}; 10753tests['csstransitions']=function(){ 10754return testPropsAll('transition'); 10755}; 10756tests['fontface']=function(){ 10757var bool; 10758injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}',function(node,rule){ 10759var style=document.getElementById('smodernizr'), 10760sheet=style.sheet||style.styleSheet, 10761cssText=sheet?(sheet.cssRules&&sheet.cssRules[0]?sheet.cssRules[0].cssText:sheet.cssText||''):''; 10762bool=/src/i.test(cssText)&&cssText.indexOf(rule.split(' ')[0])===0; 10763}); 10764return bool; 10765}; 10766tests['generatedcontent']=function(){ 10767var bool; 10768injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''),function(node){ 10769bool=node.offsetHeight>=3; 10770}); 10771return bool; 10772}; 10773tests['video']=function(){ 10774var elem=document.createElement('video'), 10775bool=false; 10776try{ 10777if(bool=!!elem.canPlayType){ 10778bool=new Boolean(bool); 10779bool.ogg=elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,''); 10780bool.h264=elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,''); 10781bool.webm=elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,''); 10782} 10783}catch(e){} 10784return bool; 10785}; 10786tests['audio']=function(){ 10787var elem=document.createElement('audio'), 10788bool=false; 10789try{ 10790if(bool=!!elem.canPlayType){ 10791bool=new Boolean(bool); 10792bool.ogg=elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,''); 10793bool.mp3=elem.canPlayType('audio/mpeg;').replace(/^no$/,''); 10794bool.wav=elem.canPlayType('audio/wav; codecs="1"').replace(/^no$/,''); 10795bool.m4a=(elem.canPlayType('audio/x-m4a;')|| 10796elem.canPlayType('audio/aac;')).replace(/^no$/,''); 10797} 10798}catch(e){} 10799return bool; 10800}; 10801tests['localstorage']=function(){ 10802try{ 10803localStorage.setItem(mod,mod); 10804localStorage.removeItem(mod); 10805return true; 10806}catch(e){ 10807return false; 10808} 10809}; 10810tests['sessionstorage']=function(){ 10811try{ 10812sessionStorage.setItem(mod,mod); 10813sessionStorage.removeItem(mod); 10814return true; 10815}catch(e){ 10816return false; 10817} 10818}; 10819tests['webworkers']=function(){ 10820return!!window.Worker; 10821}; 10822tests['applicationcache']=function(){ 10823return!!window.applicationCache; 10824}; 10825tests['svg']=function(){ 10826return!!document.createElementNS&&!!document.createElementNS(ns.svg,'svg').createSVGRect; 10827}; 10828tests['inlinesvg']=function(){ 10829var div=document.createElement('div'); 10830div.innerHTML='<svg/>'; 10831return(div.firstChild&&div.firstChild.namespaceURI)==ns.svg; 10832}; 10833tests['smil']=function(){ 10834return!!document.createElementNS&&/SVGAnimate/.test(toString.call(document.createElementNS(ns.svg,'animate'))); 10835}; 10836tests['svgclippaths']=function(){ 10837return!!document.createElementNS&&/SVGClipPath/.test(toString.call(document.createElementNS(ns.svg,'clipPath'))); 10838}; 10839function webforms(){ 10840Modernizr['input']=(function(props){ 10841for(var i=0,len=props.length;i<len;i++){ 10842attrs[props[i]]=!!(props[i]in inputElem); 10843} 10844if(attrs.list){ 10845attrs.list=!!(document.createElement('datalist')&&window.HTMLDataListElement); 10846} 10847return attrs; 10848})('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); 10849Modernizr['inputtypes']=(function(props){ 10850for(var i=0,bool,inputElemType,defaultView,len=props.length;i<len;i++){ 10851inputElem.setAttribute('type',inputElemType=props[i]); 10852bool=inputElem.type!=='text'; 10853if(bool){ 10854inputElem.value=smile; 10855inputElem.style.cssText='position:absolute;visibility:hidden;'; 10856if(/^range$/.test(inputElemType)&&inputElem.style.WebkitAppearance!==undefined){ 10857docElement.appendChild(inputElem); 10858defaultView=document.defaultView; 10859bool=defaultView.getComputedStyle&& 10860defaultView.getComputedStyle(inputElem,null).WebkitAppearance!=='textfield'&& 10861(inputElem.offsetHeight!==0); 10862docElement.removeChild(inputElem); 10863}else if(/^(search|tel)$/.test(inputElemType)){ 10864}else if(/^(url|email)$/.test(inputElemType)){ 10865bool=inputElem.checkValidity&&inputElem.checkValidity()===false; 10866}else{ 10867bool=inputElem.value!=smile; 10868} 10869} 10870inputs[props[i]]=!!bool; 10871}
10872return inputs; 10873})('search tel url email datetime date month week time datetime-local number range color'.split(' ')); 10874} 10875for(var feature in tests){ 10876if(hasOwnProp(tests,feature)){ 10877featureName=feature.toLowerCase(); 10878Modernizr[featureName]=tests[feature](); 10879classes.push((Modernizr[featureName]?'':'no-')+featureName); 10880} 10881} 10882Modernizr.input||webforms(); 10883Modernizr.addTest=function(feature,test){ 10884if(typeof feature=='object'){ 10885for(var key in feature){ 10886if(hasOwnProp(feature,key)){ 10887Modernizr.addTest(key,feature[key]); 10888} 10889} 10890}else{ 10891feature=feature.toLowerCase(); 10892if(Modernizr[feature]!==undefined){ 10893return Modernizr; 10894} 10895test=typeof test=='function'?test():test; 10896if(typeof enableClasses!=="undefined"&&enableClasses){ 10897docElement.className+=' '+(test?'':'no-')+feature; 10898} 10899Modernizr[feature]=test; 10900} 10901return Modernizr; 10902}; 10903setCss(''); 10904modElem=inputElem=null; 10905;(function(window,document){ 10906var version='3.7.0'; 10907var options=window.html5||{}; 10908var reSkip=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; 10909var saveClones=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; 10910var supportsHtml5Styles; 10911var expando='_html5shiv'; 10912var expanID=0; 10913var expandoData={}; 10914var supportsUnknownElements; 10915(function(){ 10916try{ 10917var a=document.createElement('a'); 10918a.innerHTML='<xyz></xyz>'; 10919supportsHtml5Styles=('hidden'in a); 10920supportsUnknownElements=a.childNodes.length==1||(function(){ 10921(document.createElement)('a'); 10922var frag=document.createDocumentFragment(); 10923return( 10924typeof frag.cloneNode=='undefined'|| 10925typeof frag.createDocumentFragment=='undefined'|| 10926typeof frag.createElement=='undefined' 10927); 10928}()); 10929}catch(e){ 10930supportsHtml5Styles=true; 10931supportsUnknownElements=true; 10932} 10933}()); 10934function addStyleSheet(ownerDocument,cssText){ 10935var p=ownerDocument.createElement('p'), 10936parent=ownerDocument.getElementsByTagName('head')[0]||ownerDocument.documentElement; 10937p.innerHTML='x<style>'+cssText+'</style>'; 10938return parent.insertBefore(p.lastChild,parent.firstChild); 10939} 10940function getElements(){ 10941var elements=html5.elements; 10942return typeof elements=='string'?elements.split(' '):elements; 10943} 10944function getExpandoData(ownerDocument){ 10945var data=expandoData[ownerDocument[expando]]; 10946if(!data){ 10947data={}; 10948expanID++; 10949ownerDocument[expando]=expanID; 10950expandoData[expanID]=data; 10951} 10952return data; 10953} 10954function createElement(nodeName,ownerDocument,data){ 10955if(!ownerDocument){ 10956ownerDocument=document; 10957} 10958if(supportsUnknownElements){ 10959return ownerDocument.createElement(nodeName); 10960} 10961if(!data){ 10962data=getExpandoData(ownerDocument); 10963} 10964var node; 10965if(data.cache[nodeName]){ 10966node=data.cache[nodeName].cloneNode(); 10967}else if(saveClones.test(nodeName)){ 10968node=(data.cache[nodeName]=data.createElem(nodeName)).cloneNode(); 10969}else{ 10970node=data.createElem(nodeName); 10971} 10972return node.canHaveChildren&&!reSkip.test(nodeName)&&!node.tagUrn?data.frag.appendChild(node):node; 10973} 10974function createDocumentFragment(ownerDocument,data){ 10975if(!ownerDocument){ 10976ownerDocument=document; 10977} 10978if(supportsUnknownElements){ 10979return ownerDocument.createDocumentFragment(); 10980} 10981data=data||getExpandoData(ownerDocument); 10982var clone=data.frag.cloneNode(), 10983i=0, 10984elems=getElements(), 10985l=elems.length; 10986for(;i<l;i++){ 10987clone.createElement(elems[i]); 10988} 10989return clone; 10990} 10991function shivMethods(ownerDocument,data){ 10992if(!data.cache){ 10993data.cache={}; 10994data.createElem=ownerDocument.createElement; 10995data.createFrag=ownerDocument.createDocumentFragment; 10996data.frag=data.createFrag(); 10997} 10998ownerDocument.createElement=function(nodeName){ 10999if(!html5.shivMethods){ 11000return data.createElem(nodeName); 11001} 11002return createElement(nodeName,ownerDocument,data); 11003}; 11004ownerDocument.createDocumentFragment=Function('h,f','return function(){'+ 11005'var n=f.cloneNode(),c=n.createElement;'+ 11006'h.shivMethods&&('+ 11007getElements().join().replace(/[\w\-]+/g,function(nodeName){ 11008data.createElem(nodeName); 11009data.frag.createElement(nodeName); 11010return'c("'+nodeName+'")'; 11011})+ 11012');return n}' 11013)(html5,data.frag); 11014} 11015function shivDocument(ownerDocument){ 11016if(!ownerDocument){ 11017ownerDocument=document; 11018} 11019var data=getExpandoData(ownerDocument); 11020if(html5.shivCSS&&!supportsHtml5Styles&&!data.hasCSS){ 11021data.hasCSS=!!addStyleSheet(ownerDocument, 11022'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{dis
11022play:block}'+ 11023'mark{background:#FF0;color:#000}'+ 11024'template{display:none}' 11025); 11026} 11027if(!supportsUnknownElements){ 11028shivMethods(ownerDocument,data); 11029} 11030return ownerDocument; 11031} 11032var html5={ 11033'elements':options.elements||'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video', 11034'version':version, 11035'shivCSS':(options.shivCSS!==false), 11036'supportsUnknownElements':supportsUnknownElements, 11037'shivMethods':(options.shivMethods!==false), 11038'type':'default', 11039'shivDocument':shivDocument, 11040createElement:createElement, 11041createDocumentFragment:createDocumentFragment 11042}; 11043window.html5=html5; 11044shivDocument(document); 11045}(this,document)); 11046Modernizr._version=version; 11047Modernizr._prefixes=prefixes; 11048Modernizr._domPrefixes=domPrefixes; 11049Modernizr._cssomPrefixes=cssomPrefixes; 11050Modernizr.mq=testMediaQuery; 11051Modernizr.hasEvent=isEventSupported; 11052Modernizr.testProp=function(prop){ 11053return testProps([prop]); 11054}; 11055Modernizr.testAllProps=testPropsAll; 11056Modernizr.testStyles=injectElementWithStyles; 11057Modernizr.prefixed=function(prop,obj,elem){ 11058if(!obj){ 11059return testPropsAll(prop,'pfx'); 11060}else{ 11061return testPropsAll(prop,obj,elem); 11062} 11063}; 11064docElement.className=docElement.className.replace(/(^|\s)no-js(\s|$)/,'$1$2')+ 11065(enableClasses?' js '+classes.join(' '):''); 11066return Modernizr; 11067})(this,this.document); 11068 11069 11070/* squelettes/plugins/fidh/theme/bower_components/fastclick/lib/fastclick.js */ 11071;(function(){ 11072'use strict'; 11073function FastClick(layer,options){ 11074var oldOnClick; 11075options=options||{}; 11076this.trackingClick=false; 11077this.trackingClickStart=0; 11078this.targetElement=null; 11079this.touchStartX=0; 11080this.touchStartY=0; 11081this.lastTouchIdentifier=0; 11082this.touchBoundary=options.touchBoundary||10; 11083this.layer=layer; 11084this.tapDelay=options.tapDelay||200; 11085this.tapTimeout=options.tapTimeout||700; 11086if(FastClick.notNeeded(layer)){ 11087return; 11088} 11089function bind(method,context){ 11090return function(){return method.apply(context,arguments);}; 11091} 11092var methods=['onMouse','onClick','onTouchStart','onTouchMove','onTouchEnd','onTouchCancel']; 11093var context=this; 11094for(var i=0,l=methods.length;i<l;i++){ 11095context[methods[i]]=bind(context[methods[i]],context); 11096} 11097if(deviceIsAndroid){ 11098layer.addEventListener('mouseover',this.onMouse,true); 11099layer.addEventListener('mousedown',this.onMouse,true); 11100layer.addEventListener('mouseup',this.onMouse,true); 11101} 11102layer.addEventListener('click',this.onClick,true); 11103layer.addEventListener('touchstart',this.onTouchStart,false); 11104layer.addEventListener('touchmove',this.onTouchMove,false); 11105layer.addEventListener('touchend',this.onTouchEnd,false); 11106layer.addEventListener('touchcancel',this.onTouchCancel,false); 11107if(!Event.prototype.stopImmediatePropagation){ 11108layer.removeEventListener=function(type,callback,capture){ 11109var rmv=Node.prototype.removeEventListener; 11110if(type==='click'){ 11111rmv.call(layer,type,callback.hijacked||callback,capture); 11112}else{ 11113rmv.call(layer,type,callback,capture); 11114} 11115}; 11116layer.addEventListener=function(type,callback,capture){ 11117var adv=Node.prototype.addEventListener; 11118if(type==='click'){ 11119adv.call(layer,type,callback.hijacked||(callback.hijacked=function(event){ 11120if(!event.propagationStopped){ 11121callback(event); 11122} 11123}),capture); 11124}else{ 11125adv.call(layer,type,callback,capture); 11126} 11127}; 11128} 11129if(typeof layer.onclick==='function'){ 11130oldOnClick=layer.onclick; 11131layer.addEventListener('click',function(event){ 11132oldOnClick(event); 11133},false); 11134layer.onclick=null; 11135} 11136} 11137var deviceIsWindowsPhone=navigator.userAgent.indexOf("Windows Phone")>=0; 11138var deviceIsAndroid=navigator.userAgent.indexOf('Android')>0&&!deviceIsWindowsPhone; 11139var deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent)&&!deviceIsWindowsPhone; 11140var deviceIsIOS4=deviceIsIOS&&(/OS 4_\d(_\d)?/).test(navigator.userAgent); 11141var deviceIsIOSWithBadTarget=deviceIsIOS&&(/OS [6-7]_\d/).test(navigator.userAgent); 11142var deviceIsBlackBerry10=navigator.userAgent.indexOf('BB10')>0; 11143FastClick.prototype.needsClick=function(target){ 11144switch(target.nodeName.toLowerCase()){ 11145case'button': 11146case'select': 11147case'textarea': 11148if(target.disabled){ 11149return true; 11150} 11151break; 11152case'input': 11153if((deviceIsIOS&&target.type==='file')||target.disabled){ 11154return true; 11155} 11156break; 11157case'label': 11158case'iframe': 11159case'video': 11160return true; 11161} 11162return(/\bneedsclick\b/).test(target.className); 11163}; 11164FastClick.prototype.needsFocus=function(target){ 11165switch(target.nodeName.toLowerCase()){ 11166case'textarea': 11167return true; 11168case'select': 11169return!deviceIsAndroid; 11170case'input': 11171switch(target.type){ 11172case'button': 11173case'checkbox': 11174case'file': 11175case'image': 11176case'radio': 11177case'submit': 11178return false;
11179} 11180return!target.disabled&&!target.readOnly; 11181default: 11182return(/\bneedsfocus\b/).test(target.className); 11183} 11184}; 11185FastClick.prototype.sendClick=function(targetElement,event){ 11186var clickEvent,touch; 11187if(document.activeElement&&document.activeElement!==targetElement){ 11188document.activeElement.blur(); 11189} 11190touch=event.changedTouches[0]; 11191clickEvent=document.createEvent('MouseEvents'); 11192clickEvent.initMouseEvent(this.determineEventType(targetElement),true,true,window,1,touch.screenX,touch.screenY,touch.clientX,touch.clientY,false,false,false,false,0,null); 11193clickEvent.forwardedTouchEvent=true; 11194targetElement.dispatchEvent(clickEvent); 11195}; 11196FastClick.prototype.determineEventType=function(targetElement){ 11197if(deviceIsAndroid&&targetElement.tagName.toLowerCase()==='select'){ 11198return'mousedown'; 11199} 11200return'click'; 11201}; 11202FastClick.prototype.focus=function(targetElement){ 11203var length; 11204if(deviceIsIOS&&targetElement.setSelectionRange&&targetElement.type.indexOf('date')!==0&&targetElement.type!=='time'&&targetElement.type!=='month'){ 11205length=targetElement.value.length; 11206targetElement.setSelectionRange(length,length); 11207}else{ 11208targetElement.focus(); 11209} 11210}; 11211FastClick.prototype.updateScrollParent=function(targetElement){ 11212var scrollParent,parentElement; 11213scrollParent=targetElement.fastClickScrollParent; 11214if(!scrollParent||!scrollParent.contains(targetElement)){ 11215parentElement=targetElement; 11216do{ 11217if(parentElement.scrollHeight>parentElement.offsetHeight){ 11218scrollParent=parentElement; 11219targetElement.fastClickScrollParent=parentElement; 11220break; 11221} 11222parentElement=parentElement.parentElement; 11223}while(parentElement); 11224} 11225if(scrollParent){ 11226scrollParent.fastClickLastScrollTop=scrollParent.scrollTop; 11227} 11228}; 11229FastClick.prototype.getTargetElementFromEventTarget=function(eventTarget){ 11230if(eventTarget.nodeType===Node.TEXT_NODE){ 11231return eventTarget.parentNode; 11232} 11233return eventTarget; 11234}; 11235FastClick.prototype.onTouchStart=function(event){ 11236var targetElement,touch,selection; 11237if(event.targetTouches.length>1){ 11238return true; 11239} 11240targetElement=this.getTargetElementFromEventTarget(event.target); 11241touch=event.targetTouches[0]; 11242if(deviceIsIOS){ 11243selection=window.getSelection(); 11244if(selection.rangeCount&&!selection.isCollapsed){ 11245return true; 11246} 11247if(!deviceIsIOS4){ 11248if(touch.identifier&&touch.identifier===this.lastTouchIdentifier){ 11249event.preventDefault(); 11250return false; 11251} 11252this.lastTouchIdentifier=touch.identifier; 11253this.updateScrollParent(targetElement); 11254} 11255} 11256this.trackingClick=true; 11257this.trackingClickStart=event.timeStamp; 11258this.targetElement=targetElement; 11259this.touchStartX=touch.pageX; 11260this.touchStartY=touch.pageY; 11261if((event.timeStamp-this.lastClickTime)<this.tapDelay){ 11262event.preventDefault(); 11263} 11264return true; 11265}; 11266FastClick.prototype.touchHasMoved=function(event){ 11267var touch=event.changedTouches[0],boundary=this.touchBoundary; 11268if(Math.abs(touch.pageX-this.touchStartX)>boundary||Math.abs(touch.pageY-this.touchStartY)>boundary){ 11269return true; 11270} 11271return false; 11272}; 11273FastClick.prototype.onTouchMove=function(event){ 11274if(!this.trackingClick){ 11275return true; 11276} 11277if(this.targetElement!==this.getTargetElementFromEventTarget(event.target)||this.touchHasMoved(event)){ 11278this.trackingClick=false; 11279this.targetElement=null; 11280} 11281return true; 11282}; 11283FastClick.prototype.findControl=function(labelElement){ 11284if(labelElement.control!==undefined){ 11285return labelElement.control; 11286} 11287if(labelElement.htmlFor){ 11288return document.getElementById(labelElement.htmlFor); 11289} 11290return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea'); 11291}; 11292FastClick.prototype.onTouchEnd=function(event){ 11293var forElement,trackingClickStart,targetTagName,scrollParent,touch,targetElement=this.targetElement; 11294if(!this.trackingClick){ 11295return true; 11296} 11297if((event.timeStamp-this.lastClickTime)<this.tapDelay){ 11298this.cancelNextClick=true; 11299return true; 11300} 11301if((event.timeStamp-this.trackingClickStart)>this.tapTimeout){ 11302return true; 11303} 11304this.cancelNextClick=false; 11305this.lastClickTime=event.timeStamp; 11306trackingClickStart=this.trackingClickStart; 11307this.trackingClick=false; 11308this.trackingClickStart=0; 11309if(deviceIsIOSWithBadTarget){ 11310touch=event.changedTouches[0]; 11311targetElement=document.elementFromPoint(touch.pageX-window.pageXOffset,touch.pageY-window.pageYOffset)||targetElement; 11312targetElement.fastClickScrollParent=this.targetElement.fastClickScrollParent; 11313} 11314targetTagName=targetElement.tagName.toLowerCase(); 11315if(targetTagName==='label'){ 11316forElement=this.findControl(targetElement); 11317if(forElement){ 11318this.focus(targetElement); 11319if(deviceIsAndroid){ 11320return false;
11321} 11322targetElement=forElement; 11323} 11324}else if(this.needsFocus(targetElement)){ 11325if((event.timeStamp-trackingClickStart)>100||(deviceIsIOS&&window.top!==window&&targetTagName==='input')){ 11326this.targetElement=null; 11327return false; 11328} 11329this.focus(targetElement); 11330this.sendClick(targetElement,event); 11331if(!deviceIsIOS||targetTagName!=='select'){ 11332this.targetElement=null; 11333event.preventDefault(); 11334} 11335return false; 11336} 11337if(deviceIsIOS&&!deviceIsIOS4){ 11338scrollParent=targetElement.fastClickScrollParent; 11339if(scrollParent&&scrollParent.fastClickLastScrollTop!==scrollParent.scrollTop){ 11340return true; 11341} 11342} 11343if(!this.needsClick(targetElement)){ 11344event.preventDefault(); 11345this.sendClick(targetElement,event); 11346} 11347return false; 11348}; 11349FastClick.prototype.onTouchCancel=function(){ 11350this.trackingClick=false; 11351this.targetElement=null; 11352}; 11353FastClick.prototype.onMouse=function(event){ 11354if(!this.targetElement){ 11355return true; 11356} 11357if(event.forwardedTouchEvent){ 11358return true; 11359} 11360if(!event.cancelable){ 11361return true; 11362} 11363if(!this.needsClick(this.targetElement)||this.cancelNextClick){ 11364if(event.stopImmediatePropagation){ 11365event.stopImmediatePropagation(); 11366}else{ 11367event.propagationStopped=true; 11368} 11369event.stopPropagation(); 11370event.preventDefault(); 11371return false; 11372} 11373return true; 11374}; 11375FastClick.prototype.onClick=function(event){ 11376var permitted; 11377if(this.trackingClick){ 11378this.targetElement=null; 11379this.trackingClick=false; 11380return true; 11381} 11382if(event.target.type==='submit'&&event.detail===0){ 11383return true; 11384} 11385permitted=this.onMouse(event); 11386if(!permitted){ 11387this.targetElement=null; 11388} 11389return permitted; 11390}; 11391FastClick.prototype.destroy=function(){ 11392var layer=this.layer; 11393if(deviceIsAndroid){ 11394layer.removeEventListener('mouseover',this.onMouse,true); 11395layer.removeEventListener('mousedown',this.onMouse,true); 11396layer.removeEventListener('mouseup',this.onMouse,true); 11397} 11398layer.removeEventListener('click',this.onClick,true); 11399layer.removeEventListener('touchstart',this.onTouchStart,false); 11400layer.removeEventListener('touchmove',this.onTouchMove,false); 11401layer.removeEventListener('touchend',this.onTouchEnd,false); 11402layer.removeEventListener('touchcancel',this.onTouchCancel,false); 11403}; 11404FastClick.notNeeded=function(layer){ 11405var metaViewport; 11406var chromeVersion; 11407var blackberryVersion; 11408var firefoxVersion; 11409if(typeof window.ontouchstart==='undefined'){ 11410return true; 11411} 11412chromeVersion=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]; 11413if(chromeVersion){ 11414if(deviceIsAndroid){ 11415metaViewport=document.querySelector('meta[name=viewport]'); 11416if(metaViewport){ 11417if(metaViewport.content.indexOf('user-scalable=no')!==-1){ 11418return true; 11419} 11420if(chromeVersion>31&&document.documentElement.scrollWidth<=window.outerWidth){ 11421return true; 11422} 11423} 11424}else{ 11425return true; 11426} 11427} 11428if(deviceIsBlackBerry10){ 11429blackberryVersion=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/); 11430if(blackberryVersion[1]>=10&&blackberryVersion[2]>=3){ 11431metaViewport=document.querySelector('meta[name=viewport]'); 11432if(metaViewport){ 11433if(metaViewport.content.indexOf('user-scalable=no')!==-1){ 11434return true; 11435} 11436if(document.documentElement.scrollWidth<=window.outerWidth){ 11437return true; 11438} 11439} 11440} 11441} 11442if(layer.style.msTouchAction==='none'||layer.style.touchAction==='manipulation'){ 11443return true; 11444} 11445firefoxVersion=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]; 11446if(firefoxVersion>=27){ 11447metaViewport=document.querySelector('meta[name=viewport]'); 11448if(metaViewport&&(metaViewport.content.indexOf('user-scalable=no')!==-1||document.documentElement.scrollWidth<=window.outerWidth)){ 11449return true; 11450} 11451} 11452if(layer.style.touchAction==='none'||layer.style.touchAction==='manipulation'){ 11453return true; 11454} 11455return false; 11456}; 11457FastClick.attach=function(layer,options){ 11458return new FastClick(layer,options); 11459}; 11460if(typeof define==='function'&&typeof define.amd==='object'&&define.amd){ 11461define(function(){ 11462return FastClick; 11463}); 11464}else if(typeof module!=='undefined'&&module.exports){ 11465module.exports=FastClick.attach; 11466module.exports.FastClick=FastClick; 11467}else{ 11468window.FastClick=FastClick; 11469} 11470}()); 11471 11472 11473/* squelettes/plugins/fidh/theme/bower_components/foundation/js/foundation.min.js */ 11474!function(a,b,c,d){"use strict";function e(a){return("string"==typeof a||a instanceof String)&&(a=a.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g,"")),a}var f=function(b){for(var c=b.length,d=a("head");c--;)0===d.has("."+b[c]).length&&d.append('<meta class="'+b[c]+'" />')};
vendor: 8,156 bytes, lines 11474-11475
11474f(["foundation-mq-small","foundation-mq-small-only","foundation-mq-medium","foundation-mq-medium-only","foundation-mq-large","foundation-mq-large-only","foundation-mq-xlarge","foundation-mq-xlarge-only","foundation-mq-xxlarge","foundation-data-attribute-namespace"]),a(function(){"undefined"!=typeof FastClick&&"undefined"!=typeof c.body&&FastClick.attach(c.body)});var g=function(b,d){if("string"==typeof b){if(d){var e;if(d.jquery){if(e=d[0],!e)return d}else e=d;return a(e.querySelectorAll(b))}return a(c.querySelectorAll(b))}return a(b,d)},h=function(a){var b=[];return a||b.push("data"),this.namespace.length>0&&b.push(this.namespace),b.push(this.name),b.join("-")},i=function(a){for(var b=a.split("-"),c=b.length,d=[];c--;)0!==c?d.push(b[c]):this.namespace.length>0?d.push(this.namespace,b[c]):d.push(b[c]);return d.reverse().join("-")},j=function(b,c){var d=this,e=function(){var e=g(this),f=!e.data(d.attr_name(!0)+"-init");e.data(d.attr_name(!0)+"-init",a.extend({},d.settings,c||b,d.data_options(e))),f&&d.events(this)};return g(this.scope).is("["+this.attr_name()+"]")?e.call(this.scope):g("["+this.attr_name()+"]",this.scope).each(e),"string"==typeof b?this[b].call(this,c):void 0},k=function(a,b){function c(){b(a[0])}function d(){if(this.one("load",c),/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var a=this.attr("src"),b=a.match(/\?/)?"&":"?";b+="random="+(new Date).getTime(),this.attr("src",a+b)}}return a.attr("src")?void(a[0].complete||4===a[0].readyState?c():d.call(a)):void c()}; 11475b.matchMedia||(b.matchMedia=function(){var a=b.styleMedia||b.media;if(!a){var d=c.createElement("style"),e=c.getElementsByTagName("script")[0],f=null;d.type="text/css",d.id="matchmediajs-test",e.parentNode.insertBefore(d,e),f="getComputedStyle"in b&&b.getComputedStyle(d,null)||d.currentStyle,a={matchMedium:function(a){var b="@media "+a+"{ #matchmediajs-test { width: 1px; } }";return d.styleSheet?d.styleSheet.cssText=b:d.textContent=b,"1px"===f.width}}}return function(b){return{matches:a.matchMedium(b||"all"),media:b||"all"}}}()),function(a){function c(){d&&(g(c),i&&a.fx.tick())}for(var d,e=0,f=["webkit","moz"],g=b.requestAnimationFrame,h=b.cancelAnimationFrame,i="undefined"!=typeof a.fx;e<f.length&&!g;e++)g=b[f[e]+"RequestAnimationFrame"],h=h||b[f[e]+"CancelAnimationFrame"]||b[f[e]+"CancelRequestAnimationFrame"];g?(b.requestAnimationFrame=g,b.cancelAnimationFrame=h,i&&(a.fx.timer=function(b){b()&&a.timers.push(b)&&!d&&(d=!0,c())},a.fx.stop=function(){d=!1})):(b.requestAnimationFrame=function(a){var c=(new Date).getTime(),d=Math.max(0,16-(c-e)),f=b.setTimeout(function(){a(c+d)},d);return e=c+d,f},b.cancelAnimationFrame=function(a){clearTimeout(a)})}(a),b.Foundation={name:"Foundation",version:"5.5.2",media_queries:{small:g(".foundation-mq-small").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"small-only":g(".foundation-mq-small-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),medium:g(".foundation-mq-medium").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"medium-only":g(".foundation-mq-medium-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),large:g(".foundation-mq-large").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"large-only":g(".foundation-mq-large-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xlarge:g(".foundation-mq-xlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),"xlarge-only":g(".foundation-mq-xlarge-only").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xxlarge:g(".foundation-mq-xxlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,"")},stylesheet:a("<style></style>").appendTo("head")[0].sheet,global:{namespace:d},init:function(a,c,d,e,f){var h=[a,d,e,f],i=[];if(this.rtl=/rtl/i.test(g("html").attr("dir")),this.scope=a||this.scope,this.set_namespace(),c&&"string"==typeof c&&!/reflow/i.test(c))this.libs.hasOwnProperty(c)&&i.push(this.init_lib(c,h));else for(var j in this.libs)i.push(this.init_lib(j,c));return g(b).load(function(){g(b).trigger("resize.fndtn.clearing").trigger("resize.fndtn.dropdown").trigger("resize.fndtn.equalizer").trigger("resize.fndtn.interchange").trigger("resize.fndtn.joyride").trigger("resize.fndtn.magellan").trigger("resize.fndtn.topbar").trigger("resize.fndtn.slider")}),a},init_lib:function(b,c){return this.libs.hasOwnProperty(b)?(this.patch(this.libs[b]),c&&c.hasOwnProperty(b)?("undefined"!=typeof this.libs[b].settings?a.extend(!0,this.libs[b].settings,c[b]):"undefined"!=typeof this.libs[b].defaults&&a.extend(!0,this.libs[b].defaults,c[b]),this.libs[b].init.apply(this.libs[b],[this.scope,c[b]])):(c=c instanceof Array?c:new Array(c),this.libs[b].init.apply(this.libs[b],c))):function(){}},patch:function(a){a.scope=this.scope,a.namespace=this.global.namespace,a.rtl=this.rtl,a.data_options=this.utils.data_options,a.attr_name=h,a.add_namespace=i,a.bindings=j,a.S=this.utils.S},inherit:function(a,b){for(var c=b.split(" "),d=c.length;d--;)this.utils.hasOwnProperty(c[d])&&(a[c[d]]=this.utils[c[d]])},set_namespace:function(){var b=this.global.namespace===d?a(".foundation-data-attribute-namespace").css("font-family"):this.global.namespace;this.global.namespace=b===d||/false/i.test(b)?"":b},libs:{},utils:{S:g,throttle:function(a,b){var c=null;return function(){var d=this,e=arguments;null==c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}},debounce:function(a,b,c){var d,e;return function(){var f=this,g=arguments,h=function(){d=null,c||(e=a.apply(f,g))},i=c&&!d;return clearTimeout(d),d=setTimeout(h,b),i&&(e=a.apply(f,g)),e}},data_options:function(b,c){function d(a){return!isNaN(a-0)&&null!==a&&""!==a&&a!==!1&&a!==!0}function e(b){return"string"==typeof b?a.trim(b):b}c=c||"options";var f,g,h,i={},j=function(a){var b=Foundation.global.namespace;return a.data(b.length>0?b+"-"+c:c)},k=j(b);if("object"==typeof k)return k;for(h=(k||":").split(";"),f=h.length;f--;)g=h[f].split(":"),g=[g[0],g.slice(1).join(":")],/true/i.test(g[1])&&(g[1]=!0),/false/i.test(g[1])&&(g[1]=!1),d(g[1])&&(-1===g[1].indexOf(".")?g[1]=parseInt(g[1],10):g[1]=parseFloat(g[1])),2===g.length&&g[0].length>0&&(i[e(g[0])]=e(g[1]));return i},register_media:function(b,c){Foundation.media_queries[b]===d&&(a("head").append('<meta class="'+c+'"/>'),Foundation.media_queries[b]=e(a("."+c).css("font-family")))},add_custom_rule:function(a,b){if(b===d&&Foundation.stylesheet)Foundation.stylesheet.insertRule(a,Foundation.stylesheet.cssRules.length);else{var c=Foundation.media_queries[b];c!==d&&Foundation.stylesheet.insertRule("@media "+Foundation.media_queries[b]+"{ "+a+" }",Foundation.stylesheet.cssRules.length)}},image_loaded:function(a,b){function c(a){for(var b=a.length,c=b-1;c>=0;c--)if(a.attr("height")===d)return!1;return!0}var e=this,f=a.length;(0===f||c(a))&&b(a),a.each(function(){k(e.S(this),function(){f-=1,0===f&&b(a)})})},random_str:function(){return this.fidx||(this.fidx=0),this.prefix=this.prefix||[this.name||"F",(+new Date).toString(36)].join("-"),this.prefix+(this.fidx++).toString(36)},match:function(a){return b.matchMedia(a).matches},is_small_up:function(){return this.match(Foundation.media_queries.small)},is_medium_up:function(){return this.match(Foundation.media_queries.medium)},is_large_up:function(){return this.match(Foundation.media_queries.large)},is_xlarge_up:function(){return this.match(Foundation.media_queries.xlarge)},is_xxlarge_up:function(){return this.match(Foundation.media_queries.xxlarge)},is_small_only:function(){return!(this.is_medium_up()||this.is_large_up()||this.is_xlarge_up()||this.is_xxlarge_up())},is_medium_only:function(){return this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_large_only:function(){return this.is_medium_up()&&this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up()},is_xlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&!this.is_xxlarge_up()},is_xxlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&this.is_xxlarge_up()}}},a.fn.foundation=function(){var a=Array.prototype.slice.call(arguments,0);
11475return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(a)),this})}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.abide={name:"abide",version:"5.5.2",settings:{live_validate:!0,validate_on_blur:!0,focus_on_invalid:!0,error_labels:!0,error_class:"error",timeout:1e3,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},validators:{equalTo:function(a,b,d){var e=c.getElementById(a.getAttribute(this.add_namespace("data-equalto"))).value,f=a.value,g=e===f;return g}}},timer:null,init:function(a,b,c){this.bindings(b,c)},events:function(b){function c(a,b){clearTimeout(d.timer),d.timer=setTimeout(function(){d.validate([a],b)}.bind(a),f.timeout)}var d=this,e=d.S(b).attr("novalidate","novalidate"),f=e.data(this.attr_name(!0)+"-init")||{};this.invalid_attr=this.add_namespace("data-invalid"),e.off(".abide").on("submit.fndtn.abide",function(a){var b=/ajax/i.test(d.S(this).attr(d.attr_name()));return d.validate(d.S(this).find("input, textarea, select").not(":hidden, [data-abide-ignore]").get(),a,b)}).on("validate.fndtn.abide",function(a){"manual"===f.validate_on&&d.validate([a.target],a)}).on("reset",function(b){return d.reset(a(this),b)}).find("input, textarea, select").not(":hidden, [data-abide-ignore]").off(".abide").on("blur.fndtn.abide change.fndtn.abide",function(a){f.validate_on_blur&&f.validate_on_blur===!0&&c(this,a),"change"===f.validate_on&&c(this,a)}).on("keydown.fndtn.abide",function(a){f.live_validate&&f.live_validate===!0&&9!=a.which&&c(this,a),"tab"===f.validate_on&&9===a.which?c(this,a):"change"===f.validate_on&&c(this,a)}).on("focus",function(b){navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)&&a("html, body").animate({scrollTop:a(b.target).offset().top},100)})},reset:function(b,c){var d=this;b.removeAttr(d.invalid_attr),a("["+d.invalid_attr+"]",b).removeAttr(d.invalid_attr),a("."+d.settings.error_class,b).not("small").removeClass(d.settings.error_class),a(":input",b).not(":button, :submit, :reset, :hidden, [data-abide-ignore]").val("").removeAttr(d.invalid_attr)},validate:function(a,b,c){for(var d=this.parse_patterns(a),e=d.length,f=this.S(a[0]).closest("form"),g=/submit/.test(b.type),h=0;e>h;h++)if(!d[h]&&(g||c))return this.settings.focus_on_invalid&&a[h].focus(),f.trigger("invalid.fndtn.abide"),this.S(a[h]).closest("form").attr(this.invalid_attr,""),!1;return(g||c)&&f.trigger("valid.fndtn.abide"),f.removeAttr(this.invalid_attr),c?!1:!0},parse_patterns:function(a){for(var b=a.length,c=[];b--;)c.push(this.pattern(a[b]));return this.check_validation_and_apply_styles(c)},pattern:function(a){var b=a.getAttribute("type"),c="string"==typeof a.getAttribute("required"),d=a.getAttribute("pattern")||"";return this.settings.patterns.hasOwnProperty(d)&&d.length>0?[a,this.settings.patterns[d],c]:d.length>0?[a,new RegExp(d),c]:this.settings.patterns.hasOwnProperty(b)?[a,this.settings.patterns[b],c]:(d=/.*/,[a,d,c])},check_validation_and_apply_styles:function(b){var c=b.length,d=[],e=this.S(b[0][0]).closest("[data-"+this.attr_name(!0)+"]");for(e.data(this.attr_name(!0)+"-init")||{};c--;){var f,g,h=b[c][0],i=b[c][2],j=h.value.trim(),k=this.S(h).parent(),l=h.getAttribute(this.add_namespace("data-abide-validator")),m="radio"===h.type,n="checkbox"===h.type,o=this.S('label[for="'+h.getAttribute("id")+'"]'),p=i?h.value.length>0:!0,q=[];if(h.getAttribute(this.add_namespace("data-equalto"))&&(l="equalTo"),f=k.is("label")?k.parent():k,m&&i)q.push(this.valid_radio(h,i));else if(n&&i)q.push(this.valid_checkbox(h,i));else if(l){for(var r=l.split(" "),s=!0,t=!0,u=0;u<r.length;
11475u++)g=this.settings.validators[r[u]].apply(this,[h,i,f]),q.push(g),t=g&&s,s=g;t?(this.S(h).removeAttr(this.invalid_attr),f.removeClass("error"),o.length>0&&this.settings.error_labels&&o.removeClass(this.settings.error_class).removeAttr("role"),a(h).triggerHandler("valid")):(this.S(h).attr(this.invalid_attr,""),f.addClass("error"),o.length>0&&this.settings.error_labels&&o.addClass(this.settings.error_class).attr("role","alert"),a(h).triggerHandler("invalid"))}else if(q.push(b[c][1].test(j)&&p||!i&&h.value.length<1||a(h).attr("disabled")?!0:!1),q=[q.every(function(a){return a})],q[0])this.S(h).removeAttr(this.invalid_attr),h.setAttribute("aria-invalid","false"),h.removeAttribute("aria-describedby"),f.removeClass(this.settings.error_class),o.length>0&&this.settings.error_labels&&o.removeClass(this.settings.error_class).removeAttr("role"),a(h).triggerHandler("valid");else{this.S(h).attr(this.invalid_attr,""),h.setAttribute("aria-invalid","true");var v=f.find("small."+this.settings.error_class,"span."+this.settings.error_class),w=v.length>0?v[0].id:"";w.length>0&&h.setAttribute("aria-describedby",w),f.addClass(this.settings.error_class),o.length>0&&this.settings.error_labels&&o.addClass(this.settings.error_class).attr("role","alert"),a(h).triggerHandler("invalid")}d=d.concat(q)}return d},valid_checkbox:function(b,c){var b=this.S(b),d=b.is(":checked")||!c||b.get(0).getAttribute("disabled");return d?(b.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class),a(b).triggerHandler("valid")):(b.attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),a(b).triggerHandler("invalid")),d},valid_radio:function(b,c){for(var d=b.getAttribute("name"),e=this.S(b).closest("[data-"+this.attr_name(!0)+"]").find("[name='"+d+"']"),f=e.length,g=!1,h=!1,i=0;f>i;i++)e[i].getAttribute("disabled")?(h=!0,g=!0):e[i].checked?g=!0:h&&(g=!1);for(var i=0;f>i;i++)g?(this.S(e[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class),a(e[i]).triggerHandler("valid")):(this.S(e[i]).attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),a(e[i]).triggerHandler("invalid"));return g},valid_equal:function(a,b,d){var e=c.getElementById(a.getAttribute(this.add_namespace("data-equalto"))).value,f=a.value,g=e===f;return g?(this.S(a).removeAttr(this.invalid_attr),d.removeClass(this.settings.error_class),label.length>0&&settings.error_labels&&label.removeClass(this.settings.error_class)):(this.S(a).attr(this.invalid_attr,""),d.addClass(this.settings.error_class),label.length>0&&settings.error_labels&&label.addClass(this.settings.error_class)),g},valid_oneof:function(a,b,c,d){var a=this.S(a),e=this.S("["+this.add_namespace("data-oneof")+"]"),f=e.filter(":checked").length>0;if(f?a.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class):a.attr(this.invalid_attr,"").parent().addClass(this.settings.error_class),!d){var g=this;e.each(function(){g.valid_oneof.call(g,this,null,null,!0)})}return f},reflow:function(a,b){var c=this,d=c.S("["+this.attr_name()+"]").attr("novalidate","novalidate");c.S(d).each(function(a,b){c.events(b)})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.accordion={name:"accordion",version:"5.5.2",settings:{content_class:"content",active_class:"active",multi_expand:!1,toggleable:!0,callback:function(){}},init:function(a,b,c){this.bindings(b,c)},events:function(b){var c=this,d=this.S;c.create(this.S(b)),d(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion","["+this.attr_name()+"] > dd > a, ["+this.attr_name()+"] > li > a",function(b){var e=d(this).closest("["+c.attr_name()+"]"),f=c.attr_name()+"="+e.attr(c.attr_name()),g=e.data(c.attr_name(!0)+"-init")||c.settings,h=d("#"+this.href.split("#")[1]),i=a("> dd, > li",e),j=i.children("."+g.content_class),k=j.filter("."+g.active_class);return b.preventDefault(),e.attr(c.attr_name())&&(j=j.add("["+f+"] dd > ."+g.content_class+", ["+f+"] li > ."+g.content_class),i=i.add("["+f+"] dd, ["+f+"] li")),g.toggleable&&h.is(k)?(h.parent("dd, li").toggleClass(g.active_class,!1),h.toggleClass(g.active_class,!1),d(this).attr("aria-expanded",function(a,b){return"true"===b?"false":"true"}),g.callback(h),h.triggerHandler("toggled",[e]),void e.triggerHandler("toggled",[h])):(g.multi_expand||(j.removeClass(g.active_class),i.removeClass(g.active_class),i.children("a").attr("aria-expanded","fal
11475se")),h.addClass(g.active_class).parent().addClass(g.active_class),g.callback(h),h.triggerHandler("toggled",[e]),e.triggerHandler("toggled",[h]),void d(this).attr("aria-expanded","true"))})},create:function(b){var c=this,d=b,e=a("> .accordion-navigation",d),f=d.data(c.attr_name(!0)+"-init")||c.settings;e.children("a").attr("aria-expanded","false"),e.has("."+f.content_class+"."+f.active_class).children("a").attr("aria-expanded","true"),f.multi_expand&&b.attr("aria-multiselectable","true")},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.alert={name:"alert",version:"5.5.2",settings:{callback:function(){}},init:function(a,b,c){this.bindings(b,c)},events:function(){var b=this,c=this.S;a(this.scope).off(".alert").on("click.fndtn.alert","["+this.attr_name()+"] .close",function(a){var d=c(this).closest("["+b.attr_name()+"]"),e=d.data(b.attr_name(!0)+"-init")||b.settings;a.preventDefault(),Modernizr.csstransitions?(d.addClass("alert-close"),d.on("transitionend webkitTransitionEnd oTransitionEnd",function(a){c(this).trigger("close.fndtn.alert").remove(),e.callback()})):d.fadeOut(300,function(){c(this).trigger("close.fndtn.alert").remove(),e.callback()})})},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.clearing={name:"clearing",version:"5.5.2",settings:{templates:{viewing:'<a href="#"class="clearing-close">×</a><div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D"alt=""/><p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a><a href="#" class="clearing-main-next"><span></span></a></div><img class="clearing-preload-next"style="display: none"src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D"alt=""/><img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'},close_selectors:".clearing-close,div.clearing-blackout",open_selectors:"",skip_selector:"",touch_label:"",init:!1,locked:!1},init:function(a,b,c){var d=this;Foundation.inherit(this,"throttle image_loaded"),this.bindings(b,c),d.S(this.scope).is("["+this.attr_name()+"]")?this.assemble(d.S("li",this.scope)):d.S("["+this.attr_name()+"]",this.scope).each(function(){d.assemble(d.S("li",this))})},events:function(d){var e=this,f=e.S,g=a(".scroll-container");g.length>0&&(this.scope=g),f(this.scope).off(".clearing").on("click.fndtn.clearing","ul["+this.attr_name()+"]li"+this.settings.open_selectors,function(a,b,c){var b=b||f(this),c=c||b,d=b.next("li"),g=b.closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init"),h=f(a.target);a.preventDefault(),g||(e.init(),g=b.closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init")),c.hasClass("visible")&&b[0]===c[0]&&d.length>0&&e.is_open(b)&&(c=d,h=f("img",c)),e.open(h,b,c),e.update_paddles(c)}).on("click.fndtn.clearing",".clearing-main-next",function(a){e.nav(a,"next")}).on("click.fndtn.clearing",".clearing-main-prev",function(a){e.nav(a,"prev")}).on("click.fndtn.clearing",this.settings.close_selectors,function(a){Foundation.libs.clearing.close(a,this)}),a(c).on("keydown.fndtn.clearing",function(a){e.keydown(a)}),f(b).off(".clearing").on("resize.fndtn.clearing",function(){e.resize()}),this.swipe_events(d)},swipe_events:function(a){var b=this,c=b.S;c(this.scope).on("touchstart.fndtn.clearing",".visible-img",function(a){a.touches||(a=a.originalEvent);var b={start_page_x:a.touches[0].pageX,start_page_y:a.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:d};c(this).data("swipe-transition",b),a.stopPropagation()}).on("touchmove.fndtn.clearing",".visible-img",function(a){if(a.touches||(a=a.originalEvent),!(a.touches.length>1||a.scale&&1!==a.scale)){var d=c(this).data("swipe-transition");if("undefined"==typeof d&&(d={}),d.delta_x=a.touches[0].pageX-d.start_page_x,Foundation.rtl&&(d.delta_x=-d.delta_x),"undefined"==typeof d.is_scrolling&&(d.is_scrolling=!!(d.is_scrolling||Math.abs(d.delta_x)<Math.abs(a.touches[0].pageY-d.start_page_y))),!d.is_scrolling&&!d.active){a.preventDefault();var e=d.delta_x<0?"next":"prev";d.active=!0,b.nav(a,e)}}}).on("touchend.fndtn.clearing",".visible-img",function(a){c(this).data("swipe-transition",{}),a.stopPropagation()})},assemble:function(b){var c=b.parent();if(!c.parent().hasClass("carousel")){c.after('<div id="foundationClearingHolder"></div>');var d=c.detach(),e="";if(null!=d[0]){e=d[0].outerHTML;
vendor: 83,336 bytes, lines 11475-11478
11475var f=this.S("#foundationClearingHolder"),g=c.data(this.attr_name(!0)+"-init"),h={grid:'<div class="carousel">'+e+"</div>",viewing:g.templates.viewing},i='<div class="clearing-assembled"><div>'+h.viewing+h.grid+"</div></div>",j=this.settings.touch_label;Modernizr.touch&&(i=a(i).find(".clearing-touch-label").html(j).end()),f.after(i).remove()}}},open:function(b,d,e){function f(){setTimeout(function(){this.image_loaded(m,function(){1!==m.outerWidth()||o?g.call(this,m):f.call(this)}.bind(this))}.bind(this),100)}function g(b){var c=a(b);c.css("visibility","visible"),c.trigger("imageVisible"),i.css("overflow","hidden"),j.addClass("clearing-blackout"),k.addClass("clearing-container"),l.show(),this.fix_height(e).caption(h.S(".clearing-caption",l),h.S("img",e)).center_and_label(b,n).shift(d,e,function(){e.closest("li").siblings().removeClass("visible"),e.closest("li").addClass("visible")}),l.trigger("opened.fndtn.clearing")}var h=this,i=a(c.body),j=e.closest(".clearing-assembled"),k=h.S("div",j).first(),l=h.S(".visible-img",k),m=h.S("img",l).not(b),n=h.S(".clearing-touch-label",k),o=!1,p={};a("body").on("touchmove",function(a){a.preventDefault()}),m.error(function(){o=!0}),this.locked()||(l.trigger("open.fndtn.clearing"),p=this.load(b),p.interchange?m.attr("data-interchange",p.interchange).foundation("interchange","reflow"):m.attr("src",p.src).attr("data-interchange",""),m.css("visibility","hidden"),f.call(this))},close:function(b,d){b.preventDefault();var e,f,g=function(a){return/blackout/.test(a.selector)?a:a.closest(".clearing-blackout")}(a(d)),h=a(c.body);return d===b.target&&g&&(h.css("overflow",""),e=a("div",g).first(),f=a(".visible-img",e),f.trigger("close.fndtn.clearing"),this.settings.prev_index=0,a("ul["+this.attr_name()+"]",g).attr("style","").closest(".clearing-blackout").removeClass("clearing-blackout"),e.removeClass("clearing-container"),f.hide(),f.trigger("closed.fndtn.clearing")),a("body").off("touchmove"),!1},is_open:function(a){return a.parent().prop("style").length>0},keydown:function(b){var c=a(".clearing-blackout ul["+this.attr_name()+"]"),d=this.rtl?37:39,e=this.rtl?39:37,f=27;b.which===d&&this.go(c,"next"),b.which===e&&this.go(c,"prev"),b.which===f&&this.S("a.clearing-close").trigger("click.fndtn.clearing")},nav:function(b,c){var d=a("ul["+this.attr_name()+"]",".clearing-blackout");b.preventDefault(),this.go(d,c)},resize:function(){var b=a("img",".clearing-blackout .visible-img"),c=a(".clearing-touch-label",".clearing-blackout");b.length&&(this.center_and_label(b,c),b.trigger("resized.fndtn.clearing"))},fix_height:function(a){var b=a.parent().children(),c=this;return b.each(function(){var a=c.S(this),b=a.find("img");a.height()>b.outerHeight()&&a.addClass("fix-height")}).closest("ul").width(100*b.length+"%"),this},update_paddles:function(a){a=a.closest("li");var b=a.closest(".carousel").siblings(".visible-img");a.next().length>0?this.S(".clearing-main-next",b).removeClass("disabled"):this.S(".clearing-main-next",b).addClass("disabled"),a.prev().length>0?this.S(".clearing-main-prev",b).removeClass("disabled"):this.S(".clearing-main-prev",b).addClass("disabled")},center_and_label:function(a,b){return b.css(!this.rtl&&b.length>0?{marginLeft:-(b.outerWidth()/2),marginTop:-(a.outerHeight()/2)-b.outerHeight()-10}:{marginRight:-(b.outerWidth()/2),marginTop:-(a.outerHeight()/2)-b.outerHeight()-10,left:"auto",right:"50%"}),this},load:function(a){var b,c,d;return"A"===a[0].nodeName?(b=a.attr("href"),c=a.data("clearing-interchange")):(d=a.closest("a"),b=d.attr("href"),c=d.data("clearing-interchange")),this.preload(a),{src:b?b:a.attr("src"),interchange:b?c:a.data("clearing-interchange")}},preload:function(a){this.img(a.closest("li").next(),"next").img(a.closest("li").prev(),"prev")},img:function(b,c){if(b.length){var d,e,f,g=a(".clearing-preload-"+c),h=this.S("a",b);h.length?(d=h.attr("href"),e=h.data("clearing-interchange")):(f=this.S("img",b),d=f.attr("src"),e=f.data("clearing-interchange")),e?g.attr("data-interchange",e):(g.attr("src",d),g.attr("data-interchange",""))}return this},caption:function(a,b){var c=b.attr("data-caption");return c?a.html(c).show():a.text("").hide(),this},go:function(a,b){var c=this.S(".visible",a),d=c[b]();this.settings.skip_selector&&0!=d.find(this.settings.skip_selector).length&&(d=d[b]()),d.length&&this.S("img",d).trigger("click.fndtn.clearing",[c,d]).trigger("change.fndtn.clearing")},shift:function(a,b,c){var d,e=b.parent(),f=this.settings.prev_index||b.index(),g=this.direction(e,a,b),h=this.rtl?"right":"left",i=parseInt(e.css("left"),10),j=b.outerWidth(),k={};b.index()===f||/skip/.test(g)?/skip/.test(g)&&(d=b.index()-this.settings.up_count,this.lock(),d>0?(k[h]=-(d*j),e.animate(k,300,this.unlock())):(k[h]=0,e.animate(k,300,this.unlock()))):/left/.test(g)?(this.lock(),k[h]=i+j,e.animate(k,300,this.unlock())):/right/.test(g)&&(this.lock(),k[h]=i-j,e.animate(k,300,this.unlock())),c()},direction:function(a,b,c){var d,e=this.S("li",a),f=e.outerWidth()+e.outerWidth()/4,g=Math.floor(this.S(".clearing-container").outerWidth()/f)-1,h=e.index(c);return this.settings.up_count=g,d=this.adjacent(this.settings.prev_index,h)?h>g&&h>this.settings.prev_index?"right":h>g-1&&h<=this.settings.prev_index?"left":!1:"skip",this.settings.prev_index=h,d},adjacent:function(a,b){for(var c=b+1;c>=b-1;c--)if(c===a)return!0;return!1},lock:function(){this.settings.locked=!0},unlock:function(){this.settings.locked=!1},locked:function(){return this.settings.locked},off:function(){this.S(this.scope).off(".fndtn.clearing"),this.S(b).off(".fndtn.clearing")},reflow:function(){this.init()}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"5.5.2",settings:{active_class:"open",disabled_class:"disabled",mega_class:"mega",align:"bottom",is_hover:!1,hover_timeout:150,opened:function(){},closed:function(){}},init:function(b,c,d){Foundation.inherit(this,"throttle"),a.extend(!0,this.settings,c,d),this.bindings(c,d)},events:function(d){var e=this,f=e.S;f(this.scope).off(".dropdown").on("click.fndtn.dropdown","["+this.attr_name()+"]",function(b){var c=f(this).data(e.attr_name(!0)+"-init")||e.settings;(!c.is_hover||Modernizr.touch)&&(b.preventDefault(),f(this).parent("[data-reveal-id]").length&&b.stopPropagation(),e.toggle(a(this)))}).on("mouseenter.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(a){var b,c,d=f(this);clearTimeout(e.timeout),d.data(e.data_attr())?(b=f("#"+d.data(e.data_attr())),c=d):(b=d,c=f("["+e.attr_name()+'="'+b.attr("id")+'"]'));var g=c.data(e.attr_name(!0)+"-init")||e.settings;f(a.currentTarget).data(e.data_attr())&&g.is_hover&&e.closeall.call(e),g.is_hover&&e.open.apply(e,[b,c])}).on("mouseleave.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(a){var b,c=f(this);if(c.data(e.data_attr()))b=c.data(e.data_attr(!0)+"-init")||e.settings;else var d=f("["+e.attr_name()+'="'+f(this).attr("id")+'"]'),b=d.data(e.attr_name(!0)+"-init")||e.settings;e.timeout=setTimeout(function(){c.data(e.data_attr())?b.is_hover&&e.close.call(e,f("#"+c.data(e.data_attr()))):b.is_hover&&e.close.call(e,c)}.bind(this),b.hover_timeout)}).on("click.fndtn.dropdown",function(b){var d=f(b.target).closest("["+e.attr_name()+"-content]"),g=d.find("a");return g.length>0&&"false"!==d.attr("aria-autoclose")&&e.close.call(e,f("["+e.attr_name()+"-content]")),b.target!==c&&!a.contains(c.documentElement,b.target)||f(b.target).closest("["+e.attr_name()+"]").length>0?void 0:!f(b.target).data("revealId")&&d.length>0&&(f(b.target).is("["+e.attr_name()+"-content]")||a.contains(d.first()[0],b.target))?void b.stopPropagation():void e.close.call(e,f("["+e.attr_name()+"-content]"))}).on("opened.fndtn.dropdown","["+e.attr_name()+"-content]",function(){e.settings.opened.call(this)}).on("closed.fndtn.dropdown","["+e.attr_name()+"-content]",function(){e.settings.closed.call(this)}),f(b).off(".dropdown").on("resize.fndtn.dropdown",e.throttle(function(){e.resize.call(e)},50)),this.resize()},close:function(b){var c=this;b.each(function(d){var e=a("["+c.attr_name()+"="+b[d].id+"]")||a("aria-controls="+b[d].id+"]");e.attr("aria-expanded","false"),c.S(this).hasClass(c.settings.active_class)&&(c.S(this).css(Foundation.rtl?"right":"left","-99999px").attr("aria-hidden","true").removeClass(c.settings.active_class).prev("["+c.attr_name()+"]").removeClass(c.settings.active_class).removeData("target"),c.S(this).trigger("closed.fndtn.dropdown",[b]))}),b.removeClass("f-open-"+this.attr_name(!0))},closeall:function(){var b=this;a.each(b.S(".f-open-"+this.attr_name(!0)),function(){b.close.call(b,b.S(this))})},open:function(a,b){this.css(a.addClass(this.settings.active_class),b),a.prev("["+this.attr_name()+"]").addClass(this.settings.active_class),a.data("target",b.get(0)).trigger("opened.fndtn.dropdown",[a,b]),a.attr("aria-hidden","false"),b.attr("aria-expanded","true"),a.focus(),a.addClass("f-open-"+this.attr_name(!0))},data_attr:function(){return this.namespace.length>0?this.namespace+"-"+this.name:this.name},toggle:function(a){if(!a.hasClass(this.settings.disabled_class)){var b=this.S("#"+a.data(this.data_attr()));0!==b.length&&(this.close.call(this,this.S("["+this.attr_name()+"-content]").not(b)),b.hasClass(this.settings.active_class)?(this.close.call(this,b),b.data("target")!==a.get(0)&&this.open.call(this,b,a)):this.open.call(this,b,a))}},resize:function(){var b=this.S("["+this.attr_name()+"-content].open"),c=a(b.data("target"));b.length&&c.length&&this.css(b,c)},css:function(a,b){var c=Math.max((b.width()-a.width())/2,8),d=b.data(this.attr_name(!0)+"-init")||this.settings,e=a.parent().css("overflow-y")||a.parent().css("overflow");if(this.clear_idx(),this.small()){var f=this.dirs.bottom.call(a,b,d);a.attr("style","").removeClass("drop-left drop-right drop-top").css({position:"absolute",width:"95%","max-width":"none",top:f.top}),a.css(Foundation.rtl?"right":"left",c)}else if("visible"!==e){var g=b[0].offsetTop+b[0].offsetHeight;a.attr("style","").css({position:"absolute",top:g}),a.css(Foundation.rtl?"right":"left",c)}else this.style(a,b,d);return a},style:function(b,c,d){var e=a.extend({position:"absolute"},this.dirs[d.align].call(b,c,d));b.attr("style","").css(e)},dirs:{_base:function(a){var d=this.offsetParent(),e=d.offset(),f=a.offset();f.top-=e.top,f.left-=e.left,f.missRight=!1,f.missTop=!1,f.missLeft=!1,f.leftRightFlag=!1;var g;g=c.getElementsByClassName("row")[0]?c.getElementsByClassName("row")[0].clientWidth:b.innerWidth;var h=(b.innerWidth-g)/2,i=g;return this.hasClass("mega")||(a.offset().top<=this.outerHeight()&&(f.missTop=!0,i=b.innerWidth-h,f.leftRightFlag=!0),a.offset().left+this.outerWidth()>a.offset().left+h&&a.offset().left-h>this.outerWidth()&&(f.missRight=!0,f.missLeft=!1),a.offset().left-this.outerWidth()<=0&&(f.missLeft=!0,f.missRight=!1)),f},top:function(a,b){var c=Foundation.libs.dropdown,d=c.dirs._base.call(this,a);return this.addClass("drop-top"),1==d.missTop&&(d.top=d.top+a.outerHeight()+this.outerHeight(),this.removeClass("drop-top")),1==d.missRight&&(d.left=d.left-this.outerWidth()+a.outerWidth()),(a.outerWidth()<this.outerWidth()||c.small()||this.hasClass(b.mega_menu))&&c.adjust_pip(this,a,b,d),Foundation.rtl?{left:d.left-this.outerWidth()+a.outerWidth(),top:d.top-this.outerHeight()}:{left:d.left,top:d.top-this.outerHeight()}},bottom:function(a,b){var c=Foundation.libs.dropdown,d=c.dirs._base.call(this,a);return 1==d.missRight&&(d.left=d.left-this.outerWidth()+a.outerWidth()),(a.outerWidth()<this.outerWidth()||c.small()||this.hasClass(b.mega_menu))&&c.adjust_pip(this,a,b,d), 11476c.rtl?{left:d.left-this.outerWidth()+a.outerWidth(),top:d.top+a.outerHeight()}:{left:d.left,top:d.top+a.outerHeight()}},left:function(a,b){var c=Foundation.libs.dropdown.dirs._base.call(this,a);return this.addClass("drop-left"),1==c.missLeft&&(c.left=c.left+this.outerWidth(),c.top=c.top+a.outerHeight(),this.removeClass("drop-left")),{left:c.left-this.outerWidth(),top:c.top}},right:function(a,b){var c=Foundation.libs.dropdown.dirs._base.call(this,a);this.addClass("drop-right"),1==c.missRight?(c.left=c.left-this.outerWidth(),c.top=c.top+a.outerHeight(),this.removeClass("drop-right")):c.triggeredRight=!0;var d=Foundation.libs.dropdown;return(a.outerWidth()<this.outerWidth()||d.small()||this.hasClass(b.mega_menu))&&d.adjust_pip(this,a,b,c),{left:c.left+a.outerWidth(),top:c.top}}},adjust_pip:function(a,b,c,d){var e=Foundation.stylesheet,f=8;a.hasClass(c.mega_class)?f=d.left+b.outerWidth()/2-8:this.small()&&(f+=d.left-8),this.rule_idx=e.cssRules.length;var g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left: "+f+"px;",j="left: "+(f-1)+"px;";1==d.missRight&&(f=a.outerWidth()-23,g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left: "+f+"px;",j="left: "+(f-1)+"px;"),1==d.triggeredRight&&(g=".f-dropdown.open:before",h=".f-dropdown.open:after",i="left:-12px;",j="left:-14px;"),e.insertRule?(e.insertRule([g,"{",i,"}"].join(" "),this.rule_idx),e.insertRule([h,"{",j,"}"].join(" "),this.rule_idx+1)):(e.addRule(g,i,this.rule_idx),e.addRule(h,j,this.rule_idx+1))},clear_idx:function(){var a=Foundation.stylesheet;"undefined"!=typeof this.rule_idx&&(a.deleteRule(this.rule_idx),a.deleteRule(this.rule_idx),delete this.rule_idx)},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},off:function(){this.S(this.scope).off(".fndtn.dropdown"),this.S("html, body").off(".fndtn.dropdown"),this.S(b).off(".fndtn.dropdown"),this.S("[data-dropdown-content]").off(".fndtn.dropdown")},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.equalizer={name:"equalizer",version:"5.5.2",settings:{use_tallest:!0,before_height_change:a.noop,after_height_change:a.noop,equalize_on_stack:!1,act_on_hidden_el:!1},init:function(a,b,c){Foundation.inherit(this,"image_loaded"),this.bindings(b,c),this.reflow()},events:function(){this.S(b).off(".equalizer").on("resize.fndtn.equalizer",function(a){this.reflow()}.bind(this))},equalize:function(b){var c,d,e=!1,f=b.data("equalizer"),g=b.data(this.attr_name(!0)+"-init")||this.settings;if(c=b.find(g.act_on_hidden_el?f?"["+this.attr_name()+'-watch="'+f+'"]':"["+this.attr_name()+"-watch]":f?"["+this.attr_name()+'-watch="'+f+'"]:visible':"["+this.attr_name()+"-watch]:visible"),0!==c.length&&(g.before_height_change(),b.trigger("before-height-change.fndth.equalizer"),c.height("inherit"),g.equalize_on_stack!==!1||(d=c.first().offset().top,c.each(function(){return a(this).offset().top!==d?(e=!0,!1):void 0}),!e))){var h=c.map(function(){return a(this).outerHeight(!1)}).get();if(g.use_tallest){var i=Math.max.apply(null,h);c.css("height",i)}else{var j=Math.min.apply(null,h);c.css("height",j)}g.after_height_change(),b.trigger("after-height-change.fndtn.equalizer")}},reflow:function(){var b=this;this.S("["+this.attr_name()+"]",this.scope).each(function(){var c=a(this),d=c.data("equalizer-mq"),e=!0;d&&(d="is_"+d.replace(/-/g,"_"),Foundation.utils.hasOwnProperty(d)&&(e=!1)),b.image_loaded(b.S("img",this),function(){if(e||Foundation.utils[d]())b.equalize(c);else{var a=c.find("["+b.attr_name()+"-watch]:visible");a.css("height","auto")}})})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.interchange={name:"interchange",version:"5.5.2",cache:{},images_loaded:!1,nodes_loaded:!1,settings:{load_attr:"interchange",named_queries:{"default":"only screen",small:Foundation.media_queries.small,"small-only":Foundation.media_queries["small-only"],medium:Foundation.media_queries.medium,"medium-only":Foundation.media_queries["medium-only"],large:Foundation.media_queries.large,"large-only":Foundation.media_queries["large-only"],xlarge:Foundation.media_queries.xlarge,"xlarge-only":Foundation.media_queries["xlarge-only"],xxlarge:Foundation.media_queries.xxlarge,landscape:"only screen and (orientation: landscape)",portrait:"only screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx)"},directives:{replace:function(b,c,d){if(null!==b&&/IMG/.test(b[0].nodeName)){var e=b[0].src;if(new RegExp(c,"i").test(e))return;return b.attr("src",c),d(b[0].src)}var f=b.data(this.data_attr+"-last-path"),g=this;if(f!=c)return/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(c)?(a(b).css("background-image","url("+c+")"),b.data("interchange-last-path",c),d(c)):a.get(c,function(a){b.html(a),b.data(g.data_attr+"-last-path",c),d()})}}},init:function(b,c,d){Foundation.inherit(this,"throttle random_str"),this.data_attr=this.set_data_attr(),a.extend(!0,this.settings,c,d),this.bindings(c,d),this.reflow()},get_media_hash:function(){var a="";for(var b in this.settings.named_queries)a+=matchMedia(this.settings.named_queries[b]).matches.toString();return a},events:function(){var c,d=this;return a(b).off(".interchange").on("resize.fndtn.interchange",d.throttle(function(){var a=d.get_media_hash();a!==c&&d.resize(),c=a},50)),this},resize:function(){var b=this.cache;if(!this.images_loaded||!this.nodes_loaded)return void setTimeout(a.proxy(this.resize,this),50);for(var c in b)if(b.hasOwnProperty(c)){var d=this.results(c,b[c]);d&&this.settings.directives[d.scenario[1]].call(this,d.el,d.scenario[0],function(a){if(arguments[0]instanceof Array)var b=arguments[0];else var b=Array.prototype.slice.call(arguments,0);return function(){a.el.trigger(a.scenario[1],b)}}(d))}},results:function(a,b){var c=b.length;if(c>0)for(var d=this.S("["+this.add_namespace("data-uuid")+'="'+a+'"]');c--;){var e,f=b[c][2];if(e=matchMedia(this.settings.named_queries.hasOwnProperty(f)?this.settings.named_queries[f]:f),e.matches)return{el:d,scenario:b[c]}}return!1},load:function(a,b){return("undefined"==typeof this["cached_"+a]||b)&&this["update_"+a](),this["cached_"+a]},update_images:function(){var a=this.S("img["+this.data_attr+"]"),b=a.length,c=b,d=0,e=this.data_attr;for(this.cache={},this.cached_images=[],this.images_loaded=0===b;c--;){if(d++,a[c]){var f=a[c].getAttribute(e)||"";f.length>0&&this.cached_images.push(a[c])}d===b&&(this.images_loaded=!0,this.enhance("images"))}return this},update_nodes:function(){var a=this.S("["+this.data_attr+"]").not("img"),b=a.length,c=b,d=0,e=this.data_attr;for(this.cached_nodes=[],this.nodes_loaded=0===b;c--;){d++;var f=a[c].getAttribute(e)||"";f.length>0&&this.cached_nodes.push(a[c]),d===b&&(this.nodes_loaded=!0,this.enhance("nodes"))}return this},enhance:function(c){for(var d=this["cached_"+c].length;d--;)this.object(a(this["cached_"+c][d]));return a(b).trigger("resize.fndtn.interchange")},convert_directive:function(a){var b=this.trim(a);return b.length>0?b:"replace"},parse_scenario:function(a){var b=a[0].match(/(.+),\s*(\w+)\s*$/),c=a[1].match(/(.*)\)/);if(b)var d=b[1],e=b[2];else var f=a[0].split(/,\s*$/),d=f[0],e="";return[this.trim(d),this.convert_directive(e),this.trim(c[1])]},object:function(a){var b=this.parse_data_attr(a),c=[],d=b.length;if(d>0)for(;d--;){var e=b[d].split(/,\s?\(/);if(e.length>1){var f=this.parse_scenario(e);c.push(f)}}return this.store(a,c)},store:function(a,b){var c=this.random_str(),d=a.data(this.add_namespace("uuid",!0));return this.cache[d]?this.cache[d]:(a.attr(this.add_namespace("data-uuid"),c),this.cache[c]=b)},trim:function(b){return"string"==typeof b?a.trim(b):b},set_data_attr:function(a){return a?this.namespace.length>0?this.namespace+"-"+this.settings.load_attr:this.settings.load_attr:this.namespace.length>0?"data-"+this.namespace+"-"+this.settings.load_attr:"data-"+this.settings.load_attr},parse_data_attr:function(a){for(var b=a.attr(this.attr_name()).split(/\[(.*?)\]/),c=b.length,d=[];c--;)b[c].replace(/[\W\d]+/,"").length>4&&d.push(b[c]);return d},reflow:function(){this.load("images",!0),this.load("nodes",!0)}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.joyride={name:"joyride",version:"5.5.2",defaults:{expose:!1,modal:!0,keyboard:!0,tip_location:"bottom",nub_position:"auto",scroll_speed:1500,scroll_animation:"linear",timer:0,start_timer_on_click:!0,start_offset:0,next_button:!0,prev_button:!0,tip_animation:"fade",pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:!1,cookie_name:"joyride",cookie_domain:!1,cookie_expires:365,tip_container:"body",abort_on_close:!0,tip_location_patterns:{top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'<a href="#close" class="joyride-close-tip">×</a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',tip:'<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',wrapper:'<div class="joyride-content-wrapper"></div>',button:'<a href="#" class="small button joyride-next-tip"></a>',prev_button:'<a href="#" class="small button joyride-prev-tip"></a>',modal:'<div class="joyride-modal-bg"></div>',expose:'<div class="joyride-expose-wrapper"></div>',expose_cover:'<div class="joyride-expose-cover"></div>'},expose_add_class:""},init:function(b,c,d){Foundation.inherit(this,"throttle random_str"),this.settings=this.settings||a.extend({},this.defaults,d||c),this.bindings(c,d)},go_next:function(){this.settings.$li.next().length<1?this.end():this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(),this.startTimer()):(this.hide(),this.show())},go_prev:function(){this.settings.$li.prev().length<1||(this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(null,!0),this.startTimer()):(this.hide(),this.show(null,!0)))},events:function(){var c=this;a(this.scope).off(".joyride").on("click.fndtn.joyride",".joyride-next-tip, .joyride-modal-bg",function(a){a.preventDefault(),this.go_next()}.bind(this)).on("click.fndtn.joyride",".joyride-prev-tip",function(a){a.preventDefault(),this.go_prev()}.bind(this)).on("click.fndtn.joyride",".joyride-close-tip",function(a){a.preventDefault(),this.end(this.settings.abort_on_close)}.bind(this)).on("keyup.fndtn.joyride",function(a){if(this.settings.keyboard&&this.settings.riding)switch(a.which){case 39:a.preventDefault(),this.go_next();break;case 37:a.preventDefault(),this.go_prev();break;case 27:a.preventDefault(),this.end(this.settings.abort_on_close)}}.bind(this)),a(b).off(".joyride").on("resize.fndtn.joyride",c.throttle(function(){if(a("["+c.attr_name()+"]").length>0&&c.settings.$next_tip&&c.settings.riding){if(c.settings.exposed.length>0){var b=a(c.settings.exposed);b.each(function(){var b=a(this);c.un_expose(b),c.expose(b)})}c.is_phone()?c.pos_phone():c.pos_default(!1)}},100))},start:function(){var b=this,c=a("["+this.attr_name()+"]",this.scope),d=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],e=d.length;!c.length>0||(this.settings.init||this.events(),this.settings=c.data(this.attr_name(!0)+"-init"),this.settings.$content_el=c,this.settings.$body=a(this.settings.tip_container),this.settings.body_offset=a(this.settings.tip_container).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,this.settings.riding=!0,"function"!=typeof a.cookie&&(this.settings.cookie_monster=!1),(!this.settings.cookie_monster||this.settings.cookie_monster&&!a.cookie(this.settings.cookie_name))&&(this.settings.$tip_content.each(function(c){var f=a(this);this.settings=a.extend({},b.defaults,b.data_options(f));for(var g=e;g--;)b.settings[d[g]]=parseInt(b.settings[d[g]],10);b.create({$li:f,index:c})}),!this.settings.start_timer_on_click&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init")))},resume:function(){this.set_li(),this.show()},tip_template:function(b){var c,d;return b.tip_class=b.tip_class||"",c=a(this.settings.template.tip).addClass(b.tip_class),d=a.trim(a(b.li).html())+this.prev_button_text(b.prev_button_text,b.index)+this.button_text(b.button_text)+this.settings.template.link+this.timer_instance(b.index),c.append(a(this.settings.template.wrapper)),c.first().attr(this.add_namespace("data-index"),b.index),a(".joyride-content-wrapper",c).append(d),c[0]},timer_instance:function(b){var c;return c=0===b&&this.settings.start_timer_on_click&&this.settings.timer>0||0===this.settings.timer?"":a(this.settings.template.timer)[0].outerHTML},button_text:function(b){return this.settings.tip_settings.next_button?(b=a.trim(b)||"Next",b=a(this.settings.template.button).append(b)[0].outerHTML):b="",b},prev_button_text:function(b,c){return this.settings.tip_settings.prev_button?(b=a.trim(b)||"Previous",b=0==c?a(this.settings.template.prev_button).append(b).addClass("disabled")[0].outerHTML:a(this.settings.template.prev_button).append(b)[0].outerHTML):b="",b},create:function(b){this.settings.tip_settings=a.extend({},this.settings,this.data_options(b.$li));var c=b.$li.attr(this.add_namespace("data-button"))||b.$li.attr(this.add_namespace("data-text")),d=b.$li.attr(this.add_namespace("data-button-prev"))||b.$li.attr(this.add_namespace("data-prev-text")),e=b.$li.attr("class"),f=a(this.tip_template({tip_class:e,index:b.index,button_text:c,prev_button_text:d,li:b.$li}));a(this.settings.tip_container).append(f)},show:function(b,c){var e=null;if(this.settings.$li===d||-1===a.inArray(this.settings.$li.index(),this.settings.pause_after))if(this.settings.paused?this.settings.paused=!1:this.set_li(b,c),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0){if(b&&(this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tip_settings=a.extend({},this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location],!/body/i.test(this.settings.$target.selector)){var f=a(".joyride-modal-bg");/pop/i.test(this.settings.tipAnimation)?f.hide():f.fadeOut(this.settings.tipAnimationFadeSpeed),this.scroll_to()}this.is_phone()?this.pos_phone(!0):this.pos_default(!0),e=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tip_animation)?(e.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),setTimeout(function(){e.animate({width:e.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tip_animation)&&(e.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show(),setTimeout(function(){e.animate({width:e.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed)),this.settings.$current_tip=this.settings.$next_tip}else this.settings.$li&&this.settings.$target.length<1?this.show(b,c):this.end();else this.settings.paused=!0},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.modal||a(".joyride-modal-bg").hide(),this.settings.$current_tip.css("visibility","hidden"),setTimeout(a.proxy(function(){this.hide(),this.css("visibility","visible")},this.settings.$current_tip),0),this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(a,b){a?(this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset),this.set_next_tip(),this.settings.$current_tip=this.settings.$next_tip):(b?this.settings.$li=this.settings.$li.prev():this.settings.$li=this.settings.$li.next(),this.set_next_tip()),this.set_target()},set_next_tip:function(){this.settings.$next_tip=a(".joyride-tip-guide").eq(this.settings.$li.index()),this.settings.$next_tip.data("closed","")},set_target:function(){var b=this.settings.$li.attr(this.add_namespace("data-class")),d=this.settings.$li.attr(this.add_namespace("data-id")),e=function(){return d?a(c.getElementById(d)):b?a("."+b).first():a("body")};this.settings.$target=e()},scroll_to:function(){var c,d;c=a(b).height()/2,d=Math.ceil(this.settings.$target.offset().top-c+this.settings.$next_tip.outerHeight()),0!=d&&a("html, body").stop().animate({scrollTop:d},this.settings.scroll_speed,"swing")},paused:function(){return-1===a.inArray(this.settings.$li.index()+1,this.settings.pause_after)},restart:function(){this.hide(),this.settings.$li=d,this.show("init")},pos_default:function(a){var b=this.settings.$next_tip.find(".joyride-nub"),c=Math.ceil(b.outerWidth()/2),d=Math.ceil(b.outerHeight()/2),e=a||!1;if(e&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector))this.settings.$li.length&&this.pos_modal(b);else{var f=this.settings.tip_settings.tipAdjustmentY?parseInt(this.settings.tip_settings.tipAdjustmentY):0,g=this.settings.tip_settings.tipAdjustmentX?parseInt(this.settings.tip_settings.tipAdjustmentX):0;this.bottom()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top+d+this.settings.$target.outerHeight()+f,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()+g}:{top:this.settings.$target.offset().top+d+this.settings.$target.outerHeight()+f,left:this.settings.$target.offset().left+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"top")):this.top()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-d+f,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}:{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-d+f,left:this.settings.$target.offset().left+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"bottom")):this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top+f,left:this.settings.$target.outerWidth()+this.settings.$target.offset().left+c+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top+f,left:this.settings.$target.offset().left-this.settings.$next_tip.outerWidth()-c+g}),this.nub_position(b,this.settings.tip_settings.nub_position,"right")),!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tip_settings.tip_location_pattern.length&&(b.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),this.settings.tip_settings.tip_location=this.settings.tip_settings.tip_location_pattern[this.settings.attempts],this.settings.attempts++,this.pos_default())}e&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_phone:function(b){var c=this.settings.$next_tip.outerHeight(),d=(this.settings.$next_tip.offset(),this.settings.$target.outerHeight()),e=a(".joyride-nub",this.settings.$next_tip),f=Math.ceil(e.outerHeight()/2),g=b||!1;e.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),g&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(e):this.top()?(this.settings.$next_tip.offset({top:this.settings.$target.offset().top-c-f}),e.addClass("bottom")):(this.settings.$next_tip.offset({top:this.settings.$target.offset().top+d+f}),e.addClass("top")),g&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_modal:function(a){this.center(),a.hide(),this.show_modal()},show_modal:function(){if(!this.settings.$next_tip.data("closed")){var b=a(".joyride-modal-bg");if(b.length<1){var b=a(this.settings.template.modal);b.appendTo("body")}/pop/i.test(this.settings.tip_animation)?b.show():b.fadeIn(this.settings.tip_animation_fade_speed)}},expose:function(){var c,d,e,f,g,h="expose-"+this.random_str(6);if(arguments.length>0&&arguments[0]instanceof a)e=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;e=this.settings.$target}return e.length<1?(b.console&&console.error("element not valid",e),!1):(c=a(this.settings.template.expose),this.settings.$body.append(c),c.css({top:e.offset().top,left:e.offset().left,width:e.outerWidth(!0),height:e.outerHeight(!0)}),d=a(this.settings.template.expose_cover),f={zIndex:e.css("z-index"),position:e.css("position")},g=null==e.attr("class")?"":e.attr("class"),e.css("z-index",parseInt(c.css("z-index"))+1),"static"==f.position&&e.css("position","relative"),e.data("expose-css",f),e.data("orig-class",g),e.attr("class",g+" "+this.settings.expose_add_class),d.css({top:e.offset().top,left:e.offset().left,width:e.outerWidth(!0),height:e.outerHeight(!0)}),this.settings.modal&&this.show_modal(),this.settings.$body.append(d),c.addClass(h),d.addClass(h),e.data("expose",h),this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,e),void this.add_exposed(e))},un_expose:function(){var c,d,e,f,g,h=!1;if(arguments.length>0&&arguments[0]instanceof a)d=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;d=this.settings.$target}return d.length<1?(b.console&&console.error("element not valid",d),!1):(c=d.data("expose"),e=a("."+c),arguments.length>1&&(h=arguments[1]),h===!0?a(".joyride-expose-wrapper,.joyride-expose-cover").remove():e.remove(),f=d.data("expose-css"),"auto"==f.zIndex?d.css("z-index",""):d.css("z-index",f.zIndex),f.position!=d.css("position")&&("static"==f.position?d.css("position",""):d.css("position",f.position)),g=d.data("orig-class"),d.attr("class",g),d.removeData("orig-classes"),d.removeData("expose"),d.removeData("expose-z-index"),void this.remove_exposed(d))},add_exposed:function(b){this.settings.exposed=this.settings.exposed||[],b instanceof a||"object"==typeof b?this.settings.exposed.push(b[0]):"string"==typeof b&&this.settings.exposed.push(b)},remove_exposed:function(b){var c,d;for(b instanceof a?c=b[0]:"string"==typeof b&&(c=b),this.settings.exposed=this.settings.exposed||[],d=this.settings.exposed.length;d--;)if(this.settings.exposed[d]==c)return void this.settings.exposed.splice(d,1)},center:function(){var c=a(b);return this.settings.$next_tip.css({top:(c.height()-this.settings.$next_tip.outerHeight())/2+c.scrollTop(),left:(c.width()-this.settings.$next_tip.outerWidth())/2+c.scrollLeft()}),!0},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location)},top:function(){return/top/i.test(this.settings.tip_settings.tip_location)},right:function(){return/right/i.test(this.settings.tip_settings.tip_location)},left:function(){return/left/i.test(this.settings.tip_settings.tip_location)},corners:function(c){var d=a(b),e=d.height()/2,f=Math.ceil(this.settings.$target.offset().top-e+this.settings.$next_tip.outerHeight()),g=d.width()+d.scrollLeft(),h=d.height()+f,i=d.height()+d.scrollTop(),j=d.scrollTop();return j>f&&(j=0>f?0:f),h>i&&(i=h),[c.offset().top<j,g<c.offset().left+c.outerWidth(),i<c.offset().top+c.outerHeight(),d.scrollLeft()>c.offset().left]},visible:function(a){for(var b=a.length;b--;)if(a[b])return!1;return!0},nub_position:function(a,b,c){a.addClass("auto"===b?c:b)},startTimer:function(){this.settings.$li.length?this.settings.automate=setTimeout(function(){this.hide(),this.show(),this.startTimer()}.bind(this),this.settings.timer):clearTimeout(this.settings.automate)},end:function(b){this.settings.cookie_monster&&a.cookie(this.settings.cookie_name,"ridden",{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain}),this.settings.timer>0&&clearTimeout(this.settings.automate),this.settings.modal&&this.settings.expose&&this.un_expose(),a(this.scope).off("keyup.joyride"),this.settings.$next_tip.data("closed",!0),this.settings.riding=!1,a(".joyride-modal-bg").hide(),this.settings.$current_tip.hide(),("undefined"==typeof b||b===!1)&&(this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip),this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip)),a(".joyride-tip-guide").remove()},off:function(){a(this.scope).off(".joyride"),a(b).off(".joyride"),a(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride"),a(".joyride-tip-guide, .joyride-modal-bg").remove(),clearTimeout(this.settings.automate),this.settings={}},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs["magellan-expedition"]={name:"magellan-expedition",version:"5.5.2",settings:{active_class:"active",threshold:0,destination_threshold:20,throttle_delay:30,fixed_top:0,offset_by_height:!0,duration:700,easing:"swing"},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c)},events:function(){var b=this,c=b.S,d=b.settings;b.set_expedition_position(),c(b.scope).off(".magellan").on("click.fndtn.magellan","["+b.add_namespace("data-magellan-arrival")+"] a[href*=#]",function(c){var d=this.hostname===location.hostname||!this.hostname,e=b.filterPathname(location.pathname)===b.filterPathname(this.pathname),f=this.hash.replace(/(:|\.|\/)/g,"\\$1"),g=this;if(d&&e&&f){c.preventDefault();var h=a(this).closest("["+b.attr_name()+"]"),i=h.data("magellan-expedition-init"),j=this.hash.split("#").join(""),k=a('a[name="'+j+'"]');0===k.length&&(k=a("#"+j));var l=k.offset().top-i.destination_threshold+1;i.offset_by_height&&(l-=h.outerHeight()),a("html, body").stop().animate({scrollTop:l},i.duration,i.easing,function(){history.pushState?history.pushState(null,null,g.pathname+"#"+j):location.hash=g.pathname+"#"+j})}}).on("scroll.fndtn.magellan",b.throttle(this.check_for_arrivals.bind(this),d.throttle_delay))},check_for_arrivals:function(){var a=this;a.update_arrivals(),a.update_expedition_positions()},set_expedition_position:function(){var b=this;a("["+this.attr_name()+"=fixed]",b.scope).each(function(c,d){var e,f,g=a(this),h=g.data("magellan-expedition-init"),i=g.attr("styles");g.attr("style",""),e=g.offset().top+h.threshold,f=parseInt(g.data("magellan-fixed-top")),isNaN(f)||(b.settings.fixed_top=f),g.data(b.data_attr("magellan-top-offset"),e),g.attr("style",i)})},update_expedition_positions:function(){var c=this,d=a(b).scrollTop();a("["+this.attr_name()+"=fixed]",c.scope).each(function(){var b=a(this),e=b.data("magellan-expedition-init"),f=b.attr("style"),g=b.data("magellan-top-offset");if(d+c.settings.fixed_top>=g){var h=b.prev("["+c.add_namespace("data-magellan-expedition-clone")+"]");0===h.length&&(h=b.clone(),h.removeAttr(c.attr_name()),h.attr(c.add_namespace("data-magellan-expedition-clone"),""),b.before(h)),b.css({position:"fixed",top:e.fixed_top}).addClass("fixed")}else b.prev("["+c.add_namespace("data-magellan-expedition-clone")+"]").remove(),b.attr("style",f).css("position","").css("top","").removeClass("fixed")})},update_arrivals:function(){var c=this,d=a(b).scrollTop();a("["+this.attr_name()+"]",c.scope).each(function(){var b=a(this),e=b.data(c.attr_name(!0)+"-init"),f=c.offsets(b,d),g=b.find("["+c.add_namespace("data-magellan-arrival")+"]"),h=!1;f.each(function(a,d){if(d.viewport_offset>=d.top_offset){var f=b.find("["+c.add_namespace("data-magellan-arrival")+"]");return f.not(d.arrival).removeClass(e.active_class),d.arrival.addClass(e.active_class),h=!0,!0}}),h||g.removeClass(e.active_class)})},offsets:function(b,c){var d=this,e=b.data(d.attr_name(!0)+"-init"),f=c;return b.find("["+d.add_namespace("data-magellan-arrival")+"]").map(function(c,g){var h=a(this).data(d.data_attr("magellan-arrival")),i=a("["+d.add_namespace("data-magellan-destination")+"="+h+"]");if(i.length>0){var j=i.offset().top-e.destination_threshold;return e.offset_by_height&&(j-=b.outerHeight()),j=Math.floor(j),{destination:i,arrival:a(this),top_offset:j,viewport_offset:f}}}).sort(function(a,b){return a.top_offset<b.top_offset?-1:a.top_offset>b.top_offset?1:0})},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},off:function(){this.S(this.scope).off(".magellan"),this.S(b).off(".magellan")},filterPathname:function(a){return a=a||"",a.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},reflow:function(){var b=this;a("["+b.add_namespace("data-magellan-expedition-clone")+"]",b.scope).remove()}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.offcanvas={name:"offcanvas",version:"5.5.2",settings:{open_method:"move",close_on_click:!1},init:function(a,b,c){this.bindings(b,c)},events:function(){var b=this,c=b.S,d="",e="",f="";"move"===this.settings.open_method?(d="move-",e="right",f="left"):"overlap_single"===this.settings.open_method?(d="offcanvas-overlap-",e="right",f="left"):"overlap"===this.settings.open_method&&(d="offcanvas-overlap"),c(this.scope).off(".offcanvas").on("click.fndtn.offcanvas",".left-off-canvas-toggle",function(f){b.click_toggle_class(f,d+e),"overlap"!==b.settings.open_method&&c(".left-submenu").removeClass(d+e),a(".left-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".left-off-canvas-menu a",function(f){var g=b.get_settings(f),h=c(this).parent();!g.close_on_click||h.hasClass("has-submenu")||h.hasClass("back")?c(this).parent().hasClass("has-submenu")?(f.preventDefault(),c(this).siblings(".left-submenu").toggleClass(d+e)):h.hasClass("back")&&(f.preventDefault(),h.parent().removeClass(d+e)):(b.hide.call(b,d+e,b.get_wrapper(f)),h.parent().removeClass(d+e)),a(".left-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".right-off-canvas-toggle",function(e){b.click_toggle_class(e,d+f),"overlap"!==b.settings.open_method&&c(".right-submenu").removeClass(d+f),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".right-off-canvas-menu a",function(e){var g=b.get_settings(e),h=c(this).parent();!g.close_on_click||h.hasClass("has-submenu")||h.hasClass("back")?c(this).parent().hasClass("has-submenu")?(e.preventDefault(),c(this).siblings(".right-submenu").toggleClass(d+f)):h.hasClass("back")&&(e.preventDefault(),h.parent().removeClass(d+f)):(b.hide.call(b,d+f,b.get_wrapper(e)),h.parent().removeClass(d+f)),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(g){b.click_remove_class(g,d+f),c(".right-submenu").removeClass(d+f),e&&(b.click_remove_class(g,d+e),c(".left-submenu").removeClass(d+f)),a(".right-off-canvas-toggle").attr("aria-expanded","true")}).on("click.fndtn.offcanvas",".exit-off-canvas",function(c){b.click_remove_class(c,d+f),a(".left-off-canvas-toggle").attr("aria-expanded","false"),e&&(b.click_remove_class(c,d+e),a(".right-off-canvas-toggle").attr("aria-expanded","false"))})},toggle:function(a,b){b=b||this.get_wrapper(),b.is("."+a)?this.hide(a,b):this.show(a,b)},show:function(a,b){b=b||this.get_wrapper(),b.trigger("open.fndtn.offcanvas"),b.addClass(a)},hide:function(a,b){b=b||this.get_wrapper(),b.trigger("close.fndtn.offcanvas"),b.removeClass(a)},click_toggle_class:function(a,b){ 11477a.preventDefault();var c=this.get_wrapper(a);this.toggle(b,c)},click_remove_class:function(a,b){a.preventDefault();var c=this.get_wrapper(a);this.hide(b,c)},get_settings:function(a){var b=this.S(a.target).closest("["+this.attr_name()+"]");return b.data(this.attr_name(!0)+"-init")||this.settings},get_wrapper:function(a){var b=this.S(a?a.target:this.scope).closest(".off-canvas-wrap");return 0===b.length&&(b=this.S(".off-canvas-wrap")),b},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";var e=function(){},f=function(e,f){if(e.hasClass(f.slides_container_class))return this;var j,k,l,m,n,o,p=this,q=e,r=0,s=!1;p.slides=function(){return q.children(f.slide_selector)},p.slides().first().addClass(f.active_slide_class),p.update_slide_number=function(b){f.slide_number&&(k.find("span:first").text(parseInt(b)+1),k.find("span:last").text(p.slides().length)),f.bullets&&(l.children().removeClass(f.bullets_active_class),a(l.children().get(b)).addClass(f.bullets_active_class))},p.update_active_link=function(b){var c=a('[data-orbit-link="'+p.slides().eq(b).attr("data-orbit-slide")+'"]');c.siblings().removeClass(f.bullets_active_class),c.addClass(f.bullets_active_class)},p.build_markup=function(){q.wrap('<div class="'+f.container_class+'"></div>'),j=q.parent(),q.addClass(f.slides_container_class),f.stack_on_small&&j.addClass(f.stack_on_small_class),f.navigation_arrows&&(j.append(a('<a href="#"><span></span></a>').addClass(f.prev_class)),j.append(a('<a href="#"><span></span></a>').addClass(f.next_class))),f.timer&&(m=a("<div>").addClass(f.timer_container_class),m.append("<span>"),m.append(a("<div>").addClass(f.timer_progress_class)),m.addClass(f.timer_paused_class),j.append(m)),f.slide_number&&(k=a("<div>").addClass(f.slide_number_class),k.append("<span></span> "+f.slide_number_text+" <span></span>"),j.append(k)),f.bullets&&(l=a("<ol>").addClass(f.bullets_container_class),j.append(l),l.wrap('<div class="orbit-bullets-container"></div>'),p.slides().each(function(b,c){var d=a("<li>").attr("data-orbit-slide",b).on("click",p.link_bullet);l.append(d)}))},p._goto=function(b,c){if(b===r)return!1;"object"==typeof o&&o.restart();var d=p.slides(),e="next";if(s=!0,r>b&&(e="prev"),b>=d.length){if(!f.circular)return!1;b=0}else if(0>b){if(!f.circular)return!1;b=d.length-1}var g=a(d.get(r)),h=a(d.get(b));g.css("zIndex",2),g.removeClass(f.active_slide_class),h.css("zIndex",4).addClass(f.active_slide_class),q.trigger("before-slide-change.fndtn.orbit"),f.before_slide_change(),p.update_active_link(b);var i=function(){var a=function(){r=b,s=!1,c===!0&&(o=p.create_timer(),o.start()),p.update_slide_number(r),q.trigger("after-slide-change.fndtn.orbit",[{slide_number:r,total_slides:d.length}]),f.after_slide_change(r,d.length)};q.outerHeight()!=h.outerHeight()&&f.variable_height?q.animate({height:h.outerHeight()},250,"linear",a):a()};if(1===d.length)return i(),!1;var j=function(){"next"===e&&n.next(g,h,i),"prev"===e&&n.prev(g,h,i)};h.outerHeight()>q.outerHeight()&&f.variable_height?q.animate({height:h.outerHeight()},250,"linear",j):j()},p.next=function(a){a.stopImmediatePropagation(),a.preventDefault(),p._goto(r+1)},p.prev=function(a){a.stopImmediatePropagation(),a.preventDefault(),p._goto(r-1)},p.link_custom=function(b){b.preventDefault();var c=a(this).attr("data-orbit-link");if("string"==typeof c&&""!=(c=a.trim(c))){var d=j.find("[data-orbit-slide="+c+"]");-1!=d.index()&&p._goto(d.index())}},p.link_bullet=function(b){var c=a(this).attr("data-orbit-slide");if("string"==typeof c&&""!=(c=a.trim(c)))if(isNaN(parseInt(c))){var d=j.find("[data-orbit-slide="+c+"]");-1!=d.index()&&p._goto(d.index()+1)}else p._goto(parseInt(c))},p.timer_callback=function(){p._goto(r+1,!0)},p.compute_dimensions=function(){var b=a(p.slides().get(r)),c=b.outerHeight();f.variable_height||p.slides().each(function(){a(this).outerHeight()>c&&(c=a(this).outerHeight())}),q.height(c)},p.create_timer=function(){var a=new g(j.find("."+f.timer_container_class),f,p.timer_callback);return a},p.stop_timer=function(){"object"==typeof o&&o.stop()},p.toggle_timer=function(){var a=j.find("."+f.timer_container_class);a.hasClass(f.timer_paused_class)?("undefined"==typeof o&&(o=p.create_timer()),o.start()):"object"==typeof o&&o.stop()},p.init=function(){p.build_markup(),f.timer&&(o=p.create_timer(),Foundation.utils.image_loaded(this.slides().children("img"),o.start)),n=new i(f,q),"slide"===f.animation&&(n=new h(f,q)),j.on("click","."+f.next_class,p.next),j.on("click","."+f.prev_class,p.prev),f.next_on_click&&j.on("click","."+f.slides_container_class+" [data-orbit-slide]",p.link_bullet),j.on("click",p.toggle_timer),f.swipe&&j.on("touchstart.fndtn.orbit",function(a){a.touches||(a=a.originalEvent);var b={start_page_x:a.touches[0].pageX,start_page_y:a.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:d};j.data("swipe-transition",b),a.stopPropagation()}).on("touchmove.fndtn.orbit",function(a){if(a.touches||(a=a.originalEvent),!(a.touches.length>1||a.scale&&1!==a.scale)){var b=j.data("swipe-transition");if("undefined"==typeof b&&(b={}),b.delta_x=a.touches[0].pageX-b.start_page_x,"undefined"==typeof b.is_scrolling&&(b.is_scrolling=!!(b.is_scrolling||Math.abs(b.delta_x)<Math.abs(a.touches[0].pageY-b.start_page_y))),!b.is_scrolling&&!b.active){a.preventDefault();var c=b.delta_x<0?r+1:r-1;b.active=!0,p._goto(c)}}}).on("touchend.fndtn.orbit",function(a){j.data("swipe-transition",{}),a.stopPropagation()}),j.on("mouseenter.fndtn.orbit",function(a){f.timer&&f.pause_on_hover&&p.stop_timer()}).on("mouseleave.fndtn.orbit",function(a){f.timer&&f.resume_on_mouseout&&o.start()}),a(c).on("click","[data-orbit-link]",p.link_custom),a(b).on("load resize",p.compute_dimensions),Foundation.utils.image_loaded(this.slides().children("img"),p.compute_dimensions),Foundation.utils.image_loaded(this.slides().children("img"),function(){j.prev("."+f.preloader_class).css("display","none"),p.update_slide_number(0),p.update_active_link(0),q.trigger("ready.fndtn.orbit")})},p.init()},g=function(a,b,c){var d,e,f=this,g=b.timer_speed,h=a.find("."+b.timer_progress_class),i=-1;this.update_progress=function(a){var b=h.clone();b.attr("style",""),b.css("width",a+"%"),h.replaceWith(b),h=b},this.restart=function(){clearTimeout(e),a.addClass(b.timer_paused_class),i=-1,f.update_progress(0)},this.start=function(){return a.hasClass(b.timer_paused_class)?(i=-1===i?g:i,a.removeClass(b.timer_paused_class),d=(new Date).getTime(),h.animate({width:"100%"},i,"linear"),e=setTimeout(function(){f.restart(),c()},i),void a.trigger("timer-started.fndtn.orbit")):!0},this.stop=function(){if(a.hasClass(b.timer_paused_class))return!0;clearTimeout(e),a.addClass(b.timer_paused_class);var c=(new Date).getTime();i-=c-d;var h=100-i/g*100;f.update_progress(h),a.trigger("timer-stopped.fndtn.orbit")}},h=function(b,c){var d=b.animation_speed,e=1===a("html[dir=rtl]").length,f=e?"marginRight":"marginLeft",g={};g[f]="0%",this.next=function(a,b,c){a.animate({marginLeft:"-100%"},d),b.animate(g,d,function(){a.css(f,"100%"),c()})},this.prev=function(a,b,c){a.animate({marginLeft:"100%"},d),b.css(f,"-100%"),b.animate(g,d,function(){a.css(f,"100%"),c()})}},i=function(b,c){{var d=b.animation_speed;1===a("html[dir=rtl]").length}this.next=function(a,b,c){b.css({margin:"0%",opacity:"0.01"}),b.animate({opacity:"1"},d,"linear",function(){a.css("margin","100%"),c()})},this.prev=function(a,b,c){b.css({margin:"0%",opacity:"0.01"}),b.animate({opacity:"1"},d,"linear",function(){a.css("margin","100%"),c()})}};Foundation.libs=Foundation.libs||{},Foundation.libs.orbit={name:"orbit",version:"5.5.2",settings:{animation:"slide",timer_speed:1e4,pause_on_hover:!0,resume_on_mouseout:!1,next_on_click:!0,animation_speed:500,stack_on_small:!1,navigation_arrows:!0,slide_number:!0,slide_number_text:"of",container_class:"orbit-container",stack_on_small_class:"orbit-stack-on-small",next_class:"orbit-next",prev_class:"orbit-prev",timer_container_class:"orbit-timer",timer_paused_class:"paused",timer_progress_class:"orbit-progress",slides_container_class:"orbit-slides-container",preloader_class:"preloader",slide_selector:"*",bullets_container_class:"orbit-bullets",bullets_active_class:"active",slide_number_class:"orbit-slide-number",caption_class:"orbit-caption",active_slide_class:"active",orbit_transition_class:"orbit-transitioning",bullets:!0,circular:!0,timer:!0,variable_height:!1,swipe:!0,before_slide_change:e,after_slide_change:e},init:function(a,b,c){this.bindings(b,c)},events:function(a){var b=new f(this.S(a),this.S(a).data("orbit-init"));this.S(a).data(this.name+"-instance",b)},reflow:function(){var a=this;if(a.S(a.scope).is("[data-orbit]")){var b=a.S(a.scope),c=b.data(a.name+"-instance");c.compute_dimensions()}else a.S("[data-orbit]",a.scope).each(function(b,c){var d=a.S(c),e=(a.data_options(d),d.data(a.name+"-instance"));e.compute_dimensions()})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";function e(a){var b=/fade/i.test(a),c=/pop/i.test(a);return{animate:b||c,pop:c,fade:b}}Foundation.libs.reveal={name:"reveal",version:"5.5.2",locked:!1,settings:{animation:"fadeAndPop",animation_speed:250,close_on_background_click:!0,close_on_esc:!0,dismiss_modal_class:"close-reveal-modal",multiple_opened:!1,bg_class:"reveal-modal-bg",root_element:"body",open:function(){},opened:function(){},close:function(){},closed:function(){},on_ajax_error:a.noop,bg:a(".reveal-modal-bg"),css:{open:{opacity:0,visibility:"visible",display:"block"},close:{opacity:1,visibility:"hidden",display:"none"}}},init:function(b,c,d){a.extend(!0,this.settings,c,d),this.bindings(c,d)},events:function(a){var b=this,d=b.S;return d(this.scope).off(".reveal").on("click.fndtn.reveal","["+this.add_namespace("data-reveal-id")+"]:not([disabled])",function(a){if(a.preventDefault(),!b.locked){var c=d(this),e=c.data(b.data_attr("reveal-ajax")),f=c.data(b.data_attr("reveal-replace-content"));if(b.locked=!0,"undefined"==typeof e)b.open.call(b,c);else{var g=e===!0?c.attr("href"):e;b.open.call(b,c,{url:g},{replaceContentSel:f})}}}),d(c).on("click.fndtn.reveal",this.close_targets(),function(a){if(a.preventDefault(),!b.locked){var c=d("["+b.attr_name()+"].open").data(b.attr_name(!0)+"-init")||b.settings,e=d(a.target)[0]===d("."+c.bg_class)[0];if(e){if(!c.close_on_background_click)return;a.stopPropagation()}b.locked=!0,b.close.call(b,e?d("["+b.attr_name()+"].open:not(.toback)"):d(this).closest("["+b.attr_name()+"]"))}}),d("["+b.attr_name()+"]",this.scope).length>0?d(this.scope).on("open.fndtn.reveal",this.settings.open).on("opened.fndtn.reveal",this.settings.opened).on("opened.fndtn.reveal",this.open_video).on("close.fndtn.reveal",this.settings.close).on("closed.fndtn.reveal",this.settings.closed).on("closed.fndtn.reveal",this.close_video):d(this.scope).on("open.fndtn.reveal","["+b.attr_name()+"]",this.settings.open).on("opened.fndtn.reveal","["+b.attr_name()+"]",this.settings.opened).on("opened.fndtn.reveal","["+b.attr_name()+"]",this.open_video).on("close.fndtn.reveal","["+b.attr_name()+"]",this.settings.close).on("closed.fndtn.reveal","["+b.attr_name()+"]",this.settings.closed).on("closed.fndtn.reveal","["+b.attr_name()+"]",this.close_video),!0},key_up_on:function(a){var b=this;return b.S("body").off("keyup.fndtn.reveal").on("keyup.fndtn.reveal",function(a){var c=b.S("["+b.attr_name()+"].open"),d=c.data(b.attr_name(!0)+"-init")||b.settings;d&&27===a.which&&d.close_on_esc&&!b.locked&&b.close.call(b,c)}),!0},key_up_off:function(a){return this.S("body").off("keyup.fndtn.reveal"),!0},open:function(c,d){var e,f=this;c?"undefined"!=typeof c.selector?e=f.S("#"+c.data(f.data_attr("reveal-id"))).first():(e=f.S(this.scope),d=c):e=f.S(this.scope);var g=e.data(f.attr_name(!0)+"-init");if(g=g||this.settings,e.hasClass("open")&&c.attr("data-reveal-id")==e.attr("id"))return f.close(e);if(!e.hasClass("open")){var h=f.S("["+f.attr_name()+"].open");if("undefined"==typeof e.data("css-top")&&e.data("css-top",parseInt(e.css("top"),10)).data("offset",this.cache_offset(e)),e.attr("tabindex","0").attr("aria-hidden","false"),this.key_up_on(e),e.on("open.fndtn.reveal",function(a){"fndtn.reveal"!==a.namespace}),e.on("open.fndtn.reveal").trigger("open.fndtn.reveal"),h.length<1&&this.toggle_bg(e,!0),"string"==typeof d&&(d={url:d}),"undefined"!=typeof d&&d.url){var i="undefined"!=typeof d.success?d.success:null;a.extend(d,{success:function(b,c,d){if(a.isFunction(i)){var j=i(b,c,d);"string"==typeof j&&(b=j)}"undefined"!=typeof options&&"undefined"!=typeof options.replaceContentSel?e.find(options.replaceContentSel).html(b):e.html(b),f.S(e).foundation("section","reflow"),f.S(e).children().foundation(),h.length>0&&(g.multiple_opened?f.to_back(h):f.hide(h,g.css.close)),f.show(e,g.css.open)}}),g.on_ajax_error!==a.noop&&a.extend(d,{error:g.on_ajax_error}),a.ajax(d)}else h.length>0&&(g.multiple_opened?f.to_back(h):f.hide(h,g.css.close)),this.show(e,g.css.open)}f.S(b).trigger("resize")},close:function(b){var b=b&&b.length?b:this.S(this.scope),c=this.S("["+this.attr_name()+"].open"),d=b.data(this.attr_name(!0)+"-init")||this.settings,e=this;c.length>0&&(b.removeAttr("tabindex","0").attr("aria-hidden","true"),this.locked=!0,this.key_up_off(b),b.trigger("close.fndtn.reveal"),(d.multiple_opened&&1===c.length||!d.multiple_opened||b.length>1)&&(e.toggle_bg(b,!1),e.to_front(b)),d.multiple_opened?(e.hide(b,d.css.close,d),e.to_front(a(a.makeArray(c).reverse()[1]))):e.hide(c,d.css.close,d))},close_targets:function(){var a="."+this.settings.dismiss_modal_class;return this.settings.close_on_background_click?a+", ."+this.settings.bg_class:a},toggle_bg:function(b,c){0===this.S("."+this.settings.bg_class).length&&(this.settings.bg=a("<div />",{"class":this.settings.bg_class}).appendTo("body").hide());var e=this.settings.bg.filter(":visible").length>0;c!=e&&((c==d?e:!c)?this.hide(this.settings.bg):this.show(this.settings.bg))},show:function(c,d){if(d){var f=c.data(this.attr_name(!0)+"-init")||this.settings,g=f.root_element,h=this;if(0===c.parent(g).length){var i=c.wrap('<div style="display: none;" />').parent();c.on("closed.fndtn.reveal.wrapped",function(){c.detach().appendTo(i),c.unwrap().unbind("closed.fndtn.reveal.wrapped")}),c.detach().appendTo(g)}var j=e(f.animation);if(j.animate||(this.locked=!1),j.pop){d.top=a(b).scrollTop()-c.data("offset")+"px";var k={top:a(b).scrollTop()+c.data("css-top")+"px",opacity:1};return setTimeout(function(){return c.css(d).animate(k,f.animation_speed,"linear",function(){h.locked=!1,c.trigger("opened.fndtn.reveal")}).addClass("open")},f.animation_speed/2)}if(j.fade){d.top=a(b).scrollTop()+c.data("css-top")+"px";var k={opacity:1};return setTimeout(function(){return c.css(d).animate(k,f.animation_speed,"linear",function(){h.locked=!1,c.trigger("opened.fndtn.reveal")}).addClass("open")},f.animation_speed/2)}return c.css(d).show().css({opacity:1}).addClass("open").trigger("opened.fndtn.reveal")}var f=this.settings;return e(f.animation).fade?c.fadeIn(f.animation_speed/2):(this.locked=!1,c.show())},to_back:function(a){a.addClass("toback")},to_front:function(a){a.removeClass("toback")},hide:function(c,d){if(d){var f=c.data(this.attr_name(!0)+"-init"),g=this;f=f||this.settings;var h=e(f.animation);if(h.animate||(this.locked=!1),h.pop){var i={top:-a(b).scrollTop()-c.data("offset")+"px",opacity:0};return setTimeout(function(){return c.animate(i,f.animation_speed,"linear",function(){g.locked=!1,c.css(d).trigger("closed.fndtn.reveal")}).removeClass("open")},f.animation_speed/2)}if(h.fade){var i={opacity:0};return setTimeout(function(){return c.animate(i,f.animation_speed,"linear",function(){g.locked=!1,c.css(d).trigger("closed.fndtn.reveal")}).removeClass("open")},f.animation_speed/2)}return c.hide().css(d).removeClass("open").trigger("closed.fndtn.reveal")}var f=this.settings;return e(f.animation).fade?c.fadeOut(f.animation_speed/2):c.hide()},close_video:function(b){var c=a(".flex-video",b.target),d=a("iframe",c);d.length>0&&(d.attr("data-src",d[0].src),d.attr("src",d.attr("src")),c.hide())},open_video:function(b){var c=a(".flex-video",b.target),e=c.find("iframe");if(e.length>0){var f=e.attr("data-src");if("string"==typeof f)e[0].src=e.attr("data-src");else{var g=e[0].src;e[0].src=d,e[0].src=g}c.show()}},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},cache_offset:function(a){var b=a.show().height()+parseInt(a.css("top"),10)+a.scrollY;return a.hide(),b},off:function(){a(this.scope).off(".fndtn.reveal")},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.slider={name:"slider",version:"5.5.2",settings:{start:0,end:100,step:1,precision:null,initial:null,display_selector:"",vertical:!1,trigger_input_change:!1,on_change:function(){}},cache:{},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c),this.reflow()},events:function(){var c=this;a(this.scope).off(".slider").on("mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider","["+c.attr_name()+"]:not(.disabled, [disabled]) .range-slider-handle",function(b){c.cache.active||(b.preventDefault(),c.set_active_slider(a(b.target)))}).on("mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider",function(d){if(c.cache.active)if(d.preventDefault(),a.data(c.cache.active[0],"settings").vertical){var e=0;d.pageY||(e=b.scrollY),c.calculate_position(c.cache.active,c.get_cursor_position(d,"y")+e)}else c.calculate_position(c.cache.active,c.get_cursor_position(d,"x"))}).on("mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider",function(a){c.remove_active_slider()}).on("change.fndtn.slider",function(a){c.settings.on_change()}),c.S(b).on("resize.fndtn.slider",c.throttle(function(a){c.reflow()},300)),this.S("["+this.attr_name()+"]").each(function(){var b=a(this),d=b.children(".range-slider-handle")[0],e=c.initialize_settings(d);""!=e.display_selector&&a(e.display_selector).each(function(){this.hasOwnProperty("value")&&a(this).change(function(){b.foundation("slider","set_value",a(this).val())})})})},get_cursor_position:function(a,b){var c,d="page"+b.toUpperCase(),e="client"+b.toUpperCase();return"undefined"!=typeof a[d]?c=a[d]:"undefined"!=typeof a.originalEvent[e]?c=a.originalEvent[e]:a.originalEvent.touches&&a.originalEvent.touches[0]&&"undefined"!=typeof a.originalEvent.touches[0][e]?c=a.originalEvent.touches[0][e]:a.currentPoint&&"undefined"!=typeof a.currentPoint[b]&&(c=a.currentPoint[b]),c},set_active_slider:function(a){this.cache.active=a},remove_active_slider:function(){this.cache.active=null},calculate_position:function(b,c){var d=this,e=a.data(b[0],"settings"),f=(a.data(b[0],"handle_l"),a.data(b[0],"handle_o"),a.data(b[0],"bar_l")),g=a.data(b[0],"bar_o");requestAnimationFrame(function(){var a;a=Foundation.rtl&&!e.vertical?d.limit_to((g+f-c)/f,0,1):d.limit_to((c-g)/f,0,1),a=e.vertical?1-a:a;var h=d.normalized_value(a,e.start,e.end,e.step,e.precision);d.set_ui(b,h)})},set_ui:function(b,c){var d=a.data(b[0],"settings"),e=a.data(b[0],"handle_l"),f=a.data(b[0],"bar_l"),g=this.normalized_percentage(c,d.start,d.end),h=g*(f-e)-1,i=100*g,j=b.parent(),k=b.parent().children("input[type=hidden]");Foundation.rtl&&!d.vertical&&(h=-h),h=d.vertical?-h+f-e+1:h,this.set_translate(b,h,d.vertical),d.vertical?b.siblings(".range-slider-active-segment").css("height",i+"%"):b.siblings(".range-slider-active-segment").css("width",i+"%"),j.attr(this.attr_name(),c).trigger("change.fndtn.slider"),k.val(c),d.trigger_input_change&&k.trigger("change.fndtn.slider"),b[0].hasAttribute("aria-valuemin")||b.attr({"aria-valuemin":d.start,"aria-valuemax":d.end}),b.attr("aria-valuenow",c),""!=d.display_selector&&a(d.display_selector).each(function(){this.hasAttribute("value")?a(this).val(c):a(this).text(c)})},normalized_percentage:function(a,b,c){return Math.min(1,(a-b)/(c-b))},normalized_value:function(a,b,c,d,e){var f=c-b,g=a*f,h=(g-g%d)/d,i=g%d,j=i>=.5*d?d:0;return(h*d+j+b).toFixed(e)},set_translate:function(b,c,d){d?a(b).css("-webkit-transform","translateY("+c+"px)").css("-moz-transform","translateY("+c+"px)").css("-ms-transform","translateY("+c+"px)").css("-o-transform","translateY("+c+"px)").css("transform","translateY("+c+"px)"):a(b).css("-webkit-transform","translateX("+c+"px)").css("-moz-transform","translateX("+c+"px)").css("-ms-transform","translateX("+c+"px)").css("-o-transform","translateX("+c+"px)").css("transform","translateX("+c+"px)")},limit_to:function(a,b,c){return Math.min(Math.max(a,b),c)},initialize_settings:function(b){var c,d=a.extend({},this.settings,this.data_options(a(b).parent()));return null===d.precision&&(c=(""+d.step).match(/\.([\d]*)/),d.precision=c&&c[1]?c[1].length:0),d.vertical?(a.data(b,"bar_o",a(b).parent().offset().top),a.data(b,"bar_l",a(b).parent().outerHeight()),a.data(b,"handle_o",a(b).offset().top),a.data(b,"handle_l",a(b).outerHeight())):(a.data(b,"bar_o",a(b).parent().offset().left),a.data(b,"bar_l",a(b).parent().outerWidth()),a.data(b,"handle_o",a(b).offset().left),a.data(b,"handle_l",a(b).outerWidth())),a.data(b,"bar",a(b).parent()),a.data(b,"settings",d)},set_initial_position:function(b){var c=a.data(b.children(".range-slider-handle")[0],"settings"),d="number"!=typeof c.initial||isNaN(c.initial)?Math.floor(.5*(c.end-c.start)/c.step)*c.step+c.start:c.initial,e=b.children(".range-slider-handle");this.set_ui(e,d)},set_value:function(b){var c=this;a("["+c.attr_name()+"]",this.scope).each(function(){a(this).attr(c.attr_name(),b)}),a(this.scope).attr(c.attr_name())&&a(this.scope).attr(c.attr_name(),b),c.reflow()},reflow:function(){var b=this;b.S("["+this.attr_name()+"]").each(function(){var c=a(this).children(".range-slider-handle")[0],d=a(this).attr(b.attr_name());b.initialize_settings(c),d?b.set_ui(a(c),parseFloat(d)):b.set_initial_position(a(this))})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.tab={name:"tab",version:"5.5.2",settings:{active_class:"active",callback:function(){},deep_linking:!1,scroll_to_content:!0,is_hover:!1},default_tab_hashes:[],init:function(a,c,d){var e=this,f=this.S;f("["+this.attr_name()+"] > .active > a",this.scope).each(function(){e.default_tab_hashes.push(this.hash)}),e.entry_location=b.location.href,this.bindings(c,d),this.handle_location_hash_change()},events:function(){var a=this,c=this.S,d=function(b,d){var e=c(d).closest("["+a.attr_name()+"]").data(a.attr_name(!0)+"-init");(!e.is_hover||Modernizr.touch)&&(b.preventDefault(),b.stopPropagation(),a.toggle_active_tab(c(d).parent()))};c(this.scope).off(".tab").on("keydown.fndtn.tab","["+this.attr_name()+"] > * > a",function(a){var b=this,c=a.keyCode||a.which;9==c&&(a.preventDefault(),d(a,b))}).on("click.fndtn.tab","["+this.attr_name()+"] > * > a",function(a){var b=this;d(a,b)}).on("mouseenter.fndtn.tab","["+this.attr_name()+"] > * > a",function(b){var d=c(this).closest("["+a.attr_name()+"]").data(a.attr_name(!0)+"-init");d.is_hover&&a.toggle_active_tab(c(this).parent())}),c(b).on("hashchange.fndtn.tab",function(b){b.preventDefault(),a.handle_location_hash_change()})},handle_location_hash_change:function(){var b=this,c=this.S;c("["+this.attr_name()+"]",this.scope).each(function(){var e=c(this).data(b.attr_name(!0)+"-init");if(e.deep_linking){var f;if(f=e.scroll_to_content?b.scope.location.hash:b.scope.location.hash.replace("fndtn-",""),""!=f){var g=c(f);if(g.hasClass("content")&&g.parent().hasClass("tabs-content"))b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href="+f+"]").parent());else{var h=g.closest(".content").attr("id");h!=d&&b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href=#"+h+"]").parent(),f)}}else for(var i=0;i<b.default_tab_hashes.length;i++)b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href="+b.default_tab_hashes[i]+"]").parent())}})},toggle_active_tab:function(e,f){var g=this,h=g.S,i=e.closest("["+this.attr_name()+"]"),j=e.find("a"),k=e.children("a").first(),l="#"+k.attr("href").split("#")[1],m=h(l),n=e.siblings(),o=i.data(this.attr_name(!0)+"-init"),p=function(b){var d,e=a(this),f=a(this).parents("li").prev().children('[role="tab"]'),g=a(this).parents("li").next().children('[role="tab"]');switch(b.keyCode){case 37:d=f;break;case 39:d=g;break;default:d=!1}d.length&&(e.attr({tabindex:"-1","aria-selected":null}),d.attr({tabindex:"0","aria-selected":!0}).focus()),a('[role="tabpanel"]').attr("aria-hidden","true"),a("#"+a(c.activeElement).attr("href").substring(1)).attr("aria-hidden",null)},q=function(a){var c=b.location.href===g.entry_location,d=o.scroll_to_content?g.default_tab_hashes[0]:c?b.location.hash:"fndtn-"+g.default_tab_hashes[0].replace("#","");c&&a===d||(b.location.hash=a)};k.data("tab-content")&&(l="#"+k.data("tab-content").split("#")[1],m=h(l)),o.deep_linking&&(o.scroll_to_content?(q(f||l),f==d||f==l?e.parent()[0].scrollIntoView():h(l)[0].scrollIntoView()):q(f!=d?"fndtn-"+f.replace("#",""):"fndtn-"+l.replace("#",""))),e.addClass(o.active_class).triggerHandler("opened"),j.attr({"aria-selected":"true",tabindex:0}),n.removeClass(o.active_class),n.find("a").attr({"aria-selected":"false",tabindex:-1}),m.siblings().removeClass(o.active_class).attr({"aria-hidden":"true",tabindex:-1}),m.addClass(o.active_class).attr("aria-hidden","false").removeAttr("tabindex"),o.callback(e),m.triggerHandler("toggled",[m]),i.triggerHandler("toggled",[e]),j.off("keydown").on("keydown",p)},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.tooltip={name:"tooltip",version:"5.5.2",settings:{additional_inheritable_classes:[],tooltip_class:".tooltip",append_to:"body",touch_close_text:"Tap To Close",disable_for_touch:!1,hover_delay:200,show_on:"all",tip_template:function(a,b){return'<span data-selector="'+a+'" id="'+a+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'" role="tooltip">'+b+'<span class="nub"></span></span>'}},cache:{},init:function(a,b,c){Foundation.inherit(this,"random_str"),this.bindings(b,c)},should_show:function(b,c){var d=a.extend({},this.settings,this.data_options(b));return"all"===d.show_on?!0:this.small()&&"small"===d.show_on?!0:this.medium()&&"medium"===d.show_on?!0:this.large()&&"large"===d.show_on?!0:!1},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},events:function(b){function c(a,b,c){a.timer||(c?(a.timer=null,e.showTip(b)):a.timer=setTimeout(function(){a.timer=null,e.showTip(b)}.bind(a),e.settings.hover_delay))}function d(a,b){a.timer&&(clearTimeout(a.timer),a.timer=null),e.hide(b)}var e=this,f=e.S;e.create(this.S(b)),a(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"]",function(b){var g=f(this),h=a.extend({},e.settings,e.data_options(g)),i=!1;if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&f(b.target).is("a"))return!1;if(/mouse/i.test(b.type)&&e.ie_touch(b))return!1;if(g.hasClass("open"))Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&b.preventDefault(),e.hide(g);else{if(h.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type))return;if(!h.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&(b.preventDefault(),f(h.tooltip_class+".open").hide(),i=!0,a(".open["+e.attr_name()+"]").length>0)){var j=f(a(".open["+e.attr_name()+"]")[0]);e.hide(j)}/enter|over/i.test(b.type)?c(this,g):"mouseout"===b.type||"mouseleave"===b.type?d(this,g):c(this,g,!0)}}).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"].open",function(b){return/mouse/i.test(b.type)&&e.ie_touch(b)?!1:void(("touch"!=a(this).data("tooltip-open-event-type")||"mouseleave"!=b.type)&&("mouse"==a(this).data("tooltip-open-event-type")&&/MSPointerDown|touchstart/i.test(b.type)?e.convert_to_touch(a(this)):d(this,a(this))))}).on("DOMNodeRemoved DOMAttrModified","["+this.attr_name()+"]:not(a)",function(a){d(this,f(this))})},ie_touch:function(a){return!1},showTip:function(a){var b=this.getTip(a);return this.should_show(a,b)?this.show(a):void 0},getTip:function(b){var c=this.selector(b),d=a.extend({},this.settings,this.data_options(b)),e=null;return c&&(e=this.S('span[data-selector="'+c+'"]'+d.tooltip_class)),"object"==typeof e?e:!1},selector:function(a){var b=a.attr(this.attr_name())||a.attr("data-selector");return"string"!=typeof b&&(b=this.random_str(6),a.attr("data-selector",b).attr("aria-describedby",b)),b},create:function(c){var d=this,e=a.extend({},this.settings,this.data_options(c)),f=this.settings.tip_template;"string"==typeof e.tip_template&&b.hasOwnProperty(e.tip_template)&&(f=b[e.tip_template]);var g=a(f(this.selector(c),a("<div></div>").html(c.attr("title")).html())),h=this.inheritable_classes(c);g.addClass(h).appendTo(e.append_to),Modernizr.touch&&(g.append('<span class="tap-to-close">'+e.touch_close_text+"</span>"),g.on("touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip",function(a){d.hide(c)})),c.removeAttr("title").attr("title","")},reposition:function(b,c,d){var e,f,g,h,i;if(c.css("visibility","hidden").show(),e=b.data("width"),f=c.children(".nub"),g=f.outerHeight(),h=f.outerHeight(),c.css(this.small()?{width:"100%"}:{width:e?e:"auto"}),i=function(a,b,c,d,e,f){return a.css({top:b?b:"auto",bottom:d?d:"auto",left:e?e:"auto",right:c?c:"auto"}).end()},i(c,b.offset().top+b.outerHeight()+10,"auto","auto",b.offset().left),this.small())i(c,b.offset().top+b.outerHeight()+10,"auto","auto",12.5,a(this.scope).width()),c.addClass("tip-override"),i(f,-g,"auto","auto",b.offset().left);else{var j=b.offset().left;Foundation.rtl&&(f.addClass("rtl"),j=b.offset().left+b.outerWidth()-c.outerWidth()),i(c,b.offset().top+b.outerHeight()+10,"auto","auto",j),f.attr("style")&&f.removeAttr("style"),c.removeClass("tip-override"),d&&d.indexOf("tip-top")>-1?(Foundation.rtl&&f.addClass("rtl"),i(c,b.offset().top-c.outerHeight(),"auto","auto",j).removeClass("tip-override")):d&&d.indexOf("tip-left")>-1?(i(c,b.offset().top+b.outerHeight()/2-c.outerHeight()/2,"auto","auto",b.offset().left-c.outerWidth()-g).removeClass("tip-override"),f.removeClass("rtl")):d&&d.indexOf("tip-right")>-1&&(i(c,b.offset().top+b.outerHeight()/2-c.outerHeight()/2,"auto","auto",b.offset().left+b.outerWidth()+g).removeClass("tip-override"),f.removeClass("rtl"))}c.css("visibility","visible").hide()},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},inheritable_classes:function(b){var c=a.extend({},this.settings,this.data_options(b)),d=["tip-top","tip-left","tip-bottom","tip-right","radius","round"].concat(c.additional_inheritable_classes),e=b.attr("class"),f=e?a.map(e.split(" "),function(b,c){return-1!==a.inArray(b,d)?b:void 0}).join(" "):"";return a.trim(f)},convert_to_touch:function(b){var c=this,d=c.getTip(b),e=a.extend({},c.settings,c.data_options(b));0===d.find(".tap-to-close").length&&(d.append('<span class="tap-to-close">'+e.touch_close_text+"</span>"),d.on("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose",function(a){c.hide(b)})),b.data("tooltip-open-event-type","touch")},show:function(a){var b=this.getTip(a);"touch"==a.data("tooltip-open-event-type")&&this.convert_to_touch(a),this.reposition(a,b,a.attr("class")),a.addClass("open"),b.fadeIn(150)},hide:function(a){var b=this.getTip(a);b.fadeOut(150,function(){b.find(".tap-to-close").remove(),b.off("click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose"),a.removeClass("open")})},off:function(){var b=this;this.S(this.scope).off(".fndtn.tooltip"),this.S(this.settings.tooltip_class).each(function(c){a("["+b.attr_name()+"]").eq(c).attr("title",a(this).text())}).remove()},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.topbar={name:"topbar",version:"5.5.2",settings:{index:0,start_offset:0, 11478sticky_class:"sticky",custom_back_text:!0,back_text:"Back",mobile_show_parent_link:!0,is_hover:!0,scrolltop:!0,sticky_on:"all",dropdown_autoclose:!0},init:function(b,c,d){Foundation.inherit(this,"add_custom_rule register_media throttle");var e=this;e.register_media("topbar","foundation-mq-topbar"),this.bindings(c,d),e.S("["+this.attr_name()+"]",this.scope).each(function(){{var b=a(this),c=b.data(e.attr_name(!0)+"-init");e.S("section, .top-bar-section",this)}b.data("index",0);var d=b.parent();d.hasClass("fixed")||e.is_sticky(b,d,c)?(e.settings.sticky_class=c.sticky_class,e.settings.sticky_topbar=b,b.data("height",d.outerHeight()),b.data("stickyoffset",d.offset().top)):b.data("height",b.outerHeight()),c.assembled||e.assemble(b),c.is_hover?e.S(".has-dropdown",b).addClass("not-click"):e.S(".has-dropdown",b).removeClass("not-click"),e.add_custom_rule(".f-topbar-fixed { padding-top: "+b.data("height")+"px }"),d.hasClass("fixed")&&e.S("body").addClass("f-topbar-fixed")})},is_sticky:function(a,b,c){var d=b.hasClass(c.sticky_class),e=matchMedia(Foundation.media_queries.small).matches,f=matchMedia(Foundation.media_queries.medium).matches,g=matchMedia(Foundation.media_queries.large).matches;return d&&"all"===c.sticky_on?!0:d&&this.small()&&-1!==c.sticky_on.indexOf("small")&&e&&!f&&!g?!0:d&&this.medium()&&-1!==c.sticky_on.indexOf("medium")&&e&&f&&!g?!0:d&&this.large()&&-1!==c.sticky_on.indexOf("large")&&e&&f&&g?!0:!1},toggle:function(c){var d,e=this;d=c?e.S(c).closest("["+this.attr_name()+"]"):e.S("["+this.attr_name()+"]");var f=d.data(this.attr_name(!0)+"-init"),g=e.S("section, .top-bar-section",d);e.breakpoint()&&(e.rtl?(g.css({right:"0%"}),a(">.name",g).css({right:"100%"})):(g.css({left:"0%"}),a(">.name",g).css({left:"100%"})),e.S("li.moved",g).removeClass("moved"),d.data("index",0),d.toggleClass("expanded").css("height","")),f.scrolltop?d.hasClass("expanded")?d.parent().hasClass("fixed")&&(f.scrolltop?(d.parent().removeClass("fixed"),d.addClass("fixed"),e.S("body").removeClass("f-topbar-fixed"),b.scrollTo(0,0)):d.parent().removeClass("expanded")):d.hasClass("fixed")&&(d.parent().addClass("fixed"),d.removeClass("fixed"),e.S("body").addClass("f-topbar-fixed")):(e.is_sticky(d,d.parent(),f)&&d.parent().addClass("fixed"),d.parent().hasClass("fixed")&&(d.hasClass("expanded")?(d.addClass("fixed"),d.parent().addClass("expanded"),e.S("body").addClass("f-topbar-fixed")):(d.removeClass("fixed"),d.parent().removeClass("expanded"),e.update_sticky_positioning())))},timer:null,events:function(c){var d=this,e=this.S;e(this.scope).off(".topbar").on("click.fndtn.topbar","["+this.attr_name()+"] .toggle-topbar",function(a){a.preventDefault(),d.toggle(this)}).on("click.fndtn.topbar contextmenu.fndtn.topbar",'.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',function(b){var c=a(this).closest("li"),e=c.closest("["+d.attr_name()+"]"),f=e.data(d.attr_name(!0)+"-init");if(f.dropdown_autoclose&&f.is_hover){var g=a(this).closest(".hover");g.removeClass("hover")}!d.breakpoint()||c.hasClass("back")||c.hasClass("has-dropdown")||d.toggle()}).on("click.fndtn.topbar","["+this.attr_name()+"] li.has-dropdown",function(b){var c=e(this),f=e(b.target),g=c.closest("["+d.attr_name()+"]"),h=g.data(d.attr_name(!0)+"-init");return f.data("revealId")?void d.toggle():void(d.breakpoint()||(!h.is_hover||Modernizr.touch)&&(b.stopImmediatePropagation(),c.hasClass("hover")?(c.removeClass("hover").find("li").removeClass("hover"),c.parents("li.hover").removeClass("hover")):(c.addClass("hover"),a(c).siblings().removeClass("hover"),"A"===f[0].nodeName&&f.parent().hasClass("has-dropdown")&&b.preventDefault())))}).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown>a",function(a){if(d.breakpoint()){a.preventDefault();var b=e(this),c=b.closest("["+d.attr_name()+"]"),f=c.find("section, .top-bar-section"),g=(b.next(".dropdown").outerHeight(),b.closest("li"));c.data("index",c.data("index")+1),g.addClass("moved"),d.rtl?(f.css({right:-(100*c.data("index"))+"%"}),f.find(">.name").css({right:100*c.data("index")+"%"})):(f.css({left:-(100*c.data("index"))+"%"}),f.find(">.name").css({left:100*c.data("index")+"%"})),c.css("height",b.siblings("ul").outerHeight(!0)+c.data("height"))}}),e(b).off(".topbar").on("resize.fndtn.topbar",d.throttle(function(){d.resize.call(d)},50)).trigger("resize.fndtn.topbar").load(function(){e(this).trigger("resize.fndtn.topbar")}),e("body").off(".topbar").on("click.fndtn.topbar",function(a){var b=e(a.target).closest("li").closest("li.hover");b.length>0||e("["+d.attr_name()+"] li.hover").removeClass("hover")}),e(this.scope).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown .back",function(a){a.preventDefault();var b=e(this),c=b.closest("["+d.attr_name()+"]"),f=c.find("section, .top-bar-section"),g=(c.data(d.attr_name(!0)+"-init"),b.closest("li.moved")),h=g.parent();c.data("index",c.data("index")-1),d.rtl?(f.css({right:-(100*c.data("index"))+"%"}),f.find(">.name").css({right:100*c.data("index")+"%"})):(f.css({left:-(100*c.data("index"))+"%"}),f.find(">.name").css({left:100*c.data("index")+"%"})),0===c.data("index")?c.css("height",""):c.css("height",h.outerHeight(!0)+c.data("height")),setTimeout(function(){g.removeClass("moved")},300)}),e(this.scope).find(".dropdown a").focus(function(){a(this).parents(".has-dropdown").addClass("hover")}).blur(function(){a(this).parents(".has-dropdown").removeClass("hover")})},resize:function(){var a=this;a.S("["+this.attr_name()+"]").each(function(){var b,d=a.S(this),e=d.data(a.attr_name(!0)+"-init"),f=d.parent("."+a.settings.sticky_class);if(!a.breakpoint()){var g=d.hasClass("expanded");d.css("height","").removeClass("expanded").find("li").removeClass("hover"),g&&a.toggle(d)}a.is_sticky(d,f,e)&&(f.hasClass("fixed")?(f.removeClass("fixed"),b=f.offset().top,a.S(c.body).hasClass("f-topbar-fixed")&&(b-=d.data("height")),d.data("stickyoffset",b),f.addClass("fixed")):(b=f.offset().top,d.data("stickyoffset",b)))})},breakpoint:function(){return!matchMedia(Foundation.media_queries.topbar).matches},small:function(){return matchMedia(Foundation.media_queries.small).matches},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},assemble:function(b){var c=this,d=b.data(this.attr_name(!0)+"-init"),e=c.S("section, .top-bar-section",b);e.detach(),c.S(".has-dropdown>a",e).each(function(){var b,e=c.S(this),f=e.siblings(".dropdown"),g=e.attr("href");f.find(".title.back").length||(b=a(1==d.mobile_show_parent_link&&g?'<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="'+g+'">'+e.html()+"</a></li>":'<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>'),a("h5>a",b).html(1==d.custom_back_text?d.back_text:"« "+e.html()),f.prepend(b))}),e.appendTo(b),this.sticky(),this.assembled(b)},assembled:function(b){b.data(this.attr_name(!0),a.extend({},b.data(this.attr_name(!0)),{assembled:!0}))},height:function(b){var c=0,d=this;return a("> li",b).each(function(){c+=d.S(this).outerHeight(!0)}),c},sticky:function(){var a=this;this.S(b).on("scroll",function(){a.update_sticky_positioning()})},update_sticky_positioning:function(){var a="."+this.settings.sticky_class,c=this.S(b),d=this;if(d.settings.sticky_topbar&&d.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)){var e=this.settings.sticky_topbar.data("stickyoffset")+this.settings.start_offset;d.S(a).hasClass("expanded")||(c.scrollTop()>e?d.S(a).hasClass("fixed")||(d.S(a).addClass("fixed"),d.S("body").addClass("f-topbar-fixed")):c.scrollTop()<=e&&d.S(a).hasClass("fixed")&&(
11478d.S(a).removeClass("fixed"),d.S("body").removeClass("f-topbar-fixed")))}},off:function(){this.S(this.scope).off(".fndtn.topbar"),this.S(b).off(".fndtn.topbar")},reflow:function(){}}}(jQuery,window,window.document); 11479 11480 11481/* squelettes/plugins/fidh/theme/js/imageMapResizer.min.js */ 11482 11483!function(){"use strict";function a(){function a(){function a(a){function c(a){return a*b[1===(d=1-d)?"width":"height"]}var d=0;return a.split(",").map(Number).map(c).map(Math.floor).join(",")}for(var b={width:i.width/j.width,height:i.height/j.height},c=0;g>c;c++)f[c].coords=a(h[c])}function b(){var b=null,c=null;j.onload=function(){b=i.width,c=i.height,(b!==j.width||c!==j.height)&&a()},i.onload=function(){null!==b&&i.width!==b&&a()},j.src=i.src}function c(){function b(){clearTimeout(k),k=setTimeout(a,250)}window.addEventListener?window.addEventListener("resize",b,!1):window.attachEvent&&window.attachEvent("onresize",b)}function d(a){return a.coords.replace(/ *, */g,",").replace(/ +/g,",")}var e=this,f=e.getElementsByTagName("area"),g=f.length,h=Array.prototype.map.call(f,d),i=document.querySelector('img[usemap="#'+e.name+'"]'),j=new Image,k=null;b(),c()}function b(){function b(b){if(!b.tagName)throw new TypeError("Object is not a valid DOM element");if("MAP"!==b.tagName.toUpperCase())throw new TypeError("Expected <MAP> tag, found <"+b.tagName+">.");a.call(b)}return function(a){switch(typeof a){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(a||"map"),b);break;case"object":b(a);break;default:throw new TypeError("Unexpected data type ("+typeof a+").")}}}"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():window.imageMapResize=b(),"jQuery"in window&&(jQuery.fn.imageMapResize=function(){return this.filter("map").each(a).end()})}(); 11484 11485 11486/* squelettes/plugins/fidh/theme/js/jquery.imagemapster.min.js */ 11487 11488(function(e){e(function(){function i(){}function s(t){var n=new i;return n.then=function(e){var n;try{return e&&(n=e(t)),c(n===r?t:n)}catch(i){return o(i)}},e(n)}function o(t){var n=new i;return n.then=function(e,n){var i;try{return n?(i=n(t),c(i===r?t:i)):o(t)}catch(s){return o(s)}},e(n)}function u(e){return l(e,function(e){return o(e)})}function a(){function p(e,t,n){return l(e,t,n)}function d(e){h(s(e))}function v(e){h(o(e))}function m(e){c(e)}var t,n,u,f,l,c,h;return u=[],f=[],l=function(t,n,r){var i=a();return u.push(function(e){e.then(t,n).then(i.resolve,i.reject,i.progress)}),r&&f.push(r),i.promise},c=function(e){var t,n=0;while(t=f[n++])t(e)},h=function(e){var t,n=0;l=e.then,h=c=function(){throw new Error("already completed")},f=r;while(t=u[n++])t(e);u=[]},t={},n=new i,n.then=t.then=p,t.promise=e(n),t.resolver=e({resolve:t.resolve=d,reject:t.reject=v,progress:t.progress=m}),t}function f(e){return e&&typeof e.then=="function"}function l(e,t,n,r){var i=c(e);return i.then(t,n,r)}function c(e){var t,n;return e instanceof i?t=e:(n=a(),f(e)?(e.then(n.resolve,n.reject,n.progress),t=n.promise):(n.resolve(e),t=n.promise)),t}function h(e,t,n,r,i){return E(2,arguments),l(e,function(e){function m(e){c(e)}function g(e){h(e)}function y(e){p(e)}function b(){c=h=p=S}var s,o,u,f,c,h,p,d,v;d=e.length>>>0,s=Math.max(0,Math.min(t,d)),o=[],f=a(),u=l(f,n,r,i);if(!s)f.resolve(o);else{c=function(e){o.push(e),--s||(b(),f.resolve(o))},h=function(e){b(),f.reject(e)},p=f.progress;for(v=0;v<d;++v)v in e&&l(e[v],m,g,y)}return u})}function p(e,t,n,r){return E(1,arguments),l(e,function(e){return b(e,d,[])}).then(t,n,r)}function d(e,t,n){return e[n]=t,e}function v(e,t,n,r){function i(e){return t?t(e[0]):e[0]}return h(e,1,i,n,r)}function m(e,t){return l(e,function(e){return g(e,t)})}function g(e,t){var n,r,i;r=e.length>>>0,n=new Array(r);for(i=0;i<r;i++)i in e&&(n[i]=l(e[i],t));return b(n,d,n)}function y(e,t,i){var s=n.call(arguments,1);return l(e,function(e){return b.apply(r,[e].concat(s))})}function b(e,n,r){var i,s;return i=e.length,s=[function(e,t,r){return l(e,function(e){return l(t,function(t){return n(e,t,r,i)})})}],arguments.length>2&&s.push(r),t.apply(e,s)}function w(e,t,n){var r=arguments.length>2;return l(e,function(e){return r&&(e=n),t.resolve(e),e},function(e){return t.reject(e),o(e)},t.progress)}function E(e,t){var n,r=t.length;while(r>e){n=t[--r];if(n!=null&&typeof n!="function")throw new Error("callback is not a function")}}function S(){}var e,t,n,r;return l.defer=a,l.reject=u,l.isPromise=f,l.all=p,l.some=h,l.any=v,l.map=m,l.reduce=y,l.chain=w,e=Object.freeze||function(e){return e},i.prototype=e({always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(r,e)}}),n=[].slice,t=[].reduce||function(e){var t,n,r,i,s;s=0,t=Object(this),i=t.length>>>0,n=arguments;if(n.length<=1)for(;;){if(s in t){r=t[s++];break}if(++s>=i)throw new TypeError}else r=n[1];for(;s<i;++s)s in t&&(r=e(r,t[s],s,t));return r},l})})(typeof define=="function"?define:function(e){typeof module!="undefined"?module.exports=e():jQuery.mapster_when=e()}),function($){$.fn.mapster=function(e){var t=$.mapster.impl;if($.isFunction(t[e]))return t[e].apply(this,Array.prototype.slice.call(arguments,1
11488));if(typeof e=="object"||!e)return t.bind.apply(this,arguments);$.error("Method "+e+" does not exist on jQuery.mapster")},$.mapster={version:"1.2.14-beta1",render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:!0,stroke:!1,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,includeKeys:"",altImage:null,altImageId:null,altImages:{}},defaults:{clickNavigate:!1,wrapClass:null,wrapCss:null,onGetList:null,sortList:!1,listenToList:!1,mapKey:"",mapValue:"",singleSelect:!1,listKey:"value",listSelectedAttribute:"selected",listSelectedClass:null,onClick:null,onMouseover:null,onMouseout:null,mouseoutDelay:0,onStateChange:null,boundList:null,onConfigured:null,configTimeout:3e4,noHrefIsMask:!0,scaleMap:!0,safeLoad:!1,areas:[]},shared_defaults:{render_highlight:{fade:!0},render_select:{fade:!1},staticState:null,selected:null},area_defaults:{includeKeys:"",isMask:!1},canvas_style:{position:"absolute",left:0,top:0,padding:0,border:0},hasCanvas:null,isTouch:null,map_cache:[],hooks:{},addHook:function(e,t){this.hooks[e]=(this.hooks[e]||[]).push(t)},callHooks:function(e,t){$.each(this.hooks[e]||[],function(e,n){
11488n.apply(t)})},utils:{when:$.mapster_when,defer:$.mapster_when.defer,subclass:function(e,t){var n=function(){var n=this,r=Array.prototype.slice.call(arguments,0);n.base=e.prototype,n.base.init=function(){e.prototype.constructor.apply(n,r)},t.apply(n,r)};return n.prototype=new e,n.prototype.constructor=n,n},asArray:function(e){return e.constructor===Array?e:this.split(e)},split:function(e,t){var n,r,i=e.split(",");for(n=0;n<i.length;n++)r=$.trim(i[n]),r===""?i.splice(n,1):i[n]=t?t(r):r;return i},updateProps:function(e,t){var n,r=e||{},i=$.isEmptyObject(r)?t:e;return n=[],$.each(i,function(e){n.push(e)}),$.each(Array.prototype.slice.call(arguments,1),function(e,t){$.each(t||{},function(e){if(!n||$.inArray(e,n)>=0){var i=t[e];$.isPlainObject(i)?r[e]=$.extend(r[e]||{},i):i&&i.constructor===Array?r[e]=i.slice(0):typeof i!="undefined"&&(r[e]=t[e])}})}),r},isElement:function(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string"},indexOf:function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},indexOfProp:function(e,t,n){var r=e.constructor===Array?-1:null;return $.each(e,function(e,i){if(i&&(t?i[t]:i)===n)return r=e,!1}),r},boolOrDefault:function(e,t){return this.isBool(e)?e:t||!1},isBool:function(e){return typeof e=="boolean"},isUndef:function(e){return typeof e=="undefined"},ifFunction:function(e,t,n){$.isFunction(e)&&e.call(t,n)},size:function(e,t){var n=$.mapster.utils;return{width:t?e.width||e.naturalWidth:n.imgWidth(e,!0),height:t?e.height||e.naturalHeight:n.imgHeight(e,!0),complete:function(){return!!this.height&&!!this.width}}},setOpacity:function(e,t){$.mapster.hasCanvas()?e.style.opacity=t:$(e).each(function(e,n){typeof n.opacity!="undefined"?n.opacity=t:$(n).css("opacity",t)})},fader:function(){var e={},t=0,n=function(r,i,s,o){var u,a=o/15,f,l=$.mapster.utils;if(typeof r=="number"){f=e[r];if(!f)return}else u=l.indexOfProp(e,null,r),u&&delete e[u],e[++t]=f=r,r=t;s=s||1,i=i+s/a>s-.01?s:i+s/a,l.setOpacity(f,i),i<s&&setTimeout(function(){n(r,i,s,o)},15)};return n}()},getBoundList:function(e,t){if(!e.boundList)return null;var n,r,i=$(),s=$.mapster.utils.split(t);return e.boundList.each(function(t,o){for(n=0;n<s.length;n++)r=s[n],$(o).is("["+e.listKey+'="'+r+'"]')&&(i=i.add(o))}),i},setBoundListProperties:function(e,t,n){t.each(function(t,r){e.listSelectedClass&&(n?$(r).addClass(e.listSelectedClass):$(r).removeClass(e.listSelectedClass)),e.listSelectedAttribute&&$(r).attr(e.listSelectedAttribute,n)})},getMapDataIndex:function(e){var t,n;switch(e.tagName&&e.tagName.toLowerCase()){case"area":n=$(e).parent().attr("name"),t=$("img[usemap='#"+n+"']")[0];break;case"img":t=e}return t?this.utils.indexOfProp(this.map_cache,"image",t):-1},getMapData:function(e){var t=this.getMapDataIndex(e.length?e[0]:e);if(t>=0)return t>=0?this.map_cache[t]:null},queueCommand:function(e,t,n,r){return e?!e.complete||e.currentAction?(e.commands.push({that:t,command:n,args:r}),!0):!1:!1},unload:function(){this.impl.unload(),this.utils=null,this.impl=null,$.fn.mapster=null,$.mapster=null,$("*").unbind()}};var m=$.mapster,u=m.utils,ap=Array.prototype;$.each(["width","height"],function(e,t){var n=t.substr(0,1).toUpperCase()+t.substr(1);u["img"+n]=function(e,r){return(r?$(e)[t]():0)||e[t]||e["natural"+n]||e["client"+n]||e["offset"+n]}}),m.Method=function(e,t,n,r){var i=this;i.name=r.name,i.output=e,i.input=e,i.first=r.first||!1,i.args=r.args?ap.slice.call(r.args,0):[],i.key=r.key,i.func_map=t,i.func_area=n,i.name=r.name,i.allowAsync=r.allowAsync||!1},m.Method.prototype={constructor:m.Method,go:function(){var e,t,n,r,i,s=this.input,o=[],u=this;r=s.length;for(e=0;e<r;e++){t=$.mapster.getMapData(s[e]);if(t){if(!u.allowAsync&&m.queueCommand(t,u.input,u.name,u.args)){this.first&&(i="");continue}n=t.getData(s[e].nodeName==="AREA"?s[e]:this.key),n?$.inArray(n,o)<0&&o.push(n):i=this.func_map.apply(t,u.args);if(this.first||typeof i!="undefined")break}}return $(o).each(function(e,t){i=u.func_area.apply(t,u.args)}),typeof i!="undefined"?i:this.output}}
11488,$.mapster.impl=function(){function hasVml(){var e=$("<div />").appendTo("body");e.html('<v:shape id="vml_flag1" adj="1" />');var t=e[0].firstChild;t.style.behavior="url(#default#VML)";var n=t?typeof t.adj=="object":!0;return e.remove(),n}function namespaces(){return typeof document.namespaces=="object"?document.namespaces:null}function hasCanvas(){var e=namespaces();return e&&e.g_vml_?!1:$("<canvas />")[0].getContext?!0:!1}function merge_areas(e,t){var n,r,i=e.options.areas;t&&$.each(t,function(t,s){if(!s||!s.key)return;r=u.indexOfProp(i,"key",s.key),r>=0?$.extend(i[r],s):i.push(s),n=e.getDataForKey(s.key),n&&$.extend(n.options,s)})}function merge_options(e,t){var n=u.updateProps({},t);delete n.areas,u.updateProps(e.options,n),merge_areas(e,t.areas),u.updateProps(e.area_options,e.options)}var me={},addMap=function(e){return m.map_cache.push(e)-1},removeMap=function(e){m.map_cache.splice(e.index,1);for(var t=m.map_cache.length-1;t>=this.index;t--)m.map_cache[t].index--};return me.get=function(e){var t=m.getMapData(this);if(!t||!t.complete)throw"Can't access data until binding complete.";return(new m.Method(this,function(){return this.getSelected()},function(){return this.isSelected()},{name:"get",args:arguments,key:e,first:!0,allowAsync:!0,defaultReturn:""})).go()},me.data=function(e){return(new m.Method(this,null,function(){return this},{name:"data",args:arguments,key:e})).go()},me.highlight=function(e){return(new m.Method(this,function(){if(e!==!1){var t=this.highlightId;return t>=0?this.data[t].key:null}this.ensureNoHighlight()},function(){this.highlight()},{name:"highlight",args:arguments,key:e,first:!0})).go()},me.keys=function(e,t){function i(e){var r,i=[];t?(r=e.areas(),$.each(r,function(e,t){i=i.concat(t.keys)})):i.push(e.key),$.each(i,function(e,t){$.inArray(t,n)<0&&n.push(t)})}var n=[],r=m.getMapData(this);if(!r||!r.complete)throw"Can't access data until binding complete.";return!r||!r.complete?"":(typeof e=="string"?t?i(r.getDataForKey(e)):n=[r.getKeysForGroup(e)]:(t=e,this.each(function(e,t){t.nodeName==="AREA"&&i(r.getDataForArea(t))})),n.join(","))},me.select=function(){me.set.call(this,!0)},me.deselect=function(){me.set.call(this,!1)},me.set=function(e,t,n){function f(t){var n=e;if(t){switch(e){case!0:t.select(s);break;case!1:t.deselect(!0);break;default:n=t.toggle(s)}return n}}function l(e){e&&$.inArray(e,a)<0&&(a.push(e),o+=(o===""?"":",")+e.key)}function c(t){$.each(a,function(e,n){var r=f(n);t.options.boundList&&m.setBoundListProperties(t.options,m.getBoundList(t.options,o),r)}),e||t.removeSelectionFinish()}var r,i,s=n,o,a;return this.filter("img,area").each(function(n,f){var h;i=m.getMapData(f),i!==r&&(r&&c(r),a=[],o=""),i&&(h="",f.nodeName.toUpperCase()==="IMG"?m.queueCommand(i,$(f),"set",[e,t,s])||(t instanceof Array?t.length&&(h=t.join(",")):h=t,h&&$.each(u.split(h),function(e,t){l(i.getDataForKey(t.toString())),r=i})):(s=t,m.queueCommand(i,$(f),"set",[e,s])||(l(i.getDataForArea(f)),r=i)))}),i&&c(i),this},me.unbind=function(e){return(new m.Method(this,function(){this.clearEvents(),this.clearMapData(e),removeMap(this)},null,{name:"unbind",args:arguments})).go()},me.rebind=function(e){return(new m.Method(this,function(){var t=this;t.complete=!1,t.configureOptions(e),t.bindImages().then(function(){t.buildDataset(!0),t.complete=!0})},null,{name:"rebind",args:arguments})).go()},me.get_options=function(e,t){var n=u.isBool(e)?e:t;return(new m.Method(this,function(){var e=$.extend({},this.options);return n&&(e.render_select=u.updateProps({},m.render_defaults,e,e.render_select),e.render_highlight=u.updateProps({},m.render_defaults,e,e.render_highlight)),e},function(){return n?this.effectiveOptions():this.options},{name:"get_options",args:arguments,first:!0,allowAsync:!0,key:e})).go()},me.set_options=function(e){return(new m.Method(this,function(){merge_options(this,e)},null,{name:"set_options",args:arguments})).go()},me.unload=function(){var e;for(e=m.map_cache.length-1;e>=0;e--)m.map_cache[e]&&me.unbind.call($(m.map_cache[e].image));me.graphics=null},me.snapshot=function(){return(new m.Method(this,function(){$.each(this.data,function(e,t){t.selected=!1}),this.base_canvas=this.graphics.createVisibleCanvas(this),$(this.image).before(this.base_canvas)},null,{name:"snapshot"})).go()},me.state=function(){var e,t=null;return $(this).each(function(n,r){if(r.nodeName==="IMG")return e=m.getMapData(r),e&&(t=e.state()),!1}),t},me.bind=function(e){return this.each(function(t,n){var r,i,s,o;r=$(n),o=m.getMapData(n);if(o){me.unbind.apply(r);if(!o.complete)return r.bind(),!0;o=null}s=this.getAttribute("usemap"),i=s&&$('map[name="'+s.substr(1)+'"]');if(!(r.is("img")&&s&&i.size()>0))return!0;r.css("border",0),o||(o=new m.MapData(this,e),o.index=addMap(o),o.map=i,o.bindImages().then(function(){o.initialize()}))})},me.init=function(e){var t,n;m.hasCanvas=function(){return u.isBool(m.hasCanvas.value)||(m.hasCanvas.value=u.isBool(e)?e:hasCanvas()),m.hasCanvas.value},m.hasVml=function(){if(!u.isBool(m.hasVml.value)){var e=namespaces();e&&!e.v&&(e.add("v","urn:schemas-microsoft-com:vml"),t=document.createStyleSheet(),n=["shape","rect","oval","circ","fill","stroke","imagedata","group","textbox"],$.each(n,function(e,n){t.addRule("v\\:"+n,"behavior: url(#default#VML); antialias:true")})),m.hasVml.value=hasVml()}return m.hasVml.value},m.isTouch=!!document.documentElement.ontouchstart,u.indexOf=Array.prototype.indexOf||u.indexOf,$.extend(m.defaults,m.render_defaults,m.shared_defaults),$.extend(m.area_defaults,m.render_defaults,m.shared_defaults)},me.test=function(obj){return eval(obj)},me}(),$.mapster.impl.init()}(jQuery),function(e){function o(t,n,r){var i=t,s=i.map_data,o=r.isMask;e.each(n.areas(),function(e,t){r.isMask=o||t.nohref&&s.options.noHrefIsMask,i.addShape(t,r)}),r.isMask=o}function u(e){return Math.max(0,Math.min(parseInt(e,16),255))}function a(e,t){return"rgba("+u(e.substr(0,2))+","+u(e.substr(2,2))+","+u(e.substr(4,2))+","+t+")"}function f(){}var t,n=e.mapster,r=n.utils,i,s;n.Graphics=function(e){var t=this;t.active=!1,t.canvas=null,t.width=0,t.height=0,t.shapes=[],t.masks=[],t.map_data=e},t=n.Graphics.prototype={constructor:n.Graphics,begin:function(t,n){var r=e(t);this.elementName=n,this.canvas=t,this.width=r.width(),this.height=r.height(),this.shapes=[],this.masks=[],this.active=!0},addShape:function(e,t){var n=t.isMask?this.masks:this.shapes;n.push({mapArea:e,options:t})},createVisibleCanvas:function(t){return e(this.createCanvasFor(t)).addClass("mapster_el").css(n.canvas_style)[0]},addShapeGroup:function(t,i,s){var u=this,a,f,l,c=this.map_data,h=t.effectiveRenderOptions(i);s&&e.extend(h,s),i==="select"?(f="static_"+t.areaId.toString(),l=c.base_canvas):l=c.overlay_canvas,u.begin(l,f),h.includeKeys&&(a=r.split(h.includeKeys),e.each(a,function(e,t){var n=c.getDataForKey(t.toString());o(u,n,n.effectiveRenderOptions(i))})),o(u,t,h),u.render(),h.fade&&r.fader(n.hasCanvas()?l:e(l).find("._fill").not(".mapster_mask"),0,n.hasCanvas()?1:h.fillOpacity,h.fadeDuration)}},i={renderShape:function(e,t,n){var r,i=t.coords(null,n);
11488switch(t.shape){case"rect":e.rect(i[0],i[1],i[2]-i[0],i[3]-i[1]);break;case"poly":e.moveTo(i[0],i[1]);for(r=2;r<t.length;r+=2)e.lineTo(i[r],i[r+1]);e.lineTo(i[0],i[1]);break;case"circ":case"circle":e.arc(i[0],i[1],i[2],0,Math.PI*2,!1)}},addAltImage:function(e,t,n,r){e.beginPath(),this.renderShape(e,n),e.closePath(),e.clip(),e.globalAlpha=r.altImageOpacity||r.fillOpacity,e.drawImage(t,0,0,n.owner.scaleInfo.width,n.owner.scaleInfo.height)},render:function(){var t,n,r=this,i=r.map_data,s=r.masks.length,o=r.createCanvasFor(i),u=o.getContext("2d"),f=r.canvas.getContext("2d");return s&&(t=r.createCanvasFor(i),n=t.getContext("2d"),n.clearRect(0,0,t.width,t.height),e.each(r.masks,function(e,t){n.save(),n.beginPath(),r.renderShape(n,t.mapArea),n.closePath(),n.clip(),n.lineWidth=0,n.fillStyle="#000",n.fill(),n.restore()})),e.each(r.shapes,function(e,t){u.save(),t.options.fill&&(t.options.altImageId?r.addAltImage(u,i.images[t.options.altImageId],t.mapArea,t.options):(u.beginPath(),r.renderShape(u,t.mapArea),u.closePath(),u.fillStyle=a(t.options.fillColor,t.options.fillOpacity),u.fill())),u.restore()}),e.each(r.shapes.concat(r.masks),function(e,t){var n=t.options.strokeWidth===1?.5:0;t.options.stroke&&(u.save(),u.strokeStyle=a(t.options.strokeColor,t.options.strokeOpacity),u.lineWidth=t.options.strokeWidth,u.beginPath(),r.renderShape(u,t.mapArea,n),u.closePath(),u.stroke(),u.restore())}),s?(n.globalCompositeOperation="source-out",n.drawImage(o,0,0),f.drawImage(t,0,0)):f.drawImage(o,0,0),r.active=!1,r.canvas},createCanvasFor:function(t){return e('<canvas width="'+t.scaleInfo.width+'" height="'+t.scaleInfo.height+'"></canvas>')[0]},clearHighlight:function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},refreshSelections:function(){var t,n=this.map_data;t=n.base_canvas,n.base_canvas=this.createVisibleCanvas(n),e(n.base_canvas).hide(),e(t).before(n.base_canvas),n.redrawSelections(),e(n.base_canvas).show(),e(t).remove()}},s={renderShape:function(t,n,r){var i=this,s,o,u,a,f,l,c,h=t.coords();f=i.elementName?'name="'+i.elementName+'" ':"",l=r?'class="'+r+'" ':"",a='<v:fill color="#'+n.fillColor+'" class="_fill" opacity="'+(n.fill?n.fillOpacity:0)+'" /><v:stroke class="_fill" opacity="'+n.strokeOpacity+'"/>',o=n.stroke?" strokeweight="+n.strokeWidth+' stroked="t" strokecolor="#'+n.strokeColor+'"':' stroked="f"',s=n.fill?' filled="t"':' filled="f"';switch(t.shape){case"rect":c="<v:rect "+l+f+s+o+' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+h[0]+"px;top:"+h[1]+"px;width:"+(h[2]-h[0])+"px;height:"+(h[3]-h[1])+'px;">'+a+"</v:rect>";break;case"poly":c="<v:shape "+l+f+s+o+' coordorigin="0,0" coordsize="'+i.width+","+i.height+'" path="m '+h[0]+","+h[1]+" l "+h.slice(2).join(",")+' x e" style="zoom:1;margin:0;padding:0;display:block;position:absolute;top:0px;left:0px;width:'+i.width+"px;height:"+i.height+'px;">'+a+"</v:shape>";break;case"circ":case"circle":c="<v:oval "+l+f+s+o+' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+(h[0]-h[2])+"px;top:"+(h[1]-h[2])+"px;width:"+h[2]*2+"px;height:"+h[2]*2+'px;">'+a+"</v:oval>"}return u=e(c),e(i.canvas).append(u),u},render:function(){var t,n=this;return e.each(this.shapes,function(e,t){n.renderShape(t.mapArea,t.options)}),this.masks.length&&e.each(this.masks,function(e,i){t=r.updateProps({},i.options,{fillOpacity:1,fillColor:i.options.fillColorMask}),n.renderShape(i.mapArea,t,"mapster_mask")}),this.active=!1,this.canvas},createCanvasFor:function(t){var n=t.scaleInfo.width,r=t.scaleInfo.height;return e('<var width="'+n+'" height="'+r+'" style="zoom:1;overflow:hidden;display:block;width:'+n+"px;height:"+r+'px;"></var>')[0]},clearHighlight:function(){e(this.map_data.overlay_canvas).children().remove()},removeSelections:function(t){t>=0?e(this.map_data.base_canvas).find('[name="static_'+t.toString()+'"]').remove():e(this.map_data.base_canvas).children().remove()}},e.each(["renderShape","addAltImage","render","createCanvasFor","clearHighlight","removeSelections","refreshSelections"],function(e,r){t[r]=function(e){return function(){return t[e]=(n.hasCanvas()?i[e]:s[e])||f,t[e].apply(this,arguments)}}(r)})}(jQuery),function(e){var t=e.mapster,n=t.utils,r=[];t.MapImages=function(e){this.owner=e,this.clear()},t.MapImages.prototype={constructor:t.MapImages,slice:function(){return r.slice.apply(this,arguments)},splice:function(){r.slice.apply(this.status,arguments);var e=r.slice.apply(this,arguments);return e},complete:function(){return e.inArray(!1,this.status)<0},_add:function(e){var t=r.push.call(this,e)-1;return this.status[t]=!1,t},indexOf:function(e){return n.indexOf(this,e)},clear:function(){var t=this;t.ids&&t.ids.length>0&&e.each(t.ids,function(e,n){delete t[n]}),t.ids=[],t.length=0,t.status=[],t.splice(0)},add:function(t,n){var r,i,s=this;if(!t)return;if(typeof t=="string"){i=t,t=s[i];if(typeof t=="object")return s.indexOf(t);t=e("<img />").addClass("mapster_el").hide(),r=s._add(t[0]),t.bind("load",function(e){s.imageLoaded.call(s,e)}).bind("error",function(e){s.imageLoadError.call(s,e)}),t.attr("src",i)}else r=s._add(e(t)[0]);if(n){if(this[n])throw n+" is already used or is not available as an altImage alias.";s.ids.push(n),s[n]=s[r]}return r},bind:function(e){var t=this,r,i=t.owner.options.configTimeout/200,s=function(){var e;e=t.length;while(e-->0)if(!t.isLoaded(e))break;t.complete()?t.resolve():i-->
114880?t.imgTimeout=window.setTimeout(function(){s.call(t,!0)},50):t.imageLoadError.call(t)};return r=t.deferred=n.defer(),s(),r},resolve:function(){var e=this,t=e.deferred;t&&(e.deferred=null,t.resolve())},imageLoaded:function(t){var n=this,r=n.indexOf(t.target);r>=0&&(n.status[r]=!0,e.inArray(!1,n.status)<0&&n.resolve())},imageLoadError:function(e){clearTimeout(this.imgTimeout),this.triesLeft=0;var t=e?"The image "+e.target.src+" failed to load.":"The images never seemed to finish loading. You may just need to increase the configTimeout if images could take a long time to load.";throw t},isLoaded:function(e){var t,r=this,i=r.status;return i[e]?!0:(t=r[e],typeof t.complete!="undefined"?i[e]=t.complete:i[e]=!!n.imgWidth(t),i[e])}}}(jQuery),function(e){function r(t){e.extend(t,{complete:!1,map:null,base_canvas:null,overlay_canvas:null,commands:[],data:[],mapAreas:[],_xref:{},highlightId:-1,currentAreaId:-1,_tooltip_events:[],scaleInfo:null,index:-1,activeAreaEvent:null})}function i(e){return[e,e.render_highlight,e.render_select]}function s(r){var s=r.options,o=r.images;t.hasCanvas()&&(e.each(s.altImages||{},function(e,t){o.add(t,e)}),e.each([s].concat(s.areas),function(t,n){e.each(i(n),function(e,t){t&&t.altImage&&(t.altImageId=o.add(t.altImage))})})),r.area_options=n.updateProps({},t.area_defaults,s)}function o(e,t,r,i){function s(t){e.currentAreaId!==t&&e.highlightId>=0&&i.resolve()}return i=i||n.when.defer(),e.activeAreaEvent&&(window.clearTimeout(e.activeAreaEvent),e.activeAreaEvent=0),t<0?i.reject():r.owner.currentAction||t?e.activeAreaEvent=window.setTimeout(function(){return function(){o(e,0,r,i)}}(r),t||100):s(r.areaId),i}function u(e){t.hasCanvas()||this.blur(),e.preventDefault()}function a(t,n){var r=t.getAllDataForArea(this),i=r.length?r[0]:null;
11488if(!i||i.isNotRendered()||i.owner.currentAction)return;if(t.currentAreaId===i.areaId)return;t.highlightId!==i.areaId&&(t.clearEffects(),i.highlight(),t.options.showToolTip&&e.each(r,function(e,t){t.effectiveOptions().toolTip&&t.showToolTip()})),t.currentAreaId=i.areaId,e.isFunction(t.options.onMouseover)&&t.options.onMouseover.call(this,{e:n,options:i.effectiveOptions(),key:i.key,selected:i.isSelected()})}function f(t,n){var r,i=t.getDataForArea(this),s=t.options;if(t.currentAreaId<0||!i)return;r=t.getDataForArea(n.relatedTarget);if(r===i)return;t.currentAreaId=-1,i.area=null,o(t,s.mouseoutDelay,i).then(t.clearEffects),e.isFunction(s.onMouseout)&&s.onMouseout.call(this,{e:n,options:s,key:i.key,selected:i.isSelected()})}function l(t){var n=t.options;t.ensureNoHighlight(),n.toolTipClose&&e.inArray("area-mouseout",n.toolTipClose)>=0&&t.activeToolTip&&t.clearToolTip()}function c(r,i){function v(u){var p,g;l=u.isSelectable()&&(u.isDeselectable()||!u.isSelected()),l?f=!u.isSelected():f=u.isSelected(),a=t.getBoundList(d,u.key);if(e.isFunction(d.onClick)){c=d.onClick.call(h,{e:i,listTarget:a,key:u.key,selected:f});if(n.isBool(c)){if(!c)return!1;g=e(u.area).attr("href");if(g!=="#")return window.location.href=g,!1}}l&&(s=u.toggle()),d.boundList&&d.boundList.length>0&&t.setBoundListProperties(d,a,u.isSelected()),p=u.effectiveOptions(),p.includeKeys&&(o=n.split(p.includeKeys),e.each(o,function(e,t){var n=r.getDataForKey(t.toString());n.options.isMask||v(n)}))}var s,o,a,f,l,c,h=this,p=r.getDataForArea(this),d=r.options;u.call(this,i);if(d.clickNavigate&&p.href){window.location.href=p.href;return}p&&!p.owner.currentAction&&(d=r.options,v(p))}var t=e.mapster,n=t.utils;t.MapData=function(e,n){var i=this;i.image=e,i.images=new t.MapImages(i),i.graphics=new t.Graphics(i),i.imgCssText=e.style.cssText||null,r(i),i.configureOptions(n),i.mouseover=function(e){a.call(this,i,e)},i.mouseout=function(e){f.call(this,i,e)},i.click=function(e){c.call(this,i,e)},i.clearEffects=function(e){l.call(this,i,e)}},t.MapData.prototype={constructor:t.MapData,configureOptions:function(e){this.options=n.updateProps({},t.defaults,e)},bindImages:function(){var e=this,t=e.images;return t.length>2?t.splice(2):t.length===0&&(t.add(e.image),t.add(e.image.src)),s(e),e.images.bind()},isActive:function(){return!this.complete||this.currentAction},state:function(){return{complete:this.complete,resizing:this.currentAction==="resizing",zoomed:this.zoomed,zoomedArea:this.zoomedArea,scaleInfo:this.scaleInfo}},wrapId:function(){return"mapster_wrap_"+this.index},_idFromKey:function(e){return typeof e=="string"&&this._xref.hasOwnProperty(e)?this._xref[e]:-1},getSelected:function(){var t="";
11488return e.each(this.data,function(e,n){n.isSelected()&&(t+=(t?",":"")+this.key)}),t},getAllDataForArea:function(t,r){var i,s,o,u=this,a=e(t).filter("area").attr(u.options.mapKey);if(a){o=[],a=n.split(a);for(i=0;i<(r||a.length);i++)s=u.data[u._idFromKey(a[i])],s.area=t.length?t[0]:t,o.push(s)}return o},getDataForArea:function(e){var t=this.getAllDataForArea(e,1);return t?t[0]||null:null},getDataForKey:function(e){return this.data[this._idFromKey(e)]},getKeysForGroup:function(e){var t=this.getDataForKey(e);return t?t.isPrimary?t.key:this.getPrimaryKeysForMapAreas(t.areas()).join(","):""},getPrimaryKeysForMapAreas:function(t){var n=[];return e.each(t,function(t,r){e.inArray(r.keys[0],n)<0&&n.push(r.keys[0])}),n},getData:function(e){return typeof e=="string"?this.getDataForKey(e):e&&e.mapster||n.isElement(e)?this.getDataForArea(e):null},ensureNoHighlight:function(){var e;this.highlightId>=0&&(this.graphics.clearHighlight(),e=this.data[this.highlightId],e.changeState("highlight",!1),this.setHighlightId(-1))},setHighlightId:function(e){this.highlightId=e},clearSelections:function(){e.each(this.data,function(e,t){t.selected&&t.deselect(!0)}),this.removeSelectionFinish()},setAreaOptions:function(e){var t,r,i;e=e||[];for(t=e.length-1;t>=0;t--)r=e[t],r&&(i=this.getDataForKey(r.key),i&&(n.updateProps(i.options,r),n.isBool(r.selected)&&(i.selected=r.selected)))},drawSelections:function(e){var t,r=n.asArray(e);for(t=r.length-1;t>=0;t--)this.data[r[t]].drawSelection()},redrawSelections:function(){e.each(this.data,function(e,t){t.isSelectedOrStatic()&&t.drawSelection()})},initialize:function(){var r,i,s,o,u,a,f,l,c,h,p,d,v=this,g=v.options;if(v.complete)return;c=e(v.image),u=c.parent().attr("id"),u&&u.length>=12&&u.substring(0,12)==="mapster_wrap"?(o=c.parent(),o.attr("id",v.wrapId())):(o=e('<div id="'+v.wrapId()+'"></div>'),g.wrapClass&&(g.wrapClass===!0?o.addClass(c[0].className):o.addClass(g.wrapClass))),v.wrapper=o,v.scaleInfo=d=n.scaleMap(v.images[0],v.images[1],g.scaleMap),v.base_canvas=i=v.graphics.createVisibleCanvas(v),v.overlay_canvas=s=v.graphics.createVisibleCanvas(v),r=e(v.images[1]).addClass("mapster_el "+v.images[0].className).attr({id:null,usemap:null}),l=n.size(v.images[0]),l.complete&&r.css({width:l.width,height:l.height}),v.buildDataset(),a={display:"block",position:"relative",padding:0,width:d.width,height:d.height},g.wrapCss&&e.extend(a,g.wrapCss),c.parent()[0]!==v.wrapper[0]&&c.before(v.wrapper),o.css(a),e(v.images.slice(2)).hide();for(f=1;f<v.images.length;f++)o.append(v.images[f]);o.append(i).append(s).append(c.css(t.canvas_style)),n.setOpacity(v.images[0],0),e(v.images[1]).show(),n.setOpacity(v.images[1],1),g.isSelectable&&g.onGetList&&(p=v.data.slice(0),g.sortList&&(g.sortList==="desc"?h=function(e,t){return e===t?0:e>t?-1:1}:h=function(e,t){return e===t?0:e<t?-1:1},p.sort(function(e,t){return e=e.value,t=t.value,h(e,t)})),v.options.boundList=g.onGetList.call(v.image,p)),v.complete=!0,v.processCommandQueue(),g.onConfigured&&typeof g.onConfigured=="function"&&g.onConfigured.call(c,!0)},buildDataset:function(n){function E(e,n){var r=new t.AreaData(y,e,n);return r.areaId=y._xref[e]=y.data.push(r)-1,r.areaId}var r,i,s,o,u,a,f,l,c,h,p,d,v,g,y=this,b=y.options,w;y._xref={},y.data=[],n||(y.mapAreas=[]),w=!b.mapKey,w&&(b.mapKey="data-mapster-key"),r=t.hasVml()?"area":w?"area[coords]":"area["+b.mapKey+"]",i=e(y.map).find(r).unbind(".mapster");for(p=0;p<i.length;p++){o=0,a=i[p],u=e(a);if(!a.coords)continue;w?(f=String(p),u.attr("data-mapster-key",f)):f=a.getAttribute(b.mapKey),n?(l=y.mapAreas[u.data("mapster")-1],l.configure(f)):(l=new t.MapArea(y,a,f),y.mapAreas.push(l)),h=l.keys;for(s=h.length-1;s>=0;s--)c=h[s],b.mapValue&&(d=u.attr(b.mapValue)),w?(o=E(y.data.length,d),v=y.data[o],v.key=c=o.toString()):(o=y._xref[c],o>=0?(v=y.data[o],d&&!y.data[o].value&&(v.value=d)):(o=E(c,d),v=y.data[o],v.isPrimary=s===0)),l.areaDataXref.push(o),v.areasXref.push(p);g=u.attr("href"),g&&g!=="#"&&!v.href&&(v.href=g),l.nohref||u.bind("click.mapster",y.click).bind("mouseover.mapster",y.mouseover).bind("mouseout.mapster",y.mouseout).bind("mousedown.mapster",y.mousedown),u.data("mapster",p+1)}y.setAreaOptions(b.areas),y.redrawSelections()},processCommandQueue:function(){var e,n=this;
11488while(!n.currentAction&&n.commands.length)e=n.commands[0],n.commands.splice(0,1),t.impl[e.command].apply(e.that,e.args)},clearEvents:function(){e(this.map).find("area").unbind(".mapster"),e(this.images).unbind(".mapster")},_clearCanvases:function(t){t||e(this.base_canvas).remove(),e(this.overlay_canvas).remove()},clearMapData:function(t){var r=this;this._clearCanvases(t),e.each(this.data,function(e,t){t.reset()}),this.data=null,t||(this.image.style.cssText=this.imgCssText,e(this.wrapper).before(this.image).remove()),r.images.clear(),this.image=null,n.ifFunction(this.clearTooltip,this)},removeSelectionFinish:function(){var e=this.graphics;e.refreshSelections(),e.clearHighlight()}}}(jQuery),function(e){function r(t){var n=this,r=n.owner;r.options.singleSelect&&r.clearSelections(),n.isSelected()||(t&&(n.optsCache=e.extend(n.effectiveRenderOptions("select"),t,{altImageId:r.images.add(t.altImage)})),n.drawSelection(),n.selected=!0,n.changeState("select",!0)),r.options.singleSelect&&r.graphics.refreshSelections()}function i(e){var t=this;t.selected=!1,t.changeState("select",!1),t.optsCache=null,t.owner.graphics.removeSelections(t.areaId),e||t.owner.removeSelectionFinish()}function s(e){var t=this;return t.isSelected()?t.deselect():t.select(e),t.isSelected()}var t=e.mapster,n=t.utils;t.AreaData=function(t,n,r){e.extend(this,{owner:t,key:n||"",isPrimary:!0,areaId:-1,href:"",value:r||"",options:{},selected:null,areasXref:[],area:null,optsCache:null})},t.AreaData.prototype={constuctor:t.AreaData,select:r,deselect:i,toggle:s,areas:function(){var e,t=[];for(e=0;e<this.areasXref.length;e++)t.push(this.owner.mapAreas[this.areasXref[e]]);return t},coords:function(t){var n=[];return e.each(this.areas(),function(e,r){n=n.concat(r.coords(t))}),n},reset:function(){e.each(this.areas(),function(e,t){t.reset()}),this.areasXref=[],this.options=null},isSelectedOrStatic:function(){var e=this.effectiveOptions();return n.isBool(e.staticState)?e.staticState:this.isSelected()},isSelected:function(){return n.isBool(this.selected)?this.selected:n.isBool(this.owner.area_options.selected)?this.owner.area_options.selected:!1},isSelectable:function(){return n.isBool(this.effectiveOptions().staticState)?!1:n.isBool(this.owner.options.staticState)?!1:n.boolOrDefault(this.effectiveOptions().isSelectable,!0)},isDeselectable:function(){return n.isBool(this.effectiveOptions().staticState)?!1:n.isBool(this.owner.options.staticState)?!1:n.boolOrDefault(this.effectiveOptions().isDeselectable,!0)},isNotRendered:function(){var t=e(this.area);return t.attr("nohref")||!t.attr("href")||this.effectiveOptions().isMask},effectiveOptions:function(e){var t=n.updateProps({},this.owner.area_options,this.options,e||{},{id:this.areaId});return t.selected=this.isSelected(),t},effectiveRenderOptions:function(t,r){var i,s=this.optsCache;if(!s||t==="highlight")i=this.effectiveOptions(r),s=n.updateProps 11489({},i,i["render_"+t]),t!=="highlight"&&(this.optsCache=s);return e.extend({},s)},changeState:function(t,n){e.isFunction(this.owner.options.onStateChange)&&this.owner.options.onStateChange.call(this.owner.image,{key:this.key,state:t,selected:n})},highlight:function(e){var t=this.owner;this.effectiveOptions().highlight&&t.graphics.addShapeGroup(this,"highlight",e),t.setHighlightId(this.areaId),this.changeState("highlight",!0)},drawSelection:function(){this.owner.graphics.addShapeGroup(this,"select")}},t.MapArea=function(t,r,i){if(!t)return;var s=this;s.owner=t,s.area=r,s.areaDataXref=[],s.originalCoords=[],e.each(n.split(r.coords),function(e,t){s.originalCoords.push(parseFloat(t))}),s.length=s.originalCoords.length,s.shape=r.shape.toLowerCase(),s.nohref=r.nohref||!r.href,s.configure(i)},t.MapArea.prototype={constructor:t.MapArea,configure:function(e){this.keys=n.split(e)},reset:function(){this.area=null},coords:function(t){return e.map(this.originalCoords,function(e){return t?e:e+t})}}}(jQuery),function(e){var t=e.mapster.utils;t.areaCorners=function(n,r,i,s,o){var a,f,l,c,h,p,d,v,m,g,y,b,w,E,S=0,x=0,T,N,C,k,L,A,O=[];n=n.length?n:[n],i=i?e(i):e(document.body),a=i.offset(),T=a.left,N=a.top,r&&(a=e(r).offset(),S=a.left,x=a.top);for(E=0;E<n.length;E++){A=n[E];if(A.nodeName==="AREA"){C=t.split(A.coords,parseInt);switch(A.shape){case"circle":y=C[0],b=C[1],k=C[2],O=[];for(E=0;E<360;E+=20)L=E*Math.PI/180,O.push(y+k*Math.cos(L),b+k*Math.sin(L));break;
11489case"rect":O.push(C[0],C[1],C[2],C[1],C[2],C[3],C[0],C[3]);break;default:O=O.concat(C)}for(E=0;E<O.length;E+=2)O[E]=parseInt(O[E],10)+S,O[E+1]=parseInt(O[E+1],10)+x}else A=e(A),a=A.position(),O.push(a.left,a.top,a.left+A.width(),a.top,a.left+A.width(),a.top+A.height(),a.left,a.top+A.height())}l=c=d=m=999999,h=p=v=g=-1;for(E=O.length-2;E>=0;E-=2)y=O[E],b=O[E+1],y<l&&(l=y,g=b),y>h&&(h=y,m=b),b<c&&(c=b,v=y),b>p&&(p=b,d=y);return s&&o&&(f=!1,e.each([[v-s,c-o],[d,c-o],[l-s,g-o],[l-s,m],[h,g-o],[h,m],[v-s,p],[d,p]],function(e,t){if(!f&&t[0]>T&&t[1]>N)return w=t,f=!0,!1}),f||(w=[h,p])),w}}(jQuery),function(e){var t=e.mapster,n=t.utils,r=t.MapArea.prototype;t.utils.getScaleInfo=function(e,t){var n;return t?(n=e.width/t.width||e.height/t.height,n>.98&&n<1.02&&(n=1)):(n=1,t=e),{scale:n!==1,scalePct:n,realWidth:t.width,realHeight:t.height,width:e.width,height:e.height,ratio:e.width/e.height}},t.utils.scaleMap=function(e,t,r){var i=n.size(e),s=n.size(t,!0);if(!s.complete())throw"Another script, such as an extension, appears to be interfering with image loading. Please let us know about this.";return i.complete()||(i=s),this.getScaleInfo(i,r?s:null)},t.MapData.prototype.resize=function(r,i,s,o){function v(n,r,i){t.hasCanvas()?(n.width=r,n.height=i):(e(n).width(r),e(n).height(i))}function g(){d.currentAction="",e.isFunction(o)&&o(),d.processCommandQueue()}function y(){v(d.overlay_canvas,r,i);if(h>=0){var e=d.data[h];e.tempOptions={fade:!1},d.getDataForKey(e.key).highlight(),e.tempOptions=null}v(d.base_canvas,r,i),d.redrawSelections(),g()}function b(){e(d.image).css(l),d.scaleInfo=n.getScaleInfo({width:r,height:i},{width:d.scaleInfo.realWidth,height:d.scaleInfo.realHeight}),e.each(d.data,function(t,n){e.each(n.areas(),function(e,t){t.resize()})})}var a,f,l,c,h,p,d=this;o=o||s;if(d.scaleInfo.width===r&&d.scaleInfo.height===i)return;h=d.highlightId,r||(p=i/d.scaleInfo.realHeight,r=Math.round(d.scaleInfo.realWidth*p)),i||(p=r/d.scaleInfo.realWidth,i=Math.round(d.scaleInfo.realHeight*p)),l={width:String(r)+"px",height:String(i)+"px"},t.hasCanvas()||e(d.base_canvas).children().remove(),c=e(d.wrapper).find(".mapster_el").add(d.wrapper),s?(f=[],d.currentAction="resizing",c.each(function(t,r){a=n.defer(),f.push(a),e(r).animate(l,{duration:s,complete:a.resolve,easing:"linear"})}),a=n.defer(),f.push(a),n.when.all(f).then(y),b(),a.resolve()):(c.css(l),b(),y())},t.MapArea=n.subclass(t.MapArea,function(){this.base.init(),this.owner.scaleInfo.scale&&this.resize()}),r.coords=function(e,t){var n,r=[],i=e||this.owner.scaleInfo.scalePct,s=t||0;if(i===1&&t===0)return this.originalCoords;for(n=0;n<this.length;n++)r.push(Math.round(this.originalCoords[n]*i)+s);return r},r.resize=function(){this.area.coords=this.coords().join(",")},r.reset=function(){this.area.coords=this.coords(1).join(",")},t.impl.resize=function(e,n,r,i){if(!e&&!n)return!1;var s=(new t.Method(this,function(){this.resize(e,n,r,i)},null,{name:"resize",args:arguments})).go();return s}}(jQuery),function(e){function r(t,n,r){var i;return n?(i=typeof n=="string"?e(n):e(n).clone(),i.append(t)):i=e(t),i.css(e.extend(r||{},{display:"block",position:"absolute"})).hide(),e("body").append(i),i.attr("data-opacity",i.css("opacity")).css("opacity",0),i.show()}function i(e,t){var r={left:t.left+"px",top:t.top+"px"},i=e.attr("data-opacity")||0,s=e.css("z-index");if(parseInt(s,10)===0||s==="auto")r["z-index"]=9999;e.css(r).addClass("mapster_tooltip"),t.fadeDuration&&t.fadeDuration>0?n.fader(e[0],0,i,t.fadeDuration):n.setOpacity(e[0],i)}function s(t,n,r,i,s,o){var u=r+".mapster-tooltip";if(e.inArray(n,t)>=0)return i.unbind(u).bind(u,function(e){if(!s||s.call(this,e))i.unbind(".mapster-tooltip"),o&&o.call(this)}),{object:i,event:u}}function o(e,t,r,s,o){var u,a={};return o=o||{},t?(u=n.areaCorners(t,r,s,e.outerWidth(!0),e.outerHeight(!0)),a.left=u[0],a.top=u[1]):(a.left=o.left,a.top=o.top),a.left+=o.offsetx||0,a.top+=o.offsety||0,a.css=o.css,a.fadeDuration=o.fadeDuration,i(e,a),e}function u(e){return e?typeof e=="string"||e.jquery?e:e.content:null}var t=e.mapster,n=t.utils;e.extend(t.defaults,{toolTipContainer:'<div style="border: 2px solid black; background: #EEEEEE; width:160px; padding:4px; margin: 4px; -moz-box-shadow: 3px 3px 5px #535353; -webkit-box-shadow: 3px 3px 5px #535353; box-shadow: 3px 3px 5px #535353; -moz-border-radius: 6px 6px 6px 6px; -webkit-border-radius: 6px; border-radius: 6px 6px 6px 6px; opacity: 0.9;"></div>
11489',showToolTip:!1,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout"],onShowToolTip:null,onHideToolTip:null}),e.extend(t.area_defaults,{toolTip:null,toolTipClose:null}),t.MapData.prototype.clearToolTip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=null,n.ifFunction(this.options.onHideToolTip,this))},t.AreaData.prototype.showToolTip=function(t,i){var u,a,f,l,c,h={},p=this,d=p.owner,v=p.effectiveOptions();i=i?e.extend({},i):{},t=t||v.toolTip,a=i.closeEvents||v.toolTipClose||d.options.toolTipClose||"tooltip-click",c=typeof i.template!="undefined"?i.template:d.options.toolTipContainer,i.closeEvents=typeof a=="string"?a=n.split(a):a,i.fadeDuration=i.fadeDuration||(d.options.toolTipFade?d.options.fadeDuration||v.fadeDuration:0),f=p.area?p.area:e.map(p.areas(),function(e){return e.area});if(d.activeToolTipID===p.areaId)return;return d.clearToolTip(),d.activeToolTip=u=r(t,c,i.css),d.activeToolTipID=p.areaId,l=function(){d.clearToolTip()},s(a,"area-click","click",e(d.map),null,l),s(a,"tooltip-click","click",u,null,l),s(a,"image-mouseout","mouseout",e(d.image),function(e){return e.relatedTarget&&e.relatedTarget.nodeName!=="AREA"&&e.relatedTarget!==p.area},l),o(u,f,d.image,i.container,c,i),n.ifFunction(d.options.onShowToolTip,p.area,{toolTip:u,options:h,areaOptions:v,key:p.key,selected:p.isSelected()}),u},t.impl.tooltip=function(n,i){return(new t.Method(this,function(){var a,f,l=this;if(!n)l.clearToolTip();else{f=e(n);if(l.activeToolTipID===f[0])return;l.clearToolTip(),l.activeToolTip=a=r(u(i),i.template||l.options.toolTipContainer,i.css),l.activeToolTipID=f[0],s(["tooltip-click"],"tooltip-click","click",a,null,function(){l.clearToolTip()}),l.activeToolTip=a=o(a,f,l.image,i.container,i)}},function(){e.isPlainObject(n)&&!i&&(i=n),this.showToolTip(u(i),i)},{name:"tooltip",args:arguments,key:n})).go()}}(jQuery); 11490 11491 11492/* squelettes/plugins/fidh/theme/js/fixto.min.js */ 11493 11494var fixto=function(a,b,c){function f(){this._vendor=null}function j(){var a=!1,b=c.createElement("div"),d=c.createElement("div");b.appendChild(d),b.style[h]="translate(0)",b.style.marginTop="10px",b.style.visibility="hidden",d.style.position="fixed",d.style.top=0,c.body.appendChild(b);var e=d.getBoundingClientRect();return e.top>0&&(a=!0),c.body.removeChild(b),a}function o(b,c,d){this.child=b,this._$child=a(b),this.parent=c,this.options={className:"fixto-fixed",top:0},this._setOptions(d)}function p(a,b,c){o.call(this,a,b,c),this._replacer=new e.MimicNode(a),this._ghostNode=this._replacer.replacer,this._saveStyles(),this._saveViewportHe
11494ight(),this._proxied_onscroll=this._bind(this._onscroll,this),this._proxied_onresize=this._bind(this._onresize,this),this.start()}function q(a,b,c){o.call(this,a,b,c),this.start()}var d=function(){var a={getAll:function(a){return c.defaultView.getComputedStyle(a)},get:function(a,b){return this.getAll(a)[b]},toFloat:function(a){return parseFloat(a,10)||0},getFloat:function(a,b){return this.toFloat(this.get(a,b))},_getAllCurrentStyle:function(a){return a.currentStyle}};return c.documentElement.currentStyle&&(a.getAll=a._getAllCurrentStyle),a}(),e=function(){function b(a){this.element=a,this.replacer=c.createElement("div"),this.replacer.style.visibility="hidden",this.hide(),a.parentNode.insertBefore(this.replacer,a)}b.prototype={replace:function(){var a=this.replacer.style,b=d.getAll(this.element);a.width=this._width(),a.height=this._height(),a.marginTop=b.marginTop,a.marginBottom=b.marginBottom,a.marginLeft=b.marginLeft,a.marginRight=b.marginRight,a.cssFloat=b.cssFloat,a.styleFloat=b.styleFloat,a.position=b.position,a.top=b.top,a.right=b.right,a.bottom=b.bottom,a.left=b.left,a.display=b.display},hide:function(){this.replacer.style.display="none"},_width:function(){return this.element.getBoundingClientRect().width+"px"},_widthOffset:function(){return this.element.offsetWidth+"px"},_height:function(){return this.element.getBoundingClientRect().height+"px"},_heightOffset:function(){return this.element.offsetHeight+"px"},destroy:function(){a(this.replacer).remove();for(var b in this)this.hasOwnProperty(b)&&(this[b]=null)}};var e=c.documentElement.getBoundingClientRect();return e.width||(b.prototype._width=b.prototype._widthOffset,b.prototype._height=b.prototype._heightOffset),{MimicNode:b,computedStyle:d}}();f.prototype={_vendors:{webkit:{cssPrefix:"-webkit-",jsPrefix:"Webkit"},moz:{cssPrefix:"-moz-",jsPrefix:"Moz"},ms:{cssPrefix:"-ms-",jsPrefix:"ms"},opera:{cssPrefix:"-o-",jsPrefix:"O"}},_prefixJsProperty:function(a,b){return a.jsPrefix+b[0].toUpperCase()+b.substr(1)},_prefixValue:function(a,b){return a.cssPrefix+b},_valueSupported:function(a,b,c){try{return c.style[a]=b,c.style[a]===b}catch(d){return!1}},propertySupported:function(a){return c.documentElement.style[a]!==undefined},getJsProperty:function(a){if(this.propertySupported(a))return a;if(this._vendor)return this._prefixJsProperty(this._vendor,a);var b;for(var c in this._vendors){b=this._prefixJsProperty(this._vendors[c],a);if(this.propertySupported(b))return this._vendor=this._vendors[c],b}return null},getCssValue:function(a,b){var d=c.createElement("div"),e=this.getJsProperty(a);if(this._valueSupported(e,b,d))return b;var f;if(this._vendor){f=this._prefixValue(this._vendor,b);if(this._valueSupported(e,f,d))return f}for(var g in this._vendors){f=this._prefixValue(this._vendors[g],b);if(this._valueSupported(e,f,d))return this._vendor=this._vendors[g],f}return null}};var g=new f,h=g.getJsProperty("transform"),i,k=g.getCssValue("position","sticky"),l=g.getCssValue("position","fixed"),m=navigator.appName==="Microsoft Internet Explorer",n;m&&(n=parseFloat(navigator.appVersion.split("MSIE")[1])),o.prototype={_mindtop:function(){var a=0;if(this._$mind){var b,c,e;for(var f=0,g=this._$mind.length;f<g;f++){b=this._$mind[f],c=b.getBoundingClientRect();if(c.height)a+=c.height;else{var h=d.getAll(b);a+=b.offsetHeight+d.toFloat(h.marginTop)+d.toFloat(h.marginBottom)}}}return a},stop:function(){this._stop(),this._running=!1},start:function(){this._running||(this._start(),this._running=!0)},destroy:function(){this.stop(),this._destroy(),this._$child.removeData("fixto-instance");for(var a in this)this.hasOwnProperty(a)&&(this[a]=null)},_setOptions:function(b){a.extend(this.options,b),this.options.mind&&(this._$mind=a(this.options.mind)),this.options.zIndex&&(this.child.style.zIndex=this.options.zIndex)},setOptions:function(a){this._setOptions(a),this.refresh()},_stop:function(){},_start:function(){},_destroy:function(){},refresh:function(){}},p.prototype=new o,a.extend(p.prototype,{_bind:function(a,b){return function(){return a.call(b)}},_toresize:n===8?c.documentElement:b,_onscroll:function(){this._scrollTop=c.documentElement.scrollTop||c.body.scrollTop,this._parentBottom=this.parent.offsetHeight+this._fullOffset("offsetTop",this.parent),this.options.mindBottomPadding!==!1&&(this._parentBottom-=d.getFloat(this.parent,"paddingBottom"));if(!this.fixed){var a=d.getAll(this.child);this._scrollTop<this._parentBottom&&this._scrollTop>this._fullOffset("offsetTop",this.child)-this.options.top-this._mindtop()&&this._viewportHe
11494ight>this.child.offsetHeight+d.toFloat(a.marginTop)+d.toFloat(a.marginBottom)&&(this._fix(),this._adjust())}else{if(this._scrollTop>this._parentBottom||this._scrollTop<this._fullOffset("offsetTop",this._ghostNode)-this.options.top-this._mindtop()){this._unfix();return}this._adjust()}},_adjust:function(){var a=0,b=this._mindtop(),c=0,e=d.getAll(this.child),f=null;i&&(f=this._getContext(),f&&(a=Math.abs(f.getBoundingClientRect().top))),c=this._parentBottom-this._scrollTop-(this.child.offsetHeight+d.toFloat(e.marginBottom)+b+this.options.top),c>0&&(c=0),this.child.style.top=c+b+a+this.options.top-d.toFloat(e.marginTop)+"px"},_fullOffset:function(a,b,c){var d=b[a],e=b.offsetParent;while(e!==null&&e!==c)d=d+e[a],e=e.offsetParent;return d},_getContext:function(){var a,b=this.child,e=null,f;while(!e){a=b.parentNode;if(a===c.documentElement)return null;f=d.getAll(a);if(f[h]!=="none"){e=a;break}b=a}return e},_fix:function(){var a=this.child,b=a.style,e=d.getAll(a),f=a.getBoundingClientRect().left,g=e.width;this._saveStyles(),c.documentElement.currentStyle&&(g=a.offsetWidth-(d.toFloat(e.paddingLeft)+d.toFloat(e.paddingRight)+d.toFloat(e.borderLeftWidth)+d.toFloat(e.borderRightWidth))+"px");if(i){var h=this._getContext();h&&(f=a.getBoundingClientRect().left-h.getBoundingClientRect().left)}this._replacer.replace(),b.left=f-d.toFloat(e.marginLeft)+"px",b.width=g,b.position="fixed",b.top=this._mindtop()+this.options.top-d.toFloat(e.marginTop)+"px",this._$child.addClass(this.options.className),this.fixed=!0},_unfix:function(){var a=this.child.style;this._replacer.hide(),a.position=this._childOriginalPosition,a.top=this._childOriginalTop,a.width=this._childOriginalWidth,a.left=this._childOriginalLeft,this._$child.removeClass(this.options.className),this.fixed=!1},_saveStyles:function(){var a=this.child.style;this._childOriginalPosition=a.position,this._childOriginalTop=a.top,this._childOriginalWidth=a.width,this._childOriginalLeft=a.left},_onresize:function(){this.refresh()}
11494,_saveViewportHeight:function(){this._viewportHeight=b.innerHeight||c.documentElement.clientHeight},_stop:function(){this._unfix(),a(b).unbind("scroll",this._proxied_onscroll),a(this._toresize).unbind("resize",this._proxied_onresize)},_start:function(){this._onscroll(),a(b).bind("scroll",this._proxied_onscroll),a(this._toresize).bind("resize",this._proxied_onresize)},_destroy:function(){this._replacer.destroy()},refresh:function(){this._saveViewportHeight(),this._unfix(),this._onscroll()}}),q.prototype=new o,a.extend(q.prototype,{_start:function(){var a=d.getAll(this.child);this._childOriginalPosition=a.position,this._childOriginalTop=a.top,this.child.style.position=k,this.refresh()},_stop:function(){this.child.style.position=this._childOriginalPosition,this.child.style.top=this._childOriginalTop},refresh:function(){this.child.style.top=this._mindtop()+this.options.top+"px"}});var r=function(a,b,c){return k&&!c||k&&c&&c.useNativeSticky!==!1?new q(a,b,c):l?(i===undefined&&(i=j()),new p(a,b,c)):"Neither fixed nor sticky positioning supported"};return n<8&&(r=function(){return"not supported"}),a.fn.fixTo=function(b,c){var d=a(b),e=0;return this.each(function(){var f=a(this).data("fixto-instance");if(!f)a(this).data("fixto-instance",r(this,d[e],c));else{var g=b;f[g].call(f,c)}e++})},{FixToContainer:p,fixTo:r,computedStyle:d,mimicNode:e}}(window.jQuery,window,document); 11495 11496 11497/* squelettes/plugins/fidh/theme/js/countUp.min.js */ 11498!function(a,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n(require,exports,module):a.CountUp=n()}(this,function(a,n,t){var e=function(a,n,t,e,i,r){function o(a){var n,t,e,i,r,o,s=a<0;if(a=Math.abs(a).toFixed(l.decimals),a+="",n=a.split("."),t=n[0],e=n.length>1?l.options.decimal+n[1]:"",l.options.useGrouping){for(i="",r=0,o=t.length;r<o;++r)0!==r&&r%3===0&&(i=l.options.separator+i),i=t[o-r-1]+i;t=i}return l.options.numerals.length&&(t=t.replace(/[0-9]/g,function(a){return l.options.numerals[+a]}),e=e.replace(/[0-9]/g,function(a){return l.options.numerals[+a]})),(s?"-":"")+l.options.prefix+t+e+l.options.suffix}function s(a,n,t,e){return t*(-Math.pow(2,-10*a/e)+1)*1024/1023+n}function u(a){return"number"==typeof a&&!isNaN(a)}var l=this;if(l.version=function(){return"1.9.3"},l.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:s,formattingFn:o,prefix:"",suffix:"",numerals:[]},r&&"object"==typeof r)for(var m in l.options)r.hasOwnProperty(m)&&null!==r[m]&&(l.options[m]=r[m]);""===l.options.separator?l.options.useGrouping=!1:l.options.separator=""+l.options.separator;for(var d=0,c=["webkit","moz","ms","o"],f=0;f<c.length&&!window.requestAnimationFrame;++f)window.requestAnimationFrame=window[c[f]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[c[f]+"CancelAnimationFrame"]||window[c[f]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(a,n){var t=(new Date).getTime(),e=Math.max(0,16-(t-d)),i=window.setTimeout(function(){a(t+e)},e);return d=t+e,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)}),l.initialize=function(){return!!l.initialized||(l.error="",l.d="string"==typeof a?document.getElementById(a):a,l.d?(l.startVal=Number(n),l.endVal=Number(t),u(l.startVal)&&u(l.endVal)?(l.decimals=Math.max(0,e||0),l.dec=Math.pow(10,l.decimals),l.duration=1e3*Number(i)||2e3,l.countDown=l.startVal>l.endVal,l.frameVal=l.startVal,l.initialized=!0,!0):(l.error="[CountUp] startVal ("+n+") or endVal ("+t+") is not a number",!1)):(l.error="[CountUp] target is null or undefined",!1))},l.printValue=function(a){var n=l.options.formattingFn(a);"INPUT"===l.d.tagName?this.d.value=n:"text"===l.d.tagName||"tspan"===l.d.tagName?this.d.textContent=n:this.d.innerHTML=n},l.count=function(a){l.startTime||(l.startTime=a),l.timestamp=a;var n=a-l.startTime;l.remaining=l.duration-n,l.options.useEasing?l.countDown?l.frameVal=l.startVal-l.options.easingFn(n,0,l.startVal-l.endVal,l.duration):l.frameVal=l.options.easingFn(n,l.startVal,l.endVal-l.startVal,l.duration):l.countDown?l.frameVal=l.startVal-(l.startVal-l.endVal)*(n/l.duration):l.frameVal=l.startVal+(l.endVal-l.startVal)*(n/l.duration),l.countDown?l.frameVal=l.frameVal<l.endVal?l.endVal:l.frameVal:l.frameVal=l.frameVal>l.endVal?l.endVal:l.frameVal,l.frameVal=Math.round(l.frameVal*l.dec)/l.dec,l.printValue(l.frameVal),n<l.duration?l.rAF=requestAnimationFrame(l.count):l.callback&&l.callback()},l.start=function(a){l.initialize()&&(l.callback=a,l.rAF=requestAnimationFrame(l.count))},l.pauseResume=function(){l.paused?(l.paused=!1,delete l.startTime,l.duration=l.remaining,l.startVal=l.frameVal,requestAnimationFrame(l.count)):(l.paused=!0,cancelAnimationFrame(l.rAF))},l.reset=function(){l.paused=!1,delete l.startTime,l.initialized=!1,l.initialize()&&(cancelAnimationFrame(l.rAF),l.printValue(l.startVal))}
11498,l.update=function(a){if(l.initialize()){if(a=Number(a),!u(a))return void(l.error="[CountUp] update() - new endVal is not a number: "+a);l.error="",a!==l.frameVal&&(cancelAnimationFrame(l.rAF),l.paused=!1,delete l.startTime,l.startVal=l.frameVal,l.endVal=a,l.countDown=l.startVal>l.endVal,l.rAF=requestAnimationFrame(l.count))}},l.initialize()&&l.printValue(l.startVal)};return e}); 11499 11500 11501/* squelettes/plugins/fidh/theme/js/jquery-migrate-1.4.1.min.js */ 11502 11503"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}a.migrateVersion="1.4.1";var f={};a.migrateWarnings=[],b.console&&b.console.log&&b.console.log("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion),a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("<input/>",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') might use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.find,s=a.parseJSON,t=/^\s*</,u=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,v=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,w=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(b,e,f){var g,h;return b&&"string"==typeof b&&!a.isPlainObject(e)&&(g=w.exec(a.trim(b)))&&g[0]&&(t.test(b)||d("$(html) HTML strings must start with '<' character"),g[3]&&d("$(html) HTML text after last tag is ignored"),"#"===g[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&e.context.nodeType&&(e=e.context),a.parseHTML)?q.call(this,a.parseHTML(g[2],e&&e.ownerDocument||e||document,!0),e,f):(h=q.apply(this,arguments),b&&b.selector!==c?(h.selector=b.selector,h.context=b.context):(h.selector="string"==typeof b?b:"",b&&(h.context=b.nodeType?b:e||document)),h)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&u.test(a))try{document.querySelector(a)}catch(c){a=a.replace(v,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),d("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){d("Attribute selector with '#' was not fixed: "+b[0])}}return r.apply(this,b)};var x;for(x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a.find[x]=r[x]);a.parseJSON=function(a){return a?s.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.boxModel=a.support.boxModel="CSS1Compat"===document.compatMode,e(a,"boxModel",a.boxModel,"jQuery.boxModel is deprecated"),e(
11503a.support,"boxModel",a.support.boxModel,"jQuery.support.boxModel is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){var f=a.fn.init.call(this,d,e,c);return f instanceof b?f:b(f)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.fn.size=function(){return d("jQuery.fn.size() is deprecated; use the .length property"),this.length};var y=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return y=!0,a=d.apply(this,arguments),y=!1,a})}),a.swap=function(a,b,c,e){var f,g,h={};y||d("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=c.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f},a.ajaxSetup({converters:{"text json":a.parseJSON}});var z=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?z.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var A=/\/(java|ecma)script/i;a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||A.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var B=a.event.add,C=a.event.remove,D=a.event.trigger,E=a.fn.toggle,F=a.fn.live,G=a.fn.die,H=a.fn.load,I="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",J=new RegExp("\\b(?:"+I+")\\b"),K=/(?:^|\s)hover(\.\S+|)\b/,L=function(b){return"string"!=typeof b||a.event.special.hover?b:(K.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(K,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&J.test(b)&&d("AJAX events should be attached to document: "+b),B.call(this,a,L(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){C.call(this,a,L(b)||"",c,d,e)},a.each(["load","unload","error"],function(b,c){a.fn[c]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===c&&"string"==typeof a[0]?H.apply(this,a):(d("jQuery.fn."+c+"() is deprecated"),a.splice(0,0,c),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return E.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g<e.length;)e[g++].guid=f;return this.click(h)},a.fn.live=function(b,c,e){return d("jQuery.fn.live() is deprecated"),F?F.apply(this,arguments):(a(this.context).on(b,this.selector,c,e),this)},a.fn.die=function(b,c){return d("jQuery.fn.die() is deprecated"),G?G.apply(this,arguments):(a(this.context).off(b,this.selector||"**",c),this)},a.event.trigger=function(a,b,c,e){return c||J.test(a)||d("Global events are undocumented and deprecated"),D.call(this,a,b,c||document,e)},a.each(I.split("|"),function(b,c){a.event.special[c]={setup:function(){var b=this;return b!==document&&(a.event.add(document,c+"."+a.guid,function(){a.event.trigger(c,Array.prototype.slice.call(arguments,1),b,!0)}),a._data(this,c,a.guid++)),!1},teardown:function(){return this!==document&&a.event.remove(document,c+"."+a._data(this,c)),!1}}}),a.event.special.ready={setup:function(){this===document&&d("'ready' event is deprecated")}};var M=a.fn.andSelf||a.fn.addBack,N=a.fn.find;if(a.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),M.apply(this,arguments)},a.fn.find=function(a){var b=N.apply(this,arguments);return b.context=this.context,b.selector=this.selector?this.selector+" "+a:a,b},a.Callbacks){var O=a.Deferred,P=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var c=O(),e=c.promise();return c.pipe=e.pipe=function(){var b=arguments;return d("deferred.pipe() is deprecated"),a.Deferred(function(d){a.each(P,function(f,g){var h=a.isFunction(b[f])&&b[f];c[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(d.resolve).fail(d.reject).progress(d.notify):d[g[0]+"With"](this===e?d.promise():this,h?[b]:arguments)})}),b=null}).promise()},c.isResolved=function(){return d("deferred.isResolved is deprecated"),"resolved"===c.state()},c.isRejected=function(){return d("deferred.isRejected is deprecated"),"rejected"===c.state()},b&&b.call(c,c),c}}}(jQuery,window); 11504 11505 11506/* squelettes/plugins/fidh/theme/js/app.js */ 11507 11508var groupsToResize=['.call-to-action-info','.tabs-equal']; 11509var groupsToSquare=['.call-to-action-square'];
11510$(document).ready(function(){ 11511let newObserver=new IntersectionObserver(function(entries){ 11512if(entries[0].intersectionRatio===0) 11513document.querySelector("#header").classList.add("header--sticky"); 11514else if(entries[0].intersectionRatio===1) 11515document.querySelector("#header").classList.remove("header--sticky"); 11516},{threshold:[0,1]}); 11517newObserver.observe(document.querySelector("#header0")); 11518$(document).foundation(); 11519if($('html').hasClass('rtl')){ 11520$('.slick').slick({ 11521autoplay:true, 11522autoplaySpeed:5500, 11523speed:1500, 11524arrows:true, 11525appendArrows:".slick-list", 11526pauseOnHover:true, 11527rtl:true 11528}); 11529} 11530else{ 11531$('.slick').slick({ 11532autoplay:true, 11533autoplaySpeed:5500, 11534speed:1500, 11535arrows:true, 11536pauseOnHover:true, 11537appendArrows:".slick-list" 11538}); 11539} 11540$(function(){ 11541var $sliders=$(".slick-theme"); 11542var $arrows=$('.arrows'); 11543$(".slick_container").each(function(){ 11544var $this=$(this); 11545var slick=$this.find($sliders).slick({ 11546appendArrows:$this.find($arrows), 11547autoplay:false, 11548autoplayspeed:5500, 11549speed:1500, 11550arrows:true, 11551pauseonhover:true, 11552slidestoshow:1, 11553slidestoscroll:1 11554}); 11555}); 11556}); 11557$('.top-bar-section .has-dropdown > .dropdown').width($(window).width()); 11558$('#world').mapster({ 11559fillColor:'CA7F00', 11560fillOpacity:1, 11561fill:true, 11562clickNavigate:true, 11563scaleMap:true, 11564showToolTip:true 11565}); 11566$('body').on('change','.form_select',function(e){ 11567e.preventDefault(); 11568window.location.href=$(this).val(); 11569}); 11570equalHeight(groupsToResize); 11571$('.email-contact').next('div').hide(); 11572$('body').on('click','.email-contact',function(e){ 11573e.preventDefault(); 11574$(this).next('div').slideToggle(); 11575}); 11576$('html, body').on('click','#credits_toggle',function(e){ 11577e.preventDefault(); 11578$(this).hide(); 11579$('#credits_div').fadeIn(); 11580return false; 11581}); 11582$('body').on('click','.toggler',function(e){ 11583e.preventDefault(); 11584$(''+$(this).attr('data-container')).css('height','auto'); 11585$(this).hide(); 11586return false; 11587}); 11588$('body').on('click','.hide_toggle',function(e){ 11589e.preventDefault(); 11590$('div#'+$(this).attr('data-div')).fadeToggle(); 11591return false; 11592}); 11593$('body').on('click','#image_bd_toggle',function(e){ 11594e.preventDefault(); 11595$('div#image_bd').css('height','auto'); 11596$('#image_bd_toggle').hide(); 11597return false; 11598}); 11599$('body').on('click','ul.tabs li a',function(){ 11600$('html, body').animate({ 11601scrollTop:$('.tabs-content').offset().top 11602},500); 11603}); 11604$('body').on('click','.load_more',function(e){ 11605e.preventDefault(); 11606return false; 11607}); 11608var articleHeight=$('#colonne1 > .inside').outerHeight(); 11609if(articleHeight>1400) 11610{ 11611$('.colonne1 .inside').addClass('cut'); 11612$('#colonne1 > .toggler').show(); 11613} 11614$('body').on('click','.page_article .spip_note',function(){ 11615var url=$(this).attr('href'); 11616var id=url.substring(url.indexOf('#')); 11617$('#colonne1 > .toggler').hide(); 11618$('#colonne1 .inside').css('height','auto'); 11619$('html, body').animate({ 11620scrollTop:$(id).offset().top-70 11621},500); 11622}); 11623$('body').on('click','.gotoslide',function(e){ 11624e.preventDefault(); 11625var articleNumber=$(this).attr('href'); 11626var themeNb=$(this).attr('theme'); 11627var theme='#slick-'+themeNb; 11628var slideIndex=$(articleNumber).parent().attr('data-slick-index'); 11629var speed=750; 11630$('html, body').animate({scrollTop:$(theme).offset().top},speed); 11631$(theme).slick('slickGoTo',slideIndex); 11632return false; 11633}); 11634$('body').on('click','.back-carte',function(e){ 11635e.preventDefault(); 11636var carte='.carte'; 11637var speed=750; 11638$('html, body').animate({scrollTop:$(carte).offset().top},speed); 11639return false; 11640}); 11641}); 11642$(window).load(function(){ 11643equalHeight(groupsToResize); 11644}); 11645$(window).resize(function(){ 11646equalHeight(groupsToResize); 11647}); 11648function equalHeight(groups){ 11649var tallest=0; 11650var arrayLength=groups.length; 11651for(var i=0;i<arrayLength;i++){ 11652$(groups[i]).css('height',""); 11653$(groups[i]).each(function(){ 11654var thisHeight=$(this).height(); 11655if(thisHeight>tallest){ 11656tallest=thisHeight; 11657} 11658}); 11659$(groups[i]).height(tallest); 11660tallest=0.0; 11661} 11662} 11663function makeItSquare(groups){ 11664var arrayLength=groups.length; 11665for(var i=0;i<arrayLength;i++){ 11666$(groups[i]).each(function(){ 11667$(this).height($(this).width); 11668}); 11669} 11670} 11671var tag=document.createElement('script'); 11672tag.src="https://www.youtube.com/iframe_api"; 11673var firstScriptTag=document.getElementsByTagName('script')[0]; 11674firstScriptTag.parentNode.insertBefore(tag,firstScriptTag); 11675var player; 11676function onYouTubeIframeAPIReady(){ 11677player=new YT.Player('player',{ 11678}); 11679} 11680function nextVideo(){ 11681player.nextVideo(); 11682} 11683function prevVideo(){ 11684player.previousVideo(); 11685} 11686$.fn.nnFullscreen=function(){ 11687$(this).height($(window).height()).width($(window).width()); 11688}; 11689$.fn.nnFullheight=function(){ 11690$(this).height($(window).height()); 11691}; 11692$.fn.nnheight=function(){ 11693$(this).each(function(index){ 11694$(this).height($(window).height()*parseInt($(this).attr('data-height'))/100); 11695}); 11696}; 11697$.fn.nnwidth=function(){ 11698$(this).each(function(index){ 11699$(this).width($(window).width()*parseInt($(this).attr('data-width'))/100); 11700}); 11701}; 11702$.fn.nnPheight=function(){ 11703$(this).each(function(index){ 11704$(this).height($(this).parents('.nn-PheightParent').height()); 11705}); 11706}; 11707$.fn.nnPwidth=function(){ 11708$(this).each(function(index){ 11709$(this).width($(this).parents('.nn-PwidthParent').get(0).offsetWidth); 11710}); 11711}; 11712$.fn.nnFullwidth=function(){ 11713$(this).width($(window).width()); 11714}; 11715$.fn.maxvid=function(){ 11716var fix=1.77; 11717if($(window).width()/$(window).height()<fix){ 11718var height=$(window).height()+40; 11719$(this) 11720.height(height) 11721.width((height*fix)) 11722.css('left',(($(window).width()-(height*fix))/2)) 11723.css('top',0); 11724$(this).children('.insideVideoWrapper').css('left',(($(window).width()-(height*fix))/2)); 11725}else{ 11726var width=$(window).width(); 11727$(this) 11728.width(width) 11729.height((width*fix)) 11730.css('top',(((parseInt($(window).height())-(width*fix))/2))) 11731.css('left',0); 11732$(this).children('.insideVideoWrapper').css('left',0); 11733} 11734}; 11735function nnFull(){ 11736$(".nn-fullscreen").nnFullscreen(); 11737$(".nn-fullheight").nnFullheight(); 11738$(".nn-fullwidth").nnFullwidth(); 11739$(".nn-maxvid").maxvid(); 11740$(".nn-height").nnheight(); 11741$(".nn-width").nnwidth(); 11742$(".nn-Pheight").nnPheight(); 11743$(".nn-Pwidth").nnPwidth(); 11744}; 11745$.fn.nnHCentering=function(){ 11746$(this).each(function(index){ 11747$(this).css('left','50%'); 11748$(this).css('margin-left',-($(this).width()/2)); 11749}); 11750}; 11751$.fn.nnVCentering=function(){ 11752$(this).each(function(index){ 11753$(this).css('top','50%'); 11754$(this).css('margin-top',-($(this).height()/2)); 11755}); 11756}; 11757$.fn.nnFullScreenCentering=function(){ 11758$(this).nnHCentering(); 11759$(this).nnVCentering(); 11760}; 11761function nnCentering(){ 11762$(".nn-h-centering").nnHCentering(); 11763$(".nn-v-centering").nnVCentering(); 11764$(".nn-full-centering").nnFullScreenCentering(); 11765} 11766function nnResize(){ 11767nnFull(); 11768nnCentering(); 11769} 11770$(document).ready(function(){ 11771nnResize(); 11772}); 11773$(window).load(function(){ 11774nnResize(); 11775}); 11776$(window).resize(function(){ 11777nnResize(); 11778}); 11779function printNumbers(numbersToPrint){ 11780$(".numfact").text(numbersToPrint.shift()); 11781if(numbersToPrint.length){ 11782setTimeout(function(){ 11783printNumbers(numbersToPrint); 11784},200) 11785} 11786} 11787function random_fact(facts) 11788{ 11789return facts[Math.floor(Math.random()*facts.length)]; 11790} 11791function newFact(facts){ 11792fact=random_fact(facts); 11793$(".factinside").show(); 11794var options={ 11795ââuseEasing:true, 11796ââuseGrouping:true, 11797ââseparator:',',
11798ââdecimal:'.', 11799}; 11800var demo=new CountUp('numfact',0,fact.num,0,2.5,options); 11801if(!demo.error){ 11802ââdemo.start(countfinish(fact)); 11803}else{ 11804ââconsole.error(demo.error); 11805} 11806} 11807function countfinish(fact){ 11808$(".valfact").html(fact.val); 11809$("#source").attr('href',fact.source); 11810$(".link").show(); 11811if(fact.plus!==''){ 11812$("#plus").attr('data-reveal-id','popup_'+fact.num); 11813$("#plus").show(); 11814} 11815else{ 11816$("#plus").hide(); 11817} 11818$("#twitterurl").attr('href', 11819$("#twitterurl").attr('href').replace(/\?text=[^&]+/,'?text='+encodeURIComponent(fact.val)) 11820); 11821$("#facebookurl").attr('href', 11822$("#facebookurl").attr('href').replace(/\?p\[summary\]=[^&]+/,'?p\[summary\]='+fact.val) 11823); 11824} 11825 11826 11827/* squelettes/plugins/fidh/theme/dflip/js/dflip.js */ 11828 11829'use strict'; 11830var DFLIP=DFLIP||{}; 11831var PRESENTATION=DFLIP; 11832(function dFlip(DFLIP,$){ 11833DFLIP.version="1.4.31"; 11834DFLIP.PAGE_MODE={SINGLE:1,DOUBLE:2,AUTO:null}; 11835DFLIP.SINGLE_PAGE_MODE={ZOOM:1,BOOKLET:2,AUTO:null}; 11836DFLIP.CONTROLSPOSITION={HIDDEN:'hide',TOP:'top',BOTTOM:'bottom'}; 11837DFLIP.DIRECTION={LTR:1,RTL:2}; 11838DFLIP.CORNERS={TL:"tl",TR:"tr",BL:"bl",BR:"br",L:"l",R:"r",NONE:null}; 11839DFLIP.SOURCE_TYPE={IMAGE:"image",PDF:"pdf",HTML:"html"}; 11840DFLIP.DISPLAY_TYPE={WEBGL:"3D",HTML:"2D"}; 11841DFLIP.PAGE_SIZE={AUTO:0,SINGLE:1,DOUBLEINTERNAL:2}; 11842var defaults=DFLIP.defaults={ 11843webgl:true, 11844webglShadow:true, 11845soundEnable:true, 11846height:'100%', 11847autoEnableOutline:false, 11848autoEnableThumbnail:false, 11849overwritePDFOutline:false, 11850enableDownload:true, 11851duration:800, 11852direction:DFLIP.DIRECTION.LTR, 11853pageMode:DFLIP.PAGE_MODE.AUTO, 11854singlePageMode:DFLIP.SINGLE_PAGE_MODE.AUTO, 11855backgroundColor:"#fff", 11856forceFit:true, 11857transparent:false, 11858hard:"none", 11859openPage:1, 11860annotationClass:"", 11861autoPlay:false, 11862autoPlayDuration:5000, 11863autoPlayStart:false, 11864maxTextureSize:1600, 11865minTextureSize:256, 11866rangeChunkSize:524288, 11867icons:{ 11868'altnext':'ti-angle-right', 11869'altprev':'ti-angle-left', 11870'next':'ti-angle-right', 11871'prev':'ti-angle-left', 11872'end':'ti-angle-double-right', 11873'start':'ti-angle-double-left', 11874'share':'ti-sharethis', 11875'help':'ti-help-alt', 11876'more':'ti-more-alt', 11877'download':'ti-download', 11878'zoomin':'ti-zoom-in', 11879'zoomout':'ti-zoom-out', 11880'fullscreen':'ti-fullscreen', 11881'fitscreen':'ti-arrows-corner', 11882'thumbnail':'ti-layout-grid2', 11883'outline':'ti-menu-alt', 11884'close':'ti-close', 11885'doublepage':'ti-book', 11886'singlepage':'ti-file', 11887'sound':'ti-volume', 11888'facebook':'ti-facebook', 11889'google':'ti-google', 11890'twitter':'ti-twitter-alt', 11891'mail':'ti-email', 11892'play':'ti-control-play', 11893'pause':'ti-control-pause' 11894}, 11895text:{ 11896toggleSound:"Turn on/off Sound", 11897toggleThumbnails:"Toggle Thumbnails", 11898toggleOutline:"Toggle Outline/Bookmark", 11899previousPage:"Previous Page", 11900nextPage:"Next Page", 11901toggleFullscreen:"Toggle Fullscreen", 11902zoomIn:"Zoom In", 11903zoomOut:"Zoom Out", 11904toggleHelp:"Toggle Help", 11905singlePageMode:"Single Page Mode", 11906doublePageMode:"Double Page Mode", 11907downloadPDFFile:"Download PDF File", 11908gotoFirstPage:"Goto First Page", 11909gotoLastPage:"Goto Last Page", 11910play:"Start AutoPlay", 11911pause:"Pause AutoPlay", 11912share:"Share" 11913}, 11914allControls:"altPrev,pageNumber,altNext,play,outline,thumbnail,zoomIn,zoomOut,fullScreen,share,download,more,pageMode,startPage,endPage,sound", 11915moreControls:"download,pageMode,startPage,endPage,sound", 11916hideControls:"", 11917controlsPosition:DFLIP.CONTROLSPOSITION.BOTTOM, 11918paddingTop:30, 11919paddingLeft:20, 11920paddingRight:20, 11921paddingBottom:30, 11922scrollWheel:true, 11923onCreate:function(flipBook){ 11924}, 11925onCreateUI:function(flipBook){ 11926}, 11927onFlip:function(flipBook){ 11928}, 11929beforeFlip:function(flipBook){ 11930}, 11931onReady:function(flipBook){ 11932}, 11933zoomRatio:1.5, 11934pageSize:DFLIP.PAGE_SIZE.AUTO, 11935pdfjsSrc:"js/libs/pdf.min.js", 11936pdfjsCompatibilitySrc:"js/libs/compatibility.js", 11937pdfjsWorkerSrc:"js/libs/pdf.worker.min.js", 11938threejsSrc:"js/libs/three.min.js", 11939mockupjsSrc:"js/libs/mockup.min.js", 11940soundFile:"sound/turn2.mp3", 11941imagesLocation:"images", 11942imageResourcesPath:"images/pdfjs/", 11943cMapUrl:"cmaps/", 11944enableDebugLog:false, 11945canvasToBlob:false, 11946enableAnnotation:true, 11947pdfRenderQuality:0.90, 11948textureLoadFallback:"blank", 11949stiffness:3, 11950backgroundImage:"", 11951pageRatio:null, 11952pixelRatio:window.devicePixelRatio||1, 11953thumbElement:'div', 11954spotLightIntensity:0.22, 11955ambientLightColor:"#fff", 11956ambientLightIntensity:0.8, 11957shadowOpacity:0.15 11958}; 11959var has3d='WebKitCSSMatrix'in window
11960||(document.body&&'MozPerspective'in document.body.style), 11961hasMouse='onmousedown'in window, 11962hasTouch='ontouchstart'in window; 11963var userAgent=navigator.userAgent; 11964var utils=DFLIP.utils={ 11965drag:{ 11966left:0, 11967right:1, 11968none:-1 11969}, 11970mouseEvents:(hasMouse) 11971?{type:"mouse",start:"mousedown",move:"mousemove",end:"mouseup"} 11972:{type:"touch",start:"touchstart",move:"touchmove",end:"touchend"}, 11973html:{ 11974div:"<div/>", 11975img:"<img/>", 11976a:"<a>", 11977input:"<input type='text'/>" 11978}, 11979toRad:function(deg){ 11980return deg*Math.PI/180; 11981}, 11982isset:function(check,fallback){ 11983return check==null?fallback:check; 11984}, 11985isnull:function(variable){ 11986return variable==null||variable==null; 11987}, 11988toDeg:function(rad){ 11989return rad*180/Math.PI; 11990}, 11991transition:function(hasTransition,duration){ 11992return hasTransition?duration/1000+"s ease-out":"0s none"; 11993}, 11994display:function(hasDisplay){ 11995return hasDisplay?"block":"none"; 11996}, 11997resetTranslate:function(){ 11998return translateStr(0,0); 11999}, 12000translateStr:function(x,y){ 12001return has3d?' translate3d('+x+'px,'+y+'px, 0px) ':' translate('+x+'px, '+y+'px) '; 12002}, 12003httpsCorrection:function(url){ 12004var location=window.location; 12005if(location.href.indexOf("https://")>-1&&url.indexOf(location.hostname)>-1){ 12006url=url.replace("http://","https://"); 12007} 12008return url; 12009}, 12010resetBoxShadow:function(){ 12011return"rgba(0, 0, 0, 0) 0px 0px 20px"; 12012}, 12013rotateStr:function(deg){ 12014return' rotateZ('+deg+'deg) '; 12015}, 12016bg:function(src){ 12017return'#fff'+bgImage(src); 12018}, 12019bgImage:function(src){ 12020return(src==null||src=="blank"?'':' url('+src+')'); 12021}, 12022src:function(src){ 12023return(src!=null?''+src+'':''); 12024}, 12025limitAt:function(x,min,max){ 12026return x<min?min:x>max?max:x; 12027}, 12028distOrigin:function(x,y){ 12029return Math.sqrt(Math.pow(x,2)+Math.pow(y,2)); 12030}, 12031distPoints:function(x1,y1,x2,y2){ 12032return Math.sqrt(Math.pow(x2-x1,2)+Math.pow(y2-y1,2)); 12033}, 12034calculateScale:function(startTouches,endTouches){ 12035var startDistance=distPoints(startTouches[0].x,startTouches[0].y,startTouches[1].x,startTouches[1].y), 12036endDistance=distPoints(endTouches[0].x,endTouches[0].y,endTouches[1].x,endTouches[1].y); 12037return endDistance/startDistance; 12038}, 12039getVectorAvg:function(vectors){ 12040return{ 12041x:vectors.map(function(v){ 12042return v.x; 12043}).reduce(utils.sum)/vectors.length, 12044y:vectors.map(function(v){ 12045return v.y; 12046}).reduce(utils.sum)/vectors.length 12047}; 12048}, 12049sum:function(a,b){ 12050return a+b; 12051}, 12052getTouches:function(event,position){ 12053position=position||{left:0,top:0}; 12054return Array.prototype.slice.call(event.touches).map(function(touch){ 12055return{ 12056x:touch.pageX-position.left, 12057y:touch.pageY-position.top 12058}; 12059}); 12060}, 12061angleByDistance:function(distance,fullWidth){ 12062var h=fullWidth/2; 12063var d=limitAt(distance,0,fullWidth); 12064return d<h 12065?toDeg(Math.asin(d/h)) 12066:90+toDeg(Math.asin((d-h)/h)); 12067}, 12068log:function(args){ 12069if(defaults.enableDebugLog==true&&window.console) 12070console.log(args); 12071}, 12072lowerPowerOfTwo:function(value){ 12073return Math.pow(2,Math.floor(Math.log(value)/Math.LN2)); 12074}, 12075nearestPowerOfTwo:function(value,max){ 12076return Math.min(max||2048,Math.pow(2,Math.ceil(Math.log(value)/Math.LN2))); 12077}, 12078zoomStops:function(value,zoomRatio,ceil,min,max){ 12079if(min==null)min=256; 12080if(max==null)max=2048; 12081var factor=Math.log(value/min)/Math.log(zoomRatio); 12082return min*Math.pow(zoomRatio,ceil==null?Math.round(factor):(ceil==true?Math.ceil(factor) 12083:Math.floor(factor))); 12084}, 12085extendOptions:function(defaults,options){ 12086return $.extend(true,{},defaults,options); 12087}, 12088getFullscreenElement:function(){ 12089return document.fullscreenElement 12090||document.mozFullScreenElement 12091||document.webkitFullscreenElement 12092||document.msFullscreenElement 12093}, 12094hasFullscreenEnabled:function(){ 12095return document.fullscreenEnabled 12096||document.mozFullScreenEnabled 12097||document.webkitFullscreenEnabled 12098||document.msFullscreenEnabled 12099}, 12100getBasePage:function(pageNumber){ 12101return Math.floor(pageNumber/2)*2; 12102}, 12103loadResources:function loadResources(resourceTag,src,callback){ 12104var doc=document, 12105element=doc.createElement(resourceTag), 12106refElement=doc.getElementsByTagName(resourceTag)[0]; 12107element.async=true; 12108if(callback){ 12109element.addEventListener('load',function(e){ 12110callback(null,e); 12111},false); 12112} 12113element.src=src; 12114refElement.parentNode.insertBefore(element,refElement); 12115}, 12116getScript:function(source,callback,errorCallback){ 12117var script=document.createElement('script'); 12118var prior=document.body.getElementsByTagName('script')[0]; 12119script.async=1;
12120script.setAttribute("data-cfasync",false); 12121if(prior!=null){ 12122prior.parentNode.insertBefore(script,prior); 12123prior=null; 12124} 12125else{ 12126document.body.appendChild(script); 12127} 12128function load(_,isAbort){ 12129if(script!=null){ 12130if(isAbort||!script.readyState||/loaded|complete/.test(script.readyState)){ 12131script.onload=script.onreadystatechange=null; 12132script=null; 12133script=null; 12134if(!isAbort){ 12135if(callback)callback(); 12136callback=null; 12137errorCallback=null; 12138} 12139} 12140} 12141} 12142script.addEventListener("load",load,false); 12143script.addEventListener("readystatechange",load,false); 12144script.addEventListener("complete",load,false); 12145if(errorCallback){ 12146script.addEventListener("error",errorCallback,false); 12147} 12148script.src=source+(prefix.dom=="MS"?("?"+Math.random(1)):""); 12149}, 12150isHardPage:function(config,pageNumber,pageCount,isBooklet){ 12151if(config!=null){ 12152if(config=="cover"){ 12153return pageNumber==0||(isBooklet&&pageNumber==1) 12154||pageNumber==(Math.floor(pageCount/(isBooklet?1:2))-(isBooklet?0:1)); 12155 12156} 12157else if(config=="all"){ 12158return true; 12159} 12160else{ 12161var baseTest=(","+config+",").indexOf(","+(pageNumber*2+1)+",")>-1; 12162var nextTest=(","+config+",").indexOf(","+(pageNumber*2+2)+",")>-1; 12163return baseTest||nextTest; 12164} 12165} 12166return false; 12167}, 12168fixMouseEvent:function(event){ 12169if(event){ 12170var originalEvent=event.originalEvent||event; 12171if(originalEvent.changedTouches&&originalEvent.changedTouches.length>0){ 12172var _event=$.event.fix(event); 12173var touch=originalEvent.changedTouches[0]; 12174_event.clientX=touch.clientX; 12175_event.clientY=touch.clientY; 12176_event.pageX=touch.pageX; 12177_event.touches=originalEvent.touches; 12178_event.pageY=touch.pageY; 12179_event.movementX=touch.movementX; 12180_event.movementY=touch.movementY; 12181return _event; 12182} 12183else{ 12184return event; 12185} 12186} 12187else{ 12188return event; 12189} 12190}, 12191hasWebgl:(function(){ 12192try{ 12193var canvas=document.createElement('canvas'); 12194return!!(window.WebGLRenderingContext&&(canvas.getContext('webgl')||canvas.getContext('experimental-webgl'))); 12195}catch(e){ 12196return false; 12197} 12198})(), 12199isBookletMode:function(book){ 12200return book.pageMode==DFLIP.PAGE_MODE.SINGLE&&book.singlePageMode==DFLIP.SINGLE_PAGE_MODE.BOOKLET 12201}, 12202isRTLMode:function(book){ 12203return book.direction==DFLIP.DIRECTION.RTL 12204}, 12205isMobile:(function(){ 12206var check=false; 12207(function(a){ 12208if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check=true 12209})(userAgent||navigator.vendor||window.opera); 12210return check; 12211})(), 12212isIOS:/(iPad|iPhone|iPod)/g.test(userAgent), 12213isSafari:/constructor/i.test(window.HTMLElement)||(function(p){ 12214return p.toString()==="[object SafariRemoteNotification]"; 12215})(!window['safari']||safari.pushNotification), 12216prefix:(function(){ 12217var styles=window.getComputedStyle(document.documentElement,''), 12218pre=(Array.prototype.slice 12219.call(styles) 12220.join('') 12221.match(/-(moz|webkit|ms)-/))[1], 12222dom=('WebKit|Moz|MS').match(new RegExp('('+pre+')','i'))[1]; 12223return{ 12224dom:dom, 12225lowercase:pre, 12226css:'-'+pre+'-', 12227js:pre[0].toUpperCase()+pre.substr(1) 12228}; 12229})(), 12230__extends:function(child,parent){ 12231for(var key in parent) 12232if(parent.hasOwnProperty(key))child[key]=parent[key]; 12233function Ctor(){ 12234this.constructor=child; 12235} 12236Ctor.prototype=parent.prototype; 12237child.prototype=new Ctor(); 12238child.__super=parent.prototype; 12239return child; 12240} 12241}; 12242var SOURCE_TYPE=DFLIP.SOURCE_TYPE, 12243DISPLAY_TYPE=DFLIP.DISPLAY_TYPE, 12244drag=utils.drag, 12245mouseEvents=utils.mouseEvents, 12246html=utils.html, 12247isset=utils.isset, 12248isnull=utils.isnull, 12249toRad=utils.toRad, 12250toDeg=utils.toDeg, 12251transition=utils.transition, 12252translateStr=utils.translateStr, 12253resetBoxShadow=utils.resetBoxShadow, 12254rotateStr=utils.rotateStr, 12255bg=utils.bg, 12256bgImage=utils.bgImage, 12257src=utils.src, 12258limitAt=utils.limitAt,
12259distOrigin=utils.distOrigin, 12260distPoints=utils.distPoints, 12261angleByDistance=utils.angleByDistance, 12262log=utils.log, 12263nearestPowerOfTwo=utils.nearestPowerOfTwo, 12264extendOptions=utils.extendOptions, 12265getBasePage=utils.getBasePage, 12266getScript=utils.getScript, 12267fixMouseEvent=utils.fixMouseEvent, 12268prefix=utils.prefix, 12269isBookletMode=utils.isBookletMode, 12270isRTLMode=utils.isRTLMode, 12271isMobile=utils.isMobile, 12272hasWebgl=utils.hasWebgl, 12273isSafari=utils.isSafari, 12274isIOS=utils.isIOS, 12275__extends=utils.__extends; 12276(function checkSetPresenceInImageData(){ 12277if(window.CanvasPixelArray){ 12278if(typeof window.CanvasPixelArray.prototype.set!=='function'){ 12279window.CanvasPixelArray.prototype.set=function(arr){ 12280for(var i=0,ii=this.length;i<ii;i++){ 12281this[i]=arr[i]; 12282} 12283}; 12284} 12285}else{ 12286var polyfill=false,versionMatch; 12287if(isSafari){ 12288versionMatch=userAgent.match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//); 12289polyfill=versionMatch&&parseInt(versionMatch[1])<6; 12290} 12291if(polyfill){ 12292var contextPrototype=window.CanvasRenderingContext2D.prototype; 12293var createImageData=contextPrototype.createImageData; 12294contextPrototype.createImageData=function(w,h){ 12295var imageData=createImageData.call(this,w,h); 12296imageData.data.set=function(arr){ 12297for(var i=0,ii=this.length;i<ii;i++){ 12298this[i]=arr[i]; 12299} 12300}; 12301return imageData; 12302}; 12303contextPrototype=null; 12304} 12305} 12306})(); 12307(function checkRequestAnimationFrame(){ 12308function fakeRequestAnimationFrame(callback){ 12309window.setTimeout(callback,20); 12310} 12311if('requestAnimationFrame'in window){ 12312return; 12313} 12314window.requestAnimationFrame= 12315window.mozRequestAnimationFrame|| 12316window.webkitRequestAnimationFrame|| 12317fakeRequestAnimationFrame; 12318})(); 12319(function checkTypedArrayCompatibility(){ 12320if(typeof Uint8Array!=='undefined'){ 12321if(typeof Uint8Array.prototype.subarray==='undefined'){ 12322Uint8Array.prototype.subarray=function subarray(start,end){ 12323return new Uint8Array(this.slice(start,end)); 12324}; 12325Float32Array.prototype.subarray=function subarray(start,end){ 12326return new Float32Array(this.slice(start,end)); 12327}; 12328} 12329if(typeof Float64Array==='undefined'){ 12330window.Float64Array=Float32Array; 12331} 12332return; 12333} 12334function subarray(start,end){ 12335return new TypedArray(this.slice(start,end)); 12336} 12337function setArrayOffset(array,offset){ 12338if(arguments.length<2){ 12339offset=0; 12340} 12341for(var i=0,n=array.length;i<n;++i,++offset){ 12342this[offset]=array[i]&0xFF; 12343} 12344} 12345function TypedArray(arg1){ 12346var result,i,n; 12347if(typeof arg1==='number'){ 12348result=[]; 12349for(i=0;i<arg1;++i){ 12350result[i]=0; 12351} 12352}else if('slice'in arg1){ 12353result=arg1.slice(0); 12354}else{ 12355result=[]; 12356for(i=0,n=arg1.length;i<n;++i){ 12357result[i]=arg1[i]; 12358} 12359} 12360result.subarray=subarray; 12361result.buffer=result; 12362result.byteLength=result.length; 12363result.set=setArrayOffset; 12364if(typeof arg1==='object'&&arg1.buffer){ 12365result.buffer=arg1.buffer; 12366} 12367return result; 12368} 12369window.Uint8Array=TypedArray; 12370window.Int8Array=TypedArray; 12371window.Uint32Array=TypedArray; 12372window.Int32Array=TypedArray; 12373window.Uint16Array=TypedArray; 12374window.Float32Array=TypedArray; 12375window.Float64Array=TypedArray; 12376})(); 12377var extendDFlipOptions=function(options){ 12378return $.extend(true,{},defaults,options); 12379}; 12380var createUI=function(container,object){ 12381var uiClass="df-ui"; 12382var wrapperClass="df-ui-wrapper"; 12383var buttonClass=uiClass+"-"+"btn"; 12384var ui=object.ui=$(html.div,{'class':uiClass}); 12385var options=object.options; 12386ui.dispose=function(){ 12387container.find("."+buttonClass).each(function(){ 12388$(this).off(); 12389}); 12390help.off(); 12391next.off(); 12392prev.off(); 12393play.off(); 12394zoom.off(); 12395zoomIn.off(); 12396zoomOut.off(); 12397page.off(); 12398sound.off(); 12399more.off(); 12400fullScreen.off(); 12401fit.off(); 12402share.off(); 12403start.off(); 12404end.off(); 12405pageModeButton.off(); 12406altPrev.off(); 12407altNext.off(); 12408thumbnail.off(); 12409outline.off(); 12410controls.remove(); 12411sizeControls.remove(); 12412prev.remove(); 12413next.remove(); 12414zoom.remove(); 12415if(ui.shareBox){ 12416if(ui.shareBox.dispose) 12417ui.shareBox.dispose(); 12418ui.shareBox=null; 12419} 12420document.removeEventListener('keyup',onKeyUp,false); 12421window.removeEventListener('click',closeMoreOptions,false); 12422ui.update=null; 12423object=null; 12424}; 12425var validPage=function(pageNumber){ 12426if(isNaN(pageNumber))pageNumber=object.target._activePage; 12427else if(pageNumber<1)pageNumber=1; 12428else if(pageNumber>
12428object.target.pageCount)pageNumber=object.target.pageCount; 12429return pageNumber; 12430}; 12431var next=ui.next=$(html.div,{ 12432class:buttonClass+" "+uiClass+"-next "+options.icons['next'], 12433title:options.text.nextPage, 12434html:"<span>"+options.text.nextPage+"</span>" 12435}).on("click",function(){ 12436object.next(); 12437}); 12438var prev=ui.prev=$(html.div,{ 12439class:buttonClass+" "+uiClass+"-prev "+options.icons['prev'], 12440title:options.text.previousPage, 12441html:"<span>"+options.text.previousPage+"</span>" 12442}).on("click",function(){ 12443object.prev(); 12444}); 12445var play=$(html.div,{ 12446class:buttonClass+" "+uiClass+"-play "+options.icons['play'], 12447title:options.text.play, 12448html:"<span>"+options.text.play+"</span>" 12449}).on("click",function(){ 12450var el=$(this); 12451object.setAutoPlay(!el.hasClass(options.icons['pause'])); 12452}); 12453if(options.autoPlay==true){ 12454ui.play=play; 12455object.setAutoPlay(options.autoPlayStart); 12456} 12457var zoom=$(html.div,{ 12458class:wrapperClass+" "+uiClass+"-zoom" 12459}); 12460var zoomIn=ui.zoomIn=$(html.div,{ 12461class:buttonClass+" "+uiClass+"-zoomin "+options.icons['zoomin'], 12462title:options.text.zoomIn, 12463html:"<span>"+options.text.zoomIn+"</span>" 12464}).on("click",function(){ 12465object.zoom(1); 12466ui.update(); 12467if(object.target.startPoint&&object.target.pan) 12468object.target.pan(object.target.startPoint); 12469}); 12470var zoomOut=ui.zoomOut=$(html.div,{ 12471class:buttonClass+" "+uiClass+"-zoomout "+options.icons['zoomout'], 12472title:options.text.zoomOut, 12473html:"<span>"+options.text.zoomOut+"</span>" 12474}).on("click",function(){ 12475object.zoom(-1); 12476ui.update(); 12477if(object.target.startPoint&&object.target.pan) 12478object.target.pan(object.target.startPoint); 12479}); 12480zoom.append(zoomIn).append(zoomOut); 12481var page=ui.pageNumber=$(html.div,{ 12482class:buttonClass+" "+uiClass+"-page", 12483}).on("change",function(){ 12484var pageNumber=parseInt((ui.pageInput.val()),10); 12485pageNumber=validPage(pageNumber); 12486object.gotoPage(pageNumber); 12487}).on("keyup",function(event){ 12488if(event.keyCode==13){ 12489var pageNumber=parseInt((ui.pageInput.val()),10); 12490pageNumber=validPage(pageNumber); 12491if(pageNumber!==validPage(object.target._activePage||object._activePage)) 12492object.gotoPage(pageNumber); 12493} 12494}); 12495ui.pageInput=$('<input id="df_book_page_number" type="text"/>').appendTo(page); 12496ui.pageLabel=$('<label for="df_book_page_number"/>').appendTo(page); 12497var sizeControls=$(html.div,{ 12498class:wrapperClass+" "+uiClass+"-size" 12499}); 12500var help=$(html.div,{ 12501class:buttonClass+" "+uiClass+"-help "+options.icons['help'], 12502title:options.text.toggleHelp, 12503html:"<span>"+options.text.toggleHelp+"</span>" 12504}).on("click",function(){ 12505}); 12506var sound=ui.sound=$(html.div,{ 12507class:buttonClass+" "+uiClass+"-sound "+options.icons['sound'], 12508title:options.text.toggleSound, 12509html:"<span>"+options.text.toggleSound+"</span>" 12510}).on("click",function(){ 12511options.soundEnable=!options.soundEnable; 12512ui.updateSound(); 12513}); 12514ui.updateSound=function(){ 12515if(options.soundEnable==false||options.soundEnable=='false') 12516sound.addClass("disabled"); 12517else 12518sound.removeClass("disabled"); 12519}; 12520ui.updateSound(); 12521var more=ui.more=$(html.div,{ 12522class:buttonClass+" "+uiClass+"-more "+options.icons['more'] 12523}).on("click",function(event){ 12524if(!more.hasClass("df-active")){ 12525$(this).addClass("df-active"); 12526event.stopPropagation(); 12527} 12528}); 12529function closeMoreOptions(event){ 12530more.removeClass("df-active"); 12531} 12532window.addEventListener('click',closeMoreOptions,false); 12533var moreContainer=$(html.div,{ 12534class:"more-container" 12535}); 12536more.append(moreContainer); 12537if(typeof options.source=='string'&&options.enableDownload==true){ 12538var downloadClass=buttonClass+" "+uiClass+"-download "+options.icons['download']; 12539var download=ui.download=$('<a download target="_blank" class="'+downloadClass+'"><span>'+options.text.downloadPDFFile+'</span></a>'); 12540download.attr("href",options.source).attr("title",options.text.downloadPDFFile); 12541} 12542var fullscreenEnabled=utils.hasFullscreenEnabled(); 12543if(!fullscreenEnabled){ 12544container.addClass("df-custom-fullscreen"); 12545} 12546ui.switchFullscreen=function(){ 12547var fullscreenElement=utils.getFullscreenElement(); 12548var container=object.container[0]; 12549if(ui.isFullscreen!=true){ 12550object.container.addClass("df-fullscreen"); 12551if(container.requestFullscreen){ 12552container.requestFullscreen(); 12553}else if(container.msRequestFullscreen){ 12554container.msRequestFullscreen(); 12555}else if(container.mozRequestFullScreen){ 12556container.mozRequestFullScreen(); 12557}else if(container.webkitRequestFullscreen){ 12558container.webkitRequestFullscreen(); 12559} 12560ui.isFullscreen=true 12561} 12562else{ 12563object.container.removeClass("df-fullscreen"); 12564ui.isFullscreen=false; 12565if(document.exitFullscreen){ 12566document.exitFullscreen(); 12567}else if(document.msExitFullscreen){ 12568document.msExitFullscreen(); 12569}else if(document.mozCancelFullScreen){ 12570document.mozCancelFullScreen(); 12571}else if(document.webkitExitFullscreen){ 12572document.webkitExitFullscreen(); 12573} 12574} 12575if(!utils.hasFullscreenEnabled()){ 12576setTimeout(function(){ 12577object.resize(); 12578},50); 12579} 12580}; 12581var fullScreen=ui.fullScreen=$(html.div,{ 12582class:buttonClass+" "+uiClass+"-fullscreen "+options.icons['fullscreen'], 12583title:options.text.toggleFullscreen, 12584html:"<span>"+options.text.toggleFullscreen+"</span>" 12585}).on("click",ui.switchFullscreen); 12586var fit=ui.fit=$(html.div,{ 12587class:buttonClass+" "+uiClass+"-fit "+options.icons['fitscreen'] 12588}).on("click",function(){ 12589$(this).toggleClass("df-button-fit-active"); 12590}); 12591sizeControls.append(fullScreen); 12592var controls=$(html.div,{
12593class:wrapperClass+" "+uiClass+"-controls" 12594}); 12595var shareBox=ui.shareBox=new DFLIP.Share(container,options); 12596var share=ui.share=$(html.div,{ 12597class:buttonClass+" "+uiClass+"-share "+options.icons['share'], 12598title:options.text.share, 12599html:"<span>"+options.text.share+"</span>" 12600}).on("click",function(event){ 12601if(ui.shareBox.isOpen==true) 12602ui.shareBox.close(); 12603else{ 12604ui.shareBox.update(object.getURLHash()); 12605ui.shareBox.show(); 12606} 12607}); 12608var start=ui.startPage=$(html.div,{ 12609class:buttonClass+" "+uiClass+"-start "+options.icons['start'], 12610title:options.text.gotoFirstPage, 12611html:"<span>"+options.text.gotoFirstPage+"</span>" 12612}).on("click",function(){ 12613object.start(); 12614}); 12615var end=ui.endPage=$(html.div,{ 12616class:buttonClass+" "+uiClass+"-end "+options.icons['end'], 12617title:options.text.gotoLastPage, 12618html:"<span>"+options.text.gotoLastPage+"</span>" 12619}).on("click",function(){ 12620object.end(); 12621}); 12622var pageModeButton=ui.pageMode=$(html.div,{ 12623class:buttonClass+" "+uiClass+"-pagemode "+options.icons['singlepage'], 12624html:"<span>"+options.text.singlePageMode+"</span>" 12625}).on("click",function(){ 12626var el=$(this); 12627object.setPageMode(!el.hasClass(options.icons['doublepage'])); 12628}); 12629object.setPageMode(object.target.pageMode==DFLIP.PAGE_MODE.SINGLE) 12630var altPrev=ui.altPrev=$(html.div,{ 12631class:buttonClass+" "+uiClass+"-prev"+" "+uiClass+"-alt "+options.icons['prev'], 12632title:options.text.previousPage, 12633html:"<span>"+options.text.previousPage+"</span>" 12634}).on("click",function(){ 12635object.prev(); 12636}); 12637var altNext=ui.altNext=$(html.div,{ 12638class:buttonClass+" "+uiClass+"-next"+" "+uiClass+"-alt "+options.icons['next'], 12639title:options.text.nextPage, 12640html:"<span>"+options.text.nextPage+"</span>" 12641}).on("click",function(){ 12642object.next(); 12643}); 12644var thumbnail=ui.thumbnail=$(html.div,{ 12645class:buttonClass+" "+uiClass+"-thumbnail "+options.icons['thumbnail'], 12646title:options.text.toggleThumbnails, 12647html:"<span>"+options.text.toggleThumbnails+"</span>" 12648}).on("click",function(){ 12649var $this=$(this); 12650if(object.target.thumbContainer){ 12651var thumbContainer=object.target.thumbContainer; 12652thumbContainer.toggleClass("df-sidemenu-visible"); 12653$this.toggleClass("df-active"); 12654} 12655else{ 12656object.contentProvider.initThumbs(); 12657$this.toggleClass("df-active"); 12658} 12659if($this.hasClass("df-active")){ 12660$this.siblings(".df-active").trigger("click"); 12661} 12662ui.update(true); 12663}); 12664var outline=ui.outline=$(html.div,{ 12665class:buttonClass+" "+uiClass+"-outline "+options.icons['outline'], 12666title:options.text.toggleOutline, 12667html:"<span>"+options.text.toggleOutline+"</span>" 12668}).on("click",function(){ 12669var $this=$(this); 12670if(object.target.outlineContainer){ 12671var outlineContainer=object.target.outlineContainer; 12672$this.toggleClass("df-active"); 12673outlineContainer.toggleClass("df-sidemenu-visible"); 12674if($this.hasClass("df-active")){ 12675$this.siblings(".df-active").trigger("click"); 12676} 12677ui.update(true); 12678} 12679}); 12680var allControls=options.allControls.replace(/ /g,'').split(','), 12681moreControls=","+options.moreControls.replace(/ /g,'')+",", 12682hideControls=","+options.hideControls.replace(/ /g,'')+","; 12683var moreControlsArray=moreControls.split(','); 12684for(var controlCount=0;controlCount<allControls.length;controlCount++){ 12685var controlName=allControls[controlCount]; 12686if(hideControls.indexOf(","+controlName+",")<0){ 12687var control=ui[controlName]; 12688if(control!=null){ 12689if(moreControls.indexOf(","+controlName+",")>-1&&controlName!=='more'&&controlName!=='pageNumber'){ 12690moreContainer.append(control); 12691} 12692else{ 12693controls.append(control); 12694} 12695} 12696} 12697} 12698container.append(controls).append(prev).append(next).append(zoom); 12699var ctrlDown=false,shiftDown=false,altDown=false; 12700var shiftKey=16,ctrlKey=17,altKey=18,sKey=83,vKey=86,cKey=67,eKey=69,gKey=71,nKey=78, 12701oKey=79,deleteKey=46,rightKey=39,leftKey=37,escKey=27; 12702document.addEventListener('keyup',onKeyUp,false); 12703function onKeyUp(event){ 12704switch(event.keyCode){ 12705case escKey: 12706if(ui.isFullscreen==true)ui.fullScreen.trigger("click"); 12707break; 12708case shiftKey: 12709shiftDown=false; 12710break; 12711case ctrlKey: 12712ctrlDown=false; 12713break; 12714case altKey: 12715altDown=false; 12716break; 12717case leftKey: 12718object.prev(); 12719break; 12720case rightKey: 12721object.next(); 12722break; 12723default: 12724break; 12725} 12726} 12727ui.update=function(resize){ 12728log("ui update"); 12729var target=object.target; 12730var pageNumber=validPage(target._activePage||object._activePage);
12731var pageCount=target.pageCount||object.pageCount; 12732var isRTL=target.direction==DFLIP.DIRECTION.RTL, 12733isStart=(pageNumber==1||pageNumber==0), 12734isEnd=pageNumber==pageCount; 12735ui.next.show(); 12736ui.prev.show(); 12737ui.altNext.removeClass("disabled"); 12738ui.altPrev.removeClass("disabled"); 12739if((isStart&&!isRTL)||(isEnd&&isRTL)){ 12740ui.prev.hide(); 12741ui.altPrev.addClass("disabled"); 12742} 12743if((isEnd&&!isRTL)||(isStart&&isRTL)){ 12744ui.next.hide(); 12745ui.altNext.addClass("disabled"); 12746} 12747ui.pageInput.val(pageNumber); 12748ui.pageLabel.html((pageNumber)+"/"+pageCount); 12749if(container.find(".df-sidemenu-visible").length>0){ 12750container.addClass("df-sidemenu-open"); 12751} 12752else{ 12753container.removeClass("df-sidemenu-open"); 12754} 12755if(resize==true) 12756object.resize(); 12757if(target.contentProvider.zoomScale==target.contentProvider.maxZoom){ 12758ui.zoomIn.addClass("disabled"); 12759} 12760else{ 12761ui.zoomIn.removeClass("disabled"); 12762} 12763if(target.contentProvider.zoomScale==1){ 12764ui.zoomOut.addClass("disabled"); 12765} 12766else{ 12767ui.zoomOut.removeClass("disabled"); 12768} 12769}; 12770if(object.target!=null){ 12771object.target.ui=ui; 12772} 12773if(options.onCreateUI!=null) 12774options.onCreateUI(object); 12775} 12776; 12777var PreviewStage=null; 12778function RegisterMockupObjects(){ 12779PreviewStage=(function(_super){ 12780__extends(PreviewStage,_super); 12781function PreviewStage(parameters){ 12782parameters=parameters||{}; 12783var _this=this; 12784_super.call(this,parameters); 12785_this.options=parameters; 12786_this.canvas=$(_this.renderer.domElement).addClass("df-3dcanvas"); 12787_this.container=parameters.container; 12788_this.container.append(_this.canvas); 12789_this.type="PreviewStage"; 12790_this.mouse=new THREE.Vector2(); 12791_this.raycaster=new THREE.Raycaster(); 12792_this.camera.position.set(0,20,600); 12793_this.camera.lookAt(new THREE.Vector3(0,0,0)); 12794_this.spotLight.position.set(-220,330,550); 12795_this.spotLight.castShadow=isMobile?false:parameters.webglShadow; 12796if(_this.spotLight.shadow){ 12797_this.spotLight.shadow.bias=-0.0008; 12798} 12799_this.spotLight.intensity=isset(parameters.spotLightIntensity,defaults.spotLightIntensity); 12800_this.ambientLight.color=new THREE.Color(isset(parameters.ambientLightColor,defaults.ambientLightColor)); 12801_this.ambientLight.intensity=isset(parameters.ambientLightIntensity,defaults.ambientLightIntensity); 12802var material=new THREE.ShadowMaterial(); 12803material.opacity=isset(parameters.shadowOpacity,defaults.shadowOpacity); 12804_this.ground.material=material; 12805_this.ground.position.z=-2; 12806_this.orbitControl.maxAzimuthAngle=0.4; 12807_this.orbitControl.minAzimuthAngle=-0.4; 12808_this.orbitControl.minPolarAngle=1.4; 12809_this.orbitControl.maxPolarAngle=2.2; 12810_this.orbitControl.mouseButtons.ORBIT=THREE.MOUSE.RIGHT; 12811_this.orbitControl.mouseButtons.PAN=-1; 12812_this.orbitControl.maxDistance=5000; 12813_this.orbitControl.minDistance=50; 12814_this.orbitControl.noZoom=true; 12815_this.selectiveRendering=true; 12816_this.orbitControl.zoomSpeed=5; 12817_this.orbitControl.keyPanSpeed=0; 12818_this.orbitControl.center.set(0,0,0); 12819_this.orbitControl.update(); 12820_this.swipe_threshold=isMobile?15:20; 12821var cssRenderer=_this.cssRenderer=new THREE.CSS3DRenderer(); 12822$(cssRenderer.domElement).css({ 12823position:"absolute", 12824top:0, 12825pointerEvents:"none" 12826}).addClass("df-3dcanvas df-csscanvas"); 12827_this.container[0].appendChild(cssRenderer.domElement); 12828var cssScene=_this.cssScene=new THREE.Scene(); 12829var divLeftDOM=document.createElement("div"); 12830divLeftDOM.className="df-page-content df-page-content-left"; 12831var divRightDOM=document.createElement("div"); 12832divRightDOM.className="df-page-content df-page-content-right"; 12833var divLeft=cssScene.divLeft=new THREE.CSS3DObject(divLeftDOM); 12834var divRight=cssScene.divRight=new THREE.CSS3DObject(divRightDOM); 12835cssScene.add(divLeft); 12836cssScene.add(divRight); 12837_this.resizeCallback=function(){ 12838cssRenderer.setSize(_this.canvas.width(),_this.canvas.height()); 12839}; 12840function requestRender(){ 12841_this.renderRequestPending=true; 12842} 12843window.addEventListener(mouseEvents.move,requestRender,false); 12844window.addEventListener('keyup',requestRender,false); 12845_this.dispose=function(){ 12846_this.clearChild(); 12847_this.render(); 12848window.removeEventListener(mouseEvents.move,requestRender,false); 12849if(_this.options.scrollWheel==true){ 12850_this.renderer.domElement.removeEventListener('mousewheel',onMouseWheel,false); 12851_this.renderer.domElement.removeEventListener('DOMMouseScroll',onMouseWheel,false); 12852} 12853window.removeEventListener('keyup',requestRender,false); 12854_this.renderer.domElement.removeEventListener("mousemove",editor_mouseMove,false); 12855_this.renderer.domElement.removeEventListener("touchmove",editor_mouseMove,false); 12856_this.renderer.domElement.removeEventListener("mousedown",editor_mouseDown,false); 12857_this.renderer.domElement.removeEventListener("touchstart",editor_mouseDown,false); 12858_this.renderer.domElement.removeEventListener("mouseup",editor_mouseUp,false); 12859_this.renderer.domElement.removeEventListener("touchend",editor_mouseUp,false); 12860_this.canvas.remove(); 12861cssRenderer.domElement.parentNode.removeChild(cssRenderer.domElement); 12862cssRenderer=null; 12863_this.renderCallback=null; 12864_this.renderCallback=null; 12865_this.orbitControl.dispose(); 12866_this.orbitControl=null; 12867_this.renderer.dispose(); 12868_this.cancelRAF(); 12869}; 12870_this.renderCallback=function(){ 12871if(TWEEN.getAll().length>0) 12872_this.renderRequestPending=true; 12873TWEEN.update(); 12874cssRenderer.render(cssScene,_this.camera) 12875}; 12876var onMouseWheel=function(event){ 12877var delta=0; 12878if(event.wheelDelta!=null){ 12879delta=event.wheelDelta; 12880}else if(event.detail!=null){ 12881delta=-event.detail; 12882} 12883if(delta){ 12884var currentZoom=_this.previewObject.contentProvider.zoomScale; 12885if((delta>0&¤tZoom==1) 12886||(delta<0&¤tZoom>1)){ 12887event.preventDefault(); 12888} 12889_this.previewObject.zoom(delta>0?1:-1); 12890} 12891requestRender(); 12892}; 12893var editor_mouseMove=function(event){ 12894_this.renderRequestPending=true; 12895event=fixMouseEvent(event); 12896if(_this.isMouseDown&&event.movementX!=0&&event.movementY!=0){ 12897_this.isMouseMoving=true; 12898} 12899if(event.touches!=null&&event.touches.length==2&&_this.startTouches!=null){ 12900_this.zoomDirty=true; 12901var touchCenter=utils.getVectorAvg(utils.getTouches(event,_this.container.offset())), 12902newScale=utils.calculateScale(_this.startTouches,utils.getTouches(event)), 12903scale=newScale/_this.lastScale; 12904var zoom=_this.previewObject.contentProvider.zoomScale,
12905x=touchCenter.x, 12906y=touchCenter.y; 12907_this.camera.position.z=_this.originalZ/(newScale); 12908_this.lastScale=newScale; 12909_this.lastZoomCenter=touchCenter; 12910event.preventDefault(); 12911return; 12912} 12913if(_this.isMouseDown==true&&_this.previewObject.contentProvider.zoomScale==1){ 12914var swipe_dist=event.pageX-_this.lastPos, 12915swipe_time=performance.now()-_this.lastTime; 12916if(Math.abs(swipe_dist)>_this.swipe_threshold){ 12917if(swipe_dist<0){ 12918_this.target.next(); 12919} 12920else{ 12921_this.target.prev(); 12922} 12923event.preventDefault(); 12924_this.isMouseDown=false; 12925} 12926_this.lastPos=event.pageX; 12927_this.lastTime=performance.now(); 12928} 12929}; 12930var editor_mouseDown=function(event){ 12931event=fixMouseEvent(event); 12932if(event.touches!=null&&event.touches.length==2&&_this.startTouches==null){ 12933_this.startTouches=utils.getTouches(event); 12934_this.lastScale=1; 12935_this.originalZ=_this.camera.position.z*1; 12936} 12937document.activeElement.blur(); 12938_this.mouseValue=event.pageX+","+event.pageY; 12939_this.isMouseMoving=false; 12940_this.isMouseDown=true; 12941_this.lastPos=event.pageX; 12942_this.lastTime=performance.now(); 12943}; 12944var editor_click=function(event){ 12945_this.isMouseDown=false; 12946if(event.button!==0)return this; 12947var mouseValue=event.pageX+","+event.pageY; 12948if(_this.isMouseMoving){ 12949} 12950else if(mouseValue==_this.mouseValue){ 12951event=event||window.event; 12952event=$.event.fix(event); 12953var mouse=_this.mouse,raycaster=_this.raycaster; 12954mouse.x=((event.offsetX)/_this.canvas.innerWidth())*2-1; 12955mouse.y=1-((event.offsetY)/_this.canvas.innerHeight())*2; 12956raycaster.setFromCamera(mouse,_this.camera); 12957var intersects=raycaster.intersectObjects(_this.target instanceof MOCKUP.Bundle 12958?_this.target.children:[_this.target],true); 12959if(intersects.length>0){ 12960var object,objectCount=0; 12961do{ 12962object=intersects[objectCount]!=null?intersects[objectCount].object:null; 12963objectCount++; 12964}while((object instanceof THREE.BoxHelper||!(object instanceof MOCKUP.Paper)||object.isFlipping==true)&&objectCount<intersects.length); 12965if(object.userData.object!=null){ 12966}else{ 12967if(object.angles[1]>90){ 12968if(object.isEdge!=true)_this.target.next(); 12969} 12970else{ 12971if(object.isEdge!=true)_this.target.prev(); 12972} 12973} 12974}else{ 12975} 12976} 12977}; 12978var editor_mouseUp=function(event){ 12979event=fixMouseEvent(event); 12980if(event.touches!=null&&event.touches.length==0){ 12981var zoom=_this.previewObject.contentProvider.zoomScale; 12982if(_this.zoomDirty==true){ 12983_this.previewObject.contentProvider.zoomScale= 12984utils.limitAt(_this.previewObject.contentProvider.zoomScale*_this.lastScale, 129851,_this.previewObject.contentProvider.maxZoom); 12986_this.previewObject.zoomValue=_this.previewObject.contentProvider.zoomScale*1; 12987_this.previewObject.resize(); 12988_this.zoomDirty=false; 12989} 12990_this.lastScale=null; 12991_this.startTouches=null; 12992} 12993if(event.touches!=null&&event.touches.length>1)return; 12994editor_click(event); 12995}; 12996_this.renderer.domElement.addEventListener("mousemove",editor_mouseMove,false); 12997_this.renderer.domElement.addEventListener("touchmove",editor_mouseMove,false); 12998_this.renderer.domElement.addEventListener("mousedown",editor_mouseDown,false); 12999_this.renderer.domElement.addEventListener("touchstart",editor_mouseDown,false); 13000_this.renderer.domElement.addEventListener("mouseup",editor_mouseUp,false); 13001_this.renderer.domElement.addEventListener("touchend",editor_mouseUp,false); 13002if(_this.options.scrollWheel==true){ 13003_this.renderer.domElement.addEventListener('mousewheel',onMouseWheel,false); 13004_this.renderer.domElement.addEventListener('DOMMouseScroll',onMouseWheel,false); 13005} 13006$(_this.renderer.domElement).css({display:"block"}); 13007$(window).trigger("resize"); 13008return this; 13009} 13010PreviewStage.prototype.width=function(){ 13011return this.container.width(); 13012}; 13013PreviewStage.prototype.height=function(){ 13014return this.container.height(); 13015}; 13016return PreviewStage; 13017})(MOCKUP.Stage); 13018MOCKUP.PreviewStage=PreviewStage; 13019var BookPaper=(function(_super){ 13020__extends(BookPaper,_super); 13021function BookPaper(parameters,stage){ 13022parameters=parameters||{}; 13023parameters.folds=1; 13024_super.call(this,parameters,stage); 13025this.angle=0; 13026this.isFlipping=false; 13027this.material.materials[5].transparent=true; 13028this.material.materials[4].transparent=true; 13029this.type="BookPaper"; 13030} 13031BookPaper.prototype.tween=function(oldAngle,newAngle){ 13032var page=this; 13033var epsilon=0.00001; 13034page.originalStiff=page.stiffness; 13035var oldTarget=page.newStiffness; 13036var isBooklet=isBookletMode(page.parent); 13037var diff=newAngle-oldAngle; 13038var isRight=oldAngle>90; 13039var isRTL=page.parent.direction==DFLIP.DIRECTION.RTL; 13040page.init={ 13041angle:oldAngle, 13042angle2:(oldAngle<90?0:180), 13043stiff:page.originalStiff, 13044index:(isRight&&!isRTL)||(!isRight&&isRTL)?1:0 13045}; 13046page.first={ 13047angle:oldAngle+diff/4, 13048angle2:(oldAngle<90?90:90), 13049stiff:page.originalStiff, 13050index:(isRight&&!isRTL)||(!isRight&&isRTL)?1:0.25 13051}; 13052page.mid={ 13053angle:oldAngle+diff*2/4, 13054angle2:(oldAngle<90?135:45), 13055stiff:page.newStiffness, 13056index:(isRight&&!isRTL)||(!isRight&&isRTL)?0.5:0.5 13057}; 13058page.mid2={ 13059angle:oldAngle+diff*3/4, 13060angle2:(oldAngle<90?180:0), 13061stiff:page.newStiffness, 13062index:(isRight&&!isRTL)||(!isRight&&isRTL)?0.25:1 13063}; 13064page.end={ 13065angle:newAngle, 13066angle2:(oldAngle<90?180:0), 13067stiff:page.newStiffness, 13068index:(isRight&&!isRTL)||(!isRight&&isRTL)?0:1 13069}; 13070page.isFlipping=true; 13071var update=function(tween,event){ 13072page.angles[1]=tween.angle; 13073page.angles[4]=page.isHard?tween.angle:tween.angle2; 13074if(page.isHard==true){ 13075page.stiffness=0; 13076}else{ 13077page.stiffness=tween.stiff/(oldTarget+epsilon)*(page.newStiffness+epsilon); 13078page.stiffness=isNaN(page.stiffness)?0:tween.stiff; 13079} 13080if(isBooklet){ 13081page.material.materials[5].opacity=page.material.materials[4].opacity=tween.index; 13082page.castShadow=(isRight&&!isRTL)||(!isRight&&isRTL)?tween.index>0.5:tween.index>0.5; 13083} 13084page.updateAngle(true); 13085}; 13086if(isBooklet&&((!isRight&&!isRTL)||(isRight&&isRTL))){ 13087page.material.materials[5].opacity=page.material.materials[4].opacity=0; 13088page.castShadow=false; 13089} 13090page.currentTween=new TWEEN.Tween(page.init) 13091.to({ 13092angle:[page.first.angle,page.mid.angle,page.mid2.angle,page.end.angle], 13093angle2:[page.first.angle2,page.mid.angle2,page.mid2.angle2,page.end.angle2], 13094stiff:[page.first.stiff,page.mid.stiff,page.mid2.stiff,page.end.stiff], 13095index:[page.first.index,page.mid.index,page.mid2.index,page.end.index] 13096},page.parent.duration) 13097.onUpdate(function(event){ 13098update(this,event); 13099}).easing(TWEEN.Easing.Sinusoidal.Out) 13100.onComplete(function(event){ 13101page.stiffness=page.newStiffness; 13102page.updateAngle(); 13103page.material.materials[5].opacity=page.material.materials[4].opacity=1; 13104page.castShadow=true; 13105page.isFlipping=false; 13106if(page.parent&&page.parent.refresh)
13107page.parent.refresh(); 13108}).start(); 13109}; 13110return BookPaper; 13111})(MOCKUP.FlexBoxPaper); 13112MOCKUP.BookPaper=BookPaper; 13113var Book=(function(_super){ 13114__extends(Book,_super); 13115function Book(parameters,stage){ 13116parameters=parameters||{}; 13117parameters.segments=parameters.segments||50; 13118this.pageCount=parameters.pageCount; 13119this.height=parameters.height; 13120this.width=parameters.width; 13121this.pageCount=(this.pageCount==1?this.pageCount:Math.ceil(this.pageCount/2)*2); 13122this.direction=parameters.direction||DFLIP.DIRECTION.LTR; 13123this.startPage=1; 13124this.endPage=this.pageCount; 13125this.stackCount=parameters.stackCount||6; 13126this.materials=[]; 13127_super.call(this,parameters,stage); 13128this.angles=[0,0,0,0,0,0]; 13129this.stiffness=parameters.stiffness==null?1.5:parameters.stiffness; 13130this.hardConfig=parameters.hard; 13131this._activePage=parameters.openPage||this.startPage; 13132this.createStack(parameters); 13133this.pageMode=parameters.pageMode||((isMobile||this.pageCount<=2)?DFLIP.PAGE_MODE.SINGLE 13134:DFLIP.PAGE_MODE.DOUBLE); 13135this.singlePageMode=parameters.singlePageMode||(isMobile?DFLIP.SINGLE_PAGE_MODE.BOOKLET 13136:DFLIP.SINGLE_PAGE_MODE.ZOOM); 13137this.type="Book"; 13138} 13139Book.prototype.getPageByNumber=function(pageNumber){ 13140var relativePageNumber=isBookletMode(this)?(isRTLMode(this)?pageNumber+1:pageNumber) 13141:Math.floor((pageNumber-1)/2); 13142return this.getObjectByName(relativePageNumber.toString()); 13143}; 13144Book.prototype.isPageHard=function(pageNumber){ 13145return utils.isHardPage(this.hardConfig,pageNumber,this.pageCount); 13146}; 13147Book.prototype.activePage=function(pageNumber){ 13148if(pageNumber==null)return this._activePage; 13149this.gotoPage(pageNumber); 13150}; 13151Book.prototype.gotoPage=function(pageNumber){ 13152pageNumber=parseInt(pageNumber,10); 13153this._activePage=pageNumber; 13154if(this.autoPlay==true){ 13155this.previewObject.setAutoPlay(this.autoPlay); 13156} 13157this.updatePage(pageNumber); 13158if(this&&this.thumblist&&this.thumblist.review) 13159this.thumblist.review(); 13160}; 13161Book.prototype.moveBy=function(step){ 13162var nextPage=this._activePage+step; 13163nextPage=limitAt(nextPage,this.startPage,this.endPage); 13164this.gotoPage(nextPage); 13165}; 13166Book.prototype.next=function(step){ 13167if(step==null) 13168step= 13169(this.direction==DFLIP.DIRECTION.RTL) 13170?-this.pageMode:this.pageMode; 13171this.moveBy(step); 13172}; 13173Book.prototype.prev=function(step){ 13174if(step==null) 13175step= 13176(this.direction==DFLIP.DIRECTION.RTL) 13177?this.pageMode:-this.pageMode; 13178this.moveBy(step); 13179}; 13180Book.prototype.updateAngle=function(){ 13181var startAngle=this.angles[1]; 13182var endAngle=this.angles[4]; 13183var spreadAngle=endAngle-startAngle; 13184var stacks=this.stackCount; 13185for(var _stackCount=0;_stackCount<stacks;_stackCount++){ 13186var clone=this.children[_stackCount]; 13187clone.angles[1]=startAngle+_stackCount*spreadAngle/(stacks*100); 13188clone.stiffness=this.stiffness; 13189clone.updateAngle(); 13190} 13191}; 13192Book.prototype.refresh=function(){ 13193this.updatePage(this._activePage); 13194if(this.flipCallback!=null)this.flipCallback(); 13195}; 13196Book.prototype.updatePage=function(pageNumber){ 13197var isRTL=(this.direction==DFLIP.DIRECTION.RTL), 13198isBooklet=isBookletMode(this), 13199newBaseNumber=getBasePage(pageNumber); 13200var pageDivisor=isBooklet?1:2; 13201pageNumber=Math.floor((pageNumber/pageDivisor)); 13202if(isRTL)pageNumber=this.pageCount/pageDivisor-pageNumber; 13203var oldBaseNumber=this.oldBaseNumber||0; 13204var pageCount=this.pageCount/pageDivisor; 13205var stackCount=this.stackCount; 13206var angleShift=0.02; 13207var depth=0.4; 13208var stiffFactor=isBooklet?0 13209:(0.5-Math.abs(pageCount/2-pageNumber)/ pageCount) /this.stiffness; 13210var positionFactor=1; 13211var midPoint=Math.floor(stackCount/2); 13212 13213var isLeft=false; 13214if(oldBaseNumber>pageNumber){ 13215isLeft=true; 13216this.children[stackCount-1].skipFlip=true; 13217this.children.unshift(this.children.pop()); 13218} 13219else if(oldBaseNumber<pageNumber){ 13220this.children[0].skipFlip=true; 13221this.children.push(this.children.shift()); 13222} 13223var remainingPages=(pageCount-pageNumber); 13224var stackDepth=(5)/pageCount; 13225var leftDepth=stackDepth*pageNumber/2; 13226var rightDepth=stackDepth*remainingPages/2; 13227var maxDepth=(leftDepth<rightDepth?rightDepth:leftDepth); 13228for(var _pageCount=0;_pageCount<stackCount;_pageCount++){ 13229var page=this.children[_pageCount]; 13230var color=page.color; 13231var oldAngle=page.angles[1]; 13232var newAngle; 13233var relativePageNumber=pageNumber-midPoint+_pageCount; 13234if(isRTL)relativePageNumber=isBooklet?this.pageCount-relativePageNumber 13235:Math.floor(this.pageCount/2)-relativePageNumber-1; 13236var isHard=page.isHard=this.isPageHard(relativePageNumber); 13237var oldName=page.name; 13238page.isEdge=false;
13239if(_pageCount==0){ 13240page.depth=leftDepth<depth?depth:leftDepth; 13241} 13242else if(_pageCount==stackCount-1){ 13243page.depth=rightDepth<depth?depth:rightDepth; 13244} 13245else{ 13246page.depth=depth; 13247page.isEdge=false; 13248} 13249if(page.isFlipping==true){ 13250page.depth=depth; 13251} 13252page.position.x=0; 13253var leftAngle=angleShift*_pageCount, 13254rightAngle=180-angleShift*(_pageCount-midPoint)+angleShift*_pageCount; 13255if(_pageCount<midPoint){ 13256page.newStiffness=isHard||this.stiffness==0?0:stiffFactor/(pageNumber/ pageCount) /4; 13257newAngle=leftAngle; 13258page.position.z=maxDepth-(-_pageCount+midPoint)*depth; 13259if(isLeft==true)page.position.z-=depth; 13260} 13261else{ 13262newAngle=rightAngle; 13263page.newStiffness=isHard||this.stiffness==0?0 13264:stiffFactor/(Math.abs(pageCount-pageNumber)/ pageCount) /4; 13265page.position.z=(maxDepth-(-stackCount+_pageCount+midPoint+1)*depth)-page.depth; 13266} 13267if(page.isFlipping==false){ 13268if(Math.abs(oldAngle-newAngle)>20&&page.skipFlip==false){ 13269page.depth=depth; 13270var predicted=page.stiffness; 13271if(oldAngle>newAngle){ 13272predicted=stiffFactor/(Math.abs(pageCount-pageNumber)/ pageCount) /4; 13273} 13274else{ 13275predicted=stiffFactor/(pageNumber/ pageCount) /4; 13276} 13277page.position.z+=depth; 13278page.stiffness=isNaN(predicted)?page.stiffness:predicted; 13279page.updateAngle(true); 13280page.targetStiffness=isHard?0:(_pageCount<pageNumber) 13281?stiffFactor/(Math.abs(pageCount-pageNumber)/ pageCount) /4 13282:stiffFactor/(pageNumber/ pageCount) /4; 13283page.targetStiffness=isHard?0:(isNaN(page.targetStiffness)?page.stiffness:page.targetStiffness); 13284page.isFlipping=true; 13285page.tween(oldAngle,newAngle); 13286if(this.preFlipCallback!=null) 13287this.preFlipCallback(); 13288}else{ 13289page.skipFlip=false; 13290page.newStiffness=isNaN(page.newStiffness)?0:page.newStiffness; 13291if(page.angles[1]!=newAngle||page.stiffness!=page.newStiffness||page.depth!=page.oldDepth){ 13292page.angles[1]=page.angles[4]=newAngle; 13293page.stiffness=page.newStiffness; 13294page.updateAngle(true); 13295} 13296else{ 13297} 13298} 13299} 13300page.visible=isBooklet 13301?(isRTL 13302?(_pageCount<midPoint||page.isFlipping) 13303:(_pageCount>=midPoint||page.isFlipping)) 13304:((relativePageNumber>=0&&relativePageNumber<pageCount)||(isBooklet&&relativePageNumber==pageCount)); 13305if(this.requestPage!=null&&page.visible==true){ 13306page.name=relativePageNumber.toString(); 13307if(page.name!=oldName){ 13308page.textureLoaded=false; 13309page.frontImage(defaults.textureLoadFallback); 13310page.frontPageStamp="-1"; 13311page.frontTextureLoaded=false; 13312page.thumbLoaded=false; 13313page.backImage(defaults.textureLoadFallback); 13314page.backPageStamp="-1"; 13315page.backTextureLoaded=false; 13316this.requestPage(); 13317} 13318} 13319page.oldDepth=page.depth; 13320var xPos=Math.abs(page.geometry.boundingBox.max.x)<Math.abs(page.geometry.boundingBox.min.x) 13321?page.geometry.boundingBox.max.x:page.geometry.boundingBox.min.x; 13322page.position.x=(page.isEdge==true&&page.isFlipping==false)?((_pageCount<midPoint) 13323?xPos:-xPos):0; 13324} 13325this.oldBaseNumber=pageNumber; 13326if(this.updatePageCallback!=null) 13327this.updatePageCallback(); 13328}; 13329Book.prototype.createCover=function(parameters){ 13330parameters.width=parameters.width*2; 13331this.cover=new MOCKUP.BiFold(parameters); 13332this.add(this.cover); 13333}; 13334Book.prototype.createStack=function(parameters){ 13335var colors="red,green,blue,yellow,orange,black".split(","); 13336for(var _stackCount=0;_stackCount<this.stackCount;_stackCount++){ 13337parameters.angles=[,this.stackCount-_stackCount]; 13338parameters.stiffness=(this.stackCount-_stackCount)/100; 13339var clone=new MOCKUP.BookPaper(parameters); 13340clone.angles[1]=180; 13341clone.index=_stackCount; 13342clone.updateAngle(); 13343clone.textureReady=false; 13344clone.textureRequested=false; 13345this.add(clone); 13346clone.color=colors[_stackCount]; 13347clone.position.z=-1*_stackCount; 13348} 13349};
13350Book.prototype.shininess=function(shininess){ 13351if(shininess==null){ 13352return this.mainObject.shininess(); 13353} 13354else{ 13355this.mainObject.shininess(shininess); 13356} 13357}; 13358Book.prototype.bumpScale=function(bumpScale){ 13359if(bumpScale==null){ 13360return this.mainObject.bumpScale(); 13361} 13362else{ 13363this.mainObject.bumpScale(bumpScale); 13364} 13365}; 13366Book.prototype.frontImage=function(frontImage){ 13367if(frontImage==null){ 13368return this.mainObject.frontImage(); 13369} 13370else{ 13371this.mainObject.frontImage(frontImage); 13372} 13373}; 13374Book.prototype.backImage=function(backImage){ 13375if(backImage==null){ 13376return this.mainObject.backImage(); 13377} 13378else{ 13379this.mainObject.backImage(backImage); 13380} 13381}; 13382return Book; 13383})(MOCKUP.Bundle); 13384MOCKUP.Book=Book; 13385} 13386var PreviewObject=(function(_super){ 13387function PreviewObject(parameters){ 13388parameters=parameters||{}; 13389this.type="PreviewObject"; 13390var _this=this; 13391_this.zoomValue=1; 13392function resizeDelay(){ 13393setTimeout(function(){ 13394_this.resize() 13395},50); 13396} 13397window.addEventListener("resize",resizeDelay,false); 13398this.sound=document.createElement("audio"); 13399this.sound.setAttribute("src",parameters.soundFile+"?ver="+DFLIP.version); 13400this.sound.setAttribute("type","audio/mpeg"); 13401this.autoPlayFunction=function(){ 13402if(_this&&_this.target.autoPlay){ 13403if(_this.target.direction==DFLIP.DIRECTION.RTL) 13404_this.target.prev(); 13405else 13406_this.target.next(); 13407} 13408}; 13409this.dispose=function(){ 13410clearInterval(this.autoPlayTimer); 13411this.autoPlayTimer=null; 13412this.autoPlayFunction=null; 13413if(this.target&&this.target.children){ 13414for(var count=0;count<this.target.children.length;count++){ 13415var page=this.target.children[count]; 13416if(page&&page.currentTween)page.currentTween.stop(); 13417} 13418} 13419if(this.zoomTween){ 13420if(this.zoomTween.stop)this.zoomTween.stop(); 13421this.zoomTween=null; 13422} 13423if(this.container&&this.container.info&&this.container.info.remove) 13424this.container.info.remove(); 13425if(this.target&&this.target.dispose) 13426this.target.dispose(); 13427this.target=null; 13428if(this.stage&&this.stage.dispose) 13429this.stage.dispose(); 13430this.stage=null; 13431if(this.ui&&this.ui.dispose) 13432this.ui.dispose(); 13433this.ui=null; 13434if(this.contentProvider&&this.contentProvider.dispose) 13435this.contentProvider.dispose(); 13436this.contentProvider=null; 13437window.removeEventListener("resize",resizeDelay); 13438}; 13439} 13440PreviewObject.prototype={ 13441start:function(){ 13442this.target.gotoPage(this.target.startPage); 13443}, 13444end:function(){ 13445this.target.gotoPage(this.target.endPage); 13446}, 13447next:function(){ 13448}, 13449prev:function(){ 13450}, 13451zoom:function(delta){ 13452this.pendingZoom=true; 13453this.zoomDelta=delta; 13454this.resize(); 13455this.ui.update(); 13456}, 13457resize:function(){ 13458var _this=this; 13459if(_this.target==null|| 13460_this.target.ui==null|| 13461_this.target.contentProvider==null|| 13462_this.target.contentProvider.viewport==null|| 13463_this.target.stage==null) 13464return; 13465if(this.ui&&this.ui.isFullscreen==true&&utils.hasFullscreenEnabled()==true&&utils.getFullscreenElement()==null){ 13466this.ui.switchFullscreen(); 13467} 13468var target=_this.target, 13469container=_this.container, 13470options=_this.options, 13471stage=target.stage, 13472contentProvider=target.contentProvider, 13473pageRatio=contentProvider.pageRatio, 13474zoomViewport=contentProvider.zoomViewport, 13475isRTL=isRTLMode(target), 13476is3d=target.mode!=="css", 13477isLandScape=contentProvider.pageRatio>1, 13478isWide,height,width,cameraZ,fov,zoom,maxZoom, 13479sideShift=container.hasClass("df-sidemenu-open")?220:0, 13480isSingle=this.target.pageMode==DFLIP.PAGE_MODE.SINGLE; 13481container.height(options.height); 13482var containerHeight=Math.min(container.height(),$(window).height()); 13483container.height(containerHeight); 13484var containerWidth=container.width(); 13485if(containerWidth<400){ 13486_this.container.addClass("df-xs"); 13487}else{ 13488_this.container.removeClass("df-xs"); 13489} 13490var controlsHeight=container.find(".df-ui-controls").height(); 13491var paddingTop=options.paddingTop+(options.controlsPosition==DFLIP.CONTROLSPOSITION.TOP 13492?controlsHeight:0), 13493paddingRight=options.paddingRight, 13494paddingBottom=options.paddingBottom+(options.controlsPosition==DFLIP.CONTROLSPOSITION.BOTTOM 13495?controlsHeight:0), 13496paddingLeft=options.paddingLeft; 13497paddingTop=isNaN(paddingTop)?0:limitAt(paddingTop,0,paddingTop), 13498paddingBottom=isNaN(paddingBottom)?0:limitAt(paddingBottom,0,paddingBottom), 13499paddingLeft=isNaN(paddingLeft)?0:limitAt(paddingLeft,0,paddingLeft), 13500paddingRight=isNaN(paddingRight)?0:limitAt(paddingRight,0,paddingRight); 13501var stageWidth=containerWidth-sideShift, 13502stageHeight=containerHeight; 13503var paddingHeight=paddingTop+paddingBottom, 13504paddingWidth=paddingLeft+paddingRight;
13505var stageInnerWidth=stageWidth-paddingWidth, 13506stageInnerHeight=stageHeight-paddingHeight; 13507width=Math.floor(isSingle?stageInnerWidth:stageInnerWidth/2); 13508height=Math.floor(width/pageRatio); 13509isWide=height>stageInnerHeight; 13510if(isWide){ 13511height=stageInnerHeight; 13512width=height*pageRatio; 13513} 13514maxZoom=contentProvider.maxZoom=contentProvider.zoomViewport.height/height; 13515if(_this.zoomValue==null)_this.zoomValue=1; 13516if(contentProvider.zoomScale==null)contentProvider.zoomScale=1; 13517if(_this.pendingZoom==true&&_this.zoomDelta!=null){ 13518var delta=_this.zoomDelta,predictedIndex,currentMaxDimension=Math.max(height,width); 13519_this.zoomValue=_this.zoomDelta>0?_this.zoomValue*_this.options.zoomRatio 13520:_this.zoomValue/_this.options.zoomRatio; 13521_this.zoomValue=limitAt(_this.zoomValue,1,maxZoom); 13522if(_this.zoomValue==1){ 13523contentProvider.zoomScale=1; 13524}else{ 13525predictedIndex=height*_this.zoomValue; 13526predictedIndex=utils.zoomStops(predictedIndex,_this.options.zoomRatio,_this.zoomDelta>0,Math.max(width,height)); 13527contentProvider.zoomScale=limitAt(predictedIndex/currentMaxDimension,1,maxZoom); 13528} 13529} 13530zoom=contentProvider.zoomScale; 13531contentProvider.checkViewportSize(width,height,zoom); 13532if(contentProvider.contentSourceType==SOURCE_TYPE.PDF){ 13533width=contentProvider.imageViewport.width/zoom; 13534height=contentProvider.imageViewport.height/zoom; 13535} 13536if(contentProvider.zoomScale!=1){ 13537this.target.container.addClass("df-zoom-enabled"); 13538} 13539var zoomWidth=target.zoomWidth=Math.floor(width*zoom), 13540zoomHeight=target.zoomHeight=Math.floor(height*zoom); 13541var zoomFullWidth=zoomWidth*2; 13542if(is3d){ 13543var proportion=zoomHeight/target.height, 13544aspect=stageWidth/stageHeight; 13545var relativeHeight=zoom*(height+paddingHeight)/proportion, 13546relativeWidth=zoom*(width*(isSingle?1:2)+paddingWidth)/proportion; 13547var focusSize=isWide?relativeHeight:relativeWidth/aspect; 13548stage.resizeCanvas(stageWidth,stageHeight); 13549cameraZ=1/(2*Math.tan(Math.PI*stage.camera.fov*0.5/ 180)/(focusSize/zoom))+2.2; 13550stage.camera.updateProjectionMatrix(); 13551stage.renderRequestPending=true; 13552var shift=(paddingTop-paddingBottom)*(target.height/height)/ zoom /2; 13553var _reset=contentProvider.zoomScale==1; 13554if(stage.camera.position.z!==cameraZ&&_this.pendingZoom==true){ 13555if(_this.zoomTween!=null) 13556_this.zoomTween.stop(); 13557_this.zoomTween=new TWEEN.Tween({ 13558campos:stage.camera.position.z, 13559otx:stage.orbitControl.target.x, 13560oty:stage.orbitControl.target.y, 13561otz:stage.orbitControl.target.z 13562}).delay(0) 13563.to({ 13564campos:cameraZ, 13565otx:0, 13566oty:shift, 13567otz:0 13568}, 13569100) 13570.onUpdate(function(){ 13571stage.camera.position.z=this.campos; 13572if(_reset){ 13573stage.camera.position.y=this.oty; 13574stage.orbitControl.target=new THREE.Vector3(this.otx,this.oty,this.otz); 13575} 13576stage.orbitControl.update(); 13577}).easing(TWEEN.Easing.Linear.None) 13578.onComplete(function(){ 13579stage.camera.position.z=cameraZ; 13580if(contentProvider.zoomScale==1){ 13581stage.camera.position.set(0,shift,cameraZ); 13582stage.orbitControl.target=new THREE.Vector3(0,shift,0); 13583} 13584stage.orbitControl.update(); 13585}) 13586.start(); 13587} 13588else{ 13589if(contentProvider.zoomScale==1){ 13590stage.camera.position.set(0,shift,cameraZ); 13591stage.orbitControl.target=new THREE.Vector3(0,shift,0); 13592} 13593stage.orbitControl.update(); 13594} 13595stage.orbitControl.update(); 13596stage.orbitControl.mouseButtons.ORBIT=zoom!=1?-1:THREE.MOUSE.RIGHT; 13597stage.orbitControl.mouseButtons.PAN=zoom!=1?THREE.MOUSE.LEFT:-1; 13598} 13599else{ 13600target.pageWidth=Math.round(width); 13601target.fullWidth=target.pageWidth*2; 13602target.height=Math.round(height); 13603var shiftHeight=target.shiftHeight=Math.round(limitAt((zoomHeight-stageHeight+paddingHeight)/2,0,zoomHe
13603ight)), 13604shiftWidth=target.shiftWidth=Math.round(limitAt((zoomFullWidth-stageWidth+paddingWidth)/2,0,zoomFullWidth)); 13605if(zoom==1){ 13606target.left=0; 13607target.top=0; 13608} 13609target.stage.css({ 13610top:-shiftHeight, 13611bottom:-shiftHeight, 13612right:-shiftWidth+(isRTL?sideShift:0), 13613left:-shiftWidth+(isRTL?0:sideShift), 13614paddingTop:paddingTop, 13615paddingRight:paddingRight, 13616paddingBottom:paddingBottom, 13617paddingLeft:paddingLeft, 13618transform:"translate3d("+target.left+"px,"+target.top+"px,0)" 13619}); 13620target.stageHeight=stage.height(); 13621target.wrapper.css({ 13622width:zoomFullWidth, 13623height:zoomHeight, 13624marginTop:(containerHeight-zoomHeight-paddingHeight)>0 13625?(containerHeight-paddingHeight-zoomHeight)/2 13626:0 13627}); 13628var wrapperSize=Math.floor((distOrigin(width,height))*zoom); 13629target.stage.find(".df-page-wrapper").width(wrapperSize).height(wrapperSize); 13630target.stage.find(".df-book-page, .df-page-front , .df-page-back, .df-page-fold-inner-shadow").height(zoomHeight).width(zoomWidth); 13631} 13632_this.checkCenter({type:"resize"}); 13633if(contentProvider.zoomScale==1){ 13634this.target.container.removeClass("df-zoom-enabled"); 13635} 13636if(target.thumblist){ 13637target.thumblist.reset($(target.thumblist.container).height()); 13638} 13639_this.pendingZoom=false; 13640}, 13641playSound:function(){ 13642try{ 13643if(this.options&&this.options.soundEnable==true){ 13644this.sound.currentTime=0; 13645this.sound.play(); 13646} 13647}catch(error){ 13648} 13649}, 13650setPageMode:function(isSingle){ 13651if(isSingle==true){ 13652this.ui.pageMode.addClass(this.options.icons['doublepage']); 13653this.ui.pageMode.html("<span>"+this.options.text.doublePageMode+"</span>"); 13654this.ui.pageMode.attr("title",this.options.text.doublePageMode); 13655this.target.pageMode=DFLIP.PAGE_MODE.SINGLE; 13656} 13657else{ 13658this.ui.pageMode.removeClass(this.options.icons['doublepage']); 13659this.ui.pageMode.html("<span>"+this.options.text.singlePageMode+"</span>"); 13660this.ui.pageMode.attr("title",this.options.text.singlePageMode); 13661this.target.pageMode=DFLIP.PAGE_MODE.DOUBLE; 13662} 13663if(this.target&&this.target.singlePageMode==DFLIP.SINGLE_PAGE_MODE.BOOKLET){ 13664this.target.reset(); 13665} 13666this.resize(); 13667}, 13668setAutoPlay:function(isPlay){ 13669if(this.options.autoPlay){ 13670isPlay=isPlay==true; 13671var text=isPlay?this.options.text.pause:this.options.text.play; 13672this.ui.play.toggleClass(this.options.icons['pause'],isPlay); 13673this.ui.play.html("<span>"+text+"</span>"); 13674this.ui.play.attr("title",text); 13675clearInterval(this.autoPlayTimer); 13676if(isPlay){ 13677this.autoPlayTimer=setInterval(this.autoPlayFunction,this.options.autoPlayDuration); 13678} 13679this.target.autoPlay=isPlay; 13680} 13681}, 13682height:function(height){ 13683if(height==null){ 13684return this.container.height(); 13685}else{ 13686this.options.height=height; 13687this.container.height(height); 13688this.resize(); 13689} 13690}, 13691checkCenter:function(options){ 13692options=options==null?{}:options; 13693this.centerType=this.centerType||"start"; 13694var target=this.target; 13695var singleShift=0,left=0,right=0; 13696var basePage=utils.getBasePage(target._activePage); 13697var isEven=target._activePage%2==0; 13698var isRTL=target.direction==DFLIP.DIRECTION.RTL; 13699var isSingle=target.pageMode==DFLIP.PAGE_MODE.SINGLE, 13700isBooklet=isSingle&&target.singlePageMode==DFLIP.SINGLE_PAGE_MODE.BOOKLET; 13701var stageWidth=target.stage.width(), 13702width; 13703if(target.mode=='css'){ 13704width=target.wrapper.width(); 13705singleShift=Math.max((width-stageWidth)/2,0); 13706left=-width/4; 13707right=width/4; 13708if(basePage==0||isBooklet){ 13709target.wrapper.css({ 13710left:isSingle 13711?isRTL?right-singleShift:left-singleShift 13712:isRTL?right:left 13713}); 13714target.shadow.css({width:'50%',left:isRTL?0:'50%',transitionDelay:''}); 13715} 13716else if(basePage==target.pageCount){ 13717target.wrapper.css({ 13718left:isSingle 13719?isRTL?left-singleShift:right-singleShift 13720:isRTL?left:right 13721}); 13722target.shadow.css({width:'50%',left:isRTL?'50%':0,transitionDelay:''}); 13723} 13724else{ 13725target.wrapper.css({ 13726left:isSingle 13727?isRTL 13728?(isEven?left-singleShift:right-singleShift) 13729:(isEven?right-singleShift:left-singleShift) 13730:0 13731}); 13732target.shadow.css({ 13733width:'100%', 13734left:0, 13735transitionDelay:(parseInt(target.duration,10)+50)+'ms' 13736}); 13737} 13738target.wrapper.css({transition:options.type=="resize"?"none":""}); 13739} 13740else if(target.stage!=null){ 13741var init=target.position.x,end; 13742singleShift=target.width/4; 13743width=target.width; 13744left=-width/2; 13745right=width/2; 13746if(basePage==0||isBooklet){ 13747end=isRTL?right:left; 13748}
13749else if(basePage==target.pageCount){ 13750end=isRTL?left:right; 13751} 13752else{ 13753end=isSingle 13754?isRTL 13755?(isEven?left:right) 13756:(isEven?right:left) 13757:0; 13758} 13759if(end!==this.centerEnd){ 13760this.centerTween=new TWEEN.Tween({x:init}).delay(0) 13761.to({x:end},target.duration) 13762.onUpdate(function(){ 13763target.position.x=this.x; 13764target.stage.cssScene.position.x=this.x; 13765}).easing(target.ease) 13766.start(); 13767this.centerEnd=end; 13768} 13769} 13770}, 13771width:function(width){ 13772if(width==null){ 13773return this.container.width(); 13774}else{ 13775this.options.width=width; 13776this.container.width(width); 13777this.resize(); 13778} 13779} 13780}; 13781return PreviewObject; 13782})({}); 13783DFLIP.PreviewObject=PreviewObject; 13784var ContentProvider=(function(_super){ 13785__extends(ContentProvider,_super); 13786function ContentProvider(contentSource,callback,parameters,flipbook){ 13787parameters=parameters||{}; 13788var _this=this; 13789_this.contentRawSource=contentSource||[defaults.textureLoadFallback]; 13790_this.contentSource=_this.contentRawSource; 13791_this.contentSourceType=null; 13792_this.minDimension=parameters.minTextureSize||256; 13793_this.maxDimension=parameters.maxTextureSize||2048; 13794_this.pdfRenderQuality=parameters.pdfRenderQuality||DFLIP.defaults.pdfRenderQuality; 13795_this.flipbook=flipbook; 13796_this.waitPeriod=50; 13797_this.maxLength=297; 13798_this.enableDebug=false; 13799_this.zoomScale=1; 13800_this.maxZoom=2; 13801_this.options=parameters; 13802_this.outline=parameters.outline; 13803_this.links=parameters.links; 13804_this.html=parameters.html; 13805_this.isCrossOrigin=parameters.isCrossOrigin; 13806_this.normalViewport={ 13807height:297, 13808width:210, 13809scale:1 13810}; 13811_this.viewport={ 13812height:297, 13813width:210, 13814scale:1 13815}; 13816_this.imageViewport={ 13817height:297, 13818width:210, 13819scale:1 13820}; 13821_this.bookSize={ 13822height:297, 13823width:210 13824} 13825_this.zoomViewport={ 13826height:297, 13827width:210 13828}; 13829_this.thumbsize=128; 13830_this.cacheIndex=256; 13831_this.cache=[]; 13832_this.pageRatio=parameters.pageRatio||_this.viewport.width/_this.viewport.height; 13833_this.textureLoadTimeOut=null; 13834_this.type="TextureLibrary"; 13835if(Array===_this.contentSource.constructor||Array.isArray(_this.contentSource)||_this.contentSource instanceof Array){ 13836_this.contentSourceType=SOURCE_TYPE.IMAGE; 13837_this.pageCount=_this.contentSource.length; 13838$("<img/>") 13839.attr("src",_this.contentSource[0]) 13840.on('load',(function(){ 13841_this.viewport.height=this.height; 13842_this.viewport.width=this.width; 13843_this.pageRatio=_this.viewport.width/_this.viewport.height; 13844_this.bookSize={ 13845width:(_this.pageRatio>1?1:_this.pageRatio)*_this.maxLength, 13846height:_this.maxLength/(_this.pageRatio<1?1:_this.pageRatio) 13847}; 13848_this.zoomViewport={ 13849width:(_this.pageRatio>1?1:_this.pageRatio)*_this.maxDimension, 13850height:_this.maxDimension/(_this.pageRatio<1?1:_this.pageRatio) 13851}; 13852_this.linkService=new PDFLinkService(); 13853$(this).off(); 13854if(_this.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL){ 13855_this.pageCount=_this.contentSource.length*2-2; 13856if(_this.options.webgl==true) 13857_this.requiresImageTextureScaling=true; 13858} 13859if(callback!=null){ 13860callback(_this); 13861callback=null; 13862} 13863log(this.height+":"+this.width); 13864})); 13865} 13866else if(typeof _this.contentSource=='string'||_this.contentSource instanceof String){ 13867var processSource=function(){ 13868if(_this){ 13869PDFJS.workerSrc=defaults.pdfjsWorkerSrc; 13870_this.contentSourceType=SOURCE_TYPE.PDF; 13871PDFJS.disableAutoFetch=true; 13872PDFJS.disableStream=true; 13873if(isSafari||isIOS||_this.options.disableFontFace==true){ 13874PDFJS.disableFontFace=isSafari||isIOS||_this.options.disableFontFace==true; 13875} 13876PDFJS.imageResourcesPath=defaults.imageResourcesPath; 13877PDFJS.cMapUrl=defaults.cMapUrl; 13878PDFJS.cMapPacked=!0; 13879PDFJS.externalLinkTarget=PDFJS.LinkTarget.BLANK; 13880var loading=_this.loading=PDFJS.getDocument(_this.options.docParameters?_this.options.docParameters 13881:{ 13882url:utils.httpsCorrection(contentSource), 13883rangeChunkSize:isNaN(DFLIP.defaults.rangeChunkSize)?524288:DFLIP.defaults.rangeChunkSize 13884}); 13885loading.then(function sourceLoaded(pdf){ 13886_this.pdfDocument=pdf; 13887pdf.getPage(1).then(function(page){ 13888_this.normalViewport=page.getViewport(1); 13889_this.viewport=page.getViewport(1); 13890_this.viewport.height=_this.viewport.height/10; 13891_this.viewport.width=_this.viewport.width/10; 13892_this.pageRatio=_this.viewport.width/_this.viewport.height; 13893_this.bookSize={ 13894width:(_this.pageRatio>1?1:_this.pageRatio)*_this.maxLength,
13895height:_this.maxLength/(_this.pageRatio<1?1:_this.pageRatio) 13896}; 13897_this.zoomViewport={ 13898width:(_this.pageRatio>1?1:_this.pageRatio)*_this.maxDimension, 13899height:_this.maxDimension/(_this.pageRatio<1?1:_this.pageRatio) 13900}; 13901_this.refPage=page; 13902if(pdf.numPages>1){ 13903pdf.getPage(2).then(function(page){ 13904if(_this.options.pageSize==DFLIP.PAGE_SIZE.AUTO){ 13905var _viewport=page.getViewport(1); 13906var _pageRatio=_viewport.width/_viewport.height; 13907if(_pageRatio>_this.pageRatio*1.5){ 13908_this.options.pageSize=DFLIP.PAGE_SIZE.DOUBLEINTERNAL; 13909_this.pageCount=pdf.numPages*2-2; 13910} 13911else{ 13912_this.options.pageSize=DFLIP.PAGE_SIZE.SINGLE; 13913} 13914} 13915if(callback!=null){ 13916callback(_this); 13917callback=null; 13918} 13919}); 13920}else{ 13921if(callback!=null){ 13922callback(_this); 13923callback=null; 13924} 13925} 13926}); 13927_this.linkService=new PDFLinkService(); 13928_this.linkService.setDocument(pdf,null); 13929_this.pageCount=pdf.numPages; 13930_this.contentSource=pdf; 13931}, 13932function loadingError(error){ 13933if(_this){ 13934var cors="",tmp=document.createElement('a'); 13935tmp.href=_this.contentSource; 13936if(tmp.hostname!==window.location.hostname) 13937cors="CROSS ORIGIN!! "; 13938_this.updateInfo(cors+"Cannot access file! "+_this.contentSource); 13939} 13940}); 13941loading.onProgress=function getDocumentProgress(progressData){ 13942if(_this){ 13943var percentage=100*progressData.loaded/progressData.total; 13944if(isNaN(percentage)){ 13945if(progressData&&progressData.loaded){ 13946_this.updateInfo("Loading PDF "+(Math.ceil(progressData.loaded/10000)/100).toString()+"MB ..."); 13947}else{ 13948_this.updateInfo("Loading PDF ..."); 13949} 13950}else{ 13951_this.updateInfo("Loading PDF "+percentage.toString().split(".")[0]+"% ..."); 13952} 13953} 13954}; 13955} 13956}; 13957var checkCORS=function(){ 13958if(_this){ 13959defaults.pdfjsWorkerSrc+="?ver="+DFLIP.version; 13960_this.updateInfo("Loading PDF Worker ..."); 13961var tmp=document.createElement('a'); 13962tmp.href=defaults.pdfjsWorkerSrc; 13963if(tmp.hostname!==window.location.hostname){ 13964_this.updateInfo("Loading PDF Worker CORS ..."); 13965$.ajax({ 13966url:defaults.pdfjsWorkerSrc, 13967cache:true, 13968success:function(data){ 13969defaults.pdfjsWorkerSrc=DFLIP.createObjectURL(data,"text/javascript"); 13970processSource(); 13971} 13972}); 13973} 13974else{ 13975processSource(); 13976} 13977} 13978}; 13979if(window.PDFJS==null){ 13980if(_this){ 13981_this.updateInfo("Loading PDF Service ..."); 13982getScript(defaults.pdfjsSrc+"?ver="+DFLIP.version,function(){ 13983if(typeof define==='function'&&define.amd){ 13984_this.updateInfo("Loading PDF Service (require) ..."); 13985require.config({paths:{'pdfjs-dist/build/pdf.worker':defaults.pdfjsWorkerSrc.replace(".js","")}}); 13986require(['pdfjs-dist/build/pdf'],function(pdf){ 13987checkCORS(); 13988}); 13989}else{ 13990checkCORS(); 13991} 13992},function(){ 13993_this.updateInfo("Unable to load PDF service.."); 13994}); 13995} 13996} 13997else{ 13998processSource(); 13999} 14000} 14001else{ 14002console.error("Unknown source type. Please check documentation for help"); 14003} 14004this.dispose=function(){ 14005if(_this.loading&&_this.loading.destroy){ 14006_this.loading.destroy(); 14007} 14008_this.loading=null; 14009if(_this.textureLoadTimeOut){ 14010clearTimeout(_this.textureLoadTimeOut); 14011_this.textureLoadTimeOut=null; 14012} 14013if(this.targetObject){ 14014if(this.targetObject.thumbContainer&&this.targetObject.thumbContainer.remove) 14015this.targetObject.thumbContainer.remove(); 14016if(this.targetObject.outlineContainer&&this.targetObject.outlineContainer.remove) 14017this.targetObject.outlineContainer.remove(); 14018if(this.targetObject.dispose)this.targetObject.dispose(); 14019this.targetObject.processPage=null; 14020this.targetObject.requestPage=null; 14021if(this.targetObject.container&&this.targetObject.container.off) 14022this.targetObject.container.off(); 14023} 14024if(this.pdfDocument&&this.pdfDocument.destroy)this.pdfDocument.destroy(); 14025if(this.linkService&&this.linkService.dispose)this.linkService.dispose(); 14026if(this.outlineViewer&&this.outlineViewer.dispose)this.outlineViewer.dispose(); 14027if(this.thumblist&&this.thumblist.dispose){ 14028this.thumblist.review=null; 14029this.thumblist.dispose(); 14030} 14031this.activeThumb=null; 14032this.targetObject=null; 14033this.pdfDocument=null; 14034this.linkService=null; 14035this.outlineViewer=null; 14036this.thumblist=null; 14037_this=null; 14038}; 14039return this; 14040} 14041ContentProvider.prototype.updateInfo=function(info){ 14042if(this.flipbook&&this.flipbook.updateInfo){ 14043this.flipbook.updateInfo(info); 14044} 14045}; 14046ContentProvider.prototype.initThumbs=function(){ 14047var _this=this; 14048if(_this.cache[_this.thumbsize]==null)_this.cache[_this.thumbsize]=[]; 14049var thumbLoadTimeOut; 14050var review=function(){ 14051clearTimeout(thumbLoadTimeOut); 14052thumbLoadTimeOut=setTimeout(function(){
14053thumbLoadTimeOut=setTimeout(reviewThumbs,_this.waitPeriod/2); 14054},_this.waitPeriod); 14055}; 14056var reviewThumbs=function(){ 14057var requestCount=0; 14058if(Date.now()-_this.thumblist.lastScrolled<100){ 14059requestCount=1; 14060}else{ 14061_this.targetObject.container.find(".df-thumb-container .df-vrow").each(function(){ 14062var thumb=$(this); 14063if(!thumb.hasClass("df-thumb-loaded")){ 14064requestCount++; 14065var id=$(this).attr("id").replace("df-thumb",""); 14066_this.getPage(id,review,true); 14067thumb.addClass("df-thumb-loaded"); 14068return false; 14069} 14070}); 14071if(requestCount==0){ 14072clearTimeout(thumbLoadTimeOut); 14073} 14074} 14075if(requestCount>0){ 14076review(); 14077} 14078if(_this.activeThumb!=_this.targetObject._activePage){ 14079var thumbVisible=_this.targetObject.thumbContainer!=null&&_this.targetObject.thumbContainer.hasClass("df-sidemenu-visible"); 14080if(thumbVisible){ 14081var wrapper=_this.thumblist.container; 14082var cScroll=wrapper.scrollTop, 14083cHeight=wrapper.getBoundingClientRect().height; 14084var thumb=_this.targetObject.thumbContainer.find("#df-thumb"+_this.targetObject._activePage); 14085if(thumb.length>0){ 14086_this.targetObject.thumbContainer.find(".df-selected").removeClass("df-selected"); 14087thumb.addClass("df-selected"); 14088thumb=thumb[0]; 14089if(cScroll+cHeight<thumb.offsetTop+thumb.scrollHeight) 14090thumb.scrollIntoView(false); 14091else if(cScroll>thumb.offsetTop) 14092thumb.scrollIntoView(); 14093_this.activeThumb=_this.targetObject._activePage; 14094} 14095else{ 14096$(wrapper).scrollTop(_this.targetObject._activePage*124); 14097review(); 14098} 14099} 14100} 14101}; 14102_this.thumblist=_this.targetObject.thumblist=new ThumbList({ 14103h:500, 14104addFn:function(row){ 14105}, 14106scrollFn:review, 14107itemHeight:128, 14108totalRows:_this.pageCount, 14109generatorFn:function(row){ 14110var el=document.createElement("div"); 14111var pageNumber=row+1; 14112el.id="df-thumb"+pageNumber; 14113var elText=document.createElement("div"); 14114elText.innerHTML=pageNumber; 14115el.appendChild(elText); 14116return el; 14117} 14118}); 14119_this.thumblist.lastScrolled=Date.now(); 14120_this.thumblist.review=review; 14121review(); 14122var thumbContainer=$('<div>').addClass("df-thumb-container df-sidemenu-visible df-sidemenu"); 14123thumbContainer.append($(_this.thumblist.container).addClass("df-thumb-wrapper")); 14124_this.targetObject.thumbContainer=thumbContainer; 14125_this.targetObject.container.append(thumbContainer); 14126var sideMenuClose=$(html.div,{ 14127class:"df-ui-btn df-ui-sidemenu-close ti-close" 14128}); 14129thumbContainer.append(sideMenuClose); 14130_this.thumblist.reset($(_this.thumblist.container).height()); 14131_this.targetObject.container.on('click','.df-thumb-container .df-vrow',function(e){ 14132e.stopPropagation(); 14133var id=$(this).attr("id").replace("df-thumb",""); 14134_this.targetObject.gotoPage(parseInt(id,10)); 14135}); 14136}; 14137ContentProvider.prototype.initOutline=function(){ 14138var _this=this; 14139var outlineContainer=$('<div>').addClass("df-outline-container df-sidemenu"); 14140var outlineWrapper=$('<div>').addClass("df-outline-wrapper"); 14141var sideMenuClose=$(html.div,{ 14142class:"df-ui-btn df-ui-sidemenu-close ti-close" 14143}); 14144outlineContainer.append(sideMenuClose).append(outlineWrapper); 14145_this.targetObject.container.append(outlineContainer); 14146_this.targetObject.outlineContainer=outlineContainer; 14147_this.outlineViewer=new BookMarkViewer({ 14148container:outlineWrapper[0], 14149linkService:_this.linkService, 14150outlineItemClass:"df-outline-item", 14151outlineToggleClass:"df-outline-toggle", 14152outlineToggleHiddenClass:"df-outlines-hidden" 14153}); 14154function processOutline(outline){ 14155if(_this.options.overwritePDFOutline==true){ 14156outline=[]; 14157} 14158outline=outline||[]; 14159if(_this.outline){ 14160for(var count=0;count<_this.outline.length;count++){ 14161_this.outline[count].custom=true; 14162if(outline)outline.push(_this.outline[count]); 14163} 14164} 14165_this.outlineViewer.render({outline:outline}); 14166} 14167if(_this.pdfDocument){ 14168_this.pdfDocument.getOutline().then(function(outline){ 14169processOutline(outline); 14170}); 14171} 14172else{ 14173processOutline([]); 14174} 14175if(_this.options.autoEnableOutline==true){ 14176_this.targetObject.ui.outline.trigger("click"); 14177} 14178if(_this.options.autoEnableThumbnail==true){ 14179_this.targetObject.ui.thumbnail.trigger("click"); 14180} 14181}; 14182ContentProvider.prototype.checkViewportSize=function(width,height,zoom){ 14183var _this=this; 14184var target=_this.targetObject; 14185var zoomWidth=width*zoom, 14186zoomHeight=height*zoom; 14187var oldCacheSize=_this.cacheIndex; 14188if(_this.contentSourceType==SOURCE_TYPE.PDF){ 14189_this.cacheIndex=Math.ceil(Math.max(zoomWidth,zoomHeight)); 14190_this.cacheIndex=Math.floor(Math.max(zoomWidth,zoomHeight)); 14191_this.cacheIndex=limitAt(_this.cacheIndex*defaults.pixelRatio,_this.minDimension,_this.maxDimension); 14192if(_this.cache[_this.cacheIndex]==null)_this.cache[_this.cacheIndex]=[]; 14193if(oldCacheSize!==_this.cacheIndex){ 14194for(var pageCount=0;pageCount<target.children.length;pageCount++){ 14195var page=target.children[pageCount]; 14196} 14197target.refresh(); 14198} 14199_this.imageViewport=_this.refPage.getViewport(zoomHeight/_this.normalViewport.height); 14200_this.viewport=(target.mode=="css")?_this.imageViewport 14201:_this.refPage.getViewport(_this.bookSize.height/_this.normalViewport.height); 14202log(_this.cacheIndex); 14203var div=target.container.find(".linkAnnotation"), 14204viewportClone=_this.viewport.clone({dontFlip:true}); 14205div.css({ 14206transform:'matrix('+viewportClone.transform.join(',')+')' 14207}); 14208} 14209else{ 14210if(_this.cache[_this.cacheIndex]==null)_this.cache[_this.cacheIndex]=[]; 14211} 14212}; 14213ContentProvider.prototype.getCache=function(index,isThumb){ 14214return(isThumb==true) 14215?this.cache[this.thumbsize]==null?null:this.cache[this.thumbsize][index] 14216:this.cache[this.cacheIndex]==null?null:this.cache[this.cacheIndex][index]; 14217}; 14218ContentProvider.prototype.setCache=function(index,src,isThumb,cacheIndexSize){ 14219if(isThumb==true){ 14220if(this.cache[this.thumbsize]!=null)this.cache[this.thumbsize][index]=src; 14221} 14222else{ 14223var cacheIndex=cacheIndexSize==null?this.cacheIndex:cacheIndexSize; 14224if(this.cache[cacheIndex]!=null) 14225this.cache[cacheIndex][index]=src; 14226} 14227}; 14228ContentProvider.prototype.setTarget=function(targetObject){ 14229var _this=this; 14230if(targetObject==null){ 14231return this.targetObject; 14232} 14233else{ 14234this.targetObject=targetObject; 14235targetObject.contentProvider=this; 14236targetObject.container.removeClass("df-loading df-init"); 14237if(_this.linkService!=null){ 14238_this.linkService.setViewer(targetObject); 14239_this.initOutline(); 14240} 14241targetObject.processPage=function(pageNumber,callback){ 14242if(pageNumber>0&&pageNumber<=_this.pageCount){ 14243_this.getPage(pageNumber,callback); 14244} 14245else{ 14246_this.setPage(pageNumber,defaults.textureLoadFallback,callback); 14247} 14248}; 14249targetObject.requestPage=function(){ 14250_this.review("Request"); 14251}; 14252if(targetObject.resize!=null) 14253targetObject.resize(); 14254} 14255}; 14256ContentProvider.prototype.review=function(message){ 14257var _this=this; 14258message=message||"timer review"; 14259clearTimeout(_this.textureLoadTimeOut); 14260_this.textureLoadTimeOut=setTimeout(function(){ 14261_this.textureLoadTimeOut=setTimeout(_this.reviewPages,_this.waitPerio
14261d/2,_this,message); 14262},_this.waitPeriod); 14263}; 14264ContentProvider.prototype.reviewPages=function(_this,message){ 14265_this=_this||this; 14266var target=_this.targetObject; 14267if(target==null)return; 14268var isBooklet=isBookletMode(target); 14269if(message!=null)log(message); 14270var requiresRevisit=false; 14271var pageCount,page; 14272for(pageCount=0;pageCount<_this.targetObject.children.length;pageCount++){ 14273page=target.children[pageCount]; 14274if(page.isFlipping==true){ 14275requiresRevisit=true; 14276break; 14277} 14278} 14279if(requiresRevisit==false){ 14280var pageLength=target.children.length>3?3:target.children.length; 14281var midPoint=pageLength/2; 14282var basePage=isBooklet?target._activePage:getBasePage(target._activePage); 14283_this.baseNumber=basePage; 14284if(_this.zoomScale>1){ 14285pageLength=1; 14286} 14287for(pageCount=0;pageCount<pageLength;pageCount++){ 14288var dividend=Math.floor(pageCount/2); 14289var diff=pageCount%2==0 14290?-dividend*(isBooklet?1:2) 14291:(dividend==0?1:dividend)*(isBooklet?1:2); 14292var frontPageNumber=basePage+diff, 14293backPageNumber=basePage+diff+1; 14294var page1=target.getPageByNumber(frontPageNumber), 14295page2=target.getPageByNumber(backPageNumber), 14296reqFrontPageStamp=frontPageNumber+"|"+_this.cacheIndex, 14297reqBackPageStamp=backPageNumber+"|"+_this.cacheIndex; 14298var requestCount=0; 14299if(page1!=null&&page1.frontPageStamp!=reqFrontPageStamp&&page1.visible==true){ 14300page1.frontTextureLoaded=false; 14301target.processPage(frontPageNumber,function(){ 14302_this.review("Batch Call"); 14303}); 14304page1.frontPageStamp=reqFrontPageStamp; 14305requestCount++; 14306} 14307if(page2!=null&&page2.backPageStamp!=reqBackPageStamp&&page2.visible==true&&!isBooklet){ 14308page2.backTextureLoaded=false; 14309target.processPage(backPageNumber,function(){ 14310_this.review("Batch Call"); 14311}); 14312page2.backPageStamp=reqBackPageStamp; 14313requestCount++; 14314} 14315if(diff==0&&_this.annotedPage!==basePage){ 14316_this.getAnnotations(frontPageNumber); 14317if(!isBooklet)_this.getAnnotations(backPageNumber); 14318_this.annotedPage=basePage; 14319} 14320if(requestCount>0){ 14321break; 14322} 14323} 14324if(requestCount==0){ 14325if(target.mode!=="css"){ 14326_this.setLoading(basePage); 14327} 14328else{ 14329} 14330} 14331} 14332else{ 14333_this.review("Revisit request"); 14334if(_this.annotedPage!=null&&target.mode!=="css"){ 14335var baseActive=getBasePage(target._activePage); 14336$(target.getContentLayer(baseActive)).html(""); 14337$(target.getContentLayer(baseActive+1)).html(""); 14338_this.annotedPage=null; 14339} 14340} 14341}; 14342ContentProvider.prototype.getPage=function(pageNumber,callbackFunction,isThumb){ 14343var _this=this; 14344pageNumber=parseInt(pageNumber,10); 14345var _pageNumber=pageNumber; 14346var source=_this.contentSource; 14347if(pageNumber<=0&&pageNumber>=_this.pageCount){ 14348_this.setPage(pageNumber,defaults.textureLoadFallback,callbackFunction,isThumb); 14349} 14350else{ 14351if(_this.contentSourceType==SOURCE_TYPE.PDF){ 14352if(_this.getCache(pageNumber,isThumb)!=null){ 14353_this.setPage(pageNumber,_this.getCache(pageNumber,isThumb),callbackFunction,isThumb); 14354log("Page "+pageNumber+" loaded from cache"); 14355} 14356else{ 14357if(isThumb!==true)_this.setLoading(pageNumber,true); 14358if(_this.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL&&pageNumber>2){ 14359_pageNumber=Math.ceil((pageNumber-1)/2)+1; 14360} 14361source.getPage(_pageNumber,isThumb).then(function(page){ 14362renderPage(page,pageNumber,callbackFunction,isThumb); 14363}); 14364} 14365} 14366else if(_this.contentSourceType==SOURCE_TYPE.IMAGE||_this.contentSourceType==SOURCE_TYPE.HTML){ 14367if(_this.getCache(pageNumber,isThumb)!=null){ 14368_this.setPage(pageNumber,_this.getCache(pageNumber,isThumb),callbackFunction,isThumb); 14369log("Page "+pageNumber+" loaded from cache"); 14370} 14371else{ 14372if(isThumb!==true)_this.setLoading(pageNumber,true); 14373if(_this.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL&&pageNumber>2){ 14374_pageNumber=Math.ceil((pageNumber-1)/2)+1; 14375} 14376loadImage(source[_pageNumber-1],function(src){ 14377_this.setCache(pageNumber,src,isThumb,_this.cacheIndex); 14378_this.setPage(pageNumber,src,callbackFunction,isThumb); 14379if(callbackFunction!=null)callbackFunction(); 14380},_this.isCrossOrigin); 14381} 14382} 14383} 14384function loadImage(src,callback,isCrossOrigin){ 14385var img=new Image; 14386img.crossOrigin="Anonymous"; 14387img.onload=function(){ 14388if(isCrossOrigin==true){ 14389var canvas=document.createElement("canvas"), 14390ctx=canvas.getContext("2d"); 14391canvas.width=img.width; 14392canvas.height=img.height; 14393ctx.drawImage(img,0,0); 14394if(defaults.canvasToBlob==true){ 14395canvas.toBlob(function(blob){ 14396var src=DFLIP.createObjectURL(blob,"image/jpeg"); 14397if(callback!=null)callback(src); 14398},"image/jpeg",0.85) 14399} 14400else{ 14401if(callback!=null)callback(canvas); 14402} 14403} 14404else{ 14405if(callback!=null)callback(src); 14406} 14407img.onload=null; 14408img=null; 14409}; 14410img.src=src; 14411if(img.complete||img.complete===undefined){ 14412img.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; 14413img.src=src; 14414} 14415} 14416function renderPage(page,pageNumber,callbackFunction,isThumb){ 14417var forceFit=_this.options.forceFit; 14418var isDoublePage=_this.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL&&pageNumber>1&&pageNumber<_this.pageCount; 14419var widthFix=isDoublePage&&forceFit?2:1; 14420var viewport=forceFit?page.getViewport(1):_this.normalViewport; 14421var scale=_this.cacheIndex/Math.max(viewport.width/widthFix,viewport.height); 14422if(_this.webgl==true){ 14423scale=nearestPowerOfTwo(_this.cacheIndex)/(_this.pageRatio>1 14424?viewport.width/widthFix:viewport.height); 14425} 14426var canvas=document.createElement('canvas'); 14427var start=performance.now(); 14428var requestedCacheSize=_this.cacheIndex; 14429var context=canvas.getContext('2d'); 14430if(isThumb==true){ 14431scale=_this.thumbsize/_this.normalViewport.height; 14432} 14433canvas.height=Math.round(viewport.height*scale); 14434canvas.width=Math.round(viewport.width/widthFix*scale); 14435if(_this.targetObject.mode=='css'&&Math.abs(_this.targetObject.zoomHeight-canvas.height)<2){ 14436canvas.height=_this.targetObject.zoomHeight+0; 14437canvas.width=_this.targetObject.zoomWidth+0; 14438} 14439viewport=page.getViewport(scale); 14440log("rendering "+pageNumber+" at "+canvas.width+"x"+canvas.height); 14441if(isDoublePage){ 14442if(isRTLMode(_this.targetObject)){ 14443if(pageNumber%2==0){ 14444viewport.transform[4]=-canvas.width; 14445} 14446}else{ 14447if(pageNumber%2==1){ 14448viewport.transform[4]=-canvas.width; 14449} 14450} 14451} 14452var renderContext={ 14453canvasContext:context, 14454viewport:viewport 14455}; 14456page.cleanupAfterRender=true; 14457var pageRendering=page.render(renderContext); 14458pageRendering.promise.then( 14459function(){ 14460log(performance.now()-start); 14461start=performance.now(); 14462if(isThumb==true||(_this.options.canvasToBlob==true&&_this.webgl!==true)){ 14463canvas.toBlob(function(blob){ 14464var src=DFLIP.createObjectURL(blob,"image/jpeg"); 14465log(performance.now()-start); 14466_this.setCache(pageNumber,src,isThumb,requestedCacheSize); 14467_this.setPage(pageNumber,src,callbackFunction,isThumb); 14468},"image/jpeg",_this.pdfRenderQuality) 14469} 14470else{ 14471log("Setting Page "+pageNumber); 14472_this.setPage(pageNumber,canvas,callbackFunction,isThumb); 14473} 14474renderContext=null; 14475}); 14476} 14477}; 14478ContentProvider.prototype.getTargetPage=function(pageNumber){ 14479}; 14480ContentProvider.prototype.setLoading=function(pageNumber,show){ 14481if(this.targetObject!=null){ 14482if(this.webgl==true){ 14483var container=this.targetObject.container; 14484if(show==true){ 14485if(container.isLoading!==true){ 14486container.addClass("df-loading"); 14487container.isLoading=true; 14488log("Loading icon at "+pageNumber+" as "+show); 14489} 14490} 14491else{ 14492if(container.isLoading!=null){ 14493container.removeClass("df-loading"); 14494container.isLoading=null; 14495log("Loading icon at "+pageNumber+" as "+show); 14496} 14497} 14498}else{ 14499var contentLayer=$(this.targetObject.getContentLayer(pageNumber)); 14500if(contentLayer!=null){ 14501if(show==true)contentLayer.addClass("df-page-loading"); 14502else contentLayer.removeClass("df-page-loading"); 14503log("Loading icon at "+pageNumber+" as "+show); 14504} 14505} 14506} 14507}; 14508ContentProvider.prototype.getAnnotations=function(pageNumber){ 14509var _this=this; 14510if(_this.options.enableAnnotation==false)return; 14511var target=_this.targetObject; 14512pageNumber=parseInt(pageNumber,10); 14513var source=_this.contentSource; 14514var contentLayer=$(target.getContentLayer(pageNumber)); 14515contentLayer.empty(); 14516if(pageNumber>0&&pageNumber<=_this.pageCount){ 14517if(_this.contentSourceType==SOURCE_TYPE.PDF){ 14518var basePage=getBasePage(pageNumber); 14519var _pageNumber=pageNumber; 14520if(_this.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL&&pageNumber>2){ 14521_pageNumber=Math.ceil((pageNumber-1)/2)+1; 14522} 14523source.getPage(_pageNumber).then(function(page){ 14524if(contentLayer!=null&&contentLayer.length>0){ 14525_this.setupAnnotations(page,_this.viewport,contentLayer,pageNumber); 14526} 14527}); 14528} 14529if(_this.links!=null&&_this.links[pageNumber]!=null){ 14530var pageLinks=_this.links[pageNumber]; 14531for(var index=0;
14531index<pageLinks.length;index++){ 14532var pageLink=pageLinks[index]; 14533var annotation; 14534if(pageLink.dest&&pageLink.dest.indexOf&&pageLink.dest.indexOf('[html]')==0){ 14535annotation=document.createElement('div'); 14536annotation.innerHTML=pageLink.dest.substr(6); 14537annotation.className="customHtmlAnnotation"; 14538}else{ 14539annotation=document.createElement('a'); 14540annotation.setAttribute("dest",pageLink.dest); 14541annotation.className="customLinkAnnotation"; 14542annotation.href="#"+pageLink.dest; 14543annotation.onclick=function(){ 14544var dest=this.getAttribute("dest"); 14545if(dest){ 14546_this.linkService.customNavigateTo(dest); 14547} 14548return false; 14549}; 14550} 14551annotation.style.left=pageLink.x+"%"; 14552annotation.style.top=pageLink.y+"%"; 14553annotation.style.width=pageLink.w+"%"; 14554annotation.style.height=pageLink.h+"%"; 14555contentLayer[0].appendChild(annotation); 14556} 14557} 14558if(_this.html!=null&&_this.html[pageNumber]!=null){ 14559var pageHTML=_this.html[pageNumber]; 14560contentLayer.append($("<div class='customHTMLAnnotation'>").html(pageHTML)); 14561} 14562} 14563}; 14564ContentProvider.prototype.setPage=function(pageNumber,textureSrc,callbackFunction,isThumb){ 14565var _this=this; 14566var target=_this.targetObject; 14567var isRTL=isRTLMode(target); 14568var isBooklet=isBookletMode(target); 14569if(isThumb==true){ 14570var page=_this.targetObject.container.find("#df-thumb"+pageNumber); 14571page.css({ 14572backgroundImage:bgImage(textureSrc) 14573}); 14574} 14575else{ 14576if(textureSrc==defaults.textureLoadFallback){ 14577log("Fallback on "+pageNumber); 14578} 14579var bookPage=target.getPageByNumber(pageNumber); 14580if(bookPage!=null){ 14581if( 14582(pageNumber%2!=0&&!isRTL)|| 14583(pageNumber%2!=1&&isRTL&&!isBooklet)||(isBooklet&&!isRTL) 14584){ 14585log(pageNumber+"rendered to back of "+bookPage.color); 14586bookPage.backImage(textureSrc,function(object,texture){ 14587bookPage.backTextureLoaded=true; 14588_this.setLoading(pageNumber); 14589if(_this.requiresImageTextureScaling&&texture&&pageNumber!=1&&pageNumber!=_this.pageCount){ 14590texture.repeat.x=0.5; 14591texture.offset.x=0.5; 14592} 14593if(callbackFunction!=null)callbackFunction(); 14594}); 14595} 14596else{ 14597log(pageNumber+"rendered to front of "+bookPage.color); 14598bookPage.frontImage(textureSrc,function(object,texture){ 14599bookPage.frontTextureLoaded=true; 14600_this.setLoading(pageNumber); 14601if(_this.requiresImageTextureScaling&&texture&&pageNumber!=1&&pageNumber!=_this.pageCount){ 14602texture.repeat.x=0.5; 14603} 14604if(callbackFunction!=null)callbackFunction(); 14605}); 14606} 14607} 14608else{ 14609log("Invalid set request on Page "+pageNumber); 14610} 14611} 14612}; 14613ContentProvider.prototype.setupAnnotations=function(page,viewport,pageDiv,pageNumber){ 14614if(pageDiv==null||$(pageDiv).length==0)return; 14615var _this=this; 14616return page.getAnnotations().then(function(annotationsData){ 14617viewport=viewport.clone({ 14618dontFlip:true 14619}); 14620if(_this.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL&&pageNumber>2&&pageNumber%2==1){ 14621} 14622else if(pageNumber==1){ 14623} 14624if(pageDiv==null){ 14625return; 14626} 14627pageDiv=$(pageDiv); 14628if(pageDiv.find(".annotationDiv").length==0){ 14629pageDiv.append($("<div class='annotationDiv'>")); 14630} 14631var div=pageDiv.find(".annotationDiv"); 14632div.empty(); 14633if(_this.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL&&pageNumber>2&&pageNumber%2==1){ 14634div.css({left:'-100%'}); 14635} 14636else if(pageNumber==1){ 14637div.css({left:''}); 14638} 14639PDFJS.AnnotationLayer.render({ 14640annotations:annotationsData, 14641div:div[0], 14642page:page, 14643viewport:viewport, 14644linkService:_this.linkService 14645}); 14646if(_this.options.annotationClass&&_this.options.annotationClass!==""){ 14647div.find(" > section").addClass(_this.options.annotationClass); 14648} 14649}); 14650}; 14651return ContentProvider; 14652})({}); 14653var PageCSS=(function(){ 14654function PageCSS(parameters){ 14655this.angles=parameters.angles||[0,0,0,0,0,0]; 14656this.stiffness=parameters.angles||0.1; 14657this.segments=parameters.segments||1; 14658this.canvasMode=parameters.contentSourceType!==SOURCE_TYPE.IMAGE&¶meters.canvasToBlob==false; 14659this.initDOM(); 14660} 14661function createInternals(pageSide){ 14662var contentLayer=pageSide.contentLayer=$(html.div,{ 14663class:"df-page-content" 14664}); 14665pageSide.append(contentLayer); 14666} 14667PageCSS.prototype={ 14668initDOM:function(){ 14669var element=this.element=$(html.div,{ 14670class:"df-book-page" 14671}); 14672var wrapper=this.wrapper=$(html.div,{ 14673class:"df-page-wrapper" 14674}); 14675var front=this.front=$(html.div,{ 14676class:"df-page-front" 14677}); 14678var back=this.back=$(html.div,{ 14679class:"df-page-back" 14680}); 14681var foldInnerShadow=this.foldInnerShadow=$(html.div,{ 14682class:"df-page-fold-inner-shadow" 14683}); 14684var foldOuterShadow=this.foldOuterShadow=$(html.div,{ 14685class:"df-page-fold-outer-shadow" 14686}); 14687this.frontIMG=new Image(); 14688this.backIMG=new Image(); 14689createInternals(front,this.segments,true); 14690createInternals(back,this.segments,false); 14691element.append(wrapper).append(foldOuterShadow); 14692wrapper.append(front).append(back).append(foldInnerShadow); 14693}, 14694updatePoint:function(point){ 14695if(point==null)return; 14696var page=this.parent.dragPage!=null?this.parent.dragPage 14697:point.page!=null?point.page:this; 14698var pageWidth=page.element.width(), 14699pageHeight=page.element.height(); 14700var corner=this.parent.corner!=null?this.parent.corner:point.corner, 14701corners=DFLIP.CORNERS; 14702var 14703isRight=page.side==drag.right, 14704isBottom=(corner==corners.BL)||(corner==corners.BR); 14705point.rx=(isRight==true) 14706?pageWidth*2-point.x 14707:point.x; 14708point.ry=(isBottom==true) 14709?pageHeight-point.y 14710:point.y; 14711var radAngle=Math.atan2(point.ry,point.rx); 14712radAngle=Math.PI/2-limitAt(radAngle,0,toRad(90)); 14713var correctionX=isRight 14714?point.x/2 14715:pageWidth-point.x/2, 14716correctionY=point.ry/2, 14717refLength=Math.max(0, 14718Math.sin(radAngle-Math.atan2(correctionY,correctionX))*distOrigin(correctionX, 14719correctionY)), 14720foldLength=0.5*distOrigin(point.rx,point.ry);
14721var x=Math.round(pageWidth-refLength*Math.sin(radAngle)), 14722y=Math.round(refLength*Math.cos(radAngle)), 14723angle=toDeg(radAngle); 14724var angle1=isBottom 14725?isRight?180+(90-angle):180+angle 14726:isRight?angle:90-angle; 14727var angle2=isBottom 14728?isRight?180+(90-angle):angle 14729:isRight?angle+180:angle1, 14730angleS=isBottom 14731?isRight?90-angle:angle+90 14732:isRight?angle1-90:angle1+180, 14733x1=isRight?pageWidth-x:x, 14734y1=isBottom?pageHeight+y:-y, 14735x2=isRight?-x:x-pageWidth, 14736y2=isBottom?-pageHeight-y:y; 14737var opacity=limitAt(point.distance*0.5/pageWidth,0,0.5); 14738var foldOpacity=limitAt((pageWidth*2-point.rx)*0.5/pageWidth,0.05,0.3); 14739page.element.addClass("df-folding"); 14740var front=isRight?page.back:page.front; 14741var back=isRight?page.front:page.back; 14742var outerShadow=page.foldOuterShadow; 14743var innerShadow=page.foldInnerShadow; 14744page.wrapper.css({ 14745transform:translateStr(x1,y1)+rotateStr(angle1) 14746}); 14747front.css({ 14748transform:rotateStr(-angle1)+translateStr(-x1,-y1) 14749}); 14750back.css({ 14751transform:rotateStr(angle2)+translateStr(x2,y2), 14752boxShadow:"rgba(0, 0, 0, "+opacity+") 0px 0px 20px" 14753}); 14754innerShadow.css({ 14755transform:rotateStr(angle2)+translateStr(x2,y2), 14756opacity:foldOpacity/2, 14757backgroundImage:prefix.css+"linear-gradient( "+angleS+"deg, rgba(0, 0, 0, 0.25) , rgb(0, 0, 0) "+foldLength*0.7+"px, rgb(255, 255, 255) "+foldLength+"px)" 14758}); 14759outerShadow.css({ 14760opacity:foldOpacity/2, 14761left:isRight?"auto":0, 14762right:isRight?0:"auto", 14763backgroundImage:prefix.css+"linear-gradient( "+(-angleS+180)+"deg, rgba(0, 0, 0,0) "+foldLength/3+"px, rgb(0, 0, 0) "+foldLength+"px)" 14764}); 14765}, 14766updateAngle:function(angle,isRight){ 14767var width=this.element.width()*5; 14768this.wrapper.css({ 14769perspective:width, 14770perspectiveOrigin:isRight==true?"0% 50%":"100% 50%" 14771}); 14772this.front.css({ 14773display:(isRight==true?(angle<=-90?'block':'none'):(angle<90?'block':'none')), 14774transform:(prefix.dom!=='MfS'?"":"perspective("+width+"px) ") 14775+(isRight==true?"translateX(-100%) ":"") 14776+"rotateY("+((isRight==true?180:0)+angle)+"deg)" 14777}); 14778this.back.css({ 14779display:(isRight==true?(angle>-90?'block':'none'):(angle>=90?'block':'none')), 14780transform:(prefix.dom!=='MSd'?"":"perspective("+width+"px) ") 14781+(isRight==false?"translateX(100%) ":"") 14782+"rotateY("+((isRight==false?-180:0)+angle)+"deg)" 14783}); 14784return; 14785}, 14786tween:function(point){ 14787var page=this; 14788if(page==null||page.parent==null)return; 14789var isBooklet=isBookletMode(page.parent); 14790var isRight=page.side==drag.right; 14791var isRTL=page.parent.direction==DFLIP.DIRECTION.RTL; 14792var isBottom=page.parent.corner==DFLIP.CORNERS.BL||page.parent.corner==DFLIP.CORNERS.BR; 14793var isMagnetic=page.magnetic==true; 14794var travelY=isBottom?page.parent.height:0; 14795var init,first,mid,angle=0; 14796var end=page.end=(page&&page.animateToReset==true) 14797?{x:isRight?page.parent.fullWidth:0,y:travelY} 14798:{x:isRight?0:page.parent.fullWidth,y:travelY}; 14799page.ease=page.isHard?TWEEN.Easing.Quadratic.InOut:TWEEN.Easing.Linear.None; 14800var tempDuration=page.parent.duration; 14801if(page.isHard==true){ 14802if(point!=null){ 14803angle=angleByDistance(point.distance,point.fullWidth); 14804} 14805init=page.init={angle:angle*(isRight?-1:1)}; 14806end=page.end=(page&&page.animateToReset==true) 14807?{angle:isRight?0:-0} 14808:{angle:isRight?-180:180}; 14809}else{ 14810if(point==null){ 14811init=page.init=(page&&page.animateToReset==true) 14812?{x:isRight?0:page.parent.fullWidth,y:0} 14813:{x:isRight?page.parent.fullWidth:0,y:0}; 14814first=page.first={ 14815x:(isRight?3:1)*page.parent.fullWidth/4, 14816y:0 14817}; 14818mid=page.mid={x:(isRight?1:3)*page.parent.fullWidth/4,y:0}; 14819} 14820else{ 14821init=page.init={x:point.x,y:point.y,opacity:1}; 14822first=page.first={x:point.x*3/4,y:point.y*3/4,opacity:1}; 14823mid=page.mid={x:point.x/4,y:point.y/4,opacity:1}; 14824tempDuration=page.parent.duration*distPoints(init.x,init.y,end.x,end.y)/page.parent.fullWidth; 14825tempDuration=limitAt(tempDuration,page.parent.duration/3,page.parent.duration); 14826} 14827} 14828init.index=0; 14829end.index=1; 14830page.isFlipping=true; 14831var update=function(tween){ 14832if(page.isHard==true){ 14833page.updateAngle(tween.angle,isRight); 14834page.angle=tween.angle; 14835}else{ 14836page.updatePoint({ 14837x:tween.x, 14838y:tween.y 14839}); 14840page.x=tween.x; 14841page.y=tween.y; 14842} 14843if(isBooklet&&!isMagnetic) 14844page.element[0].style.opacity=(isRight&&!isRTL)||(!isRight&&isRTL) 14845?tween.index>0.5?2*(1-tween.index):1 14846:tween.index<0.5?2*tween.index:1; 14847}; 14848if(isBooklet&&((!isRight&&!isRTL)||(isRight&&isRTL))) 14849page.element[0].style.opacity=0; 14850var completeTween=page.completeTween=page.completeTween||function(skipRefresh){ 14851page.isFlipping=false; 14852if(page.isHard==true){ 14853page.updateAngle(page.end.angle); 14854page.back.css({display:"block"}); 14855page.front.css({display:"block"}); 14856} 14857else{ 14858page.updatePoint({ 14859x:page.end.x, 14860y:page.end.y 14861}); 14862} 14863page.element[0].style.opacity=1; 14864if(page.animateToReset!==true){ 14865page.side=page.side==drag.right?drag.left:drag.right; 14866} 14867else 14868page.animateToReset=null; 14869page.currentTween=null; 14870page.pendingPoint=null; 14871page.magnetic=false; 14872page.parent.dragPage=null; 14873page.parent.corner=DFLIP.CORNERS.NONE; 14874if(skipRefresh!=true) 14875page.parent.refresh(); 14876}; 14877if(page.isHard==true){ 14878page.currentTween=new TWEEN.Tween(init).delay(0) 14879.to(end,page.parent.duration) 14880.onUpdate(function(){ 14881update(this); 14882}).easing(page.ease) 14883.onComplete(page.completeTween) 14884.start(); 14885}else{ 14886if(point==null){ 14887page.currentTween=new TWEEN.Tween(init).delay(0) 14888.to(end,page.parent.duration) 14889.onUpdate(function(){ 14890update(this); 14891}).easing(TWEEN.Easing.Sinusoidal.Out) 14892.onComplete(page.completeTween) 14893.start(); 14894} 14895else{ 14896page.currentTween=new TWEEN.Tween(init).delay(0) 14897.to(end,tempDuration) 14898.onUpdate(function(){ 14899update(this); 14900}).easing(TWEEN.Easing.Sinusoidal.Out) 14901.onComplete(page.completeTween); 14902page.currentTween.start(); 14903} 14904} 14905}, 14906frontImage:function(texture,callback){ 14907var _this=this; 14908function completed(){ 14909_this.front.css({ 14910backgroundImage:bgImage(texture) 14911}); 14912if(callback!=null)callback(); 14913} 14914if(_this.canvasMode==true){ 14915_this.front.find(">canvas").remove(); 14916if(texture!==defaults.textureLoadFallback){ 14917_this.front.append($(texture)); 14918} 14919if(callback!=null)callback(); 14920} 14921else{ 14922if(texture==defaults.textureLoadFallback){ 14923completed(); 14924}else{ 14925_this.frontIMG.onload=completed; 14926_this.frontIMG.src=texture; 14927} 14928} 14929}, 14930backImage:function(texture,callback){ 14931var _this=this; 14932function completed(){ 14933_this.back.css({ 14934backgroundImage:bgImage(texture) 14935}); 14936if(callback!=null)callback(); 14937} 14938if(_this.canvasMode==true){ 14939_this.back.find(">canvas").remove(); 14940if(texture!==defaults.textureLoadFallback){ 14941_this.back.append($(texture)); 14942} 14943if(callback!=null)callback(); 14944} 14945else{ 14946if(texture==defaults.textureLoadFallback){ 14947completed(); 14948}else{ 14949_this.backIMG.onload=completed; 14950_this.backIMG.src=texture; 14951} 14952} 14953}, 14954updateCSS:function(css){ 14955this.element.css(css); 14956}, 14957resetCSS:function(){ 14958this.wrapper.css({ 14959transform:'' 14960}); 14961this.front.css({ 14962transform:'', 14963boxShadow:'' 14964}); 14965this.back.css({ 14966transform:'', 14967boxShadow:'' 14968}); 14969}, 14970clearTween:function(skipRefresh){ 14971this.currentTween.stop(); 14972this.completeTween(skipRefresh==true); 14973this.resetCSS(); 14974} 14975}; 14976return PageCSS; 14977})(); 14978var BookCSS=(function(_super){ 14979__extends(BookCSS,_super); 14980function updateFolding(dragPage){ 14981dragPage.parent.container.find(".df-folding").removeClass("df-folding"); 14982dragPage.element.addClass("df-folding"); 14983} 14984function hasFlipping(book){ 14985var hasFlipping=false; 14986for(var pageCount=0;pageCount<book.pages.length;pageCount++){ 14987var page=book.pages[pageCount]; 14988if(page.isFlipping==true){ 14989hasFlipping=true; 14990break; 14991} 14992} 14993return hasFlipping; 14994} 14995function BookCSS(parameters,container){ 14996var _this=this; 14997_this.type="BookCSS"; 14998_this.images=parameters.images||[]; 14999_this.pageCount=parameters.pageCount||2; 15000_this.foldSense=50; 15001_this.stackCount=4; 15002_this.mode="css"; 15003_this.pages=[]; 15004_this.duration=parameters.duration; 15005_this.container=$(container); 15006_this.options=parameters; 15007_this.drag=drag.none; 15008_this.pageCount=(_this.pageCount==1?_this.pageCount:Math.ceil(_this.pageCount/2)*2); 15009_this.pageMode=parameters.pageMode||((isMobile||_this.pageCount<=2)?DFLIP.PAGE_MODE.SINGLE 15010:DFLIP.PAGE_MODE.DOUBLE); 15011_this.singlePageMode=parameters.singlePageMode||(isMobile?DFLIP.SINGLE_PAGE_MODE.BOOKLET 15012:DFLIP.SINGLE_PAGE_MODE.ZOOM); 15013_this.swipe_threshold=isMobile?15:50; 15014_this.direction=parameters.direction||DFLIP.DIRECTION.LTR; 15015_this.startPage=1; 15016_this.endPage=_this.pageCount; 15017_this._activePage=parameters.openPage||_this.startPage; 15018_this.hardConfig=parameters.hard; 15019has3d='WebKitCSSMatrix'in window||(document.body&&'MozPerspective'in document.body.style); 15020_this.animateF=function(){ 15021if(TWEEN.getAll().length>0) 15022TWEEN.update(); 15023else 15024clearInterval(_this.animate); 15025}; 15026_this.init(parameters); 15027_this.skipDrag=false; 15028function checkPage(point){ 15029if(_this.dragPage!=point.page&&point.page.visible==true){ 15030_this.dragPage.clearTween(true); 15031_this.dragPage=point.page; 15032_this.corner=point.corner; 15033_this.dragPage.pendingPoint=point; 15034} 15035} 15036var mouseMove=function(event){ 15037var point=_this.eventToPoint(event); 15038if(event.touches!=null&&event.touches.length==2&&_this.startTouches!=null){ 15039_this.zoomDirty=true; 15040var touchCenter=utils.getVectorAvg(utils.getTouches(event,_this.container.offset())), 15041newScale=utils.calculateScale(_this.startTouches,utils.getTouches(event)), 15042scale=newScale/_this.lastScale; 15043var zoom=_this.contentProvider.zoomScale,
15044x=touchCenter.x, 15045y=touchCenter.y; 15046_this.stage.css({ 15047transform:"translate3d("+_this.left+"px,"+_this.top+"px,0) scale3d("+newScale+","+newScale+",1)" 15048}); 15049_this.lastScale=newScale; 15050_this.lastZoomCenter=touchCenter; 15051event.preventDefault(); 15052} 15053if((event.touches!=null&&event.touches.length>1)||_this.startPoint==null||_this.startTouches!=null)return; 15054var targetPage=_this.dragPage||point.page; 15055if(_this.contentProvider.zoomScale!==1){ 15056if((event.touches!=null||_this.isPanning==true)){ 15057_this.pan(point); 15058event.preventDefault(); 15059} 15060} 15061else{ 15062if(_this.skipDrag!==true){ 15063var distance=point.distance; 15064if(!hasFlipping(_this)){ 15065if((_this.dragPage!=null)||(point.isInside==true)){ 15066if(_this.dragPage!=null){ 15067log("set mouse down move"); 15068} 15069else{ 15070point.y=limitAt(point.y,1,_this.height-1); 15071point.x=limitAt(point.x,1,point.fullWidth-1); 15072} 15073var corner=_this.corner||point.corner; 15074if(targetPage.isHard){ 15075var isRight=corner==DFLIP.CORNERS.BR||corner==DFLIP.CORNERS.TR; 15076var angle=angleByDistance(point.distance,point.fullWidth); 15077targetPage.updateAngle(angle*(isRight?-1:1),isRight); 15078} 15079else{ 15080targetPage.updatePoint(point,_this); 15081} 15082targetPage.magnetic=true; 15083targetPage.magneticCorner=point.corner; 15084event.preventDefault(); 15085} 15086if(_this.dragPage==null&&targetPage!=null&&point.isInside==false&&targetPage.magnetic==true){ 15087targetPage.pendingPoint=point; 15088targetPage.animateToReset=true; 15089_this.corner=targetPage.magneticCorner; 15090_this.animatePage(targetPage); 15091targetPage.pendingPoint=null; 15092targetPage.magnetic=false; 15093targetPage.magneticCorner=null; 15094} 15095if(_this.isPanning==true&&_this.dragPage==null&&_this.contentProvider.zoomScale==1){ 15096var swipe_dist=point.x-_this.lastPos, 15097swipe_time=performance.now()-_this.lastTime; 15098if(Math.abs(swipe_dist)>_this.swipe_threshold){ 15099if(swipe_dist<0){ 15100_this.next(); 15101} 15102else{ 15103_this.prev(); 15104} 15105_this.drag=drag.none; 15106_this.isPanning=false; 15107event.preventDefault(); 15108} 15109_this.lastPos=point.x; 15110_this.lastTime=performance.now(); 15111} 15112} 15113} 15114} 15115}, 15116mouseUp=function(event){ 15117if(event.touches!=null&&event.touches.length==0){ 15118var zoom=_this.contentProvider.zoomScale; 15119if(_this.zoomDirty==true){ 15120_this.previewObject.contentProvider.zoomScale= 15121utils.limitAt(_this.previewObject.contentProvider.zoomScale*_this.lastScale, 151221,_this.previewObject.contentProvider.maxZoom); 15123_this.previewObject.zoomValue=_this.previewObject.contentProvider.zoomScale*1; 15124_this.previewObject.resize(); 15125_this.zoomDirty=false; 15126} 15127_this.wrapper.css({ 15128transform:"" 15129}); 15130_this.lastScale=null; 15131_this.startTouches=null; 15132} 15133_this.isPanning=false; 15134if(event.touches!=null&&event.touches.length>1)return; 15135if(_this.skipDrag!==true){ 15136var point=_this.eventToPoint(event); 15137if(_this.dragPage){ 15138event.preventDefault(); 15139_this.dragPage.pendingPoint=point; 15140if(point.x==_this.startPoint.x&&point.y==_this.startPoint.y&&point.isInside==true){ 15141if(_this.corner==DFLIP.CORNERS.BR||_this.corner==DFLIP.CORNERS.TR){ 15142checkPage(point); 15143if(_this.dragPage.isFlipping!==true) 15144_this.next(); 15145} 15146else if(_this.corner==DFLIP.CORNERS.BL||_this.corner==DFLIP.CORNERS.TL){ 15147checkPage(point); 15148if(_this.dragPage.isFlipping!==true) 15149_this.prev(); 15150} 15151} 15152else if(_this.dragPage.isFlipping!==true){ 15153if(point.distance>point.fullWidth/2){ 15154if(point.x>point.fullWidth/2) 15155_this.prev(); 15156else 15157_this.next(); 15158} 15159else{ 15160_this.dragPage.animateToReset=true; 15161_this.animatePage(_this.dragPage); 15162} 15163} 15164if(_this.dragPage){ 15165_this.dragPage.pendingPoint=null; 15166_this.dragPage.magnetic=false; 15167} 15168}else{ 15169} 15170_this.drag=drag.none; 15171} 15172}, 15173mouseClick=function(event){ 15174var point=_this.eventToPoint(event); 15175var element=event.srcElement||event.originalTarget; 15176if(_this.dragPage&&_this.dragPage.magnetic)return; 15177if(_this.wrapper[0].contains(event.target)&&_this.contentProvider.zoomScale==1&&point.x==_this.startPoint.x&&point.y==_this.startPoint.y&&point.isInsidePage&&_this.startPoint.page==point.page&&!point.page.isFlipping&&element.nodeName!=="A"){ 15178if(_this.startPoint.page.side==0){ 15179_this.corner=DFLIP.CORNERS.TL; 15180_this.prev(); 15181_this.startPoint.page=null; 15182} 15183else{ 15184_this.corner=DFLIP.CORNERS.TR; 15185_this.next(); 15186_this.startPoint.page=null; 15187} 15188_this.isPanning=false; 15189} 15190}, 15191mouseDown=function(event){ 15192if(event.touches!=null&&event.touches.length==2&&_this.startTouches==null){ 15193_this.startTouches=utils.getTouches(event); 15194_this.lastScale=1; 15195} 15196if((event.touches!=null&&event.touches.length>1)||(event.touches==null&&event.button!==0))return; 15197var point=_this.eventToPoint(event); 15198_this.startPoint=point; 15199_this.left=_this.left||0; 15200_this.top=_this.top||0; 15201_this.isPanning=true; 15202_this.lastPos=point.x; 15203_this.lastTime=performance.now(); 15204if(_this.skipDrag!==true){ 15205if(point.isInside==true&&!hasFlipping(_this)){ 15206_this.startPoint=point; 15207_this.drag=point.drag; 15208_this.dragPage=point.page; 15209_this.corner=point.corner; 15210log(_this.corner); 15211updateFolding(_this.dragPage); 15212if(point.page.isHard){ 15213} 15214else{ 15215point.page.updatePoint(point,_this); 15216} 15217if(point.page.name=="0"){ 15218_this.shadow.css({ 15219width:'50%', 15220left:_this.direction==DFLIP.DIRECTION.RTL?0:'50%', 15221transitionDelay:'' 15222}); 15223}else if(point.page.name==Math.ceil(_this.pageCount/2)-1){ 15224_this.shadow.css({ 15225width:'50%', 15226left:_this.direction==DFLIP.DIRECTION.RTL?'50%':0, 15227transitionDelay:'' 15228}); 15229} 15230} 15231} 15232}, 15233onMouseWheel=function(event){ 15234var delta=0; 15235if(event.wheelDelta!=null){ 15236delta=event.wheelDelta/120; 15237}else if(event.detail!=null){ 15238delta=-event.detail/3; 15239} 15240var zoom1=_this.contentProvider.zoomScale, 15241maxZoom=_this.contentProvider.maxZoom; 15242if(delta){ 15243if((delta>0&&zoom1<maxZoom)||(delta<0&&zoom1>1)){ 15244event.stopPropagation(); 15245event.preventDefault(); 15246var pointOld=_this.eventToPoint(event); 15247var pointNew=_this.eventToPoint(event); 15248var origin={x:_this.container.width()/2,y:-23+_this.container.height()/2}; 15249_this.previewObject.zoom(delta); 15250var zoom2=_this.contentProvider.zoomScale; 15251if(zoom1!==zoom2){ 15252var dz=(zoom2/zoom1); 15253if(zoom2==1){ 15254_this.left=0; 15255_this.top=0; 15256}else{ 15257_this.left*=dz; 15258_this.top*=dz; 15259} 15260var dx=(pointOld.raw.x-origin.x)*dz, 15261dy=(pointOld.raw.y-origin.y)*dz; 15262pointNew.raw.x=origin.x+dx; 15263pointNew.raw.y=origin.y+dy; 15264_this.startPoint=pointNew; 15265_this.pan(pointOld); 15266var targetPage=_this.dragPage||pointOld.page; 15267if(_this.dragPage==null&&targetPage!=null&&pointOld.isInside==true&&targetPage.magnetic==true){ 15268targetPage.pendingPoint=pointOld; 15269targetPage.animateToReset=true; 15270_this.corner=targetPage.magneticCorner; 15271_this.animatePage(targetPage); 15272targetPage.pendingPoint=null; 15273targetPage.magnetic=false; 15274targetPage.magneticCorner=null; 15275} 15276} 15277} 15278} 15279}; 15280var containerDom=_this.container[0]; 15281var stageDom=_this.stage[0]; 15282if(containerDom){ 15283stageDom.addEventListener("mousemove",mouseMove,false); 15284stageDom.addEventListener("touchmove",mouseMove,false); 15285stageDom.addEventListener("mousedown",mouseDown,false); 15286stageDom.addEventListener("click",mouseClick,false); 15287stageDom.addEventListener("mouseup",mouseUp,false); 15288stageDom.addEventListener("touchend",mouseUp,false); 15289stageDom.addEventListener("touchstart",mouseDown,false); 15290if(_this.options.scrollWheel==true){ 15291stageDom.addEventListener('mousewheel',onMouseWheel,false); 15292stageDom.addEventListener('DOMMouseScroll',onMouseWheel,false); 15293} 15294} 15295this.dispose=function(){ 15296stageDom.removeEventListener("mousemove",mouseMove,false); 15297stageDom.removeEventListener("touchmove",mouseMove,false); 15298stageDom.removeEventListener("mousedown",mouseDown,false); 15299stageDom.removeEventListener("click",mouseClick,false); 15300stageDom.removeEventListener("mouseup",mouseUp,false); 15301stageDom.removeEventListener("touchend",mouseUp,false); 15302stageDom.removeEventListener("touchstart",mouseDown,false); 15303if(_this.options.scrollWheel==true){ 15304stageDom.removeEventListener('mousewheel',onMouseWheel,false); 15305stageDom.removeEventListener('DOMMouseScroll',onMouseWheel,false); 15306} 15307_this.updatePageCallback=null; 15308_this.flipCallback=null; 15309_this.animateF=null; 15310_this.stage.remove(); 15311}; 15312} 15313BookCSS.prototype={ 15314add:function(object){ 15315if(object instanceof PageCSS) 15316this.container.append($(object.element)); 15317else 15318this.container.append($(object)); 15319}, 15320pan:function(point){ 15321var origin=this.startPoint; 15322var scale=this.contentProvider.zoomScale; 15323var left=(this.left+(point.raw.x-origin.raw.x)), 15324top=(this.top+(point.raw.y-origin.raw.y)); 15325this.left=Math.round(limitAt(left,-this.shiftWidth,this.shiftWidth)); 15326this.top=Math.round(limitAt(top,-this.shiftHeight,this.shiftHeight)); 15327if(scale==1){ 15328this.left=0; 15329this.top=0; 15330} 15331this.startPoint=point; 15332this.stage.css({ 15333transform:"translate3d("+this.left+"px,"+this.top+"px,0)" 15334}); 15335}, 15336getPageByNumber:function(pageNumber){ 15337var relativePageNumber=isBookletMode(this)?(isRTLMode(this)?pageNumber+1:pageNumber) 15338:Math.floor((pageNumber-1)/2); 15339var page; 15340for(var count=0;count<this.pages.length;count++){ 15341if(relativePageNumber==parseInt(this.pages[count].name,10)) 15342page=this.pages[count]; 15343} 15344return page; 15345}, 15346getPageSide:function(pageNumber){ 15347var isRTL=this.direction==DFLIP.DIRECTION.RTL; 15348var page=this.getPageByNumber(pageNumber); 15349if(page==null)return; 15350if(isBookletMode(this))return isRTL?page.front:page.back; 15351if(pageNumber%2==0) 15352return isRTL?page.back:page.front; 15353else 15354return isRTL?page.front:page.back; 15355}, 15356getContentLayer:function(pageNumber){ 15357var pageSide=this.getPageSide(pageNumber); 15358return pageSide==null?null:pageSide.contentLayer; 15359} 15360}; 15361BookCSS.prototype.init=function(parameters){ 15362var _this=this; 15363_this.stage=$(html.div,{ 15364class:"df-book-stage" 15365}); 15366_this.wrapper=$(html.div,{ 15367class:"df-book-wrapper" 15368}); 15369_this.shadow=$(html.div,{ 15370class:"df-book-shadow" 15371}); 15372_this.container.append(_this.stage); 15373_this.stage.append(_this.wrapper); 15374_this.wrapper.append(_this.shadow); 15375_this.createStack(parameters); 15376}; 15377BookCSS.prototype.createStack=function(parameters){ 15378var colors="red,green,blue,yellow,orange,black".split(","); 15379for(var _stackCount=0;_stackCount<this.stackCount;_stackCount++){ 15380parameters.angles=[,this.stackCount-_stackCount]; 15381parameters.stiffness=(this.stackCount-_stackCount)/100; 15382var clone=new PageCSS(parameters); 15383clone.angles[1]=180; 15384clone.index=_stackCount; 15385clone.parent=this; 15386clone.textureReady=false; 15387clone.textureRequested=false; 15388this.wrapper.append(clone.element); 15389clone.isFlipping=false; 15390this.pages.push(clone); 15391clone.color=colors[_stackCount]; 15392} 15393this.children=this.pages; 15394}; 15395BookCSS.prototype.isPageHard=function(pageNumber){ 15396return utils.isHardPage(this.hardConfig,pageNumber,this.pageCount,isBookletMode(this)); 15397}; 15398BookCSS.prototype.setDuration=function(_duration){ 15399this.duration=_duration; 15400}; 15401BookCSS.prototype.moveBy=function(step){ 15402var nextPage=this._activePage+step; 15403nextPage=limitAt(nextPage,this.startPage,this.endPage); 15404this.gotoPage(nextPage); 15405}; 15406BookCSS.prototype.next=function(step){ 15407if(step==null) 15408step= 15409(this.direction==DFLIP.DIRECTION.RTL) 15410?-this.pageMode:this.pageMode; 15411this.moveBy(step); 15412}; 15413BookCSS.prototype.prev=function(step){ 15414if(step==null) 15415step= 15416(this.direction==DFLIP.DIRECTION.RTL) 15417?this.pageMode:-this.pageMode; 15418this.moveBy(step); 15419}; 15420BookCSS.prototype.eventToPoint=function(event){ 15421event=fixMouseEvent(event); 15422var wrapper=this.wrapper, 15423pages=this.pages, 15424pageWidth=this.pageWidth, 15425fullWidth=this.fullWidth, 15426height=this.height, 15427win=$(window), 15428point={x:event.clientX,y:event.clientY}; 15429var left=point.x-wrapper[0].getBoundingClientRect().left; 15430var top=point.y-wrapper[0].getBoundingClientRect().top; 15431point.x=point.x-this.container[0].getBoundingClientRect().left; 15432point.y=point.y-this.container[0].getBoundingClientRect().top; 15433var distance=(this.drag==drag.none) 15434?left<pageWidth?left:fullWidth-left 15435:this.drag==drag.left?left:fullWidth-left; 15436var page= 15437(left<pageWidth?pages[this.stackCount/2-1]:pages[this.stackCount/2]); 15438var pageDrag=left<this.foldSense?drag.left 15439:(left>fullWidth-this.foldSense)?drag.right:drag.none; 15440var x=left, 15441y=top, 15442h=height, 15443w=fullWidth, 15444delta=this.foldSense, 15445corners=DFLIP.CORNERS, 15446corner; 15447if(x>=0&&x<delta){ 15448if(y>=0&&y<=delta) 15449corner=corners.TL; 15450else if(y>=h-delta&&y<=h) 15451corner=corners.BL; 15452else if(y>delta&&y<h-delta) 15453corner=corners.L; 15454else 15455corner=corners.NONE; 15456} 15457else if(x>=w-delta&&x<=w){ 15458if(y>=0&&y<=delta) 15459corner=corners.TR; 15460else if(y>=h-delta&&y<=h) 15461corner=corners.BR; 15462else if(y>delta&&y<h-delta) 15463corner=corners.R; 15464else 15465corner=corners.NONE; 15466} 15467else 15468corner=corners.NONE; 15469return{ 15470isInsidePage:x>=0&&x<=w&&y>=0&&y<=h, 15471isInside:corner!==corners.NONE&&corner!==corners.L&&corner!==corners.R, 15472x:left, 15473y:top, 15474fullWidth:fullWidth, 15475rawDistance:fullWidth-left, 15476distance:distance, 15477page:page, 15478drag:pageDrag, 15479foldSense:this.foldSense, 15480event:event, 15481raw:point, 15482corner:corner 15483}; 15484}; 15485BookCSS.prototype.gotoPage=function(pageNumber){ 15486pageNumber=parseInt(pageNumber,10); 15487this._activePage=pageNumber; 15488if(this.autoPlay==true){ 15489this.previewObject.setAutoPlay(this.autoPlay); 15490} 15491this.updatePage(pageNumber); 15492if(this&&this.thumblist&&this.thumblist.review) 15493this.thumblist.review(); 15494}; 15495BookCSS.prototype.refresh=function(){ 15496this.updatePage(this._activePage); 15497if(this.flipCallback!=null)this.flipCallback(); 15498}; 15499BookCSS.prototype.updatePage=function(pageNumber){ 15500var isRTL=(this.direction==DFLIP.DIRECTION.RTL), 15501isBooklet=isBookletMode(this), 15502newBaseNumber=getBasePage(pageNumber); 15503var pageDivisor=isBooklet?1:2; 15504pageNumber=Math.floor((pageNumber/pageDivisor)); 15505if(isRTL)pageNumber=this.pageCount/pageDivisor-pageNumber; 15506var oldBaseNumber=this.oldBaseNumber||0; 15507var pageCount=this.pageCount/pageDivisor; 15508var stackCount=this.stackCount; 15509var midPoint=Math.floor(stackCount/2); 15510if(oldBaseNumber>pageNumber){ 15511this.children[stackCount-1].skipFlip=true; 15512this.children.unshift(this.children.pop()); 15513} 15514else if(oldBaseNumber<pageNumber){ 15515this.children[0].skipFlip=true; 15516this.children.push(this.children.shift()); 15517} 15518for(var _pageCount=0;_pageCount<stackCount;_pageCount++){ 15519var page=this.children[_pageCount]; 15520if(oldBaseNumber!==pageNumber){ 15521if(page.currentTween!=null){ 15522page.clearTween(true); 15523} 15524} 15525var oldSide=page.side; 15526var newSide; 15527var relativePageNumber=pageNumber-midPoint+_pageCount; 15528if(isRTL)relativePageNumber=isBooklet?this.pageCount-relativePageNumber 15529:Math.floor(this.pageCount/2)-relativePageNumber-1; 15530var oldName=page.name; 15531page.isHard=this.isPageHard(relativePageNumber); 15532if(page.isHard){ 15533page.element.addClass("df-hard-page"); 15534}else{ 15535page.element.removeClass("df-hard-page"); 15536page.front.css({display:"block"}); 15537page.back.css({display:"block"}); 15538} 15539if(relativePageNumber==0||relativePageNumber==pageCount){ 15540page.element.addClass("df-cover-page"); 15541}else{ 15542page.element.removeClass("df-cover-page"); 15543} 15544var oldPageNumber=$(page.element).attr("pageNumber"); 15545if(oldPageNumber!=relativePageNumber){ 15546page.front.contentLayer.empty(); 15547page.back.contentLayer.empty(); 15548} 15549$(page.element).attr("pageNumber",relativePageNumber); 15550page.isEdge=false;
15551if(_pageCount==0){ 15552} 15553else if(_pageCount==stackCount-1){ 15554} 15555else{ 15556page.isEdge=false; 15557} 15558if(_pageCount<midPoint){ 15559newSide=drag.left; 15560} 15561else{ 15562newSide=drag.right; 15563} 15564if(page.isFlipping==false){ 15565if(newSide!==oldSide&&page.skipFlip==false){ 15566this.animatePage(page); 15567if(this.preFlipCallback!=null) 15568this.preFlipCallback(); 15569}else{ 15570page.skipFlip=false; 15571page.element.removeClass("df-flipping df-quick-turn df-folding df-left-side df-right-side"); 15572page.element.addClass((_pageCount<midPoint)?"df-left-side":"df-right-side"); 15573page.side=newSide; 15574} 15575} 15576page.visible=isBooklet 15577?(isRTL 15578?(_pageCount<midPoint||page.isFlipping) 15579:(_pageCount>=midPoint||page.isFlipping)) 15580:((relativePageNumber>=0&&relativePageNumber<pageCount)||(isBooklet&&relativePageNumber==pageCount)); 15581if(this.requestPage!=null&&page.visible==true){ 15582page.name=relativePageNumber.toString(); 15583if(page.name!=oldName){ 15584page.backTextureLoaded=false; 15585page.frontTextureLoaded=false; 15586page.backPageStamp="-1"; 15587page.frontPageStamp="-1"; 15588page.thumbLoaded=false; 15589page.front.contentLayer.html(""); 15590page.back.contentLayer.html(""); 15591page.frontImage(defaults.textureLoadFallback); 15592page.backImage(defaults.textureLoadFallback); 15593this.requestPage(); 15594} 15595} 15596page.oldDepth=page.depth; 15597page.updateCSS({ 15598display:page.visible==true?"block":"none", 15599zIndex:6+(_pageCount<midPoint?(_pageCount-midPoint):(midPoint-_pageCount)), 15600transform:'' 15601}); 15602if(page.pendingPoint==null&&page.isFlipping==false){ 15603page.resetCSS(); 15604} 15605} 15606if(TWEEN.getAll().length==0){ 15607clearInterval(this.animate); 15608} 15609$(".quick-hint").html(pageNumber); 15610this.oldBaseNumber=pageNumber; 15611if(this.updatePageCallback) 15612this.updatePageCallback(); 15613}; 15614BookCSS.prototype.animatePage=function(page){ 15615page.element.addClass("df-flipping"); 15616page.isFlipping=true; 15617if(this.animate!=null){ 15618clearInterval(this.animate); 15619} 15620this.animate=setInterval(this.animateF,30); 15621page.tween(page.pendingPoint); 15622}; 15623return BookCSS; 15624}) 15625({}); 15626var FlipBook=(function(_super){ 15627__extends(FlipBook,_super); 15628function FlipBook(container,source,parameters){ 15629_super.call(this,parameters); 15630var _this=this; 15631_this.type="FlipBook"; 15632_this.container=container; 15633_this.options=parameters; 15634_this.options.source=source; 15635_this.contentSource=source; 15636if(parameters.height!=null&¶meters.height.toString().indexOf('%')<0){ 15637_this.container.height(Math.min(parameters.height,$(window).height())); 15638}else{ 15639_this.container.height(parameters.height); 15640} 15641if(_this.options.isLightBox){ 15642window.dfLightBox.closeButton.addClass(_this.options.icons['close']); 15643} 15644if(_this.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL){ 15645if(Array===_this.contentSource.constructor||Array.isArray(_this.contentSource)||_this.contentSource instanceof Array){ 15646_this.options.singlePageMode=DFLIP.SINGLE_PAGE_MODE.ZOOM; 15647} 15648_this.container.addClass("df-double-internal"); 15649} 15650if(!_this.options.isLightBox&&_this.container.attr("id")!=null){ 15651_this.options.id=_this.container.attr("id"); 15652} 15653if(_this.options.parsed!==true&&_this.options.links!=null){ 15654DFLIP.parseLinks(_this.options.links); 15655} 15656var webgl=_this.webgl=parameters.webgl==true&&hasWebgl==true; 15657container.addClass("df-container df-loading df-init df-floating"+" df-controls-"+_this.options.controlsPosition); 15658if(_this.options.transparent==true){ 15659container.addClass("df-transparent"); 15660} 15661if(_this.options.direction==DFLIP.DIRECTION.RTL){ 15662container.addClass("df-rtl"); 15663} 15664_this.container.info=$(html.div,{ 15665class:"loading-info" 15666}).appendTo(_this.container).html("Loading..."); 15667if(userAgent.indexOf('MSIE')!==-1 15668||navigator.appVersion.indexOf('Trident/')>0||(isSafari&&!isIOS)){ 15669_this.options.webgl=false; 15670} 15671if(!!userAgent.match(/msie\s[5-9]/i)){ 15672_this.container.info.html("Your browser (Internet Explorer) is out of date to run DFlip Flipbook Plugin. <br><a href='http://browsehappy.com/'>Upgrade to a new one</a>").addClass("df-old-browser"); 15673container.removeClass("df-loading"); 15674return _this; 15675} 15676var backgroundImage=parameters.backgroundImage==null||parameters.backgroundImage==''?'' 15677:"url('"+parameters.backgroundImage+"')"; 15678_this.container.css({ 15679position:"relative", 15680overflow:"hidden", 15681backgroundColor:parameters.backgroundColor, 15682backgroundImage:backgroundImage 15683}); 15684_this.init(webgl,source); 15685if(_this.options.onCreate!=null) 15686_this.options.onCreate(_this); 15687return _this; 15688} 15689FlipBook.prototype.init=function(webgl){ 15690var _this=this; 15691var book=_this.target; 15692var options=_this.options; 15693if(webgl==true){ 15694var updateMockupJs=function(callback){ 15695var process3d=function(){ 15696MOCKUP.defaults.anisotropy=0; 15697MOCKUP.defaults.groundTexture="blank"; 15698THREE.skipPowerOfTwo=true; 15699RegisterMockupObjects(); 15700if(callback!=null)callback(); 15701}; 15702if(window.MOCKUP==null){
15703_this.updateInfo("Loading WEBGL 3D ..."); 15704if(typeof define==='function'&&define.amd){ 15705requirejs.config({ 15706"paths":{ 15707"three":defaults.threejsSrc.replace(".js","") 15708}, 15709shim:{ 15710'three':{ 15711exports:'THREE' 15712} 15713} 15714}); 15715require(['three'],function(THREE){ 15716window.THREE=THREE; 15717getScript(defaults.mockupjsSrc+"?ver="+DFLIP.version,function(){ 15718process3d(); 15719}); 15720return THREE; 15721}); 15722} 15723else{ 15724getScript(defaults.threejsSrc+"?ver="+DFLIP.version,function(){ 15725getScript(defaults.mockupjsSrc+"?ver="+DFLIP.version,function(){ 15726process3d(); 15727}); 15728}); 15729} 15730} 15731else{ 15732process3d(); 15733} 15734} 15735; 15736updateMockupJs(function(){ 15737_this.container.css({ 15738minHeight:300, 15739minWidth:300 15740}); 15741_this.stage=new PreviewStage(extendOptions(_this.options,{container:_this.container})); 15742_this.stage.previewObject=_this; 15743_this.contentProvider=new ContentProvider(_this.contentSource,function(contentProvider){ 15744var options={ 15745pageCount:contentProvider.pageCount, 15746stackCount:6, 15747segments:20, 15748width:contentProvider.bookSize.width, 15749height:contentProvider.bookSize.height 15750}; 15751_this.checkOpenPage(); 15752_this.target=book=_this.stage.target=new MOCKUP.Book(extendOptions(_this.options,options),_this.stage); 15753_this.extendtarget(); 15754createUI(_this.container,_this); 15755book.ui=_this.ui; 15756book.container=_this.container; 15757contentProvider.webgl=webgl; 15758contentProvider.setTarget(_this.target); 15759book.getContentLayer=function(pageNumber){ 15760var isRTL=book.direction==DFLIP.DIRECTION.RTL, 15761left=_this.stage.cssScene.divLeft.element, 15762right=_this.stage.cssScene.divRight.element; 15763var baseActive=getBasePage(book._activePage); 15764if(isBookletMode(book))return isRTL?left:right; 15765if(pageNumber%2==0) 15766return isRTL?right:left; 15767else 15768return isRTL?left:right; 15769}; 15770book.stage=_this.stage; 15771book.flipCallback=function(){ 15772if(_this.contentProvider){ 15773_this.contentProvider.review("flipCallback"); 15774var baseActive=getBasePage(book._activePage); 15775var width,height; 15776var pageLeft=book.getPageByNumber(baseActive), 15777pageRight=book.getPageByNumber(baseActive+1); 15778var divLeft=book.parent.cssScene.divLeft, 15779divRight=book.parent.cssScene.divRight; 15780var isSingle=book.pageMode==DFLIP.PAGE_MODE.SINGLE; 15781var isRTL=book.direction==DFLIP.DIRECTION.RTL; 15782if(pageLeft!=null&&divLeft!=null){ 15783width=Math.abs(pageLeft.geometry.boundingBox.max.x-pageLeft.geometry.boundingBox.min.x); 15784height=Math.abs(pageLeft.geometry.boundingBox.max.z-pageLeft.geometry.boundingBox.min.z); 15785divLeft.rotation.y=-Math.atan2(height,width)*0.9; 15786divLeft.position.z=height*0.8; 15787divLeft.position.x=height/2.5; 15788$(divLeft.element).css({ 15789width:width, 15790left:-width/2 15791 15792}); 15793} 15794if(pageRight!=null&&divRight!=null){ 15795width=Math.abs(pageRight.geometry.boundingBox.max.x-pageRight.geometry.boundingBox.min.x); 15796height=Math.abs(pageRight.geometry.boundingBox.max.z-pageRight.geometry.boundingBox.min.z); 15797divRight.rotation.y=Math.atan2(height,width)*0.9; 15798divRight.position.z=height*0.8; 15799divRight.position.x=-height/2.5; 15800$(divRight.element).css({ 15801width:width, 15802left:width/2 15803 15804}); 15805} 15806if(_this.options.onFlip!=null) 15807_this.options.onFlip(_this); 15808} 15809}; 15810book.resize=function(){ 15811_this.resize(); 15812}(); 15813book.updatePageCallback=function(){ 15814_this.ui.update(); 15815_this.checkCenter(); 15816_this.stage.renderRequestPending=true; 15817}; 15818var divLeft=$(_this.stage.cssScene.divLeft.element); 15819var divRight=$(_this.stage.cssScene.divRight.element); 15820book.preFlipCallback=function(){ 15821divLeft.empty(); 15822divRight.empty(); 15823if(_this.options.beforeFlip!=null) 15824_this.options.beforeFlip(_this); 15825_this.playSound(); 15826}; 15827$(window).trigger("resize"); 15828divLeft.css({ 15829width:contentProvider.bookSize.width, 15830height:contentProvider.bookSize.height, 15831left:-contentProvider.bookSize.width/2 15832}); 15833divRight.css({ 15834width:contentProvider.bookSize.width, 15835height:contentProvider.bookSize.height, 15836left:contentProvider.bookSize.width/2 15837}); 15838book.ease=TWEEN.Easing.Cubic.InOut; 15839book.contentProvider=contentProvider; 15840book.duration=_this.options.duration; 15841book.gotoPage(book._activePage); 15842book.flipCallback(); 15843if(_this.options.onReady!=null) 15844_this.options.onReady(_this); 15845},options,_this); 15846}); 15847} 15848else{ 15849_this.contentProvider=new ContentProvider(_this.contentSource,function(contentProvider){ 15850var options={ 15851pageCount:contentProvider.pageCount, 15852contentSourceType:contentProvider.contentSourceType 15853}; 15854_this.checkOpenPage(); 15855_this.target=book=new BookCSS(extendOptions(_this.options,options),_this.container); 15856_this.target.previewObject=_this; 15857_this.extendtarget(); 15858createUI(_this.container,_this); 15859contentProvider.webgl=webgl; 15860contentProvider.setTarget(_this.target);
15861contentProvider.waitPeriod=2; 15862book.ease=TWEEN.Easing.Quadratic.InOut; 15863book.duration=_this.options.duration; 15864book.container=_this.container; 15865book.updatePageCallback=function(){ 15866_this.ui.update(); 15867_this.checkCenter(); 15868}; 15869book.resize=function(){ 15870_this.resize(); 15871}(); 15872$(window).trigger("resize"); 15873book.flipCallback=function(){ 15874if(_this.contentProvider){ 15875_this.contentProvider.review("flipCallback"); 15876if(_this.options.onFlip!=null) 15877_this.options.onFlip(_this); 15878} 15879}; 15880book.preFlipCallback=function(){ 15881if(_this.options.beforeFlip!=null) 15882_this.options.beforeFlip(_this); 15883_this.playSound(); 15884}; 15885book.gotoPage(book._activePage); 15886book.flipCallback(); 15887if(_this.options.onReady!=null) 15888_this.options.onReady(_this); 15889},options,_this); 15890} 15891} 15892; 15893FlipBook.prototype.extendtarget=function(){ 15894var _this=this; 15895_this.target.previewObject=_this; 15896_this.target.reset=function(){ 15897for(var pageCount=0;pageCount<_this.target.children.length;pageCount++){ 15898var page=_this.target.children[pageCount]; 15899page.skipFlip=true; 15900page.name='-2'; 15901} 15902_this.contentProvider.annotedPage='-2'; 15903_this.target.refresh(); 15904} 15905}; 15906FlipBook.prototype.getURLHash=function(){ 15907if(this.options.id!=null){ 15908var hash="dflip-"+(this.options.slug!=null?this.options.slug:this.options.id)+"/"; 15909if(this.target!=null&&this.target._activePage!=null){ 15910hash+=this.target._activePage+"/"; 15911} 15912window.location.hash=hash; 15913} 15914return window.location.href; 15915}; 15916FlipBook.prototype.checkOpenPage=function(){ 15917if(this.options.id!=null){ 15918var book=$("#"+this.options.id); 15919if(book.length>0&&book.data("page")!=null){ 15920var pageNumber=parseInt(book.data("page"),10); 15921if(!isNaN(pageNumber)) 15922this.options.openPage=pageNumber; 15923} 15924} 15925}; 15926FlipBook.prototype.end=function(){ 15927this.target.gotoPage(this.target.endPage); 15928}; 15929FlipBook.prototype.gotoPage=function(pageNumber){ 15930this.target.gotoPage(pageNumber); 15931if(this.ui!=null)this.ui.update(); 15932}; 15933FlipBook.prototype.prev=function(){ 15934this.target.prev(); 15935}; 15936FlipBook.prototype.next=function(){ 15937this.target.next(); 15938}; 15939FlipBook.prototype.updateInfo=function(info){ 15940if(this.container&&this.container.info&&this.container.info.html) 15941this.container.info.html(info); 15942} 15943return FlipBook; 15944})(PreviewObject); 15945$.fn.extend({ 15946shelf:function(){ 15947}, 15948flipBook:function(source,options){ 15949return new FlipBook($(this),source,extendDFlipOptions(options)); 15950} 15951}); 15952}) 15953(DFLIP,jQuery); 15954(function(view){ 15955"use strict"; 15956view.URL=view.URL||view.webkitURL; 15957if(view.Blob&&view.URL){ 15958try{ 15959new Blob; 15960return; 15961}catch(e){ 15962} 15963} 15964var BlobBuilder=view.BlobBuilder||view.WebKitBlobBuilder||view.MozBlobBuilder||(function(view){ 15965var 15966get_class=function(object){ 15967return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; 15968},FakeBlobBuilder=function BlobBuilder(){ 15969this.data=[]; 15970},FakeBlob=function Blob(data,type,encoding){ 15971this.data=data; 15972this.size=data.length; 15973this.type=type; 15974this.encoding=encoding; 15975},FBB_proto=FakeBlobBuilder.prototype,FB_proto=FakeBlob.prototype,FileReaderSync=view.FileReaderSync, 15976FileException=function(type){ 15977this.code=this[this.name=type]; 15978},file_ex_codes=( 15979"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " 15980+"NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" 15981).split(" "),file_ex_code=file_ex_codes.length,real_URL=view.URL||view.webkitURL||view, 15982real_create_object_URL=real_URL.createObjectURL,real_revoke_object_URL=real_URL.revokeObjectURL, 15983URL=real_URL,btoa=view.btoa,atob=view.atob,ArrayBuffer=view.ArrayBuffer, 15984Uint8Array=view.Uint8Array,origin=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/ 15985; 15986FakeBlob.fake=FB_proto.fake=true; 15987while(file_ex_code--){ 15988FileException.prototype[file_ex_codes[file_ex_code]]=file_ex_code+1; 15989} 15990if(!real_URL.createObjectURL){ 15991URL=view.URL=function(uri){ 15992var 15993uri_info=document.createElementNS("http://www.w3.org/1999/xhtml","a"),uri_origin 15994; 15995uri_info.href=uri; 15996if(!("origin"in uri_info)){ 15997if(uri_info.protocol.toLowerCase()==="data:"){ 15998uri_info.origin=null; 15999}else{ 16000uri_origin=uri.match(origin); 16001uri_info.origin=uri_origin&&uri_origin[1]; 16002} 16003} 16004return uri_info; 16005}; 16006} 16007URL.createObjectURL=function(blob){ 16008var 16009type=blob.type,data_URI_header 16010; 16011if(type===null){ 16012type="application/octet-stream"; 16013} 16014if(blob instanceof FakeBlob){ 16015data_URI_header="data:"+type; 16016if(blob.encoding==="base64"){ 16017return data_URI_header+";base64,"+blob.data; 16018}else if(blob.encoding==="URI"){ 16019return data_URI_header+","+decodeURIComponent(blob.data); 16020} 16021if(btoa){ 16022return data_URI_header+";base64,"+btoa(blob.data); 16023}else{ 16024return data_URI_header+","+encodeURIComponent(blob.data); 16025} 16026}else if(real_create_object_URL){ 16027return real_create_object_URL.call(real_URL,blob); 16028} 16029}; 16030URL.revokeObjectURL=function(object_URL){ 16031if(object_URL.substring(0,5)!=="data:"&&real_revoke_object_URL){ 16032real_revoke_object_URL.call(real_URL,object_URL); 16033} 16034}; 16035FBB_proto.append=function(data){ 16036var bb=this.data; 16037if(Uint8Array&&(data instanceof ArrayBuffer||data instanceof Uint8Array)){ 16038var 16039str="",buf=new Uint8Array(data),i=0,buf_len=buf.length 16040; 16041for(;i<buf_len;i++){ 16042str+=String.fromCharCode(buf[i]); 16043} 16044bb.push(str); 16045}else if(get_class(data)==="Blob"||get_class(data)==="File"){ 16046if(FileReaderSync){ 16047var fr=new FileReaderSync; 16048bb.push(fr.readAsBinaryString(data)); 16049}else{ 16050throw new FileException("NOT_READABLE_ERR"); 16051} 16052}else if(data instanceof FakeBlob){ 16053if(data.encoding==="base64"&&atob){ 16054bb.push(atob(data.data)); 16055}else if(data.encoding==="URI"){ 16056bb.push(decodeURIComponent(data.data)); 16057}else if(data.encoding==="raw"){ 16058bb.push(data.data); 16059} 16060}else{
16061if(typeof data!=="string"){ 16062data+=""; 16063} 16064bb.push(unescape(encodeURIComponent(data))); 16065} 16066}; 16067FBB_proto.getBlob=function(type){ 16068if(!arguments.length){ 16069type=null; 16070} 16071return new FakeBlob(this.data.join(""),type,"raw"); 16072}; 16073FBB_proto.toString=function(){ 16074return"[object BlobBuilder]"; 16075}; 16076FB_proto.slice=function(start,end,type){ 16077var args=arguments.length; 16078if(args<3){ 16079type=null; 16080} 16081return new FakeBlob( 16082this.data.slice(start,args>1?end:this.data.length),type,this.encoding 16083); 16084}; 16085FB_proto.toString=function(){ 16086return"[object Blob]"; 16087}; 16088FB_proto.close=function(){ 16089this.size=0; 16090delete this.data; 16091}; 16092return FakeBlobBuilder; 16093}(view)); 16094view.Blob=function(blobParts,options){ 16095var type=options?(options.type||""):""; 16096var builder=new BlobBuilder(); 16097if(blobParts){ 16098for(var i=0,len=blobParts.length;i<len;i++){ 16099if(Uint8Array&&blobParts[i]instanceof Uint8Array){ 16100builder.append(blobParts[i].buffer); 16101} 16102else{ 16103builder.append(blobParts[i]); 16104} 16105} 16106} 16107var blob=builder.getBlob(type); 16108if(!blob.slice&&blob.webkitSlice){ 16109blob.slice=blob.webkitSlice; 16110} 16111return blob; 16112}; 16113var getPrototypeOf=Object.getPrototypeOf||function(object){ 16114return object.__proto__; 16115}; 16116view.Blob.prototype=getPrototypeOf(new view.Blob()); 16117}(window)); 16118(function(view){ 16119"use strict"; 16120var 16121Uint8Array=view.Uint8Array,HTMLCanvasElement=view.HTMLCanvasElement, 16122canvas_proto=HTMLCanvasElement&&HTMLCanvasElement.prototype,is_base64_regex=/\s*;\s*base64\s*(?:;|$)/i, 16123to_data_url="toDataURL",base64_ranks,decode_base64=function(base64){ 16124var 16125len=base64.length,buffer=new Uint8Array(len/4*3|0),i=0,outptr=0,last=[0,0],state=0, 16126save=0,rank,code; 16127while(len--){ 16128code=base64.charCodeAt(i++); 16129rank=base64_ranks[code-43]; 16130if(rank!==255&&rank!=null){ 16131last[1]=last[0]; 16132last[0]=code; 16133save=(save<<6)|rank; 16134state++; 16135if(state===4){ 16136buffer[outptr++]=save>>>16; 16137if(last[1]!==61){ 16138buffer[outptr++]=save>>>8; 16139} 16140if(last[0]!==61){ 16141buffer[outptr++]=save; 16142} 16143state=0; 16144} 16145} 16146} 16147return buffer; 16148} 16149; 16150if(Uint8Array){ 16151base64_ranks=new Uint8Array([ 1615262,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51 16153]); 16154} 16155if(HTMLCanvasElement&&!canvas_proto.toBlob){ 16156canvas_proto.toBlob=function(callback,type){ 16157if(!type){ 16158type="image/png"; 16159} 16160if(this.mozGetAsFile){ 16161callback(this.mozGetAsFile("canvas",type)); 16162return; 16163} 16164if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(type)){ 16165callback(this.msToBlob()); 16166return; 16167} 16168var 16169args=Array.prototype.slice.call(arguments,1), 16170dataURI=this[to_data_url].apply(this,args), 16171header_end=dataURI.indexOf(","), 16172data=dataURI.substring(header_end+1), 16173is_base64=is_base64_regex.test(dataURI.substring(0,header_end)), 16174blob 16175; 16176if(Blob.fake){ 16177blob=new Blob; 16178if(is_base64){ 16179blob.encoding="base64"; 16180}else{ 16181blob.encoding="URI"; 16182} 16183blob.data=data; 16184blob.size=data.length; 16185}else if(Uint8Array){ 16186if(is_base64){ 16187blob=new Blob([decode_base64(data)],{type:type}); 16188}else{ 16189blob=new Blob([decodeURIComponent(data)],{type:type}); 16190} 16191} 16192callback(blob); 16193}; 16194if(canvas_proto.toDataURLHD){ 16195canvas_proto.toBlobHD=function(){ 16196to_data_url="toDataURLHD"; 16197var blob=this.toBlob(); 16198to_data_url="toDataURL"; 16199return blob; 16200} 16201}else{ 16202canvas_proto.toBlobHD=canvas_proto.toBlob; 16203} 16204} 16205}(window)); 16206(function PerformanceNowPolyfill(){ 16207if('performance'in window===false){ 16208window.performance={}; 16209} 16210Date.now=(Date.now||function(){ 16211return new Date().getTime(); 16212}); 16213if('now'in window.performance===false){ 16214var offset=window.performance.timing&&window.performance.timing.navigationStart 16215?window.performance.timing.navigationStart 16216:Date.now(); 16217window.performance.now=function(){ 16218return Date.now()-offset; 16219}; 16220} 16221})(); 16222(function TweenJs(){ 16223var TWEEN=TWEEN||(function(){ 16224var _tweens=[]; 16225return{ 16226getAll:function(){ 16227return _tweens; 16228}, 16229removeAll:function(){ 16230_tweens=[]; 16231}, 16232add:function(tween){ 16233_tweens.push(tween); 16234}, 16235remove:function(tween){ 16236var i=_tweens.indexOf(tween); 16237if(i!==-1){ 16238_tweens.splice(i,1); 16239} 16240}, 16241update:function(time){ 16242if(_tweens.length===0){ 16243return false; 16244} 16245var i=0; 16246time=time!=null?time:window.performance.now(); 16247while(i<_tweens.length){ 16248if(_tweens[i].update(time)){ 16249i++; 16250}else{ 16251_tweens.splice(i,1); 16252} 16253} 16254return true; 16255} 16256}; 16257})(); 16258TWEEN.Tween=function(object){ 16259var _object=object; 16260var _valuesStart={}; 16261var _valuesEnd={}; 16262var _valuesStartRepeat={}; 16263var _duration=1000; 16264var _repeat=0; 16265var _yoyo=false; 16266var _isPlaying=false; 16267var _reversed=false; 16268var _delayTime=0; 16269var _startTime=null; 16270var _easingFunction=TWEEN.Easing.Linear.None; 16271var _interpolationFunction=TWEEN.Interpolation.Linear; 16272var _chainedTweens=[]; 16273var _onStartCallback=null; 16274var _onStartCallbackFired=false; 16275var _onUpdateCallback=null; 16276var _onCompleteCallback=null; 16277var _onStopCallback=null; 16278for(var field in object){ 16279_valuesStart[field]=parseFloat(object[field],10); 16280} 16281this.to=function(properties,duration){ 16282if(duration!=null){ 16283_duration=duration; 16284} 16285_valuesEnd=properties; 16286return this; 16287}; 16288this.start=function(time){ 16289TWEEN.add(this); 16290_isPlaying=true; 16291_onStartCallbackFired=false; 16292_startTime=time!=null?time:window.performance.now(); 16293_startTime+=_delayTime; 16294for(var property in _valuesEnd){ 16295if(_valuesEnd[property]instanceof Array){ 16296if(_valuesEnd[property].length===0){ 16297continue; 16298} 16299_valuesEnd[property]=[_object[property]].concat(_valuesEnd[property]); 16300} 16301if(_valuesStart[property]===null){ 16302continue; 16303} 16304_valuesStart[property]=_object[property]; 16305if((_valuesStart[property]instanceof Array)===false){ 16306_valuesStart[property]*=1.0; 16307} 16308_valuesStartRepeat[property]=_valuesStart[property]||0; 16309} 16310return this; 16311}; 16312this.stop=function(){ 16313if(!_isPlaying){ 16314return this; 16315} 16316TWEEN.remove(this); 16317_isPlaying=false; 16318if(_onStopCallback!==null){ 16319_onStopCallback.call(_object); 16320} 16321this.stopChainedTweens(); 16322return this; 16323}; 16324this.stopChainedTweens=function(){ 16325for(var i=0,numChainedTweens=_chainedTweens.length;i<numChainedTweens;i++){ 16326_chainedTweens[i].stop(); 16327} 16328}; 16329this.complete=function(){ 16330if(!_isPlaying){ 16331return this; 16332} 16333TWEEN.remove(this); 16334_isPlaying=false; 16335if(_onCompleteCallback!==null){ 16336_onCompleteCallback.call(_object); 16337} 16338this.completeChainedTweens(); 16339return this; 16340}; 16341this.completeChainedTweens=function(){ 16342for(var i=0,numChainedTweens=_chainedTweens.length;i<numChainedTweens;i++){ 16343_chainedTweens[i].complete(); 16344} 16345}; 16346this.delay=function(amount){ 16347_delayTime=amount; 16348return this; 16349}; 16350this.repeat=function(times){ 16351_repeat=times; 16352return this; 16353}; 16354this.yoyo=function(yoyo){ 16355_yoyo=yoyo; 16356return this; 16357}; 16358this.easing=function(easing){ 16359_easingFunction=easing==null?_easingFunction:easing; 16360return this; 16361}; 16362this.interpolation=function(interpolation){ 16363_interpolationFunction=interpolation; 16364return this; 16365}; 16366this.chain=function(){ 16367_chainedTweens=arguments; 16368return this; 16369}; 16370this.onStart=function(callback){ 16371_onStartCallback=callback; 16372return this; 16373}; 16374this.onUpdate=function(callback){ 16375_onUpdateCallback=callback; 16376return this; 16377}; 16378this.onComplete=function(callback){ 16379_onCompleteCallback=callback; 16380return this; 16381}; 16382this.onStop=function(callback){ 16383_onStopCallback=callback; 16384return this; 16385}; 16386this.update=function(time){ 16387var property; 16388var elapsed; 16389var value; 16390if(time<_startTime){ 16391return true; 16392} 16393if(_onStartCallbackFired===false){ 16394if(_onStartCallback!==null){ 16395_onStartCallback.call(_object); 16396} 16397_onStartCallbackFired=true; 16398} 16399elapsed=(time-_startTime)/_duration; 16400elapsed=elapsed>1?1:elapsed; 16401value=_easingFunction(elapsed); 16402for(property in _valuesEnd){ 16403if(_valuesStart[property]===null){ 16404continue; 16405} 16406var start=_valuesStart[property]||0; 16407var end=_valuesEnd[property]; 16408if(end instanceof Array){
16409_object[property]=_interpolationFunction(end,value); 16410}else{ 16411if(typeof(end)==='string'){ 16412if(end.startsWith('+')||end.startsWith('-')){ 16413end=start+parseFloat(end,10); 16414}else{ 16415end=parseFloat(end,10); 16416} 16417} 16418if(typeof(end)==='number'){ 16419_object[property]=start+(end-start)*value; 16420} 16421} 16422} 16423if(_onUpdateCallback!==null){ 16424_onUpdateCallback.call(_object,value); 16425} 16426if(elapsed===1){ 16427if(_repeat>0){ 16428if(isFinite(_repeat)){ 16429_repeat--; 16430} 16431for(property in _valuesStartRepeat){ 16432if(typeof(_valuesEnd[property])==='string'){ 16433_valuesStartRepeat[property]=_valuesStartRepeat[property]+parseFloat(_valuesEnd[property],10); 16434} 16435if(_yoyo){ 16436var tmp=_valuesStartRepeat[property]; 16437_valuesStartRepeat[property]=_valuesEnd[property]; 16438_valuesEnd[property]=tmp; 16439} 16440_valuesStart[property]=_valuesStartRepeat[property]; 16441} 16442if(_yoyo){ 16443_reversed=!_reversed; 16444} 16445_startTime=time+_delayTime; 16446return true; 16447}else{ 16448if(_onCompleteCallback!==null){ 16449_onCompleteCallback.call(_object); 16450} 16451for(var i=0,numChainedTweens=_chainedTweens.length;i<numChainedTweens;i++){ 16452_chainedTweens[i].start(_startTime+_duration); 16453} 16454return false; 16455} 16456} 16457return true; 16458}; 16459}; 16460TWEEN.Easing={ 16461Linear:{ 16462None:function(k){ 16463return k; 16464} 16465}, 16466Quadratic:{ 16467In:function(k){ 16468return k*k; 16469}, 16470Out:function(k){ 16471return k*(2-k); 16472}, 16473InOut:function(k){ 16474if((k*=2)<1){ 16475return 0.5*k*k; 16476} 16477return-0.5*(--k*(k-2)-1); 16478} 16479}, 16480Quartic:{ 16481In:function(k){ 16482return k*k*k*k; 16483}, 16484Out:function(k){ 16485return 1-(--k*k*k*k); 16486}, 16487InOut:function(k){ 16488if((k*=2)<1){ 16489return 0.5*k*k*k*k; 16490} 16491return-0.5*((k-=2)*k*k*k-2); 16492} 16493}, 16494Sinusoidal:{ 16495In:function(k){ 16496return 1-Math.cos(k*Math.PI/2); 16497}, 16498Out:function(k){ 16499return Math.sin(k*Math.PI/2); 16500}, 16501InOut:function(k){ 16502return 0.5*(1-Math.cos(Math.PI*k)); 16503} 16504}, 16505Cubic:{ 16506In:function(k){ 16507return k*k*k; 16508}, 16509Out:function(k){ 16510return--k*k*k+1; 16511}, 16512InOut:function(k){ 16513if((k*=2)<1){ 16514return 0.5*k*k*k; 16515} 16516return 0.5*((k-=2)*k*k+2); 16517} 16518} 16519}; 16520TWEEN.Interpolation={ 16521Linear:function(v,k){ 16522var m=v.length-1; 16523var f=m*k; 16524var i=Math.floor(f); 16525var fn=TWEEN.Interpolation.Utils.Linear; 16526if(k<0){ 16527return fn(v[0],v[1],f); 16528} 16529if(k>1){ 16530return fn(v[m],v[m-1],m-f); 16531} 16532return fn(v[i],v[i+1>m?m:i+1],f-i); 16533}, 16534Bezier:function(v,k){ 16535var b=0; 16536var n=v.length-1; 16537var pw=Math.pow; 16538var bn=TWEEN.Interpolation.Utils.Bernstein; 16539for(var i=0;i<=n;i++){ 16540b+=pw(1-k,n-i)*pw(k,i)*v[i]*bn(n,i); 16541} 16542return b; 16543}, 16544Utils:{ 16545Linear:function(p0,p1,t){ 16546return(p1-p0)*t+p0; 16547}, 16548Bernstein:function(n,i){ 16549var fc=TWEEN.Interpolation.Utils.Factorial; 16550return fc(n)/fc(i)/fc(n-i); 16551}, 16552Factorial:(function(){ 16553var a=[1]; 16554return function(n){ 16555var s=1; 16556if(a[n]){ 16557return a[n]; 16558} 16559for(var i=n;i>1;i--){ 16560s*=i; 16561} 16562a[n]=s; 16563return s; 16564}; 16565})(), 16566CatmullRom:function(p0,p1,p2,p3,t){ 16567var v0=(p2-p0)*0.5; 16568var v1=(p3-p1)*0.5; 16569var t2=t*t; 16570var t3=t*t2; 16571return(2*p1-2*p2+v0+v1)*t3+(-3*p1+3*p2-2*v0-v1)*t2+v0*t+p1; 16572} 16573} 16574}; 16575window.TWEEN=TWEEN; 16576})(); 16577DFLIP.createBlob=function createBlob(data,contentType){ 16578if(typeof Blob!=='undefined'){ 16579return new Blob([data],{type:contentType}); 16580} 16581var bb=new MozBlobBuilder(); 16582bb.append(data); 16583return bb.getBlob(contentType); 16584}; 16585DFLIP.createObjectURL=(function createObjectURLClosure(){ 16586var digits= 16587'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 16588return function createObjectURL(data,contentType){ 16589if(typeof URL!=='undefined'&&URL.createObjectURL){ 16590var blob=DFLIP.createBlob(data,contentType); 16591return URL.createObjectURL(blob); 16592} 16593var buffer='data:'+contentType+';base64,'; 16594for(var i=0,ii=data.length;i<ii;i+=3){ 16595var b1=data[i]&0xFF; 16596var b2=data[i+1]&0xFF; 16597var b3=data[i+2]&0xFF; 16598var d1=b1>>2,d2=((b1&3)<<4)|(b2>>4); 16599var d3=i+1<ii?((b2&0xF)<<2)|(b3>>6):64; 16600var d4=i+2<ii?(b3&0x3F):64; 16601buffer+=digits[d1]+digits[d2]+digits[d3]+digits[d4]; 16602} 16603return buffer; 16604}; 16605})(); 16606var ThumbList=(function ThumbListClosure(){ 16607function ThumbList(config){ 16608var width=(config&&config.w+'px')||'100%'; 16609var height=(config&&config.h+'px')||'100%'; 16610var itemHeight=this.itemHeight=config.itemHeight; 16611this.items=config.items; 16612this.generatorFn=config.generatorFn; 16613this.totalRows=config.totalRows||(config.items&&config.items.length); 16614this.addFn=config.addFn; 16615this.scrollFn=config.scrollFn; 16616var scroller=ThumbList.createScroller(itemHeight*this.totalRows); 16617this.container=ThumbList.createContainer(width,height); 16618this.container.appendChild(scroller); 16619this.screenItemsLen=Math.ceil(config.h/itemHeight); 16620this.offsetItems=this.screenItemsLen; 16621this.cachedItemsLen=this.screenItemsLen+this.offsetItems*2; 16622this._renderChunk(this.container,0); 16623var self=this; 16624self.lastRepaintY=0; 16625var maxBuffer=this.screenItemsLen*itemHeight; 16626var lastScrolled=0; 16627var requestInterval; 16628function onScroll(e){ 16629var scrollTop=e.target.scrollTop; 16630if(!self.lastRepaintY||Math.abs(scrollTop-self.lastRepaintY)>=(self.offsetItems*self.itemHeight)){ 16631var first=parseInt(scrollTop/itemHeight,10)-self.offsetItems; 16632self._renderChunk(self.container,first<0?0:first); 16633self.lastRepaintY=scrollTop; 16634} 16635self.lastScrolled=lastScrolled=Date.now(); 16636if(self.scrollFn!=null){ 16637self.scrollFn(); 16638} 16639e.preventDefault&&e.preventDefault(); 16640} 16641self.dispose=function(){ 16642if(self.container){ 16643if(self.container.parentNode){ 16644self.container.parentNode.removeChild(self.container); 16645} 16646} 16647self.container.removeEventListener('scroll',onScroll); 16648}; 16649self.container.addEventListener('scroll',onScroll); 16650} 16651ThumbList.prototype.reset=function(height){ 16652this.screenItemsLen=Math.ceil(height/this.itemHeight); 16653this.cachedItemsLen=this.screenItemsLen+this.offsetItems*2; 16654var first=parseInt(this.lastRepaintY/this.itemHeight,10)-this.offsetItems; 16655this.needReset=true; 16656this._renderChunk(this.container,Math.max(first,0)); 16657}; 16658ThumbList.prototype.createRow=function(i){ 16659var item; 16660if(this.generatorFn){ 16661item=this.generatorFn(i); 16662item.classList.add('df-vrow'); 16663item.style.position='absolute'; 16664item.style.top=(i*this.itemHeight)+'px'; 16665item.setAttribute("index",i); 16666} 16667return item; 16668}; 16669ThumbList.prototype._renderChunk=function(node,from){ 16670var isEmpty=this.range==null; 16671this.range=this.range||{min:0,max:this.cachedItemsLen}; 16672var range=this.range; 16673var min=range.min,max=range.max; 16674var isAdd=isEmpty?true:from>=min; 16675if(!isEmpty&&from==min&&this.needReset==false)return; 16676var countVar; 16677var start=isEmpty?min:isAdd?max:from; 16678start=start>this.totalRows?this.totalRows 16679:start<0?0:start; 16680var end=from+this.cachedItemsLen;
16681end=end>this.totalRows?this.totalRows:end; 16682for(countVar=start;countVar<end;countVar++){ 16683if(isAdd) 16684node.appendChild(this.createRow(countVar)); 16685else 16686node.insertBefore(this.createRow(countVar),node.childNodes[1+countVar-start]); 16687if(this.addFn!=null){ 16688this.addFn(countVar); 16689} 16690} 16691var difference=Math.abs(from-min); 16692this.needReset=false; 16693if(!isEmpty&&node.childNodes.length>(this.cachedItemsLen+1)){ 16694var delStart=isAdd?1:1+this.cachedItemsLen, 16695delEnd=delStart+(end-start); 16696for(var j=delEnd;j>delStart;j--){ 16697if(node.childNodes[delStart]) 16698this.container.removeChild(node.childNodes[delStart]); 16699} 16700} 16701this.range.min=from; 16702this.range.max=end; 16703}; 16704ThumbList.createContainer=function(w,h){ 16705var c=document.createElement('div'); 16706c.style.width=w; 16707c.style.height=h; 16708c.style.overflow='auto'; 16709c.style.position='relative'; 16710c.style.padding=0; 16711return c; 16712}; 16713ThumbList.createScroller=function(h){ 16714var scroller=document.createElement('div'); 16715scroller.style.opacity=0; 16716scroller.style.position='absolute'; 16717scroller.style.top=0; 16718scroller.style.left=0; 16719scroller.style.width='1px'; 16720scroller.style.height=h+'px'; 16721return scroller; 16722}; 16723return ThumbList; 16724})(); 16725var BookMarkViewer=(function BookMarkViewerClosure(){ 16726function BookMarkViewer(options){ 16727this.outline=null; 16728this.lastToggleIsShow=true; 16729this.container=options.container; 16730this.linkService=options.linkService; 16731this.outlineItemClass=options.outlineItemClass||"outlineItem"; 16732this.outlineToggleClass=options.outlineToggleClass||"outlineItemToggler"; 16733this.outlineToggleHiddenClass=options.outlineToggleHiddenClass||"outlineItemsHidden"; 16734} 16735BookMarkViewer.prototype={ 16736dispose:function(){ 16737if(this.container){ 16738if(this.container.parentNode){ 16739this.container.parentNode.removeChild(this.container); 16740} 16741} 16742this.linkService=null; 16743}, 16744reset:function BookMarkViewer_reset(){ 16745this.outline=null; 16746this.lastToggleIsShow=true; 16747var container=this.container; 16748while(container.firstChild){ 16749container.removeChild(container.firstChild); 16750} 16751}, 16752_dispatchEvent:function BookMarkViewer_dispatchEvent(outlineCount){ 16753var event=document.createEvent('CustomEvent'); 16754event.initCustomEvent('outlineloaded',true,true,{ 16755outlineCount:outlineCount 16756}); 16757this.container.dispatchEvent(event); 16758}, 16759_bindLink:function BookMarkViewer_bindLink(element,item){ 16760var linkService=this.linkService; 16761if(item.custom==true){ 16762element.href=linkService.getCustomDestinationHash(item.dest); 16763element.onclick=function goToDestination(e){ 16764linkService.customNavigateTo(item.dest); 16765return false; 16766}; 16767} 16768else{ 16769if(item.url){ 16770PDFJS.addLinkAttributes(element,{url:item.url}); 16771return; 16772} 16773element.href=linkService.getDestinationHash(item.dest); 16774element.onclick=function goToDestination(e){ 16775linkService.navigateTo(item.dest); 16776return false; 16777}; 16778} 16779}, 16780_addToggleButton:function BookMarkViewer_addToggleButton(div){ 16781var toggler=document.createElement('div'); 16782toggler.className=this.outlineToggleClass+" "+this.outlineToggleHiddenClass; 16783toggler.onclick=function(event){ 16784event.stopPropagation(); 16785toggler.classList.toggle(this.outlineToggleHiddenClass); 16786if(event.shiftKey){ 16787var shouldShowAll=!toggler.classList.contains(this.outlineToggleHiddenClass); 16788this._toggleOutlineItem(div,shouldShowAll); 16789} 16790}.bind(this); 16791div.insertBefore(toggler,div.firstChild); 16792}, 16793_toggleOutlineItem:function BookMarkViewer_toggleOutlineItem(root,show){ 16794this.lastToggleIsShow=show; 16795var togglers=root.querySelectorAll('.'+this.outlineToggleClass); 16796for(var i=0,ii=togglers.length;i<ii;++i){ 16797togglers[i].classList[show?'remove':'add'](this.outlineToggleHiddenClass); 16798} 16799}, 16800toggleOutlineTree:function BookMarkViewer_toggleOutlineTree(){ 16801if(!this.outline){ 16802return; 16803} 16804this._toggleOutlineItem(this.container,!this.lastToggleIsShow); 16805}, 16806render:function BookMarkViewer_render(params){ 16807var outline=(params&¶ms.outline)||null; 16808var outlineCount=0; 16809if(this.outline){ 16810this.reset(); 16811} 16812this.outline=outline; 16813if(!outline){ 16814return; 16815} 16816var fragment=document.createDocumentFragment(); 16817var queue=[{parent:fragment,items:this.outline}]; 16818var hasAnyNesting=false; 16819while(queue.length>0){ 16820var levelData=queue.shift(); 16821var isCustom=levelData.custom; 16822for(var i=0,len=levelData.items.length;i<len;i++){ 16823var item=levelData.items[i]; 16824var div=document.createElement('div'); 16825div.className=this.outlineItemClass; 16826var element=document.createElement('a'); 16827if(item.custom==null&&isCustom!=null) 16828item.custom=isCustom; 16829this._bindLink(element,item); 16830element.textContent=item.title.replace(/\x00/g,''); 16831div.appendChild(element); 16832if(item.items&&item.items.length>0){ 16833hasAnyNesting=true; 16834this._addToggleButton(div); 16835var itemsDiv=document.createElement('div'); 16836itemsDiv.className=this.outlineItemClass+"s"; 16837div.appendChild(itemsDiv); 16838queue.push({parent:itemsDiv,custom:item.custom,items:item.items}); 16839} 16840levelData.parent.appendChild(div); 16841outlineCount++; 16842} 16843} 16844if(hasAnyNesting){ 16845if(this.container.classList!=null){ 16846this.container.classList.add(this.outlineItemClass+"s"); 16847} 16848else if(this.container.className!=null){ 16849this.container.className+=" picWindow"; 16850} 16851} 16852this.container.appendChild(fragment); 16853this._dispatchEvent(outlineCount); 16854} 16855}; 16856return BookMarkViewer; 16857})(); 16858var DFLightBox=(function DFLightBoxClosure($){ 16859function DFLightBox(closeCallback,options){ 16860this.duration=300; 16861var _this=this; 16862_this.lightboxWrapper=$("<div>").addClass("df-lightbox-wrapper"); 16863_this.container=$("<div>").addClass("df-container").appendTo(_this.lightboxWrapper); 16864_this.controls=$("<div>").addClass("df-lightbox-controls").appendTo(_this.lightboxWrapper); 16865_this.closeButton=$("<div>").addClass("df-lightbox-close df-ui-btn") 16866.on("click",function(){ 16867_this.close(closeCallback); 16868}) 16869.appendTo(_this.controls); 16870_this.lightboxWrapper.append(_this.container); 16871return _this; 16872} 16873DFLightBox.prototype.show=function(callback){ 16874if(this.lightboxWrapper.parent().length==0) 16875$("body").append(this.lightboxWrapper); 16876this.lightboxWrapper.fadeIn(this.duration,callback); 16877return this; 16878}; 16879DFLightBox.prototype.close=function(callback){ 16880this.lightboxWrapper.fadeOut(this.duration); 16881setTimeout(callback,this.duration); 16882return this; 16883}; 16884return DFLightBox; 16885})(jQuery); 16886DFLIP.Share=(function ShareClosure($){ 16887function Share(container,options){ 16888var _this=this; 16889var htmlDiv='<div>'; 16890var shareButtonClass="df-share-button"; 16891var windowParameters="width=500,height=400"; 16892_this.isOpen=false; 16893_this.shareUrl=""; 16894_this.wrapper=$('<div class="df-share-wrapper" style="display: none;">') 16895.on("click",function(e){ 16896_this.close(); 16897}); 16898_this.box=$('<div class="df-share-box">') 16899.on("click",function(e){ 16900e.preventDefault(); 16901e.stopPropagation(); 16902}).appendTo(_this.wrapper).html('<span class="df-share-title">'+options.text.share+'</span>'); 16903_this.urlInput=$('<textarea class="df-share-url">').on("click",function(){ 16904$(this).select(); 16905}); 16906_this.facebook=$(htmlDiv,{ 16907class:shareButtonClass+" df-share-facebook "+options.icons['facebook'] 16908}).on("click",function(e){ 16909window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(_this.shareUrl),"Sharer",windowParameters); 16910});
16911_this.google=$(htmlDiv,{ 16912class:shareButtonClass+" df-share-google "+options.icons['google'] 16913}).on("click",function(e){ 16914window.open('https://plus.google.com/share?url='+encodeURIComponent(_this.shareUrl),"Sharer",windowParameters); 16915}); 16916_this.twitter=$(htmlDiv,{ 16917class:shareButtonClass+" df-share-twitter "+options.icons['twitter'] 16918}).on("click",function(e){ 16919window.open('http://twitter.com/share?url='+encodeURIComponent(_this.shareUrl),"Sharer",windowParameters); 16920}); 16921_this.mail=$('<a>',{ 16922class:shareButtonClass+" df-share-mail "+options.icons['mail'], 16923href:'mailto:?subject=I wanted you to see this FlipBook&body=Check out this site '+encodeURIComponent(_this.shareUrl), 16924target:'_blank' 16925}).on("click",function(e){ 16926$(this).attr('href','mailto:?subject=I wanted you to see this FlipBook&body=Check out this site '+encodeURIComponent(_this.shareUrl)); 16927e.stopPropagation(); 16928}); 16929_this.box.append(_this.urlInput).append(_this.facebook).append(_this.google).append(_this.twitter).append(_this.mail); 16930$(container).append(_this.wrapper); 16931} 16932Share.prototype.show=function(){ 16933this.wrapper.fadeIn(300); 16934this.urlInput.val(this.shareUrl); 16935this.urlInput.trigger("click"); 16936this.isOpen=true; 16937} 16938Share.prototype.dispose=function(){ 16939var _this=this; 16940_this.box.off(); 16941_this.google.off(); 16942_this.twitter.off(); 16943_this.facebook.off(); 16944_this.mail.off(); 16945_this.urlInput.off(); 16946_this.wrapper.off().remove(); 16947} 16948Share.prototype.close=function(){ 16949this.wrapper.fadeOut(300); 16950this.isOpen=false; 16951} 16952Share.prototype.update=function(url){ 16953this.shareUrl=url; 16954} 16955return Share; 16956})(jQuery); 16957DFLIP.Popup=(function PopupClosure($){ 16958function Popup(container,options){ 16959var _this=this; 16960var htmlDiv='<div>'; 16961var windowParameters="width=500,height=400"; 16962_this.isOpen=false; 16963_this.wrapper=$('<div class="df-popup-wrapper" style="display: none;">') 16964.on("click",function(e){ 16965_this.close(); 16966}); 16967_this.box=$('<div class="df-popup-box">') 16968.on("click",function(e){ 16969e.preventDefault(); 16970e.stopPropagation(); 16971}).appendTo(_this.wrapper); 16972$(container).append(_this.wrapper); 16973} 16974Popup.prototype.show=function(){ 16975this.wrapper.fadeIn(300); 16976this.isOpen=true; 16977} 16978Popup.prototype.dispose=function(){ 16979var _this=this; 16980_this.box.off(); 16981_this.wrapper.off().remove(); 16982} 16983Popup.prototype.close=function(){ 16984this.wrapper.fadeOut(300); 16985this.isOpen=false; 16986} 16987return Popup; 16988})(jQuery); 16989var PDFLinkService=(function(){ 16990function PDFLinkService(){ 16991this.baseUrl=null; 16992this.pdfDocument=null; 16993this.pdfViewer=null; 16994this.pdfHistory=null; 16995this._pagesRefCache=null; 16996} 16997PDFLinkService.prototype={ 16998dispose:function(){ 16999this.baseUrl=null; 17000this.pdfDocument=null; 17001this.pdfViewer=null; 17002this.pdfHistory=null; 17003this._pagesRefCache=null; 17004}, 17005setDocument:function PDFLinkService_setDocument(pdfDocument,baseUrl){ 17006this.baseUrl=baseUrl; 17007this.pdfDocument=pdfDocument; 17008this._pagesRefCache=Object.create(null); 17009}, 17010setViewer:function PDFLinkService_setViewer(pdfViewer){ 17011this.pdfViewer=pdfViewer; 17012}, 17013setHistory:function PDFLinkService_setHistory(pdfHistory){ 17014this.pdfHistory=pdfHistory; 17015}, 17016get pagesCount(){ 17017return this.pdfDocument.numPages; 17018}, 17019get page(){ 17020return this.pdfViewer.currentPageNumber; 17021}, 17022set page(value){ 17023this.pdfViewer.currentPageNumber=value; 17024}, 17025navigateTo:function PDFLinkService_navigateTo(dest){ 17026var destString=''; 17027var self=this; 17028var goToDestination=function(destRef){ 17029var pageNumber=destRef instanceof Object?self._pagesRefCache[destRef.num+' '+destRef.gen+' R'] 17030:(destRef+1); 17031if(pageNumber){ 17032if(self.pdfViewer.contentProvider.options.pageSize==DFLIP.PAGE_SIZE.DOUBLEINTERNAL&&pageNumber>2){ 17033pageNumber=pageNumber*2-1; 17034} 17035if(pageNumber>self.pdfViewer.pageCount){ 17036pageNumber=self.pdfViewer.pageCount; 17037} 17038self.pdfViewer.gotoPage(pageNumber); 17039if(self.pdfHistory){ 17040self.pdfHistory.push({ 17041dest:dest, 17042hash:destString, 17043page:pageNumber 17044}); 17045} 17046}else{ 17047self.pdfDocument.getPageIndex(destRef).then(function(pageIndex){ 17048var pageNum=pageIndex+1; 17049var cacheKey=destRef.num+' '+destRef.gen+' R'; 17050self._pagesRefCache[cacheKey]=pageNum; 17051goToDestination(destRef); 17052}); 17053} 17054}; 17055var destinationPromise; 17056if(typeof dest==='string'){ 17057destString=dest; 17058destinationPromise=this.pdfDocument.getDestination(dest); 17059}else{ 17060destinationPromise=Promise.resolve(dest); 17061} 17062destinationPromise.then(function(destination){ 17063dest=destination; 17064if(!(destination instanceof Array)){ 17065return; 17066} 17067goToDestination(destination[0]); 17068}); 17069}, 17070customNavigateTo:function PDFLinkService_navigateTo(dest){ 17071if(dest==''||dest==null||dest=='null')return; 17072var pageNumber=null; 17073if(!isNaN(Math.round(dest))){ 17074pageNumber=dest; 17075} 17076else if(typeof dest==='string'){ 17077pageNumber=parseInt(dest.replace("#",""),10); 17078if(isNaN(pageNumber)){ 17079window.open(dest); 17080return; 17081} 17082} 17083if(pageNumber!=null) 17084this.pdfViewer.gotoPage(pageNumber); 17085},
17086getDestinationHash:function PDFLinkService_getDestinationHash(dest){ 17087if(typeof dest==='string'){ 17088return this.getAnchorUrl('#'+escape(dest)); 17089} 17090if(dest instanceof Array){ 17091var destRef=dest[0]; 17092var pageNumber=destRef instanceof Object?this._pagesRefCache[destRef.num+' '+destRef.gen+' R'] 17093:(destRef+1); 17094if(pageNumber){ 17095var pdfOpenParams=this.getAnchorUrl('#page='+pageNumber); 17096var destKind=dest[1]; 17097if(typeof destKind==='object'&&'name'in destKind&& 17098destKind.name==='XYZ'){ 17099var scale=(dest[4]||this.pdfViewer.currentScaleValue); 17100var scaleNumber=parseFloat(scale); 17101if(scaleNumber){ 17102scale=scaleNumber*100; 17103} 17104pdfOpenParams+='&zoom='+scale; 17105if(dest[2]||dest[3]){ 17106pdfOpenParams+=','+(dest[2]||0)+','+(dest[3]||0); 17107} 17108} 17109return pdfOpenParams; 17110} 17111} 17112return this.getAnchorUrl(''); 17113}, 17114getCustomDestinationHash:function PDFLinkService_getCustomDestinationHash(dest){ 17115return'#'+escape(dest); 17116}, 17117getAnchorUrl:function PDFLinkService_getAnchorUrl(anchor){ 17118return(this.baseUrl||'')+anchor; 17119}, 17120setHash:function PDFLinkService_setHash(hash){ 17121if(hash.indexOf('=')>=0){ 17122var params=parseQueryString(hash); 17123if('nameddest'in params){ 17124if(this.pdfHistory){ 17125this.pdfHistory.updateNextHashParam(params.nameddest); 17126} 17127this.navigateTo(params.nameddest); 17128return; 17129} 17130var pageNumber,dest; 17131if('page'in params){ 17132pageNumber=(params.page|0)||1; 17133} 17134if('zoom'in params){ 17135var zoomArgs=params.zoom.split(','); 17136var zoomArg=zoomArgs[0]; 17137var zoomArgNumber=parseFloat(zoomArg); 17138if(zoomArg.indexOf('Fit')===-1){ 17139dest=[null,{name:'XYZ'}, 17140zoomArgs.length>1?(zoomArgs[1]|0):null, 17141zoomArgs.length>2?(zoomArgs[2]|0):null, 17142(zoomArgNumber?zoomArgNumber/100:zoomArg)]; 17143}else{ 17144if(zoomArg==='Fit'||zoomArg==='FitB'){ 17145dest=[null,{name:zoomArg}]; 17146}else if((zoomArg==='FitH'||zoomArg==='FitBH')|| 17147(zoomArg==='FitV'||zoomArg==='FitBV')){ 17148dest=[null,{name:zoomArg}, 17149zoomArgs.length>1?(zoomArgs[1]|0):null]; 17150}else if(zoomArg==='FitR'){ 17151if(zoomArgs.length!==5){ 17152console.error('PDFLinkService_setHash: '+ 17153'Not enough parameters for \'FitR\'.'); 17154}else{ 17155dest=[null,{name:zoomArg}, 17156(zoomArgs[1]|0),(zoomArgs[2]|0), 17157(zoomArgs[3]|0),(zoomArgs[4]|0)]; 17158} 17159}else{ 17160console.error('PDFLinkService_setHash: \''+zoomArg+ 17161'\' is not a valid zoom value.'); 17162} 17163} 17164} 17165if(dest){ 17166this.pdfViewer.scrollPageIntoView(pageNumber||this.page,dest); 17167}else if(pageNumber){ 17168this.page=pageNumber; 17169} 17170if('pagemode'in params){ 17171var event=document.createEvent('CustomEvent'); 17172event.initCustomEvent('pagemode',true,true,{ 17173mode:params.pagemode 17174}); 17175this.pdfViewer.container.dispatchEvent(event); 17176} 17177}else if(/^\d+$/.test(hash)){ 17178this.page=hash; 17179}else{ 17180if(this.pdfHistory){ 17181this.pdfHistory.updateNextHashParam(unescape(hash)); 17182} 17183this.navigateTo(unescape(hash)); 17184} 17185}, 17186executeNamedAction:function PDFLinkService_executeNamedAction(action){ 17187switch(action){ 17188case'GoBack': 17189if(this.pdfHistory){ 17190this.pdfHistory.back(); 17191} 17192break; 17193case'GoForward': 17194if(this.pdfHistory){ 17195this.pdfHistory.forward(); 17196} 17197break; 17198case'NextPage': 17199this.page++; 17200break; 17201case'PrevPage': 17202this.page--; 17203break; 17204case'LastPage': 17205this.page=this.pagesCount; 17206break; 17207case'FirstPage': 17208this.page=1; 17209break; 17210default: 17211break; 17212} 17213var event=document.createEvent('CustomEvent'); 17214event.initCustomEvent('namedaction',true,true,{ 17215action:action 17216}); 17217this.pdfViewer.container.dispatchEvent(event); 17218}, 17219cachePageRef:function PDFLinkService_cachePageRef(pageNum,pageRef){ 17220var refStr=pageRef.num+' '+pageRef.gen+' R'; 17221this._pagesRefCache[refStr]=pageNum; 17222} 17223}; 17224return PDFLinkService; 17225})(); 17226DFLIP.TextLayerBuilder=(function TextLayerBuilderClosure(){ 17227function TextLayerBuilder(options){ 17228this.textLayerDiv=options.textLayerDiv; 17229this.renderingDone=false; 17230this.divContentDone=false; 17231this.pageIdx=options.pageIndex; 17232this.pageNumber=this.pageIdx+1; 17233this.matches=[]; 17234this.viewport=options.viewport; 17235this.textDivs=[]; 17236this.findController=options.findController||null; 17237this.textLayerRenderTask=null; 17238this.enhanceTextSelection=options.enhanceTextSelection; 17239this._bindMouse(); 17240} 17241TextLayerBuilder.prototype={ 17242_finishRendering:function TextLayerBuilder_finishRendering(){ 17243this.renderingDone=true; 17244if(!this.enhanceTextSelection){ 17245var endOfContent=document.createElement('div'); 17246endOfContent.className='endOfContent'; 17247this.textLayerDiv.appendChild(endOfContent); 17248} 17249}, 17250render:function TextLayerBuilder_render(timeout){ 17251if(!this.divContentDone||this.renderingDone){ 17252return; 17253} 17254if(this.textLayerRenderTask){ 17255this.textLayerRenderTask.cancel(); 17256this.textLayerRenderTask=null; 17257} 17258this.textDivs=[]; 17259var textLayerFrag=document.createDocumentFragment(); 17260this.textLayerRenderTask=PDFJS.renderTextLayer({ 17261textContent:this.textContent, 17262container:textLayerFrag, 17263viewport:this.viewport, 17264textDivs:this.textDivs, 17265timeout:timeout, 17266enhanceTextSelection:this.enhanceTextSelection, 17267}); 17268this.textLayerRenderTask.promise.then(function(){ 17269this.textLayerDiv.appendChild(textLayerFrag); 17270this._finishRendering(); 17271this.updateMatches(); 17272}.bind(this),function(reason){ 17273}); 17274}, 17275setTextContent:function TextLayerBuilder_setTextContent(textContent){ 17276if(this.textLayerRenderTask){ 17277this.textLayerRenderTask.cancel(); 17278this.textLayerRenderTask=null; 17279} 17280this.textContent=textContent; 17281this.divContentDone=true; 17282}, 17283convertMatches:function TextLayerBuilder_convertMatches(matches, 17284matchesLength){ 17285var i=0; 17286var iIndex=0; 17287var bidiTexts=this.textContent.items; 17288var end=bidiTexts.length-1; 17289var queryLen=(this.findController===null?0:this.findController.state.query.length); 17290var ret=[]; 17291if(!matches){ 17292return ret; 17293} 17294for(var m=0,len=matches.length;m<len;m++){ 17295var matchIdx=matches[m]; 17296while(i!==end&&matchIdx>=(iIndex+bidiTexts[i].str.length)){ 17297iIndex+=bidiTexts[i].str.length; 17298i++; 17299} 17300if(i===bidiTexts.length){ 17301console.error('Could not find a matching mapping'); 17302} 17303var match={ 17304begin:{ 17305divIdx:i, 17306offset:matchIdx-iIndex 17307} 17308}; 17309if(matchesLength){ 17310matchIdx+=matchesLength[m]; 17311}else{ 17312matchIdx+=queryLen; 17313} 17314while(i!==end&&matchIdx>(iIndex+bidiTexts[i].str.length)){ 17315iIndex+=bidiTexts[i].str.length; 17316i++; 17317} 17318match.end={ 17319divIdx:i, 17320offset:matchIdx-iIndex 17321}; 17322ret.push(match); 17323} 17324return ret; 17325}, 17326renderMatches:function TextLayerBuilder_renderMatches(matches){ 17327if(matches.length===0){ 17328return; 17329} 17330var bidiTexts=this.textContent.items; 17331var textDivs=this.textDivs; 17332var prevEnd=null; 17333var pageIdx=this.pageIdx; 17334var isSelectedPage=(this.findController===null?false:(pageIdx===this.findController.selected.pageIdx)); 17335var selectedMatchIdx=(this.findController===null?-1:this.findController.selected.matchIdx); 17336var highlightAll=(this.findController===null?false:this.findController.state.highlightAll); 17337var infinity={ 17338divIdx:-1, 17339offset:undefined 17340}; 17341function beginText(begin,className){ 17342var divIdx=begin.divIdx; 17343textDivs[divIdx].textContent=''; 17344appendTextToDiv(divIdx,0,begin.offset,className); 17345} 17346function appendTextToDiv(divIdx,fromOffset,toOffset,className){ 17347var div=textDivs[divIdx]; 17348var content=bidiTexts[divIdx].str.substring(fromOffset,toOffset); 17349var node=document.createTextNode(content); 17350if(className){ 17351var span=document.createElement('span'); 17352span.className=className; 17353span.appendChild(node); 17354div.appendChild(span); 17355return; 17356} 17357div.appendChild(node); 17358} 17359var i0=selectedMatchIdx,i1=i0+1; 17360if(highlightAll){ 17361i0=0; 17362i1=matches.length; 17363}else if(!isSelectedPage){ 17364return; 17365} 17366for(var i=i0;i<i1;
17366i++){ 17367var match=matches[i]; 17368var begin=match.begin; 17369var end=match.end; 17370var isSelected=(isSelectedPage&&i===selectedMatchIdx); 17371var highlightSuffix=(isSelected?' selected':''); 17372if(this.findController){ 17373this.findController.updateMatchPosition(pageIdx,i,textDivs, 17374begin.divIdx); 17375} 17376if(!prevEnd||begin.divIdx!==prevEnd.divIdx){ 17377if(prevEnd!==null){ 17378appendTextToDiv(prevEnd.divIdx,prevEnd.offset,infinity.offset); 17379} 17380beginText(begin); 17381}else{ 17382appendTextToDiv(prevEnd.divIdx,prevEnd.offset,begin.offset); 17383} 17384if(begin.divIdx===end.divIdx){ 17385appendTextToDiv(begin.divIdx,begin.offset,end.offset, 17386'highlight'+highlightSuffix); 17387}else{ 17388appendTextToDiv(begin.divIdx,begin.offset,infinity.offset, 17389'highlight begin'+highlightSuffix); 17390for(var n0=begin.divIdx+1,n1=end.divIdx;n0<n1;n0++){ 17391textDivs[n0].className='highlight middle'+highlightSuffix; 17392} 17393beginText(end,'highlight end'+highlightSuffix); 17394} 17395prevEnd=end; 17396} 17397if(prevEnd){ 17398appendTextToDiv(prevEnd.divIdx,prevEnd.offset,infinity.offset); 17399} 17400}, 17401updateMatches:function TextLayerBuilder_updateMatches(){ 17402if(!this.renderingDone){ 17403return; 17404} 17405var matches=this.matches; 17406var textDivs=this.textDivs; 17407var bidiTexts=this.textContent.items; 17408var clearedUntilDivIdx=-1; 17409for(var i=0,len=matches.length;i<len;i++){ 17410var match=matches[i]; 17411var begin=Math.max(clearedUntilDivIdx,match.begin.divIdx); 17412for(var n=begin,end=match.end.divIdx;n<=end;n++){ 17413var div=textDivs[n]; 17414div.textContent=bidiTexts[n].str; 17415div.className=''; 17416} 17417clearedUntilDivIdx=match.end.divIdx+1; 17418} 17419if(this.findController===null||!this.findController.active){ 17420return; 17421} 17422var pageMatches,pageMatchesLength; 17423if(this.findController!==null){ 17424pageMatches=this.findController.pageMatches[this.pageIdx]||null; 17425pageMatchesLength=(this.findController.pageMatchesLength) 17426?this.findController.pageMatchesLength[this.pageIdx]||null:null; 17427} 17428this.matches=this.convertMatches(pageMatches,pageMatchesLength); 17429this.renderMatches(this.matches); 17430}, 17431_bindMouse:function TextLayerBuilder_bindMouse(){ 17432var div=this.textLayerDiv; 17433var self=this; 17434div.addEventListener('mousedown',function(e){ 17435if(self.enhanceTextSelection&&self.textLayerRenderTask){ 17436self.textLayerRenderTask.expandTextDivs(true); 17437return; 17438} 17439var end=div.querySelector('.endOfContent'); 17440if(!end){ 17441return; 17442} 17443var adjustTop=e.target!==div; 17444adjustTop=adjustTop&&window.getComputedStyle(end).getPropertyValue('-moz-user-select')!=='none'; 17445if(adjustTop){ 17446var divBounds=div.getBoundingClientRect(); 17447var r=Math.max(0,(e.pageY-divBounds.top)/divBounds.height); 17448end.style.top=(r*100).toFixed(2)+'%'; 17449} 17450end.classList.add('active'); 17451}); 17452div.addEventListener('mouseup',function(e){ 17453if(self.enhanceTextSelection&&self.textLayerRenderTask){ 17454self.textLayerRenderTask.expandTextDivs(false); 17455return; 17456} 17457var end=div.querySelector('.endOfContent'); 17458if(!end){ 17459return; 17460} 17461end.style.top=''; 17462end.classList.remove('active'); 17463}); 17464}, 17465}; 17466return TextLayerBuilder; 17467})(); 17468DFLIP.ConvertPageLinks=function(){ 17469var w=arguments[0]/ 100, h = arguments[1] /100; 17470var toPercent=function(_x,_y,_w,_h,_dest){ 17471return{ 17472x:_x/w, 17473y:_y/h, 17474w:_w/w, 17475h:_h/h, 17476dest:_dest 17477}; 17478}; 17479var percents=[]; 17480var input; 17481for(var index=2;index<arguments.length;index++){ 17482input=arguments[index]; 17483percents[index-2]=toPercent.apply(this,input); 17484} 17485return percents; 17486}; 17487DFLIP.parseLinks=function(links){ 17488var _links; 17489if(links!=null&&links.length>0){ 17490for(var index=0;index<links.length;index++){ 17491_links=links[index]; 17492if(_links!=null&&_links[0]!=null&&_links[0].dest==null){ 17493_links=DFLIP.ConvertPageLinks.apply(this,_links); 17494links[index]=_links; 17495} 17496} 17497} 17498return links; 17499}; 17500(function($){ 17501function isTrue(val){ 17502return val=="true"||val==true; 17503} 17504function checkValues(options){ 17505if(options.webgl!=null)options.webgl=isTrue(options.webgl); 17506if(options.enableDownload!=null)options.enableDownload=isTrue(options.enableDownload); 17507if(options.scrollWheel!=null)options.scrollWheel=isTrue(options.scrollWheel); 17508if(options.autoEnableOutline!=null)options.autoEnableOutline=isTrue(options.autoEnableOutline); 17509if(options.autoEnableThumbnail!=null)options.autoEnableThumbnail=isTrue(options.autoEnableThumbnail); 17510if(options.transparent!=null)options.transparent=isTrue(options.transparent); 17511if(options.overwritePDFOutline!=null)options.overwritePDFOutline=isTrue(options.overwritePDFOutline); 17512if(options.soundEnable!=null)options.soundEnable=isTrue(options.soundEnable); 17513if(options.forceFit!=null)options.forceFit=isTrue(options.forceFit); 17514if(options.enableAnnotation!=null)options.enableAnnotation=isTrue(options.enableAnnotation); 17515if(options.webglShadow!=null)options.webglShadow=isTrue(options.webglShadow); 17516if(options.autoPlay!=null)options.autoPlay=isTrue(options.autoPlay); 17517if(options.autoPlayStart!=null)options.autoPlayStart=isTrue(options.autoPlayStart); 17518if(options.paddingTop!=null)options.paddingTop=parseInt(options.paddingTop,10); 17519if(options.paddingRight!=null)options.paddingRight=parseInt(options.paddingRight,10); 17520if(options.paddingBottom!=null)options.paddingBottom=parseInt(options.paddingBottom,10); 17521if(options.paddingLeft!=null)options.paddingLeft=parseInt(options.paddingLeft,10); 17522if(options.zoomRatio!=null)options.zoomRatio=parseFloat(options.zoomRatio,10); 17523if(options.stiffness!=null)options.stiffness=parseFloat(options.stiffness,10); 17524if(options.autoPlayDuration!=null)options.autoPlayDuration=parseInt(options.autoPlayDuration,10); 17525if(options.pageMode==0||options.pageMode=="0") 17526options.pageMode=null; 17527if(options.singlePageMode==0||options.singlePageMode=="0") 17528options.singlePageMode=null; 17529} 17530function parseOptions(options){ 17531if(options.parsed==true)return; 17532options.parsed=true; 17533var links=[]; 17534checkValues(options); 17535if(typeof dFlipWPGlobal!=='undefined'&&options.wpOptions=='true'){ 17536try{ 17537for(var key in options.links){ 17538var _pagelinks=options.links[key]; 17539var pagelink=[100,100]; 17540for(var l=0;l<_pagelinks.length;l++){ 17541var _link=_pagelinks[l]; 17542var _values=_link.substr(1).slice(0,-1).split(","); 17543var _linkarr=[]; 17544for(var v=0;v<5;v++){ 17545_linkarr[v]=_values[v]; 17546} 17547pagelink.push(_linkarr); 17548}
17549links[parseInt(key,10)+1]=pagelink; 17550} 17551} 17552catch(error){ 17553console.error(error.stack); 17554} 17555options.links=DFLIP.parseLinks(links); 17556}else{ 17557options.links=DFLIP.parseLinks(options.links); 17558} 17559} 17560DFLIP.getOptions=function(book){ 17561book=$(book); 17562var book_id=book.attr("id"); 17563var options="option_"+book_id, 17564source=book.attr("source")||book.attr("df-source"); 17565options=options==null||options==""||window[options]==null?{}:window[options]; 17566options.source=source==null||source==""?options.source:source; 17567var attrOptions={ 17568webgl:book.attr("webgl"), 17569height:book.attr("height"), 17570soundEnable:book.attr("sound"), 17571transparent:book.attr("transparent"), 17572enableDownload:book.attr("download"), 17573duration:book.attr("duration"), 17574hard:book.attr("hard"), 17575pageMode:book.attr("pagemode"), 17576direction:book.attr("direction"), 17577backgroundColor:book.attr("backgroundcolor"), 17578scrollWheel:book.attr("scrollwheel"), 17579backgroundImage:book.attr("backgroundimage"), 17580paddingTop:book.attr("paddingtop"), 17581paddingRight:book.attr("paddingright"), 17582paddingBottom:book.attr("paddingbottom"), 17583paddingLeft:book.attr("paddingleft"), 17584wpOptions:book.attr("wpoptions") 17585}; 17586options=$.extend(true,{},options,attrOptions); 17587parseOptions(options); 17588return options; 17589} 17590DFLIP.parseBooks=function(){ 17591$('._df_button, ._df_thumb, ._df_custom, ._df_book').each(function(){ 17592var book=$(this); 17593var parsed=book.attr("parsed")||book.attr("df-parsed"); 17594if(parsed!=="true"){ 17595book.attr("df-parsed","true") 17596if(book.hasClass("_df_book")){ 17597var book_id=book.attr("id"), 17598slug=book.attr("slug"); 17599var options=DFLIP.getOptions(book); 17600options.id=book_id; 17601if(slug!=null) 17602options.slug=slug; 17603if(book_id){ 17604window[book_id.toString()]=$(book).flipBook(options.source,options); 17605} 17606else{ 17607$(book).flipBook(options.source,options); 17608} 17609} 17610else{ 17611if(book.hasClass("_df_thumb")){ 17612var wrapper=$("<div class='_df_book-cover'>"); 17613var text=book.html().trim(); 17614book.html(""); 17615var title=$("<span class='_df_book-title'>").html(text).appendTo(wrapper); 17616var thumb=book.attr("thumb")||book.attr("df-thumb"), 17617thumbType=book.attr("thumbtype")||DFLIP.defaults.thumbElement||"div", 17618tags=book.attr("tags")||book.attr("df-tags"); 17619if(tags){ 17620tags=tags.split(","); 17621if(tags.length>0){ 17622for(var tagcount=0;tagcount<tags.length;tagcount++){ 17623book.append("<span class='_df_book-tag'>"+tags[tagcount]+"</span>"); 17624} 17625} 17626} 17627if(thumb!=null&&thumb.toString().trim()!=''){ 17628if(thumbType=='img'){ 17629wrapper.append('<img src="'+thumb+'" alt="'+text+'"/>'); 17630book.attr("thumb-type","img"); 17631}else{ 17632wrapper.css({ 17633backgroundImage:"url("+thumb+")" 17634}); 17635} 17636}else{ 17637wrapper.addClass("_df_thumb-not-found"); 17638} 17639book.append(wrapper); 17640} 17641} 17642} 17643}); 17644}; 17645$(document).ready(function(){ 17646if(typeof dFlipLocation=='undefined'&&DFLIP.autoDetectLocation!=false){ 17647$("script").each(function(){ 17648var src=$(this)[0].src; 17649if((src.indexOf("/dflip.js")>-1||src.indexOf("/dflip.min.js")>-1) 17650&&(src.indexOf("https://")>-1||src.indexOf("http://")>-1)&&src.indexOf("js/dflip.")>-1){ 17651var splits=src.split("/"); 17652window.dFlipLocation=splits.slice(0,-2).join("/"); 17653} 17654}); 17655} 17656if(typeof dFlipLocation!=='undefined'){ 17657if(dFlipLocation.length>2&&dFlipLocation.slice(-1)!=="/"){ 17658window.dFlipLocation+="/"; 17659} 17660DFLIP.defaults.mockupjsSrc=dFlipLocation+"js/libs/mockup.min.js"; 17661DFLIP.defaults.pdfjsSrc=dFlipLocation+"js/libs/pdf.min.js"; 17662DFLIP.defaults.pdfjsCompatibilitySrc=dFlipLocation+"js/libs/compatibility.js"; 17663DFLIP.defaults.threejsSrc=dFlipLocation+"js/libs/three.min.js"; 17664DFLIP.defaults.pdfjsWorkerSrc=dFlipLocation+"js/libs/pdf.worker.min.js"; 17665DFLIP.defaults.soundFile=dFlipLocation+"sound/turn2.mp3"; 17666DFLIP.defaults.imagesLocation=dFlipLocation+"images"; 17667DFLIP.defaults.imageResourcesPath=dFlipLocation+"images/pdfjs/"; 17668DFLIP.defaults.cMapUrl=dFlipLocation+"js/libs/cmaps/"; 17669if(typeof dFlipWPGlobal!=='undefined'){ 17670checkValues(dFlipWPGlobal); 17671$.extend(DFLIP.defaults,dFlipWPGlobal); 17672} 17673} 17674DFLIP.preParseHash=window.location.hash; 17675DFLIP.parseBooks(); 17676$('body').on('click','._df_button, ._df_thumb, ._df_custom',function(){ 17677var book=$(this); 17678if(!window.dfLightBox){ 17679window.dfLightBox=new DFLightBox(function(){ 17680if(window.location.hash.indexOf("#dflip-")==0) 17681window.location.hash="#_"; 17682window.dfActiveLightBoxBook.dispose(); 17683window.dfActiveLightBoxBook=null; 17684}); 17685} 17686window.dfLightBox.duration=500; 17687if(window.dfActiveLightBoxBook&&window.dfActiveLightBoxBook.dispose){ 17688window.dfActiveLightBoxBook.dispose(); 17689}else{ 17690window.dfLightBox.show( 17691function(){ 17692var options=DFLIP.getOptions(book); 17693options.transparent=false; 17694options.id=book.attr("id"); 17695var slug=book.attr("slug"); 17696if(slug!=null) 17697options.slug=slug; 17698options.isLightBox=true; 17699window.dfActiveLightBoxBook=$(window.dfLightBox.container).flipBook(options.source,options); 17700} 17701); 17702} 17703}); 17704if(DFLIP.utils.isSafari||DFLIP.utils.isIOS){ 17705$('body').addClass("df-webkit"); 17706} 17707if(DFLIP.preParseHash&&DFLIP.preParseHash.indexOf('dflip-')>=0){ 17708var id=DFLIP.preParseHash.split('dflip-')[1].split('/')[0]; 17709var page=DFLIP.preParseHash.split('dflip-')[1].split('/')[1]; 17710if(page!=null){ 17711page=page.split('/')[0]; 17712} 17713var book; 17714book=$("[slug="+id+"]"); 17715if(book.length==0)book=$('#'+id); 17716if(book.length>0){ 17717if(page!=null){ 17718book.data("page",page) 17719} 17720if(book.is('._df_button, ._df_thumb, ._df_custom')){ 17721book.trigger("click"); 17722} 17723} 17724} 17725$('body').on('click','.df-ui-sidemenu-close',function(){ 17726var $this=$(this); 17727$this.closest(".df-container").find(".df-ui-outline.df-active , .df-ui-thumbn
17727ail.df-active").trigger("click"); 17728}); 17729}); 17730})(jQuery); 17731 17732 17733/* plugins/dist/plugins/inserer_modeles/javascript/autosize.min.js */ 17734 17735!function(e,t){if("function"==typeof define&&define.amd)define(["module","exports"],t);else if("undefined"!=typeof exports)t(module,exports);else{var n={exports:{}};t(n,n.exports),e.autosize=n.exports}}(this,function(e,t){"use strict";var n,o,p="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return-1<n.indexOf(e)},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);-1<t&&(n.splice(t,1),o.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function r(r){if(r&&r.nodeName&&"TEXTAREA"===r.nodeName&&!p.has(r)){var e,n=null,o=null,i=null,d=function(){r.clientWidth!==o&&a()},l=function(t){window.removeEventListener("resize",d,!1),r.removeEventListener("input",a,!1),r.removeEventListener("keyup",a,!1),r.removeEventListener("autosize:destroy",l,!1),r.removeEventListener("autosize:update",a,!1),Object.keys(t).forEach(function(e){r.style[e]=t[e]}),p.delete(r)}.bind(r,{height:r.style.height,resize:r.style.resize,overflowY:r.style.overflowY,overflowX:r.style.overflowX,wordWrap:r.style.wordWrap});r.addEventListener("autosize:destroy",l,!1),"onpropertychange"in r&&"oninput"in r&&r.addEventListener("keyup",a,!1),window.addEventListener("resize",d,!1),r.addEventListener("input",a,!1),r.addEventListener("autosize:update",a,!1),r.style.overflowX="hidden",r.style.wordWrap="break-word",p.set(r,{destroy:l,update:a}),"vertical"===(e=window.getComputedStyle(r,null)).resize?r.style.resize="none":"both"===e.resize&&(r.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),a()}function s(e){var t=r.style.width;r.style.width="0px",r.offsetWidth,r.style.width=t,r.style.overflowY=e}function u(){if(0!==r.scrollHeight){var e=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(r),t=document.documentElement&&document.documentElement.scrollTop;r.style.height="",r.style.height=r.scrollHeight+n+"px",o=r.clientWidth,e.forEach(function(e){e.node.scrollTop=e.scrollTop}),t&&(document.documentElement.scrollTop=t)}}function a(){u();var e=Math.round(parseFloat(r.style.height)),t=window.getComputedStyle(r,null),n="content-box"===t.boxSizing?Math.round(parseFloat(t.height)):r.offsetHeight;if(n<e?"hidden"===t.overflowY&&(s("scroll"),u(),n="content-box"===t.boxSizing?Math.round(parseFloat(window.getComputedStyle(r,null).height)):r.offsetHeight):"hidden"!==t.overflowY&&(s("hidden"),u(),n="content-box"===t.boxSizing?Math.round(parseFloat(window.getComputedStyle(r,null).height)):r.offsetHeight),i!==n){i=n;var o=c("autosize:resized");try{r.dispatchEvent(o)}catch(e){}}}}function i(e){var t=p.get(e);t&&t.destroy()}function d(e){var t=p.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return r(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],d),e}),t.default=l,e.exports=t.default}); 17736 17737 17738/* squelettes/plugins/spip-contrib-extensions/slick/lib/slick/slick.min.js */
vendor: 43,577 bytes, line 17739
17739!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(d){"use strict";var s,l=window.Slick||{};s=0,(l=function(i,e){var t,o=this;o.defaults={adaptiveHeight:!1,appendArrows:d(i),appendDots:d(i),arrows:!0,arrowsPlacement:null,asNavFor:null,prevArrow:'<button class="slick-prev" type="button"><span class="slick-prev-icon" aria-hidden="true"></span><span class="slick-sr-only">Previous</span></button>',nextArrow:'<button class="slick-next" type="button"><span class="slick-next-icon" aria-hidden="true"></span><span class="slick-sr-only">Next</span></button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(i,e){return d('<button type="button"><span class="slick-dot-icon" aria-hidden="true"></span><span class="slick-sr-only">Go to slide '+(e+1)+"</span></button>")},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,infinite:!0,initialSlide:0,instructionsText:null,lazyLoad:"ondemand",mobileFirst:!1,playIcon:'<span class="slick-play-icon" aria-hidden="true"></span>',pauseIcon:'<span class="slick-pause-icon" aria-hidden="true"></span>',pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,regionLabel:"carousel",respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useAutoplayToggleButton:!0,useCSS:!0,useGroupRole:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},o.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,$instructionsText:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$pauseButton:null,$pauseIcon:null,$playIcon:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},d.extend(o,o.initials),o.activeBreakpoint=null,o.animType=null,o.animProp=null,o.breakpoints=[],o.breakpointSettings=[],o.cssTransitions=!1,o.focussed=!1,o.interrupted=!1,o.hidden="hidden",o.paused=!0,o.positionProp=null,o.respondTo=null,o.rowCount=1,o.shouldClick=!0,o.$slider=d(i),o.$slidesCache=null,o.transformType=null,o.transitionType=null,o.visibilityChange="visibilitychange",o.windowWidth=0,o.windowTimer=null,t=d(i).data("slick")||{},o.options=d.extend({},o.defaults,e,t),o.currentSlide=o.options.initialSlide,o.originalSettings=o.options,void 0!==document.mozHidden?(o.hidden="mozHidden",o.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(o.hidden="webkitHidden",o.visibilityChange="webkitvisibilitychange"),o.autoPlay=d.proxy(o.autoPlay,o),o.autoPlayClear=d.proxy(o.autoPlayClear,o),o.autoPlayIterator=d.proxy(o.autoPlayIterator,o),o.autoPlayToggleHandler=d.proxy(o.autoPlayToggleHandler,o),o.changeSlide=d.proxy(o.changeSlide,o),o.clickHandler=d.proxy(o.clickHandler,o),o.selectHandler=d.proxy(o.selectHandler,o),o.setPosition=d.proxy(o.setPosition,o),o.swipeHandler=d.proxy(o.swipeHandler,o),o.dragHandler=d.proxy(o.dragHandler,o),o.instanceUid=s++,o.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,o.registerBreakpoints(),o.init(!0)}).prototype.addSlide=l.prototype.slickAdd=function(i,e,t){var o=this;if("boolean"==typeof e)t=e,e=null;else if(e<0||e>=o.slideCount)return!1;o.unload(),"number"==typeof e?0===e&&0===o.$slides.length?d(i).appendTo(o.$slideTrack):t?d(i).insertBefore(o.$slides.eq(e)):d(i).insertAfter(o.$slides.eq(e)):!0===t?d(i).prependTo(o.$slideTrack):d(i).appendTo(o.$slideTrack),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slides.each(function(i,e){d(e).attr("data-slick-index",i),d(e).attr("role","group"),d(e).attr("aria-label","slide "+i)}),o.$slidesCache=o.$slides,o.reinit()},l.prototype.animateHeight=function(){var i,e=this;1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical&&(i=e.$slides.eq(e.currentSlide).outerHeight(!0),e.$list.animate({height:i},e.options.speed))},l.prototype.animateSlide=function(i,e){var t={},o=this;o.animateHeight(),!0===o.options.rtl&&!1===o.options.vertical&&(i=-i),!1===o.transformsEnabled?!1===o.options.vertical?o.$slideTrack.animate({left:i},o.options.speed,o.options.easing,e):o.$slideTrack.animate({top:i},o.options.speed,o.options.easing,e):!1===o.cssTransitions?(!0===o.options.rtl&&(o.currentLeft=-o.currentLeft),d({animStart:o.currentLeft}).animate({animStart:i},{duration:o.options.speed,easing:o.options.easing,step:function(i){i=Math.ceil(i),!1===o.options.vertical?t[o.animType]="translate("+i+"px, 0px)":t[o.animType]="translate(0px,"+i+"px)",o.$slideTrack.css(t)},complete:function(){e&&e.call()}})):(o.applyTransition(),i=Math.ceil(i),!1===o.options.vertical?t[o.animType]="translate3d("+i+"px, 0px, 0px)":t[o.animType]="translate3d(0px,"+i+"px, 0px)",o.$slideTrack.css(t),e&&setTimeout(function(){o.disableTransition(),e.call()},o.options.speed))},l.prototype.getNavTarget=function(){var i=this.options.asNavFor;return i&&null!==i&&(i=d(i).not(this.$slider)),i},l.prototype.asNavFor=function(e){var i=this.getNavTarget();null!==i&&"object"==typeof i&&i.each(function(){var i=d(this).slick("getSlick");i.unslicked||i.slideHandler(e,!0)})},l.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},l.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},l.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},l.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},l.prototype.autoPlayToggleHandler=function(){var i=this;i.paused?(i.$playIcon.css("display","none"),i.$pauseIcon.css("display","inline"),i.$pauseButton.find(".slick-play-text").attr("style","display: none"),i.$pauseButton.find(".slick-pause-text").removeAttr("style"),i.slickPlay()):(i.$playIcon.css("display","inline"),i.$pauseIcon.css("display","none"),i.$pauseButton.find(".slick-play-text").removeAttr("style"),i.$pauseButton.find(".slick-pause-text").attr("style","display: none"),i.slickPause())},l.prototype.buildArrows=function(){var i=this;if(!0===i.options.arrows)if(i.$prevArrow=d(i.options.prevArrow).addClass("slick-arrow"),i.$nextArrow=d(i.options.nextArrow).addClass("slick-arrow"),i.slideCount>i.options.slidesToShow){if(i.htmlExpr.test(i.options.prevArrow))if(null!=i.options.arrowsPlacement)switch(i.options.arrowsPlacement){case"beforeSlides":case"split":console.log("test"),i.$prevArrow.prependTo(i.options.appendArrows);break;case"afterSlides":i.$prevArrow.appendTo(i.options.appendArrows)}else i.$prevArrow.prependTo(i.options.appendArrows);if(i.htmlExpr.test(i.options.nextArrow))if(null!=i.options.arrowsPlacement)switch(i.options.arrowsPlacement){case"beforeSlides":console.log("test2"),i.$prevArrow.after(i.$nextArrow);break;case"afterSlides":case"split":i.$nextArrow.appendTo(i.options.appendArrows)}else i.$nextArrow.appendTo(i.options.appendArrows);!0!==i.options.infinite&&i.$prevArrow.addClass("slick-disabled").prop("disabled",!0)}else i.$prevArrow.add(i.$nextArrow).addClass("slick-hidden").prop("disabled",!0)},l.prototype.buildDots=function(){var i,e,t=this;if(!0===t.options.dots&&t.slideCount>t.options.slidesToShow){for(t.$slider.addClass("slick-dotted"),e=d("<ul />").addClass(t.options.dotsClass),i=0;i<=t.getDotCount();i+=1)e.append(d("<li />").append(t.options.customPaging.call(this,t,i)));t.$dots=e.appendTo(t.options.appendDots),t.$dots.find("li").first().addClass("slick-active")}},l.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slides.each(function(i,e){d(e).attr("data-slick-index",i).data("originalStyling",d(e).attr("style")||""),t.options.useGroupRole&&d(e).attr("role","group").attr("aria-label","slide "+(i+1))}),t.$slider.addClass("slick-slider"),t.$slider.attr("role","region"),t.$slider.attr("aria-label",t.options.regionLabel),t.$slideTrack=0===t.slideCount?d('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent(),t.$list=t.$slideTrack.wrap('<div class="slick-list"/>').parent(),t.$slideTrack.css("opacity",0),!0!==t.options.centerMode&&!0!==t.options.swipeToSlide||(t.options.slidesToScroll=1),d("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.updateDots(),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),!0===t.options.draggable&&t.$list.addClass("draggable"),t.options.autoplay&&t.options.useAutoplayToggleButton&&(t.$pauseIcon=d(t.options.pauseIcon).attr("aria-hidden",!0),t.$playIcon=d(t.options.playIcon).attr("aria-hidden",!0),t.$pauseButton=d('<button type="button" class="slick-autoplay-toggle-button">'),t.$pauseButton.append(t.$pauseIcon),t.$pauseButton.append(t.$playIcon.css("display","none")),t.$pauseButton.append(d('<span class="slick-pause-text slick-sr-only">Pause</span>')),t.$pauseButton.append(d('<span class="slick-play-text slick-sr-only" style="display: none">Play</span>')),t.$pauseButton.prependTo(t.$slider)),null!=t.options.instructionsText&&""!=t.options.instructionsText&&(t.$instructionsText=d('<p class="slick-instructions slick-sr-only">'+t.options.instructionsText+"</p>"),t.$instructionsText.prependTo(t.$slider))},l.prototype.buildRows=function(){var i,e,t,o=this,s=document.createDocumentFragment(),n=o.$slider.children();if(0<o.options.rows){for(t=o.options.slidesPerRow*o.options.rows,e=Math.ceil(n.length/t),i=0;i<e;i++){for(var l=document.createElement("div"),r=0;r<o.options.rows;r++){for(var a=document.createElement("div"),d=0;d<o.options.slidesPerRow;d++){var p=i*t+(r*o.options.slidesPerRow+d);n.get(p)&&a.appendChild(n.get(p))}l.appendChild(a)}s.appendChild(l)}o.$slider.empty().append(s),o.$slider.children().children().children().css({width:100/o.options.slidesPerRow+"%",display:"inline-block"})}},l.prototype.checkResponsive=function(i,e){var t,o,s,n=this,l=!1,r=n.$slider.width(),a=window.innerWidth||d(window).width();if("window"===n.respondTo?s=a:"slider"===n.respondTo?s=r:"min"===n.respondTo&&(s=Math.min(a,r)),n.options.responsive&&n.options.responsive.length&&null!==n.options.responsive){for(t in o=null,n.breakpoints)n.breakpoints.hasOwnProperty(t)&&(!1===n.originalSettings.mobileFirst?s<n.breakpoints[t]&&(o=n.breakpoints[t]):s>n.breakpoints[t]&&(o=n.breakpoints[t]));null!==o?null!==n.activeBreakpoint&&o===n.activeBreakpoint&&!e||(n.activeBreakpoint=o,"unslick"===n.breakpointSettings[o]?n.unslick(o):(n.options=d.extend({},n.originalSettings,n.breakpointSettings[o]),!0===i&&(n.currentSlide=n.options.initialSlide),n.refresh(i)),l=o):null!==n.activeBreakpoint&&(n.activeBreakpoint=null,n.options=n.originalSettings,!0===i&&(n.currentSlide=n.options.initialSlide),n.refresh(i),l=o),i||!1===l||n.$slider.trigger("breakpoint",[n,l])}},l.prototype.changeSlide=function(i,e){var t,o,s=this,n=d(i.currentTarget);switch(n.is("a")&&i.preventDefault(),n.is("li")||(n=n.closest("li")),t=s.slideCount%s.options.slidesToScroll!=0?0:(s.slideCount-s.currentSlide)%s.options.slidesToScroll,i.data.message){case"previous":o=0==t?s.options.slidesToScroll:s.options.slidesToShow-t,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide-o,!1,e);break;case"next":o=0==t?s.options.slidesToScroll:t,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide+o,!1,e);break;case"index":var l=0===i.data.index?0:i.data.index||n.index()*s.options.slidesToScroll;s.slideHandler(s.checkNavigable(l),!1,e),n.children().trigger("focus");break;default:return}},l.prototype.checkNavigable=function(i){var e=this.getNavigableIndexes(),t=0;if(i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},l.prototype.cleanUpEvents=function(){var i=this;i.options.autoplay&&i.options.useAutoplayToggleButton&&i.$pauseButton.off("click.slick",i.autoPlayToggleHandler),i.options.dots&&null!==i.$dots&&d("li",i.$dots).off("click.slick",i.changeSlide).off("mouseenter.slick",d.proxy(i.interrupt,i,!0)).off("mouseleave.slick",d.proxy(i.interrupt,i,!1)),i.$slider.off("focus.slick blur.slick"),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow&&i.$prevArrow.off("click.slick",i.changeSlide),i.$nextArrow&&i.$nextArrow.off("click.slick",i.changeSlide)),i.$list.off("touchstart.slick mousedown.slick",i.swipeHandler),i.$list.off("touchmove.slick mousemove.slick",i.swipeHandler),i.$list.off("touchend.slick mouseup.slick",i.swipeHandler),i.$list.off("touchcancel.slick mouseleave.slick",i.swipeHandler),i.$list.off("click.slick",i.clickHandler),d(document).off(i.visibilityChange,i.visibility),i.cleanUpSlideEvents(),d(window).off("orientationchange.slick.slick-"+i.instanceUid,i.orientationChange),d(window).off("resize.slick.slick-"+i.instanceUid,i.resize),d("[draggable!=true]",i.$slideTrack).off("dragstart",i.preventDefault),d(window).off("load.slick.slick-"+i.instanceUid,i.setPosition)},l.prototype.cleanUpSlideEvents=function(){var i=this;i.$list.off("mouseenter.slick",d.proxy(i.interrupt,i,!0)),i.$list.off("mouseleave.slick",d.proxy(i.interrupt,i,!1))},l.prototype.cleanUpRows=function(){var i;0<this.options.rows&&((i=this.$slides.children().children()).removeAttr("style"),this.$slider.empty().append(i))},l.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},l.prototype.destroy=function(i){var e=this;e.autoPlayClear(),e.touchObject={},e.cleanUpEvents(),d(".slick-cloned",e.$slider).detach(),e.options.autoplay&&e.options.useAutoplayToggleButton&&e.$pauseButton.remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.$prevArrow.length&&(e.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").prop("disabled",!1).css("display",""),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove()),e.$nextArrow&&e.$nextArrow.length&&(e.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").prop("disabled",!1).css("display",""),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove()),e.$slides&&(e.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){d(this).attr("style",d(this).data("originalStyling"))}),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.detach(),e.$list.detach(),e.$slider.append(e.$slides)),e.cleanUpRows(),e.$slider.removeClass("slick-slider"),e.$slider.removeClass("slick-initialized"),e.$slider.removeClass("slick-dotted"),e.unslicked=!0,i||e.$slider.trigger("destroy",[e])},l.prototype.disableTransition=function(i){var e={};e[this.transitionType]="",!1===this.options.fade?this.$slideTrack.css(e):this.$slides.eq(i).css(e)},l.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},l.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},l.prototype.filterSlides=l.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},l.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick","*",function(i){var e=d(this);setTimeout(function(){t.options.pauseOnFocus&&e.is(":focus")&&(t.focussed=!0,t.autoPlay())},0)}).on("blur.slick","*",function(i){d(this);t.options.pauseOnFocus&&(t.focussed=!1,t.autoPlay())})},l.prototype.getCurrent=l.prototype.slickCurrentSlide=function(){return this.currentSlide},l.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},l.prototype.getLeft=function(i){var e,t,o,s,n=this,l=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),l=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(l=i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,l=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(l=n.slideOffset=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+l,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},l.prototype.getOption=l.prototype.slickGetOption=function(i){return this.options[i]},l.prototype.getNavigableIndexes=function(){for(var i=this,e=0,t=0,o=[],s=!1===i.options.infinite?i.slideCount:(e=-1*i.options.slidesToScroll,t=-1*i.options.slidesToScroll,2*i.slideCount);e<s;)o.push(e),e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;return o},l.prototype.getSlick=function(){return this},l.prototype.getSlideCount=function(){var s,n=this,i=!0===n.options.centerMode?Math.floor(n.$list.width()/2):0,l=-1*n.swipeLeft+i;return!0===n.options.swipeToSlide?(n.$slideTrack.find(".slick-slide").each(function(i,e){var t=d(e).outerWidth(),o=e.offsetLeft;if(!0!==n.options.centerMode&&(o+=t/2),l<o+t)return s=e,!1}),Math.abs(d(s).attr("data-slick-index")-n.currentSlide)||1):n.options.slidesToScroll},l.prototype.goTo=l.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:parseInt(i)}},e)},l.prototype.init=function(i){var e=this;d(e.$slider).hasClass("slick-initialized")||(d(e.$slider).addClass("slick-initialized"),e.buildRows(),e.buildOut(),e.setProps(),e.startLoad(),e.loadSlider(),e.initializeEvents(),e.updateArrows(),e.updateDots(),e.checkResponsive(!0),e.focusHandler()),i&&e.$slider.trigger("init",[e]),e.options.autoplay&&(e.paused=!1,e.autoPlay()),e.updateSlideVisibility(),null!=e.options.accessibility&&console.warn("accessibility setting is no longer supported."),null!=e.options.focusOnChange&&console.warn("focusOnChange is no longer supported."),null!=e.options.focusOnSelect&&console.warn("focusOnSelect is no longer supported.")},l.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide))},l.prototype.initDotEvents=function(){var i=this;!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&d("li",i.$dots).on("click.slick",{message:"index"},i.changeSlide),!0===i.options.dots&&!0===i.options.pauseOnDotsHover&&i.slideCount>i.options.slidesToShow&&d("li",i.$dots).on("mouseenter.slick",d.proxy(i.interrupt,i,!0)).on("mouseleave.slick",d.proxy(i.interrupt,i,!1))},l.prototype.initSlideEvents=function(){var i=this;i.options.pauseOnHover&&(i.$list.on("mouseenter.slick",d.proxy(i.interrupt,i,!0)),i.$list.on("mouseleave.slick",d.proxy(i.interrupt,i,!1)))},l.prototype.initializeEvents=function(){var i=this;i.initArrowEvents(),i.initDotEvents(),i.initSlideEvents(),i.options.autoplay&&i.options.useAutoplayToggleButton&&i.$pauseButton.on("click.slick",i.autoPlayToggleHandler),i.$list.on("touchstart.slick mousedown.slick",{action:"start"},i.swipeHandler),i.$list.on("touchmove.slick mousemove.slick",{action:"move"},i.swipeHandler),i.$list.on("touchend.slick mouseup.slick",{action:"end"},i.swipeHandler),i.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},i.swipeHandler),i.$list.on("click.slick",i.clickHandler),d(document).on(i.visibilityChange,d.proxy(i.visibility,i)),d(window).on("orientationchange.slick.slick-"+i.instanceUid,d.proxy(i.orientationChange,i)),d(window).on("resize.slick.slick-"+i.instanceUid,d.proxy(i.resize,i)),d("[draggable!=true]",i.$slideTrack).on("dragstart",i.preventDefault),d(window).on("load.slick.slick-"+i.instanceUid,i.setPosition),d(i.setPosition)},l.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},l.prototype.lazyLoad=function(){var i,e,t,n=this;function o(i){d("img[data-lazy]",i).each(function(){var i=d(this),e=d(this).attr("data-lazy"),t=d(this).attr("data-srcset"),o=d(this).attr("data-sizes")||n.$slider.attr("data-sizes"),s=document.createElement("img");s.onload=function(){i.animate({opacity:0},100,function(){t&&(i.attr("srcset",t),o&&i.attr("sizes",o)),i.attr("src",e).animate({opacity:1},200,function(){i.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,i,e])})},s.onerror=function(){i.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,i,e])},s.src=e})}if(!0===n.options.centerMode?t=!0===n.options.infinite?(e=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(e=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),n.options.slidesToShow/2+1+2+n.currentSlide):(e=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,t=Math.ceil(e+n.options.slidesToShow),!0===n.options.fade&&(0<e&&e--,t<=n.slideCount&&t++)),i=n.$slider.find(".slick-slide").slice(e,t),"anticipated"===n.options.lazyLoad)for(var s=e-1,l=t,r=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)s<0&&(s=n.slideCount-1),i=(i=i.add(r.eq(s))).add(r.eq(l)),s--,l++;o(i),n.slideCount<=n.options.slidesToShow?o(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?o(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&o(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},l.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},l.prototype.next=l.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},l.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},l.prototype.pause=l.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},l.prototype.play=l.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},l.prototype.postSlide=function(i){var e=this;e.unslicked||(e.$slider.trigger("afterChange",[e,i]),e.animating=!1,e.slideCount>e.options.slidesToShow&&e.setPosition(),e.swipeLeft=null,e.options.autoplay&&e.autoPlay(),e.updateSlideVisibility())},l.prototype.prev=l.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},l.prototype.preventDefault=function(i){i.preventDefault()},l.prototype.progressiveLazyLoad=function(i){i=i||1;var e,t,o,s,n,l=this,r=d("img[data-lazy]",l.$slider);r.length?(e=r.first(),t=e.attr("data-lazy"),o=e.attr("data-srcset"),s=e.attr("data-sizes")||l.$slider.attr("data-sizes"),(n=document.createElement("img")).onload=function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,e,t]),l.progressiveLazyLoad()},n.onerror=function(){i<3?setTimeout(function(){l.progressiveLazyLoad(i+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,e,t]),l.progressiveLazyLoad())},n.src=t):l.$slider.trigger("allImagesLoaded",[l])},l.prototype.refresh=function(i){var e,t=this,o=t.slideCount-t.options.slidesToShow;!t.options.infinite&&t.currentSlide>o&&(t.currentSlide=o),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),e=t.currentSlide,t.destroy(!0),d.extend(t,t.initials,{currentSlide:e}),t.init(),i||t.changeSlide({data:{message:"index",index:e}},!1)},l.prototype.registerBreakpoints=function(){var i,e,t,o=this,s=o.options.responsive||null;if("array"===d.type(s)&&s.length){for(i in o.respondTo=o.options.respondTo||"window",s)if(t=o.breakpoints.length-1,s.hasOwnProperty(i)){for(e=s[i].breakpoint;0<=t;)o.breakpoints[t]&&o.breakpoints[t]===e&&o.breakpoints.splice(t,1),t--;o.breakpoints.push(e),o.breakpointSettings[e]=s[i].settings}o.breakpoints.sort(function(i,e){return o.options.mobileFirst?i-e:e-i})}},l.prototype.reinit=function(){var i=this;i.$slides=i.$slideTrack.children(i.options.slide).addClass("slick-slide"),i.slideCount=i.$slides.length,i.currentSlide>=i.slideCount&&0!==i.currentSlide&&(i.currentSlide=i.currentSlide-i.options.slidesToScroll),i.slideCount<=i.options.slidesToShow&&(i.currentSlide=0),i.registerBreakpoints(),i.setProps(),i.setupInfinite(),i.buildArrows(),i.updateArrows(),i.initArrowEvents(),i.buildDots(),i.updateDots(),i.initDotEvents(),i.cleanUpSlideEvents(),i.initSlideEvents(),i.checkResponsive(!1,!0),i.setSlideClasses("number"==typeof i.currentSlide?i.currentSlide:0),i.setPosition(),i.focusHandler(),i.paused=!i.options.autoplay,i.autoPlay(),i.$slider.trigger("reInit",[i])},l.prototype.resize=function(){var i=this;d(window).width()!==i.windowWidth&&(clearTimeout(i.windowDelay),i.windowDelay=window.setTimeout(function(){i.windowWidth=d(window).width(),i.checkResponsive(),i.unslicked||i.setPosition()},50))},l.prototype.removeSlide=l.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},l.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled||(!(s={})===o.cssTransitions?s[o.animType]="translate("+e+", "+t+")":s[o.animType]="translate3d("+e+", "+t+", 0px)"),o.$slideTrack.css(s)},l.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},l.prototype.setFade=function(){var t,o=this;o.$slides.each(function(i,e){t=o.slideWidth*i*-1,!0===o.options.rtl?d(e).css({position:"relative",right:t,top:0,zIndex:o.options.zIndex-2,opacity:0}):d(e).css({position:"relative",left:t,top:0,zIndex:o.options.zIndex-2,opacity:0})}),o.$slides.eq(o.currentSlide).css({zIndex:o.options.zIndex-1,opacity:1})},l.prototype.setHeight=function(){var i,e=this;1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical&&(i=e.$slides.eq(e.currentSlide).outerHeight(!0),e.$list.css("height",i))},l.prototype.setOption=l.prototype.slickSetOption=function(){var i,e,t,o,s,n=this,l=!1;if("object"===d.type(arguments[0])?(t=arguments[0],l=arguments[1],s="multiple"):"string"===d.type(arguments[0])&&(o=arguments[1],l=arguments[2],"responsive"===(t=arguments[0])&&"array"===d.type(arguments[1])?s="responsive":void 0!==arguments[1]&&(s="single")),"single"===s)n.options[t]=o;else if("multiple"===s)d.each(t,function(i,e){n.options[i]=e});else if("responsive"===s)for(e in o)if("array"!==d.type(n.options.responsive))n.options.responsive=[o[e]];else{for(i=n.options.responsive.length-1;0<=i;)n.options.responsive[i].breakpoint===o[e].breakpoint&&n.options.responsive.splice(i,1),i--;n.options.responsive.push(o[e])}l&&(n.unload(),n.reinit())},l.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},l.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},l.prototype.setSlideClasses=function(i){var e,t,o,s,n=this,l=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true").attr("aria-label",function(){return d(this).attr("aria-label").replace(" (centered)","")});n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode?(o=n.options.slidesToShow%2==0?1:0,s=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(s<=i&&i<=n.slideCount-1-s?n.$slides.slice(i-s+o,i+s+1).addClass("slick-active").removeAttr("aria-hidden"):(e=n.options.slidesToShow+i,l.slice(e-s+1+o,e+s+2).addClass("slick-active").removeAttr("aria-hidden")),0===i?l.eq(n.options.slidesToShow+n.slideCount+1).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"}):i===n.slideCount-1&&l.eq(n.options.slidesToShow).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"})),n.$slides.eq(i).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"})):0<=i&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").removeAttr("aria-hidden"):l.length<=n.options.slidesToShow?l.addClass("slick-active").removeAttr("aria-hidden"):(t=n.slideCount%n.options.slidesToShow,e=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?l.slice(e-(n.options.slidesToShow-t),e+t).addClass("slick-active").removeAttr("aria-hidden"):l.slice(e,e+n.options.slidesToShow).addClass("slick-active").removeAttr("aria-hidden")),"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},l.prototype.setupInfinite=function(){var i,e,t,o=this;if(!0===o.options.fade&&(o.options.centerMode=!1),!0===o.options.infinite&&!1===o.options.fade&&(e=null,o.slideCount>o.options.slidesToShow)){for(t=!0===o.options.centerMode?o.options.slidesToShow+1:o.options.slidesToShow,i=o.slideCount;i>o.slideCount-t;--i)e=i-1,d(o.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e-o.slideCount).prependTo(o.$slideTrack).addClass("slick-cloned");for(i=0;i<t+o.slideCount;i+=1)e=i,d(o.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e+o.slideCount).appendTo(o.$slideTrack).addClass("slick-cloned");o.$slideTrack.find(".slick-cloned").find("[id]").each(function(){d(this).attr("id","")})}},l.prototype.interrupt=function(i){i||this.autoPlay(),this.interrupted=i},l.prototype.selectHandler=function(i){var e=d(i.target).is(".slick-slide")?d(i.target):d(i.target).parents(".slick-slide"),t=(t=parseInt(e.attr("data-slick-index")))||0;this.slideCount<=this.options.slidesToShow?this.slideHandler(t,!1,!0):this.slideHandler(t)},l.prototype.slideHandler=function(i,e,t){var o,s,n,l,r,a,d=this;if(e=e||!1,!(!0===d.animating&&!0===d.options.waitForAnimate||!0===d.options.fade&&d.currentSlide===i))if(!1===e&&d.asNavFor(i),o=i,r=d.getLeft(o),l=d.getLeft(d.currentSlide),d.currentLeft=null===d.swipeLeft?l:d.swipeLeft,!1===d.options.infinite&&!1===d.options.centerMode&&(i<0||i>d.getDotCount()*d.options.slidesToScroll))!1===d.options.fade&&(o=d.currentSlide,!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(l,function(){d.postSlide(o)}):d.postSlide(o));else if(!1===d.options.infinite&&!0===d.options.centerMode&&(i<0||i>d.slideCount-d.options.slidesToScroll))!1===d.options.fade&&(o=d.currentSlide,!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(l,function(){d.postSlide(o)}):d.postSlide(o));else{if(d.options.autoplay&&clearInterval(d.autoPlayTimer),s=o<0?d.slideCount%d.options.slidesToScroll!=0?d.slideCount-d.slideCount%d.options.slidesToScroll:d.slideCount+o:o>=d.slideCount?d.slideCount%d.options.slidesToScroll!=0?0:o-d.slideCount:o,d.animating=!0,d.$slider.trigger("beforeChange",[d,d.currentSlide,s]),n=d.currentSlide,d.currentSlide=s,d.setSlideClasses(d.currentSlide),d.options.asNavFor&&(a=(a=d.getNavTarget()).slick("getSlick")).slideCount<=a.options.slidesToShow&&a.setSlideClasses(d.currentSlide),d.updateDots(),d.updateArrows(),!0===d.options.fade)return!0!==t?(d.fadeSlideOut(n),d.fadeSlide(s,function(){d.postSlide(s)})):d.postSlide(s),void d.animateHeight();!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(r,function(){d.postSlide(s)}):d.postSlide(s)}},l.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},l.prototype.swipeDirection=function(){var i=this,e=i.touchObject.startX-i.touchObject.curX,t=i.touchObject.startY-i.touchObject.curY,o=Math.atan2(t,e),s=Math.round(180*o/Math.PI);return s<0&&(s=360-Math.abs(s)),s<=45&&0<=s||s<=360&&315<=s?!1===i.options.rtl?"left":"right":135<=s&&s<=225?!1===i.options.rtl?"right":"left":!0===i.options.verticalSwiping?35<=s&&s<=135?"down":"up":"vertical"},l.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1;if(o.interrupted=!1,o.shouldClick=!(10<o.touchObject.swipeLength),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},l.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},l.prototype.swipeMove=function(i){var e,t,o,s,n,l=this,r=void 0!==i.originalEvent?i.originalEvent.touches:null;return!(!l.dragging||l.scrolling||r&&1!==r.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==r?r[0].pageX:i.clientX,l.touchObject.curY=void 0!==r?r[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),n=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&4<n?!(l.scrolling=!0):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=n),t=l.swipeDirection(),void 0!==i.originalEvent&&4<l.touchObject.swipeLength&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,(l.touchObject.edgeHit=!1)===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},l.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return!(t.touchObject={});void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},l.prototype.unfilterSlides=l.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},l.prototype.unload=function(){var i=this;d(".slick-cloned",i.$slider).remove(),i.$dots&&i.$dots.remove(),i.$prevArrow&&i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove(),i.$nextArrow&&i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove(),i.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},l.prototype.unslick=function(i){this.$slider.trigger("unslick",[this,i]),this.destroy()},l.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2);!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").prop("disabled",!1),i.$nextArrow.removeClass("slick-disabled").prop("disabled",!1),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").prop("disabled",!0),i.$nextArrow.removeClass("slick-disabled").prop("disabled",!1)):(i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode||i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode)&&(i.$nextArrow.addClass("slick-disabled").prop("disabled",!0),i.$prevArrow.removeClass("slick-disabled").prop("disabled",!1)))},l.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").find("button").removeAttr("aria-current").end().end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active").find("button").attr("aria-current",!0).end().end())},l.prototype.updateSlideVisibility=function(){this.$slideTrack.find(".slick-slide").attr("aria-hidden","true").find("a, input, button, select").attr("tabindex","-1"),this.$slideTrack.find(".slick-active").removeAttr("aria-hidden").find("a, input, button, select").removeAttr("tabindex")},l.prototype.visibility=function(){this.options.autoplay&&(document[this.hidden]?this.interrupted=!0:this.interrupted=!1)},d.fn.slick=function(){for(var i,e=this,t=arguments[0],o=Array.prototype.slice.call(arguments,1),s=e.length,n=0;n<s;n++)if("object"==typeof t||void 0===t?e[n].slick=new l(e[n],t):i=e[n].slick[t].apply(e[n].slick,o),void 0!==i)return i;return e}});
17739 17740 17741
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.