\n\n',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",element.className=element.className.replace("pace-running",""),element.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b;return null==document.querySelector(C.target)?!1:(a=this.getElement(),a.children[0].style.width=""+this.progress+"%",(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?b="99":(b=this.progress=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),N=window.XMLHttpRequest,M=window.XDomainRequest,L=window.WebSocket,v=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],null==a[d]&&"function"!=typeof e?f.push(a[d]=e):f.push(void 0)}catch(g){c=g}return f},z=[],Pace.ignore=function(){var a,b,c;return b=arguments[0],a=2=0)return!0}return!1},j=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return H(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new N(b),a(c),c},v(window.XMLHttpRequest,N),null!=M&&(window.XDomainRequest=function(){var b;return b=new M,a(b),b},v(window.XDomainRequest,M)),null!=L&&C.ajax.trackWebSockets&&(window.WebSocket=function(a,b){var d;return d=new L(a,b),H("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d},v(window.WebSocket,L))}return X(b,a),b}(h),P=null,x=function(){return null==P&&(P=new j),P},x().on("request",function(b){var c,d,e,f;return f=b.type,e=b.request,Pace.running||C.restartOnRequestAfter===!1&&"force"!==H(f)?void 0:(d=arguments,c=C.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,j;if(b="socket"===f?e.readyStateh){for(Pace.restart(),i=Pace.sources,j=[],c=0,g=i.length;g>c;c++){if(I=i[c],I instanceof a){I.watch.apply(I,d);break}j.push(void 0)}return j}},c))}),a=function(){function a(){var a=this;this.elements=[],x().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d;return d=a.type,b=a.request,c="socket"===d?new m(b):new n(b),this.elements.push(c)},a}(),n=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2}),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100});else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),m=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100})}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},C.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=B(),b=setInterval(function(){var g;return g=B()-c-50,c=B(),e.push(g),e.length>C.eventLag.sampleCount&&e.shift(),a=p(e),++d>=C.eventLag.minSamples&&a=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/C.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,C.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+C.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),J=null,G=null,q=null,K=null,o=null,r=null,Pace.running=!1,y=function(){return C.restartOnPushState?Pace.restart():void 0},null!=window.history.pushState&&(R=window.history.pushState,window.history.pushState=function(){return y(),R.apply(window.history,arguments)}),null!=window.history.replaceState&&(U=window.history.replaceState,window.history.replaceState=function(){return y(),U.apply(window.history,arguments)}),k={ajax:a,elements:d,document:c,eventLag:f},(A=function(){var a,c,d,e,f,g,h,i;for(Pace.sources=J=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],C[a]!==!1&&J.push(new k[a](C[a]));for(i=null!=(h=C.extraSources)?h:[],d=0,f=i.length;f>d;d++)I=i[d],J.push(new I(C));return Pace.bar=q=new b,G=[],K=new l})(),Pace.stop=function(){return Pace.trigger("stop"),Pace.running=!1,q.destroy(),r=!0,null!=o&&("function"==typeof s&&s(o),o=null),A()},Pace.restart=function(){return Pace.trigger("restart"),Pace.stop(),Pace.start()},Pace.go=function(){return Pace.running=!0,q.render(),r=!1,o=F(function(a,b){var c,d,e,f,g,h,i,j,k,m,n,o,p,s,t,u,v;for(j=100-q.progress,d=o=0,e=!0,h=p=0,t=J.length;t>p;h=++p)for(I=J[h],m=null!=G[h]?G[h]:G[h]=[],g=null!=(v=I.elements)?v:[I],i=s=0,u=g.length;u>s;i=++s)f=g[i],k=null!=m[i]?m[i]:m[i]=new l(f),e&=k.done,k.done||(d++,o+=k.tick(a));return c=o/d,q.update(K.tick(a,c)),n=B(),q.done()||e||r?(q.update(100),Pace.trigger("done"),setTimeout(function(){return q.finish(),Pace.running=!1,Pace.trigger("hide")},Math.max(C.ghostTime,Math.min(C.minTime,B()-n)))):b()})},Pace.start=function(a){u(C,a),Pace.running=!0;try{q.render()}catch(b){i=b}return document.querySelector(".pace")?(Pace.trigger("start"),Pace.go()):setTimeout(Pace.start,50)},"function"==typeof define&&define.amd?define(function(){return Pace}):"object"==typeof exports?module.exports=Pace:C.startOnPageLoad&&Pace.start()}).call(this);
}
if(pattern == 2){
var pace = (function(){
'use strict';
var d = {};
var s = {};
var c = {};
s.target = 'pace';
s.targetProgress = s.target + '-progress';
s.targetActivity = s.target + '-activity';
s.targetLogo = s.target + '-logo';
s.targetTransition1 = s.target + '-transition-1';
s.targetTransition2 = s.target + '-transition-2';
s.hide = s.target + '-hide';
Object.keys(s).forEach(function(data) {
c[data] = s[data];
});
init();
function init(){
d.active = false;
d.browser = getBrowserInfo();
d.transition = d.browser.name == 'safari' || d.browser.isTouch ? c.targetTransition2 : c.targetTransition1;
Pace.on('start', function(){
if(!d.active) d.active = setObject();
});
Pace.on('done', function(){
setTimeout(function(){
d.$pace.style.transform = 'translate3d(100%, 0, 0)';
d.$logo.style.transform = 'translate3d(-100%, 0, 0)';
d.$paceActivity.addEventListener("transitionend", function(e) {
if(this.classList.contains(c.targetActivity) && e.propertyName == 'transform'){
d.$pace.style.display = 'none';
}
//d.$paceActivity.off('transitionend');
});
}, 1200);
});
//android Firefoxは、キャッシュがある場合、Paceの startが実行されない
d.tid = setInterval(function(){
var s_target = document.getElementsByClassName(s.target)[0];
if(s.target.length){
clearInterval(d.tid);
if(!d.active) d.active = setObject();
}
}, 100);
}
function setObject(){
var img = document.getElementsByTagName('img');
img.onload = function(){
d.$logo.classList.remove(c.hide);
};
img.src = '/_img/ja/resource/9/logo/';
var p = document.getElementById('pace');
p.classList.add(d.transition);
d.$pace = p;
d.$paceProgress = d.$pace.getElementsByClassName(s.targetProgress)[0];
d.$paceActivity = d.$pace.getElementsByClassName(s.targetActivity)[0];
d.$paceActivity.insertAdjacentHTML("beforeend", '');
d.$logo = d.$paceActivity.getElementsByClassName(s.targetLogo)[0];
return true;
};
function getBrowserInfo(){
var i,e=window.navigator.userAgent.toLowerCase(),n=window.navigator.appVersion.toLowerCase(),d=-1!=e.indexOf("webkit"),f="ontouchstart"in window,o="unknown";return-1!=e.indexOf("msie")||-1!=e.indexOf("trident")?-1!=n.indexOf("msie 6")?o="ie_6":-1!=n.indexOf("msie 7")?o="ie_7":-1!=n.indexOf("msie 8")?o="ie_8":-1!=n.indexOf("msie 9")?o="ie_9":-1!=n.indexOf("msie 10")?o="ie_10":-1!=e.indexOf("trident/7")&&(o="ie_11"):-1!=e.indexOf("webkit")&&-1!=e.indexOf("edge")?o="edge":-1!=e.indexOf("android")&&-1!=e.indexOf("webkit")&&-1!=e.indexOf("version")?o="android_default_browser":-1!=e.indexOf("opr")||-1!=e.indexOf("opera")||-1!=e.indexOf("opios")?o=-1!=e.indexOf("opera mini")?"opera_mini":"opera":-1!=e.indexOf("vivaldi")?o="vivaldi":-1!=e.indexOf("chrome")||-1!=e.indexOf("crios")?o="chrome":-1!=e.indexOf("firefox")||-1!=e.indexOf("fxios")?o="firefox":-1!=e.indexOf("smooz")?o="smooz":-1!=e.indexOf("fban")?o="facebook":-1!=e.indexOf("safari")&&(o="safari"),-1!=e.indexOf("windows")&&-1!=e.indexOf("phone")?i="windows_phone":-1!=e.indexOf("windows")?i="windows":-1!=e.indexOf("iphone")?i="iphone":-1!=e.indexOf("ipad")?i="ipad":-1!=e.indexOf("ipod")?i="ipod":-1!=e.indexOf("mac")?i="mac":-1!=e.indexOf("android")&&(i="android"),{name:o,device:i,isMobile:-1!=e.indexOf("windows")&&-1!=e.indexOf("phone")||-1!=e.indexOf("iphone")||-1!=e.indexOf("ipod")||-1!=e.indexOf("android")&&-1!=e.indexOf("mobile")||-1!=e.indexOf("firefox")&&-1!=e.indexOf("mobile")||-1!=e.indexOf("blackberry"),isTablet:-1!=e.indexOf("windows")&&-1!=e.indexOf("touch")||-1!=e.indexOf("ipad")||-1!=e.indexOf("android")&&-1==e.indexOf("mobile")||-1!=e.indexOf("firefox")&&-1!=e.indexOf("tablet")||-1!=e.indexOf("kindle")||-1!=e.indexOf("silk")||-1!=e.indexOf("playbook"),isTouch:f,isWebkit:d,ua:e}
};
});
pace();
}
});
});