Your IP : 216.73.216.147


Current Path : /home/lejardintz/www/media/foundry/3.1/scripts/
Upload File :
Current File : /home/lejardintz/www/media/foundry/3.1/scripts/history.min.js

!function(){var moduleFactory=function($){var module=this,jQuery=$,exports=function(){!function(window,undefined){"use strict";var History=window.History=window.History||{};if("undefined"!=typeof History.Adapter)throw new Error("History.js Adapter has already been loaded...");History.Adapter={bind:function(el,event,callback){jQuery(el).bind(event,callback)},trigger:function(el,event,extra){jQuery(el).trigger(event,extra)},extractEventData:function(key,event,extra){var result=event&&event.originalEvent&&event.originalEvent[key]||extra&&extra[key]||undefined;
return result},onDomLoad:function(callback){jQuery(callback)}},"undefined"!=typeof History.init&&History.init()}(window),function(window){"use strict";var document=window.document,setTimeout=window.setTimeout||setTimeout,clearTimeout=window.clearTimeout||clearTimeout,setInterval=window.setInterval||setInterval,History=window.History=window.History||{};if("undefined"!=typeof History.initHtml4)throw new Error("History.js HTML4 Support has already been loaded...");History.initHtml4=function(){return"undefined"!=typeof History.initHtml4.initialized?!1:(History.initHtml4.initialized=!0,History.enabled=!0,History.savedHashes=[],History.isLastHash=function(newHash){var isLast,oldHash=History.getHashByIndex();
return isLast=newHash===oldHash},History.saveHash=function(newHash){return History.isLastHash(newHash)?!1:(History.savedHashes.push(newHash),!0)},History.getHashByIndex=function(index){var hash=null;return hash="undefined"==typeof index?History.savedHashes[History.savedHashes.length-1]:0>index?History.savedHashes[History.savedHashes.length+index]:History.savedHashes[index]},History.discardedHashes={},History.discardedStates={},History.discardState=function(discardedState,forwardState,backState){var discardObject,discardedStateHash=History.getHashByState(discardedState);
return discardObject={discardedState:discardedState,backState:backState,forwardState:forwardState},History.discardedStates[discardedStateHash]=discardObject,!0},History.discardHash=function(discardedHash,forwardState,backState){var discardObject={discardedHash:discardedHash,backState:backState,forwardState:forwardState};return History.discardedHashes[discardedHash]=discardObject,!0},History.discardedState=function(State){var discarded,StateHash=History.getHashByState(State);return discarded=History.discardedStates[StateHash]||!1
},History.discardedHash=function(hash){var discarded=History.discardedHashes[hash]||!1;return discarded},History.recycleState=function(State){var StateHash=History.getHashByState(State);return History.discardedState(State)&&delete History.discardedStates[StateHash],!0},History.emulated.hashChange&&(History.hashChangeInit=function(){History.checkerFunction=null;var iframeId,iframe,lastIframeHash,checkerRunning,lastDocumentHash="";return History.isInternetExplorer()?(iframeId="historyjs-iframe",iframe=document.createElement("iframe"),iframe.setAttribute("id",iframeId),iframe.style.display="none",document.body.appendChild(iframe),iframe.contentWindow.document.open(),iframe.contentWindow.document.close(),lastIframeHash="",checkerRunning=!1,History.checkerFunction=function(){if(checkerRunning)return!1;
checkerRunning=!0;var documentHash=History.getHash()||"",iframeHash=History.unescapeHash(iframe.contentWindow.document.location.hash)||"";return documentHash!==lastDocumentHash?(lastDocumentHash=documentHash,iframeHash!==documentHash&&(lastIframeHash=iframeHash=documentHash,iframe.contentWindow.document.open(),iframe.contentWindow.document.close(),iframe.contentWindow.document.location.hash=History.escapeHash(documentHash)),History.Adapter.trigger(window,"hashchange")):iframeHash!==lastIframeHash&&(lastIframeHash=iframeHash,History.setHash(iframeHash,!1)),checkerRunning=!1,!0
}):History.checkerFunction=function(){var documentHash=History.getHash();return documentHash!==lastDocumentHash&&(lastDocumentHash=documentHash,History.Adapter.trigger(window,"hashchange")),!0},History.intervalList.push(setInterval(History.checkerFunction,History.options.hashChangeInterval)),!0},History.Adapter.onDomLoad(History.hashChangeInit)),History.emulated.pushState&&(History.onHashChange=function(event){var discardObject,currentUrl=event&&event.newURL||document.location.href,currentHash=History.getHashByUrl(currentUrl),currentState=null,currentStateHash=null;
return History.isLastHash(currentHash)?(History.busy(!1),!1):(History.doubleCheckComplete(),History.saveHash(currentHash),currentHash&&History.isTraditionalAnchor(currentHash)?(History.Adapter.trigger(window,"anchorchange"),History.busy(!1),!1):(currentState=History.extractState(History.getFullUrl(currentHash||document.location.href,!1),!0),History.isLastSavedState(currentState)?(History.busy(!1),!1):(currentStateHash=History.getHashByState(currentState),(discardObject=History.discardedState(currentState))?(History.getHashByIndex(-2)===History.getHashByState(discardObject.forwardState)?History.back(!1):History.forward(!1),!1):(History.pushState(currentState.data,currentState.title,currentState.url,!1),!0))))
},History.Adapter.bind(window,"hashchange",History.onHashChange),History.pushState=function(data,title,url,queue){if(History.getHashByUrl(url))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(queue!==!1&&History.busy())return History.pushQueue({scope:History,callback:History.pushState,args:arguments,queue:queue}),!1;History.busy(!0);var newState=History.createStateObject(data,title,url),newStateHash=History.getHashByState(newState),oldState=History.getState(!1),oldStateHash=History.getHashByState(oldState),html4Hash=History.getHash();
return History.storeState(newState),History.expectedStateId=newState.id,History.recycleState(newState),History.setTitle(newState),newStateHash===oldStateHash?(History.busy(!1),!1):newStateHash!==html4Hash&&newStateHash!==History.getShortUrl(document.location.href)?(History.setHash(newStateHash,!1),!1):(History.saveState(newState),History.Adapter.trigger(window,"statechange"),History.busy(!1),!0)},History.replaceState=function(data,title,url,queue){if(History.getHashByUrl(url))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");
if(queue!==!1&&History.busy())return History.pushQueue({scope:History,callback:History.replaceState,args:arguments,queue:queue}),!1;History.busy(!0);var newState=History.createStateObject(data,title,url),oldState=History.getState(!1),previousState=History.getStateByIndex(-2);return History.discardState(oldState,newState,previousState),History.pushState(newState.data,newState.title,newState.url,!1),!0}),History.emulated.pushState&&History.getHash()&&!History.emulated.hashChange&&History.Adapter.onDomLoad(function(){History.Adapter.trigger(window,"hashchange")
}),void 0)},"undefined"!=typeof History.init&&History.init()}(window),function(window,undefined){"use strict";var console=window.console||undefined,document=window.document,navigator=window.navigator,sessionStorage=window.sessionStorage||!1,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,setInterval=window.setInterval,clearInterval=window.clearInterval,JSON=window.JSON,alert=window.alert,History=window.History=window.History||{},history=window.history;if(JSON.stringify=JSON.stringify||JSON.encode,JSON.parse=JSON.parse||JSON.decode,"undefined"!=typeof History.init)throw new Error("History.js Core has already been loaded...");
History.init=function(){return"undefined"==typeof History.Adapter?!1:("undefined"!=typeof History.initCore&&History.initCore(),"undefined"!=typeof History.initHtml4&&History.initHtml4(),!0)},History.initCore=function(){if("undefined"!=typeof History.initCore.initialized)return!1;if(History.initCore.initialized=!0,History.options=History.options||{},History.options.hashChangeInterval=History.options.hashChangeInterval||100,History.options.safariPollInterval=History.options.safariPollInterval||500,History.options.doubleCheckInterval=History.options.doubleCheckInterval||500,History.options.storeInterval=History.options.storeInterval||1e3,History.options.busyDelay=History.options.busyDelay||250,History.options.debug=History.options.debug||!1,History.options.initialTitle=History.options.initialTitle||document.title,History.intervalList=[],History.clearAllIntervals=function(){var i,il=History.intervalList;
if("undefined"!=typeof il&&null!==il){for(i=0;i<il.length;i++)clearInterval(il[i]);History.intervalList=null}},History.debug=function(){History.options.debug&&History.log.apply(History,arguments)},History.log=function(){var message,i,n,args,arg,consoleExists=!("undefined"==typeof console||"undefined"==typeof console.log||"undefined"==typeof console.log.apply),textarea=document.getElementById("log");for(consoleExists?(args=Array.prototype.slice.call(arguments),message=args.shift(),"undefined"!=typeof console.debug?console.debug.apply(console,[message,args]):console.log.apply(console,[message,args])):message="\n"+arguments[0]+"\n",i=1,n=arguments.length;n>i;++i){if(arg=arguments[i],"object"==typeof arg&&"undefined"!=typeof JSON)try{arg=JSON.stringify(arg)
}catch(Exception){}message+="\n"+arg+"\n"}return textarea?(textarea.value+=message+"\n-----\n",textarea.scrollTop=textarea.scrollHeight-textarea.clientHeight):consoleExists||alert(message),!0},History.getInternetExplorerMajorVersion=function(){var result=History.getInternetExplorerMajorVersion.cached="undefined"!=typeof History.getInternetExplorerMajorVersion.cached?History.getInternetExplorerMajorVersion.cached:function(){for(var v=3,div=document.createElement("div"),all=div.getElementsByTagName("i");(div.innerHTML="<!--[if gt IE "+ ++v+"]><i></i><![endif]-->")&&all[0];);return v>4?v:!1
}();return result},History.isInternetExplorer=function(){var result=History.isInternetExplorer.cached="undefined"!=typeof History.isInternetExplorer.cached?History.isInternetExplorer.cached:Boolean(History.getInternetExplorerMajorVersion());return result},History.emulated={pushState:!Boolean(window.history&&window.history.pushState&&window.history.replaceState&&!(/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(navigator.userAgent)||/AppleWebKit\/5([0-2]|3[0-2])/i.test(navigator.userAgent))),hashChange:Boolean(!("onhashchange"in window||"onhashchange"in document)||History.isInternetExplorer()&&History.getInternetExplorerMajorVersion()<8)},History.enabled=!History.emulated.pushState,History.bugs={setHash:Boolean(!History.emulated.pushState&&"Apple Computer, Inc."===navigator.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(navigator.userAgent)),safariPoll:Boolean(!History.emulated.pushState&&"Apple Computer, Inc."===navigator.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(navigator.userAgent)),ieDoubleCheck:Boolean(History.isInternetExplorer()&&History.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(History.isInternetExplorer()&&History.getInternetExplorerMajorVersion()<7)},History.isEmptyObject=function(obj){for(var name in obj)return!1;
return!0},History.cloneObject=function(obj){var hash,newObj;return obj?(hash=JSON.stringify(obj),newObj=JSON.parse(hash)):newObj={},newObj},History.getRootUrl=function(){var rootUrl=document.location.protocol+"//"+(document.location.hostname||document.location.host);return document.location.port&&(rootUrl+=":"+document.location.port),rootUrl+="/"},History.getBaseHref=function(){var baseElements=document.getElementsByTagName("base"),baseElement=null,baseHref="";return 1===baseElements.length&&(baseElement=baseElements[0],baseHref=baseElement.href.replace(/[^\/]+$/,"")),baseHref=baseHref.replace(/\/+$/,""),baseHref&&(baseHref+="/"),baseHref
},History.getBaseUrl=function(){var baseUrl=History.getBaseHref()||History.getBasePageUrl()||History.getRootUrl();return baseUrl},History.getPageUrl=function(){var pageUrl,State=History.getState(!1,!1),stateUrl=(State||{}).url||document.location.href;return pageUrl=stateUrl.replace(/\/+$/,"").replace(/[^\/]+$/,function(part){return/\./.test(part)?part:part+"/"})},History.getBasePageUrl=function(){var basePageUrl=document.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(part){return/[^\/]$/.test(part)?"":part
}).replace(/\/+$/,"")+"/";return basePageUrl},History.getFullUrl=function(url,allowBaseHref){var fullUrl=url,firstChar=url.substring(0,1);return allowBaseHref="undefined"==typeof allowBaseHref?!0:allowBaseHref,/[a-z]+\:\/\//.test(url)||(fullUrl="/"===firstChar?History.getRootUrl()+url.replace(/^\/+/,""):"#"===firstChar?History.getPageUrl().replace(/#.*/,"")+url:"?"===firstChar?History.getPageUrl().replace(/[\?#].*/,"")+url:allowBaseHref?History.getBaseUrl()+url.replace(/^(\.\/)+/,""):History.getBasePageUrl()+url.replace(/^(\.\/)+/,"")),fullUrl.replace(/\#$/,"")
},History.getShortUrl=function(url){var shortUrl=url,baseUrl=History.getBaseUrl(),rootUrl=History.getRootUrl();return History.emulated.pushState&&(shortUrl=shortUrl.replace(baseUrl,"")),shortUrl=shortUrl.replace(rootUrl,"/"),History.isTraditionalAnchor(shortUrl)&&(shortUrl="./"+shortUrl),shortUrl=shortUrl.replace(/^(\.\/)+/g,"./").replace(/\#$/,"")},History.store={},History.idToState=History.idToState||{},History.stateToId=History.stateToId||{},History.urlToId=History.urlToId||{},History.storedStates=History.storedStates||[],History.savedStates=History.savedStates||[],History.normalizeStore=function(){History.store.idToState=History.store.idToState||{},History.store.urlToId=History.store.urlToId||{},History.store.stateToId=History.store.stateToId||{}
},History.getState=function(friendly,create){"undefined"==typeof friendly&&(friendly=!0),"undefined"==typeof create&&(create=!0);var State=History.getLastSavedState();return!State&&create&&(State=History.createStateObject()),friendly&&(State=History.cloneObject(State),State.url=State.cleanUrl||State.url),State},History.getIdByState=function(newState){var str,id=History.extractId(newState.url);if(!id)if(str=History.getStateString(newState),"undefined"!=typeof History.stateToId[str])id=History.stateToId[str];else if("undefined"!=typeof History.store.stateToId[str])id=History.store.stateToId[str];
else{for(;;)if(id=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),"undefined"==typeof History.idToState[id]&&"undefined"==typeof History.store.idToState[id])break;History.stateToId[str]=id,History.idToState[id]=newState}return id},History.normalizeState=function(oldState){var newState,dataNotEmpty;return oldState&&"object"==typeof oldState||(oldState={}),"undefined"!=typeof oldState.normalized?oldState:(oldState.data&&"object"==typeof oldState.data||(oldState.data={}),newState={},newState.normalized=!0,newState.title=oldState.title||"",newState.url=History.getFullUrl(History.unescapeString(oldState.url||document.location.href)),newState.hash=History.getShortUrl(newState.url),newState.data=History.cloneObject(oldState.data),newState.id=History.getIdByState(newState),newState.cleanUrl=newState.url.replace(/\??\&_suid.*/,""),newState.url=newState.cleanUrl,dataNotEmpty=!History.isEmptyObject(newState.data),(newState.title||dataNotEmpty)&&(newState.hash=History.getShortUrl(newState.url).replace(/\??\&_suid.*/,""),/\?/.test(newState.hash)||(newState.hash+="?"),newState.hash+="&_suid="+newState.id),newState.hashedUrl=History.getFullUrl(newState.hash),(History.emulated.pushState||History.bugs.safariPoll)&&History.hasUrlDuplicate(newState)&&(newState.url=newState.hashedUrl),newState)
},History.createStateObject=function(data,title,url){var State={data:data,title:title,url:url};return State=History.normalizeState(State)},History.getStateById=function(id){id=String(id);var State=History.idToState[id]||History.store.idToState[id]||undefined;return State},History.getStateString=function(passedState){var State,cleanedState,str;return State=History.normalizeState(passedState),cleanedState={data:State.data,title:passedState.title,url:passedState.url},str=JSON.stringify(cleanedState)},History.getStateId=function(passedState){var State,id;
return State=History.normalizeState(passedState),id=State.id},History.getHashByState=function(passedState){var State,hash;return State=History.normalizeState(passedState),hash=State.hash},History.extractId=function(url_or_hash){var id,parts,url;return parts=/(.*)\&_suid=([0-9]+)$/.exec(url_or_hash),url=parts?parts[1]||url_or_hash:url_or_hash,id=parts?String(parts[2]||""):"",id||!1},History.isTraditionalAnchor=function(url_or_hash){var isTraditional=!/[\/\?\.]/.test(url_or_hash);return isTraditional},History.extractState=function(url_or_hash,create){var id,url,State=null;
return create=create||!1,id=History.extractId(url_or_hash),id&&(State=History.getStateById(id)),State||(url=History.getFullUrl(url_or_hash),id=History.getIdByUrl(url)||!1,id&&(State=History.getStateById(id)),State||!create||History.isTraditionalAnchor(url_or_hash)||(State=History.createStateObject(null,null,url))),State},History.getIdByUrl=function(url){var id=History.urlToId[url]||History.store.urlToId[url]||undefined;return id},History.getLastSavedState=function(){return History.savedStates[History.savedStates.length-1]||undefined
},History.getLastStoredState=function(){return History.storedStates[History.storedStates.length-1]||undefined},History.hasUrlDuplicate=function(newState){var oldState,hasDuplicate=!1;return oldState=History.extractState(newState.url),hasDuplicate=oldState&&oldState.id!==newState.id},History.storeState=function(newState){return History.urlToId[newState.url]=newState.id,History.storedStates.push(History.cloneObject(newState)),newState},History.isLastSavedState=function(newState){var newId,oldState,oldId,isLast=!1;
return History.savedStates.length&&(newId=newState.id,oldState=History.getLastSavedState(),oldId=oldState.id,isLast=newId===oldId),isLast},History.saveState=function(newState){return History.isLastSavedState(newState)?!1:(History.savedStates.push(History.cloneObject(newState)),!0)},History.getStateByIndex=function(index){var State=null;return State="undefined"==typeof index?History.savedStates[History.savedStates.length-1]:0>index?History.savedStates[History.savedStates.length+index]:History.savedStates[index]
},History.getHash=function(){var hash=History.unescapeHash(document.location.hash);return hash},History.unescapeString=function(str){for(var tmp,result=str;;){if(tmp=window.unescape(result),tmp===result)break;result=tmp}return result},History.unescapeHash=function(hash){var result=History.normalizeHash(hash);return result=History.unescapeString(result)},History.normalizeHash=function(hash){var result=hash.replace(/[^#]*#/,"").replace(/#.*/,"");return result},History.setHash=function(hash,queue){var adjustedHash,State,pageUrl;
return queue!==!1&&History.busy()?(History.pushQueue({scope:History,callback:History.setHash,args:arguments,queue:queue}),!1):(adjustedHash=History.escapeHash(hash),History.busy(!0),State=History.extractState(hash,!0),State&&!History.emulated.pushState?History.pushState(State.data,State.title,State.url,!1):document.location.hash!==adjustedHash&&(History.bugs.setHash?(pageUrl=History.getPageUrl(),History.pushState(null,null,pageUrl+"#"+adjustedHash,!1)):document.location.hash=adjustedHash),History)},History.escapeHash=function(hash){var result=History.normalizeHash(hash);
return result=window.escape(result),History.bugs.hashEscape||(result=result.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),result},History.getHashByUrl=function(url){var hash=String(url).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return hash=History.unescapeHash(hash)},History.setTitle=function(newState){var firstState,title=newState.title;title||(firstState=History.getStateByIndex(0),firstState&&firstState.url===newState.url&&(title=firstState.title||History.options.initialTitle));
try{document.getElementsByTagName("title")[0].innerHTML=title.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(Exception){}return document.title=title,History},History.queues=[],History.busy=function(value){if("undefined"!=typeof value?History.busy.flag=value:"undefined"==typeof History.busy.flag&&(History.busy.flag=!1),!History.busy.flag){clearTimeout(History.busy.timeout);var fireNext=function(){var i,queue,item;if(!History.busy.flag)for(i=History.queues.length-1;i>=0;--i)queue=History.queues[i],0!==queue.length&&(item=queue.shift(),History.fireQueueItem(item),History.busy.timeout=setTimeout(fireNext,History.options.busyDelay))
};History.busy.timeout=setTimeout(fireNext,History.options.busyDelay)}return History.busy.flag},History.busy.flag=!1,History.fireQueueItem=function(item){return item.callback.apply(item.scope||History,item.args||[])},History.pushQueue=function(item){return History.queues[item.queue||0]=History.queues[item.queue||0]||[],History.queues[item.queue||0].push(item),History},History.queue=function(item,queue){return"function"==typeof item&&(item={callback:item}),"undefined"!=typeof queue&&(item.queue=queue),History.busy()?History.pushQueue(item):History.fireQueueItem(item),History
},History.clearQueue=function(){return History.busy.flag=!1,History.queues=[],History},History.stateChanged=!1,History.doubleChecker=!1,History.doubleCheckComplete=function(){return History.stateChanged=!0,History.doubleCheckClear(),History},History.doubleCheckClear=function(){return History.doubleChecker&&(clearTimeout(History.doubleChecker),History.doubleChecker=!1),History},History.doubleCheck=function(tryAgain){return History.stateChanged=!1,History.doubleCheckClear(),History.bugs.ieDoubleCheck&&(History.doubleChecker=setTimeout(function(){return History.doubleCheckClear(),History.stateChanged||tryAgain(),!0
},History.options.doubleCheckInterval)),History},History.safariStatePoll=function(){var newState,urlState=History.extractState(document.location.href);if(!History.isLastSavedState(urlState))return newState=urlState,newState||(newState=History.createStateObject()),History.Adapter.trigger(window,"popstate"),History},History.back=function(queue){return queue!==!1&&History.busy()?(History.pushQueue({scope:History,callback:History.back,args:arguments,queue:queue}),!1):(History.busy(!0),History.doubleCheck(function(){History.back(!1)
}),history.go(-1),!0)},History.forward=function(queue){return queue!==!1&&History.busy()?(History.pushQueue({scope:History,callback:History.forward,args:arguments,queue:queue}),!1):(History.busy(!0),History.doubleCheck(function(){History.forward(!1)}),history.go(1),!0)},History.go=function(index,queue){var i;if(index>0)for(i=1;index>=i;++i)History.forward(queue);else{if(!(0>index))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(i=-1;i>=index;--i)History.back(queue)
}return History},History.emulated.pushState){var emptyFunction=function(){};History.pushState=History.pushState||emptyFunction,History.replaceState=History.replaceState||emptyFunction}else History.onPopState=function(event,extra){var currentHash,currentState,stateId=!1,newState=!1;return History.doubleCheckComplete(),(currentHash=History.getHash())?(currentState=History.extractState(currentHash||document.location.href,!0),currentState?History.replaceState(currentState.data,currentState.title,currentState.url,!1):(History.Adapter.trigger(window,"anchorchange"),History.busy(!1)),History.expectedStateId=!1,!1):(stateId=History.Adapter.extractEventData("state",event,extra)||!1,newState=stateId?History.getStateById(stateId):History.expectedStateId?History.getStateById(History.expectedStateId):History.extractState(document.location.href),newState||(newState=History.createStateObject(null,null,document.location.href)),History.expectedStateId=!1,History.isLastSavedState(newState)?(History.busy(!1),!1):(History.storeState(newState),History.saveState(newState),History.setTitle(newState),History.Adapter.trigger(window,"statechange"),History.busy(!1),!0))
},History.Adapter.bind(window,"popstate",History.onPopState),History.pushState=function(data,title,url,queue){if(History.getHashByUrl(url)&&History.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(queue!==!1&&History.busy())return History.pushQueue({scope:History,callback:History.pushState,args:arguments,queue:queue}),!1;History.busy(!0);var newState=History.createStateObject(data,title,url);return History.isLastSavedState(newState)?History.busy(!1):(History.storeState(newState),History.expectedStateId=newState.id,history.pushState(newState.id,newState.title,newState.url),History.Adapter.trigger(window,"popstate")),!0
},History.replaceState=function(data,title,url,queue){if(History.getHashByUrl(url)&&History.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(queue!==!1&&History.busy())return History.pushQueue({scope:History,callback:History.replaceState,args:arguments,queue:queue}),!1;History.busy(!0);var newState=History.createStateObject(data,title,url);return History.isLastSavedState(newState)?History.busy(!1):(History.storeState(newState),History.expectedStateId=newState.id,history.replaceState(newState.id,newState.title,newState.url),History.Adapter.trigger(window,"popstate")),!0
};if(sessionStorage){try{History.store=JSON.parse(sessionStorage.getItem("History.store"))||{}}catch(err){History.store={}}History.normalizeStore()}else History.store={},History.normalizeStore();History.Adapter.bind(window,"beforeunload",History.clearAllIntervals),History.Adapter.bind(window,"unload",History.clearAllIntervals),History.saveState(History.storeState(History.extractState(document.location.href,!0))),sessionStorage&&(History.onUnload=function(){var currentStore,item;try{currentStore=JSON.parse(sessionStorage.getItem("History.store"))||{}
}catch(err){currentStore={}}currentStore.idToState=currentStore.idToState||{},currentStore.urlToId=currentStore.urlToId||{},currentStore.stateToId=currentStore.stateToId||{};for(item in History.idToState)History.idToState.hasOwnProperty(item)&&(currentStore.idToState[item]=History.idToState[item]);for(item in History.urlToId)History.urlToId.hasOwnProperty(item)&&(currentStore.urlToId[item]=History.urlToId[item]);for(item in History.stateToId)History.stateToId.hasOwnProperty(item)&&(currentStore.stateToId[item]=History.stateToId[item]);
History.store=currentStore,History.normalizeStore(),sessionStorage.setItem("History.store",JSON.stringify(currentStore))},History.intervalList.push(setInterval(History.onUnload,History.options.storeInterval)),History.Adapter.bind(window,"beforeunload",History.onUnload),History.Adapter.bind(window,"unload",History.onUnload)),History.emulated.pushState||(History.bugs.safariPoll&&History.intervalList.push(setInterval(History.safariStatePoll,History.options.safariPollInterval)),("Apple Computer, Inc."===navigator.vendor||"Mozilla"===(navigator.appCodeName||""))&&(History.Adapter.bind(window,"hashchange",function(){History.Adapter.trigger(window,"popstate")
}),History.getHash()&&History.Adapter.onDomLoad(function(){History.Adapter.trigger(window,"hashchange")})))},History.init()}(window);var timestamps=[];$.fn.route=function(options){if(this.is("a")){var t=(new Date).getTime();timestamps[t]=t,History.pushState($.extend({timestamp:t,refresh:!0},options),this.attr("title"),this.attr("href"))}return this},History.Adapter.bind(window,"statechange",function(){var state=History.getState();state.id===History.savedStates[0].id&&(window.location=state.url),state.data.timestamp in timestamps?delete timestamps[state.data.timestamp]:state.data.refresh&&(window.location=state.url)
})};exports(),module.resolveWith(exports)};FD31.module("history",moduleFactory)}();