1/* compact [ 2 local/cache-js/jquery.form-minify-3407.js?1787655134 3 local/cache-js/jquery.placeholder-label-minify-6ebc.js?1787655134 4 local/cache-js/ajaxCallback-minify-472c.js?1787655134 5 local/cache-js/js.cookie-minify-4a7d.js?1787655134 6 plugins/opinions/javascript/opinions.js 7 plugins/alphamosa/javascript/alphamosa-img.js 8 local/cache-js/sharer-minify-7813.js?1787654971 9] 96.6% */ 10 11/* local/cache-js/jquery.form-minify-3407.js?1787655134 */ 12 13(function(factory){ 14if(typeof define==='function'&&define.amd){ 15define(['jquery'],factory); 16}else if(typeof module==='object'&&module.exports){ 17module.exports=function(root,jQuery){ 18if(typeof jQuery==='undefined'){ 19if(typeof window!=='undefined'){ 20jQuery=require('jquery'); 21} 22else{ 23jQuery=require('jquery')(root); 24} 25} 26factory(jQuery); 27return jQuery; 28}; 29}else{ 30factory(jQuery); 31} 32}(function($){ 33'use strict'; 34var rCRLF=/\r?\n/g; 35var feature={}; 36feature.fileapi=$('<input type="file">').get(0).files!==undefined; 37feature.formdata=(typeof window.FormData!=='undefined'); 38var hasProp=!!$.fn.prop; 39$.fn.attr2=function(){ 40if(!hasProp){ 41return this.attr.apply(this,arguments); 42} 43var val=this.prop.apply(this,arguments); 44if((val&&val.jquery)||typeof val==='string'){ 45return val; 46} 47return this.attr.apply(this,arguments); 48}; 49$.fn.ajaxSubmit=function(options,data,dataType,onSuccess){ 50if(!this.length){ 51log('ajaxSubmit: skipping submit process - no element selected'); 52return this; 53} 54var method,action,url,isMsie,iframeSrc,$form=this; 55if(typeof options==='function'){ 56options={success:options}; 57}else if(typeof options==='string'||(options===false&&arguments.length>0)){ 58options={ 59'url':options, 60'data':data, 61'dataType':dataType 62}; 63if(typeof onSuccess==='function'){ 64options.success=onSuccess; 65} 66}else if(typeof options==='undefined'){ 67options={}; 68} 69method=options.method||options.type||this.attr2('method'); 70action=options.url||this.attr2('action'); 71url=(typeof action==='string')?$.trim(action):''; 72url=url||window.location.href||''; 73if(url){ 74url=(url.match(/^([^#]+)/)||[])[1]; 75} 76isMsie=/(MSIE|Trident)/.test(navigator.userAgent||''); 77iframeSrc=(isMsie&&/^https/i.test(window.location.href||''))?'javascript:false':'about:blank'; 78options=$.extend(true,{ 79url:url, 80success:$.ajaxSettings.success, 81type:method||$.ajaxSettings.type, 82iframeSrc:iframeSrc 83},options); 84var veto={}; 85this.trigger('form-pre-serialize',[this,options,veto]); 86if(veto.veto){ 87log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); 88return this; 89} 90if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){ 91log('ajaxSubmit: submit aborted via beforeSerialize callback'); 92return this; 93} 94var traditional=options.traditional; 95if(typeof traditional==='undefined'){ 96traditional=$.ajaxSettings.traditional; 97} 98var elements=[]; 99var qx,a=this.formToArray(options.semantic,elements,options.filtering); 100if(options.data){ 101var optionsData=$.isFunction(options.data)?options.data(a):options.data; 102options.extraData=optionsData; 103qx=$.param(optionsData,traditional); 104} 105if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){ 106log('ajaxSubmit: submit aborted via beforeSubmit callback'); 107return this; 108} 109this.trigger('form-submit-validate',[a,this,options,veto]); 110if(veto.veto){ 111log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); 112return this; 113} 114var q=$.param(a,traditional); 115if(qx){ 116q=(q?(q+'&'+qx):qx); 117} 118if(options.type.toUpperCase()==='GET'){ 119options.url+=(options.url.indexOf('?')>=0?'&':'?')+q; 120options.data=null; 121}else{ 122options.data=q; 123} 124var callbacks=[]; 125if(options.resetForm){ 126callbacks.push(function(){ 127$form.resetForm(); 128}); 129} 130if(options.clearForm){ 131callbacks.push(function(){ 132$form.clearForm(options.includeHidden); 133}); 134} 135if(!options.dataType&&options.target){ 136var oldSuccess=options.success||function(){}; 137callbacks.push(function(data,textStatus,jqXHR){ 138var successArguments=arguments, 139fn=options.replaceTarget?'replaceWith':'html'; 140if(fn=='html'){ 141data=$.parseHTML($("<div>").text(data).html()) 142}; 143$(options.target)[fn](data).each(function(){ 144oldSuccess.apply(this,successArguments); 145}); 146}); 147}else if(options.success){ 148if($.isArray(options.success)){ 149$.merge(callbacks,options.success); 150}else{ 151callbacks.push(options.success); 152} 153} 154options.success=function(data,status,xhr){ 155var context=options.context||this; 156for(var i=0,max=callbacks.length;i<max;i++){ 157callbacks[i].apply(context,[data,status,xhr||$form,$form]); 158} 159}; 160if(options.error){ 161var oldError=options.error; 162options.error=function(xhr,status,error){ 163var context=options.context||this; 164oldError.apply(context,[xhr,status,error,$form]); 165}; 166}
167if(options.complete){ 168var oldComplete=options.complete; 169options.complete=function(xhr,status){ 170var context=options.context||this; 171oldComplete.apply(context,[xhr,status,$form]); 172}; 173} 174var fileInputs=$('input[type=file]:enabled',this).filter(function(){ 175return $(this).val()!==''; 176}); 177var hasFileInputs=fileInputs.length>0; 178var mp='multipart/form-data'; 179var multipart=($form.attr('enctype')===mp||$form.attr('encoding')===mp); 180var fileAPI=feature.fileapi&&feature.formdata; 181log('fileAPI :'+fileAPI); 182var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI; 183var jqxhr; 184if(options.iframe!==false&&(options.iframe||shouldUseFrame)){ 185if(options.closeKeepAlive){ 186$.get(options.closeKeepAlive,function(){ 187jqxhr=fileUploadIframe(a); 188}); 189}else{ 190jqxhr=fileUploadIframe(a); 191} 192}else if((hasFileInputs||multipart)&&fileAPI){ 193jqxhr=fileUploadXhr(a); 194}else{ 195jqxhr=$.ajax(options); 196} 197$form.removeData('jqxhr').data('jqxhr',jqxhr); 198for(var k=0;k<elements.length;k++){ 199elements[k]=null; 200} 201this.trigger('form-submit-notify',[this,options]); 202return this; 203function deepSerialize(extraData){ 204var serialized=$.param(extraData,options.traditional).split('&'); 205var len=serialized.length; 206var result=[]; 207var i,part; 208for(i=0;i<len;i++){ 209serialized[i]=serialized[i].replace(/\+/g,' '); 210part=serialized[i].split('='); 211result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]); 212} 213return result; 214} 215function fileUploadXhr(a){ 216var formdata=new FormData(); 217for(var i=0;i<a.length;i++){ 218formdata.append(a[i].name,a[i].value); 219} 220if(options.extraData){ 221var serializedData=deepSerialize(options.extraData); 222for(i=0;i<serializedData.length;i++){ 223if(serializedData[i]){ 224formdata.append(serializedData[i][0],serializedData[i][1]); 225} 226} 227} 228options.data=null; 229var s=$.extend(true,{},$.ajaxSettings,options,{ 230contentType:false, 231processData:false, 232cache:false, 233type:method||'POST' 234}); 235if(options.uploadProgress){ 236s.xhr=function(){ 237var xhr=$.ajaxSettings.xhr(); 238if(xhr.upload){ 239xhr.upload.addEventListener('progress',function(event){ 240var percent=0; 241var position=event.loaded||event.position; 242var total=event.total; 243if(event.lengthComputable){ 244percent=Math.ceil(position/total*100); 245} 246options.uploadProgress(event,position,total,percent); 247},false); 248} 249return xhr; 250}; 251} 252s.data=null; 253var beforeSend=s.beforeSend; 254s.beforeSend=function(xhr,o){ 255if(options.formData){ 256o.data=options.formData; 257}else{ 258o.data=formdata; 259} 260if(beforeSend){ 261beforeSend.call(this,xhr,o); 262} 263}; 264return $.ajax(s); 265} 266function fileUploadIframe(a){ 267var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle; 268var deferred=$.Deferred(); 269deferred.abort=function(status){ 270xhr.abort(status); 271}; 272if(a){ 273for(i=0;i<elements.length;i++){ 274el=$(elements[i]); 275if(hasProp){ 276el.prop('disabled',false); 277}else{ 278el.removeAttr('disabled'); 279} 280} 281} 282s=$.extend(true,{},$.ajaxSettings,options); 283s.context=s.context||s; 284id='jqFormIO'+new Date().getTime(); 285var ownerDocument=form.ownerDocument; 286var $body=$form.closest('body'); 287if(s.iframeTarget){ 288$io=$(s.iframeTarget,ownerDocument); 289n=$io.attr2('name'); 290if(!n){ 291$io.attr2('name',id); 292}else{ 293id=n; 294} 295}else{ 296$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'">',ownerDocument); 297$io.css({position:'absolute',top:'-1000px',left:'-1000px'}); 298} 299io=$io[0]; 300xhr={ 301aborted:0, 302responseText:null, 303responseXML:null, 304status:0, 305statusText:'n/a', 306getAllResponseHeaders:function(){}, 307getResponseHeader:function(){}, 308setRequestHeader:function(){}, 309abort:function(status){ 310var e=(status==='timeout'?'timeout':'aborted'); 311log('aborting upload... '+e); 312this.aborted=1; 313try{ 314if(io.contentWindow.document.execCommand){ 315io.contentWindow.document.execCommand('Stop'); 316} 317}catch(ignore){} 318$io.attr('src',s.iframeSrc); 319xhr.error=e; 320if(s.error){ 321s.error.call(s.context,xhr,e,status); 322} 323if(g){ 324$.event.trigger('ajaxError',[xhr,s,e]); 325} 326if(s.complete){ 327s.complete.call(s.context,xhr,e); 328} 329} 330}; 331g=s.global; 332if(g&&$.active++===0){ 333$.event.trigger('ajaxStart'); 334} 335if(g){ 336$.event.trigger('ajaxSend',[xhr,s]); 337} 338if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){ 339if(s.global){ 340$.active--; 341} 342deferred.reject(); 343return deferred; 344} 345if(xhr.aborted){ 346deferred.reject(); 347return deferred; 348} 349sub=form.clk; 350if(sub){ 351n=sub.name; 352if(n&&!sub.disabled){ 353s.extraData=s.extraData||{}; 354s.extraData[n]=sub.value; 355if(sub.type==='image'){ 356s.extraData[n+'.x']=form.clk_x; 357s.extraData[n+'.y']=form.clk_y; 358} 359} 360} 361var CLIENT_TIMEOUT_ABORT=1; 362var SERVER_ABORT=2; 363function getDoc(frame){ 364var doc=null; 365try{ 366if(frame.contentWindow){ 367doc=frame.contentWindow.document; 368} 369}catch(err){ 370log('cannot get iframe.contentWindow document: '+err); 371} 372if(doc){ 373return doc; 374} 375try{ 376doc=frame.contentDocument?frame.contentDocument:frame.document; 377}catch(err){ 378log('cannot get iframe.contentDocument: '+err); 379doc=frame.document; 380} 381return doc; 382} 383var csrf_token=$('meta[name=csrf-token]').attr('content'); 384var csrf_param=$('meta[name=csrf-param]').attr('content'); 385if(csrf_param&&csrf_token){ 386s.extraData=s.extraData||{}; 387s.extraData[csrf_param]=csrf_token; 388} 389function doSubmit(){ 390var t=$form.attr2('target'), 391a=$form.attr2('action'), 392mp='multipart/form-data', 393et=$form.attr('enctype')||$form.attr('encoding')||mp; 394form.setAttribute('target',id); 395if(!method||/post/i.test(method)){ 396form.setAttribute('method','POST'); 397} 398if(a!==s.url){ 399form.setAttribute('action',s.url); 400} 401if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){ 402$form.attr({ 403encoding:'multipart/form-data', 404enctype:'multipart/form-data' 405}); 406} 407if(s.timeout){ 408timeoutHandle=setTimeout(function(){ 409timedOut=true;cb(CLIENT_TIMEOUT_ABORT); 410},s.timeout); 411} 412function checkState(){ 413try{ 414var state=getDoc(io).readyState; 415log('state = '+state); 416if(state&&state.toLowerCase()==='uninitialized'){ 417setTimeout(checkState,50); 418} 419}catch(e){ 420log('Server abort: ',e,' (',e.name,')'); 421cb(SERVER_ABORT); 422if(timeoutHandle){ 423clearTimeout(timeoutHandle); 424} 425timeoutHandle=undefined; 426} 427} 428var extraInputs=[]; 429try{ 430if(s.extraData){ 431for(var n in s.extraData){ 432if(s.extraData.hasOwnProperty(n)){ 433if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){ 434extraInputs.push( 435$('<input type="hidden" name="'+s.extraData[n].name+'">',ownerDocument).val(s.extraData[n].value) 436.appendTo(form)[0]); 437}else{ 438extraInputs.push( 439$('<input type="hidden" name="'+n+'">',ownerDocument).val(s.extraData[n]) 440.appendTo(form)[0]); 441} 442} 443} 444} 445if(!s.iframeTarget){ 446$io.appendTo($body); 447} 448if(io.attachEvent){ 449io.attachEvent('onload',cb); 450}else{ 451io.addEventListener('load',cb,false); 452} 453setTimeout(checkState,15); 454try{ 455form.submit(); 456}catch(err){ 457var submitFn=document.createElement('form').submit; 458submitFn.apply(form); 459} 460}finally{ 461form.setAttribute('action',a); 462form.setAttribute('enctype',et); 463if(t){ 464form.setAttribute('target',t); 465}else{ 466$form.removeAttr('target'); 467} 468$(extraInputs).remove(); 469} 470} 471if(s.forceSync){ 472doSubmit(); 473}else{ 474setTimeout(doSubmit,10); 475} 476var data,doc,domCheckCount=50,callbackProcessed; 477function cb(e){ 478if(xhr.aborted||callbackProcessed){ 479return; 480} 481doc=getDoc(io); 482if(!doc){ 483log('cannot access response document'); 484e=SERVER_ABORT; 485} 486if(e===CLIENT_TIMEOUT_ABORT&&xhr){ 487xhr.abort('timeout'); 488deferred.reject(xhr,'timeout'); 489return; 490} 491if(e===SERVER_ABORT&&xhr){ 492xhr.abort('server abort'); 493deferred.reject(xhr,'error','server abort'); 494return; 495} 496if(!doc||doc.location.href===s.iframeSrc){ 497if(!timedOut){ 498return; 499} 500} 501if(io.detachEvent){ 502io.detachEvent('onload',cb); 503}else{ 504io.removeEventListener('load',cb,false); 505} 506var status='success',errMsg; 507try{ 508if(timedOut){ 509throw'timeout'; 510} 511var isXml=s.dataType==='xml'||doc.XMLDocument||$.isXMLDoc(doc); 512log('isXml='+isXml); 513if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){ 514if(--domCheckCount){ 515log('requeing onLoad callback, DOM not available'); 516setTimeout(cb,250); 517return; 518} 519} 520var docRoot=doc.body?doc.body:doc.documentElement; 521xhr.responseText=docRoot?docRoot.innerHTML:null; 522xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc; 523if(isXml){ 524s.dataType='xml'; 525} 526xhr.getResponseHeader=function(header){ 527var headers={'content-type':s.dataType}; 528return headers[header.toLowerCase()]; 529}; 530if(docRoot){ 531xhr.status=Number(docRoot.getAttribute('status'))||xhr.status; 532xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText; 533} 534var dt=(s.dataType||'').toLowerCase(); 535var scr=/(json|script|text)/.test(dt); 536if(scr||s.textarea){ 537var ta=doc.getElementsByTagName('textarea')[0]; 538if(ta){ 539xhr.responseText=ta.value; 540xhr.status=Number(ta.getAttribute('status'))||xhr.status; 541xhr.statusText=ta.getAttribute('statusText')||xhr.statusText; 542}else if(scr){ 543var pre=doc.getElementsByTagName('pre')[0]; 544var b=doc.getElementsByTagName('body')[0]; 545if(pre){ 546xhr.responseText=pre.textContent?pre.textContent:pre.innerText; 547}else if(b){ 548xhr.responseText=b.textContent?b.textContent:b.innerText; 549} 550} 551}else if(dt==='xml'&&!xhr.responseXML&&xhr.responseText){ 552xhr.responseXML=toXml(xhr.responseText); 553} 554try{ 555data=httpData(xhr,dt,s); 556}catch(err){ 557status='parsererror'; 558xhr.error=errMsg=(err||status); 559} 560}catch(err){ 561log('error caught: ',err); 562status='error'; 563xhr.error=errMsg=(err||status); 564} 565if(xhr.aborted){ 566log('upload aborted'); 567status=null; 568} 569if(xhr.status){ 570status=((xhr.status>=200&&xhr.status<300)||xhr.status===304)?'success':'error'; 571} 572if(status==='success'){ 573if(s.success){ 574s.success.call(s.context,data,'success',xhr); 575} 576deferred.resolve(xhr.responseText,'success',xhr); 577if(g){
578$.event.trigger('ajaxSuccess',[xhr,s]); 579} 580}else if(status){ 581if(typeof errMsg==='undefined'){ 582errMsg=xhr.statusText; 583} 584if(s.error){ 585s.error.call(s.context,xhr,status,errMsg); 586} 587deferred.reject(xhr,'error',errMsg); 588if(g){ 589$.event.trigger('ajaxError',[xhr,s,errMsg]); 590} 591} 592if(g){ 593$.event.trigger('ajaxComplete',[xhr,s]); 594} 595if(g&&!--$.active){ 596$.event.trigger('ajaxStop'); 597} 598if(s.complete){ 599s.complete.call(s.context,xhr,status); 600} 601callbackProcessed=true; 602if(s.timeout){ 603clearTimeout(timeoutHandle); 604} 605setTimeout(function(){ 606if(!s.iframeTarget){ 607$io.remove(); 608}else{ 609$io.attr('src',s.iframeSrc); 610} 611xhr.responseXML=null; 612},100); 613} 614var toXml=$.parseXML||function(s,doc){ 615if(window.ActiveXObject){ 616doc=new ActiveXObject('Microsoft.XMLDOM'); 617doc.async='false'; 618doc.loadXML(s); 619}else{ 620doc=(new DOMParser()).parseFromString(s,'text/xml'); 621} 622return(doc&&doc.documentElement&&doc.documentElement.nodeName!=='parsererror')?doc:null; 623}; 624var parseJSON=$.parseJSON||function(s){ 625window.console.error('jquery.parseJSON is undefined'); 626return null; 627}; 628var httpData=function(xhr,type,s){ 629var ct=xhr.getResponseHeader('content-type')||'', 630xml=((type==='xml'||!type)&&ct.indexOf('xml')>=0), 631data=xml?xhr.responseXML:xhr.responseText; 632if(xml&&data.documentElement.nodeName==='parsererror'){ 633if($.error){ 634$.error('parsererror'); 635} 636} 637if(s&&s.dataFilter){ 638data=s.dataFilter(data,type); 639} 640if(typeof data==='string'){ 641if((type==='json'||!type)&&ct.indexOf('json')>=0){ 642data=parseJSON(data); 643}else if((type==='script'||!type)&&ct.indexOf('javascript')>=0){ 644$.globalEval(data); 645} 646} 647return data; 648}; 649return deferred; 650} 651}; 652$.fn.ajaxForm=function(options,data,dataType,onSuccess){ 653if(typeof options==='string'||(options===false&&arguments.length>0)){ 654options={ 655'url':options, 656'data':data, 657'dataType':dataType 658}; 659if(typeof onSuccess==='function'){ 660options.success=onSuccess; 661} 662} 663options=options||{}; 664options.delegation=options.delegation&&$.isFunction($.fn.on); 665if(!options.delegation&&this.length===0){ 666var o={s:this.selector,c:this.context}; 667if(!$.isReady&&o.s){ 668log('DOM not ready, queuing ajaxForm'); 669$(function(){ 670$(o.s,o.c).ajaxForm(options); 671}); 672return this; 673} 674log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)')); 675return this; 676} 677if(options.delegation){ 678$(document) 679.off('submit.form-plugin',this.selector,doAjaxSubmit) 680.off('click.form-plugin',this.selector,captureSubmittingElement) 681.on('submit.form-plugin',this.selector,options,doAjaxSubmit) 682.on('click.form-plugin',this.selector,options,captureSubmittingElement); 683return this; 684} 685if(options.beforeFormUnbind){ 686options.beforeFormUnbind(this,options); 687} 688return this.ajaxFormUnbind() 689.on('submit.form-plugin',options,doAjaxSubmit) 690.on('click.form-plugin',options,captureSubmittingElement); 691}; 692function doAjaxSubmit(e){ 693var options=e.data; 694if(!e.isDefaultPrevented()){ 695e.preventDefault(); 696$(e.target).closest('form').ajaxSubmit(options); 697} 698} 699function captureSubmittingElement(e){ 700var target=e.target; 701var $el=$(target); 702if(!$el.is('[type=submit],[type=image]')){ 703var t=$el.closest('[type=submit]'); 704if(t.length===0){ 705return; 706} 707target=t[0]; 708} 709var form=target.form; 710form.clk=target; 711if(target.type==='image'){ 712if(typeof e.offsetX!=='undefined'){ 713form.clk_x=e.offsetX; 714form.clk_y=e.offsetY; 715}else if(typeof $.fn.offset==='function'){ 716var offset=$el.offset(); 717form.clk_x=e.pageX-offset.left; 718form.clk_y=e.pageY-offset.top; 719}else{ 720form.clk_x=e.pageX-target.offsetLeft; 721form.clk_y=e.pageY-target.offsetTop; 722} 723} 724setTimeout(function(){ 725form.clk=form.clk_x=form.clk_y=null; 726},100); 727} 728$.fn.ajaxFormUnbind=function(){ 729return this.off('submit.form-plugin click.form-plugin'); 730}; 731$.fn.formToArray=function(semantic,elements,filtering){ 732var a=[]; 733if(this.length===0){ 734return a; 735} 736var form=this[0]; 737var formId=this.attr('id'); 738var els=(semantic||typeof form.elements==='undefined')?form.getElementsByTagName('*'):form.elements; 739var els2; 740if(els){ 741els=$.makeArray(els); 742} 743if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){ 744els2=$(':input[form="'+formId+'"]').get(); 745if(els2.length){ 746els=(els||[]).concat(els2); 747} 748} 749if(!els||!els.length){ 750return a; 751}
752if($.isFunction(filtering)){ 753els=$.map(els,filtering); 754} 755var i,j,n,v,el,max,jmax; 756for(i=0,max=els.length;i<max;i++){ 757el=els[i]; 758n=el.name; 759if(!n||el.disabled){ 760continue; 761} 762if(semantic&&form.clk&&el.type==='image'){ 763if(form.clk===el){ 764a.push({name:n,value:$(el).val(),type:el.type}); 765a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y}); 766} 767continue; 768} 769v=$.fieldValue(el,true); 770if(v&&v.constructor===Array){ 771if(elements){ 772elements.push(el); 773} 774for(j=0,jmax=v.length;j<jmax;j++){ 775a.push({name:n,value:v[j]}); 776} 777}else if(feature.fileapi&&el.type==='file'){ 778if(elements){ 779elements.push(el); 780} 781var files=el.files; 782if(files.length){ 783for(j=0;j<files.length;j++){ 784a.push({name:n,value:files[j],type:el.type}); 785} 786}else{ 787a.push({name:n,value:'',type:el.type}); 788} 789}else if(v!==null&&typeof v!=='undefined'){ 790if(elements){ 791elements.push(el); 792} 793a.push({name:n,value:v,type:el.type,required:el.required}); 794} 795} 796if(!semantic&&form.clk){ 797var $input=$(form.clk),input=$input[0]; 798n=input.name; 799if(n&&!input.disabled&&input.type==='image'){ 800a.push({name:n,value:$input.val()}); 801a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y}); 802} 803} 804return a; 805}; 806$.fn.formSerialize=function(semantic){ 807return $.param(this.formToArray(semantic)); 808}; 809$.fn.fieldSerialize=function(successful){ 810var a=[]; 811this.each(function(){ 812var n=this.name; 813if(!n){ 814return; 815} 816var v=$.fieldValue(this,successful); 817if(v&&v.constructor===Array){ 818for(var i=0,max=v.length;i<max;i++){ 819a.push({name:n,value:v[i]}); 820} 821}else if(v!==null&&typeof v!=='undefined'){ 822a.push({name:this.name,value:v}); 823} 824}); 825return $.param(a); 826}; 827$.fn.fieldValue=function(successful){ 828for(var val=[],i=0,max=this.length;i<max;i++){ 829var el=this[i]; 830var v=$.fieldValue(el,successful); 831if(v===null||typeof v==='undefined'||(v.constructor===Array&&!v.length)){ 832continue; 833} 834if(v.constructor===Array){ 835$.merge(val,v); 836}else{ 837val.push(v); 838} 839} 840return val; 841}; 842$.fieldValue=function(el,successful){ 843var n=el.name,t=el.type,tag=el.tagName.toLowerCase(); 844if(typeof successful==='undefined'){ 845successful=true; 846} 847if(successful&&(!n||el.disabled||t==='reset'||t==='button'|| 848(t==='checkbox'||t==='radio')&&!el.checked|| 849(t==='submit'||t==='image')&&el.form&&el.form.clk!==el|| 850tag==='select'&&el.selectedIndex===-1)){ 851return null; 852} 853if(tag==='select'){ 854var index=el.selectedIndex; 855if(index<0){ 856return null; 857} 858var a=[],ops=el.options; 859var one=(t==='select-one'); 860var max=(one?index+1:ops.length); 861for(var i=(one?index:0);i<max;i++){ 862var op=ops[i]; 863if(op.selected&&!op.disabled){ 864var v=op.value; 865if(!v){ 866v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value; 867} 868if(one){ 869return v; 870} 871a.push(v); 872} 873} 874return a; 875} 876return $(el).val().replace(rCRLF,'\r\n'); 877}; 878$.fn.clearForm=function(includeHidden){ 879return this.each(function(){ 880$('input,select,textarea',this).clearFields(includeHidden); 881}); 882}; 883$.fn.clearFields=$.fn.clearInputs=function(includeHidden){ 884var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; 885return this.each(function(){ 886var t=this.type,tag=this.tagName.toLowerCase(); 887if(re.test(t)||tag==='textarea'){ 888this.value=''; 889}else if(t==='checkbox'||t==='radio'){ 890this.checked=false; 891}else if(tag==='select'){ 892this.selectedIndex=-1; 893}else if(t==='file'){ 894if(/MSIE/.test(navigator.userAgent)){ 895$(this).replaceWith($(this).clone(true)); 896}else{ 897$(this).val(''); 898} 899}else if(includeHidden){ 900if((includeHidden===true&&/hidden/.test(t))|| 901(typeof includeHidden==='string'&&$(this).is(includeHidden))){ 902this.value=''; 903} 904} 905}); 906}; 907$.fn.resetForm=function(){ 908return this.each(function(){ 909var el=$(this); 910var tag=this.tagName.toLowerCase(); 911switch(tag){ 912case'input': 913this.checked=this.defaultChecked; 914case'textarea': 915this.value=this.defaultValue; 916return true; 917case'option': 918case'optgroup': 919var select=el.parents('select'); 920if(select.length&&select[0].multiple){ 921if(tag==='option'){ 922this.selected=this.defaultSelected; 923}else{ 924el.find('option').resetForm(); 925} 926}else{ 927select.resetForm(); 928} 929return true; 930case'select': 931el.find('option').each(function(i){ 932this.selected=this.defaultSelected; 933if(this.defaultSelected&&!el[0].multiple){ 934el[0].selectedIndex=i; 935return false;
936} 937}); 938return true; 939case'label': 940var forEl=$(el.attr('for')); 941var list=el.find('input,select,textarea'); 942if(forEl[0]){ 943list.unshift(forEl[0]); 944} 945list.resetForm(); 946return true; 947case'form': 948if(typeof this.reset==='function'||(typeof this.reset==='object'&&!this.reset.nodeType)){ 949this.reset(); 950} 951return true; 952default: 953el.find('form,input,label,select,textarea').resetForm(); 954return true; 955} 956}); 957}; 958$.fn.enable=function(b){ 959if(typeof b==='undefined'){ 960b=true; 961} 962return this.each(function(){ 963this.disabled=!b; 964}); 965}; 966$.fn.selected=function(select){ 967if(typeof select==='undefined'){ 968select=true; 969} 970return this.each(function(){ 971var t=this.type; 972if(t==='checkbox'||t==='radio'){ 973this.checked=select; 974}else if(this.tagName.toLowerCase()==='option'){ 975var $sel=$(this).parent('select'); 976if(select&&$sel[0]&&$sel[0].type==='select-one'){ 977$sel.find('option').selected(false); 978} 979this.selected=select; 980} 981}); 982}; 983$.fn.ajaxSubmit.debug=false; 984function log(){ 985if(!$.fn.ajaxSubmit.debug){ 986return; 987} 988var msg='[jquery.form] '+Array.prototype.join.call(arguments,''); 989if(window.console&&window.console.log){ 990window.console.log(msg); 991}else if(window.opera&&window.opera.postError){ 992window.opera.postError(msg); 993} 994} 995})); 996 997 998/* local/cache-js/jquery.placeholder-label-minify-6ebc.js?1787655134 */ 999 1000(function($){
1001$.placeholderLabel={ 1002placeholder_class:null, 1003add_placeholder:function(){ 1004if($(this).val()==$(this).attr('placeholder')){ 1005$(this).val('').removeClass($.placeholderLabel.placeholder_class); 1006} 1007}, 1008remove_placeholder:function(){ 1009if($(this).val()==''){ 1010$(this).val($(this).attr('placeholder')).addClass($.placeholderLabel.placeholder_class); 1011} 1012}, 1013disable_placeholder_fields:function(){ 1014$(this).find("input[placeholder]").each(function(){ 1015if($(this).val()==$(this).attr('placeholder')){ 1016$(this).val(''); 1017} 1018}); 1019return true; 1020} 1021}; 1022$.fn.placeholderLabel=function(options){ 1023var dummy=document.createElement('input'); 1024if(dummy.placeholder!=undefined){ 1025return this; 1026} 1027var config={ 1028placeholder_class:'placeholder' 1029}; 1030if(options)$.extend(config,options); 1031$.placeholderLabel.placeholder_class=config.placeholder_class; 1032this.each(function(){ 1033var input=$(this); 1034input.focus($.placeholderLabel.add_placeholder); 1035input.blur($.placeholderLabel.remove_placeholder); 1036input.triggerHandler('focus'); 1037input.triggerHandler('blur'); 1038$(this.form).submit($.placeholderL
1038abel.disable_placeholder_fields); 1039}); 1040return this; 1041} 1042})(jQuery); 1043 1044 1045/* local/cache-js/ajaxCallback-minify-472c.js?1787655134 */ 1046jQuery.spip=jQuery.spip||{}; 1047jQuery.spip.log=function(){ 1048if(jQuery.spip.debug&&window.console&&window.console.log) 1049window.console.log.apply(this,arguments); 1050} 1051jQuery.spip.test_espace_prive=function(){ 1052if(typeof spipConfig.core.test_espace_prive!=undefined&&spipConfig.core.test_espace_prive){ 1053return true; 1054} 1055return false; 1056} 1057if(!jQuery.spip.load_handlers){ 1058jQuery.spip.load_handlers=new Array(); 1059function onAjaxLoad(f){ 1060jQuery.spip.load_handlers.push(f); 1061}; 1062jQuery.spip.triggerAjaxLoad=function(root){ 1063jQuery.spip.log('triggerAjaxLoad'); 1064jQuery.spip.log(root); 1065for(var i=0;i<jQuery.spip.load_handlers.length;i++) 1066jQuery.spip.load_handlers[i].apply(root); 1067}; 1068jQuery.spip.intercepted={}; 1069jQuery.spip.intercepted.load=jQuery.fn.load; 1070jQuery.fn.load=function(url,params,callback){ 1071if(typeof url!=="string"){ 1072return jQuery.spip.intercepted.load.apply(this,arguments); 1073} 1074callback=callback||function(){}; 1075if(params){ 1076if(params.constructor==Function){ 1077callback=params; 1078params=null; 1079} 1080} 1081params=jQuery.extend(params,{triggerAjaxLoad:false}); 1082var callback2=function(){jQuery.spip.log('jQuery.load');jQuery.spip.triggerAjaxLoad(this);callback.apply(this,arguments);}; 1083return jQuery.spip.intercepted.load.apply(this,[url,params,callback2]); 1084}; 1085jQuery.spip.intercepted.ajaxSubmit=jQuery.fn.ajaxSubmit; 1086jQuery.fn.ajaxSubmit=function(options){ 1087options=options||{}; 1088if(typeof options.onAjaxLoad=="undefined"||options.onAjaxLoad!=false){ 1089var me=jQuery(this).parents('div.ajax'); 1090if(me.length) 1091me=me.parent(); 1092else 1093me=document; 1094if(typeof options=='function') 1095options={success:options}; 1096var callback=options.success||function(){}; 1097options.success=function(){callback.apply(this,arguments);jQuery.spip.log('jQuery.ajaxSubmit');jQuery.spip.triggerAjaxLoad(me);} 1098} 1099return jQuery.spip.intercepted.ajaxSubmit.apply(this,[options]); 1100} 1101jQuery.spip.intercepted.ajax=jQuery.ajax; 1102jQuery.ajax=function(url,settings){ 1103if(typeof settings=='undefined'){ 1104settings={}; 1105if(typeof url=='object'){ 1106settings=url; 1107url=null; 1108} 1109} 1110if(typeof url=='string'){ 1111settings['url']=url; 1112} 1113if(settings.data&&settings.data['triggerAjaxLoad']===false){ 1114settings.data['triggerAjaxLoad']=null; 1115return jQuery.spip.intercepted.ajax(settings); 1116} 1117var s=jQuery.extend(true,{},jQuery.ajaxSettings,settings); 1118var callbackContext=s.context||s; 1119try{ 1120if(jQuery.ajax.caller==jQuery.spip.intercepted.load||jQuery.ajax.caller==jQuery.spip.intercepted.ajaxSubmit) 1121return jQuery.spip.intercepted.ajax(settings); 1122} 1123catch(err){} 1124var orig_complete=s.complete||function(){}; 1125settings.complete=function(res,status){
1126var dataType=settings.dataType; 1127var ct=(res&&(typeof res.getResponseHeader=='function')) 1128?res.getResponseHeader("content-type"):''; 1129var xml=!dataType&&ct&&ct.indexOf("xml")>=0; 1130orig_complete.call(callbackContext,res,status); 1131if((!dataType&&!xml)||dataType=="html"){ 1132jQuery.spip.log('jQuery.ajax'); 1133if(typeof s.onAjaxLoad=="undefined"||s.onAjaxLoad!=false) 1134jQuery.spip.triggerAjaxLoad(s.ajaxTarget?s.ajaxTarget:document); 1135} 1136}; 1137return jQuery.spip.intercepted.ajax(settings); 1138}; 1139} 1140jQuery.uaMatch=function(ua){ 1141ua=ua.toLowerCase(); 1142var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)|| 1143ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)|| 1144[]; 1145return{ 1146browser:match[1]||"", 1147version:match[2]||"0" 1148}; 1149}; 1150if(!jQuery.browser){ 1151matched=jQuery.uaMatch(navigator.userAgent); 1152browser={}; 1153if(matched.browser){ 1154browser[matched.browser]=true; 1155browser.version=matched.version; 1156} 1157if(browser.chrome){ 1158browser.webkit=true; 1159}else if(browser.webkit){ 1160browser.safari=true; 1161} 1162jQuery.browser=browser; 1163} 1164jQuery.getScript=function(url,callback){ 1165return $.ajax({ 1166url:url, 1167dataType:"script", 1168success:callback, 1169cache:true 1170}); 1171} 1172jQuery.fn.positionner=function(force,setfocus){ 1173if(!this.length){ 1174return this; 1175} 1176var offset=jQuery(this).offset(); 1177var hauteur=parseInt(jQuery(this).css('height')); 1178var marge=jQuery.spip.positionner_marge||5; 1179var scrolltop=self['pageYOffset']|| 1180jQuery.boxModel&&document.documentElement['scrollTop']|| 1181document.body['scrollTop']; 1182var h=jQuery(window).height(); 1183var scroll=0; 1184if(force||(offset&&offset['top']-marge<=scrolltop)){ 1185scroll=offset['top']-marge; 1186} 1187else if(offset&&offset['top']+hauteur-h+marge>scrolltop){ 1188scroll=Math.min(offset['top']-marge-15,offset['top']+hauteur-h+40); 1189} 1190if(scroll) 1191jQuery('html,body') 1192.animate({scrollTop:scroll},300); 1193if(setfocus!==false) 1194jQuery(jQuery('*',this).filter('input[type=text],textarea')[0]).focus(); 1195return this; 1196} 1197jQuery.spip.virtualbuffer_id='spip_virtualbufferupdate'; 1198jQuery.spip.initReaderBuffer=function(){ 1199if(jQuery('#'+jQuery.spip.virtualbuffer_id).length)return; 1200jQuery('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>'); 1201} 1202jQuery.spip.updateReaderBuffer=function(){ 1203var i=jQuery('#'+jQuery.spip.virtualbuffer_id); 1204if(!i.length)return; 1205i.val(parseInt(i.val())+1); 1206} 1207jQuery.fn.formulaire_setContainer=function(){ 1208if(!this.closest('.ajax-form-container').length){ 1209this.find('script').remove(); 1210var aria=this.data('aria'); 1211var $container=jQuery('<div class="ajax-form-container"></div>'); 1212if(aria&&typeof aria==='object'){ 1213for(var i in aria){ 1214$container=$container.attr(i,aria[i]); 1215} 1216} 1217else{ 1218aria=false; 1219} 1220this.wrap($container); 1221if(aria){ 1222jQuery('form',this).not('[aria-live]').attr('aria-live','off'); 1223} 1224} 1225return this; 1226} 1227jQuery.fn.formulaire_dyn_ajax=function(target){ 1228if(this.length) 1229jQuery.spip.initReaderBuffer(); 1230return this.each(function(){ 1231var scrollwhensubmit=!jQuery(this).is('.noscroll'); 1232var cible=target||this; 1233jQuery(cible).formulaire_setContainer(); 1234jQuery('form:not(.noajax):not(.bouton_action_post)',this).each(function(){ 1235var leform=this; 1236var leclk,leclk_x,leclk_y; 1237var onError=function(xhr,status,error,$form){
1238jQuery(leform).ajaxFormUnbind().find('input[name="var_ajax"]').remove(); 1239var msg="Erreur"; 1240if(typeof(error_on_ajaxform)!=="undefined")msg=error_on_ajaxform; 1241jQuery(leform).prepend("<p class='error ajax-error none'>"+msg+"</p>").find('.ajax-error').show('fast'); 1242jQuery(cible).closest('.ajax-form-container').endLoading(true); 1243} 1244jQuery(this).prepend("<input type='hidden' name='var_ajax' value='form'>") 1245.ajaxForm({ 1246beforeSubmit:function(){ 1247leclk=leform.clk; 1248var scrollwhensubmit_button=true; 1249if(leclk){ 1250scrollwhensubmit_button=!jQuery(leclk).is('.noscroll'); 1251var n=leclk.name; 1252if(n&&!leclk.disabled&&leclk.type==="image"){ 1253leclk_x=leform.clk_x; 1254leclk_y=leform.clk_y; 1255} 1256} 1257jQuery(cible).wrap('<div />'); 1258cible=jQuery(cible).parent(); 1259jQuery(cible).closest('.ajax-form-container').animateLoading(); 1260if(scrollwhensubmit&&scrollwhensubmit_button){ 1261jQuery(cible).positionner(false,false); 1262} 1263}, 1264error:onError, 1265success:function(c,status,xhr,$form){ 1266if(c.match(/^\s*noajax\s*$/)){ 1267jQuery("input[name=var_ajax]",leform).remove(); 1268if(leclk){ 1269var n=leclk.name; 1270if(n&&!leclk.disabled){ 1271jQuery(leform).prepend("<input type='hidden' name='"+n+"' value='"+leclk.value+"'>"); 1272if(leclk.type==="image"){ 1273jQuery(leform).prepend("<input type='hidden' name='"+n+".x' value='"+leform.clk_x+"'>"); 1274jQuery(leform).prepend("<input type='hidden' name='"+n+".y' value='"+leform.clk_y+"'>"); 1275} 1276} 1277}
1278jQuery(leform).ajaxFormUnbind().closest('.formulaire_spip').addClass('resubmit-noajax'); 1279try{ 1280leform.submit(); 1281}catch(err){ 1282var submitFn=document.createElement('form').submit; 1283submitFn.apply(leform); 1284} 1285} 1286else{ 1287if(!c.length||c.indexOf("ajax-form-is-ok")==-1) 1288return onError.apply(this,[status,xhr,$form]); 1289var preloaded=jQuery.spip.preloaded_urls; 1290jQuery.spip.preloaded_urls={}; 1291jQuery(cible).html(c); 1292var a=jQuery('a:first',cible).eq(0); 1293var d=jQuery('div.ajax',cible); 1294if(!d.length){ 1295jQuery(cible).addClass('ajax'); 1296if(!scrollwhensubmit) 1297jQuery(cible).addClass('noscroll'); 1298} 1299else{ 1300d.siblings('br.bugajaxie').remove(); 1301cible=jQuery(":first",cible); 1302cible.unwrap(); 1303} 1304if(a.length 1305&&a.is('a[name=ajax_ancre]') 1306&&jQuery(a.attr('href'),cible).length){ 1307a=a.attr('href'); 1308if(jQuery(a,cible).length) 1309setTimeout(function(){ 1310jQuery(a,cible).positionner(false); 1311},10); 1312jQuery(cible).closest('.ajax-form-container').endLoading(true); 1313} 1314else{ 1315if(a.length&&a.is('a[name=ajax_redirect]')){ 1316a=a.get(0).href; 1317setTimeout(function(){ 1318var cur=window.location.href.split('#'); 1319document.location.replace(a); 1320if(cur[0]==a.split('#')[0]){ 1321window.location.reload(); 1322} 1323},10); 1324jQuery(cible).closest('.ajax-form-container').animateLoading(); 1325} 1326else{ 1327jQuery(cible).closest('.ajax-form-container').endLoading(true); 1328} 1329} 1330if(!jQuery('.reponse_formulaire_ok',cible).length) 1331jQuery.spip.preloaded_urls=preloaded; 1332jQuery.spip.updateReaderBuffer(); 1333} 1334} 1335}) 1336.addClass('noajax hasajax'); 1337}); 1338}); 1339} 1340jQuery.fn.formulaire_verifier=function(callback,champ){ 1341var erreurs={'message_erreur':'form non ajax'}; 1342var me=this; 1343if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true'){ 1344if(jQuery(me).is('form.hasajax')){ 1345jQuery(me).ajaxSubmit({ 1346dataType:"json", 1347data:{formulaire_action_verifier_json:true}, 1348success:function(errs){ 1349var args=[errs,champ] 1350if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true') 1351callback.apply(me,args); 1352} 1353}); 1354} 1355else 1356callback.apply(me,[erreurs,champ]); 1357} 1358return this; 1359} 1360jQuery.fn.formulaire_activer_verif_auto=function(callback){ 1361callback=callback||formulaire_actualiser_erreurs; 1362var me=jQuery(this).closest('.ajax-form-container'); 1363var check=function(){ 1364var name=jQuery(this).attr('name'); 1365setTimeout(function(){me.find('form').formulaire_verifier(callback,name);},50); 1366} 1367var activer=function(){ 1368if(me.find('form').attr('data-verifjson')!='on'){ 1369me 1370.find('form') 1371.attr('data-verifjson','on') 1372.find('input,select,textarea') 1373.on('change',check); 1374} 1375} 1376jQuery(activer); 1377onAjaxLoad(function(){setTimeout(activer,150);}); 1378} 1379function formulaire_actualiser_erreurs(erreurs){ 1380var parent=jQuery(this).closest('.formulaire_spip'); 1381if(!parent.length)return; 1382parent.find('.reponse_formulaire,.erreur_message').fadeOut().remove(); 1383parent.find('.erreur').removeClass('erreur'); 1384if(erreurs['message_ok']) 1385parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_ok">'+erreurs['message_ok']+'</p>'); 1386if(erreurs['message_erreur']) 1387parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_erreur">'+erreurs['message_erreur']+'</p>'); 1388for(var k in erreurs){ 1389var saisie=parent.find('.editer_'+k); 1390if(saisie.length){ 1391saisie.addClass('erreur'); 1392saisie.find('label').after('<span class="erreur_message">'+erreurs[k]+'</span>'); 1393} 1394} 1395} 1396var ajax_confirm=true; 1397var ajax_confirm_date=0; 1398var spip_confirm=window.confirm; 1399function _confirm(message){ 1400ajax_confirm=spip_confirm(message); 1401if(!ajax_confirm){ 1402var d=new Date(); 1403ajax_confirm_date=d.getTime(); 1404} 1405return ajax_confirm; 1406} 1407window.confirm=_confirm; 1408var ajaxbloc_selecteur; 1409jQuery.spip.preloaded_urls={}; 1410jQuery.spip.on_ajax_loaded=function(blocfrag,c,href,history){ 1411history=history||(history==null); 1412if(typeof href==undefined||href==null) 1413history=false; 1414if(history) 1415jQuery.spip.setHistoryState(blocfrag); 1416if(jQuery(blocfrag).attr('data-loaded-callback')){ 1417var callback=eval(jQuery(blocfrag).attr('data-loaded-callback')); 1418callback.call(blocfrag,c,href,history); 1419} 1420else{ 1421jQuery(blocfrag) 1422.html(c) 1423.endLoading(); 1424} 1425if(typeof href!=undefined) 1426jQuery(blocfrag).attr('data-url',href); 1427if(history){ 1428var href_history=href; 1429if(href_history.indexOf('var_nullify')!==-1){ 1430href_history=parametre_url(href_history,'var_nullify',''); 1431} 1432jQuery.spip.pushHistoryState(href_history); 1433jQuery.spip.setHistoryState(blocfrag); 1434} 1435var a=jQuery('a:first',jQuery(blocfrag)).eq(0); 1436if(a.length 1437&&a.is('a[name=ajax_ancre]') 1438&&jQuery(a.attr('href'),blocfrag).length){ 1439a=a.attr('href'); 1440jQuery(a,blocfrag).positionner(false); 1441} 1442jQuery.spip.log('on_ajax_loaded'); 1443jQuery.spip.triggerAjaxLoad(blocfrag); 1444a=jQuery(blocfrag).parents('form.hasajax') 1445if(a.length) 1446a.eq(0).removeClass('noajax').parents('div.ajax').formulaire_dyn_ajax(); 1447jQuery.spip.updateReaderBuffer(); 1448} 1449jQuery.spip.on_ajax_failed=function(blocfrag,statusCode,href,history){ 1450jQuery(blocfrag).addClass('invalid'); 1451jQuery.spip.log("Echec AJAX statusCode "+statusCode) 1452history=history||(history==null); 1453if(history){ 1454if(jQuery.spip.debug){ 1455jQuery.spip.log("On redirige sur sur "+href) 1456} 1457else{ 1458window.location.href=href; 1459} 1460} 1461} 1462jQuery.spip.stateId=0; 1463jQuery.spip.setHistoryState=function(blocfrag){ 1464if(!window.history.replaceState)return; 1465if(!blocfrag.attr('id')){ 1466while(jQuery('#ghsid'+jQuery.spip.stateId).length) 1467jQuery.spip.stateId++; 1468blocfrag.attr('id','ghsid'+jQuery.spip.stateId); 1469} 1470var href=blocfrag.attr('data-url')||blocfrag.attr('data-origin'); 1471href=jQuery("<"+"a href='"+href+"'></a>").get(0).href; 1472var state={ 1473id:blocfrag.attr('id'), 1474href:href 1475}; 1476var ajaxid=blocfrag.attr('class').match(/\bajax-id-[\w-]+\b/); 1477if(ajaxid&&ajaxid.length) 1478state["ajaxid"]=ajaxid[0]; 1479window.history.replaceState(state,window.document.title,window.document.location); 1480} 1481jQuery.spip.pushHistoryState=function(href,title){ 1482if(!window.history.pushState) 1483return false;
1484window.history.pushState({},title,href); 1485} 1486window.onpopstate=function(popState){ 1487if(popState.state&&popState.state.href){ 1488var blocfrag=false; 1489if(popState.state.id){ 1490blocfrag=jQuery('#'+popState.state.id); 1491} 1492if((!blocfrag||!blocfrag.length)&&popState.state.ajaxid){ 1493blocfrag=jQuery('.ajaxbloc.'+popState.state.ajaxid); 1494} 1495if(blocfrag&&blocfrag.length==1){ 1496jQuery.spip.ajaxClick(blocfrag,popState.state.href,{history:false}); 1497return true; 1498} 1499else{ 1500window.location.href=popState.state.href; 1501} 1502} 1503} 1504jQuery.spip.loadAjax=function(blocfrag,url,href,options){ 1505var force=options.force||false; 1506if(jQuery(blocfrag).attr('data-loading-callback')){ 1507var callback=eval(jQuery(blocfrag).attr('data-loading-callback')); 1508callback.call(blocfrag,url,href,options); 1509} 1510else{ 1511jQuery(blocfrag).animateLoading(); 1512} 1513if(jQuery.spip.preloaded_urls[url]&&!force){ 1514if(jQuery.spip.preloaded_urls[url]=="<!--loading-->"){ 1515setTimeout(function(){jQuery.spip.loadAjax(blocfrag,url,href,options);},100); 1516return; 1517} 1518jQuery.spip.on_ajax_loaded(blocfrag,jQuery.spip.preloaded_urls[url],href,options.history); 1519}else{ 1520var d=new Date(); 1521jQuery.spip.preloaded_urls[url]="<!--loading-->"; 1522jQuery.ajax({ 1523url:parametre_url(url,'var_t',d.getTime()), 1524onAjaxLoad:false, 1525success:function(c){ 1526jQuery.spip.on_ajax_loaded(blocfrag,c,href,options.history); 1527jQuery.spip.preloaded_urls[url]=c; 1528if(options.callback&&typeof options.callback=="function") 1529options.callback.apply(blocfrag); 1530}, 1531error:function(e){ 1532jQuery.spip.preloaded_urls[url]=''; 1533jQuery.spip.on_ajax_failed(blocfrag,e.status,href,options.history); 1534} 1535}); 1536} 1537} 1538jQuery.spip.makeAjaxUrl=function(href,ajax_env,origin){ 1539var url=href.split('#'); 1540url[0]=parametre_url(url[0],'var_ajax',1); 1541url[0]=parametre_url(url[0],'var_ajax_env',ajax_env); 1542if(origin){ 1543if(origin.indexOf('var_nullify')!==-1){ 1544origin=parametre_url(origin,'var_nullify',''); 1545} 1546var p=origin.indexOf('?'); 1547var nullify=[]; 1548if(p!==-1){ 1549var args=origin.substring(p+1).split('&'); 1550var val; 1551var arg; 1552for(var n=0;n<args.length;n++){ 1553arg=args[n].split('='); 1554arg=decodeURIComponent(arg[0]); 1555p=arg.indexOf('['); 1556if(p!==-1) 1557arg=arg.substring(0,p); 1558val=parametre_url(href,arg); 1559if((typeof val=="undefined"||val==null)&&nullify.indexOf(arg)===-1){ 1560nullify.push(arg); 1561} 1562} 1563if(nullify.length){ 1564url[0]=url[0]+'&'+'var_nullify='+encodeURIComponent(nullify.join('|')); 1565} 1566} 1567} 1568if(url[1]) 1569url[0]=parametre_url(url[0],'var_ajax_ancre',url[1]); 1570return url[0]; 1571} 1572jQuery.spip.ajaxReload=function(blocfrag,options){ 1573var ajax_env=blocfrag.attr('data-ajax-env'); 1574if(!ajax_env||ajax_env==undefined)return; 1575var href=options.href||blocfrag.attr('data-url')||blocfrag.attr('data-origin'); 1576if(href&&typeof href!=undefined){ 1577if(href.indexOf('var_nullify')!==-1){ 1578href=parametre_url(href,'var_nullify',''); 1579} 1580options=options||{}; 1581var callback=options.callback||null; 1582var history=options.history||false; 1583var args=options.args||{}; 1584for(var key in args){ 1585href=parametre_url(href,key,args[key]==undefined?'':args[key],'&',args[key]==undefined?false:true); 1586} 1587var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin')); 1588jQuery.spip.loadAjax(blocfrag,url,href,{force:true,callback:callback,history:history}); 1589return true; 1590} 1591} 1592jQuery.spip.ajaxClick=function(blocfrag,href,options){ 1593var ajax_env=blocfrag.attr('data-ajax-env'); 1594if(!ajax_env||ajax_env==undefined)return; 1595if(!ajax_confirm){ 1596ajax_confirm=true; 1597var d=new Date(); 1598if((d.getTime()-ajax_confirm_date)<=2) 1599return false; 1600} 1601var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin')); 1602jQuery.spip.loadAjax(blocfrag,url,href,options); 1603return false; 1604} 1605jQuery.fn.ajaxbloc=function(){ 1606if(this.length) 1607jQuery.spip.initReaderBuffer(); 1608if(ajaxbloc_selecteur==undefined) 1609ajaxbloc_selecteur='.pagination a,a.ajax'; 1610return this.each(function(){ 1611jQuery('div.ajaxbloc',this).ajaxbloc(); 1612var blocfrag=jQuery(this); 1613var ajax_env=blocfrag.attr('data-ajax-env'); 1614if(!ajax_env||ajax_env==undefined)return; 1615blocfrag.not('.bind-ajaxReload').on('ajaxReload',function(event,options){ 1616if(jQuery.spip.ajaxReload(blocfrag,options)) 1617event.stopPropagation(); 1618}).addClass('bind-ajaxReload'); 1619jQuery(ajaxbloc_selecteur,this).not('.noajax,.bind-ajax') 1620.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)});}) 1621.addClass('bind-ajax') 1622.filter('.preload').each(function(){ 1623var href=this.href; 1624var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin')); 1625if(!jQuery.spip.preloaded_urls[url]){ 1626jQuery.spip.preloaded_urls[url]='<!--loading-->'; 1627jQuery.ajax({url:url,onAjaxLoad:false,success:function(r){jQuery.spip.preloaded_urls[url]=r;},error:function(){jQuery.spip.preloaded_urls[url]='';}}); 1628} 1629}); 1630jQuery('form.bouton_action_post.ajax',this).not('.noajax,.bind-ajax').each(function(){ 1631var leform=this; 1632var url=jQuery(this).attr('action').split('#'); 1633var scrollwhensubmit=(!jQuery(this).is('.noscroll')&&!jQuery('.submit',this).is('.noscroll')); 1634jQuery(this) 1635.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]+"'>":"")) 1636.ajaxForm({ 1637beforeSubmit:function(){ 1638jQuery(blocfrag).animateLoading(); 1639if(scrollwhensubmit){ 1640jQuery(blocfrag).positionner(false); 1641} 1642}, 1643onAjaxLoad:false, 1644success:function(c){ 1645jQuery.spip.on_ajax_loaded(blocfrag,c); 1646jQuery.spip.preloaded_urls={}; 1647}, 1648error:function(e){ 1649jQuery.spip.preloaded_urls={}; 1650var href=parametre_url(url,'redirect'); 1651if(!href){ 1652href=window.location.href; 1653} 1654jQuery.spip.on_ajax_failed(blocfrag,e.status,href,e.status===400); 1655} 1656}) 1657.addClass('bind-ajax'); 1658}); 1659}); 1660}; 1661jQuery.fn.followLink=function(){ 1662$(this).click(); 1663if(!$(this).is('.bind-ajax')) 1664window.location.href=$(this).get(0).href; 1665return this; 1666} 1667function ajaxReload(ajaxid,options){ 1668jQuery('div.ajaxbloc.ajax-id-'+ajaxid).ajaxReload(options); 1669} 1670jQuery.fn.ajaxReload=function(options){ 1671options=options||{};
1672jQuery(this).trigger('ajaxReload',[options]); 1673return this; 1674} 1675jQuery.fn.animateLoading=function(){ 1676this.attr('aria-busy','true').addClass('loading').children().css('opacity',0.5); 1677if(typeof ajax_image_searching!='undefined'){ 1678var i=(this).find('.image_loading'); 1679if(i.length)i.eq(0).html(ajax_image_searching); 1680else this.prepend('<span class="image_loading">'+ajax_image_searching+'</span>'); 1681} 1682return this; 1683} 1684jQuery.fn.animeajax=jQuery.fn.animateLoading; 1685jQuery.fn.endLoading=function(hard){ 1686hard=hard||false; 1687this.attr('aria-busy','false').removeClass('loading'); 1688if(hard){ 1689this.children().css('opacity',''); 1690this.find('.image_loading').html(''); 1691} 1692return this; 1693} 1694jQuery.fn.animateRemove=function(callback){ 1695if(this.length){ 1696var me=this; 1697var color=$("<div class='remove'></div>").css('background-color'); 1698var sel=$(this); 1699if(sel.is('tr')) 1700sel=sel.add('>td',sel); 1701sel.addClass('remove').css({backgroundColor:color}).animate({opacity:"0.0"},'fast',function(){ 1702sel.removeClass('remove').css({backgroundColor:''}); 1703if(callback) 1704callback.apply(me); 1705}); 1706} 1707return this; 1708} 1709jQuery.fn.animateAppend=function(callback){ 1710if(this.length){ 1711var me=this; 1712var color=$("<div class='append'></div>").css('background-color'); 1713var origin=$(this).css('background-color')||'#ffffff'; 1714if(origin=='transparent')origin='#ffffff'; 1715var sel=$(this); 1716if(sel.is('tr')) 1717sel=sel.add('>td',sel); 1718sel.css('opacity','0.0').addClass('append').css({backgroundColor:color}).animate({opacity:"1.0"},1000,function(){ 1719sel.animate({backgroundColor:origin},3000,function(){ 1720sel.removeClass('append').css({backgroundColor:''}); 1721if(callback) 1722callback.apply(me); 1723}); 1724}); 1725} 1726return this; 1727} 1728function parametre_url(url,c,v,sep,force_vide){ 1729if(typeof(url)=='undefined'){ 1730url=''; 1731} 1732var p; 1733var ancre=''; 1734var a='./'; 1735var args=[]; 1736p=url.indexOf('#'); 1737if(p!=-1){ 1738ancre=url.substring(p); 1739url=url.substring(0,p); 1740} 1741p=url.indexOf('?'); 1742if(p!==-1){ 1743if(p>0)a=url.substring(0,p); 1744args=url.substring(p+1).split('&'); 1745} 1746else 1747a=url; 1748var regexp=new RegExp('^('+c.replace('[]','\\[\\]')+'\\[?\\]?)(=.*)?$'); 1749var ajouts=[]; 1750var u=(typeof(v)!=='object')?encodeURIComponent(v):v; 1751var na=[]; 1752var v_read=null; 1753for(var n=0;n<args.length;n++){ 1754var val=args[n]; 1755try{ 1756val=decodeURIComponent(val); 1757}catch(e){} 1758var r=val.match(regexp); 1759if(r&&r.length){ 1760if(v==null){ 1761if(r[1].substr(-2)=='[]'){ 1762if(!v_read)v_read=[]; 1763v_read.push((r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):''); 1764} 1765else{ 1766return(r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):''; 1767} 1768} 1769else if(!v.length){ 1770} 1771else if(r[1].substr(-2)!='[]'){ 1772na.push(r[1]+'='+u); 1773ajouts.push(r[1]); 1774} 1775} 1776else 1777na.push(args[n]); 1778} 1779if(v==null)return v_read; 1780if(v||v.length||force_vide){ 1781ajouts="="+ajouts.join("=")+"="; 1782var all=c.split('|'); 1783for(n=0;n<all.length;n++){ 1784if(ajouts.search("="+all[n]+"=")==-1){ 1785if(typeof(v)!=='object'){ 1786na.push(all[n]+'='+u); 1787} 1788else{ 1789var id=((all[n].substring(-2)=='[]')?all[n]:all[n]+"[]"); 1790for(p=0;p<v.length;p++) 1791na.push(id+'='+encodeURIComponent(v[p])); 1792} 1793} 1794} 1795} 1796if(na.length){ 1797if(!sep)sep='&'; 1798a=a+"?"+na.join(sep); 1799} 1800return a+ancre; 1801} 1802function spip_logo_survol_hover(){ 1803var me=jQuery(this); 1804if(me.attr('data-src-hover')){ 1805me.attr('data-src-original',me.attr('src')); 1806me.attr('src',me.attr('data-src-hover')); 1807} 1808} 1809function spip_logo_survol_out(){ 1810var me=jQuery(this); 1811if(me.attr('data-src-original')){ 1812me.attr('src',me.attr('data-src-original')); 1813} 1814} 1815function disableClickAfterFormSubmit(){ 1816if(jQuery(this).is('.processing-submitted-form')){ 1817return false; 1818} 1819jQuery(this) 1820.addClass('processing-submitted-form') 1821.find('button[type="submit"]') 1822.attr('disabled','disabled') 1823.addClass('disabled') 1824} 1825function puce_enable_survol(){ 1826jQuery('span.puce_objet_popup a',this).not('.puce-survol-enabled').click(function(){ 1827selec_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')); 1828return false; 1829}).addClass('puce-survol-enabled'); 1830jQuery('span.puce_objet',this).not('.puce-survol-enabled').mouseover(function(){ 1831if(!this.puce_loaded){ 1832this.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')); 1833} 1834}).addClass('puce-survol-enabled'); 1835} 1836if(!window.var_zajax_content) 1837window.var_zajax_content='contenu'; 1838jQuery(function(){ 1839jQuery('form:not(.bouton_action_post)').parents('div.ajax') 1840.formulaire_dyn_ajax();
1841jQuery('div.ajaxbloc').ajaxbloc(); 1842jQuery("input[placeholder]:text").placeholderLabel(); 1843jQuery('.spip_logo_survol').hover(spip_logo_survol_hover,spip_logo_survol_out); 1844puce_enable_survol.apply(this); 1845jQuery('body').on('submit','form.bouton_action_post',disableClickAfterFormSubmit); 1846}); 1847onAjaxLoad(function(){ 1848if(jQuery){ 1849jQuery('form:not(.bouton_action_post)',this).parents('div.ajax') 1850.formulaire_dyn_ajax(); 1851if(jQuery(this).is('div.ajaxbloc')) 1852jQuery(this).ajaxbloc(); 1853else if(jQuery(this).closest('div.ajaxbloc').length) 1854jQuery(this).closest('div.ajaxbloc').ajaxbloc(); 1855else 1856jQuery('div.ajaxbloc',this).ajaxbloc(); 1857jQuery("input[placeholder]:text",this).placeholderLabel(); 1858jQuery('.spip_logo_survol',this).hover(spip_logo_survol_hover,spip_logo_survol_out); 1859puce_enable_survol.apply(this); 1860} 1861}); 1862 1863 1864/* local/cache-js/js.cookie-minify-4a7d.js?1787655134 */ 1865 1866; 1867(function(global,factory){ 1868typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(): 1869typeof define==='function'&&define.amd?define(factory): 1870(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){ 1871var current=global.Cookies; 1872var exports=global.Cookies=factory(); 1873exports.noConflict=function(){global.Cookies=current;return exports;}; 1874})()); 1875})(this,(function(){'use strict'; 1876function assign(target){ 1877for(var i=1;i<arguments.length;i++){ 1878var source=arguments[i]; 1879for(var key in source){ 1880target[key]=source[key]; 1881} 1882} 1883return target 1884} 1885var defaultConverter={ 1886read:function(value){ 1887if(value[0]==='"'){ 1888value=value.slice(1,-1); 1889} 1890return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent) 1891}, 1892write:function(value){ 1893return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, 1894decodeURIComponent 1895) 1896} 1897}; 1898function init(converter,defaultAttributes){ 1899function set(name,value,attributes){ 1900if(typeof document==='undefined'){ 1901return 1902} 1903attributes=assign({},defaultAttributes,attributes); 1904if(typeof attributes.expires==='number'){ 1905attributes.expires=new Date(Date.now()+attributes.expires*864e5); 1906} 1907if(attributes.expires){ 1908attributes.expires=attributes.expires.toUTCString(); 1909} 1910name=encodeURIComponent(name) 1911.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent) 1912.replace(/[()]/g,escape); 1913var stringifiedAttributes=''; 1914for(var attributeName in attributes){ 1915if(!attributes[attributeName]){ 1916continue 1917} 1918stringifiedAttributes+='; '+attributeName; 1919if(attributes[attributeName]===true){ 1920continue 1921} 1922stringifiedAttributes+='='+attributes[attributeName].split(';')[0]; 1923} 1924return(document.cookie= 1925name+'='+converter.write(value,name)+stringifiedAttributes) 1926} 1927function get(name){ 1928if(typeof document==='undefined'||(arguments.length&&!name)){ 1929return 1930} 1931var cookies=document.cookie?document.cookie.split('; '):[]; 1932var jar={}; 1933for(var i=0;i<cookies.length;i++){ 1934var parts=cookies[i].split('='); 1935var value=parts.slice(1).join('='); 1936try{ 1937var found=decodeURIComponent(parts[0]); 1938jar[found]=converter.read(value,found); 1939if(name===found){ 1940break 1941} 1942}catch(e){} 1943} 1944return name?jar[name]:jar 1945} 1946return Object.create( 1947{ 1948set, 1949get, 1950remove:function(name,attributes){ 1951set( 1952name, 1953'', 1954assign({},attributes,{ 1955expires:-1 1956}) 1957); 1958}, 1959withAttributes:function(attributes){ 1960return init(this.converter,assign({},this.attributes,attributes)) 1961}, 1962withConverter:function(converter){ 1963return init(assign({},this.converter,converter),this.attributes) 1964} 1965}, 1966{ 1967attributes:{value:Object.freeze(defaultAttributes)}, 1968converter:{value:Object.freeze(converter)} 1969} 1970) 1971} 1972var api=init(defaultConverter,{path:'/'}); 1973return api; 1974})); 1975 1976 1977/* plugins/opinions/javascript/opinions.js */ 1978;(function(){ 1979"use strict"; 1980document.addEventListener('DOMContentLoaded',function(){ 1981const formOpinion=document.querySelector('.formulaire_opinion>form'); 1982if(formOpinion){ 1983const formLang=document.querySelector('.formulaire_opinion').lang??'fr'; 1984const inputSentimentPositif=formOpinion.querySelector('#opinion_sentiment_positif'); 1985const inputSentimentNegatif=formOpinion.querySelector('#opinion_sentiment_negatif'); 1986const sentimentNegatifDetails=formOpinion.querySelector('.opinion-suite-sentiment-negatif'); 1987const inputsDetail=formOpinion.querySelectorAll('input[name="detail"]'); 1988const inputDetailAutre=formOpinion.querySelector('input[name="detail"][value="autre"]'); 1989const inputTexte=formOpinion.querySelector('#opinion_texte'); 1990const formFin=formOpinion.querySelector('.opinion-form-fin'); 1991const formBtnSubmit=formOpinion.querySelector('button[type="submit"]'); 1992inputSentimentPositif.addEventListener('click',(event)=>{ 1993sentimentNegatifDetails.style.display='none'; 1994inputTexte.minLength=0; 1995inputsDetail.forEach(input=>{ 1996input.checked=false; 1997input.required=false; 1998}); 1999formBtnSubmit.disabled=false; 2000formBtnSubmit.click(); 2001}); 2002inputSentimentNegatif.addEventListener('click',(event)=>{ 2003sentimentNegatifDetails.style.display='block'; 2004formFin.style.display='block'; 2005inputTexte.minLength=0; 2006inputsDetail.forEach(input=>{ 2007input.checked=false; 2008input.required=true; 2009}); 2010formBtnSubmit.disabled=true; 2011}); 2012inputsDetail.forEach(input=>{ 2013input.addEventListener('change',(event)=>{ 2014if(input.value=='autre'){ 2015if(formLang=='fr') 2016inputTexte.placeholder='Merci de préciser la raison'; 2017else 2018inputTexte.placeholder='Please specify the reason'; 2019inputTexte.minLength=10; 2020if(inputTexte.value.length>=10) 2021formBtnSubmit.disabled=false; 2022else 2023formBtnSubmit.disabled=true; 2024}else{ 2025if(formLang=='fr') 2026inputTexte.placeholder='Laissez-nous un commentaire si vous le désirez'; 2027else 2028inputTexte.placeholder='Leave us a comment if you wish'; 2029inputTexte.minLength=0; 2030formBtnSubmit.disabled=false; 2031} 2032}); 2033}); 2034inputTexte.addEventListener('keyup',(event)=>{ 2035if(inputDetailAutre.checked){ 2036if(inputTexte.value.length>=10){ 2037formBtnSubmit.disabled=false; 2038}else{ 2039formBtnSubmit.disabled=true; 2040} 2041} 2042}); 2043} 2044}); 2045})(); 2046 2047 2048/* plugins/alphamosa/javascript/alphamosa-img.js */ 2049;(function(){ 2050"use strict"; 2051document.addEventListener('DOMContentLoaded',function(){ 2052function wrapAll(nodes,wrapper){ 2053var parent=nodes[0].parentNode; 2054var previousSibling=nodes[0].previousSibling; 2055for(var i=0;nodes.length-i;wrapper.firstChild===nodes[0]&&i++){ 2056wrapper.appendChild(nodes[i]); 2057} 2058var nextSibling=previousSibling?previousSibling.nextSibling:parent.firstChild; 2059parent.insertBefore(wrapper,nextSibling); 2060return wrapper; 2061} 2062document.querySelectorAll(':not(.img-spip-ligne) + .img-spip-ligne, * > .img-spip-ligne:first-of-type').forEach(function(el){ 2063let els=[]; 2064els.push(el); 2065el=el.nextElementSibling; 2066while(el){ 2067if(el.matches('.img-spip-ligne')){ 2068els.push(el); 2069el=el.nextElementSibling; 2070}else{ 2071break; 2072} 2073} 2074let wrapper=document.createElement('div'); 2075wrapper.classList.add('img-spip-lignes-container'); 2076wrapAll(els,wrapper); 2077}); 2078}); 2079})(); 2080 2081 2082/* local/cache-js/sharer-minify-7813.js?1787654971 */ 2083 2084(function(window,document){ 2085'use strict'; 2086var Sharer=function(elem){ 2087this.elem=elem; 2088}; 2089Sharer.init=function(){ 2090var elems=document.querySelectorAll('[data-sharer]'), 2091i, 2092l=elems.length; 2093for(i=0;i<l;i++){ 2094elems[i].addEventListener('click',Sharer.add); 2095} 2096}; 2097Sharer.add=function(elem){ 2098var target=elem.currentTarget||elem.srcElement; 2099var sharer=new Sharer(target); 2100sharer.share(); 2101}; 2102Sharer.prototype={ 2103constructor:Sharer, 2104getValue:function(attr){ 2105var val=this.elem.getAttribute('data-'+attr); 2106if(val&&attr==='hashtag'){ 2107if(!val.startsWith('#')){ 2108val='#'+val; 2109} 2110} 2111return val===null?'':val; 2112}, 2113share:function(){ 2114var sharer=this.getValue('sharer').toLowerCase(), 2115sharers={ 2116facebook:{ 2117shareUrl:'https://www.facebook.com/sharer/sharer.php', 2118params:{ 2119u:this.getValue('url'), 2120hashtag:this.getValue('hashtag'), 2121quote:this.getValue('quote'), 2122}, 2123}, 2124linkedin:{ 2125shareUrl:'https://www.linkedin.com/shareArticle', 2126params:{ 2127url:this.getValue('url'), 2128mini:true, 2129}, 2130}, 2131twitter:{ 2132shareUrl:'https://twitter.com/intent/tweet/', 2133params:{ 2134text:this.getValue('title'), 2135url:this.getValue('url'), 2136hashtags:this.getValue('hashtags'), 2137via:this.getValue('via'), 2138}, 2139}, 2140email:{ 2141shareUrl:'mailto:'+this.getValue('to'), 2142params:{ 2143subject:this.getValue('subject'), 2144body:this.getValue('title')+'\n'+this.getValue('url'), 2145}, 2146}, 2147}, 2148s=sharers[sharer]; 2149if(s){ 2150s.width=this.getValue('width'); 2151s.height=this.getValue('height'); 2152} 2153return s!==undefined?this.urlSharer(s):false; 2154}, 2155urlSharer:function(sharer){ 2156var p=sharer.params||{}, 2157keys=Object.keys(p), 2158i, 2159str=keys.length>0?'?':''; 2160for(i=0;i<keys.length;i++){ 2161if(str!=='?'){ 2162str+='&'; 2163} 2164if(p[keys[i]]){ 2165str+=keys[i]+'='+encodeURIComponent(p[keys[i]]); 2166} 2167} 2168sharer.shareUrl+=str; 2169var isLink=this.getValue('link')==='true'; 2170var isBlank=this.getValue('blank')==='true'; 2171if(isLink){ 2172if(isBlank){ 2173window.open(sharer.shareUrl,'_blank'); 2174}else{ 2175window.location.href=sharer.shareUrl; 2176} 2177}else{ 2178console.log(sharer.shareUrl);
2179var popWidth=sharer.width||600, 2180popHeight=sharer.height||480, 2181left=window.innerWidth/2-popWidth/2+window.screenX, 2182top=window.innerHeight/2-popHeight/2+window.screenY, 2183popParams='scrollbars=no, width='+popWidth+', height='+popHeight+', top='+top+', left='+left, 2184newWindow=window.open(sharer.shareUrl,'',popParams); 2185if(window.focus){ 2186newWindow.focus(); 2187} 2188} 2189}, 2190}; 2191if(document.readyState==='complete'||document.readyState!=='loading'){ 2192Sharer.init(); 2193}else{ 2194document.addEventListener('DOMContentLoaded',Sharer.init); 2195} 2196window.Sharer=Sharer; 2197})(window,document); 2198 2199
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.