hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
68d4b7306eda5af72eb594f35dd436ac0ff63fac | 3,272 | js | JavaScript | frontend/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-table.js | pradeepkumarcm-egov/DIGIT-Dev | d8fb601fae6d919d2386f36b36dfc7fde77ebd4f | [
"MIT"
] | 11 | 2021-04-22T13:18:00.000Z | 2021-07-13T06:24:48.000Z | frontend/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-table.js | pradeepkumarcm-egov/DIGIT-Dev | d8fb601fae6d919d2386f36b36dfc7fde77ebd4f | [
"MIT"
] | null | null | null | frontend/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-table.js | pradeepkumarcm-egov/DIGIT-Dev | d8fb601fae6d919d2386f36b36dfc7fde77ebd4f | [
"MIT"
] | 11 | 2021-04-14T08:24:35.000Z | 2021-07-12T04:15:09.000Z | import React from "react";
import { useTranslation } from "react-i18next";
const styles = {
root: {
width: "100%",
marginTop: "2px",
overflowX: "auto",
boxShadow: "none",
},
table: {
minWidth: 700,
backgroundColor: "rgba(250, 250, 250, var(--bg-opacity))",
},
cell: {
maxWidth: "4em",
minWidth: "1em",
border: "1px solid #e8e7e6",
padding: "4px 5px",
fontSize: "0.8em",
textAlign: "left",
lineHeight: "1.5em",
},
cellHeader: {
overflow: "hidden",
textOverflow: "ellipsis",
},
cellLeft: {
// position: 'sticky',
// backgroundColor:'rgba(250, 250, 250, var(--bg-opacity))',
// left: 0
},
cellRight: {
// position: 'sticky',
// backgroundColor:'rgba(250, 250, 250, var(--bg-opacity))',
// right: 0
},
};
const ArrearTable = ({ className = "table", headers = [], values = [], arrears = 0 }) => {
const { t } = useTranslation();
return (
<React.Fragment>
<div style={styles.root}>
<table className={className} style={styles.table}>
<thead>
<tr>
<th style={{ ...styles.cell, ...styles.cellLeft, ...styles.cellHeader }}>{t("CS_BILL_PERIOD")}</th>
{headers.map((header, ind) => {
let styleRight = headers.length == ind + 1 ? styles.cellRight : {};
return (
<th style={{ ...styles.cell, ...styleRight, ...styles.cellHeader }} key={ind}>
{t(header)}
</th>
);
})}
</tr>
</thead>
<tbody>
{Object.values(values).map((row, ind) => (
<tr key={ind}>
<td style={{ ...styles.cell, ...styles.cellLeft }} component="th" scope="row">
{Object.keys(values)[ind]}
</td>
{headers.map((header, i) => {
let styleRight = headers.length == i + 1 ? styles.cellRight : {};
return (
<td style={{ ...styles.cell, textAlign: "left", ...styleRight, whiteSpace: "pre" }} key={i} numeric>
₹{(row[header] && row[header]["value"]) || "0"}
</td>
);
})}
</tr>
))}
<tr>
<td style={{ ...styles.cell, ...styles.cellLeft }}></td>
{headers.map((header, ind) => {
if (ind == headers.length - 1) {
return (
<td style={{ ...styles.cell, ...styles.cellRight, textAlign: "left", fontWeight: "700", whiteSpace: "pre" }} key={ind} numeric>
{arrears}
</td>
);
} else if (ind == headers.length - 2) {
return (
<td style={{ ...styles.cell, textAlign: "left" }} key={ind} numeric>
{t("COMMON_ARREARS_TOTAL")}
</td>
);
} else {
return <td style={styles.cell} key={ind} numeric></td>;
}
})}
</tr>
</tbody>
</table>
</div>
</React.Fragment>
);
};
export default ArrearTable;
| 31.76699 | 147 | 0.438264 |
68d4ce2ed10c50059e6fa9f338834405eb3fca4b | 232,780 | js | JavaScript | web/js/b092191.js | benaata/PortfolioSymfony | 7791f53039937648427d1cda4653e03c62d7177d | [
"MIT"
] | null | null | null | web/js/b092191.js | benaata/PortfolioSymfony | 7791f53039937648427d1cda4653e03c62d7177d | [
"MIT"
] | null | null | null | web/js/b092191.js | benaata/PortfolioSymfony | 7791f53039937648427d1cda4653e03c62d7177d | [
"MIT"
] | null | null | null | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
"function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g});
(function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.owl)a.owl.hasOwnProperty(d)&&(e+=a.owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath?
(e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style"));this.$elem.data("owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length;
this.wrapItems();this.$owlItems=this.$elem.find(".owl-item");this.$owlWrapper=this.$elem.find(".owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&&
(this.options.autoPlay=5E3);this.play();this.$elem.find(".owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this,
[this.$elem])},updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}),
g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>');this.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">');this.wrapperOuter=this.$elem.find(".owl-wrapper-outer");this.$elem.css("display","block")},
baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=
!1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;b<this.options.itemsCustom.length;b+=1)this.options.itemsCustom[b][0]<=a&&(this.options.items=this.options.itemsCustom[b][1]);else a<=this.options.itemsDesktop[0]&&!1!==this.options.itemsDesktop&&(this.options.items=this.options.itemsDesktop[1]),
a<=this.options.itemsDesktopSmall[0]&&!1!==this.options.itemsDesktopSmall&&(this.options.items=this.options.itemsDesktopSmall[1]),a<=this.options.itemsTablet[0]&&!1!==this.options.itemsTablet&&(this.options.items=this.options.itemsTablet[1]),a<=this.options.itemsTabletSmall[0]&&!1!==this.options.itemsTabletSmall&&(this.options.items=this.options.itemsTabletSmall[1]),a<=this.options.itemsMobile[0]&&!1!==this.options.itemsMobile&&(this.options.items=this.options.itemsMobile[1]);this.options.items>this.itemsAmount&&
!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a=
this,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("owl-roundPages",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/
this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e<this.itemsAmount;e+=1)b+=this.itemWidth,this.positionsInArray.push(-b),!0===this.options.scrollPerPage&&(c=f(this.$owlItems[e]),
c=c.data("owl-roundPages"),c!==a&&(this.pagesInArray[a]=this.positionsInArray[e],a=c))},buildControls:function(){if(!0===this.options.navigation||!0===this.options.pagination)this.owlControls=f('<div class="owl-controls"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('<div class="owl-buttons"/>');a.owlControls.append(b);a.buttonPrev=
f("<div/>",{"class":"owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("<div/>",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper=
f('<div class="owl-pagination"/>');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(b){b.preventDefault();Number(f(this).data("owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c<this.itemsAmount;c+=1)0===c%this.options.items&&
(a+=1,b===c&&(e=this.itemsAmount-this.options.items),d=f("<div/>",{"class":"owl-page"}),g=f("<span></span>",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),d.append(g),d.data("owl-page",b===c?e:c),d.data("owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".owl-page").each(function(){f(this).data("owl-roundPages")===
f(a.$owlItems[a.currentItem]).data("owl-roundPages")&&(a.paginationWrapper.find(".owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===
this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1;
this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0<this.currentItem&&this.currentItem<this.options.items?0:this.currentItem-(!0===this.options.scrollPerPage?
this.options.items:1);if(0>this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0),
!0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},
c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem=
this.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)},
checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))},
addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+
a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText=" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)";
a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:
!1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.owl","mousemove.owl","mouseup.owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})},
gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos;
"function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8<d.newRelativeX||-8>d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10<d.newPosY||-10>d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)}
function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection="left":d.owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}),
a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1;
!1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass("grabbing")||d.$owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=
a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20<g&&"left"===a.moveDirection()?(c=g,a.currentItem=!0===a.options.scrollPerPage?f.inArray(c,a.positionsInArray):d):e+a.itemWidth/20<g&&e+a.itemWidth/20>(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)):
(c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()});a.$elem.on("owl.prev",function(){a.prev()});a.$elem.on("owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("owl.goTo",function(b,e){a.goTo(e)});
a.$elem.on("owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a<this.itemsAmount;a+=1)b=f(this.$owlItems[a]),"loaded"!==b.data("owl-loaded")&&(e=b.data("owl-item"),c=b.find(".lazyOwl"),"string"!==typeof c.data("src")?
b.data("owl-loaded","loaded"):(void 0===b.data("owl-loaded")&&(c.hide(),b.addClass("loading").data("owl-loaded","checked")),(d=!0===this.options.lazyFollow?e>=this.currentItem:!0)&&e<this.currentItem+this.options.items&&c.length&&this.lazyPreload(b,c)))},lazyPreload:function(a,b){function e(){a.data("owl-loaded","loaded").removeClass("loading");b.removeAttr("data-src");"fade"===d.options.lazyEffect?b.fadeIn(400):b.show();"function"===typeof d.options.afterLazyLoad&&d.options.afterLazyLoad.apply(this,
[d.$elem])}function c(){f+=1;d.completeImg(b.get(0))||!0===k?e():100>=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b,
100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a<this.currentItem+this.options.items;a+=1)this.visibleItems.push(a),!0===this.options.addClassActive&&f(this.$owlItems[a]).addClass("active");
this.owl.visibleItems=this.visibleItems},transitionTypes:function(a){this.outClass="owl-"+a+"-out";this.inClass="owl-"+a+"-in"},singleItemTransition:function(){var a=this,b=a.outClass,e=a.inClass,c=a.$owlItems.eq(a.currentItem),d=a.$owlItems.eq(a.prevItem),f=Math.abs(a.positionsInArray[a.currentItem])+a.positionsInArray[a.prevItem],g=Math.abs(a.positionsInArray[a.currentItem])+a.itemWidth/2;a.isTransition=!0;a.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":g+"px","-moz-perspective-origin":g+
"px","perspective-origin":g+"px"});d.css({position:"relative",left:f+"px"}).addClass(b).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endPrev=!0;d.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(d,b)});c.addClass(e).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endCurrent=!0;c.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(c,e)})},clearTransStyle:function(a,
b){a.css({position:"",left:""}).removeClass(b);this.endPrev&&this.endCurrent&&(this.$owlWrapper.removeClass("owl-origin"),this.isTransition=this.endCurrent=this.endPrev=!1)},owlStatus:function(){this.owl={userOptions:this.userOptions,baseElement:this.$elem,userItems:this.$userItems,owlItems:this.$owlItems,currentItem:this.currentItem,prevItem:this.prevItem,visibleItems:this.visibleItems,isTouch:this.browser.isTouch,browser:this.browser,dragDirection:this.dragDirection}},clearEvents:function(){this.$elem.off(".owl owl mousedown.disableTextSelect");
f(k).off(".owl owl");f(g).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.owlControls&&this.owlControls.remove());this.clearEvents();this.$elem.attr("style",this.$elem.data("owl-originalStyles")||"").attr("class",this.$elem.data("owl-originalClasses"))},destroy:function(){this.stop();g.clearInterval(this.checkVisible);this.unWrap();this.$elem.removeData()},reinit:function(a){a=f.extend({},this.userOptions,
a);this.unWrap();this.init(a,this.$elem)},addItem:function(a,b){var e;if(!a)return!1;if(0===this.$elem.children().length)return this.$elem.append(a),this.setVars(),!1;this.unWrap();e=void 0===b||-1===b?-1:b;e>=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0===
f(this).data("owl-init"))return!1;f(this).data("owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"owlCarousel",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,
responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document);
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
/*! WOW - v1.0.2 - 2014-12-29
* Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
jQuery(document).ready(function($){
//set animation timing
var animationDelay = 2500,
//loading bar effect
barAnimationDelay = 3800,
barWaiting = barAnimationDelay - 3000, //3000 is the duration of the transition on the loading bar - set in the scss/css file
//letters effect
lettersDelay = 50,
//type effect
typeLettersDelay = 150,
selectionDuration = 500,
typeAnimationDelay = selectionDuration + 800,
//clip effect
revealDuration = 600,
revealAnimationDelay = 1500;
initHeadline();
function initHeadline() {
//insert <i> element for each letter of a changing word
singleLetters($('.cd-headline.letters').find('b'));
//initialise headline animation
animateHeadline($('.cd-headline'));
}
function singleLetters($words) {
$words.each(function(){
var word = $(this),
letters = word.text().split(''),
selected = word.hasClass('is-visible');
for (i in letters) {
if(word.parents('.rotate-2').length > 0) letters[i] = '<em>' + letters[i] + '</em>';
letters[i] = (selected) ? '<i class="in">' + letters[i] + '</i>': '<i>' + letters[i] + '</i>';
}
var newLetters = letters.join('');
word.html(newLetters).css('opacity', 1);
});
}
function animateHeadline($headlines) {
var duration = animationDelay;
$headlines.each(function(){
var headline = $(this);
if(headline.hasClass('loading-bar')) {
duration = barAnimationDelay;
setTimeout(function(){ headline.find('.cd-words-wrapper').addClass('is-loading') }, barWaiting);
} else if (headline.hasClass('clip')){
var spanWrapper = headline.find('.cd-words-wrapper'),
newWidth = spanWrapper.width() + 10
spanWrapper.css('width', newWidth);
} else if (!headline.hasClass('type') ) {
//assign to .cd-words-wrapper the width of its longest word
var words = headline.find('.cd-words-wrapper b'),
width = 0;
words.each(function(){
var wordWidth = $(this).width();
if (wordWidth > width) width = wordWidth;
});
headline.find('.cd-words-wrapper').css('width', width);
};
//trigger animation
setTimeout(function(){ hideWord( headline.find('.is-visible').eq(0) ) }, duration);
});
}
function hideWord($word) {
var nextWord = takeNext($word);
if($word.parents('.cd-headline').hasClass('type')) {
var parentSpan = $word.parent('.cd-words-wrapper');
parentSpan.addClass('selected').removeClass('waiting');
setTimeout(function(){
parentSpan.removeClass('selected');
$word.removeClass('is-visible').addClass('is-hidden').children('i').removeClass('in').addClass('out');
}, selectionDuration);
setTimeout(function(){ showWord(nextWord, typeLettersDelay) }, typeAnimationDelay);
} else if($word.parents('.cd-headline').hasClass('letters')) {
var bool = ($word.children('i').length >= nextWord.children('i').length) ? true : false;
hideLetter($word.find('i').eq(0), $word, bool, lettersDelay);
showLetter(nextWord.find('i').eq(0), nextWord, bool, lettersDelay);
} else if($word.parents('.cd-headline').hasClass('clip')) {
$word.parents('.cd-words-wrapper').animate({ width : '2px' }, revealDuration, function(){
switchWord($word, nextWord);
showWord(nextWord);
});
} else if ($word.parents('.cd-headline').hasClass('loading-bar')){
$word.parents('.cd-words-wrapper').removeClass('is-loading');
switchWord($word, nextWord);
setTimeout(function(){ hideWord(nextWord) }, barAnimationDelay);
setTimeout(function(){ $word.parents('.cd-words-wrapper').addClass('is-loading') }, barWaiting);
} else {
switchWord($word, nextWord);
setTimeout(function(){ hideWord(nextWord) }, animationDelay);
}
}
function showWord($word, $duration) {
if($word.parents('.cd-headline').hasClass('type')) {
showLetter($word.find('i').eq(0), $word, false, $duration);
$word.addClass('is-visible').removeClass('is-hidden');
} else if($word.parents('.cd-headline').hasClass('clip')) {
$word.parents('.cd-words-wrapper').animate({ 'width' : $word.width() + 10 }, revealDuration, function(){
setTimeout(function(){ hideWord($word) }, revealAnimationDelay);
});
}
}
function hideLetter($letter, $word, $bool, $duration) {
$letter.removeClass('in').addClass('out');
if(!$letter.is(':last-child')) {
setTimeout(function(){ hideLetter($letter.next(), $word, $bool, $duration); }, $duration);
} else if($bool) {
setTimeout(function(){ hideWord(takeNext($word)) }, animationDelay);
}
if($letter.is(':last-child') && $('html').hasClass('no-csstransitions')) {
var nextWord = takeNext($word);
switchWord($word, nextWord);
}
}
function showLetter($letter, $word, $bool, $duration) {
$letter.addClass('in').removeClass('out');
if(!$letter.is(':last-child')) {
setTimeout(function(){ showLetter($letter.next(), $word, $bool, $duration); }, $duration);
} else {
if($word.parents('.cd-headline').hasClass('type')) { setTimeout(function(){ $word.parents('.cd-words-wrapper').addClass('waiting'); }, 200);}
if(!$bool) { setTimeout(function(){ hideWord($word) }, animationDelay) }
}
}
function takeNext($word) {
return (!$word.is(':last-child')) ? $word.next() : $word.parent().children().eq(0);
}
function takePrev($word) {
return (!$word.is(':first-child')) ? $word.prev() : $word.parent().children().last();
}
function switchWord($oldWord, $newWord) {
$oldWord.removeClass('is-visible').addClass('is-hidden');
$newWord.removeClass('is-hidden').addClass('is-visible');
}
});
/*!
* fancyBox - jQuery Plugin
* version: 2.1.5 (Fri, 14 Jun 2013)
* @requires jQuery v1.6 or later
*
* Examples at http://fancyapps.com/fancybox/
* License: www.fancyapps.com/fancybox/#license
*
* Copyright 2012 Janis Skarnelis - janis@fancyapps.com
*
*/
(function (window, document, $, undefined) {
"use strict";
var H = $("html"),
W = $(window),
D = $(document),
F = $.fancybox = function () {
F.open.apply( this, arguments );
},
IE = navigator.userAgent.match(/msie/i),
didUpdate = null,
isTouch = document.createTouch !== undefined,
isQuery = function(obj) {
return obj && obj.hasOwnProperty && obj instanceof $;
},
isString = function(str) {
return str && $.type(str) === "string";
},
isPercentage = function(str) {
return isString(str) && str.indexOf('%') > 0;
},
isScrollable = function(el) {
return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)));
},
getScalar = function(orig, dim) {
var value = parseInt(orig, 10) || 0;
if (dim && isPercentage(orig)) {
value = F.getViewport()[ dim ] / 100 * value;
}
return Math.ceil(value);
},
getValue = function(value, dim) {
return getScalar(value, dim) + 'px';
};
$.extend(F, {
// The current version of fancyBox
version: '2.1.5',
defaults: {
padding : 15,
margin : 20,
width : 800,
height : 600,
minWidth : 100,
minHeight : 100,
maxWidth : 9999,
maxHeight : 9999,
pixelRatio: 1, // Set to 2 for retina display support
autoSize : true,
autoHeight : false,
autoWidth : false,
autoResize : true,
autoCenter : !isTouch,
fitToView : true,
aspectRatio : false,
topRatio : 0.5,
leftRatio : 0.5,
scrolling : 'auto', // 'auto', 'yes' or 'no'
wrapCSS : '',
arrows : true,
closeBtn : true,
closeClick : false,
nextClick : false,
mouseWheel : true,
autoPlay : false,
playSpeed : 3000,
preload : 3,
modal : false,
loop : true,
ajax : {
dataType : 'html',
headers : { 'X-fancyBox': true }
},
iframe : {
scrolling : 'auto',
preload : true
},
swf : {
wmode: 'transparent',
allowfullscreen : 'true',
allowscriptaccess : 'always'
},
keys : {
next : {
13 : 'left', // enter
34 : 'up', // page down
39 : 'left', // right arrow
40 : 'up' // down arrow
},
prev : {
8 : 'right', // backspace
33 : 'down', // page up
37 : 'right', // left arrow
38 : 'down' // up arrow
},
close : [27], // escape key
play : [32], // space - start/stop slideshow
toggle : [70] // letter "f" - toggle fullscreen
},
direction : {
next : 'left',
prev : 'right'
},
scrollOutside : true,
// Override some properties
index : 0,
type : null,
href : null,
content : null,
title : null,
// HTML templates
tpl: {
wrap : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
image : '<img class="fancybox-image" src="{href}" alt="" />',
iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>',
error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
},
// Properties for each animation type
// Opening fancyBox
openEffect : 'fade', // 'elastic', 'fade' or 'none'
openSpeed : 250,
openEasing : 'swing',
openOpacity : true,
openMethod : 'zoomIn',
// Closing fancyBox
closeEffect : 'fade', // 'elastic', 'fade' or 'none'
closeSpeed : 250,
closeEasing : 'swing',
closeOpacity : true,
closeMethod : 'zoomOut',
// Changing next gallery item
nextEffect : 'elastic', // 'elastic', 'fade' or 'none'
nextSpeed : 250,
nextEasing : 'swing',
nextMethod : 'changeIn',
// Changing previous gallery item
prevEffect : 'elastic', // 'elastic', 'fade' or 'none'
prevSpeed : 250,
prevEasing : 'swing',
prevMethod : 'changeOut',
// Enable default helpers
helpers : {
overlay : true,
title : true
},
// Callbacks
onCancel : $.noop, // If canceling
beforeLoad : $.noop, // Before loading
afterLoad : $.noop, // After loading
beforeShow : $.noop, // Before changing in current item
afterShow : $.noop, // After opening
beforeChange : $.noop, // Before changing gallery item
beforeClose : $.noop, // Before closing
afterClose : $.noop // After closing
},
//Current state
group : {}, // Selected group
opts : {}, // Group options
previous : null, // Previous element
coming : null, // Element being loaded
current : null, // Currently loaded element
isActive : false, // Is activated
isOpen : false, // Is currently open
isOpened : false, // Have been fully opened at least once
wrap : null,
skin : null,
outer : null,
inner : null,
player : {
timer : null,
isActive : false
},
// Loaders
ajaxLoad : null,
imgPreload : null,
// Some collections
transitions : {},
helpers : {},
/*
* Static methods
*/
open: function (group, opts) {
if (!group) {
return;
}
if (!$.isPlainObject(opts)) {
opts = {};
}
// Close if already active
if (false === F.close(true)) {
return;
}
// Normalize group
if (!$.isArray(group)) {
group = isQuery(group) ? $(group).get() : [group];
}
// Recheck if the type of each element is `object` and set content type (image, ajax, etc)
$.each(group, function(i, element) {
var obj = {},
href,
title,
content,
type,
rez,
hrefParts,
selector;
if ($.type(element) === "object") {
// Check if is DOM element
if (element.nodeType) {
element = $(element);
}
if (isQuery(element)) {
obj = {
href : element.data('fancybox-href') || element.attr('href'),
title : element.data('fancybox-title') || element.attr('title'),
isDom : true,
element : element
};
if ($.metadata) {
$.extend(true, obj, element.metadata());
}
} else {
obj = element;
}
}
href = opts.href || obj.href || (isString(element) ? element : null);
title = opts.title !== undefined ? opts.title : obj.title || '';
content = opts.content || obj.content;
type = content ? 'html' : (opts.type || obj.type);
if (!type && obj.isDom) {
type = element.data('fancybox-type');
if (!type) {
rez = element.prop('class').match(/fancybox\.(\w+)/);
type = rez ? rez[1] : null;
}
}
if (isString(href)) {
// Try to guess the content type
if (!type) {
if (F.isImage(href)) {
type = 'image';
} else if (F.isSWF(href)) {
type = 'swf';
} else if (href.charAt(0) === '#') {
type = 'inline';
} else if (isString(element)) {
type = 'html';
content = element;
}
}
// Split url into two pieces with source url and content selector, e.g,
// "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id"
if (type === 'ajax') {
hrefParts = href.split(/\s+/, 2);
href = hrefParts.shift();
selector = hrefParts.shift();
}
}
if (!content) {
if (type === 'inline') {
if (href) {
content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7
} else if (obj.isDom) {
content = element;
}
} else if (type === 'html') {
content = href;
} else if (!type && !href && obj.isDom) {
type = 'inline';
content = element;
}
}
$.extend(obj, {
href : href,
type : type,
content : content,
title : title,
selector : selector
});
group[ i ] = obj;
});
// Extend the defaults
F.opts = $.extend(true, {}, F.defaults, opts);
// All options are merged recursive except keys
if (opts.keys !== undefined) {
F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false;
}
F.group = group;
return F._start(F.opts.index);
},
// Cancel image loading or abort ajax request
cancel: function () {
var coming = F.coming;
if (!coming || false === F.trigger('onCancel')) {
return;
}
F.hideLoading();
if (F.ajaxLoad) {
F.ajaxLoad.abort();
}
F.ajaxLoad = null;
if (F.imgPreload) {
F.imgPreload.onload = F.imgPreload.onerror = null;
}
if (coming.wrap) {
coming.wrap.stop(true, true).trigger('onReset').remove();
}
F.coming = null;
// If the first item has been canceled, then clear everything
if (!F.current) {
F._afterZoomOut( coming );
}
},
// Start closing animation if is open; remove immediately if opening/closing
close: function (event) {
F.cancel();
if (false === F.trigger('beforeClose')) {
return;
}
F.unbindEvents();
if (!F.isActive) {
return;
}
if (!F.isOpen || event === true) {
$('.fancybox-wrap').stop(true).trigger('onReset').remove();
F._afterZoomOut();
} else {
F.isOpen = F.isOpened = false;
F.isClosing = true;
$('.fancybox-item, .fancybox-nav').remove();
F.wrap.stop(true, true).removeClass('fancybox-opened');
F.transitions[ F.current.closeMethod ]();
}
},
// Manage slideshow:
// $.fancybox.play(); - toggle slideshow
// $.fancybox.play( true ); - start
// $.fancybox.play( false ); - stop
play: function ( action ) {
var clear = function () {
clearTimeout(F.player.timer);
},
set = function () {
clear();
if (F.current && F.player.isActive) {
F.player.timer = setTimeout(F.next, F.current.playSpeed);
}
},
stop = function () {
clear();
D.unbind('.player');
F.player.isActive = false;
F.trigger('onPlayEnd');
},
start = function () {
if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
F.player.isActive = true;
D.bind({
'onCancel.player beforeClose.player' : stop,
'onUpdate.player' : set,
'beforeLoad.player' : clear
});
set();
F.trigger('onPlayStart');
}
};
if (action === true || (!F.player.isActive && action !== false)) {
start();
} else {
stop();
}
},
// Navigate to next gallery item
next: function ( direction ) {
var current = F.current;
if (current) {
if (!isString(direction)) {
direction = current.direction.next;
}
F.jumpto(current.index + 1, direction, 'next');
}
},
// Navigate to previous gallery item
prev: function ( direction ) {
var current = F.current;
if (current) {
if (!isString(direction)) {
direction = current.direction.prev;
}
F.jumpto(current.index - 1, direction, 'prev');
}
},
// Navigate to gallery item by index
jumpto: function ( index, direction, router ) {
var current = F.current;
if (!current) {
return;
}
index = getScalar(index);
F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ];
F.router = router || 'jumpto';
if (current.loop) {
if (index < 0) {
index = current.group.length + (index % current.group.length);
}
index = index % current.group.length;
}
if (current.group[ index ] !== undefined) {
F.cancel();
F._start(index);
}
},
// Center inside viewport and toggle position type to fixed or absolute if needed
reposition: function (e, onlyAbsolute) {
var current = F.current,
wrap = current ? current.wrap : null,
pos;
if (wrap) {
pos = F._getPosition(onlyAbsolute);
if (e && e.type === 'scroll') {
delete pos.position;
wrap.stop(true, true).animate(pos, 200);
} else {
wrap.css(pos);
current.pos = $.extend({}, current.dim, pos);
}
}
},
update: function (e) {
var type = (e && e.type),
anyway = !type || type === 'orientationchange';
if (anyway) {
clearTimeout(didUpdate);
didUpdate = null;
}
if (!F.isOpen || didUpdate) {
return;
}
didUpdate = setTimeout(function() {
var current = F.current;
if (!current || F.isClosing) {
return;
}
F.wrap.removeClass('fancybox-tmp');
if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) {
F._setDimension();
}
if (!(type === 'scroll' && current.canShrink)) {
F.reposition(e);
}
F.trigger('onUpdate');
didUpdate = null;
}, (anyway && !isTouch ? 0 : 300));
},
// Shrink content to fit inside viewport or restore if resized
toggle: function ( action ) {
if (F.isOpen) {
F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView;
// Help browser to restore document dimensions
if (isTouch) {
F.wrap.removeAttr('style').addClass('fancybox-tmp');
F.trigger('onUpdate');
}
F.update();
}
},
hideLoading: function () {
D.unbind('.loading');
$('#fancybox-loading').remove();
},
showLoading: function () {
var el, viewport;
F.hideLoading();
el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');
// If user will press the escape-button, the request will be canceled
D.bind('keydown.loading', function(e) {
if ((e.which || e.keyCode) === 27) {
e.preventDefault();
F.cancel();
}
});
if (!F.defaults.fixed) {
viewport = F.getViewport();
el.css({
position : 'absolute',
top : (viewport.h * 0.5) + viewport.y,
left : (viewport.w * 0.5) + viewport.x
});
}
},
getViewport: function () {
var locked = (F.current && F.current.locked) || false,
rez = {
x: W.scrollLeft(),
y: W.scrollTop()
};
if (locked) {
rez.w = locked[0].clientWidth;
rez.h = locked[0].clientHeight;
} else {
// See http://bugs.jquery.com/ticket/6724
rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width();
rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height();
}
return rez;
},
// Unbind the keyboard / clicking actions
unbindEvents: function () {
if (F.wrap && isQuery(F.wrap)) {
F.wrap.unbind('.fb');
}
D.unbind('.fb');
W.unbind('.fb');
},
bindEvents: function () {
var current = F.current,
keys;
if (!current) {
return;
}
// Changing document height on iOS devices triggers a 'resize' event,
// that can change document height... repeating infinitely
W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update);
keys = current.keys;
if (keys) {
D.bind('keydown.fb', function (e) {
var code = e.which || e.keyCode,
target = e.target || e.srcElement;
// Skip esc key if loading, because showLoading will cancel preloading
if (code === 27 && F.coming) {
return false;
}
// Ignore key combinations and key events within form elements
if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) {
$.each(keys, function(i, val) {
if (current.group.length > 1 && val[ code ] !== undefined) {
F[ i ]( val[ code ] );
e.preventDefault();
return false;
}
if ($.inArray(code, val) > -1) {
F[ i ] ();
e.preventDefault();
return false;
}
});
}
});
}
if ($.fn.mousewheel && current.mouseWheel) {
F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) {
var target = e.target || null,
parent = $(target),
canScroll = false;
while (parent.length) {
if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) {
break;
}
canScroll = isScrollable( parent[0] );
parent = $(parent).parent();
}
if (delta !== 0 && !canScroll) {
if (F.group.length > 1 && !current.canShrink) {
if (deltaY > 0 || deltaX > 0) {
F.prev( deltaY > 0 ? 'down' : 'left' );
} else if (deltaY < 0 || deltaX < 0) {
F.next( deltaY < 0 ? 'up' : 'right' );
}
e.preventDefault();
}
}
});
}
},
trigger: function (event, o) {
var ret, obj = o || F.coming || F.current;
if (!obj) {
return;
}
if ($.isFunction( obj[event] )) {
ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
}
if (ret === false) {
return false;
}
if (obj.helpers) {
$.each(obj.helpers, function (helper, opts) {
if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
}
});
}
D.trigger(event);
},
isImage: function (str) {
return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
},
isSWF: function (str) {
return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i);
},
_start: function (index) {
var coming = {},
obj,
href,
type,
margin,
padding;
index = getScalar( index );
obj = F.group[ index ] || null;
if (!obj) {
return false;
}
coming = $.extend(true, {}, F.opts, obj);
// Convert margin and padding properties to array - top, right, bottom, left
margin = coming.margin;
padding = coming.padding;
if ($.type(margin) === 'number') {
coming.margin = [margin, margin, margin, margin];
}
if ($.type(padding) === 'number') {
coming.padding = [padding, padding, padding, padding];
}
// 'modal' propery is just a shortcut
if (coming.modal) {
$.extend(true, coming, {
closeBtn : false,
closeClick : false,
nextClick : false,
arrows : false,
mouseWheel : false,
keys : null,
helpers: {
overlay : {
closeClick : false
}
}
});
}
// 'autoSize' property is a shortcut, too
if (coming.autoSize) {
coming.autoWidth = coming.autoHeight = true;
}
if (coming.width === 'auto') {
coming.autoWidth = true;
}
if (coming.height === 'auto') {
coming.autoHeight = true;
}
/*
* Add reference to the group, so it`s possible to access from callbacks, example:
* afterLoad : function() {
* this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
* }
*/
coming.group = F.group;
coming.index = index;
// Give a chance for callback or helpers to update coming item (type, title, etc)
F.coming = coming;
if (false === F.trigger('beforeLoad')) {
F.coming = null;
return;
}
type = coming.type;
href = coming.href;
if (!type) {
F.coming = null;
//If we can not determine content type then drop silently or display next/prev item if looping through gallery
if (F.current && F.router && F.router !== 'jumpto') {
F.current.index = index;
return F[ F.router ]( F.direction );
}
return false;
}
F.isActive = true;
if (type === 'image' || type === 'swf') {
coming.autoHeight = coming.autoWidth = false;
coming.scrolling = 'visible';
}
if (type === 'image') {
coming.aspectRatio = true;
}
if (type === 'iframe' && isTouch) {
coming.scrolling = 'scroll';
}
// Build the neccessary markup
coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' );
$.extend(coming, {
skin : $('.fancybox-skin', coming.wrap),
outer : $('.fancybox-outer', coming.wrap),
inner : $('.fancybox-inner', coming.wrap)
});
$.each(["Top", "Right", "Bottom", "Left"], function(i, v) {
coming.skin.css('padding' + v, getValue(coming.padding[ i ]));
});
F.trigger('onReady');
// Check before try to load; 'inline' and 'html' types need content, others - href
if (type === 'inline' || type === 'html') {
if (!coming.content || !coming.content.length) {
return F._error( 'content' );
}
} else if (!href) {
return F._error( 'href' );
}
if (type === 'image') {
F._loadImage();
} else if (type === 'ajax') {
F._loadAjax();
} else if (type === 'iframe') {
F._loadIframe();
} else {
F._afterLoad();
}
},
_error: function ( type ) {
$.extend(F.coming, {
type : 'html',
autoWidth : true,
autoHeight : true,
minWidth : 0,
minHeight : 0,
scrolling : 'no',
hasError : type,
content : F.coming.tpl.error
});
F._afterLoad();
},
_loadImage: function () {
// Reset preload image so it is later possible to check "complete" property
var img = F.imgPreload = new Image();
img.onload = function () {
this.onload = this.onerror = null;
F.coming.width = this.width / F.opts.pixelRatio;
F.coming.height = this.height / F.opts.pixelRatio;
F._afterLoad();
};
img.onerror = function () {
this.onload = this.onerror = null;
F._error( 'image' );
};
img.src = F.coming.href;
if (img.complete !== true) {
F.showLoading();
}
},
_loadAjax: function () {
var coming = F.coming;
F.showLoading();
F.ajaxLoad = $.ajax($.extend({}, coming.ajax, {
url: coming.href,
error: function (jqXHR, textStatus) {
if (F.coming && textStatus !== 'abort') {
F._error( 'ajax', jqXHR );
} else {
F.hideLoading();
}
},
success: function (data, textStatus) {
if (textStatus === 'success') {
coming.content = data;
F._afterLoad();
}
}
}));
},
_loadIframe: function() {
var coming = F.coming,
iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
.attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling)
.attr('src', coming.href);
// This helps IE
$(coming.wrap).bind('onReset', function () {
try {
$(this).find('iframe').hide().attr('src', '//about:blank').end().empty();
} catch (e) {}
});
if (coming.iframe.preload) {
F.showLoading();
iframe.one('load', function() {
$(this).data('ready', 1);
// iOS will lose scrolling if we resize
if (!isTouch) {
$(this).bind('load.fb', F.update);
}
// Without this trick:
// - iframe won't scroll on iOS devices
// - IE7 sometimes displays empty iframe
$(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();
F._afterLoad();
});
}
coming.content = iframe.appendTo( coming.inner );
if (!coming.iframe.preload) {
F._afterLoad();
}
},
_preloadImages: function() {
var group = F.group,
current = F.current,
len = group.length,
cnt = current.preload ? Math.min(current.preload, len - 1) : 0,
item,
i;
for (i = 1; i <= cnt; i += 1) {
item = group[ (current.index + i ) % len ];
if (item.type === 'image' && item.href) {
new Image().src = item.href;
}
}
},
_afterLoad: function () {
var coming = F.coming,
previous = F.current,
placeholder = 'fancybox-placeholder',
current,
content,
type,
scrolling,
href,
embed;
F.hideLoading();
if (!coming || F.isActive === false) {
return;
}
if (false === F.trigger('afterLoad', coming, previous)) {
coming.wrap.stop(true).trigger('onReset').remove();
F.coming = null;
return;
}
if (previous) {
F.trigger('beforeChange', previous);
previous.wrap.stop(true).removeClass('fancybox-opened')
.find('.fancybox-item, .fancybox-nav')
.remove();
}
F.unbindEvents();
current = coming;
content = coming.content;
type = coming.type;
scrolling = coming.scrolling;
$.extend(F, {
wrap : current.wrap,
skin : current.skin,
outer : current.outer,
inner : current.inner,
current : current,
previous : previous
});
href = current.href;
switch (type) {
case 'inline':
case 'ajax':
case 'html':
if (current.selector) {
content = $('<div>').html(content).find(current.selector);
} else if (isQuery(content)) {
if (!content.data(placeholder)) {
content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() );
}
content = content.show().detach();
current.wrap.bind('onReset', function () {
if ($(this).find(content).length) {
content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false);
}
});
}
break;
case 'image':
content = current.tpl.image.replace('{href}', href);
break;
case 'swf':
content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>';
embed = '';
$.each(current.swf, function(name, val) {
content += '<param name="' + name + '" value="' + val + '"></param>';
embed += ' ' + name + '="' + val + '"';
});
content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>';
break;
}
if (!(isQuery(content) && content.parent().is(current.inner))) {
current.inner.append( content );
}
// Give a chance for helpers or callbacks to update elements
F.trigger('beforeShow');
// Set scrolling before calculating dimensions
current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
// Set initial dimensions and start position
F._setDimension();
F.reposition();
F.isOpen = false;
F.coming = null;
F.bindEvents();
if (!F.isOpened) {
$('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove();
} else if (previous.prevMethod) {
F.transitions[ previous.prevMethod ]();
}
F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ]();
F._preloadImages();
},
_setDimension: function () {
var viewport = F.getViewport(),
steps = 0,
canShrink = false,
canExpand = false,
wrap = F.wrap,
skin = F.skin,
inner = F.inner,
current = F.current,
width = current.width,
height = current.height,
minWidth = current.minWidth,
minHeight = current.minHeight,
maxWidth = current.maxWidth,
maxHeight = current.maxHeight,
scrolling = current.scrolling,
scrollOut = current.scrollOutside ? current.scrollbarWidth : 0,
margin = current.margin,
wMargin = getScalar(margin[1] + margin[3]),
hMargin = getScalar(margin[0] + margin[2]),
wPadding,
hPadding,
wSpace,
hSpace,
origWidth,
origHeight,
origMaxWidth,
origMaxHeight,
ratio,
width_,
height_,
maxWidth_,
maxHeight_,
iframe,
body;
// Reset dimensions so we could re-check actual size
wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');
wPadding = getScalar(skin.outerWidth(true) - skin.width());
hPadding = getScalar(skin.outerHeight(true) - skin.height());
// Any space between content and viewport (margin, padding, border, title)
wSpace = wMargin + wPadding;
hSpace = hMargin + hPadding;
origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width;
origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height;
if (current.type === 'iframe') {
iframe = current.content;
if (current.autoHeight && iframe.data('ready') === 1) {
try {
if (iframe[0].contentWindow.document.location) {
inner.width( origWidth ).height(9999);
body = iframe.contents().find('body');
if (scrollOut) {
body.css('overflow-x', 'hidden');
}
origHeight = body.outerHeight(true);
}
} catch (e) {}
}
} else if (current.autoWidth || current.autoHeight) {
inner.addClass( 'fancybox-tmp' );
// Set width or height in case we need to calculate only one dimension
if (!current.autoWidth) {
inner.width( origWidth );
}
if (!current.autoHeight) {
inner.height( origHeight );
}
if (current.autoWidth) {
origWidth = inner.width();
}
if (current.autoHeight) {
origHeight = inner.height();
}
inner.removeClass( 'fancybox-tmp' );
}
width = getScalar( origWidth );
height = getScalar( origHeight );
ratio = origWidth / origHeight;
// Calculations for the content
minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth);
maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth);
minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight);
maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight);
// These will be used to determine if wrap can fit in the viewport
origMaxWidth = maxWidth;
origMaxHeight = maxHeight;
if (current.fitToView) {
maxWidth = Math.min(viewport.w - wSpace, maxWidth);
maxHeight = Math.min(viewport.h - hSpace, maxHeight);
}
maxWidth_ = viewport.w - wMargin;
maxHeight_ = viewport.h - hMargin;
if (current.aspectRatio) {
if (width > maxWidth) {
width = maxWidth;
height = getScalar(width / ratio);
}
if (height > maxHeight) {
height = maxHeight;
width = getScalar(height * ratio);
}
if (width < minWidth) {
width = minWidth;
height = getScalar(width / ratio);
}
if (height < minHeight) {
height = minHeight;
width = getScalar(height * ratio);
}
} else {
width = Math.max(minWidth, Math.min(width, maxWidth));
if (current.autoHeight && current.type !== 'iframe') {
inner.width( width );
height = inner.height();
}
height = Math.max(minHeight, Math.min(height, maxHeight));
}
// Try to fit inside viewport (including the title)
if (current.fitToView) {
inner.width( width ).height( height );
wrap.width( width + wPadding );
// Real wrap dimensions
width_ = wrap.width();
height_ = wrap.height();
if (current.aspectRatio) {
while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) {
if (steps++ > 19) {
break;
}
height = Math.max(minHeight, Math.min(maxHeight, height - 10));
width = getScalar(height * ratio);
if (width < minWidth) {
width = minWidth;
height = getScalar(width / ratio);
}
if (width > maxWidth) {
width = maxWidth;
height = getScalar(width / ratio);
}
inner.width( width ).height( height );
wrap.width( width + wPadding );
width_ = wrap.width();
height_ = wrap.height();
}
} else {
width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_)));
height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_)));
}
}
if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) {
width += scrollOut;
}
inner.width( width ).height( height );
wrap.width( width + wPadding );
width_ = wrap.width();
height_ = wrap.height();
canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight;
canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight));
$.extend(current, {
dim : {
width : getValue( width_ ),
height : getValue( height_ )
},
origWidth : origWidth,
origHeight : origHeight,
canShrink : canShrink,
canExpand : canExpand,
wPadding : wPadding,
hPadding : hPadding,
wrapSpace : height_ - skin.outerHeight(true),
skinSpace : skin.height() - height
});
if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) {
inner.height('auto');
}
},
_getPosition: function (onlyAbsolute) {
var current = F.current,
viewport = F.getViewport(),
margin = current.margin,
width = F.wrap.width() + margin[1] + margin[3],
height = F.wrap.height() + margin[0] + margin[2],
rez = {
position: 'absolute',
top : margin[0],
left : margin[3]
};
if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
rez.position = 'fixed';
} else if (!current.locked) {
rez.top += viewport.y;
rez.left += viewport.x;
}
rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio)));
rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio)));
return rez;
},
_afterZoomIn: function () {
var current = F.current;
if (!current) {
return;
}
F.isOpen = F.isOpened = true;
F.wrap.css('overflow', 'visible').addClass('fancybox-opened');
F.update();
// Assign a click event
if ( current.closeClick || (current.nextClick && F.group.length > 1) ) {
F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
e.preventDefault();
F[ current.closeClick ? 'close' : 'next' ]();
}
});
}
// Create a close button
if (current.closeBtn) {
$(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) {
e.preventDefault();
F.close();
});
}
// Create navigation arrows
if (current.arrows && F.group.length > 1) {
if (current.loop || current.index > 0) {
$(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
}
if (current.loop || current.index < F.group.length - 1) {
$(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
}
}
F.trigger('afterShow');
// Stop the slideshow if this is the last item
if (!current.loop && current.index === current.group.length - 1) {
F.play( false );
} else if (F.opts.autoPlay && !F.player.isActive) {
F.opts.autoPlay = false;
F.play();
}
},
_afterZoomOut: function ( obj ) {
obj = obj || F.current;
$('.fancybox-wrap').trigger('onReset').remove();
$.extend(F, {
group : {},
opts : {},
router : false,
current : null,
isActive : false,
isOpened : false,
isOpen : false,
isClosing : false,
wrap : null,
skin : null,
outer : null,
inner : null
});
F.trigger('afterClose', obj);
}
});
/*
* Default transitions
*/
F.transitions = {
getOrigPosition: function () {
var current = F.current,
element = current.element,
orig = current.orig,
pos = {},
width = 50,
height = 50,
hPadding = current.hPadding,
wPadding = current.wPadding,
viewport = F.getViewport();
if (!orig && current.isDom && element.is(':visible')) {
orig = element.find('img:first');
if (!orig.length) {
orig = element;
}
}
if (isQuery(orig)) {
pos = orig.offset();
if (orig.is('img')) {
width = orig.outerWidth();
height = orig.outerHeight();
}
} else {
pos.top = viewport.y + (viewport.h - height) * current.topRatio;
pos.left = viewport.x + (viewport.w - width) * current.leftRatio;
}
if (F.wrap.css('position') === 'fixed' || current.locked) {
pos.top -= viewport.y;
pos.left -= viewport.x;
}
pos = {
top : getValue(pos.top - hPadding * current.topRatio),
left : getValue(pos.left - wPadding * current.leftRatio),
width : getValue(width + wPadding),
height : getValue(height + hPadding)
};
return pos;
},
step: function (now, fx) {
var ratio,
padding,
value,
prop = fx.prop,
current = F.current,
wrapSpace = current.wrapSpace,
skinSpace = current.skinSpace;
if (prop === 'width' || prop === 'height') {
ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);
if (F.isClosing) {
ratio = 1 - ratio;
}
padding = prop === 'width' ? current.wPadding : current.hPadding;
value = now - padding;
F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) );
F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) );
}
},
zoomIn: function () {
var current = F.current,
startPos = current.pos,
effect = current.openEffect,
elastic = effect === 'elastic',
endPos = $.extend({opacity : 1}, startPos);
// Remove "position" property that breaks older IE
delete endPos.position;
if (elastic) {
startPos = this.getOrigPosition();
if (current.openOpacity) {
startPos.opacity = 0.1;
}
} else if (effect === 'fade') {
startPos.opacity = 0.1;
}
F.wrap.css(startPos).animate(endPos, {
duration : effect === 'none' ? 0 : current.openSpeed,
easing : current.openEasing,
step : elastic ? this.step : null,
complete : F._afterZoomIn
});
},
zoomOut: function () {
var current = F.current,
effect = current.closeEffect,
elastic = effect === 'elastic',
endPos = {opacity : 0.1};
if (elastic) {
endPos = this.getOrigPosition();
if (current.closeOpacity) {
endPos.opacity = 0.1;
}
}
F.wrap.animate(endPos, {
duration : effect === 'none' ? 0 : current.closeSpeed,
easing : current.closeEasing,
step : elastic ? this.step : null,
complete : F._afterZoomOut
});
},
changeIn: function () {
var current = F.current,
effect = current.nextEffect,
startPos = current.pos,
endPos = { opacity : 1 },
direction = F.direction,
distance = 200,
field;
startPos.opacity = 0.1;
if (effect === 'elastic') {
field = direction === 'down' || direction === 'up' ? 'top' : 'left';
if (direction === 'down' || direction === 'right') {
startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance);
endPos[ field ] = '+=' + distance + 'px';
} else {
startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance);
endPos[ field ] = '-=' + distance + 'px';
}
}
// Workaround for http://bugs.jquery.com/ticket/12273
if (effect === 'none') {
F._afterZoomIn();
} else {
F.wrap.css(startPos).animate(endPos, {
duration : current.nextSpeed,
easing : current.nextEasing,
complete : F._afterZoomIn
});
}
},
changeOut: function () {
var previous = F.previous,
effect = previous.prevEffect,
endPos = { opacity : 0.1 },
direction = F.direction,
distance = 200;
if (effect === 'elastic') {
endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px';
}
previous.wrap.animate(endPos, {
duration : effect === 'none' ? 0 : previous.prevSpeed,
easing : previous.prevEasing,
complete : function () {
$(this).trigger('onReset').remove();
}
});
}
};
/*
* Overlay helper
*/
F.helpers.overlay = {
defaults : {
closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay
speedOut : 200, // duration of fadeOut animation
showEarly : true, // indicates if should be opened immediately or wait until the content is ready
css : {}, // custom CSS properties
locked : !isTouch, // if true, the content will be locked into overlay
fixed : true // if false, the overlay CSS position property will not be set to "fixed"
},
overlay : null, // current handle
fixed : false, // indicates if the overlay has position "fixed"
el : $('html'), // element that contains "the lock"
// Public methods
create : function(opts) {
opts = $.extend({}, this.defaults, opts);
if (this.overlay) {
this.close();
}
this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent );
this.fixed = false;
if (opts.fixed && F.defaults.fixed) {
this.overlay.addClass('fancybox-overlay-fixed');
this.fixed = true;
}
},
open : function(opts) {
var that = this;
opts = $.extend({}, this.defaults, opts);
if (this.overlay) {
this.overlay.unbind('.overlay').width('auto').height('auto');
} else {
this.create(opts);
}
if (!this.fixed) {
W.bind('resize.overlay', $.proxy( this.update, this) );
this.update();
}
if (opts.closeClick) {
this.overlay.bind('click.overlay', function(e) {
if ($(e.target).hasClass('fancybox-overlay')) {
if (F.isActive) {
F.close();
} else {
that.close();
}
return false;
}
});
}
this.overlay.css( opts.css ).show();
},
close : function() {
var scrollV, scrollH;
W.unbind('resize.overlay');
if (this.el.hasClass('fancybox-lock')) {
$('.fancybox-margin').removeClass('fancybox-margin');
scrollV = W.scrollTop();
scrollH = W.scrollLeft();
this.el.removeClass('fancybox-lock');
W.scrollTop( scrollV ).scrollLeft( scrollH );
}
$('.fancybox-overlay').remove().hide();
$.extend(this, {
overlay : null,
fixed : false
});
},
// Private, callbacks
update : function () {
var width = '100%', offsetWidth;
// Reset width/height so it will not mess
this.overlay.width(width).height('100%');
// jQuery does not return reliable result for IE
if (IE) {
offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
if (D.width() > offsetWidth) {
width = D.width();
}
} else if (D.width() > W.width()) {
width = D.width();
}
this.overlay.width(width).height(D.height());
},
// This is where we can manipulate DOM, because later it would cause iframes to reload
onReady : function (opts, obj) {
var overlay = this.overlay;
$('.fancybox-overlay').stop(true, true);
if (!overlay) {
this.create(opts);
}
if (opts.locked && this.fixed && obj.fixed) {
if (!overlay) {
this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
}
obj.locked = this.overlay.append( obj.wrap );
obj.fixed = false;
}
if (opts.showEarly === true) {
this.beforeShow.apply(this, arguments);
}
},
beforeShow : function(opts, obj) {
var scrollV, scrollH;
if (obj.locked) {
if (this.margin !== false) {
$('*').filter(function(){
return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") );
}).addClass('fancybox-margin');
this.el.addClass('fancybox-margin');
}
scrollV = W.scrollTop();
scrollH = W.scrollLeft();
this.el.addClass('fancybox-lock');
W.scrollTop( scrollV ).scrollLeft( scrollH );
}
this.open(opts);
},
onUpdate : function() {
if (!this.fixed) {
this.update();
}
},
afterClose: function (opts) {
// Remove overlay if exists and fancyBox is not opening
// (e.g., it is not being open using afterClose callback)
//if (this.overlay && !F.isActive) {
if (this.overlay && !F.coming) {
this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));
}
}
};
/*
* Title helper
*/
F.helpers.title = {
defaults : {
type : 'float', // 'float', 'inside', 'outside' or 'over',
position : 'bottom' // 'top' or 'bottom'
},
beforeShow: function (opts) {
var current = F.current,
text = current.title,
type = opts.type,
title,
target;
if ($.isFunction(text)) {
text = text.call(current.element, current);
}
if (!isString(text) || $.trim(text) === '') {
return;
}
title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">' + text + '</div>');
switch (type) {
case 'inside':
target = F.skin;
break;
case 'outside':
target = F.wrap;
break;
case 'over':
target = F.inner;
break;
default: // 'float'
target = F.skin;
title.appendTo('body');
if (IE) {
title.width( title.width() );
}
title.wrapInner('<span class="child"></span>');
//Increase bottom margin so this title will also fit into viewport
F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) );
break;
}
title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target);
}
};
// jQuery plugin initialization
$.fn.fancybox = function (options) {
var index,
that = $(this),
selector = this.selector || '',
run = function(e) {
var what = $(this).blur(), idx = index, relType, relVal;
if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) {
relType = options.groupAttr || 'data-fancybox-group';
relVal = what.attr(relType);
if (!relVal) {
relType = 'rel';
relVal = what.get(0)[ relType ];
}
if (relVal && relVal !== '' && relVal !== 'nofollow') {
what = selector.length ? $(selector) : that;
what = what.filter('[' + relType + '="' + relVal + '"]');
idx = what.index(this);
}
options.index = idx;
// Stop an event from bubbling if everything is fine
if (F.open(what, options) !== false) {
e.preventDefault();
}
}
};
options = options || {};
index = options.index || 0;
if (!selector || options.live === false) {
that.unbind('click.fb-start').bind('click.fb-start', run);
} else {
D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run);
}
this.filter('[data-fancybox-start=1]').trigger('click');
return this;
};
// Tests that need a body at doc ready
D.ready(function() {
var w1, w2;
if ( $.scrollbarWidth === undefined ) {
// http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
$.scrollbarWidth = function() {
var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),
child = parent.children(),
width = child.innerWidth() - child.height( 99 ).innerWidth();
parent.remove();
return width;
};
}
if ( $.support.fixedPosition === undefined ) {
$.support.fixedPosition = (function() {
var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'),
fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 );
elem.remove();
return fixed;
}());
}
$.extend(F.defaults, {
scrollbarWidth : $.scrollbarWidth(),
fixed : $.support.fixedPosition,
parent : $('body')
});
//Get real width of page scroll-bar
w1 = $(window).width();
H.addClass('fancybox-lock-test');
w2 = $(window).width();
H.removeClass('fancybox-lock-test');
$("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head");
});
}(window, document, jQuery));
(function($){
$.fn.scrollingTo = function( opts ) {
var defaults = {
animationTime : 1000,
easing : '',
callbackBeforeTransition : function(){},
callbackAfterTransition : function(){}
};
var config = $.extend( {}, defaults, opts );
$(this).click(function(e){
var eventVal = e;
e.preventDefault();
var $section = $(document).find( $(this).data('section') );
if ( $section.length < 1 ) {
return false;
};
if ( $('html, body').is(':animated') ) {
$('html, body').stop( true, true );
};
var scrollPos = $section.offset().top;
if ( $(window).scrollTop() == scrollPos ) {
return false;
};
config.callbackBeforeTransition(eventVal, $section);
$('html, body').animate({
'scrollTop' : (scrollPos+'px' )
}, config.animationTime, config.easing, function(){
config.callbackAfterTransition(eventVal, $section);
});
});
};
}(jQuery));
jQuery(document).ready(function(){
"use strict";
new WOW().init();
(function(){
jQuery('.smooth-scroll').scrollingTo();
}());
});
$(document).ready(function(){
$(window).scroll(function () {
if ($(window).scrollTop() > 50) {
$(".navbar-brand a").css("color","#fff");
$("#top-bar").removeClass("animated-header");
} else {
$(".navbar-brand a").css("color","inherit");
$("#top-bar").addClass("animated-header");
}
});
$("#clients-logo").owlCarousel({
itemsCustom : false,
pagination : false,
items : 5,
autoplay: true,
})
});
// fancybox
$(".fancybox").fancybox({
padding: 0,
openEffect : 'elastic',
openSpeed : 450,
closeEffect : 'elastic',
closeSpeed : 350,
closeClick : true,
helpers : {
title : {
type: 'inside'
},
overlay : {
css : {
'background' : 'rgba(0,0,0,0.8)'
}
}
}
});
| 98.593816 | 32,072 | 0.657221 |
68d55bcb08a94514cb217969f55159c2ef8bd468 | 5,835 | js | JavaScript | public/app/partials/menu/menu.js | mikiec84/badger | 728ccf911a26e99c808b029ba2245c0f16293de0 | [
"MIT"
] | 17 | 2015-10-28T09:12:36.000Z | 2020-07-27T11:34:49.000Z | public/app/partials/menu/menu.js | mikiec84/badger | 728ccf911a26e99c808b029ba2245c0f16293de0 | [
"MIT"
] | 2 | 2016-02-12T12:24:12.000Z | 2018-08-02T07:57:54.000Z | public/app/partials/menu/menu.js | mikiec84/badger | 728ccf911a26e99c808b029ba2245c0f16293de0 | [
"MIT"
] | 3 | 2015-12-10T06:51:02.000Z | 2019-04-12T00:59:04.000Z | 'use strict';
app.controller('Menu', ['$rootScope', '$routeParams','$scope', '$location', '$window', 'Project', 'TestPlan', 'Auth', 'isSafari','$q',
function ($rootScope, $routeParams, $scope, $location, $window, Project, TestPlan, Auth, isSafari, $q) {
$scope.isSafari = isSafari;
$scope.jira = JIRA_INTEGRATION;
$scope.xmasTree = showXmasTree();
//hide menu if hideMenu=true
var scope = $routeParams;
$scope.$watch(function (){return scope.hideMenu;}, function (value) {
if(value) {
$("body").css("padding-top", "0px");
} else {
$("body").css("padding-top", "50px");
}
$scope.hideMenu = !!value;
});
$scope.activeProject = null;
$scope.activeProjectId = null;
$scope.logout = function () {
Auth.api.logout(function () {
$rootScope.profile = null;
}, function (result) {
console.info(result);
});
};
$rootScope.getProfile = function() {
var deferred = $q.defer();
if (typeof $rootScope.profile === 'undefined') {
Auth.api.get_current(function (result) {
$rootScope.profile = result;
if ($rootScope.profile.settings.default_project !== null && $location.path() === '/dashboard') {
$location.path('/dashboard/' + $rootScope.profile.settings.default_project);
}
deferred.resolve(result);
}, function () {
$rootScope.profile = null;
deferred.resolve($rootScope.profile);
});
} else {
deferred.resolve($rootScope.profile);
}
return deferred.promise;
};
$scope.getProjectById = function(id) {
var deferred = $q.defer();
Project.query({projectId: id}, function (result) {
deferred.resolve(result);
}, function (result) {
$rootScope.api_path = API_PATH;
deferred.reject(result);
});
return deferred.promise;
};
$rootScope.getProjects = function() {
var deferred = $q.defer();
Project.query(function (result) {
deferred.resolve(result.results);
}, function (result) {
$rootScope.api_path = API_PATH;
deferred.reject(result);
});
return deferred.promise;
};
$rootScope.getProfile();
$rootScope.reloadProjects = function () {
$rootScope.getProjects().then(function(projects) {
$rootScope.projects = projects;
_.each($rootScope.projects, function(project) {
_.each(project.settings, function(setting) {
project[setting.key] = setting.value;
});
});
TestPlan.custom_list({
page_size: 1000,
projectsIds: _.map($rootScope.projects, function (item) { return item.id})
}, function (result) {
_.each($rootScope.projects, function (project) {
project.testplans = _.filter(result.results, function (testplan) { return testplan.project === project.id });
project.testplans = _.sortBy(project.testplans, 'name');
});
});
});
};
$rootScope.reloadProjects();
$scope.$watch('projects', function () {
$scope.activeProject = $scope.findProjectById($scope.activeProjectId);
});
$scope.$watch('activeProjectId', function () {
$scope.activeProject = $scope.findProjectById($scope.activeProjectId);
});
$rootScope.findProjectById = function (id) {
var data = _.filter($rootScope.projects, function (project) { return project.id === parseInt(id)});
return data[0];
};
$rootScope.selectProject = function (id) {
id = (typeof id === 'undefined') ? null : id;
if (id !== $scope.activeProjectId) {
$scope.activeProjectId = id;
}
};
$rootScope.getActiveProject = function() {
return $scope.activeProjectId;
};
$rootScope.getProjectSettings = function(id, setting_name) {
return $scope.getProjectById(id).then(function(project) {
if (setting_name === '') {
return project.settings;
}
var res = _.filter(project.settings, function (item) {
return item.key && item.key === setting_name;
});
if (res.length === 1) {
return res[0].value;
}
return 0;
});
};
$scope.login = function () {
$rootScope.originLoginPath = $location.path();
$location.path('/auth/login/');
};
function showXmasTree() {
var today = new Date();
var year = today.getFullYear();
var startDate = new Date(year, 11, 15);
var finishDate = new Date(year, 0, 15);
if ((today > startDate && today > finishDate) ||
(today < startDate && today < finishDate)) {
return true;
}
return false;
}
$rootScope.redirect = function(evt, url) {
(evt.button === 1 || evt.ctrlKey === true) ?
$window.open('#' + url, '_blank') : $location.path(url);
};
}
]);
| 35.150602 | 134 | 0.487061 |
68d7ecec99baa5fe6851c67993cbdd41e40a2468 | 694 | js | JavaScript | challenges/hardcore-functional-programming-in-javascript/01-currying/currying.js | jdnierth/javascript-coding-tests | 3dbb6016c6083b5908f2d5252251705a6cf08380 | [
"Apache-2.0"
] | null | null | null | challenges/hardcore-functional-programming-in-javascript/01-currying/currying.js | jdnierth/javascript-coding-tests | 3dbb6016c6083b5908f2d5252251705a6cf08380 | [
"Apache-2.0"
] | 5 | 2019-12-28T13:02:49.000Z | 2021-09-01T05:53:33.000Z | challenges/hardcore-functional-programming-in-javascript/01-currying/currying.js | jdnierth/javascript-coding-tests | 3dbb6016c6083b5908f2d5252251705a6cf08380 | [
"Apache-2.0"
] | null | null | null | /**
* SOME DESCRIPTION
*
* @author: Jessica Nierth
* @date: 26.03.2019
*/
function curry(fn) {
return function () {
if (fn.length > arguments.length) {
// Remember the given arguments and save them for later
var slice = Array.prototype.slice;
var args = slice.apply(arguments);
return function () {
return fn.apply(null, args.concat(slice.apply(arguments)));
}
} else {
// If you got all the arguments you've needed, execute and return the value
return fn.apply(null, arguments);
}
}
}
function add(a,b,c){
return a + b + c;
}
curry(add(2)(3)(4)); | 22.387097 | 87 | 0.54611 |
68d80214db7a38827a1197be6522a2544c63f72d | 215 | js | JavaScript | app/screens/index.js | victor6152/eJuiceCalc | 82a67aded2384069d33edee1de96d821ffe00b1f | [
"MIT"
] | 3 | 2019-01-08T13:38:51.000Z | 2019-04-20T14:44:02.000Z | app/screens/index.js | victor6152/eJuiceCalc | 82a67aded2384069d33edee1de96d821ffe00b1f | [
"MIT"
] | null | null | null | app/screens/index.js | victor6152/eJuiceCalc | 82a67aded2384069d33edee1de96d821ffe00b1f | [
"MIT"
] | null | null | null | export * from './navigation';
export * from './other';
export * from './social';
export * from './articles';
export * from './login';
export * from './theme';
export * from './calculators';
export * from './recipe'; | 26.875 | 30 | 0.632558 |
68d808c5486fe59fd574cc0db48e1193db7d7c1d | 1,021 | js | JavaScript | src/extended-repeater.js | Adam0091/basic-js | f7f9308b7d03938dedaf4cd75ccb121559b0cdae | [
"MIT"
] | null | null | null | src/extended-repeater.js | Adam0091/basic-js | f7f9308b7d03938dedaf4cd75ccb121559b0cdae | [
"MIT"
] | null | null | null | src/extended-repeater.js | Adam0091/basic-js | f7f9308b7d03938dedaf4cd75ccb121559b0cdae | [
"MIT"
] | null | null | null | const CustomError = require("../extensions/custom-error");
module.exports = function repeater( str, options) {
if(typeof(options.repeatTimes) !== 'number' || options.repeatTimes % 1 !== 0) options.repeatTimes = 1;
if(typeof(options.additionRepeatTimes) !== 'number' || options.additionRepeatTimes % 1 !== 0) options.additionRepeatTimes = 1;
if(!options.separator) options.separator = '+';
if(!options.additionSeparator) options.additionSeparator = '|';
let resultStr = '';
str = String(str);
if(!!options.addition){
options.addition = String(options.addition);
}
for(let i = 0; i < options.repeatTimes; i++){
resultStr += str;
for(let j = 0 ; j < options.additionRepeatTimes; j++){
if(typeof(options.addition) !== 'undefined') resultStr += options.addition;
if(j !== options.additionRepeatTimes - 1){
resultStr += options.additionSeparator;
}
}
if(i !== options.repeatTimes - 1){
resultStr += options.separator;
}
}
return resultStr
};
| 34.033333 | 128 | 0.653281 |
68d864df25d025d13bbd20796a04df106612fc31 | 265 | js | JavaScript | public/assets/js/demo1/pages/custom/apps/contacts/list-columns.min.js | kithinjiDennis/IMC | 76cec60516ac37b11a4a85023d15e3ed0bb69830 | [
"MIT"
] | 3 | 2020-04-22T15:51:08.000Z | 2022-02-22T15:22:49.000Z | public/assets/js/demo1/pages/custom/apps/contacts/list-columns.min.js | kithinjiDennis/IMC | 76cec60516ac37b11a4a85023d15e3ed0bb69830 | [
"MIT"
] | 13 | 2020-03-24T18:49:24.000Z | 2022-02-18T23:30:25.000Z | public/assets/js/demo1/pages/custom/apps/contacts/list-columns.min.js | kithinjiDennis/IMC | 76cec60516ac37b11a4a85023d15e3ed0bb69830 | [
"MIT"
] | 2 | 2020-07-06T04:44:10.000Z | 2020-07-06T05:51:19.000Z | "use strict";var KTAppContactsListColumns={init:function(){new KTOffcanvas("kt_contact_aside",{overlay:!0,baseClass:"kt-app__aside",closeBy:"kt_contact_aside_close",toggleBy:"kt_subheader_mobile_toggle"})}};KTUtil.ready(function(){KTAppContactsListColumns.init()}); | 265 | 265 | 0.818868 |
68d864fce201887b61a18fc4610a75a40ab81d59 | 505 | js | JavaScript | packages/app/src/collection/getMethods/findOneAndUpdate.test.js | raicp/orionjs | 984f9be7d30d53e7e4855efae06683e3e4575151 | [
"MIT"
] | 47 | 2018-06-06T04:38:26.000Z | 2022-03-11T04:25:12.000Z | packages/app/src/collection/getMethods/findOneAndUpdate.test.js | raicp/orionjs | 984f9be7d30d53e7e4855efae06683e3e4575151 | [
"MIT"
] | 176 | 2018-09-07T18:46:52.000Z | 2022-03-31T23:15:23.000Z | packages/app/src/collection/getMethods/findOneAndUpdate.test.js | raicp/orionjs | 984f9be7d30d53e7e4855efae06683e3e4575151 | [
"MIT"
] | 33 | 2018-08-17T15:29:06.000Z | 2022-03-22T15:51:47.000Z | import Collection from '../index'
import generateId from '../../helpers/generateId'
it('updates a document without errors', async () => {
const Tests = await new Collection({name: generateId()}).await()
const docId = await Tests.insert({hello: 'world'})
const result = await Tests.findOneAndUpdate(
docId,
{$set: {hello: 'country'}},
{returnOriginal: false}
)
expect(result.hello).toBe('country')
const final = await Tests.findOne(docId)
expect(final.hello).toBe('country')
})
| 29.705882 | 66 | 0.681188 |
68d8819041f9b1babfb6d05efe1bdc7d95bc45a2 | 68 | js | JavaScript | src/visualization/colors.js | apvilkko/retrowave-generator | f0f7f22fa8e81d9aedc23966425989d7135df01d | [
"MIT"
] | 10 | 2018-11-04T15:20:23.000Z | 2021-05-16T16:50:15.000Z | src/visualization/colors.js | apvilkko/retrowave-generator | f0f7f22fa8e81d9aedc23966425989d7135df01d | [
"MIT"
] | null | null | null | src/visualization/colors.js | apvilkko/retrowave-generator | f0f7f22fa8e81d9aedc23966425989d7135df01d | [
"MIT"
] | 1 | 2020-08-12T09:13:59.000Z | 2020-08-12T09:13:59.000Z | export default {
PINK_LIGHT: '#fdb5e3',
PINK_DARK: '#fe07d4',
}
| 13.6 | 24 | 0.647059 |
68da2306f5bcaab2ae20470050fcb8c8c22462bb | 876 | js | JavaScript | docs/index.js | 7flash/parasol | 88d688e82b917d015995bd5788680cd15a4a2f2c | [
"MIT"
] | 66 | 2018-09-05T22:59:36.000Z | 2022-03-20T19:59:36.000Z | docs/index.js | 7flash/parasol | 88d688e82b917d015995bd5788680cd15a4a2f2c | [
"MIT"
] | 14 | 2018-10-08T17:47:30.000Z | 2020-06-18T14:07:35.000Z | docs/index.js | 7flash/parasol | 88d688e82b917d015995bd5788680cd15a4a2f2c | [
"MIT"
] | 10 | 2018-09-07T01:02:46.000Z | 2022-02-07T18:09:50.000Z | var Handlebars = require('handlebars');
var template = require('./template.js');
var fs = require('fs')
module.exports = function(contracts){
for (var contract in contracts) {
contracts[contract].source = Object.keys(contracts[contract].sources)[0]
for (var func in contracts[contract].output.abi) {
for (var dd in contracts[contract].output.devdoc.methods) {
if(dd.startsWith(contracts[contract].output.abi[func].name)){
contracts[contract].output.abi[func].devdoc = contracts[contract].output.devdoc.methods[dd]
}
}
}
}
//console.log(JSON.stringify(contracts[0].output.abi, null, 2))
var templ = Handlebars.compile(template);
var output = templ({contracts});
fs.writeFileSync(process.cwd() + '/docs/README.md',output,{encoding:'utf8',flag:'w'})
} | 43.8 | 111 | 0.63242 |
68da5860402e02b2e5954ca14255d024f31c8eef | 2,283 | js | JavaScript | src/components/header/newSiteAlert.js | fu4303/portfolio-bholmes-v2 | 94cda2c677db13782f20920fe1a319a91517f938 | [
"MIT"
] | 2 | 2019-05-19T00:56:14.000Z | 2019-05-19T09:43:38.000Z | src/components/header/newSiteAlert.js | fu4303/portfolio-bholmes-v2 | 94cda2c677db13782f20920fe1a319a91517f938 | [
"MIT"
] | 2 | 2021-03-09T04:01:25.000Z | 2021-05-08T21:41:44.000Z | src/components/header/newSiteAlert.js | fu4303/portfolio-bholmes-v2 | 94cda2c677db13782f20920fe1a319a91517f938 | [
"MIT"
] | 4 | 2018-09-24T20:28:07.000Z | 2019-12-28T00:53:27.000Z | import React from 'react'
import styled from 'styled-components'
import { Icon } from '../icon'
const Styled = {
AlertIcon: styled.div`
border-radius: 50%;
background: white;
margin-right: 3rem;
position: relative;
width: 5rem;
height: 5rem;
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
align-self: center;
::before {
content: '';
background: inherit;
top: 0;
left: 0;
width: inherit;
height: inherit;
position: absolute;
border-radius: inherit;
animation: pulse 3s linear infinite;
z-index: -1;
}
@keyframes pulse {
0% {
transform: scale(1);
opacity: 0.5;
}
40% {
transform: scale(1.3);
opacity: 0.4;
}
60% {
opacity: 0;
transform: scale(1.3);
}
100% {
opacity: 0;
transform: scale(1.3);
}
}
`,
ArrowIcon: styled(Icon)`
margin: -0.6rem 0.5rem;
`,
}
Styled.Container = styled.div`
border-radius: 0.5rem;
background: #ce4650;
max-width: 80rem;
width: 100%;
margin: auto;
margin-top: 3rem;
padding: 2rem;
display: flex;
flex-direction: row;
align-items: center;
p {
color: white;
margin: 0;
font-size: 1em;
}
p .bold {
font-weight: bold;
font-size: 1.5em;
}
a {
font-size: 1.2em;
}
@media (max-width: 50rem) {
flex-direction: row-reverse;
padding: 1.5rem;
& > div {
align-self: flex-start;
}
${Styled.AlertIcon} {
width: 2rem;
height: 2rem;
flex: 1;
margin: 0;
margin-left: 1rem;
}
}
`
const NewSiteAlert = () => (
<Styled.Container>
<div>
<Styled.AlertIcon>
<Icon name="alert" initialColor="#ce4650" size="50%" />
</Styled.AlertIcon>
</div>
<p>
<span className="bold">
A nifty redesign of the site is in the works!
<br />
</span>
<a href="https://xd.adobe.com/view/fca250b0-5963-415d-5fcd-709f67321f2d-8a93/">
<br />
Check out the latest mockups
<Styled.ArrowIcon name="arrowRight" initialColor="white" size="1.8em" />
</a>
</p>
</Styled.Container>
)
export default NewSiteAlert
| 19.025 | 85 | 0.545335 |
68da5f6c81a57a9dac46f03006b0a539daa4f75b | 867 | js | JavaScript | service/02-stock.js | nqmt/elasticsearch101 | 16b2d215a141ad030494507c550b75e83ca9af36 | [
"MIT"
] | 1 | 2020-11-15T06:38:34.000Z | 2020-11-15T06:38:34.000Z | service/02-stock.js | nqmt/elasticsearch101 | 16b2d215a141ad030494507c550b75e83ca9af36 | [
"MIT"
] | null | null | null | service/02-stock.js | nqmt/elasticsearch101 | 16b2d215a141ad030494507c550b75e83ca9af36 | [
"MIT"
] | null | null | null | // Add this to the VERY top of the first file loaded in your app
var apm = require('elastic-apm-node').start({
// Override service name from package.json
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
serviceName: 'stock',
// Set custom APM Server URL (default: http://localhost:8200)
serverUrl: 'http://localhost:8200'
})
const { MongoClient } = require("mongodb");
const app = require('express')()
const uri = "mongodb://root:rootpassword@localhost:27017";
const client = new MongoClient(uri);
client.connect();
app.get('/stock', async function (req, res) {
const database = client.db("4pl");
const collection = database.collection("stock");
const doc = { name: "Red", town: "kanto" };
const result = await collection.insertOne(doc);
console.log(result.result)
console.log(new Date())
res.send('stock')
})
app.listen(3001) | 24.771429 | 64 | 0.679354 |
68da757f4df97af89215f45db75245ea9a14a134 | 1,666 | js | JavaScript | node_modules/oae-mediacore/lib/rest.js | GatechVIP/Hilary | 0f5a3a782871a074898c97934f04a3aa0886591a | [
"ECL-2.0"
] | 1 | 2016-10-25T18:02:36.000Z | 2016-10-25T18:02:36.000Z | node_modules/oae-mediacore/lib/rest.js | GatechVIP/Hilary | 0f5a3a782871a074898c97934f04a3aa0886591a | [
"ECL-2.0"
] | null | null | null | node_modules/oae-mediacore/lib/rest.js | GatechVIP/Hilary | 0f5a3a782871a074898c97934f04a3aa0886591a | [
"ECL-2.0"
] | null | null | null | /*!
* Copyright 2013 Apereo Foundation (AF) Licensed under the
* Educational Community License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://opensource.org/licenses/ECL-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
var OAE = require('oae-util/lib/oae');
var OaeServer = require('oae-util/lib/server');
var log = require('oae-logger').logger('mediacore-rest');
var MediaCoreAPI = require('./api');
// Ensure that the MediaCore encoding callback endpoing bypasses CSRF validation. It has its own authenticity handling.
OaeServer.addSafePathPrefix('/api/mediacore/encodingCallback');
/*!
* Get the mediacore embed url from a content id
*/
OAE.tenantRouter.on('get', '/api/mediacore/embed/:contentId', function(req, res) {
MediaCoreAPI.getEmbedCode(req.ctx, req.params.contentId, function(err, embedCode) {
if (err) {
return res.send(err.code, err.msg);
}
return res.send(200, embedCode);
});
});
/*!
* Update the thumbnails from mediacore
*/
OAE.tenantRouter.on('post', '/api/mediacore/encodingCallback', function(req, res) {
MediaCoreAPI.updateThumbnails(req.body.media_id, function(err) {
if (err) {
return res.send(err.code, err.msg);
}
return res.send(200);
});
});
| 33.32 | 119 | 0.693277 |
68da8a599b543b4d6fd610b84e514d1378f9bade | 3,181 | js | JavaScript | build/2.e5f4acbbc84e699ff42e.chunk.js | agduyaguit/dmlc-ui | 837c196a82e8bdf84b46cd5420830ad5ea2333af | [
"MIT"
] | null | null | null | build/2.e5f4acbbc84e699ff42e.chunk.js | agduyaguit/dmlc-ui | 837c196a82e8bdf84b46cd5420830ad5ea2333af | [
"MIT"
] | null | null | null | build/2.e5f4acbbc84e699ff42e.chunk.js | agduyaguit/dmlc-ui | 837c196a82e8bdf84b46cd5420830ad5ea2333af | [
"MIT"
] | null | null | null | (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"./app/containers/ServicesPage/index.js":function(e,o,t){"use strict";t.r(o);var n,r=t("./node_modules/react/index.js"),i=t.n(r),s=t("./node_modules/react-helmet/lib/Helmet.js");t("./app/containers/ServicesPage/style.scss");function a(e,o,t,r){n||(n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,s=arguments.length-3;if(o||0===s||(o={children:void 0}),o&&i)for(var a in i)void 0===o[a]&&(o[a]=i[a]);else o||(o=i||{});if(1===s)o.children=r;else if(s>1){for(var l=new Array(s),u=0;u<s;u++)l[u]=arguments[u+3];o.children=l}return{$$typeof:n,type:e,key:void 0===t?null:""+t,ref:null,props:o,_owner:null}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,o){for(var t=0;t<o.length;t++){var n=o[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,o){return!o||"object"!==l(o)&&"function"!=typeof o?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):o}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,o){return(p=Object.setPrototypeOf||function(e,o){return e.__proto__=o,e})(e,o)}var d=a("div",{className:"feature-page"},void 0,a(s.Helmet,{},void 0,a("title",{},void 0,"Feature Page"),a("meta",{name:"description",content:"Services we offer..."})),a("h1",{},void 0,"Services"),a("ul",{}),a("i",{},void 0,"and much more...")),m=function(e){function o(){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,o),c(this,f(o).apply(this,arguments))}return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),o&&p(e,o)}(o,i.a.Component),function(e,o,t){o&&u(e.prototype,o),t&&u(e,t)}(o,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(){return d}}]),o}();t.d(o,"default",function(){return m})},"./app/containers/ServicesPage/style.scss":function(e,o,t){var n=t("./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./app/containers/ServicesPage/style.scss");"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};t("./node_modules/style-loader/lib/addStyles.js")(n,r);n.locals&&(e.exports=n.locals)},"./node_modules/css-loader/index.js!./node_modules/sass-loader/lib/loader.js!./app/containers/ServicesPage/style.scss":function(e,o,t){(e.exports=t("./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".feature-page h1{font-size:2em;margin-bottom:0.25em}.feature-page ul{font-family:Georgia, Times, 'Times New Roman', serif;padding-left:1.75em}.feature-page ul li{margin:1em 0}.feature-page ul li p.title{font-weight:bold}\n",""])}}]); | 3,181 | 3,181 | 0.702609 |
68da90a67bd2c0750be51a53aba6947ceae916d0 | 1,004 | js | JavaScript | src/citizenapp/src/Redux/store.js | helsenorgelab/pasientdata | 69bc31db1874d113af4096ce60a2767a3e4c598b | [
"MIT"
] | null | null | null | src/citizenapp/src/Redux/store.js | helsenorgelab/pasientdata | 69bc31db1874d113af4096ce60a2767a3e4c598b | [
"MIT"
] | 1 | 2019-08-08T14:32:06.000Z | 2019-08-08T20:27:02.000Z | src/citizenapp/src/Redux/store.js | helsenorge/pasientdata2019 | 69bc31db1874d113af4096ce60a2767a3e4c598b | [
"MIT"
] | 1 | 2019-08-07T10:09:25.000Z | 2019-08-07T10:09:25.000Z | import { createStore, combineReducers, applyMiddleware, compose } from "redux";
import patientReducer from "./patientReducer";
import baseInfoReducer from "./baseInfoReducer";
import thunk from "redux-thunk";
import persistDataLocally from "./persistData";
// import {initialState} from "./patientReducer"
const reducer = combineReducers({
patient: patientReducer,
baseInfo: baseInfoReducer
});
// Started on persisting the state, but not nessecary yet, might use later
/* let retrievedState;
try {
retrievedState = sessionStorage.getItem("reduxStore");
if (retrievedState === null) {
retrievedState = {patient: initialState};
}
retrievedState = JSON.parse(retrievedState);
} catch (err) {
retrievedState = {};
} */
const middlewares = [thunk];
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
reducer,
//retrievedState,
composeEnhancers(applyMiddleware(...middlewares, persistDataLocally))
);
export default store;
| 28.685714 | 80 | 0.75498 |
68db4a8e483a86da79a2f77e77da40eecd17fa3d | 3,412 | js | JavaScript | tools/monocle-brute/lib/domain-enum.js | gabemarshall/monocular | a4e634f9d151799c3bc2d241373faf03d7018a4d | [
"MIT"
] | 1 | 2018-08-29T15:48:57.000Z | 2018-08-29T15:48:57.000Z | tools/monocle-brute/lib/domain-enum.js | gabemarshall/monocular | a4e634f9d151799c3bc2d241373faf03d7018a4d | [
"MIT"
] | 1 | 2021-01-05T02:06:59.000Z | 2021-01-05T02:06:59.000Z | tools/monocle-brute/lib/domain-enum.js | gabemarshall/monocular | a4e634f9d151799c3bc2d241373faf03d7018a4d | [
"MIT"
] | null | null | null | const { Resolver } = require("dns");
const resolver = new Resolver();
const throttledQueue = require("throttled-queue");
const fs = require("fs");
const args = require("yargs");
exports.brute = async function(target) {
let counter = 0
function uniq(arr) {
if (arr.length === 0) return arr;
arr = arr.sort(function(a, b) {
return a * 1 - b * 1;
});
var ret = [arr[0]];
for (var i = 1; i < arr.length; i++) {
if (arr[i - 1] !== arr[i]) {
ret.push(arr[i]);
}
}
return ret;
}
console.log(target);
let rate = 5000;
let discoveries = [];
let words = [];
let tempFile = fs
.readFileSync("./lib/default.txt")
.toString()
.split("\n");
// Clean up words from brute list
for (i = 0; i < tempFile.length; i++) {
words.push(tempFile[i].toLowerCase().trim());
}
words = uniq(words);
let jobCount = words.length;
let throttle = throttledQueue(rate, 1000, false);
let resolvers = ["8.8.8.8", "8.8.4.4", "1.1.1.1"];
resolver.resolveNs(target, function(err, rec) {
if (err) {
console.log(err);
}
if (Array.isArray(rec)) {
for (i = 0; i < rec.length; i++) {
let tempNs = rec[i].toString().trim();
let ns = resolver.resolve(tempNs, "A", function(err, ip) {
if (err) {
console.log("error");
} else {
resolvers.push(ip[0]);
}
});
}
console.log("Grabbing name servers...")
setTimeout(function() {
function check(){
count = jobCount - words.length;
// if ((count % rate) === 0) {
// var perCompleted = Math.round(((count / jobCount) * 100));
// if (perCompleted != 0){
// perCompleted = perCompleted.toString();
// perCompleted += '% completed';
// if ((count % 1000) === 0){
// console.log("[*] "+perCompleted);
// }
// }
// }
if (counter === jobCount){
console.log("100% completed")
console.log("Waiting for jobs to finish..")
console.log(discoveries.length)
setTimeout(function(){
console.log(discoveries.length+" domains discovered")
for (i=0;i<discoveries.length;i++){
//console.log(discoveries[i].domain);
}
}, 10000)
} else {
}
}
let dnsJob = function(resolver, word, target) {
let guess = word + "." + target;
resolver.resolve(guess, "A", function(err, ip) {
if (err) {
} else {
console.log(guess+" => "+ip[0]);
discoveries.push({domain: guess, record: ip[0]})
}
counter++
check()
});
};
let total_requests = jobCount;
//resolver.setServers(resolvers);
console.log("Starting job")
for (i = 0; i < words.length; i++) {
throttle(function() {
word = words.splice(0, 1);
dnsJob(resolver, word[0], target);
});
}
}, 1500);
}
});
return "hi";
};
exports.enum = async function(target) {
let results = await exports.brute(target);
return results;
};
| 26.866142 | 71 | 0.474795 |
68dbca89082c148c841598c32f0b908ce81691b6 | 6,671 | js | JavaScript | instano.js | laucheukhim/instano | 12a396558be2982e18eb37e43b673b8942b12726 | [
"MIT"
] | 10 | 2015-01-20T19:11:35.000Z | 2020-08-25T02:35:11.000Z | instano.js | laucheukhim/instano | 12a396558be2982e18eb37e43b673b8942b12726 | [
"MIT"
] | null | null | null | instano.js | laucheukhim/instano | 12a396558be2982e18eb37e43b673b8942b12726 | [
"MIT"
] | null | null | null | /*
* instano.js - Instant NoScript Detection
*
* authors: Antony Lau and Zbyszek Tenerowicz
* email: instano.js@gmail.com
* license : MIT
*/
var instano = (function (settings) {
"use strict";
settings || (settings = {});
settings.interval || (settings.interval = 100); // rejects 0
(settings.displayStyle && settings.displayStyle === "block") || (settings.displayStyle = "inline-block");
settings.indicator || (settings.indicator = false);
//settings.reenabledCallback
/* Testing for CSS animation support
***************************************************************************/
var isAnimationSupported = false,
domPrefixes = 'Webkit Moz O ms Khtml'.split(' '),
testel = document.createElement('div');
if(typeof testel.style.animationName !== "undefined") { isAnimationSupported = true; }
if( isAnimationSupported === false ) {
for( var i = 0; i < domPrefixes.length; i++ ) {
if( typeof testel.style[ domPrefixes[i] + 'AnimationName' ] !== "undefined" ) {
isAnimationSupported = true;
break;
}
}
}
/* Detect if JavaScript is reenabled
***************************************************************************/
var t1 = Date.now(),
t1p = t1,
dd = 0;
// Detect if timestamp is updated with setInterval (resume upon reenabling)
function t1check() {
dd = t1 === t1p ? dd+1 : 0;
if (dd >= 4) {
// JavaScript is reenabled
dd = 0;
if (typeof settings.reenabledCallback === "function") settings.reenabledCallback(); // apply callback
setTimeout(function(){t1update()}, 40); // restart update
}
t1p = t1;
}
setInterval(function(){t1check()}, 100);
// Update timestamp with setTimeout (does not resume upon reenabling)
function t1update() {
t1 = Date.now();
setTimeout(function(){t1update()}, 40);
}
setTimeout(function(){t1update()}, 40);
/* Create the CSS animation class
***************************************************************************/
if (isAnimationSupported) {
var css =
'.nojs_init { position:relative; display:inline-block; vertical-align:top; animation:nojs-animation 0.2s step-end; -moz-animation:nojs-animation 0.2s step-end; -webkit-animation:nojs-animation 0.2s step-end; -o-animation:nojs-animation 0.2s step-end; } ' +
'@keyframes nojs-animation { from {width:0px;height:0px;visibility:hidden;opacity:0;} to {width:1px;height:1px;visibility:visible;opacity:1;} } ' +
'@-moz-keyframes nojs-animation { from {width:0px;height:0px;visibility:hidden;opacity:0;} to {width:1px;height:1px;visibility:visible;opacity:1;} } ' +
'@-webkit-keyframes nojs-animation { from {width:0px;height:0px;visibility:hidden;opacity:0;} to {width:1px;height:1px;visibility:visible;opacity:1;} } ' +
'@-o-keyframes nojs-animation { from {width:0px;height:0px;visibility:hidden;opacity:0;} to {width:1px;height:1px;visibility:visible;opacity:1;} }';
if ('\v' == 'v') /* ie only */ {
document.createStyleSheet().cssText = css;
}
else {
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
document.getElementsByTagName('head')[0].appendChild(style);
}
//start working immediately
init(settings.indicator);
}
// Check if object o is a DOM element
function isElement(o){
return (
typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2
o && typeof o === "object" && o.nodeType === 1 && typeof o.nodeName==="string"
);
}
//inits
function init(el){
if (!el) {
// Find all the noscript tags
var nos = document.getElementsByTagName("noscript");
} else if (Object.prototype.toString.call(el) === "[object Array]") {
var nos = [];
for (var i = 0; i < el.length; i++) {
if (isElement(el[i])) {
var nosj = el[i].getElementsByTagName("noscript");
for (var j in nosj) {
if (isElement(nosj[j])) nos.push(nosj[j]);
}
} else if (document.getElementById(el[i])) {
var nosj = document.getElementById(el[i]).getElementsByTagName("noscript");
for (var j in nosj) {
if (isElement(nosj[j])) nos.push(nosj[j]);
}
}
}
} else if (isElement(el)) {
// Find the noscript tags within an element
var nos = el.getElementsByTagName("noscript");
} else if (document.getElementById(el)) {
var nos = document.getElementById(el).getElementsByTagName("noscript");
}
var elreplace = {};
if (nos) {
for (var i = 0; i < nos.length; i++) {
var newone = document.createElement('div');
newone.id = "jsdetect_" + i;
newone.className = "nojs_init";
newone.style.display = settings.displayStyle;
newone.innerHTML = nos[i].textContent;
elreplace[i] = {
parent: nos[i].parentNode,
newel: newone,
original: nos[i]
};
}
for (var i in elreplace) {
// Replace noscript with span
elreplace[i].parent.replaceChild(elreplace[i].newel, elreplace[i].original);
}
// Continuously replace element to stop animation
setInterval(function() {
for (var i in elreplace) {
var el = document.getElementById(elreplace[i].newel.id);
var newone = el.cloneNode(true);
el.parentNode.replaceChild(newone, el);
}
}, settings.interval);
// Bug fix for #3
// Stop noscript tags from showing up in Firefox while reloading
window.addEventListener("beforeunload", function() {
// Hide all the noscript tags since in Firefox JavaScript will
// stop running momentarily before the page is reloaded
for (var i in elreplace) {
var el = document.getElementById(elreplace[i].newel.id);
el.style.display = "none";
}
// But in case the user canceled the reload in the onbeforeunload
// prompt, restore the noscript tags so they will work again
// Use two timeouts to detect cancellation. The first timeout will
// not fire until the prompt is dismissed and the second timeout
// will only fire when the prompt is cancelled.
setTimeout(function() {
setTimeout(function() {
for (var i in elreplace) {
var el = document.getElementById(elreplace[i].newel.id);
el.style.display = settings.displayStyle;
}
}, 0);
}, 0);
});
}
}
//init-end
}); | 38.33908 | 260 | 0.586719 |
68dc9d608df27866621ef4b77d30287b40cfae97 | 3,493 | js | JavaScript | atest/crystal/scripts/main.js | playday3008/Sun-and-stuff | 2fa3d14814240b2b48cf956ccbd6d98cd6cef14b | [
"WTFPL"
] | null | null | null | atest/crystal/scripts/main.js | playday3008/Sun-and-stuff | 2fa3d14814240b2b48cf956ccbd6d98cd6cef14b | [
"WTFPL"
] | null | null | null | atest/crystal/scripts/main.js | playday3008/Sun-and-stuff | 2fa3d14814240b2b48cf956ccbd6d98cd6cef14b | [
"WTFPL"
] | null | null | null | let core;
window.onload = ()=>{
let d = new Range({ width: 400, value: 0, class: `input`, min: -.6, max: .6, scale: 4, label: `Delta`, labelWidth: 120, step: .01})
// let b = new Button({n: `Random structure`, class: `go`})
core = new Core(document.querySelector('.vessel'))
document.body.appendChild(d)
// document.body.appendChild(b)
d.data.onchange = v=>{
core.delta = v
}
// b.data.onchange = v=>{
// core.generateBands(5)
// }
}
class Core {
constructor(canvas) {
this.canvas = canvas;
this.ratio = window.devicePixelRatio || 1;
this.canvas.width = this.w = this.canvas.clientWidth * this.ratio;
this.canvas.height = this.h = this.canvas.clientHeight * this.ratio;
this.ctx = this.canvas.getContext('2d');
//VISUALS
this.radius = 10 * this.ratio
this.atoms = 7
this.margin = 80 * this.ratio
this.mainLine = this.ratio * 2
this.accuracy = .05
//DATA
this.delta = 0
//GENERATED
this.step = (this.w - this.margin * 2) / (this.atoms - 1)
this.ctx.font = this.ratio * 18 + `px Arial`;
this.ctx.textAlign = `center`
this.ctx.textBaseline = `middle`
this.run()
}
run() {
this.frameID = requestAnimationFrame(this.run.bind(this))
this.update()
this.draw()
}
update(){
//TEMP
// this.delta = Math.sin(performance.now() / 1000) * .6
}
draw(){
this.ctx.fillStyle = '#112'
this.ctx.fillRect(0, 0, this.w, this.h)
this.drawLattice()
this.drawPlot()
}
map(n){
return n * this.h / 8
}
f(x){
return .4142135624 * Math.sqrt(1 + this.delta ** 2 + (1 - this.delta ** 2) * Math.cos(x))
}
drawPlot(){
this.ctx.save()
this.ctx.strokeStyle = `#fff6`
this.ctx.translate(this.w/2, this.h/3*2)
//Axis
this.ctx.beginPath()
this.ctx.moveTo(0, this.map(-2))
this.ctx.lineTo(0, this.map(2))
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.moveTo(this.map(-4), 0)
this.ctx.lineTo(this.map(4), 0)
this.ctx.stroke()
//Plot
this.ctx.strokeStyle = `#48FF7B`
this.ctx.lineWidth = this.mainLine
this.ctx.beginPath()
this.ctx.moveTo(this.map(-4), 3 * this.map(this.f(-4)))
for (let x = -4; x < 4; x+=this.accuracy){
this.ctx.lineTo(this.map(x), 3 * this.map(this.f(x)))
}
this.ctx.stroke()
this.ctx.beginPath()
this.ctx.moveTo(this.map(-4), 3 * this.map(-this.f(-4)))
for (let x = -4; x < 4; x+=this.accuracy){
this.ctx.lineTo(this.map(x), 3 * this.map(-this.f(x)))
}
this.ctx.stroke()
//text
this.ctx.fillStyle = `#fff`
this.ctx.fillText(`E`, 0, this.map(-2.2))
this.ctx.fillText(`k`, this.map(4.2), 0)
this.ctx.restore()
}
drawLattice(){
for (let i = 1; i < this.atoms; i+=2){
let x1 = this.margin + (i-1) * this.step
let x2 = this.margin + (i) * this.step + this.delta * this.step
let x3 = this.margin + (i+1) * this.step
let gap1 = x2 - x1
let gap2 = x3 - x2
let k1 = this.step / gap1
let k2 = this.step / gap2
let t1 = this.radius * k1 / 3
let t2 = this.radius * k2 / 3
this.ctx.fillStyle = `rgba(118, 158, 255, ${k1 * .3 - .1})`
this.ctx.fillRect(x1, this.margin - t1, gap1, t1 * 2)
this.ctx.fillStyle = `rgba(118, 158, 255, ${k2 * .3 - .1})`
this.ctx.fillRect(x2, this.margin - t2, gap2, t2 * 2)
}
this.ctx.fillStyle = `#fff`
for (let i = 0; i < this.atoms; i++){
let x = this.margin + i * this.step
if ((i+1)%2===0) {
x += this.delta * this.step
}
this.ctx.beginPath()
this.ctx.arc(x, this.margin, this.radius, 0, Math.PI * 2)
this.ctx.fill()
}
}
} | 21.561728 | 132 | 0.598626 |
68dcc3c1728f0a4f01d98b49174928a84bcc325f | 5,054 | js | JavaScript | unused/src/kbaseSimplePanel.js | eapearson/ui-common-dos | 7ecaa1310b9e975bc4260f5b433aedc21bd046ad | [
"MIT"
] | null | null | null | unused/src/kbaseSimplePanel.js | eapearson/ui-common-dos | 7ecaa1310b9e975bc4260f5b433aedc21bd046ad | [
"MIT"
] | null | null | null | unused/src/kbaseSimplePanel.js | eapearson/ui-common-dos | 7ecaa1310b9e975bc4260f5b433aedc21bd046ad | [
"MIT"
] | null | null | null | /*global
define, require
*/
/*jslint
browser: true,
white: true
*/
define([
'jquery',
'q',
'kb.runtime'
], function ($, q, R) {
'use strict';
function panelFactory(config) {
// We get a factory for making panels using the given renderer...
var renderer = config.renderer;
function widget() {
var mount, container;
var children = [];
// API
function attach(node) {
return q.Promise(function (resolve, reject) {
mount = node;
container = document.createElement('div');
mount.appendChild(container);
renderer()
.then(function (rendered) {
container.innerHTML = rendered.content;
R.send('app', 'title', rendered.title);
// create widgets.
children = rendered.widgets;
q.all(children.map(function (w) {
return w.widget.init(w.config);
}))
.then(function () {
q.all(children.map(function (w) {
return w.widget.attach($('#' + w.id).get(0));
}))
.then(function (results) {
resolve();
})
.catch(function (err) {
console.log('ERROR attaching');
console.log(err);
})
.done();
})
.catch(function (err) {
console.log('ERROR creating');
console.log(err);
})
.done();
})
.catch(function (err) {
console.log('ERROR rendering console');
console.log(err);
reject(err);
})
.done();
});
}
function start(params) {
return q.Promise(function (resolve, reject) {
// for now these are fire and forget.
// this has implications for lifecycle --
// for instance, if stop is called immediately after start
// can it really stop the widgets? they may be in the middle
// of loading dependencies or fetching data!
// Better for lifecycle control might be a to have the
// widgets return attachment promises, as we now do for
// panels...
//
// NB: the widget connector, for now, needs the params
// for attachment.
q.all(children.map(function (wc) {
return wc.widget.start(params);
}))
.then(function (results) {
resolve();
})
.catch(function (err) {
reject(err);
})
.done();
});
}
function stop() {
return q.Promise(function (resolve, reject) {
q.all(children.map(function (wc) {
return wc.widget.stop();
}))
.then(function (results) {
resolve();
})
.catch(function (err) {
reject(err);
})
.done();
});
}
function detach() {
return q.Promise(function (resolve, reject) {
q.all(children.map(function (wc) {
return wc.widget.detach();
}))
.then(function (results) {
resolve();
})
.catch(function (err) {
reject(err);
})
.done();
});
}
return {
attach: attach,
start: start,
stop: stop,
detach: detach
};
}
return {
create: function () {
return widget();
}
};
}
return panelFactory;
}); | 36.890511 | 85 | 0.331421 |
68de7d42b50c6697a35d73533addc6fdc06b418e | 459 | js | JavaScript | test/integ/integration.test.js | FabienGreard/All-In-One | f2f4a350b415ea89c8544f992eb49b3cb54ba5e4 | [
"MIT"
] | null | null | null | test/integ/integration.test.js | FabienGreard/All-In-One | f2f4a350b415ea89c8544f992eb49b3cb54ba5e4 | [
"MIT"
] | null | null | null | test/integ/integration.test.js | FabienGreard/All-In-One | f2f4a350b415ea89c8544f992eb49b3cb54ba5e4 | [
"MIT"
] | null | null | null | const request = require('supertest'),
app = require('../../server.js');
describe('integration', () => {
it('Should render index', done => {
request(app)
.get(`/`)
.expect(200)
.end(err => {
if (err) throw err;
done();
});
});
it('Should throw a 404', done => {
request(app)
.get(`/not-found`)
.expect(404)
.end(err => {
if (err) throw err;
done();
});
});
});
| 19.125 | 37 | 0.45098 |
3d09371e575ddd85ab9b94e004ff95f464f8d708 | 26 | js | JavaScript | test/webpack-build.test.js | lovetingyuan/vue-flags-webpack-plugin | 0a0ee89d0512208486c0ef5e581ea41f42f37c66 | [
"MIT"
] | 1 | 2019-05-04T09:28:05.000Z | 2019-05-04T09:28:05.000Z | test/webpack-build.test.js | lovetingyuan/vue-flags-webpack-plugin | 0a0ee89d0512208486c0ef5e581ea41f42f37c66 | [
"MIT"
] | null | null | null | test/webpack-build.test.js | lovetingyuan/vue-flags-webpack-plugin | 0a0ee89d0512208486c0ef5e581ea41f42f37c66 | [
"MIT"
] | null | null | null | require('./webpack-test')
| 13 | 25 | 0.692308 |
3d0a6e6e120529f6ced067682576196b9c2f03b2 | 5,007 | js | JavaScript | app.js | yjy1663/Bike-Sharing-System | 816fe3c923dc945919f6320d28270953a8a9649e | [
"MIT"
] | null | null | null | app.js | yjy1663/Bike-Sharing-System | 816fe3c923dc945919f6320d28270953a8a9649e | [
"MIT"
] | null | null | null | app.js | yjy1663/Bike-Sharing-System | 816fe3c923dc945919f6320d28270953a8a9649e | [
"MIT"
] | null | null | null | var express = require("express");
var app = require("express")();
var http = require("http").Server(app);
var io = require("socket.io")(http);
var server_user = [];
var clients = [];
var group_leader = [];
var bike_onmap_id = {}; //free bike inventory on map for display
var bike_in_use = {}; //bikes currently in use by clients
//kafka I/O
var kafka = require('kafka-node');
var ZOOKEEPER_SERVER = 'localhost:2181';
var KAFKA_CLIENT_ID = "socketio-kafka";
console.log('ZOOKEEPER_SERVER: ' + ZOOKEEPER_SERVER);
var kafkaClient = new kafka.Client(ZOOKEEPER_SERVER, KAFKA_CLIENT_ID);
var consumer = new kafka.Consumer(kafkaClient, [], {autoCommit: true});
var producer = new kafka.Producer(kafkaClient);
consumer.addTopics(["bikes-locations", "bike-requested", "bike-request"], function (err, added) {});
consumer.on('message', function (message) {
if (message['topic'] == 'bikes-locations'){
io.emit('bike-location', message);
console.log('got location');
location = JSON.parse(message['value']);
latitude = location['latitude'];
longitude = location['longitude'];
id = location['id'];
bike_onmap_id[id] = [latitude, longitude];
}
else if (message['topic'] == 'bike-requested'){
io.emit('bike-requested', message);
console.log(message);
request = JSON.parse(message['value']);
bike_id = request['id'];
delete bike_onmap_id[bike_id];
}
else if (message['topic'] == 'bike-request'){
console.log("got bike request");
}
});
//server listening to port 2500
http.listen(2500, function() {
console.log("Connected to :2500");
});
//routing
app.use(express.static(__dirname));
app.get("/", function(req, res) {
res.sendfile(__dirname + "/index.html");
});
producer.on('ready', function(){
io.sockets.on("connection", function(socket) {
var producer = new kafka.Producer(kafkaClient);
io.emit("user_connection", socket.id);
//when user sign in
//return all other users information
io.emit("server_user", server_user);
//create new user
//when a new user connected send currently on map bike to new user for map syhchronize
io.emit('global_bikes', bike_onmap_id);
socket.on("bike_request", function(request_message){
payloads = [{topic:"bike-request", messages: request_message},];
producer.send(payloads, function(err, data){
});
});
socket.on("bike_return", function(return_message) {
payloads = [{topic:"bikes-locations", messages: return_message},];
producer.send(payloads, function(err, data){
});
});
socket.on("create_user", function(data_user) {
server_user.push(data_user);
io.emit("create_user", data_user);
});
//send chatting message
socket.on("message", function(data_message) {
io.emit("message", data_message);
});
socket.on("disconnect", function() {
var i = 0;
for (var i = 0; i < server_user.length; i++) {
if (server_user[i].id == socket.id) {
server_user.splice(i, 1); //remove user info
}
}
io.emit("user_disconnect", socket.id);
});
//create new group
socket.on("create_room", function(room_id) {
io.sockets.connected[socket.id].join(room_id);
group_leader[room_id] = socket.id;
});
socket.on("invite_room", function(id, room_id) {
io.sockets.connected[id].emit("invite_room", id, room_id);
});
socket.on("status_invited_room", function(id, room_id, status) {
if (status == 1) {
io.sockets.connected[id].join(room_id);
}
});
socket.on("event_room", function(room_id, message_type, event_room) {
if (group_leader[room_id] == socket.id) {
if (message_type == "travel") {
socket.in(room_id).emit("event_room", getUserRoom(room_id), message_type, event_room);
io.sockets.connected[socket.id].emit("event_room", getUserRoom(room_id), message_type, event_room);
} else if (message_type == "bounds" || message_type == "streetview") {
socket.in(room_id).emit("event_room", '', message_type, event_room);
}
}
});
socket.on("room_message", function(room_id, data_message) {
socket.in(room_id).emit("room_message", data_message);
io.sockets.connected[socket.id].emit("room_message", data_message);
})
});
});
function getUserRoom(room_id) {
var user = [];
for (var key in io.sockets.adapter.rooms[room_id]) {
if (io.sockets.adapter.rooms[room_id][key] == true) {
user.push(key);
}
}
return user;
}
| 35.013986 | 119 | 0.586579 |
3d0b3cf4df5b2a1fa048ddea41a6e0af2e56f70c | 363 | js | JavaScript | src/hud/.babelrc.js | SphericalWorld/spherical-world | e4c8dd29d62011b0516e702cd8dc6356a06ce904 | [
"MIT"
] | 18 | 2018-06-02T19:31:11.000Z | 2021-04-29T06:02:36.000Z | src/hud/.babelrc.js | SphericalWorld/spherical-world | e4c8dd29d62011b0516e702cd8dc6356a06ce904 | [
"MIT"
] | 4 | 2020-06-25T17:34:14.000Z | 2021-11-19T22:42:35.000Z | src/hud/.babelrc.js | SphericalWorld/spherical-world | e4c8dd29d62011b0516e702cd8dc6356a06ce904 | [
"MIT"
] | 4 | 2018-08-27T14:31:51.000Z | 2020-09-01T12:54:19.000Z | const config = require('../../.babelrc.js');
module.exports = (api) => {
api.cache(true);
return {
...config,
plugins: config.plugins.filter(
el => el !== './common/ecs/utils/babelPlugin.js' &&
el !== '@babel/plugin-transform-react-jsx'
).concat([["@babel/plugin-transform-react-jsx", {
"runtime": "automatic"
}]])
};
};
| 22.6875 | 57 | 0.561983 |
3d0d7041a99694f52168ccebf119f63aa2c9c5b1 | 531 | js | JavaScript | src/chunk/pem/encode.js | christoffercarlsson/stedy | 525e174736b5c7fe588fc7d956fecc3c42311a5d | [
"Unlicense"
] | null | null | null | src/chunk/pem/encode.js | christoffercarlsson/stedy | 525e174736b5c7fe588fc7d956fecc3c42311a5d | [
"Unlicense"
] | null | null | null | src/chunk/pem/encode.js | christoffercarlsson/stedy | 525e174736b5c7fe588fc7d956fecc3c42311a5d | [
"Unlicense"
] | null | null | null | import base64Encode from '../base64/encode.js'
import { splitString } from '../utils.js'
const normalizeLabel = (label) =>
String(label).replace('-', ' ').replace(/\s+/g, ' ').trim().toUpperCase()
const encodeData = (view) => splitString(base64Encode(view), 64).join('\n')
const encode = (view, pemLabel) => {
if (view.byteLength === 0) {
return ''
}
const label = normalizeLabel(pemLabel)
const data = encodeData(view)
return `-----BEGIN ${label}-----\n${data}\n-----END ${label}-----`
}
export default encode
| 27.947368 | 75 | 0.627119 |
3d0f13611b4e407b1d9a11fc5848154b3ed4ee09 | 1,889 | js | JavaScript | themes/admin/javascript/tinymce/jscripts/tiny_mce/themes/advanced/langs/es_dlg.js | chguoxi/ionize | 9ddc6c1ba319923f3e424d8b0ebe3f8ccebf8b9c | [
"MIT"
] | 32 | 2015-01-31T18:27:19.000Z | 2022-01-27T10:21:49.000Z | themes/admin/javascript/tinymce/jscripts/tiny_mce/themes/advanced/langs/es_dlg.js | chguoxi/ionize | 9ddc6c1ba319923f3e424d8b0ebe3f8ccebf8b9c | [
"MIT"
] | 1 | 2019-01-18T17:17:06.000Z | 2019-01-18T17:17:06.000Z | themes/admin/javascript/tinymce/jscripts/tiny_mce/themes/advanced/langs/es_dlg.js | chguoxi/ionize | 9ddc6c1ba319923f3e424d8b0ebe3f8ccebf8b9c | [
"MIT"
] | 8 | 2015-02-16T13:24:55.000Z | 2022-01-27T10:21:53.000Z | tinyMCE.addI18n('es.advanced_dlg',{link_list:"Lista de hiperv\u00ednculos",link_is_external:"La URL que introdujo parece ser un v\u00ednculo externo, \u00bfdesea agregar el prefijo http:// necesario?",link_is_email:"La URL que introdujo parece ser una direcci\u00f3n de email, \u00bfdesea agregar el prefijo mailto: necesario?",link_titlefield:"T\u00edtulo",link_target_blank:"Abrir v\u00ednculo en una ventana nueva",link_target_same:"Abrir v\u00ednculo en la misma ventana",link_target:"Destino",link_url:"URL del hiperv\u00ednculo",link_title:"Insertar/editar hiperv\u00ednculo",image_align_right:"Derecha",image_align_left:"Izquierda",image_align_textbottom:"Texto debajo",image_align_texttop:"Texto arriba",image_align_bottom:"Debajo",image_align_middle:"Medio",image_align_top:"Arriba",image_align_baseline:"L\u00ednea base",image_align:"Alineaci\u00f3n",image_hspace:"Espacio horizontal",image_vspace:"Espacio vertical",image_dimensions:"Dimensi\u00f3n",image_alt:"Descripci\u00f3n de la Imagen",image_list:"Lista de la Imagen",image_border:"Borde",image_src:"URL de la Imagen",image_title:"Insertar/editar imagen",charmap_title:"Elegir caracter personalizado",colorpicker_name:"Nombre:",colorpicker_color:"Color:",colorpicker_named_title:"Colores nombrados",colorpicker_named_tab:"Nombrados",colorpicker_palette_title:"Paleta de colores",colorpicker_palette_tab:"Paleta",colorpicker_picker_title:"Paleta de color",colorpicker_picker_tab:"Selector",colorpicker_title:"Elegir color",code_wordwrap:"Ajustar al margen",code_title:"Editor del c\u00f3digo fuente HTML",anchor_name:"Nombre del ancla",anchor_title:"Insertar/editar ancla",about_loaded:"Complementos cargados",about_version:"Versi\u00f3n",about_author:"Autor",about_plugin:"Complemento",about_plugins:"Complementos",about_license:"Licencia",about_help:"Ayuda",about_general:"Acerca de ",about_title:"Acerca de TinyMCE"}); | 1,889 | 1,889 | 0.832186 |
3d10a65bbe239f8890350e9760604b1177e11902 | 942 | js | JavaScript | javascript/script.js | gitter-badger/OpenBugTracker | 79acd45ec8cfe28dd0a5bc111387347ba7cb30c0 | [
"MIT"
] | null | null | null | javascript/script.js | gitter-badger/OpenBugTracker | 79acd45ec8cfe28dd0a5bc111387347ba7cb30c0 | [
"MIT"
] | null | null | null | javascript/script.js | gitter-badger/OpenBugTracker | 79acd45ec8cfe28dd0a5bc111387347ba7cb30c0 | [
"MIT"
] | null | null | null | /*
* script.js
*
* Copyright 2014 Hugo Rodrigues hugorodrigues.developer<at>outlook<dot>com
*
* This file is part of OpenBugTracker.
*
* OpenBugTracker it's a Open Source bug tracker and it's under the MIT License.
*
* JavaScript scripts used in OBT
*/
var pageLoaded = false;// Check's if the page is loaded
//Function to run on page event onload
function load () {
pageLoaded = true;
}
//When user enters in searchbox
function enterSearch(searchDefault)
{
if(!pageLoaded)
return;
else
{
var search = document.getElementById('searchBox');
if (search.value == searchDefault)
{
search.value = '';
search.style.fontStyle = 'normal';
}
}
}
//When user leaves the searchbox
function exitSearch(searchDefault)
{
if(!pageLoaded)
return;
else
{
var search = document.getElementById('searchBox');
if(search.value == '')
{
search.style.fontStyle = 'italic';
search.value = searchDefault;
}
}
} | 18.84 | 80 | 0.690021 |
3d11495dcc58f9413303d6a80e033af80375d7e4 | 1,725 | js | JavaScript | src/routes/DefaultPage/components/Default.js | nguyenphu160196/client | 0de2d4a619a4422aed886eafcba3888ac4c79cac | [
"MIT"
] | null | null | null | src/routes/DefaultPage/components/Default.js | nguyenphu160196/client | 0de2d4a619a4422aed886eafcba3888ac4c79cac | [
"MIT"
] | null | null | null | src/routes/DefaultPage/components/Default.js | nguyenphu160196/client | 0de2d4a619a4422aed886eafcba3888ac4c79cac | [
"MIT"
] | null | null | null | import React from 'react'
import PropTypes from 'prop-types'
export const Default = ({ defaultpage }) => (
<div style={{padding: 10, height: '100%'}}>
<div id="demo" className="carousel slide" data-ride="carousel" style={{height: '100%'}}>
<ul className="carousel-indicators">
<li data-target="#demo" data-slide-to="0" className="active"></li>
<li data-target="#demo" data-slide-to="1"></li>
<li data-target="#demo" data-slide-to="2"></li>
</ul>
<div className="carousel-inner" style={{backgroundColor: 'lavender', height: '100%'}}>
<div className="carousel-item active" style={{justifyContent: 'center'}}>
<img src={require("../assets/img-4.png")} />
<div className="carousel-caption" style={{bottom: '-80px', color: 'black'}}>
<p>Build massively scalable multiparty video applications.</p>
</div>
</div>
<div className="carousel-item" style={{justifyContent: 'center'}}>
<img src={require("../assets/jitsi-front.png")} />
<div className="carousel-caption" style={{bottom: '-50px', color: 'black'}}>
<p>More secure, more flexible, and completely free video conferencing.</p>
</div>
</div>
<div className="carousel-item" style={{justifyContent: 'center'}}>
<img src={require("../assets/jitsi-meet.png")} />
</div>
</div>
<a className="carousel-control-prev" href="#demo" data-slide="prev">
<span className="carousel-control-prev-icon"></span>
</a>
<a className="carousel-control-next" href="#demo" data-slide="next">
<span className="carousel-control-next-icon"></span>
</a>
</div>
</div>
)
Default.propTypes = {
defaultpage: PropTypes.object.isRequired,
}
export default Default | 35.204082 | 92 | 0.634783 |
3d127875fa668d0111be381e7dc898ff122afd52 | 4,767 | js | JavaScript | contents/partials/payments/Paypal.js | atmulyana/expressCartMobile | 3d3414f3786126ae08b34a017cee5b8dadfd7b7e | [
"MIT"
] | 1 | 2021-10-07T13:55:00.000Z | 2021-10-07T13:55:00.000Z | contents/partials/payments/Paypal.js | atmulyana/expressCartMobile | 3d3414f3786126ae08b34a017cee5b8dadfd7b7e | [
"MIT"
] | null | null | null | contents/partials/payments/Paypal.js | atmulyana/expressCartMobile | 3d3414f3786126ae08b34a017cee5b8dadfd7b7e | [
"MIT"
] | null | null | null | /**
* expressCartMobile
* https://github.com/atmulyana/expressCartMobile
*
* @format
* @flow strict-local
*/
import React from 'react';
import {Alert, Modal} from 'react-native';
import WebView from 'react-native-webview';
import PaymentComponent from './PaymentComponent';
import routes from '../../routes';
import {Button, Icon, SubmittingIndicator, Text} from '../../../components';
import {appHelpers, lang, serverUrl} from '../../../common';
import styles from '../../../styles';
const PaymenStatus = {
Success: 0,
Cancelled: 1,
Error: 2,
EmptyCart:3,
};
export default class Paypal extends PaymentComponent {
state = {
inProcess: false,
isLoading: false,
paypalVisible: false,
};
async _paymentStatus(code, url) {
this.setState({paypalVisible: false});
switch (code) {
case PaymenStatus.Success:
let queryIdx = url.indexOf('?');
let query = queryIdx >= 0 ? url.substr(queryIdx) : '';
this.props.pageSubmit(`/paypal/checkout_return${query}`, null);
break;
case PaymenStatus.Cancelled:
//It's better to delete order from database (should be done in '/paypal/checkout_cancel' route handler in server app)
Alert.alert(lang("Payment Status"), lang("The payment was cancelled"));
break;
case PaymenStatus.Error:
appHelpers.replaceContent(routes.checkoutPayment);
break;
case PaymenStatus.EmptyCart:
appHelpers.replaceContent(routes.home);
break;
}
}
render() {
const {config, paymentConfig} = this.props;
const {winInsets: insets} = appHelpers;
const rootUrl = serverUrl('');
return <>
<Text para4>{paymentConfig.paypal.description}</Text>
<Button
style={[styles.buttonOutlineSuccess, {alignSelf:'flex-start'}]}
title={lang('Pay with PayPal')}
onPress={() => this.setState({isLoading: true, paypalVisible: true})}
/>
<Modal
onDismiss={() => this.setState({inProcess: false})}
onShow={() => this.setState({inProcess: true})}
visible={this.state.paypalVisible}
>
<WebView
cacheMode="LOAD_NO_CACHE"
onNavigationStateChange={(navState) => {
if (navState.url?.includes('paypal.com') && !navState.loading) this.setState({isLoading: false});
}}
onShouldStartLoadWithRequest={(request) => {
if (request.url == `${rootUrl}/checkout/payment`) {
this._paymentStatus(PaymenStatus.Error);
return false;
}
else if (request.url == `${rootUrl}/` || request.url == rootUrl) {
this._paymentStatus(PaymenStatus.EmptyCart);
return false;
}
else if (request.url?.startsWith(`${config.baseUrl}/paypal/checkout_cancel`)) {
this._paymentStatus(PaymenStatus.Cancelled);
return false;
}
else if (request.url?.startsWith(`${config.baseUrl}/paypal/checkout_return`)) {
this._paymentStatus(PaymenStatus.Success, request.url);
return false;
}
return true;
}}
sharedCookiesEnabled={true}
source={this.state.inProcess ? {uri: `${rootUrl}/paypal/checkout_action`, method: 'POST'} : {uri: null}}
// startInLoadingState={true}
// renderLoading={() => <SubmittingIndicator visible={true} />}
style={[{position: 'absolute'}, insets]}
thirdPartyCookiesEnabled={true}
/>
<SubmittingIndicator visible={this.state.isLoading} />
<Icon icon="X" strokeWidth={4} height={16} width={16}
style={{opacity: 0.3, position:'absolute', right: insets.right + 2, top: insets.top + 2}}
onPress={() => {
this.setState({paypalVisible: false});
this._paymentStatus(PaymenStatus.Cancelled);
}}
/>
</Modal>
</>;
}
} | 43.336364 | 134 | 0.498427 |
3d1283bb90a1f46b2b0c1b4e22aabe448e339fca | 1,875 | js | JavaScript | rest-api/services/database/sql.js | Mohinesh27/todoapp | 772823336475cefdbfe4fd91080502bafd0c56d3 | [
"MIT"
] | null | null | null | rest-api/services/database/sql.js | Mohinesh27/todoapp | 772823336475cefdbfe4fd91080502bafd0c56d3 | [
"MIT"
] | null | null | null | rest-api/services/database/sql.js | Mohinesh27/todoapp | 772823336475cefdbfe4fd91080502bafd0c56d3 | [
"MIT"
] | null | null | null | "use strict";
var config = require('../../config');
var log = require('../../services/logger');
var mongoose = require('mongoose');
var Sequelize = require('sequelize');
var debug = require('debug')('sql');
var Op = Sequelize.Op;
// enable only operators that you need
var operatorsAliases = {
// $and: Op.and,
// $or: Op.or,
$gt: Op.gt,
$gte: Op.gte,
$lt: Op.lt,
$lte: Op.lte,
// $ne: Op.ne,
// $eq: Op.eq,
// $not: Op.not,
// $between: Op.between,
// $notBetween: Op.notBetween,
// $in: Op.in,
// $notIn: Op.notIn,
$like: Op.like,
// $notLike: Op.notLike,
// $iLike: Op.iLike, // PG Only
// $notILike: Op.notILike, // PG Only
// $regexp: Op.regexp, // PG/mySQL Only
// $notReqexp: Op.notRegexp, // PG/mySQL Only
// $iRegexp: Op.iRegexp, // PG Only
// $notIRegexp: Op.notIRegexp, // PG Only
// $overlap: Op.overlap, // PG Only
// $contains: Op.contains, // PG Only
// $contained: Op.contained, // PG Only
// $any: Op.any // PG Only
};
var options = { operatorsAliases: operatorsAliases };
options.host = config.SQLHost;
options.port = config.SQLPort;
options.dialect = config.SQLDriver;
options.pool = {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
};
options.timezone = config.SQLTimezone;
// SQLite only
// options.storage = 'path/to/database.sqlite';
options.logging = function(log){
return (process.env.NODE_ENV === 'production') ? false : debug(log);
};
var sequelize = new Sequelize(config.SQLDatabase, config.SQLUsername, config.SQLPassword, options);
sequelize
.authenticate()
.then(function(){
log.info('SQL database connection successful');
})
.catch(function(err){
log.error('Unable to connect to the database: ', err);
});
module.exports = sequelize;
module.exports._sequelize = Sequelize;
module.exports._mongoose = mongoose;
| 26.408451 | 99 | 0.627733 |
3d12851234a4290999fb7cdb3b9c40d14084aa1f | 1,989 | js | JavaScript | common/dom.js | lijyall/-tools-library | d7c4f947fd4d5049d1ba7d44e74eb3e9d9823889 | [
"MIT"
] | null | null | null | common/dom.js | lijyall/-tools-library | d7c4f947fd4d5049d1ba7d44e74eb3e9d9823889 | [
"MIT"
] | null | null | null | common/dom.js | lijyall/-tools-library | d7c4f947fd4d5049d1ba7d44e74eb3e9d9823889 | [
"MIT"
] | null | null | null | /* control class */
export function hasClass(el, cls) {
let reg = new RegExp(`(^|\\s)${cls}(\\s|$)`)
return reg.test(el.className)
}
export function addClass(el, cls) {
if (hasClass(el, cls)) {
return
}
let newCls = el.className.split(' ')
newCls.push(cls)
el.className = newCls.join(' ')
}
export function removeClass(el, cls) {
if (!hasClass(el, cls)) {
return
}
let reg = new RegExp(`(^|\\s)${cls}(\\s|$)`)
el.className = el.className.replace(reg, '')
}
/* control cssText style */
export function getStyle(ele, style) {
let ret;
if (window.getComputedStyle) {
ret = window.getComputedStyle(ele, null).getPropertyValue(style);
} else {
if (style === 'opacity') {
var filter = null;
// 早期的 IE 中要设置透明度有两个方法:
// 1、alpha(opacity=0)
// 2、filter:progid:DXImageTransform.Microsoft.gradient( GradientType= 0 , startColorstr = ‘#ccccc’, endColorstr = ‘#ddddd’ );
// 利用正则匹配
filter = ele.style.filter.match(/progid:DXImageTransform.Microsoft.Alpha\(.?opacity=(.*).?\)/i) || ele.style.filter.match(/alpha\(opacity=(.*)\)/i);
if (filter) {
var value = parseFloat(filter);
if (!isNaN(value)) {
// 转化为标准结果
ret = value ? value / 100 : 0;
}
}
// 透明度的值默认返回 1
ret = 1;
} else if (style === 'float') {
ret = ele.currentStyle.getAttribute("styleFloat");
} else if ((style === 'width' || style === 'height') && (ele.currentStyle[style] === 'auto')) {
// 取高宽使用 getBoundingClientRect
let clientRect = ele.getBoundingClientRect();
ret = (style === 'width' ? clientRect.right - clientRect.left : clientRect.bottom - clientRect.top) + "px";
}
// 其他样式,无需特殊处理
ret = ele.currentStyle.getAttribute(style);
}
return ret;
}
| 34.293103 | 160 | 0.535948 |
3d1526031e92b3e150358f82161270db7c7e8cbc | 9,926 | js | JavaScript | public/Home/js/vivo.highlight.animate.min.js | zishangdiewu/laravel2 | 993531cdad4c681a5a4049d27a946d76270dc009 | [
"MIT"
] | null | null | null | public/Home/js/vivo.highlight.animate.min.js | zishangdiewu/laravel2 | 993531cdad4c681a5a4049d27a946d76270dc009 | [
"MIT"
] | null | null | null | public/Home/js/vivo.highlight.animate.min.js | zishangdiewu/laravel2 | 993531cdad4c681a5a4049d27a946d76270dc009 | [
"MIT"
] | null | null | null | (function(e){function a(){r=e("#vivo-high .vivo-x9pyy"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,1,{y:-20,autoAlpha:0,delay:.2,ease:Cubic.easeOut},.4).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})})(jQuery),function(e){function a(){r=e("#vivo-high .vivo-x9"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,.8,{y:-20,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(r.find(".f1"),1.2,{x:200,y:100,ease:Cubic.easeOut},0).from(r.find(".f2"),1.2,{x:-200,y:100,ease:Cubic.easeOut},0).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery),function(e){function a(){if(r.$highbox=e("#vivo-high .vivo-x7black"),!(r.$highbox.size()<1)){if(r.$highbox.index()&&(r.isfirstPlay=!1),r.$highbox.prepend("<i/>"),!UM_SUPPORT.canvas)return r.$highbox.find("i").remove(),void r.$highbox.find("._duang").removeClass("_duang");r.isfirstPlay&&(r.$highbox.find("._duang").removeClass("_duang"),r.$highbox.find("i").addClass("_duang")),r.$figure=r.$highbox.find(".figure"),r.x7Canvas=document.createElement("canvas"),e(r.x7Canvas).css({width:r.$figure.width(),height:r.$figure.height()});var a=r.$highbox.find("em img").attr("src");r.maskImage=new Image,r.maskImage.src="http://files.vivo.com.cn/static/www/vivo/high/x7black/x7black-mask-k.svg?v=1",r.maskImage.onload=function(){},r.mobileImage=new Image,r.mobileImage.src=a,r.mobileImage.imgLoaded?n():r.mobileImage.onload=n}}function n(){if(s>37)return this.imgLoaded=!0,void i();var e=new Image;e.src="http://files.vivo.com.cn/static/www/vivo/high/x7black/ant1/x7-light1-"+s+".jpg",e.onload=function(){r.image.push(this),s++,n()}}function i(){r.stage=new createjs.Stage(r.x7Canvas),r.stage.canvas.width=r.image[0].width,r.stage.canvas.height=r.image[0].height,r.container=new createjs.Container,r.bitimage=new createjs.Bitmap(r.image[0]),r.mobile=new createjs.Bitmap(r.mobileImage),r.mask=new createjs.Bitmap(r.maskImage),r.mobile.scaleX=r.stage.canvas.width/r.mobile.getBounds().width,r.mobile.scaleY=r.stage.canvas.height/r.mobile.getBounds().height,r.bitimage.compositeOperation="source-in",r.mobile.compositeOperation="destination-over",r.container.addChild(r.mask,r.bitimage),r.stage.addChild(r.container,r.mobile),r.$highbox.data({tweenHandle:r})}function t(){if(o>r.image.length-1)return createjs.Ticker.removeEventListener("tick",t),r.cb&&r.cb(),r.cb=null,void 0;r.bitimage.image=r.image[o++],r.stage.update()}function u(){e(r.x7Canvas).css({width:r.$figure.width(),height:r.$figure.height()})}var r={};r.$highbox=null,r.$figure=null,r.x7Canvas=null,r.w=0,r.h=0,r.stage=null,r.mask=null,r.maskImage=null,r.bitimage=null,r.image=[],r.mobileImage=null,r.mobile=null,r.isfirstPlay=!0,r.cb=null;var s=0,o=0,l=null;r.start=function(){if(!l){r.$highbox.find("._duang").removeClass("_duang");var a=r.$highbox.find(".title ._animation");l=new TimelineLite,l.staggerFrom(a,1,{y:-30,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(r.$figure,2,{x:50,ease:Cubic.easeOut},0).from(r.$figure,1,{autoAlpha:0,ease:Cubic.easeOut},0).to(r.$highbox.find("i"),2,{autoAlpha:0,ease:Cubic.easeOut},0).pause(),r.$figure.append(r.x7Canvas),e(r.x7Canvas).siblings().remove(),window.addEventListener("resize",u,!0)}},r.play=function(e){return r.cb=e,createjs.Ticker.framerate=18,createjs.Ticker.addEventListener("tick",t),l&&l.timeScale(1).play(),r},r.reverse=function(e){return r.cb=e,l&&l.timeScale(2).reverse(),r},r.clear=function(){return o=0,createjs.Ticker.removeEventListener("tick",t),l&&l.seek(0).pause(),r.stage&&r.stage.clear(),r},e(document).ready(function(){a()})}(jQuery),function(e){function a(){r=e("#vivo-high .vivo-xplay6"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation"),a=r.find(".figure .f1"),n=r.find(".figure .f2");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,1,{y:30,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(a,2,{x:"5%"},0).from(n,2,{x:"-5%"},0).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery),function(e){function a(){r=e("#vivo-high .vivo-x9i"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,.8,{y:-20,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(r.find(".mobile"),3,{autoAlpha:0,ease:Cubic.easeOut},0).from(r.find(".different"),1.2,{autoAlpha:0,ease:Cubic.easeOut},0).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery),function(e){function a(){r=e("#vivo-high .vivo-x9plus"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,.8,{y:-20,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(r.find(".f1"),1.5,{x:65,y:-100,ease:Cubic.easeOut},0).from(r.find(".f2"),1.5,{x:-57,y:100,ease:Cubic.easeOut},0).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery),function(e){function a(){r=e("#vivo-high .vivo-X9qjf"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery),function(e){function a(){r=e("#vivo-high .vivo-x9plus"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,.8,{y:-20,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(r.find(".f1"),1.5,{x:65,y:-100,ease:Cubic.easeOut},0).from(r.find(".f2"),1.5,{x:-57,y:100,ease:Cubic.easeOut},0).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery),function(e){function a(){r=e("#vivo-high .vivo-x9m"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,.8,{y:-20,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(r.find(".f1"),1.5,{x:-50,ease:Cubic.easeOut},0).from(r.find(".f2"),1.5,{x:50,ease:Cubic.easeOut},0).from(r.find(".different"),1.5,{autoAlpha:0,ease:Cubic.easeOut},0).from(r.find(".shadow"),1.5,{autoAlpha:0,ease:Cubic.easeOut},1).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery),function(e){function a(){r=e("#vivo-high .vivo-xplay6msh"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,.8,{y:-20,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(r.find("em"),1.5,{autoAlpha:0,ease:Cubic.easeOut},0).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery),function(e){function a(){r=e("#vivo-high .vivo-xplay6kl"),r.size()<1||(r.index()&&(t=!1),t&&r.find("._duang").removeClass("_duang"),r.data({tweenHandle:n}))}var n={},i=null,t=!0,u=null,r=null;n.start=function(){if(!u){var e=r.find(".title ._animation");r.find("._duang").removeClass("_duang"),u=new TimelineLite,u.staggerFrom(e,.8,{y:-20,autoAlpha:0,delay:.4,ease:Cubic.easeOut},.4).from(r.find(".f1"),2,{autoAlpha:0,ease:Cubic.easeOut},.8).from(r.find(".f2"),1.5,{y:-50,autoAlpha:1,ease:Cubic.easeOut},0).from(r.find(".f3"),1.5,{y:50,autoAlpha:1,ease:Cubic.easeOut},0).pause()}},n.play=function(e){return i=e,u&&u.timeScale(1).play(),n},n.reverse=function(e){return i=e,u&&u.timeScale(2).reverse(),n},n.clear=function(e){return i=e,u&&u.seek(0).pause(),n},e(document).ready(function(){a()})}(jQuery); | 9,926 | 9,926 | 0.684062 |
3d16936634328147c9f3e7437978fe26dc8550d3 | 287 | js | JavaScript | src/components/block/iconBlock.js | BlackAlsatian/nextjs-pwa-mcs | fa9c8ced08331a22f969148e0429e7500386d533 | [
"MIT"
] | null | null | null | src/components/block/iconBlock.js | BlackAlsatian/nextjs-pwa-mcs | fa9c8ced08331a22f969148e0429e7500386d533 | [
"MIT"
] | null | null | null | src/components/block/iconBlock.js | BlackAlsatian/nextjs-pwa-mcs | fa9c8ced08331a22f969148e0429e7500386d533 | [
"MIT"
] | null | null | null | import ParseHTML from '../../utils/parseHTML'
const IconBlock = ({
// align,
icon
}) => {
const displayIcon = icon.replace(/default:/g, '')
return (
<div className={`flex items-center justify-center`}>
{ParseHTML(displayIcon)}
</div>
)
}
export default IconBlock
| 20.5 | 56 | 0.634146 |
3d16a2a3f11909eb18a52fe99b08ade5b8a17d4d | 213 | js | JavaScript | update-dependencies.js | ferserc1/bg2e | 02f494fd7908074226958c4b3fa7a5823d40f908 | [
"MIT"
] | null | null | null | update-dependencies.js | ferserc1/bg2e | 02f494fd7908074226958c4b3fa7a5823d40f908 | [
"MIT"
] | 1 | 2020-02-11T11:32:22.000Z | 2020-02-11T11:32:22.000Z | update-dependencies.js | ferserc1/bg2e | 02f494fd7908074226958c4b3fa7a5823d40f908 | [
"MIT"
] | null | null | null |
require('./scripts/install-deps.js').install().then(() => {
require('./scripts/dependencies.js').updateDependencies()
.then(() => console.log("Done."))
.catch((err) => console.error(err));
}); | 35.5 | 61 | 0.586854 |
3d178a103b59d28c334a9b65bc237406bdfbae23 | 5,204 | js | JavaScript | App/src/features/calendar/Activity/Activity.js | fieu/dashboard-epitech | cfe8084d7d0798335cff6c853ab1c89fa5917486 | [
"MIT"
] | 29 | 2017-01-30T15:36:08.000Z | 2022-02-11T07:53:12.000Z | App/src/features/calendar/Activity/Activity.js | fieu/dashboard-epitech | cfe8084d7d0798335cff6c853ab1c89fa5917486 | [
"MIT"
] | 1 | 2017-02-04T18:08:32.000Z | 2017-02-04T18:08:32.000Z | App/src/features/calendar/Activity/Activity.js | fieu/dashboard-epitech | cfe8084d7d0798335cff6c853ab1c89fa5917486 | [
"MIT"
] | 17 | 2017-04-18T09:33:32.000Z | 2022-02-07T12:31:02.000Z | /**
* Created by desver_f on 10/03/17.
*/
import React, { Component } from 'react';
import moment from 'moment';
import { Platform, StyleSheet, View } from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import ENIcon from 'react-native-vector-icons/Entypo';
import { observer } from 'mobx-react/native';
import { wasRegistered } from '../utils';
import BoxDescription from './description/BoxDescription';
import TextDescription from './description/TextDescription';
import AdministrativeDescription from './description/AdministrativeDescription';
import RegisterBox from './register/RegisterBox';
import RegisterText from './register/RegisterText';
import ViewAvailableSlots from './register/ViewAvailableSlots';
import RegisterActivity from './register/RegisterActivity';
import ConnectionError from '../../../shared/components/ConnectionError';
import LoadingIndicator from '../../../shared/components/LoadingIndicator';
@observer
export default class Activity extends Component {
constructor(props) {
super(props);
this.fetchActivity = this.fetchActivity.bind(this);
}
async fetchActivity() {
const { store: { activity: activityStore }, event } = this.props;
await activityStore.fetchActivity(event);
}
async componentWillMount() {
await this.fetchActivity();
}
componentWillUnmount() {
const { store: { activity: activityStore } } = this.props;
activityStore.resetActivity();
}
renderRegisterContainer() {
const {
event,
store: { activity: activityStore, projects },
} = this.props;
const pastOneDay = moment(event.start)
.isBefore(moment()
.add(1, 'd'));
if (pastOneDay && !wasRegistered(event.registered)) {
return (
<RegisterBox>
<RegisterText>
You can no longer register to this activity.
</RegisterText>
</RegisterBox>
);
}
if (activityStore.activity.slots.length) {
return (
<ViewAvailableSlots
activityTitle={activityStore.activity.title}
event={event}
isRegisteredToRelatedProject={projects.isRegisteredToRelatedProject(activityStore.activity)}
/>
);
}
return <RegisterActivity activityStore={activityStore} event={event}/>;
}
render() {
const {
event,
store: { activity: activityStore, ui },
} = this.props;
if (ui.currentState === ui.state.error) {
return (
<ConnectionError onPress={this.fetchActivity}/>
);
}
if (ui.currentState === ui.state.fetching) {
return (
<LoadingIndicator
isVisible={!activityStore.activity}
message="Loading activity..."
/>
);
}
const description = activityStore.activity.description
? activityStore.activity.description
: 'There is no description for the following activity.';
return (
<View style={{
flex: 1,
backgroundColor: '#233445',
}}>
<BoxDescription
style={[Platform.OS === 'ios' ? styles.boxContainerIOS : styles.boxContainerAndroid, {flex: 1}]}
title="Activity details"
icon={<ENIcon name="info" color="#FAFAFA" size={15}/>}
>
<TextDescription>{ description }</TextDescription>
</BoxDescription>
<BoxDescription
style={[Platform.OS === 'ios' ? styles.boxContainerIOS : styles.boxContainerAndroid, {flex: 0.8}]}
title="Administrative details"
icon={<Icon name="ios-school" color="#FAFAFA" size={25}/>}
>
<AdministrativeDescription
room={activityStore.roomName}
registeredStudents={parseInt(activityStore.activity.events[0].nb_registered)}
date={moment(event.start).format('DD.MM.YYYY')}
startTime={moment(event.start).format('HH:mm')}
endTime={moment(event.end).format('HH:mm')}
/>
</BoxDescription>
{ this.renderRegisterContainer() }
</View>
);
}
}
Activity.propTypes = {
event: React.PropTypes.object,
};
const styles = StyleSheet.create({
boxContainerAndroid: {
elevation: 4,
backgroundColor: '#233445',
paddingTop: 10,
paddingLeft: 15,
margin: 10,
},
boxContainerIOS: {
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 0
},
shadowRadius: 1.5,
shadowOpacity: 0.5,
backgroundColor: '#233445',
paddingTop: 10,
paddingLeft: 15,
margin: 10,
},
});
| 31.349398 | 118 | 0.553036 |
3d1a68fced721b99b801c7eedc318b5d6ed9227a | 2,701 | js | JavaScript | test/Adoption.test.js | ibraheem4/pet-shop | 5a50c11e9da1e94c9c608322e58c7b402a99e747 | [
"MIT"
] | null | null | null | test/Adoption.test.js | ibraheem4/pet-shop | 5a50c11e9da1e94c9c608322e58c7b402a99e747 | [
"MIT"
] | 6 | 2021-09-02T20:44:32.000Z | 2022-02-27T13:37:58.000Z | test/Adoption.test.js | ibraheem4/pet-shop | 5a50c11e9da1e94c9c608322e58c7b402a99e747 | [
"MIT"
] | 1 | 2021-05-13T13:59:50.000Z | 2021-05-13T13:59:50.000Z | // https://docs.openzeppelin.com/learn/writing-automated-tests
// Load dependencies
const { accounts, contract } = require("@openzeppelin/test-environment");
const { expect } = require("chai");
const assert = require("assert");
const { expectRevert } = require("@openzeppelin/test-helpers");
// Load compiled artifacts
const Adoption = contract.fromArtifact("Adoption");
// Setup test constants
const expectedAnimalId = 8;
const nonOwnerErrorString = "Ownable: caller is not the owner -- Reason given: Ownable: caller is not the owner.";
// Test functions
// https://ethereum.stackexchange.com/a/39172
function assertEventOfType(response, eventName, index) {
assert.strictEqual(response.logs[index].event, eventName, eventName + " event should fire.");
}
describe("Adoption", function () {
// These conveniences are provided by openzeppelin/test-environment
const [owner, other] = accounts;
beforeEach(async function () {
// Set each adoption to be adopted by the contract owner
this.adoption = await Adoption.new({ from: owner });
});
it("deployer is the owner", async function () {
expect(await this.adoption.owner()).to.equal(owner);
});
it("owner may set a nickname", async function () {
const nicknamedAnimal = await this.adoption.setNickname("Roscoe", { from: owner });
assertEventOfType(nicknamedAnimal, "NicknamedAnimal", 0);
expect(await this.adoption.getNickname()).to.equal("Roscoe");
});
it("owner may claim an animal", async function () {
const claimedAnimal = await this.adoption.claimAnimal(expectedAnimalId, { from: owner });
assertEventOfType(claimedAnimal, "ClaimedAnimal", 0);
const animalAdopters = await this.adoption.getAnimalAdopters();
expect(animalAdopters[expectedAnimalId]).to.equal(owner);
});
it("non-owner may not claim an animal", async function () {
await expectRevert(this.adoption.claimAnimal(expectedAnimalId, { from: other }), nonOwnerErrorString);
});
it("owner may release an animal", async function () {
const releaseAnimal = await this.adoption.releaseAnimal(expectedAnimalId, { from: owner });
assertEventOfType(releaseAnimal, "ReleasedAnimal", 0);
const animalAdopters = await this.adoption.getAnimalAdopters();
expect(animalAdopters[expectedAnimalId]).to.equal("0x0000000000000000000000000000000000000000");
});
it("non-owner may not release an animal", async function () {
await expectRevert(this.adoption.releaseAnimal(expectedAnimalId, { from: other }), nonOwnerErrorString);
});
it("non-owner may not set a nickname", async function () {
await expectRevert(this.adoption.setNickname({ from: other }), nonOwnerErrorString);
});
});
| 38.042254 | 114 | 0.723806 |
3d1b50eccd180dbb1a97e45687e2a22542e24228 | 1,024 | js | JavaScript | public/js/zombie.js | lakhalouahid/reseaux-de-neurones-web | 26d57292c7a235dd6eac04932ce86a5aa56bc1c6 | [
"MIT"
] | null | null | null | public/js/zombie.js | lakhalouahid/reseaux-de-neurones-web | 26d57292c7a235dd6eac04932ce86a5aa56bc1c6 | [
"MIT"
] | null | null | null | public/js/zombie.js | lakhalouahid/reseaux-de-neurones-web | 26d57292c7a235dd6eac04932ce86a5aa56bc1c6 | [
"MIT"
] | null | null | null | function predict(){
let xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200){
let response = JSON.parse(this.responseText);
console.log(response);
zombie_label = ["Sain", "Infecté"];
zombie_color = ["green", "red"];
console.log(document.getElementById("result"));
document.getElementById("result").innerHTML = zombie_label[response["result"]];
document.getElementById("result").style.color = zombie_color[response["result"]];
}
};
xmlhttp.open("POST", "/zombie", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
dataset = document.querySelector('input[name="dataset"]:checked').value;
x1 = document.getElementById("x1").value;
x2 = document.getElementById("x2").value;
xmlhttp.send("dataset="+dataset+"&x1="+x1+"&x2="+x2);
}
submit_btn = document.getElementById("submit-btn");
console.log(submit_btn);
submit_btn.addEventListener("click", predict);
| 40.96 | 87 | 0.688477 |
3d1c4fb32d30c31fa64e61cf0e09f210492a218d | 543 | js | JavaScript | src/ex3_js-objects-part1/task-06.js | Daria989/external-courses | 093bada20876b77de50b25b8cfcedc60a56270a9 | [
"MIT"
] | null | null | null | src/ex3_js-objects-part1/task-06.js | Daria989/external-courses | 093bada20876b77de50b25b8cfcedc60a56270a9 | [
"MIT"
] | 4 | 2021-03-20T11:08:58.000Z | 2021-06-04T20:32:27.000Z | src/ex3_js-objects-part1/task-06.js | Daria989/external-courses | 093bada20876b77de50b25b8cfcedc60a56270a9 | [
"MIT"
] | null | null | null | function nestedClone(object) {
let newObj = {};
for (let key in object) {
if (typeof object[key] === "object" && !Array.isArray(object[key]) && object[key] !== null) {
newObj[key] = nestedClone(object[key]);
}
else if (Array.isArray(object[key])) {
newObj[key] = object[key].map(a => Object.assign({}, a));
}
else {
newObj[key] = object[key];
}
}
return newObj;
}
module.exports = nestedClone;
| 28.578947 | 105 | 0.473297 |
3d1c982fdc070d2902c669644b386dc068fe299b | 727 | js | JavaScript | src/line2path.js | mapbox/shape2path | 22f5e66dee8c30e25744b4c3d63b2bbb79dff2d3 | [
"MIT"
] | 1 | 2020-07-22T07:48:30.000Z | 2020-07-22T07:48:30.000Z | src/line2path.js | mapbox/shape2path | 22f5e66dee8c30e25744b4c3d63b2bbb79dff2d3 | [
"MIT"
] | null | null | null | src/line2path.js | mapbox/shape2path | 22f5e66dee8c30e25744b4c3d63b2bbb79dff2d3 | [
"MIT"
] | 1 | 2021-02-23T10:44:43.000Z | 2021-02-23T10:44:43.000Z | export default function line2path(options){
if (!options){
throw Error("You must pass options to shape2path.line()");
} else {
if (options.x1 == undefined) {
throw Error("You must pass x1 as an option to shape2path.line()");
} else if (options.x2 == undefined) {
throw Error("You must pass x2 as an option to shape2path.line()");
} else if (options.y1 == undefined) {
throw Error("You must pass y1 as an option to shape2path.line()");
} else if (options.y2 == undefined) {
throw Error("You must pass y2 as an option to shape2path.line()");
}
}
var x1 = options.x1, x2 = options.x2, y1 = options.y1, y2 = options.y2;
return "M" + x1 + "," + y1 + " L" + x2 + "," + y2;
} | 40.388889 | 73 | 0.612105 |
3d1cf50a39d15abb39f5c91aaceaa24f3fdf26d5 | 2,766 | js | JavaScript | js/views/EmployeeView.js | JhonLP/crossplatform | 1c1b36da3a78c24384518dac1011ca83a5cc3bd9 | [
"MIT"
] | 1 | 2015-10-23T23:16:07.000Z | 2015-10-23T23:16:07.000Z | js/views/EmployeeView.js | CarlosQuinto/crossplatform | 1c1b36da3a78c24384518dac1011ca83a5cc3bd9 | [
"MIT"
] | null | null | null | js/views/EmployeeView.js | CarlosQuinto/crossplatform | 1c1b36da3a78c24384518dac1011ca83a5cc3bd9 | [
"MIT"
] | 1 | 2015-10-24T00:09:00.000Z | 2015-10-24T00:09:00.000Z | var EmployeeView = function(employee) {
this.initialize = function() {
this.$el = $('<div/>');
this.$el.on('click', '.add-location-btn', this.addLocation); //registramos el listener de geolocalizacion
this.$el.on('click', '.add-contact-btn', this.addToContacts); //registramos el listener de añadir contacto
this.$el.on('click', '.change-pic-btn', this.changePicture); //registramos el listener de cambiar foto
};
this.render = function() {
this.$el.html(this.template(employee));
return this;
};
this.addLocation = function(event) {
event.preventDefault(); //evitamos el comportamiento por default de la geolocalizacion
navigator.geolocation.getCurrentPosition( //obtenemos la posicion actual
function(position) {
alert(position.coords.latitude + ',' + position.coords.longitude); //mostramos las cordenadas
},
function() {
alert('Error obteniendo la geolocalizacion');
});
return false;
};
this.addToContacts = function(event) {
event.preventDefault();
console.log('addToContacts');
if (!navigator.contacts) { //comprobamos que existe la funcion de contactos
alert("Funcion no soportada", "Error");
return;
}
var contact = navigator.contacts.create(); //llamamos a la api de contactos
contact.name = {givenName: employee.firstName, familyName: employee.lastName}; //asignamos los valores con la informacion del contacto
var phoneNumbers = []; //creamos un arreglo
phoneNumbers[0] = new ContactField('work', employee.officePhone, false); //le asignamos el numero de trabajo
phoneNumbers[1] = new ContactField('mobile', employee.cellPhone, true); //le asignamos el numero de celular
contact.phoneNumbers = phoneNumbers; //añadimos los numeros
contact.save(); //guardamos el contacto
return false;
};
this.changePicture = function(event) {
event.preventDefault();
if (!navigator.camera) { //comprobamos que existe la funcion de camara
alert("Funcion de camara no soportada", "Error");
return;
}
var options = { quality: 50, //calidad de la imagen
destinationType: Camera.DestinationType.DATA_URL, //destino temporal
sourceType: 1, // 0:Galeria, 1=Camara, 2=Imagenes Guardadas
encodingType: 0 // 0=JPG 1=PNG
};
navigator.camera.getPicture( //llamamos a la camara
function(imgData) {
$('.media-object', this.$el).attr('src', "data:image/jpeg;base64,"+imgData); //ponemos la foto en el contacto
},
function() {
alert('Error al tomar la foto', 'Error');
},
options);
return false;
};
this.initialize();
}
| 38.957746 | 138 | 0.646421 |
3d1d8a54a43ef6b35996c8cbf1d11bfb4436ff35 | 493 | js | JavaScript | src/js/05form.js | Adalab/project-promo-l-module-2-team-2 | 2718e95af0d46a4e3bfd25c0edf23c25599a2bb6 | [
"MIT"
] | 2 | 2021-04-05T19:10:32.000Z | 2021-04-14T10:22:55.000Z | src/js/05form.js | saramartara/project-promo-l-module-2-team-2 | 25807fdfbb0729af3bb23a2d44b96dbd4cf49113 | [
"MIT"
] | 48 | 2021-01-19T11:39:19.000Z | 2021-02-05T16:18:50.000Z | src/js/05form.js | saramartara/project-promo-l-module-2-team-2 | 25807fdfbb0729af3bb23a2d44b96dbd4cf49113 | [
"MIT"
] | 5 | 2021-02-17T14:27:56.000Z | 2021-04-07T11:38:00.000Z | 'use strict';
const form = document.querySelector('.js-form');
function handleSubmit(ev) {
ev.preventDefault();
}
form.addEventListener('submit', handleSubmit);
function handle13Keydown(ev) {
<<<<<<< HEAD
var keyCode = event.which;
if (keyCode == 13) {
=======
var keyCode = ev.which;
if (keyCode === 13) {
>>>>>>> 5d77700d6228253b3ba3a94fe0185d76a385d268
ev.preventDefault();
return false;
}
}
form.addEventListener('keydown', handle13Keydown);
| 20.541667 | 51 | 0.64503 |
3d1f4fa57b831390c34f23ab7424bf438f04f0d0 | 1,119 | js | JavaScript | App.js | icodeidea/swiftlynx-mobile-app | b2af5859759c21de071cec5a1f1cd71376ea9d2c | [
"MIT"
] | null | null | null | App.js | icodeidea/swiftlynx-mobile-app | b2af5859759c21de071cec5a1f1cd71376ea9d2c | [
"MIT"
] | null | null | null | App.js | icodeidea/swiftlynx-mobile-app | b2af5859759c21de071cec5a1f1cd71376ea9d2c | [
"MIT"
] | null | null | null | /**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React, { useState } from 'react';
import type {Node} from 'react';
import {
StatusBar,
useColorScheme,
} from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import SplashScreen from "react-native-splash-screen";
import {SharedComponent} from './app/components';
import MainApp from './app/mainApp';
const App: () => Node = () => {
//Hide Splash screen on app load.
React.useEffect(() => {
SplashScreen.hide();
});
const [isNewToApp, setNewToApp] = useState(true);
const isDarkMode = useColorScheme() === 'dark';
const getStarted = () => {
setNewToApp(false);
}
return (
<>
{
!isNewToApp && (
<NavigationContainer>
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<MainApp/>
</NavigationContainer>
)
}
{
isNewToApp && <SharedComponent.OnBoarding getStarted={getStarted}/>
}
</>
);
};
export default App;
| 21.113208 | 82 | 0.607685 |
3d20546106cf20958abafc74fd3fb54a4e8e562e | 3,311 | js | JavaScript | test/request_test.js | kxbin/yak | 4702ab9e4b2bc93da9c68afe73e52b6d505114c2 | [
"MIT"
] | 21 | 2015-10-01T13:42:08.000Z | 2022-03-26T03:38:48.000Z | test/request_test.js | kxbin/yak | 4702ab9e4b2bc93da9c68afe73e52b6d505114c2 | [
"MIT"
] | 2 | 2016-04-13T14:48:46.000Z | 2016-04-13T14:50:07.000Z | test/request_test.js | kxbin/yak | 4702ab9e4b2bc93da9c68afe73e52b6d505114c2 | [
"MIT"
] | 4 | 2016-01-24T23:46:02.000Z | 2021-09-26T06:20:11.000Z | var assert = require('assert');
var sinon = require('sinon');
var rewire = require('rewire');
var request = rewire('../lib/request');
var context = new function() {
this.attrs = { id: 5 };
this.request = request;
}
var yaySpy = sinon.spy();
var naySpy = sinon.spy();
describe('Request', function() {
describe('200 response', function() {
before(function() {
var fetchSpy = this.fetchSpy = sinon.stub();
request.__set__({
fetch: fetchSpy,
});
fetchSpy.returns(
new Promise(function(resolve, reject) {
resolve({
status: 200,
headers: {
get: function() {
return 'application/json; charset=utf-8';
}
},
json: function() {
return new Promise(function(resolve, reject) {
resolve({ foo: "bar" });
})
},
});
})
);
return context.request('POST', 'http://lolcat.com/', {
success: yaySpy,
error: naySpy,
}, {
'random-header' : 'lol'
}
)
});
it('should return JSON', function() {
assert(yaySpy.calledWith({ foo: 'bar'}));
});
it('should call fetch', function() {
assert.deepEqual(this.fetchSpy.args[0],
['http://lolcat.com/', {
method: 'POST',
body: '{"id":5}',
headers: {
'Content-Type': 'application/json',
'random-header': 'lol'
}
}]
);
});
});
describe('500 json response', function() {
before(function() {
var fetchSpy = this.fetchSpy = sinon.stub();
request.__set__({
fetch: fetchSpy,
});
fetchSpy.returns(
new Promise(function(resolve) {
resolve({
status: 500,
headers: {
get: function() {
return 'application/json';
}
},
json: function() {
return new Promise(function(resolve, reject) {
resolve("lolol");
})
},
});
})
);
context.request('POST', 'http://lolcat.com/', {
success: yaySpy,
error: naySpy,
})
});
it('should return json error', function() {
assert.equal(naySpy.args[0][1], 'lolol');
assert.equal(naySpy.args[0][2], 500);
});
});
describe('500 text response', function() {
before(function() {
var fetchSpy = this.fetchSpy = sinon.stub();
request.__set__({
fetch: fetchSpy,
});
fetchSpy.returns(
new Promise(function(resolve) {
resolve({
status: 500,
headers: {
get: function() {
return 'text/plain';
}
},
text: function() {
return new Promise(function(resolve, reject) {
resolve('troll');
})
},
});
})
);
context.request('POST', 'http://lolcat.com/', {
success: yaySpy,
error: naySpy,
})
});
it('should return text error', function() {
assert.equal(naySpy.args[1][1], 'troll');
assert.equal(naySpy.args[1][2], 500);
});
});
});
| 25.666667 | 60 | 0.462398 |
3d20d5a8f8147be80776bf130007de22ee4a0e0f | 390 | js | JavaScript | routes/auth.js | raximvodil/CRM-project | 8427b8a0c7add6efde0c946104c4bf8c4a57ec92 | [
"Apache-2.0"
] | null | null | null | routes/auth.js | raximvodil/CRM-project | 8427b8a0c7add6efde0c946104c4bf8c4a57ec92 | [
"Apache-2.0"
] | null | null | null | routes/auth.js | raximvodil/CRM-project | 8427b8a0c7add6efde0c946104c4bf8c4a57ec92 | [
"Apache-2.0"
] | null | null | null | const { Router } = require("express");
const router = Router();
const {
register,
login,
forgotPassword,
resetPassword,
} = require("../controllers/auth");
router.route("/register").post(register);
router.route("/login").post(login);
router.route("/forgotpassword").post(forgotPassword);
router.route("/passwordreset/:resetToken").put(resetPassword);
module.exports = router;
| 19.5 | 62 | 0.710256 |
3d21c4fee0dd10ad47157296c133d8aa8d3376df | 612 | js | JavaScript | public/js/3d-flip-book/js/libs.js | Muhammad9272/Dealzbook | 71639913d11ff347603dede056f72de273de67d1 | [
"MIT"
] | null | null | null | public/js/3d-flip-book/js/libs.js | Muhammad9272/Dealzbook | 71639913d11ff347603dede056f72de273de67d1 | [
"MIT"
] | 4 | 2021-02-02T18:00:21.000Z | 2022-02-19T01:00:41.000Z | public/flipper/js/libs.js | kjayru/revistadigital | 7041aa8622978b74533c85fd8e9b764019954ecb | [
"MIT"
] | null | null | null | const _$ = GLOBAL_LIBS.jQuery? window.jQuery: require('jquery'),
_html2canvas = GLOBAL_LIBS.html2canvas? window.html2canvas: require('html2canvas'),
_THREE = GLOBAL_LIBS.THREE? window.THREE: require('three'),
_PDFJS = GLOBAL_LIBS.PDFJS? window.PDFJS: require('pdfjs'),
_tr = (s)=> (window.iberezansky || {}).tr && window.iberezansky.tr(s) || s;
if(window.FB3D_LOCALE) {
window.iberezansky = {
...window.iberezansky,
tr: (s)=> (FB3D_LOCALE.dictionary || {})[s] || s
};
}
export {
_$ as $,
_html2canvas as html2canvas,
_THREE as THREE,
_PDFJS as PDFJS,
_tr as tr
};
| 29.142857 | 89 | 0.648693 |
3d2264ae49d550c91fe0a76bb921b3dc85dec5db | 14,623 | js | JavaScript | docs/implementors/core/iter/traits/double_ended/trait.DoubleEndedIterator.js | bitcoinmw/rustlet | 5930bc16f5b6028dc4427036f20e8b80520dcae0 | [
"Apache-2.0"
] | null | null | null | docs/implementors/core/iter/traits/double_ended/trait.DoubleEndedIterator.js | bitcoinmw/rustlet | 5930bc16f5b6028dc4427036f20e8b80520dcae0 | [
"Apache-2.0"
] | null | null | null | docs/implementors/core/iter/traits/double_ended/trait.DoubleEndedIterator.js | bitcoinmw/rustlet | 5930bc16f5b6028dc4427036f20e8b80520dcae0 | [
"Apache-2.0"
] | 1 | 2021-12-09T05:20:23.000Z | 2021-12-09T05:20:23.000Z | (function() {var implementors = {};
implementors["arrayvec"] = [{"text":"impl<A: <a class=\"trait\" href=\"arrayvec/trait.Array.html\" title=\"trait arrayvec::Array\">Array</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"arrayvec/struct.IntoIter.html\" title=\"struct arrayvec::IntoIter\">IntoIter</a><A>","synthetic":false,"types":["arrayvec::IntoIter"]},{"text":"impl<'a, A: <a class=\"trait\" href=\"arrayvec/trait.Array.html\" title=\"trait arrayvec::Array\">Array</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"arrayvec/struct.Drain.html\" title=\"struct arrayvec::Drain\">Drain</a><'a, A> <span class=\"where fmt-newline\">where<br> A::<a class=\"type\" href=\"arrayvec/trait.Array.html#associatedtype.Item\" title=\"type arrayvec::Array::Item\">Item</a>: 'a, </span>","synthetic":false,"types":["arrayvec::Drain"]}];
implementors["clap"] = [{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"clap/struct.Values.html\" title=\"struct clap::Values\">Values</a><'a>","synthetic":false,"types":["clap::args::arg_matches::Values"]},{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"clap/struct.OsValues.html\" title=\"struct clap::OsValues\">OsValues</a><'a>","synthetic":false,"types":["clap::args::arg_matches::OsValues"]}];
implementors["memchr"] = [{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"memchr/struct.Memchr.html\" title=\"struct memchr::Memchr\">Memchr</a><'a>","synthetic":false,"types":["memchr::memchr::iter::Memchr"]},{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"memchr/struct.Memchr2.html\" title=\"struct memchr::Memchr2\">Memchr2</a><'a>","synthetic":false,"types":["memchr::memchr::iter::Memchr2"]},{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"memchr/struct.Memchr3.html\" title=\"struct memchr::Memchr3\">Memchr3</a><'a>","synthetic":false,"types":["memchr::memchr::iter::Memchr3"]}];
implementors["nix"] = [{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"nix/sys/select/struct.Fds.html\" title=\"struct nix::sys::select::Fds\">Fds</a><'a>","synthetic":false,"types":["nix::sys::select::Fds"]}];
implementors["openssl"] = [{"text":"impl<T: <a class=\"trait\" href=\"openssl/stack/trait.Stackable.html\" title=\"trait openssl::stack::Stackable\">Stackable</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"openssl/stack/struct.IntoIter.html\" title=\"struct openssl::stack::IntoIter\">IntoIter</a><T>","synthetic":false,"types":["openssl::stack::IntoIter"]},{"text":"impl<'a, T: <a class=\"trait\" href=\"openssl/stack/trait.Stackable.html\" title=\"trait openssl::stack::Stackable\">Stackable</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"openssl/stack/struct.Iter.html\" title=\"struct openssl::stack::Iter\">Iter</a><'a, T>","synthetic":false,"types":["openssl::stack::Iter"]},{"text":"impl<'a, T: <a class=\"trait\" href=\"openssl/stack/trait.Stackable.html\" title=\"trait openssl::stack::Stackable\">Stackable</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"openssl/stack/struct.IterMut.html\" title=\"struct openssl::stack::IterMut\">IterMut</a><'a, T>","synthetic":false,"types":["openssl::stack::IterMut"]}];
implementors["regex"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"regex/struct.SetMatchesIntoIter.html\" title=\"struct regex::SetMatchesIntoIter\">SetMatchesIntoIter</a>","synthetic":false,"types":["regex::re_set::unicode::SetMatchesIntoIter"]},{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"regex/struct.SetMatchesIter.html\" title=\"struct regex::SetMatchesIter\">SetMatchesIter</a><'a>","synthetic":false,"types":["regex::re_set::unicode::SetMatchesIter"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"regex/bytes/struct.SetMatchesIntoIter.html\" title=\"struct regex::bytes::SetMatchesIntoIter\">SetMatchesIntoIter</a>","synthetic":false,"types":["regex::re_set::bytes::SetMatchesIntoIter"]},{"text":"impl<'a> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"regex/bytes/struct.SetMatchesIter.html\" title=\"struct regex::bytes::SetMatchesIter\">SetMatchesIter</a><'a>","synthetic":false,"types":["regex::re_set::bytes::SetMatchesIter"]}];
implementors["slab"] = [{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"slab/struct.IntoIter.html\" title=\"struct slab::IntoIter\">IntoIter</a><T>","synthetic":false,"types":["slab::IntoIter"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"slab/struct.Iter.html\" title=\"struct slab::Iter\">Iter</a><'_, T>","synthetic":false,"types":["slab::Iter"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"slab/struct.IterMut.html\" title=\"struct slab::IterMut\">IterMut</a><'_, T>","synthetic":false,"types":["slab::IterMut"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"slab/struct.Drain.html\" title=\"struct slab::Drain\">Drain</a><'_, T>","synthetic":false,"types":["slab::Drain"]}];
implementors["syn"] = [{"text":"impl<'a, T, P> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"syn/punctuated/struct.Pairs.html\" title=\"struct syn::punctuated::Pairs\">Pairs</a><'a, T, P>","synthetic":false,"types":["syn::punctuated::Pairs"]},{"text":"impl<'a, T, P> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"syn/punctuated/struct.PairsMut.html\" title=\"struct syn::punctuated::PairsMut\">PairsMut</a><'a, T, P>","synthetic":false,"types":["syn::punctuated::PairsMut"]},{"text":"impl<T, P> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"syn/punctuated/struct.IntoPairs.html\" title=\"struct syn::punctuated::IntoPairs\">IntoPairs</a><T, P>","synthetic":false,"types":["syn::punctuated::IntoPairs"]},{"text":"impl<T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"syn/punctuated/struct.IntoIter.html\" title=\"struct syn::punctuated::IntoIter\">IntoIter</a><T>","synthetic":false,"types":["syn::punctuated::IntoIter"]},{"text":"impl<'a, T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"syn/punctuated/struct.Iter.html\" title=\"struct syn::punctuated::Iter\">Iter</a><'a, T>","synthetic":false,"types":["syn::punctuated::Iter"]},{"text":"impl<'a, T> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"syn/punctuated/struct.IterMut.html\" title=\"struct syn::punctuated::IterMut\">IterMut</a><'a, T>","synthetic":false,"types":["syn::punctuated::IterMut"]}];
implementors["vec_map"] = [{"text":"impl<'a, V> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"vec_map/struct.Iter.html\" title=\"struct vec_map::Iter\">Iter</a><'a, V>","synthetic":false,"types":["vec_map::Iter"]},{"text":"impl<'a, V> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"vec_map/struct.IterMut.html\" title=\"struct vec_map::IterMut\">IterMut</a><'a, V>","synthetic":false,"types":["vec_map::IterMut"]},{"text":"impl<'a, V> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"vec_map/struct.Drain.html\" title=\"struct vec_map::Drain\">Drain</a><'a, V>","synthetic":false,"types":["vec_map::Drain"]},{"text":"impl<'a, V> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"vec_map/struct.Keys.html\" title=\"struct vec_map::Keys\">Keys</a><'a, V>","synthetic":false,"types":["vec_map::Keys"]},{"text":"impl<'a, V> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"vec_map/struct.Values.html\" title=\"struct vec_map::Values\">Values</a><'a, V>","synthetic":false,"types":["vec_map::Values"]},{"text":"impl<'a, V> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"vec_map/struct.ValuesMut.html\" title=\"struct vec_map::ValuesMut\">ValuesMut</a><'a, V>","synthetic":false,"types":["vec_map::ValuesMut"]},{"text":"impl<V> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.54.0/core/iter/traits/double_ended/trait.DoubleEndedIterator.html\" title=\"trait core::iter::traits::double_ended::DoubleEndedIterator\">DoubleEndedIterator</a> for <a class=\"struct\" href=\"vec_map/struct.IntoIter.html\" title=\"struct vec_map::IntoIter\">IntoIter</a><V>","synthetic":false,"types":["vec_map::IntoIter"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() | 1,329.363636 | 2,880 | 0.721193 |
3d2298d4542c4c78f71f2daaf4d8a34a7869aeb3 | 1,371 | js | JavaScript | src/js/views/App.js | lmorchard/fxos-dropbox-photo-upload | 8d18a368c871ba3757c9ee456ee53503307774d1 | [
"MIT"
] | 1 | 2015-08-10T02:25:24.000Z | 2015-08-10T02:25:24.000Z | src/js/views/App.js | lmorchard/fxos-dropbox-photo-upload | 8d18a368c871ba3757c9ee456ee53503307774d1 | [
"MIT"
] | null | null | null | src/js/views/App.js | lmorchard/fxos-dropbox-photo-upload | 8d18a368c871ba3757c9ee456ee53503307774d1 | [
"MIT"
] | null | null | null | var App = require('ampersand-app');
var View = require('ampersand-view');
var ViewSwitcher = require('ampersand-view-switcher');
module.exports = View.extend({
template: `
<section class="app home">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger"></label>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#settings">Settings</a></li>
<li><a href="#log">Log</a></li>
<li><a href="#about">About</a></li>
</ul>
</nav>
<header>
<h1 class="title">
<span>Camera Uploader</span>
</h1>
</header>
<section class="main" data-hook="main"></section>
</section>
`,
bindings: {
},
events: {
},
initialize: function () {
this.listenTo(App, 'page', this.handleNewPage);
},
handleNewPage: function (view) {
window.scrollTo(0, 0);
this.el.querySelector('#nav-trigger').checked = false;
this.switcher.set(view);
},
render: function () {
var self = this;
this.renderWithTemplate(this);
this.switcher = new ViewSwitcher(this.queryByHook('main'), {
hide: function (oldView, cb) {
return cb();
},
show: function (newView) {
self.el.className = 'app ' + newView.viewClass;
}
});
return this;
}
});
| 20.462687 | 68 | 0.547046 |
3d22a39af632da521e61ef56e082147bf2eaf1da | 2,301 | js | JavaScript | app/react/Connections/components/ActionButton.js | morrismukiri/uwazi | efcdb9a2d6d2f190f747c5f990d07e7a24e84a08 | [
"MIT"
] | null | null | null | app/react/Connections/components/ActionButton.js | morrismukiri/uwazi | efcdb9a2d6d2f190f747c5f990d07e7a24e84a08 | [
"MIT"
] | null | null | null | app/react/Connections/components/ActionButton.js | morrismukiri/uwazi | efcdb9a2d6d2f190f747c5f990d07e7a24e84a08 | [
"MIT"
] | null | null | null | import PropTypes from 'prop-types';
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {saveConnection, selectRangedTarget} from '../actions/actions';
import validate from 'validate.js';
export class ActionButton extends Component {
onClick(enabled, connection) {
if (enabled) {
if (this.props.action === 'save') {
this.props.saveConnection(connection, this.props.onCreate);
}
if (this.props.action === 'connect') {
this.props.selectRangedTarget(connection, this.props.onRangedConnect);
}
}
}
render() {
const connection = this.props.connection.toJS();
const validator = {
sourceDocument: {presence: true},
targetDocument: {presence: true},
template: {presence: true}
};
if (this.props.type === 'basic') {
delete connection.sourceRange;
}
if (this.props.type !== 'basic') {
validator.sourceRange = {presence: true};
}
const connectionValid = !validate(connection, validator);
const enabled = connectionValid && !this.props.busy;
const buttonClass = this.props.action === 'save' ? 'btn btn-success' : 'edit-metadata btn btn-success';
const iClass = this.props.action === 'save' ? 'fa fa-save' : 'fa fa-arrow-right';
return (
<button className={buttonClass}
disabled={!enabled}
onClick={this.onClick.bind(this, enabled, connection)}>
<i className={this.props.busy ? 'fa fa-spinner fa-spin' : iClass}></i>
</button>
);
}
}
ActionButton.propTypes = {
type: PropTypes.string,
connection: PropTypes.object,
saveConnection: PropTypes.func,
selectRangedTarget: PropTypes.func,
onCreate: PropTypes.func,
onRangedConnect: PropTypes.func,
action: PropTypes.string,
busy: PropTypes.bool
};
export function mapStateToProps({connections}) {
return {
type: connections.connection.get('type'),
connection: connections.connection,
busy: connections.uiState.get('creating') || connections.uiState.get('connecting')
};
}
function mapDispatchToProps(dispatch) {
return bindActionCreators({saveConnection, selectRangedTarget}, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(ActionButton);
| 29.883117 | 107 | 0.677532 |
3d22afcc6f311bae1ccc5a378e75d10817cd8ada | 823 | js | JavaScript | First Project/js/source/ellipse.js | AvekvistSeffra/p5-Projects | e2c13c11d4771766f760820e232c3b1faf36289b | [
"MIT"
] | 1 | 2018-10-15T17:17:05.000Z | 2018-10-15T17:17:05.000Z | First Project/js/source/ellipse.js | AvekvistSeffra/p5-Projects | e2c13c11d4771766f760820e232c3b1faf36289b | [
"MIT"
] | null | null | null | First Project/js/source/ellipse.js | AvekvistSeffra/p5-Projects | e2c13c11d4771766f760820e232c3b1faf36289b | [
"MIT"
] | null | null | null | function Vector(x, y) {
this.x = x;
this.y = y;
this.Add = function(other) {
this.x += other.x;
this.y += other.y;
}
}
function Ellipse(x, y, width, height, colour) {
this.position = new Vector(x, y);
this.velocity = new Vector(0, 0);
this.acceleration = new Vector(0, 0);
this.width = width;
this.height = height;
this.colour = colour;
this.Draw = function() {
fill(this.colour);
ellipse(this.position.x, this.position.y, this.width, this.height);
}
this.Accelerate = function(acceleration) {
this.velocity.Add(acceleration);
}
this.Move = function() {
this.position.Add(this.velocity);
}
this.SetX = function(x) {
this.x = x;
}
this.SetY = function(y) {
this.y = y;
}
}
| 20.575 | 75 | 0.552855 |
3d24672df450a0dcca7bd98b7ea3b40cce959b3f | 14,707 | js | JavaScript | test/rules.js | KevinDoughty/zxchess | bed7064d37d04bc0d2fa73b35ef804bd7cd3fb55 | [
"MIT"
] | null | null | null | test/rules.js | KevinDoughty/zxchess | bed7064d37d04bc0d2fa73b35ef804bd7cd3fb55 | [
"MIT"
] | null | null | null | test/rules.js | KevinDoughty/zxchess | bed7064d37d04bc0d2fa73b35ef804bd7cd3fb55 | [
"MIT"
] | null | null | null | import { importFen, exportFen } from "../source/game.js";
import { everyPossiblePosition } from "../source/rules.js";
const chalk = require("chalk");
// const assert = require("assert");
// const mocha = require("mocha");
//const assert = chai.assert;
// const importFen = ZXChess.importFen;
// const exportFen = ZXChess.exportFen;
// const everyPossiblePosition = ZXChess.everyPossiblePosition;
const assert = {
equal: function(a,b) {
return (a === b);
}
};
const describe = function(name, func) {
console.log(name);
func();
}
const it = function(name, func) {
console.log(name);
func();
}
const max = 50000;
const full = `rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 ;D1 20 ;D2 400 ;D3 8902 ;D4 197281
k7/8/8/3p4/4p3/8/8/7K b - - 0 1 ;D1 5 ;D2 15 ;D3 102 ;D4 569 ;D5 4337 ;D6 22579
k7/8/8/3p4/8/4p3/8/7K w - - 0 2 ;D1 3 ;D2 15 ;D3 80 ;D4 592
k7/8/8/3p4/8/4p3/8/6K1 b - - 1 2 ;D1 5 ;D2 20 ;D3 148
k7/8/8/3p4/8/8/4p3/6K1 w - - 0 3 ;D1 4 ;D2 32
k7/8/8/3p4/8/8/4p2K/8 b - - 1 3 ;D1 8
k7/8/8/3p4/8/8/4p3/7K b - - 1 3 ;D1 8
k7/8/8/3p4/8/8/4pK2/8 b - - 1 3 ;D1 8
k7/8/8/3p4/8/8/4p1K1/8 b - - 1 3 ;D1 8
k7/8/8/3p4/8/4p3/6K1/8 b - - 1 2 ;D1 5 ;D2 35 ;D3 259
k7/8/8/3p4/8/4p3/7K/8 b - - 1 2 ;D1 5 ;D2 25 ;D3 185
k7/8/8/8/3pp3/8/8/7K w - - 0 2 ;D1 3 ;D2 15 ;D3 84 ;D4 573
8/k7/8/3p4/4p3/8/8/7K w - - 1 2 ;D1 3 ;D2 21 ;D3 118 ;D4 894
8/1k6/8/3p4/4p3/8/8/7K w - - 1 2 ;D1 3 ;D2 30 ;D3 169 ;D4 1384
1k6/8/8/3p4/4p3/8/8/7K w - - 1 2 ;D1 3 ;D2 21 ;D3 118 ;D4 894
r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1 ;D1 48 ;D2 2039 ;D3 97862 ;D4 4085603 ;D5 193690690 ;D6 8031647685
4k3/8/8/8/8/8/8/4K2R w K - 0 1 ;D1 15 ;D2 66 ;D3 1197 ;D4 7059 ;D5 133987 ;D6 764643
4k3/8/8/8/8/8/8/R3K3 w Q - 0 1 ;D1 16 ;D2 71 ;D3 1287 ;D4 7626 ;D5 145232 ;D6 846648
4k2r/8/8/8/8/8/8/4K3 w k - 0 1 ;D1 5 ;D2 75 ;D3 459 ;D4 8290 ;D5 47635 ;D6 899442
r3k3/8/8/8/8/8/8/4K3 w q - 0 1 ;D1 5 ;D2 80 ;D3 493 ;D4 8897 ;D5 52710 ;D6 1001523
4k3/8/8/8/8/8/8/R3K2R w KQ - 0 1 ;D1 26 ;D2 112 ;D3 3189 ;D4 17945 ;D5 532933 ;D6 2788982
r3k2r/8/8/8/8/8/8/4K3 w kq - 0 1 ;D1 5 ;D2 130 ;D3 782 ;D4 22180 ;D5 118882 ;D6 3517770
8/8/8/8/8/8/6k1/4K2R w K - 0 1 ;D1 12 ;D2 38 ;D3 564 ;D4 2219 ;D5 37735 ;D6 185867
8/8/8/8/8/8/1k6/R3K3 w Q - 0 1 ;D1 15 ;D2 65 ;D3 1018 ;D4 4573 ;D5 80619 ;D6 413018
4k2r/6K1/8/8/8/8/8/8 w k - 0 1 ;D1 3 ;D2 32 ;D3 134 ;D4 2073 ;D5 10485 ;D6 179869
r3k3/1K6/8/8/8/8/8/8 w q - 0 1 ;D1 4 ;D2 49 ;D3 243 ;D4 3991 ;D5 20780 ;D6 367724
r3k2r/8/8/8/8/8/8/R3K2R w KQkq - 0 1 ;D1 26 ;D2 568 ;D3 13744 ;D4 314346 ;D5 7594526 ;D6 179862938
r3k2r/8/8/8/8/8/8/1R2K2R w Kkq - 0 1 ;D1 25 ;D2 567 ;D3 14095 ;D4 328965 ;D5 8153719 ;D6 195629489
r3k2r/8/8/8/8/8/8/2R1K2R w Kkq - 0 1 ;D1 25 ;D2 548 ;D3 13502 ;D4 312835 ;D5 7736373 ;D6 184411439
r3k2r/8/8/8/8/8/8/R3K1R1 w Qkq - 0 1 ;D1 25 ;D2 547 ;D3 13579 ;D4 316214 ;D5 7878456 ;D6 189224276
1r2k2r/8/8/8/8/8/8/R3K2R w KQk - 0 1 ;D1 26 ;D2 583 ;D3 14252 ;D4 334705 ;D5 8198901 ;D6 198328929
2r1k2r/8/8/8/8/8/8/R3K2R w KQk - 0 1 ;D1 25 ;D2 560 ;D3 13592 ;D4 317324 ;D5 7710115 ;D6 185959088
r3k1r1/8/8/8/8/8/8/R3K2R w KQq - 0 1 ;D1 25 ;D2 560 ;D3 13607 ;D4 320792 ;D5 7848606 ;D6 190755813
4k3/8/8/8/8/8/8/4K2R b K - 0 1 ;D1 5 ;D2 75 ;D3 459 ;D4 8290 ;D5 47635 ;D6 899442
4k3/8/8/8/8/8/8/R3K3 b Q - 0 1 ;D1 5 ;D2 80 ;D3 493 ;D4 8897 ;D5 52710 ;D6 1001523
4k2r/8/8/8/8/8/8/4K3 b k - 0 1 ;D1 15 ;D2 66 ;D3 1197 ;D4 7059 ;D5 133987 ;D6 764643
r3k3/8/8/8/8/8/8/4K3 b q - 0 1 ;D1 16 ;D2 71 ;D3 1287 ;D4 7626 ;D5 145232 ;D6 846648
4k3/8/8/8/8/8/8/R3K2R b KQ - 0 1 ;D1 5 ;D2 130 ;D3 782 ;D4 22180 ;D5 118882 ;D6 3517770
r3k2r/8/8/8/8/8/8/4K3 b kq - 0 1 ;D1 26 ;D2 112 ;D3 3189 ;D4 17945 ;D5 532933 ;D6 2788982
8/8/8/8/8/8/6k1/4K2R b K - 0 1 ;D1 3 ;D2 32 ;D3 134 ;D4 2073 ;D5 10485 ;D6 179869
8/8/8/8/8/8/1k6/R3K3 b Q - 0 1 ;D1 4 ;D2 49 ;D3 243 ;D4 3991 ;D5 20780 ;D6 367724
4k2r/6K1/8/8/8/8/8/8 b k - 0 1 ;D1 12 ;D2 38 ;D3 564 ;D4 2219 ;D5 37735 ;D6 185867
r3k3/1K6/8/8/8/8/8/8 b q - 0 1 ;D1 15 ;D2 65 ;D3 1018 ;D4 4573 ;D5 80619 ;D6 413018
r3k2r/8/8/8/8/8/8/R3K2R b KQkq - 0 1 ;D1 26 ;D2 568 ;D3 13744 ;D4 314346 ;D5 7594526 ;D6 179862938
r3k2r/8/8/8/8/8/8/1R2K2R b Kkq - 0 1 ;D1 26 ;D2 583 ;D3 14252 ;D4 334705 ;D5 8198901 ;D6 198328929
r3k2r/8/8/8/8/8/8/2R1K2R b Kkq - 0 1 ;D1 25 ;D2 560 ;D3 13592 ;D4 317324 ;D5 7710115 ;D6 185959088
r3k2r/8/8/8/8/8/8/R3K1R1 b Qkq - 0 1 ;D1 25 ;D2 560 ;D3 13607 ;D4 320792 ;D5 7848606 ;D6 190755813
1r2k2r/8/8/8/8/8/8/R3K2R b KQk - 0 1 ;D1 25 ;D2 567 ;D3 14095 ;D4 328965 ;D5 8153719 ;D6 195629489
2r1k2r/8/8/8/8/8/8/R3K2R b KQk - 0 1 ;D1 25 ;D2 548 ;D3 13502 ;D4 312835 ;D5 7736373 ;D6 184411439
r3k1r1/8/8/8/8/8/8/R3K2R b KQq - 0 1 ;D1 25 ;D2 547 ;D3 13579 ;D4 316214 ;D5 7878456 ;D6 189224276
8/1n4N1/2k5/8/8/5K2/1N4n1/8 w - - 0 1 ;D1 14 ;D2 195 ;D3 2760 ;D4 38675 ;D5 570726 ;D6 8107539
8/1k6/8/5N2/8/4n3/8/2K5 w - - 0 1 ;D1 11 ;D2 156 ;D3 1636 ;D4 20534 ;D5 223507 ;D6 2594412
8/8/4k3/3Nn3/3nN3/4K3/8/8 w - - 0 1 ;D1 19 ;D2 289 ;D3 4442 ;D4 73584 ;D5 1198299 ;D6 19870403
K7/8/2n5/1n6/8/8/8/k6N w - - 0 1 ;D1 3 ;D2 51 ;D3 345 ;D4 5301 ;D5 38348 ;D6 588695
k7/8/2N5/1N6/8/8/8/K6n w - - 0 1 ;D1 17 ;D2 54 ;D3 835 ;D4 5910 ;D5 92250 ;D6 688780
8/1n4N1/2k5/8/8/5K2/1N4n1/8 b - - 0 1 ;D1 15 ;D2 193 ;D3 2816 ;D4 40039 ;D5 582642 ;D6 8503277
8/1k6/8/5N2/8/4n3/8/2K5 b - - 0 1 ;D1 16 ;D2 180 ;D3 2290 ;D4 24640 ;D5 288141 ;D6 3147566
8/8/3K4/3Nn3/3nN3/4k3/8/8 b - - 0 1 ;D1 4 ;D2 68 ;D3 1118 ;D4 16199 ;D5 281190 ;D6 4405103
K7/8/2n5/1n6/8/8/8/k6N b - - 0 1 ;D1 17 ;D2 54 ;D3 835 ;D4 5910 ;D5 92250 ;D6 688780
k7/8/2N5/1N6/8/8/8/K6n b - - 0 1 ;D1 3 ;D2 51 ;D3 345 ;D4 5301 ;D5 38348 ;D6 588695
B6b/8/8/8/2K5/4k3/8/b6B w - - 0 1 ;D1 17 ;D2 278 ;D3 4607 ;D4 76778 ;D5 1320507 ;D6 22823890
8/8/1B6/7b/7k/8/2B1b3/7K w - - 0 1 ;D1 21 ;D2 316 ;D3 5744 ;D4 93338 ;D5 1713368 ;D6 28861171
k7/B7/1B6/1B6/8/8/8/K6b w - - 0 1 ;D1 21 ;D2 144 ;D3 3242 ;D4 32955 ;D5 787524 ;D6 7881673
K7/b7/1b6/1b6/8/8/8/k6B w - - 0 1 ;D1 7 ;D2 143 ;D3 1416 ;D4 31787 ;D5 310862 ;D6 7382896
B6b/8/8/8/2K5/5k2/8/b6B b - - 0 1 ;D1 6 ;D2 106 ;D3 1829 ;D4 31151 ;D5 530585 ;D6 9250746
8/8/1B6/7b/7k/8/2B1b3/7K b - - 0 1 ;D1 17 ;D2 309 ;D3 5133 ;D4 93603 ;D5 1591064 ;D6 29027891
k7/B7/1B6/1B6/8/8/8/K6b b - - 0 1 ;D1 7 ;D2 143 ;D3 1416 ;D4 31787 ;D5 310862 ;D6 7382896
K7/b7/1b6/1b6/8/8/8/k6B b - - 0 1 ;D1 21 ;D2 144 ;D3 3242 ;D4 32955 ;D5 787524 ;D6 7881673
7k/RR6/8/8/8/8/rr6/7K w - - 0 1 ;D1 19 ;D2 275 ;D3 5300 ;D4 104342 ;D5 2161211 ;D6 44956585
R6r/8/8/2K5/5k2/8/8/r6R w - - 0 1 ;D1 36 ;D2 1027 ;D3 29215 ;D4 771461 ;D5 20506480 ;D6 525169084
7k/RR6/8/8/8/8/rr6/7K b - - 0 1 ;D1 19 ;D2 275 ;D3 5300 ;D4 104342 ;D5 2161211 ;D6 44956585
R6r/8/8/2K5/5k2/8/8/r6R b - - 0 1 ;D1 36 ;D2 1027 ;D3 29227 ;D4 771368 ;D5 20521342 ;D6 524966748
6kq/8/8/8/8/8/8/7K w - - 0 1 ;D1 2 ;D2 36 ;D3 143 ;D4 3637 ;D5 14893 ;D6 391507
6KQ/8/8/8/8/8/8/7k b - - 0 1 ;D1 2 ;D2 36 ;D3 143 ;D4 3637 ;D5 14893 ;D6 391507
K7/8/8/3Q4/4q3/8/8/7k w - - 0 1 ;D1 6 ;D2 35 ;D3 495 ;D4 8349 ;D5 166741 ;D6 3370175
6qk/8/8/8/8/8/8/7K b - - 0 1 ;D1 22 ;D2 43 ;D3 1015 ;D4 4167 ;D5 105749 ;D6 419369
6KQ/8/8/8/8/8/8/7k b - - 0 1 ;D1 2 ;D2 36 ;D3 143 ;D4 3637 ;D5 14893 ;D6 391507
K7/8/8/3Q4/4q3/8/8/7k b - - 0 1 ;D1 6 ;D2 35 ;D3 495 ;D4 8349 ;D5 166741 ;D6 3370175
8/8/8/8/8/K7/P7/k7 w - - 0 1 ;D1 3 ;D2 7 ;D3 43 ;D4 199 ;D5 1347 ;D6 6249
8/8/8/8/8/7K/7P/7k w - - 0 1 ;D1 3 ;D2 7 ;D3 43 ;D4 199 ;D5 1347 ;D6 6249
K7/p7/k7/8/8/8/8/8 w - - 0 1 ;D1 1 ;D2 3 ;D3 12 ;D4 80 ;D5 342 ;D6 2343
7K/7p/7k/8/8/8/8/8 w - - 0 1 ;D1 1 ;D2 3 ;D3 12 ;D4 80 ;D5 342 ;D6 2343
8/2k1p3/3pP3/3P2K1/8/8/8/8 w - - 0 1 ;D1 7 ;D2 35 ;D3 210 ;D4 1091 ;D5 7028 ;D6 34834
8/8/8/8/8/K7/P7/k7 b - - 0 1 ;D1 1 ;D2 3 ;D3 12 ;D4 80 ;D5 342 ;D6 2343
8/8/8/8/8/7K/7P/7k b - - 0 1 ;D1 1 ;D2 3 ;D3 12 ;D4 80 ;D5 342 ;D6 2343
K7/p7/k7/8/8/8/8/8 b - - 0 1 ;D1 3 ;D2 7 ;D3 43 ;D4 199 ;D5 1347 ;D6 6249
7K/7p/7k/8/8/8/8/8 b - - 0 1 ;D1 3 ;D2 7 ;D3 43 ;D4 199 ;D5 1347 ;D6 6249
8/2k1p3/3pP3/3P2K1/8/8/8/8 b - - 0 1 ;D1 5 ;D2 35 ;D3 182 ;D4 1091 ;D5 5408 ;D6 34822
8/8/8/8/8/4k3/4P3/4K3 w - - 0 1 ;D1 2 ;D2 8 ;D3 44 ;D4 282 ;D5 1814 ;D6 11848
4k3/4p3/4K3/8/8/8/8/8 b - - 0 1 ;D1 2 ;D2 8 ;D3 44 ;D4 282 ;D5 1814 ;D6 11848
8/8/7k/7p/7P/7K/8/8 w - - 0 1 ;D1 3 ;D2 9 ;D3 57 ;D4 360 ;D5 1969 ;D6 10724
8/8/k7/p7/P7/K7/8/8 w - - 0 1 ;D1 3 ;D2 9 ;D3 57 ;D4 360 ;D5 1969 ;D6 10724
8/8/3k4/3p4/3P4/3K4/8/8 w - - 0 1 ;D1 5 ;D2 25 ;D3 180 ;D4 1294 ;D5 8296 ;D6 53138
8/3k4/3p4/8/3P4/3K4/8/8 w - - 0 1 ;D1 8 ;D2 61 ;D3 483 ;D4 3213 ;D5 23599 ;D6 157093
8/8/3k4/3p4/8/3P4/3K4/8 w - - 0 1 ;D1 8 ;D2 61 ;D3 411 ;D4 3213 ;D5 21637 ;D6 158065
k7/8/3p4/8/3P4/8/8/7K w - - 0 1 ;D1 4 ;D2 15 ;D3 90 ;D4 534 ;D5 3450 ;D6 20960
8/8/7k/7p/7P/7K/8/8 b - - 0 1 ;D1 3 ;D2 9 ;D3 57 ;D4 360 ;D5 1969 ;D6 10724
8/8/k7/p7/P7/K7/8/8 b - - 0 1 ;D1 3 ;D2 9 ;D3 57 ;D4 360 ;D5 1969 ;D6 10724
8/8/3k4/3p4/3P4/3K4/8/8 b - - 0 1 ;D1 5 ;D2 25 ;D3 180 ;D4 1294 ;D5 8296 ;D6 53138
8/3k4/3p4/8/3P4/3K4/8/8 b - - 0 1 ;D1 8 ;D2 61 ;D3 411 ;D4 3213 ;D5 21637 ;D6 158065
8/8/3k4/3p4/8/3P4/3K4/8 b - - 0 1 ;D1 8 ;D2 61 ;D3 483 ;D4 3213 ;D5 23599 ;D6 157093
k7/8/3p4/8/3P4/8/8/7K b - - 0 1 ;D1 4 ;D2 15 ;D3 89 ;D4 537 ;D5 3309 ;D6 21104
7k/3p4/8/8/3P4/8/8/K7 w - - 0 1 ;D1 4 ;D2 19 ;D3 117 ;D4 720 ;D5 4661 ;D6 32191
7k/8/8/3p4/8/8/3P4/K7 w - - 0 1 ;D1 5 ;D2 19 ;D3 116 ;D4 716 ;D5 4786 ;D6 30980
k7/8/8/7p/6P1/8/8/K7 w - - 0 1 ;D1 5 ;D2 22 ;D3 139 ;D4 877 ;D5 6112 ;D6 41874
k7/8/7p/8/8/6P1/8/K7 w - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4354 ;D6 29679
k7/8/8/6p1/7P/8/8/K7 w - - 0 1 ;D1 5 ;D2 22 ;D3 139 ;D4 877 ;D5 6112 ;D6 41874
k7/8/6p1/8/8/7P/8/K7 w - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4354 ;D6 29679
k7/8/8/3p4/4p3/8/8/7K w - - 0 1 ;D1 3 ;D2 15 ;D3 84 ;D4 573 ;D5 3013 ;D6 22886
k7/8/3p4/8/8/4P3/8/7K w - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4271 ;D6 28662
7k/3p4/8/8/3P4/8/8/K7 b - - 0 1 ;D1 5 ;D2 19 ;D3 117 ;D4 720 ;D5 5014 ;D6 32167
7k/8/8/3p4/8/8/3P4/K7 b - - 0 1 ;D1 4 ;D2 19 ;D3 117 ;D4 712 ;D5 4658 ;D6 30749
k7/8/8/7p/6P1/8/8/K7 b - - 0 1 ;D1 5 ;D2 22 ;D3 139 ;D4 877 ;D5 6112 ;D6 41874
k7/8/7p/8/8/6P1/8/K7 b - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4354 ;D6 29679
k7/8/8/6p1/7P/8/8/K7 b - - 0 1 ;D1 5 ;D2 22 ;D3 139 ;D4 877 ;D5 6112 ;D6 41874
k7/8/6p1/8/8/7P/8/K7 b - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4354 ;D6 29679
k7/8/8/3p4/4p3/8/8/7K b - - 0 1 ;D1 5 ;D2 15 ;D3 102 ;D4 569 ;D5 4337 ;D6 22579
k7/8/3p4/8/8/4P3/8/7K b - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4271 ;D6 28662
7k/8/8/p7/1P6/8/8/7K w - - 0 1 ;D1 5 ;D2 22 ;D3 139 ;D4 877 ;D5 6112 ;D6 41874
7k/8/p7/8/8/1P6/8/7K w - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4354 ;D6 29679
7k/8/8/1p6/P7/8/8/7K w - - 0 1 ;D1 5 ;D2 22 ;D3 139 ;D4 877 ;D5 6112 ;D6 41874
7k/8/1p6/8/8/P7/8/7K w - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4354 ;D6 29679
k7/7p/8/8/8/8/6P1/K7 w - - 0 1 ;D1 5 ;D2 25 ;D3 161 ;D4 1035 ;D5 7574 ;D6 55338
k7/6p1/8/8/8/8/7P/K7 w - - 0 1 ;D1 5 ;D2 25 ;D3 161 ;D4 1035 ;D5 7574 ;D6 55338
3k4/3pp3/8/8/8/8/3PP3/3K4 w - - 0 1 ;D1 7 ;D2 49 ;D3 378 ;D4 2902 ;D5 24122 ;D6 199002
7k/8/8/p7/1P6/8/8/7K b - - 0 1 ;D1 5 ;D2 22 ;D3 139 ;D4 877 ;D5 6112 ;D6 41874
7k/8/p7/8/8/1P6/8/7K b - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4354 ;D6 29679
7k/8/8/1p6/P7/8/8/7K b - - 0 1 ;D1 5 ;D2 22 ;D3 139 ;D4 877 ;D5 6112 ;D6 41874
7k/8/1p6/8/8/P7/8/7K b - - 0 1 ;D1 4 ;D2 16 ;D3 101 ;D4 637 ;D5 4354 ;D6 29679
k7/7p/8/8/8/8/6P1/K7 b - - 0 1 ;D1 5 ;D2 25 ;D3 161 ;D4 1035 ;D5 7574 ;D6 55338
k7/6p1/8/8/8/8/7P/K7 b - - 0 1 ;D1 5 ;D2 25 ;D3 161 ;D4 1035 ;D5 7574 ;D6 55338
3k4/3pp3/8/8/8/8/3PP3/3K4 b - - 0 1 ;D1 7 ;D2 49 ;D3 378 ;D4 2902 ;D5 24122 ;D6 199002
` +
// Promotion. These might have been wrong once but are correct now.
`8/Pk6/8/8/8/8/6Kp/8 w - - 0 1 ;D1 11 ;D2 97 ;D3 887 ;D4 8048 ;D5 90606 ;D6 1030499
n1n5/1Pk5/8/8/8/8/5Kp1/5N1N w - - 0 1 ;D1 24 ;D2 421 ;D3 7421 ;D4 124608 ;D5 2193768 ;D6 37665329
8/PPPk4/8/8/8/8/4Kppp/8 w - - 0 1 ;D1 18 ;D2 270 ;D3 4699 ;D4 79355 ;D5 1533145 ;D6 28859283
n1n5/PPPk4/8/8/8/8/4Kppp/5N1N w - - 0 1 ;D1 24 ;D2 496 ;D3 9483 ;D4 182838 ;D5 3605103 ;D6 71179139
8/Pk6/8/8/8/8/6Kp/8 b - - 0 1 ;D1 11 ;D2 97 ;D3 887 ;D4 8048 ;D5 90606 ;D6 1030499
n1n5/1Pk5/8/8/8/8/5Kp1/5N1N b - - 0 1 ;D1 24 ;D2 421 ;D3 7421 ;D4 124608 ;D5 2193768 ;D6 37665329
8/PPPk4/8/8/8/8/4Kppp/8 b - - 0 1 ;D1 18 ;D2 270 ;D3 4699 ;D4 79355 ;D5 1533145 ;D6 28859283
n1n5/PPPk4/8/8/8/8/4Kppp/5N1N b - - 0 1 ;D1 24 ;D2 496 ;D3 9483 ;D4 182838 ;D5 3605103 ;D6 71179139
`;
//const lineRE = new RegExp(/(\r?\n\t*)+/g);
const lineRE = new RegExp(/\n+\t*/g);
const semiRE = new RegExp(/\s;(?:D\d)?\s/g);
const lines = full.split(lineRE);
const fullArray = [];
lines.forEach( string => {
if (string.length) fullArray.push(string.split(semiRE));
});
const correctMark = "✔";
const incorrectMark = "✘";
const errors = [];
describe("FEN", function() {
const fullLength = fullArray.length;
for (let i=0; i<fullLength; i++) {
const answer = fullArray[i];
const fenString = answer[0];
const position = importFen(fenString);
const result = exportFen(position);
if (fenString === result) {
console.log( chalk.green(correctMark) + " " + fenString);
} else {
const string = ( chalk.red(incorrectMark + " " + result) + " !== " + chalk.green(fenString));
console.log( chalk.red(incorrectMark + " " + result) + " !== " + chalk.green(fenString) );
errors.push( "FEN: " + chalk.red(result) + " !== " + chalk.green(fenString) );
}
};
});
describe("Perft", function() {
const fullArrayLength = fullArray.length;
for (let k=0; k<fullArrayLength; k++) {
const section = fullArray[k];
const fenString = section[0];
describe(fenString, function() {
let answerArray = [importFen(fenString)];
let depth = section.length - 1;
for (let i=0; i<depth; i++) {
const score = section[i+1] * 1;
if (score < max) {
let result = [];
//it(score+"", function() {
const answerArrayLength = answerArray.length;
for (let j=0; j<answerArrayLength; j++) {
const position = answerArray[j];
const every = everyPossiblePosition.call(null,position);
result = result.concat(every);
};
answerArray = result;
//assert.equal(result.length, section[i+1]);
if (result.length === score) {
console.log( chalk.green(correctMark) + " " + score);
} else {
console.log( chalk.red(incorrectMark) + " " + score);
errors.push( "perft: " + fenString + " depth:"+(i+1)+"; "+chalk.green(score) + " !== " + chalk.red(result.length) );
}
//});
}
//result = null;
}
});
};
});
const errorLength = errors.length;
if (!errorLength) {
console.log( chalk.green("all tests passed !!!"));
} else {
console.log( chalk.red( errorLength + " errors found."));
for (let i=0; i<errorLength; i++) {
console.log(i+". " + errors[i]);
}
}
| 54.269373 | 135 | 0.613857 |
3d254615816d97efb3f0295fc218ab9ddd9d0d56 | 3,207 | js | JavaScript | test/core/plugins/spec/actions.js | coldbrewcloud/swagger | 4e38b4f2a8ea8507d28961a21f36641632d28fc9 | [
"Apache-2.0"
] | 399 | 2018-05-24T14:02:46.000Z | 2022-03-31T04:16:25.000Z | test/core/plugins/spec/actions.js | coldbrewcloud/swagger | 4e38b4f2a8ea8507d28961a21f36641632d28fc9 | [
"Apache-2.0"
] | 15 | 2017-05-24T15:17:06.000Z | 2017-06-29T16:54:50.000Z | test/core/plugins/spec/actions.js | coldbrewcloud/swagger | 4e38b4f2a8ea8507d28961a21f36641632d28fc9 | [
"Apache-2.0"
] | 186 | 2018-05-16T14:56:22.000Z | 2022-02-14T06:56:38.000Z | /* eslint-env mocha */
import expect, { createSpy } from "expect"
import { fromJS } from "immutable"
import { execute, executeRequest } from "corePlugins/spec/actions"
describe("spec plugin - actions", function(){
describe("execute", function(){
xit("should collect a full request and call fn.executeRequest", function(){
// Given
const system = {
fn: {
fetch: 1
},
specActions: {
executeRequest: createSpy()
},
specSelectors: {
spec: () => fromJS({spec: 1}),
parameterValues: () => fromJS({values: 2}),
contentTypeValues: () => fromJS({requestContentType: "one", responseContentType: "two"})
}
}
// When
let executeFn = execute({ path: "/one", method: "get"})
executeFn(system)
// Then
expect(system.specActions.executeRequest.calls[0].arguments[0]).toEqual({
fetch: 1,
method: "get",
pathName: "/one",
parameters: {
values: 2
},
requestContentType: "one",
responseContentType: "two",
spec: {
spec: 1
}
})
})
xit("should allow passing _extra_ properties to executeRequest", function(){
// Given
const system = {
fn: {},
specActions: {
executeRequest: createSpy()
},
specSelectors: {
spec: () => fromJS({}),
parameterValues: () => fromJS({}),
contentTypeValues: () => fromJS({})
}
}
// When
let executeFn = execute({ hi: "hello" })
executeFn(system)
// Then
expect(system.specActions.executeRequest.calls[0].arguments[0]).toInclude({hi: "hello"})
})
})
describe("executeRequest", function(){
xit("should call fn.execute with arg ", function(){
const system = {
fn: {
execute: createSpy().andReturn(Promise.resolve())
},
specActions: {
setResponse: createSpy()
}
}
// When
let executeFn = executeRequest({one: 1})
let res = executeFn(system)
// Then
expect(res).toBeA(Promise)
expect(system.fn.execute.calls.length).toEqual(1)
expect(system.fn.execute.calls[0].arguments[0]).toEqual({
one: 1
})
})
})
xit("should call specActions.setResponse, when fn.execute resolves", function(){
const response = {serverResponse: true}
const system = {
fn: {
execute: createSpy().andReturn(Promise.resolve(response))
},
specActions: {
setResponse: createSpy()
},
errActions: {
newSpecErr: createSpy()
}
}
// When
let executeFn = executeRequest({
pathName: "/one",
method: "GET"
})
let executePromise = executeFn(system)
// Then
return executePromise.then( () => {
expect(system.specActions.setResponse.calls.length).toEqual(1)
expect(system.specActions.setResponse.calls[0].arguments).toEqual([
"/one",
"GET",
response
])
})
})
it.skip("should call errActions.newErr, if the fn.execute rejects", function(){
})
})
| 23.755556 | 98 | 0.547864 |
3d2609e3ecb9252f2e0b9896b09e3152571ff83a | 9,400 | js | JavaScript | src/servers/websocket.js | gil0mendes/Stellar | 6a127c2c2fce3c6c01d158457f38e431e1296c3b | [
"MIT"
] | 39 | 2016-09-30T23:33:08.000Z | 2020-03-27T04:32:07.000Z | src/servers/websocket.js | gil0mendes/Stellar | 6a127c2c2fce3c6c01d158457f38e431e1296c3b | [
"MIT"
] | 225 | 2016-07-30T15:48:46.000Z | 2021-11-10T19:08:09.000Z | src/servers/websocket.js | gil0mendes/Stellar | 6a127c2c2fce3c6c01d158457f38e431e1296c3b | [
"MIT"
] | 5 | 2016-11-06T02:37:59.000Z | 2018-12-25T17:10:06.000Z | import fs from 'fs'
import util from 'util'
import path from 'path'
import Primus from 'primus'
import UglifyJS from 'uglify-es'
import GenericServer from '../genericServer'
// server type
let type = 'websocket'
// server attributes
let attributes = {
canChat: true,
logConnections: true,
logExists: true,
sendWelcomeMessage: true,
verbs: [
'quit',
'exit',
'roomJoin',
'roomLeave',
'roomView',
'detailsView',
'say',
'event'
]
}
export default class WebSocketServer extends GenericServer {
/**
* Server instance.
*/
server
/**
* Creates a new server instance.
*
* @param api stellar engine interface.
* @param options sever options.
*/
constructor (api, options) {
super(api, type, options, attributes)
let self = this
// connection event
self.on('connection', connection => {
connection.rawConnection.on('data', data => { self._handleData(connection, data) })
})
// action complete event
self.on('actionComplete', data => {
if (data.toRender !== false) {
data.connection.response.messageCount = data.messageCount
self.sendMessage(data.connection, data.response, data.messageCount)
}
})
}
// ------------------------------------------------------------------------------------------------ [REQUIRED METHODS]
/**
* Start the server
*
* @param callback
*/
start (callback) {
let self = this
let webserver = self.api.servers.servers.web
// create a new primus instance
self.server = new Primus(webserver.server, self.api.config.servers.websocket.server)
// define some event handlers
self.server.on('connection', rawConnection => self._handleConnection(rawConnection))
self.server.on('disconnection', rawConnection => self._handleDisconnection(rawConnection))
self.api.log(`webSocket bound to ${webserver.options.bindIP}:${webserver.options.port}`, 'debug')
self.server.active = true
// write client js
self._writeClientJS()
// execute the callback
callback()
}
/**
* Shutdown the websocket server.
*
* @param callback Callback
*/
stop (callback) {
let self = this
// disable the server
self.active = false
// destroy clients connections
if (self.api.config.servers.websocket.destroyClientOnShutdown === true) {
self.connections().forEach((connection) => {
connection.destroy()
})
}
// execute the callback on the next tick
process.nextTick(callback)
}
/**
* Send a message.
*
* @param connection Connection where the message must be sent.
* @param message Message to send.
* @param messageCount Message number.
*/
sendMessage (connection, message, messageCount) {
// serialize the error if exists
if (message.error) { message.error = this.api.config.errors.serializers.servers.websocket(message.error) }
// if the message don't have a context set to 'response'
if (!message.context) { message.context = 'response' }
// if the messageCount isn't defined, get it from the connection object
if (!messageCount) { messageCount = connection.messageCount }
if (message.context === 'response' && !message.messageCount) { message.messageCount = messageCount }
// write the message to socket
connection.rawConnection.write(message)
}
/**
* Action to be executed on a file request.
*
* @param connection Client connection object.
* @param error Error, if exists.
* @param fileStream FileStream.
* @param mime Mime type.
* @param length File size.
* @param lastModified Last file modification timestamp.
*/
sendFile (connection, error, fileStream, mime, length, lastModified) {
let self = this
let content = ''
let response = {
error: error,
content: null,
mime: mime,
length: length,
lastModified: lastModified
}
try {
if (!error) {
fileStream.on('data', d => { content += d })
fileStream.on('end', () => {
response.content = content
self.server.sendMessage(connection, response, connection.messageCount)
})
} else {
self.server.sendMessage(connection, response, connection.messageCount)
}
} catch (e) {
self.api.log(e, 'warning')
self.server.sendMessage(connection, response, connection.messageCount)
}
}
/**
* Action to be executed on the goodbye.
*
* @param connection Client connection to be closed.
*/
goodbye (connection) { connection.rawConnection.end() }
// ------------------------------------------------------------------------------------------------- [PRIVATE METHODS]
/**
* Compile client JS.
*
* @returns {*}
* @private
*/
_compileClientJS () {
let self = this
let clientSource = fs.readFileSync(`${__dirname}/../client.js`).toString()
let url = self.api.config.servers.websocket.clientUrl
// replace any url by client url
clientSource = clientSource.replace(/\'%%URL%%\'/g, url)
let defaults = {}
for (var i in self.api.config.servers.websocket.client) {
defaults[ i ] = self.api.config.servers.websocket.client[ i ]
}
defaults.url = url
// append the number of simultaneous connections allowed
defaults.simultaneousActions = this.api.config.general.simultaneousActions
let defaultsString = util.inspect(defaults)
defaultsString = defaultsString.replace('\'window.location.origin\'', 'window.location.origin')
clientSource = clientSource.replace('\'%%DEFAULTS%%\'', defaultsString)
return clientSource
}
/**
* Render client JS.
*
* @param minimize
* @returns {*}
* @private
*/
_renderClientJs (minimize = false) {
let self = this
let libSource = self.server.library()
let clientSource = self._compileClientJS()
clientSource =
';;;\r\n' +
'(function(exports){ \r\n' +
clientSource +
'\r\n' +
'exports.StellarClient = StellarClient; \r\n' +
'})(typeof exports === \'undefined\' ? window : exports);'
// minify the client lib code using Uglify
if (minimize) { return UglifyJS.minify(`${libSource}\r\n\r\n\r\n${clientSource}`).code }
return `${libSource}\r\n\r\n\r\n${clientSource}`
}
/**
* Write client js code.
*/
_writeClientJS () {
let self = this
// ensure the public folder exists
if (!this.api.utils.directoryExists(`${self.api.config.general.paths.public}`)) {
this.api.utils.createFolder(`${self.api.config.general.paths.public}`)
}
if (self.api.config.servers.websocket.clientJsName) {
let base = path.normalize(
self.api.config.general.paths.public + path.sep +
self.api.config.servers.websocket.clientJsName)
try {
fs.writeFileSync(`${base}.js`, self._renderClientJs(false))
self.api.log(`write ${base}.js`, 'debug')
fs.writeFileSync(`${base}.min.js`, self._renderClientJs(true))
self.api.log(`wrote ${base}.min.js`, 'debug')
} catch (e) {
self.api.log('Cannot write client-side JS for websocket server:', 'warning')
self.api.log(e, 'warning')
throw e
}
}
}
/**
* Handle connection.
*
* @param rawConnection Raw connection object.
* @private
*/
_handleConnection (rawConnection) {
const fingerPrint = rawConnection.query[ this.api.config.servers.web.fingerprintOptions.cookieKey ]
this.buildConnection({
rawConnection: rawConnection,
remoteAddress: rawConnection.address.ip,
remotePort: rawConnection.address.port,
fingerprint: fingerPrint
})
}
/**
* Handle the disconnection event.
*
* @param rawConnection
* @private
*/
_handleDisconnection (rawConnection) {
let self = this
for (let i in self.connections()) {
if (self.connections()[ i ] && rawConnection.id === self.connections()[ i ].rawConnection.id) {
self.connections()[ i ].destroy()
break
}
}
}
_handleData (connection, data) {
let verb = data.event
delete data.event
connection.messageCount++
connection.params = {}
switch (verb) {
case 'action':
for (let v in data.params) { connection.params[ v ] = data.params[ v ] }
connection.error = null
connection.response = {}
this.processAction(connection)
break
case 'file':
// setup the connection parameters
connection.params = {
file: data.file
}
// process the file request
this.processFile(connection)
break
default: {
let words = []
let message
if (data.room) {
words.push(data.room)
delete data.room
}
for (let i in data) { words.push(data[ i ]) }
connection.verbs(verb, words, (error, data) => {
// if exists an error, send it to the client
if (error) {
message = { status: error, context: 'response', data: data }
this.sendMessage(connection, message)
return
}
message = { status: 'OK', context: 'response', data: data }
this.sendMessage(connection, message)
})
break;
}
}
}
}
| 26.553672 | 120 | 0.60617 |
3d268c8f8ae8ee0ad449a130f1532229c0c7b78d | 1,867 | js | JavaScript | resources/js/store/modules/auth.module.js | levanlinh1995/forum | 5f1e0a4720501e9060a766293347bf20ce8aa285 | [
"MIT"
] | null | null | null | resources/js/store/modules/auth.module.js | levanlinh1995/forum | 5f1e0a4720501e9060a766293347bf20ce8aa285 | [
"MIT"
] | null | null | null | resources/js/store/modules/auth.module.js | levanlinh1995/forum | 5f1e0a4720501e9060a766293347bf20ce8aa285 | [
"MIT"
] | null | null | null | import AppStorage from '../../helpers/AppStograge';
import route from '../../router/route';
import LaravelEcho from '../../helpers/LaravelEcho';
const state = {
token: null,
userId: null,
username: null,
}
const getters = {
token(state) {
return state.token;
},
userId(state) {
return state.userId;
},
isAuthenticated(state) {
return state.token ? true : false;
},
username(state) {
return state.username;
}
}
const mutations = {
storeUser(state, userData) {
state.token = userData.token;
state.userId = userData.userId;
state.username = userData.username;
},
logout(state) {
state.token = null;
state.userId = null;
state.username = null;
},
}
const actions = {
userLogin({ commit }, userData) {
axios.post('/api/auth/login', userData)
.then(res => {
const access_token = res.data.access_token;
const username = res.data.user;
const userId = res.data.userId;
commit('storeUser', {
token: access_token,
username: username,
userId: userId,
});
AppStorage.store(access_token);
window.Echo = LaravelEcho.init(access_token);
route.push({ name: 'forum' });
})
.catch(error => console.log(error));
},
userLogout({ commit }) {
axios.post('/api/auth/logout')
.then(res => {
AppStorage.clear();
commit('logout');
route.push({ name: 'login' });
})
.catch(error => console.log(error));
}
}
const moduleAuth = {
namespaced: true,
state,
getters,
mutations,
actions,
}
export default moduleAuth | 23.3375 | 61 | 0.521693 |
3d28323f8bae1db3b968f97792675cd09e8c3bc3 | 319 | js | JavaScript | client/src/Eficode/Components/ItineraryEntry/ItineraryEntry.js | RoniNiklas/randomreactprojs | c5d89099883b1e9fd805c16f57558058e1f192d3 | [
"CC0-1.0"
] | null | null | null | client/src/Eficode/Components/ItineraryEntry/ItineraryEntry.js | RoniNiklas/randomreactprojs | c5d89099883b1e9fd805c16f57558058e1f192d3 | [
"CC0-1.0"
] | 2 | 2022-02-18T20:53:07.000Z | 2022-03-26T04:08:38.000Z | client/src/Eficode/Components/ItineraryEntry/ItineraryEntry.js | RoniNiklas/randomreactprojs | c5d89099883b1e9fd805c16f57558058e1f192d3 | [
"CC0-1.0"
] | null | null | null | import React from "react"
import LegEntry from "../LegEntry/LegEntry"
import "./ItineraryEntry.css"
const ItineraryEntry = ({ itinerary }) => {
return (
<>
{itinerary.legs.map((leg, index) => <LegEntry key={index} index={index} leg={leg} />)}
</>
)
}
export default ItineraryEntry
| 22.785714 | 98 | 0.60815 |
3d29232ea402cc2846e348f6b6046c0a790fd695 | 45 | js | JavaScript | code/client/src/state/modules/index.js | srstomp/one-wallet | 33b75637664cd8e6126513886d2f2ded3327b516 | [
"Apache-2.0"
] | 1 | 2021-11-26T14:50:58.000Z | 2021-11-26T14:50:58.000Z | code/client/src/state/modules/index.js | srstomp/one-wallet | 33b75637664cd8e6126513886d2f2ded3327b516 | [
"Apache-2.0"
] | null | null | null | code/client/src/state/modules/index.js | srstomp/one-wallet | 33b75637664cd8e6126513886d2f2ded3327b516 | [
"Apache-2.0"
] | 1 | 2021-11-13T14:56:18.000Z | 2021-11-13T14:56:18.000Z | export { default as wallet } from './wallet'
| 22.5 | 44 | 0.688889 |
3d296b4dbb2f1a252ab22de0e62be9f01d90e0e8 | 1,878 | js | JavaScript | src/components/BikeOptions.js | kuskoveckis/gatsby-giant-bicyles | e842b08d3f8ff418eacfe042fa7053f2a1f165c9 | [
"RSA-MD"
] | null | null | null | src/components/BikeOptions.js | kuskoveckis/gatsby-giant-bicyles | e842b08d3f8ff418eacfe042fa7053f2a1f165c9 | [
"RSA-MD"
] | null | null | null | src/components/BikeOptions.js | kuskoveckis/gatsby-giant-bicyles | e842b08d3f8ff418eacfe042fa7053f2a1f165c9 | [
"RSA-MD"
] | null | null | null | import React from "react"
import { Link } from "gatsby"
import { GatsbyImage, getImage } from "gatsby-plugin-image"
import { graphql, useStaticQuery } from "gatsby"
import "../assets/css/bikesHome.css"
import "../assets/css/hardtail.css"
const query = graphql`
{
allStrapiOption {
nodes {
price
id
spec
}
}
}
`
const BikeOptions = ({ data }) => {
console.log(data)
const title = data.strapiBikes.title
const image = data.strapiBikes.image
const slug = data.strapiBikes.slug
const pathToImage = getImage(image)
const options = useStaticQuery(query)
const bikeOptions = options.allStrapiOption.nodes
return (
<div className="bikes_content_container " id="models">
{bikeOptions.map(item => {
const { id, price, spec } = item
return (
<div className="bikes_content" key={id}>
<GatsbyImage
image={pathToImage}
alt={title}
className="bikes_content-img"
/>
<figcaption>
{title} - {spec}
</figcaption>
<p>${price}</p>
<div>Frame:ALUXX-Grade Aluminium, disc</div>
<div>
Fork: Suntour Raidon 29", air spring 100mm, QR, LO-R, alloy
steerer
</div>
<div>Frame:ALUXX-Grade Aluminium, disc</div>
<div>
Wheels:Giant GX03V 29", alloy, double wall, 21mm inner width
</div>
<div>Shifters: SRAM Eagle SX</div>
<div>Cranckset: SRAM Eagle SX, 30t</div>
<div>Colours: Gloss Charcoal</div>
<span className="link">
<Link to={`/${slug}`} className="shop-link">
Shop now
</Link>
</span>
</div>
)
})}
</div>
)
}
export default BikeOptions
| 27.617647 | 74 | 0.539936 |
3d296d19ff549db055a8a6f9e1a09983b901a08a | 2,636 | js | JavaScript | test/hdfs-append-spec.js | ts-archive/hdfs-assets | cd7ee02d72781207b13e2bcdf3051a5191c3d6c9 | [
"MIT"
] | null | null | null | test/hdfs-append-spec.js | ts-archive/hdfs-assets | cd7ee02d72781207b13e2bcdf3051a5191c3d6c9 | [
"MIT"
] | 32 | 2018-08-18T00:00:17.000Z | 2021-06-15T16:26:46.000Z | test/hdfs-append-spec.js | terascope/hdfs-assets | cd7ee02d72781207b13e2bcdf3051a5191c3d6c9 | [
"MIT"
] | 1 | 2022-02-11T16:10:42.000Z | 2022-02-11T16:10:42.000Z | 'use strict';
const hdfsAppend = require('../asset/hdfs_append/index.js');
// Start out with no file errors
const appendErrors = {};
describe('The hdfs_append processor', () => {
it('properly passes a clean filename through.', () => {
const filename = '/incoming-data/2037-2-27/ts-worker.lan.42';
const newName = hdfsAppend._checkFileHistory(filename, appendErrors, 100);
expect(newName).toEqual(filename);
expect(Object.keys(appendErrors).length).toEqual(0);
});
it('properly changes the filename after an HDFS append error.', () => {
const filename = '/incoming-data/2037-2-27/ts-worker.lan.42';
const newName = hdfsAppend._recordFileError(filename, appendErrors);
expect(newName).toEqual('/incoming-data/2037-2-27/ts-worker.lan.42.0');
expect(Object.keys(appendErrors).length).toEqual(2);
expect(appendErrors.retry).toEqual(true);
expect(appendErrors['/incoming-data/2037-2-27/ts-worker.lan.42'])
.toEqual('/incoming-data/2037-2-27/ts-worker.lan.42.0');
});
it('properly changes the filename after a second HDFS append error.', () => {
const filename = '/incoming-data/2037-2-27/ts-worker.lan.42.0';
const newName = hdfsAppend._recordFileError(filename, appendErrors);
expect(newName).toEqual('/incoming-data/2037-2-27/ts-worker.lan.42.1');
expect(Object.keys(appendErrors).length).toEqual(2);
expect(appendErrors.retry).toEqual(true);
expect(appendErrors['/incoming-data/2037-2-27/ts-worker.lan.42'])
.toEqual('/incoming-data/2037-2-27/ts-worker.lan.42.1');
});
it('properly passes a clean filename for the next day.', () => {
const filename = '/incoming-data/2037-2-28/ts-worker.lan.42';
const newName = hdfsAppend._checkFileHistory(filename, appendErrors, 100);
expect(newName).toEqual(filename);
expect(appendErrors.retry).toEqual(true);
expect(appendErrors['/incoming-data/2037-2-27/ts-worker.lan.42'])
.toEqual('/incoming-data/2037-2-27/ts-worker.lan.42.1');
});
it('properly changes the filename after an HDFS append error for the new file.', () => {
const filename = '/incoming-data/2037-2-28/ts-worker.lan.42';
const newName = hdfsAppend._recordFileError(filename, appendErrors);
expect(newName).toEqual('/incoming-data/2037-2-28/ts-worker.lan.42.0');
expect(appendErrors.retry).toEqual(true);
expect(appendErrors['/incoming-data/2037-2-28/ts-worker.lan.42'])
.toEqual('/incoming-data/2037-2-28/ts-worker.lan.42.0');
});
});
| 52.72 | 92 | 0.658194 |
3d2a019bc9aeaee02cbb05e4d3bd27a76b66e433 | 4,160 | js | JavaScript | src/app/game/gameValidators.test.js | peterneely/buckets | 91060b8420dd5f3de57f23082f323fdda623cab0 | [
"MIT"
] | null | null | null | src/app/game/gameValidators.test.js | peterneely/buckets | 91060b8420dd5f3de57f23082f323fdda623cab0 | [
"MIT"
] | null | null | null | src/app/game/gameValidators.test.js | peterneely/buckets | 91060b8420dd5f3de57f23082f323fdda623cab0 | [
"MIT"
] | null | null | null | import _ from 'lodash';
import { isSizeValid, validators } from './gameValidators';
import { mergeIntoInitialState, nonPlayableState, playableState } from './fakeStoreStates';
import { toInt } from '_app/format';
const getValidator = id => validators.find(validator => validator.id == id);
describe('isSizeValid', () => {
it('Returns true and the valid number when the size is a number that is 1 or greater', () => {
['1', '2', '10'].forEach(size => {
const { valid, validSize } = isSizeValid(size);
expect(valid).toBeTruthy();
expect(validSize).toEqual(toInt(size));
});
});
it('Returns false when the size is less than 1', () => {
['0', '-1'].forEach(size => {
const { valid, validSize } = isSizeValid(size);
expect(valid).toBeFalsy();
expect(validSize).toBeNull();
});
});
it('Returns false when the size contains a decimal', () => {
['1.1', '2.1'].forEach(size => {
const { valid, validSize } = isSizeValid(size);
expect(valid).toBeFalsy();
expect(validSize).toBeNull();
});
});
it('Returns false when the size contains a non-numeric character', () => {
['a', 'b', '@', '$', '~'].forEach(size => {
const { valid, validSize } = isSizeValid(size);
expect(valid).toBeFalsy();
expect(validSize).toBeNull();
});
});
});
describe('validators', () => {
it('Should export a non-empty array of validator objects', () => {
expect(validators).toBeDefined();
expect(_.isArray(validators)).toBeTruthy();
expect(validators.length).toBeTruthy();
});
it('Each validator should have the correct properties filled in', () => {
const getState = () => playableState;
_.forEach(validators, ({ id, isValid }) => {
expect(_.isString(id)).toBeTruthy();
expect(id.length).toBeTruthy();
expect(_.isFunction(isValid)).toBeTruthy();
const { valid, errorMessage } = isValid(getState);
expect(_.isBoolean(valid)).toBeTruthy();
expect(_.isString(errorMessage)).toBeTruthy();
expect(errorMessage.length).toBeTruthy();
});
});
});
describe('bucketsHalfSize', () => {
const validator = getValidator('bucketsHalfSize');
it('Should return false when the state is not valid', () => {
const getState = () => mergeIntoInitialState({ buckets: { left: { size: 3 }, right: { size: 6 } } });
expect(validator.isValid(getState).valid).toBeFalsy();
});
it('Should return true when the state is valid', () => {
const getState = () => mergeIntoInitialState({ buckets: { left: { size: 3 }, right: { size: 7 } } });
expect(validator.isValid(getState).valid).toBeTruthy();
});
});
describe('bucketsSameSize', () => {
const validator = getValidator('bucketsSameSize');
it('Should return false when the state is not valid', () => {
const getState = () => mergeIntoInitialState({ buckets: { left: { size: 5 } } });
expect(validator.isValid(getState).valid).toBeFalsy();
});
it('Should return true when the state is valid', () => {
const getState = () => mergeIntoInitialState(initialState => ({ buckets: { left: { size: initialState.buckets.right.size - 1 } } }));
expect(validator.isValid(getState).valid).toBeTruthy();
});
});
describe('oddTargetEvenBuckets', () => {
const validator = getValidator('oddTargetEvenBuckets');
it('Should return false when the state is not valid', () => {
const getState = () => nonPlayableState;
expect(validator.isValid(getState).valid).toBeFalsy();
});
it('Should return true when the state is valid', () => {
const getState = () => playableState;
expect(validator.isValid(getState).valid).toBeTruthy();
});
});
describe('targetTooBig', () => {
const validator = getValidator('targetTooBig');
it('Should return false when the state is not valid', () => {
const getState = () => mergeIntoInitialState({ target: 6 });
expect(validator.isValid(getState).valid).toBeFalsy();
});
it('Should return true when the state is valid', () => {
const getState = () => mergeIntoInitialState({ target: 5 });
expect(validator.isValid(getState).valid).toBeTruthy();
});
});
| 35.254237 | 137 | 0.629087 |
3d2c0655f0c20cdcf899cd83e81da16af0a72999 | 94,736 | js | JavaScript | client/src/pages/About.js | mosesimbahale/AUCTIONS | 31bb14889e0b8fd7b7f820c87fc0a669a2451037 | [
"Apache-2.0"
] | null | null | null | client/src/pages/About.js | mosesimbahale/AUCTIONS | 31bb14889e0b8fd7b7f820c87fc0a669a2451037 | [
"Apache-2.0"
] | null | null | null | client/src/pages/About.js | mosesimbahale/AUCTIONS | 31bb14889e0b8fd7b7f820c87fc0a669a2451037 | [
"Apache-2.0"
] | null | null | null | import React from "react";
import { Link } from "react-router-dom";
import "../App.css";
import Navbar from "../components/Navbar";
const About = () => {
return (
<>
<div className="App">
<Navbar />
<header className="App-header">
<h1 className="text-3xl ">Navigation</h1>
</header>
{/*Collaborate.. 1st section*/}
<section class="relative pt-20 2xl:pt-40">
<div class="container px-4 mx-auto mb-16 md:mb-24">
<div class="text-center">
<a class="inline-block mb-8 text-2xl font-bold" href="#">
<img
class="h-7"
src="zospace-assets/logos/zospace-dark-logo.svg"
alt=""
width="auto"
/>
</a>
<h2 class="mb-8 text-6xl 2xl:text-7xl font-bold font-heading">
Collaborate everywhere.
</h2>
<p class="mb-16 text-xl">Get our free mobile application.</p>
<a
class="inline-block px-12 py-5 bg-blue-500 hover:bg-blue-600 rounded-full text-lg font-bold text-white transition duration-200"
href="#"
>
Downolad
</a>
</div>
</div>
<div class="relative">
<div class="hidden lg:block absolute right-0 top-0 mt-24 w-1/2 h-px bg-gray-50"></div>
<div class="hidden lg:block absolute left-0 top-0 mt-40 w-1/2 h-px bg-gray-50"></div>
<img
class="lg:relative lg:max-w-4xl mx-auto"
src="zospace-assets/images/smartphone.png"
alt=""
/>
</div>
</section>
{/*Collaborate.. 2nd section*/}
<section class="relative py-20 2xl:py-40 bg-gray-800 overflow-hidden">
<img
class="hidden lg:block absolute top-0 right-0 h-128 w-128 -mt-52 -mr-52"
src="zospace-assets/lines/circle.svg"
alt=""
/>
<img
class="hidden lg:block absolute bottom-0 left-0 h-128 w-128 -mb-52"
src="zospace-assets/lines/full-circle.svg"
alt=""
/>
<img
class="block absolute bottom-0 left-0 h-24 md:h-32 lg:h-72 lg:ml-24 -mb-8"
src="zospace-assets/images/five-stars.svg"
alt=""
/>
<img
class="block absolute bottom-0 left-0 h-128 w-128 -mb-96 -ml-24"
src="zospace-assets/lines/circle.svg"
alt=""
/>
<div class="container px-3 mx-auto">
<div class="max-w-3xl mx-auto text-center">
<span class="text-lg text-blue-400 font-bold">
What's new at Shuffle
</span>
<h2 class="my-10 text-5xl lg:text-6xl font-bold font-heading text-white">
The quick brown fox jumps over the lazy dog.
</h2>
<div class="max-w-md mx-auto">
<p class="mb-20 text-lg text-gray-200">
A short message that will bring your customers into the world of
your imagination.
</p>
<a
class="inline-block mb-4 sm:mb-0 sm:mr-4 py-5 px-12 text-white font-bold bg-blue-500 hover:bg-blue-600 rounded-full transition duration-200"
href="#"
>
Join us now
</a>
<a
class="inline-block py-5 px-12 text-white font-bold border border-gray-300 hover:border-gray-200 rounded-full"
href="#"
>
Active demo
</a>
</div>
</div>
</div>
</section>
{/*Testimonials.. 3rd section*/}
<section class="py-24 2xl:py-44 bg-blueGray-100 rounded-t-10xl overflow-hidden">
<div class="container px-4 mx-auto">
<span class="text-xs text-gray-300 uppercase tracking-wide">
What people say
</span>
<h1 class="mt-8 mb-14 md:mb-24 text-8xl md:text-10xl xl:text-11xl font-heading font-medium leading-tight">
Testimonials
</h1>
<div class="flex flex-wrap -mx-2 mb-14">
<div class="w-full xl:w-3/5 px-2 mb-4 xl:mb-0">
<div class="flex items-center h-full py-12 px-8 bg-white rounded-3xl">
<div class="flex flex-wrap items-center justify-between w-full -mx-2">
<div class="w-full md:w-auto px-2 mb-4 md:mb-0">
<a class="block mx-auto max-w-max" href="#">
<img
class="h-24 object-cover"
src="uinel-assets/images/ecommerce-reviews/product-phone1.png"
alt=""
/>
</a>
</div>
<div class="w-full md:w-auto px-2 mb-8 md:mb-0">
<a
class="block mb-2 text-2xl xl:text-3xl font-heading font-medium hover:underline"
href="#"
>
Apple iPhone 12 Pro
</a>
<div class="flex">
<p class="text-sm font-heading font-medium mr-2">
<span>Color:</span>
<span class="text-darkBlueGray-300">Silver</span>
</p>
<p class="text-sm font-heading font-medium">
<span>Memory storage:</span>
<span class="text-darkBlueGray-300">128GB</span>
</p>
</div>
</div>
<div class="w-full md:w-auto px-2 mb-8 md:mb-0">
<p class="text-xl text-blue-500 font-heading font-medium">
$ 720,70
</p>
</div>
<div class="w-full md:w-auto px-2">
<a
class="inline-block w-full md:w-auto py-4 px-6 text-center leading-8 font-heading font-medium tracking-tighter text-xl text-white bg-blue-500 hover:bg-blue-600 focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 rounded-xl"
href="#"
>
Add to cart
</a>
</div>
</div>
</div>
</div>
<div class="w-full md:w-1/2 xl:w-1/5 px-2 mb-4 md:mb-0">
<div class="py-12 px-12 h-full bg-white rounded-3xl">
<p class="font-heading font-medium">
<span class="text-9xl">4.3</span>
<span class="text-gray-300">/5</span>
</p>
<div class="flex mb-3">
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block text-gray-200" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="currentColor"
></path>
</svg>
</a>
</div>
<p class="text-sm text-gray-300 font-medium">1 218 reviews</p>
</div>
</div>
<div class="w-full md:w-1/2 xl:w-1/5 px-2">
<div class="py-12 px-12 h-full bg-white rounded-3xl">
<p class="font-heading font-medium">
<span class="text-9xl">4.1</span>
<span class="text-gray-300">/5</span>
</p>
<div class="flex mb-3">
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block text-gray-200" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="currentColor"
></path>
</svg>
</a>
</div>
<p class="text-sm text-gray-300 font-medium">Uistore</p>
</div>
</div>
</div>
<a
class="inline-block mb-14 text-3xl font-heading font-medium underline hover:text-darkBlueGray-700"
href="#"
>
1,218 reviews
</a>
<div class="mb-2 shadow-lg rounded-t-8xl rounded-b-5xl overflow-hidden">
<div class="pt-3 pb-3 md:pb-1 px-4 md:px-16 bg-white bg-opacity-40">
<div class="flex flex-wrap items-center">
<img
class="mr-6"
src="uinel-assets/images/ecommerce-reviews/user.png"
alt=""
/>
<h4 class="w-full md:w-auto text-xl font-heading font-medium">
Faustina H. Fawn
</h4>
<div class="w-full md:w-px h-2 md:h-8 mx-8 bg-transparent md:bg-gray-200"></div>
<span class="mr-4 text-xl font-heading font-medium">5.0</span>
<div class="inline-flex">
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block text-gray-200" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
</div>
</div>
</div>
<div class="px-4 overflow-hidden md:px-16 pt-8 pb-12 bg-white">
<div class="flex flex-wrap">
<div class="w-full md:w-2/3 mb-6 md:mb-0">
<p class="mb-8 max-w-2xl text-darkBlueGray-400 leading-loose">
I haretra neque non mi aliquam, finibus hart bibendum
molestie. Vestibulum suscipit sagittis dignissim mauris.
</p>
<div class="-mb-2">
<div class="inline-flex w-full md:w-auto md:mr-2 mb-2">
<div class="flex items-center h-12 pl-2 pr-6 bg-green-100 border-2 border-green-500 rounded-full">
<div class="flex mr-2 w-8 h-8 items-center justify-center bg-white rounded-full text-green-500">
<svg
width="11"
height="11"
viewbox="0 0 11 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.016 6.366H6.38V10.092H4.472V6.366H0.836V4.638H4.472V0.911999H6.38V4.638H10.016V6.366Z"
fill="currentColor"
></path>
</svg>
</div>
<span class="text-green-500 font-heading font-medium">
battery life
</span>
</div>
</div>
<div class="inline-flex w-full md:w-auto md:mr-2 mb-2">
<div class="flex items-center h-12 pl-2 pr-6 bg-green-100 border-2 border-green-500 rounded-full">
<div class="flex mr-2 w-8 h-8 items-center justify-center bg-white rounded-full text-green-500">
<svg
width="11"
height="11"
viewbox="0 0 11 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.016 6.366H6.38V10.092H4.472V6.366H0.836V4.638H4.472V0.911999H6.38V4.638H10.016V6.366Z"
fill="currentColor"
></path>
</svg>
</div>
<span class="text-green-500 font-heading font-medium">
functionality
</span>
</div>
</div>
<div class="inline-flex w-full md:w-auto mb-2">
<div class="flex items-center h-12 pl-2 pr-6 bg-green-100 border-2 border-green-500 rounded-full">
<div class="flex mr-2 w-8 h-8 items-center justify-center bg-white rounded-full text-green-500">
<svg
width="11"
height="11"
viewbox="0 0 11 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.016 6.366H6.38V10.092H4.472V6.366H0.836V4.638H4.472V0.911999H6.38V4.638H10.016V6.366Z"
fill="currentColor"
></path>
</svg>
</div>
<span class="text-green-500 font-heading font-medium">
ease of use
</span>
</div>
</div>
</div>
</div>
<div class="w-full md:w-1/3 text-right">
<p class="mb-8 text-sm text-gray-300">Added 2 months ago</p>
</div>
</div>
</div>
</div>
<div class="mb-2 shadow-lg rounded-t-8xl rounded-b-5xl overflow-hidden">
<div class="pt-3 pb-3 md:pb-1 px-4 md:px-16 bg-white bg-opacity-40">
<div class="flex flex-wrap items-center">
<img
class="mr-6"
src="uinel-assets/images/ecommerce-reviews/user2.png"
alt=""
/>
<h4 class="w-full md:w-auto text-xl font-heading font-medium">
Ainsley Stones
</h4>
<div class="w-full md:w-px h-2 md:h-8 mx-8 bg-transparent md:bg-gray-200"></div>
<span class="mr-4 text-xl font-heading font-medium">4.3</span>
<div class="flex">
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block text-gray-200" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="currentColor"
></path>
</svg>
</a>
</div>
</div>
</div>
<div class="px-4 md:px-16 pt-8 pb-12 bg-white">
<div class="flex flex-wrap">
<div class="w-full md:w-2/3 mb-6 md:mb-0">
<p class="mb-8 max-w-2xl text-darkBlueGray-400 leading-loose">
I haretra neque non mi aliquam, finibus hart bibendum
molestie. Morbi facilisis neque in condimentum malesuada.
Vestibulum suscipit sagittis dignissim mauris.
</p>
<div class="-mb-2">
<div class="inline-flex w-full md:w-auto md:mr-2 mb-2">
<div class="flex items-center h-12 pl-2 pr-6 bg-green-100 border-2 border-green-500 rounded-full">
<div class="flex mr-2 w-8 h-8 items-center justify-center bg-white rounded-full text-green-500">
<svg
width="11"
height="11"
viewbox="0 0 11 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.016 6.366H6.38V10.092H4.472V6.366H0.836V4.638H4.472V0.911999H6.38V4.638H10.016V6.366Z"
fill="currentColor"
></path>
</svg>
</div>
<span class="text-green-500 font-heading font-medium">
battery life
</span>
</div>
</div>
<div class="inline-flex w-full md:w-auto md:mr-2 mb-2">
<div class="flex items-center h-12 pl-2 pr-6 bg-green-100 border-2 border-green-500 rounded-full">
<div class="flex mr-2 w-8 h-8 items-center justify-center bg-white rounded-full text-green-500">
<svg
width="11"
height="11"
viewbox="0 0 11 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.016 6.366H6.38V10.092H4.472V6.366H0.836V4.638H4.472V0.911999H6.38V4.638H10.016V6.366Z"
fill="currentColor"
></path>
</svg>
</div>
<span class="text-green-500 font-heading font-medium">
functionality
</span>
</div>
</div>
</div>
</div>
<div class="w-full md:w-1/3 text-right">
<p class="mb-8 text-sm text-gray-300">Added 2 months ago</p>
</div>
</div>
</div>
</div>
<div class="mb-14 md:mb-24 shadow-lg rounded-t-8xl rounded-b-5xl overflow-hidden">
<div class="pt-3 pb-3 md:pb-1 px-4 md:px-16 bg-white bg-opacity-40">
<div class="flex flex-wrap items-center">
<img
class="mr-6"
src="uinel-assets/images/ecommerce-reviews/user3.png"
alt=""
/>
<h4 class="w-full md:w-auto text-xl font-heading font-medium">
Jasmine Joy
</h4>
<div class="w-full md:w-px h-2 md:h-8 mx-8 bg-transparent md:bg-gray-200"></div>
<span class="mr-4 text-xl font-heading font-medium">5.0</span>
<div class="flex">
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block mr-1" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="#FFCB00"
></path>
</svg>
</a>
<a class="inline-block text-gray-200" href="#">
<svg
width="20"
height="20"
viewbox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 7.91677H12.4167L10 0.416763L7.58333 7.91677H0L6.18335 12.3168L3.81668 19.5834L10 15.0834L16.1834 19.5834L13.8167 12.3168L20 7.91677Z"
fill="currentColor"
></path>
</svg>
</a>
</div>
</div>
</div>
<div class="px-4 md:px-16 pt-8 pb-12 bg-white">
<div class="flex flex-wrap">
<div class="w-full md:w-2/3 mb-6 md:mb-0">
<p class="mb-8 max-w-2xl text-darkBlueGray-400 leading-loose">
I haretra neque non mi aliquam, finibus hart bibendum
molestie. Vestibulum suscipit sagittis dignissim mauris.
</p>
<div class="-mb-2">
<div class="inline-flex w-full md:w-auto md:mr-2 mb-2">
<div class="flex items-center h-12 pl-2 pr-6 bg-green-100 border-2 border-green-500 rounded-full">
<div class="flex mr-2 w-8 h-8 items-center justify-center bg-white rounded-full text-green-500">
<svg
width="11"
height="11"
viewbox="0 0 11 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.016 6.366H6.38V10.092H4.472V6.366H0.836V4.638H4.472V0.911999H6.38V4.638H10.016V6.366Z"
fill="currentColor"
></path>
</svg>
</div>
<span class="text-green-500 font-heading font-medium">
battery life
</span>
</div>
</div>
<div class="inline-flex w-full md:w-auto md:mr-2 mb-2">
<div class="flex items-center h-12 pl-2 pr-6 bg-green-100 border-2 border-green-500 rounded-full">
<div class="flex mr-2 w-8 h-8 items-center justify-center bg-white rounded-full text-green-500">
<svg
width="11"
height="11"
viewbox="0 0 11 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.016 6.366H6.38V10.092H4.472V6.366H0.836V4.638H4.472V0.911999H6.38V4.638H10.016V6.366Z"
fill="currentColor"
></path>
</svg>
</div>
<span class="text-green-500 font-heading font-medium">
functionality
</span>
</div>
</div>
<div class="inline-flex w-full md:w-auto mb-2">
<div class="flex items-center h-12 pl-2 pr-6 bg-green-100 border-2 border-green-500 rounded-full">
<div class="flex mr-2 w-8 h-8 items-center justify-center bg-white rounded-full text-green-500">
<svg
width="11"
height="11"
viewbox="0 0 11 11"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.016 6.366H6.38V10.092H4.472V6.366H0.836V4.638H4.472V0.911999H6.38V4.638H10.016V6.366Z"
fill="currentColor"
></path>
</svg>
</div>
<span class="text-green-500 font-heading font-medium">
ease of use
</span>
</div>
</div>
</div>
</div>
<div class="w-full md:w-1/3 text-right">
<p class="mb-8 text-sm text-gray-300">Added 2 months ago</p>
</div>
</div>
</div>
</div>
<div class="text-center">
<button class="inline-block w-full md:w-auto h-full py-4 px-10 leading-8 font-heading font-medium tracking-tighter text-xl text-white bg-blue-500 hover:bg-blue-600 focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 rounded-xl">
See all
</button>
</div>
</div>
</section>
{/*features types of auctions.. 4TH section*/}
<section class="relative py-20 2xl:py-40 bg-gray-900 overflow-hidden">
<div class="absolute h-40 w-40 bg-blue-500 bottom-0 right-0 -mr-20 -mb-20 rounded-full"></div>
<div class="container px-4 mx-auto">
<div>
<div class="flex flex-wrap -mx-6 lg:-mx-8">
<div class="w-full md:w-1/2 lg:w-1/4 px-6 lg:px-8 mb-20 lg:mb-0">
<span class="flex mb-10 justify-center items-center w-20 h-20 bg-blue-500 rounded-lg">
<svg
class="w-8 h-8"
width="35"
height="35"
viewbox="0 0 35 35"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0)">
<path
d="M22.6042 34.9999H2.1875C0.981458 34.9999 0 34.0185 0 32.8124V12.3958C0 11.1897 0.981458 10.2083 2.1875 10.2083H22.6042C23.8102 10.2083 24.7917 11.1897 24.7917 12.3958V32.8124C24.7917 34.0185 23.8102 34.9999 22.6042 34.9999ZM2.1875 11.6666C1.78646 11.6666 1.45833 11.9933 1.45833 12.3958V32.8124C1.45833 33.2149 1.78646 33.5416 2.1875 33.5416H22.6042C23.0052 33.5416 23.3333 33.2149 23.3333 32.8124V12.3958C23.3333 11.9933 23.0052 11.6666 22.6042 11.6666H2.1875Z"
fill="white"
></path>
<path
d="M34.2702 5.83333C33.8677 5.83333 33.541 5.50667 33.541 5.10417V3.64583C33.541 2.43979 32.5596 1.45833 31.3535 1.45833H29.8952C29.4927 1.45833 29.166 1.13167 29.166 0.729167C29.166 0.326667 29.4927 0 29.8952 0H31.3535C33.3646 0 34.9993 1.63625 34.9993 3.64583V5.10417C34.9993 5.50667 34.6727 5.83333 34.2702 5.83333Z"
fill="white"
></path>
<path
d="M6.56217 5.83333C6.15967 5.83333 5.83301 5.50667 5.83301 5.10417V3.64583C5.83301 1.63625 7.4678 0 9.47884 0H10.9372C11.3397 0 11.6663 0.326667 11.6663 0.729167C11.6663 1.13167 11.3397 1.45833 10.9372 1.45833H9.47884C8.2728 1.45833 7.29134 2.43979 7.29134 3.64583V5.10417C7.29134 5.50667 6.96467 5.83333 6.56217 5.83333Z"
fill="white"
></path>
<path
d="M24.0618 1.45833H16.7702C16.3677 1.45833 16.041 1.13167 16.041 0.729167C16.041 0.326667 16.3677 0 16.7702 0H24.0618C24.4643 0 24.791 0.326667 24.791 0.729167C24.791 1.13167 24.4643 1.45833 24.0618 1.45833Z"
fill="white"
></path>
<path
d="M31.3535 29.1666H29.8952C29.4927 29.1666 29.166 28.8399 29.166 28.4374C29.166 28.0349 29.4927 27.7083 29.8952 27.7083H31.3535C32.5596 27.7083 33.541 26.7268 33.541 25.5208V24.0624C33.541 23.6599 33.8677 23.3333 34.2702 23.3333C34.6727 23.3333 34.9993 23.6599 34.9993 24.0624V25.5208C34.9993 27.5303 33.3646 29.1666 31.3535 29.1666Z"
fill="white"
></path>
<path
d="M34.2702 18.9583C33.8677 18.9583 33.541 18.6316 33.541 18.2291V10.9374C33.541 10.5349 33.8677 10.2083 34.2702 10.2083C34.6727 10.2083 34.9994 10.5349 34.9994 10.9374V18.2291C34.9994 18.6316 34.6727 18.9583 34.2702 18.9583Z"
fill="white"
></path>
</g>
</svg>
</span>
<div class="pb-px mb-12 bg-gray-500"></div>
<h3 class="mt-12 mb-8 text-lg font-bold font-heading text-white">
Backups
</h3>
<p class="text-lg text-gray-200">
The brown me quam, sagittis porttitor lorem vel, commodo
fringilla nisl.
</p>
</div>
<div class="w-full md:w-1/2 lg:w-1/4 px-6 lg:px-8 mb-20 lg:mb-0">
<span class="flex mb-10 justify-center items-center w-20 h-20 bg-violet-500 rounded-lg">
<svg
class="w-8 h-8"
width="35"
height="35"
viewbox="0 0 35 35"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0)">
<path
d="M24.0625 18.9583C23.7402 18.9583 23.431 18.8927 23.1467 18.7615L17.5 16.1175L11.8592 18.7585C11.569 18.8927 11.2598 18.9583 10.9375 18.9583C9.73146 18.9583 8.75 17.9769 8.75 16.7708C8.75 16.4529 8.81417 16.1583 8.94833 15.8681L15.5079 1.28917C15.8419 0.510417 16.6265 0 17.5 0C18.3735 0 19.1581 0.510417 19.4965 1.30083L26.0546 15.874C26.1858 16.1583 26.25 16.4529 26.25 16.7708C26.25 17.9769 25.2685 18.9583 24.0625 18.9583ZM17.5 14.5833C17.605 14.5833 17.7115 14.6067 17.8092 14.6519L23.7592 17.4373C24.166 17.6225 24.7917 17.2856 24.7917 16.7708C24.7917 16.6629 24.7712 16.5754 24.7275 16.4763L18.1621 1.88854C17.9346 1.35771 17.061 1.36792 16.8423 1.87833L10.2754 16.4719C10.2287 16.5754 10.2083 16.6629 10.2083 16.7708C10.2083 17.2856 10.8092 17.6327 11.2467 17.4358L17.1908 14.6533C17.2885 14.6067 17.395 14.5833 17.5 14.5833Z"
fill="white"
></path>
<path
d="M17.4997 35C8.65488 35 1.45801 27.8031 1.45801 18.9583C1.45801 12.9194 4.7903 7.46227 10.154 4.71769C10.507 4.53685 10.9518 4.6754 11.1355 5.0356C11.3193 5.3929 11.1763 5.83331 10.8176 6.0156C5.94384 8.50936 2.91634 13.4691 2.91634 18.9583C2.91634 26.9996 9.45842 33.5417 17.4997 33.5417C25.5409 33.5417 32.083 26.9996 32.083 18.9583C32.083 13.4794 29.0613 8.51956 24.1963 6.0156C23.8376 5.83185 23.6961 5.39144 23.8813 5.03414C24.0665 4.67539 24.507 4.53539 24.8628 4.7206C30.2163 7.47394 33.5413 12.931 33.5413 18.9583C33.5413 27.8031 26.3445 35 17.4997 35Z"
fill="white"
></path>
</g>
</svg>
</span>
<div class="pb-px mb-12 bg-gray-500"></div>
<h3 class="mt-12 mb-8 text-lg font-bold font-heading text-white">
Navigation
</h3>
<p class="text-lg text-gray-200">
It’s over, maecenas tincidunt malesuada dolor sit amet
malesuada.
</p>
</div>
<div class="w-full md:w-1/2 lg:w-1/4 px-6 lg:px-8 mb-10 lg:mb-0">
<span class="flex mb-10 justify-center items-center w-20 h-20 bg-green-500 rounded-lg">
<svg
class="w-8 h-8"
width="36"
height="35"
viewbox="0 0 36 35"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0)">
<path
d="M32.25 35H5.25C3.183 35 1.5 33.3638 1.5 31.3542V3.64588C1.5 3.24338 1.836 2.91672 2.25 2.91672C2.664 2.91672 3 3.24338 3 3.64588V31.3542C3 32.5603 4.0095 33.5417 5.25 33.5417H31.5V6.56255C31.5 6.16005 31.836 5.83338 32.25 5.83338C32.664 5.83338 33 6.16005 33 6.56255V34.2709C33 34.6734 32.664 35 32.25 35Z"
fill="white"
></path>
<path
d="M32.25 7.29167H5.25C3.183 7.29167 1.5 5.65542 1.5 3.64583C1.5 1.63625 3.183 0 5.25 0H29.25C29.664 0 30 0.326667 30 0.729167V5.83333H32.25C32.664 5.83333 33 6.16 33 6.5625C33 6.965 32.664 7.29167 32.25 7.29167ZM5.25 1.45833C4.0095 1.45833 3 2.43979 3 3.64583C3 4.85187 4.0095 5.83333 5.25 5.83333H28.5V1.45833H5.25Z"
fill="white"
></path>
<path
d="M12.9868 27.7055C12.2338 27.7055 11.6158 27.4897 11.1718 27.0566C10.2898 26.1991 10.2808 24.6838 11.1478 22.7866C11.9158 21.1051 13.3018 19.2443 15.0478 17.5482C16.7938 15.8507 18.7063 14.5047 20.4358 13.7565C22.3858 12.9122 23.9443 12.9209 24.8278 13.7799C25.7098 14.6374 25.7188 16.154 24.8518 18.0499C24.0838 19.7313 22.6978 21.5922 20.9518 23.2882C19.2058 24.9857 17.2933 26.3318 15.5638 27.0799C14.5963 27.4955 13.7263 27.7055 12.9868 27.7055ZM23.0143 14.582C22.5043 14.582 21.8188 14.754 21.0448 15.088C19.4803 15.7647 17.7268 17.0043 16.1068 18.5778C14.4868 20.1513 13.2148 21.8561 12.5188 23.3772C11.9488 24.627 11.8378 25.6405 12.2323 26.024C12.6268 26.4076 13.6693 26.2997 14.9548 25.7455C16.5193 25.0688 18.2728 23.8293 19.8928 22.2557C21.5128 20.6822 22.7863 18.9774 23.4823 17.4549C24.0523 16.2051 24.1633 15.1916 23.7688 14.808C23.6113 14.6563 23.3503 14.582 23.0143 14.582Z"
fill="white"
></path>
<path
d="M23.0128 27.7054C22.2733 27.7054 21.4033 27.4969 20.4358 27.0784C18.7063 26.3317 16.7923 24.9842 15.0478 23.2867C13.3018 21.5892 11.9173 19.7298 11.1478 18.0484C10.2808 16.1525 10.2898 14.6359 11.1718 13.7784C12.0523 12.9209 13.6138 12.9121 15.5638 13.755C17.2933 14.5017 19.2073 15.8492 20.9518 17.5467C22.6978 19.2442 24.0823 21.1036 24.8518 22.785C25.7188 24.6823 25.7098 26.1975 24.8278 27.055C24.3838 27.4882 23.7658 27.7054 23.0128 27.7054ZM12.9853 14.5819C12.6478 14.5819 12.3898 14.6563 12.2323 14.8094C11.8378 15.1929 11.9488 16.2065 12.5188 17.4563C13.2148 18.9773 14.4898 20.6821 16.1083 22.2571C17.7268 23.8321 19.4803 25.0702 21.0463 25.7469C22.3318 26.3025 23.3743 26.4075 23.7688 26.0254C24.1633 25.6419 24.0523 24.6284 23.4823 23.3786C22.7863 21.8575 21.5113 20.1527 19.8928 18.5777C18.2743 17.0027 16.5208 15.7646 14.9548 15.0879C14.1808 14.754 13.4953 14.5819 12.9853 14.5819ZM11.7013 14.2932H11.7163H11.7013Z"
fill="white"
></path>
</g>
</svg>
</span>
<div class="pb-px mb-12 bg-gray-500"></div>
<h3 class="mt-12 mb-8 text-lg font-bold font-heading text-white">
Documents
</h3>
<p class="text-lg text-gray-200">
The time, this accumsan augue, posuere posuere elit lorem.
</p>
</div>
<div class="w-full md:w-1/2 lg:w-1/4 px-6 lg:px-8">
<span class="flex mb-10 justify-center items-center w-20 h-20 bg-pink-500 rounded-lg">
<svg
class="w-8 h-8"
width="35"
height="35"
viewbox="0 0 35 35"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M24.0618 13.1249C24.0618 12.8935 23.952 12.6758 23.766 12.5384C23.5797 12.4009 23.3394 12.3599 23.1183 12.428L14.3682 15.1203C14.0623 15.2144 13.8535 15.4972 13.8535 15.8173V21.536C13.4245 21.2878 12.9264 21.1457 12.3952 21.1457C10.7844 21.1457 9.47852 22.4515 9.47852 24.0624C9.47852 25.6733 10.7844 26.9791 12.3952 26.9791C14.0044 26.9791 15.3092 25.6758 15.3118 24.0671V24.0624V16.3557L22.6035 14.1122V20.0777C22.1745 19.8294 21.6765 19.6874 21.1452 19.6874C19.5343 19.6874 18.2285 20.9932 18.2285 22.6041C18.2285 24.2149 19.5343 25.5207 21.1452 25.5207C22.7545 25.5207 24.0592 24.2174 24.0618 22.6087V22.6041V13.1249ZM22.6035 22.6041C22.6035 21.7986 21.9506 21.1457 21.1452 21.1457C20.3397 21.1457 19.6868 21.7986 19.6868 22.6041C19.6868 23.4095 20.3397 24.0624 21.1452 24.0624C21.9506 24.0624 22.6035 23.4095 22.6035 22.6041ZM12.3952 22.6041C11.5898 22.6041 10.9368 23.257 10.9368 24.0624C10.9368 24.8678 11.5898 25.5207 12.3952 25.5207C13.2006 25.5207 13.8535 24.8678 13.8535 24.0624C13.8535 23.257 13.2006 22.6041 12.3952 22.6041Z"
fill="white"
></path>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M10.208 3.64577C8.19447 3.64577 6.56217 5.27807 6.56217 7.2916V8.0937C4.89804 8.43149 3.64551 9.90278 3.64551 11.6666V27.7083C3.64551 29.7218 5.27781 31.3541 7.29134 31.3541H27.708C29.7215 31.3541 31.3538 29.7218 31.3538 27.7083V11.6666C31.3538 9.90278 30.1013 8.43149 28.4372 8.0937V7.2916C28.4372 5.27807 26.8049 3.64577 24.7913 3.64577H10.208ZM26.9788 8.02077V7.2916C26.9788 6.08347 25.9994 5.1041 24.7913 5.1041H10.208C8.99988 5.1041 8.02051 6.08347 8.02051 7.2916V8.02077H26.9788ZM7.29134 9.4791C6.08321 9.4791 5.10384 10.4585 5.10384 11.6666V27.7083C5.10384 28.9163 6.08321 29.8958 7.29134 29.8958H27.708C28.9161 29.8958 29.8955 28.9163 29.8955 27.7083V11.6666C29.8955 10.4585 28.9161 9.4791 27.708 9.4791H7.29134Z"
fill="white"
></path>
</svg>
</span>
<div class="pb-px mb-12 bg-gray-500"></div>
<h3 class="mt-12 mb-8 text-lg font-bold font-heading text-white">
Weekly updates
</h3>
<p class="text-lg text-gray-200">
Again and again vehicula libero at nibh volutpat lacinia non
sed you see.
</p>
</div>
</div>
</div>
</div>
</section>
{/*FAQS.. 5TH section*/}
<section class="py-20 2xl:py-40 bg-blue-50">
<div class="container px-4 mx-auto">
<div class="mb-20 text-center">
<span class="text-lg font-bold text-blue-500">
Hey! Have any questions?
</span>
<h2 class="mt-8 text-7xl font-bold font-heading">FAQ's</h2>
</div>
<div class="max-w-4xl mx-auto">
<ul>
<li class="mb-4 px-4 lg:px-12 py-8 bg-white rounded-2xl">
<button class="flex w-full text-left">
<div class="w-auto mr-8">
<span class="flex items-center justify-center w-12 h-12 text-lg font-bold bg-blue-100 rounded-full">
1
</span>
</div>
<div class="w-full mt-3">
<div class="flex items-center justify-between">
<h3 class="text-xl font-bold">
How should I develop my workflow over time?
</h3>
<span class="ml-4">
<svg
class="w-4 h-4"
width="18"
height="10"
viewbox="0 0 18 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M1.18267 9.00018C0.910673 9.26818 0.473672 9.26818 0.203672 9.00018C-0.0663284 8.73218 -0.0673279 8.29918 0.203672 8.03118L8.11167 0.201183C8.38167 -0.0668173 8.81867 -0.0668173 9.09067 0.201183L16.9987 8.03118C17.2687 8.29918 17.2687 8.73218 16.9987 9.00018C16.7277 9.26818 16.2897 9.26818 16.0197 9.00018L8.60067 1.85918L1.18267 9.00018Z"
fill="#1F40FF"
></path>
</svg>
</span>
</div>
<div class="mt-6 border-l-2 border-gray-50 pl-10">
<p class="mb-5 text-xl">
The point of using Lorem Ipsum is that it has a
more-or-less normal:
</p>
<p class="mb-2 text-lg">
<span class="inline-block mr-6 h-2 w-2 rounded-full bg-blue-500"></span>
<span>Distribution of letters</span>
</p>
<p class="text-lg">
<span class="inline-block mr-6 h-2 w-2 rounded-full bg-blue-500"></span>
<span>Content here</span>
</p>
</div>
</div>
</button>
</li>
<li class="mb-4 px-4 lg:px-12 py-8 bg-white rounded-2xl">
<button class="flex w-full text-left">
<div class="w-auto mr-8">
<span class="flex items-center justify-center w-12 h-12 text-lg font-bold bg-blue-100 rounded-full">
2
</span>
</div>
<div class="w-full mt-3">
<div class="flex items-center justify-between">
<h3 class="text-xl font-bold">Can I pay by card?</h3>
<span class="ml-4">
<svg
class="w-4 h-4"
width="18"
height="10"
viewbox="0 0 18 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M16.0185 0.999999C16.2905 0.732 16.7275 0.732 16.9975 0.999999C17.2675 1.268 17.2685 1.701 16.9975 1.969L9.0895 9.799C8.8195 10.067 8.3825 10.067 8.1105 9.799L0.2025 1.969C-0.0675004 1.701 -0.0675004 1.268 0.2025 1C0.4735 0.732 0.9115 0.732 1.1815 1L8.6005 8.141L16.0185 0.999999Z"
fill="#1F40FF"
></path>
</svg>
</span>
</div>
<div class="hidden mt-6 border-l-2 border-gray-50 pl-10">
<p class="text-xl">
The point of using Lorem Ipsum is that it has a
more-or-less normal:
</p>
</div>
</div>
</button>
</li>
<li class="mb-4 px-4 lg:px-12 py-8 bg-white rounded-2xl">
<button class="flex w-full text-left">
<div class="w-auto mr-8">
<span class="flex items-center justify-center w-12 h-12 text-lg font-bold bg-blue-100 rounded-full">
3
</span>
</div>
<div class="w-full mt-3">
<div class="flex items-center justify-between">
<h3 class="text-xl font-bold">
How often should the app be updated?
</h3>
<span class="ml-4">
<svg
class="w-4 h-4"
width="18"
height="10"
viewbox="0 0 18 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M16.0185 0.999999C16.2905 0.732 16.7275 0.732 16.9975 0.999999C17.2675 1.268 17.2685 1.701 16.9975 1.969L9.0895 9.799C8.8195 10.067 8.3825 10.067 8.1105 9.799L0.2025 1.969C-0.0675004 1.701 -0.0675004 1.268 0.2025 1C0.4735 0.732 0.9115 0.732 1.1815 1L8.6005 8.141L16.0185 0.999999Z"
fill="#1F40FF"
></path>
</svg>
</span>
</div>
<div class="hidden mt-6 border-l-2 border-gray-50 pl-10">
<p class="text-xl">
The point of using Lorem Ipsum is that it has a
more-or-less normal:
</p>
</div>
</div>
</button>
</li>
<li class="mb-4 px-4 lg:px-12 py-8 bg-white rounded-2xl">
<button class="flex w-full text-left">
<div class="w-auto mr-8">
<span class="flex items-center justify-center w-12 h-12 text-lg font-bold bg-blue-100 rounded-full">
4
</span>
</div>
<div class="w-full mt-3">
<div class="flex items-center justify-between">
<h3 class="text-xl font-bold">Are Zospace apps free?</h3>
<span class="ml-4">
<svg
class="w-4 h-4"
width="18"
height="10"
viewbox="0 0 18 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M16.0185 0.999999C16.2905 0.732 16.7275 0.732 16.9975 0.999999C17.2675 1.268 17.2685 1.701 16.9975 1.969L9.0895 9.799C8.8195 10.067 8.3825 10.067 8.1105 9.799L0.2025 1.969C-0.0675004 1.701 -0.0675004 1.268 0.2025 1C0.4735 0.732 0.9115 0.732 1.1815 1L8.6005 8.141L16.0185 0.999999Z"
fill="#1F40FF"
></path>
</svg>
</span>
</div>
<div class="hidden mt-6 border-l-2 border-gray-50 pl-10">
<p class="text-xl">
The point of using Lorem Ipsum is that it has a
more-or-less normal:
</p>
</div>
</div>
</button>
</li>
</ul>
</div>
</div>
</section>
{/*Types of subscriptions.. 6TH section*/}
<section class="relative py-20 2xl:py-40 bg-gray-800">
<div class="container px-4 pb-20 mx-auto border-b border-gray-500">
<div class="mb-14 text-center">
<span class="text-lg text-blue-400 font-bold">
Check of details
</span>
<h2 class="mt-8 text-5xl font-bold font-heading text-white">
See all features
</h2>
</div>
<div class="pt-20 border-t border-gray-500 overflow-x-auto overflow-y-hidden">
<table class="table-auto w-full mb-10">
<thead>
<tr class="text-lg text-gray-200 text-left font-bold">
<th class="pb-6"></th>
<th class="pb-6 pr-8">Feature 1</th>
<th class="pb-6 pr-8">Feature 2</th>
<th class="pb-6 pr-8">Feature 3</th>
<th class="pb-6 pr-8">Feature 4</th>
<th class="pb-6 pr-8">Feature 5</th>
</tr>
</thead>
<tbody>
<tr class="text-xl text-white bg-gray-700">
<td class="py-5 pl-10 text-left text-gray-200">
Number of Team Members
</td>
<td>5</td>
<td>20</td>
<td>200+</td>
<td>Unlimited</td>
<td>Unlimited</td>
</tr>
<tr class="text-xl text-white">
<td class="py-5 pl-10 text-left text-gray-200">Users</td>
<td>3</td>
<td>10</td>
<td>50+</td>
<td>100+</td>
<td>Unlimited</td>
</tr>
<tr class="text-xl text-white bg-gray-700">
<td class="py-5 pl-10 text-left text-gray-200">Projects</td>
<td>3/mo</td>
<td>Unlimited</td>
<td>Unlimited</td>
<td>Unlimited</td>
<td>Unlimited</td>
</tr>
<tr class="text-xl text-white">
<td class="py-5 pl-10 text-left text-gray-200">Video chat</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
</tr>
<tr class="text-xl text-white bg-gray-700">
<td class="py-5 pl-10 text-left text-gray-200">
Realt-Time Collaboration
</td>
<td>
<svg
width="16"
height="2"
viewbox="0 0 16 2"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<line
y1="1.35"
x2="16"
y2="1.35"
stroke="#414C5E"
stroke-width="1.3"
></line>
</svg>
</td>
<td>
<svg
width="16"
height="2"
viewbox="0 0 16 2"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<line
y1="1.35"
x2="16"
y2="1.35"
stroke="#414C5E"
stroke-width="1.3"
></line>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
</tr>
<tr class="text-xl text-white">
<td class="py-5 pl-10 text-left text-gray-200">Support</td>
<td>
<svg
width="16"
height="2"
viewbox="0 0 16 2"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<line
y1="1.35"
x2="16"
y2="1.35"
stroke="#414C5E"
stroke-width="1.3"
></line>
</svg>
</td>
<td>
<svg
width="16"
height="2"
viewbox="0 0 16 2"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<line
y1="1.35"
x2="16"
y2="1.35"
stroke="#414C5E"
stroke-width="1.3"
></line>
</svg>
</td>
<td>
<svg
width="16"
height="2"
viewbox="0 0 16 2"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<line
y1="1.35"
x2="16"
y2="1.35"
stroke="#414C5E"
stroke-width="1.3"
></line>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
<td>
<svg
width="20"
height="16"
viewbox="0 0 20 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.81671 15.0418L0 8.2251L0.90027 7.32483L6.81671 13.2413L19.0997 0.958252L20 1.85852L6.81671 15.0418Z"
fill="white"
></path>
</svg>
</td>
</tr>
</tbody>
</table>
<div class="flex justify-end">
<div class="max-w-xs mr-8 flex items-center">
<p class="mr-6 text-5xl font-bold font-heading text-white">
8<span class="text-3xl">%</span>
</p>
<p class="text-lg text-gray-200">
The tell condimentum turpis lorem
</p>
</div>
<div class="max-w-xs flex items-center">
<p class="mr-6 text-5xl font-bold font-heading text-white">
20
</p>
<p class="text-lg text-gray-200">
A sad laoreet sit amet nec purus
</p>
</div>
</div>
</div>
</div>
</section>
{/*Contact US.. 7nth section*/}
<section class="relative py-20 2xl:py-40 bg-gray-800">
<img
class="hidden lg:block absolute top-0 left-0 w-2/5"
src="zospace-assets/images/map.svg"
alt=""
/>
<img
class="hidden lg:block absolute top-0 left-0 mt-40 ml-40"
src="zospace-assets/images/office-tag.svg"
alt=""
/>
<div class="relative container px-4 mx-auto">
<div class="text-center mb-20">
<span class="text-lg text-blue-400 font-bold">
Have a question?
</span>
<h2 class="mt-10 text-5xl font-bold font-heading text-white">
Contact with us
</h2>
</div>
<div class="max-w-4xl mx-auto">
<div class="flex flex-wrap -mx-4 mb-20">
<div class="w-full lg:w-1/2 px-4 mb-4 lg:mb-0">
<div class="bg-gray-600 rounded-b-lg">
<img
class="h-64 w-full rounded-lg object-cover"
src="https://image.freepik.com/free-photo/contacting-with-friends-via-computer_329181-14587.jpg"
alt=""
/>
<div class="px-14 py-8">
<div class="mb-6 py-px bg-gray-500"></div>
<h3 class="mb-8 lg:mb-4 text-xl text-white font-bold">
Have any question? Send a message!
</h3>
<div class="md:text-right">
<a
class="inline-block px-12 py-4 border border-gray-300 hover:border-gray-200 rounded-full font-bold text-white"
href="#"
>
Message
</a>
</div>
</div>
</div>
</div>
<div class="w-full lg:w-1/2 px-4">
<div class="py-6 px-8 mb-4 bg-gray-600 rounded-lg">
<div class="flex items-center">
<span class="flex items-center justify-center w-12 h-12 mr-8 bg-blue-500 rounded-lg">
<svg
class="w-4 h-4"
width="18"
height="18"
viewbox="0 0 18 18"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M17.9347 13.3167C17.811 12.6058 17.2022 12.0401 16.4551 11.94L12.3077 11.3855C11.555 11.2832 10.8101 11.6825 10.4984 12.3528C10.4185 12.5237 10.3521 12.7014 10.2981 12.8848C9.13582 12.4 8.09277 11.7004 7.19375 10.8018C6.29473 9.90315 5.59374 8.86053 5.10992 7.6987C5.29332 7.64471 5.4711 7.57835 5.64213 7.4985C6.31274 7.18695 6.70993 6.44351 6.60866 5.69108L6.05394 1.54536C5.9538 0.797426 5.38784 0.188953 4.66434 0.0641091C4.40105 0.0202451 4.18164 0 3.97348 0C2.61201 0 1.32368 0.71982 0.612565 1.87716C-0.157059 3.13122 -0.0501675 4.73507 0.128736 5.9925C0.533802 8.84029 1.99766 11.7038 4.14451 13.8498C5.74002 15.4446 7.71246 16.6402 9.84693 17.306C10.9339 17.6457 12.2942 18 13.605 18C14.5851 18 15.537 17.802 16.3235 17.2498C17.3733 16.5109 18 15.3052 18 14.0196C18 13.8115 17.9797 13.5911 17.9347 13.3167Z"
fill="white"
></path>
</svg>
</span>
<p class="text-lg font-bold text-white">
+44 20457523 00 01
</p>
</div>
</div>
<div class="py-6 px-8 mb-10 bg-gray-600 rounded-lg">
<div class="flex items-center">
<span class="flex items-center justify-center w-12 h-12 mr-8 bg-blue-500 rounded-lg">
<svg
class="w-5 h-3"
width="21"
height="14"
viewbox="0 0 21 14"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M18.8109 0H2.1878C0.981688 0 0 0.980499 0 2.18676V11.8119C0 13.0182 0.981688 14 2.1878 14H18.8122C20.0183 14 21 13.0182 21 11.8119V2.18676C20.9987 0.980499 20.017 0 18.8109 0ZM19.2492 4.73317L11.716 8.67092C11.3393 8.86387 10.9193 8.96887 10.4993 8.96887C10.0794 8.96887 9.66858 8.86387 9.28273 8.67092L1.74945 4.73317V2.75511L10.0872 7.11288C10.3405 7.24414 10.6555 7.24414 10.9101 7.11288L19.2479 2.75511V4.73317H19.2492Z"
fill="white"
></path>
</svg>
</span>
<p class="text-lg font-bold text-white">
support@shuffle.dev.dev
</p>
</div>
</div>
<div class="py-6 px-8">
<div class="flex">
<span class="flex-shrink-0 flex items-center justify-center w-12 h-12 mr-8 bg-blue-500 rounded-lg">
<svg
class="w-5 h-5"
width="23"
height="23"
viewbox="0 0 23 23"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M18.5 11C16.0185 11 14 13.0962 14 15.6729C14 19.2285 17.8951 22.6871 18.0612 22.8339C18.3123 23.0554 18.6877 23.0554 18.9388 22.8339C19.1049 22.6885 23 19.2298 23 15.6729C23 13.0962 20.9815 11 18.5 11ZM18.5 17.4618C17.5077 17.4618 16.7003 16.6338 16.7003 15.6161C16.7003 14.5985 17.5077 13.7705 18.5 13.7705C19.4923 13.7705 20.2997 14.5985 20.2997 15.6161C20.2997 16.6338 19.4923 17.4618 18.5 17.4618Z"
fill="white"
></path>
<path
d="M9.01758 0C4.04824 0 0 4.04035 0 9C0 13.9597 4.04824 18 9.01758 18C9.90081 18 10.7583 17.8745 11.5604 17.6315C10.1794 14.5374 10.8571 11.7539 12.7236 9.9193C12.6912 9.9193 12.2597 9.73436 12.2272 9.72086C8.69567 8.37903 5.3927 12.6232 8.35888 16.156C6.02299 15.94 4.00361 14.6171 2.84987 12.7096C4.09829 12.4153 5.00721 11.3057 5.02344 9.9922C5.04373 9.16199 5.60505 8.59232 6.30433 8.43573C9.41794 7.77021 9.7128 3.90535 8.51307 1.83051C9.34355 1.78461 10.0442 1.80756 11.0383 2.10049C10.7881 4.61407 12.1501 7.66087 15.1596 7.37468L16.0158 7.27614C16.0875 7.57312 16.1335 7.87011 16.1605 8.18464C16.7272 8.08745 17.4468 8.06855 18 8.17519C17.5739 3.60027 13.7056 0 9.01758 0Z"
fill="white"
></path>
</svg>
</span>
<div>
<div class="pb-4 pr-16 mb-6 border-b border-gray-500">
<p class="text-lg font-bold text-white">
Bayswater, London
</p>
<p class="text-lg font-bold text-white">W16EG, UK</p>
</div>
<p class="text-gray-400">
The one est bad, semper six. At sem quis, congue
</p>
</div>
</div>
</div>
</div>
</div>
<div class="text-center">
<p class="mb-4 text-xl text-gray-300">
The brown fox jumps over the lazy dog.
</p>
<a
class="inline-flex text-blue-400 hover:text-blue-500 font-bold"
href="#"
>
<span>Learn more</span>
<svg
class="ml-4 w-4 h-5"
width="19"
height="20"
viewbox="0 0 19 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M18.7383 1.47342L18.7383 10.9304L17.5562 10.9304L17.5562 2.89788L0.834948 19.625L0.00154682 18.7916L16.7228 2.06448L9.28125 2.06448L9.28125 0.882355L18.1472 0.882355C18.4737 0.882355 18.7383 1.14697 18.7383 1.47342Z"
fill="#1F40FF"
></path>
</svg>
</a>
</div>
</div>
</div>
</section>
{/*Processes to follow .. 8th section*/}
<section class="pt-20 2xl:pt-40 pb-40 2xl:pb-80 overflow-hidden">
<div class="container px-4 mx-auto">
<div class="max-w-xl mx-auto mb-16 lg:mb-28 text-center">
<span class="text-lg font-bold text-blue-500">How it works</span>
<h2 class="mt-6 mb-12 text-6xl font-bold font-heading">
Build and launch without problems
</h2>
<p class="text-lg text-gray-500">
The brown fox jumps over the lazy dog.
</p>
</div>
<div class="flex flex-wrap items-center -mx-10">
<div class="relative w-full lg:w-1/2 px-10 mb-16 lg:mb-0">
<div class="relative lg:max-w-md lg:ml-auto z-10">
<img
class="object-cover w-full lg:w-112 h-160"
src="https://images.pexels.com/photos/7148031/pexels-photo-7148031.jpeg?q=80&fm=jpg&crop=faces&cs=tinysrgb&fit=crop&h=450&w=940"
alt=""
/>
<div class="absolute bottom-0 left-0 w-full px-12">
<div class="flex pt-10 pb-16 w-full border-t border-gray-200">
<a
class="inline-flex mr-10 w-20 h-20 items-center justify-center bg-white rounded-lg"
href="#"
>
<svg
class="-mb-2 -mr-2"
width="38"
height="38"
viewbox="0 0 38 38"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M0.791667 6.33333C0.354667 6.33333 0 5.97867 0 5.54167V3.95833C0 1.7765 1.7765 0 3.95833 0H5.54167C5.97867 0 6.33333 0.354667 6.33333 0.791667C6.33333 1.22867 5.97867 1.58333 5.54167 1.58333H3.95833C2.64892 1.58333 1.58333 2.64892 1.58333 3.95833V5.54167C1.58333 5.97867 1.22867 6.33333 0.791667 6.33333Z"
fill="#1F40FF"
></path>
<path
d="M30.8747 6.33333C30.4377 6.33333 30.083 5.97867 30.083 5.54167V3.95833C30.083 2.64892 29.0174 1.58333 27.708 1.58333H26.1247C25.6877 1.58333 25.333 1.22867 25.333 0.791667C25.333 0.354667 25.6877 0 26.1247 0H27.708C29.8898 0 31.6664 1.7765 31.6664 3.95833V5.54167C31.6664 5.97867 31.3117 6.33333 30.8747 6.33333Z"
fill="#1F40FF"
></path>
<path
d="M19.7914 1.58333H11.8747C11.4377 1.58333 11.083 1.22867 11.083 0.791667C11.083 0.354667 11.4377 0 11.8747 0H19.7914C20.2284 0 20.583 0.354667 20.583 0.791667C20.583 1.22867 20.2284 1.58333 19.7914 1.58333Z"
fill="#1F40FF"
></path>
<path
d="M16.6247 31.6667H11.8747C11.4377 31.6667 11.083 31.312 11.083 30.875C11.083 30.438 11.4377 30.0834 11.8747 30.0834H16.6247C17.0617 30.0834 17.4163 30.438 17.4163 30.875C17.4163 31.312 17.0617 31.6667 16.6247 31.6667Z"
fill="#1F40FF"
></path>
<path
d="M5.54167 31.6667H3.95833C1.7765 31.6667 0 29.8902 0 27.7084V26.125C0 25.688 0.354667 25.3334 0.791667 25.3334C1.22867 25.3334 1.58333 25.688 1.58333 26.125V27.7084C1.58333 29.0178 2.64892 30.0834 3.95833 30.0834H5.54167C5.97867 30.0834 6.33333 30.438 6.33333 30.875C6.33333 31.312 5.97867 31.6667 5.54167 31.6667Z"
fill="#1F40FF"
></path>
<path
d="M0.791667 20.5833C0.354667 20.5833 0 20.2286 0 19.7916V11.8749C0 11.4379 0.354667 11.0833 0.791667 11.0833C1.22867 11.0833 1.58333 11.4379 1.58333 11.8749V19.7916C1.58333 20.2286 1.22867 20.5833 0.791667 20.5833Z"
fill="#1F40FF"
></path>
<path
d="M30.8747 17.4166C30.4377 17.4166 30.083 17.0619 30.083 16.6249V11.8749C30.083 11.4379 30.4377 11.0833 30.8747 11.0833C31.3117 11.0833 31.6663 11.4379 31.6663 11.8749V16.6249C31.6663 17.0619 31.3117 17.4166 30.8747 17.4166Z"
fill="#1F40FF"
></path>
<path
d="M22.0118 38C21.4418 38 20.9795 37.5377 20.9795 36.9677V15.2823C20.9795 14.7123 21.4418 14.25 22.0118 14.25C22.2873 14.25 22.547 14.3577 22.7417 14.5524L37.6773 29.488C37.8721 29.6812 37.9829 29.9472 37.9829 30.2211C37.9829 30.7911 37.5206 31.2534 36.9506 31.2534H28.9563L22.7544 37.6849C22.5533 37.8908 22.2921 38 22.0118 38ZM22.5628 16.6123V35.6044L28.0507 29.9139C28.1995 29.7587 28.4053 29.6717 28.6207 29.6717H35.6206L22.5628 16.6123ZM36.5658 30.6153H36.5817H36.5658Z"
fill="#1F40FF"
></path>
</svg>
</a>
<div>
<p class="mb-1 text-lg font-bold text-blue-500">
Zospace
</p>
<h4 class="text-4xl font-bold text-white">
How it works
</h4>
</div>
</div>
</div>
</div>
<img
class="hidden lg:block absolute top-0 right-0 mt-52 -mr-40"
src="zospace-assets/images/blue-eclipse.png"
alt=""
/>
</div>
<div class="w-full lg:w-1/2 px-10">
<div class="max-w-lg">
<ul>
<li class="flex pb-10 mb-8 border-b border-gray-50">
<div class="mr-8">
<span class="flex justify-center items-center w-14 h-14 bg-blue-50 text-lg font-bold rounded-full">
1
</span>
</div>
<div class="max-w-xs">
<h3 class="mb-6 text-lg font-bold font-heading">
Register account
</h3>
<p class="text-lg">
It’s over, maecenas tincidunt malesuada dolor sit
amet malesuada.
</p>
</div>
</li>
<li class="flex pb-10 mb-8 border-b border-gray-50">
<div class="mr-8">
<span class="flex justify-center items-center w-14 h-14 bg-blue-50 text-lg font-bold rounded-full">
2
</span>
</div>
<div class="max-w-xs">
<h3 class="mb-6 text-lg font-bold font-heading">
Customize tools
</h3>
<p class="text-lg">
The brown me quam, sagittis porttitor lorem vel, commodo
fringilla nisl.
</p>
</div>
</li>
<li class="flex pb-10 border-b border-gray-50">
<div class="mr-8">
<span class="flex justify-center items-center w-14 h-14 bg-blue-50 text-lg font-bold rounded-full">
3
</span>
</div>
<div class="max-w-xs">
<h3 class="mb-6 text-lg font-bold font-heading">
Work with your team
</h3>
<p class="text-lg">
The time, this accumsan augue, posuere posuere elit
lorem.
</p>
</div>
</li>
</ul>
<div class="mt-10 text-right">
<a
class="inline-block font-bold text-blue-500 hover:text-blue-600"
href="#"
>
<span>Learn more</span>
<span class="inline-block ml-6">
<svg
width="19"
height="20"
viewbox="0 0 19 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M18.7383 1.47342L18.7383 10.9304L17.5562 10.9304L17.5562 2.89788L0.834948 19.625L0.00154682 18.7916L16.7228 2.06448L9.28125 2.06448L9.28125 0.882355L18.1472 0.882355C18.4737 0.882355 18.7383 1.14697 18.7383 1.47342Z"
fill="currentColor"
></path>
</svg>
</span>
</a>
</div>
</div>
</div>
</div>
</div>
</section>
{/*Footer .. 9th section*/}
<section class="py-20 2xl:py-40 bg-gray-800">
<div class="container px-4 mx-auto">
<div class="flex flex-wrap -mx-4 pb-24 mb-16 border-b border-gray-400">
<div class="w-full lg:w-2/5 px-4 mb-16 lg:mb-0">
<span class="text-lg text-blue-400 font-bold">
We're Zospace
</span>
<h2 class="max-w-sm mt-8 mb-12 text-5xl text-white font-bold font-heading">
Thank you for your time
</h2>
<p class="mb-16 text-gray-300">
The brown fox jumps over the lazy dog.
</p>
<div>
<a
class="inline-block mb-4 sm:mb-0 sm:mr-4 py-4 px-12 text-white font-bold bg-blue-500 hover:bg-blue-600 rounded-full transition duration-200"
href="#"
>
Active demo
</a>
<a
class="inline-block px-12 py-4 text-white font-bold border border-gray-200 hover:border-white rounded-full"
href="#"
>
Contact
</a>
</div>
</div>
<div class="w-full lg:w-3/5 px-4">
<div class="flex flex-wrap -mx-4">
<div class="w-full md:w-1/2 lg:w-1/3 px-4 mb-16 lg:mb-0">
<ul class="text-lg">
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Hello
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Story
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Pricing
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Applications
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Stats
</a>
</li>
<li>
<a class="text-gray-200 hover:text-gray-100" href="#">
Blog
</a>
</li>
</ul>
</div>
<div class="w-full md:w-1/2 lg:w-1/3 px-4 mb-16 lg:mb-0">
<ul class="text-lg">
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Newsletter
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Features
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
How it works
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
FAQ
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Portfolio
</a>
</li>
<li>
<a class="text-gray-200 hover:text-gray-100" href="#">
Team
</a>
</li>
</ul>
</div>
<div class="w-full lg:w-1/3 px-4">
<ul class="text-lg">
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
New account
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Log in
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Testimonials
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Contact
</a>
</li>
<li class="mb-6">
<a class="text-gray-200 hover:text-gray-100" href="#">
Privacy Policy
</a>
</li>
<li>
<a class="text-gray-200 hover:text-gray-100" href="#">
Cookies
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="md:flex justify-between">
<p class="text-lg text-gray-200 mb-8 md:mb-0">
© 2021 Shuffle. All rights reserved.
</p>
<div class="flex items-center">
<a class="inline-block mr-2" href="#">
<img
class="h-12"
src="zospace-assets/logos/facebook.svg"
alt=""
/>
</a>
<a class="inline-block mr-2" href="#">
<img
class="h-12"
src="zospace-assets/logos/instagram.svg"
alt=""
/>
</a>
<a class="inline-block" href="#">
<img
class="h-12"
src="zospace-assets/logos/twitter.svg"
alt=""
/>
</a>
</div>
</div>
</div>
</section>
</div>
</>
);
};
export default About;
| 48.211705 | 1,063 | 0.422395 |
3d2ea4ed020f87bd7ab8f84b031859ee25cd4944 | 95 | js | JavaScript | events/error.js | vlfz/whooves | 5c80ddce5aeeb9d6c8b196962e44e1d6cde1e08a | [
"MIT"
] | 6 | 2021-09-26T19:59:03.000Z | 2021-09-27T21:35:22.000Z | events/error.js | vlfz/whooves | 5c80ddce5aeeb9d6c8b196962e44e1d6cde1e08a | [
"MIT"
] | 4 | 2021-09-26T19:50:56.000Z | 2021-10-03T16:12:09.000Z | events/error.js | vlfz/whooves | 5c80ddce5aeeb9d6c8b196962e44e1d6cde1e08a | [
"MIT"
] | 1 | 2021-09-27T16:54:07.000Z | 2021-09-27T16:54:07.000Z | module.exports = (client, error) => {
client.userLib.sendLog(`Ошибка - ${error.message}`);
};
| 23.75 | 53 | 0.652632 |
3d2f0c30dc1ad2efeb3b755a11cba708bac0e630 | 68 | js | JavaScript | docs/search/pages_1.js | rodolfoviolac/qser | 031a520cf6d8adfd703cfc50df0d9b9ace41fdf3 | [
"MIT"
] | 1 | 2020-03-14T23:24:22.000Z | 2020-03-14T23:24:22.000Z | docs/search/pages_1.js | rodolfoviolac/qser | 031a520cf6d8adfd703cfc50df0d9b9ace41fdf3 | [
"MIT"
] | null | null | null | docs/search/pages_1.js | rodolfoviolac/qser | 031a520cf6d8adfd703cfc50df0d9b9ace41fdf3 | [
"MIT"
] | null | null | null | var searchData=
[
['qser_139',['QSER',['../index.html',1,'']]]
];
| 13.6 | 46 | 0.514706 |
3d324c2c358a6da328748ff0cebc44bfff0d54e3 | 3,555 | js | JavaScript | public/plugins/jscroll-master/jquery.jscroll.min.js | tantaroth/ismo.lvl | df9851873b07ad3e23c76bf400086d8a2ae69b58 | [
"MIT"
] | 2 | 2015-11-05T05:58:03.000Z | 2016-07-19T14:43:16.000Z | static/js/libs/jquery/jquery.jscroll.min.js | nherment/arkhaios | 4352e2132c750ccafeedda8dd8e103df8eef1f7d | [
"MIT"
] | null | null | null | static/js/libs/jquery/jquery.jscroll.min.js | nherment/arkhaios | 4352e2132c750ccafeedda8dd8e103df8eef1f7d | [
"MIT"
] | null | null | null | /*!
* jScroll - jQuery Plugin for Infinite Scrolling / Auto-Paging - v2.1.1
* http://jscroll.com/
*
* Copyright 2011-2013, Philip Klauzinski
* http://klauzinski.com/
* Dual licensed under the MIT and GPL Version 2 licenses.
* http://jscroll.com/#license
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
*
* @author Philip Klauzinski
* @requires jQuery v1.4.3+
*/
(function(b){b.jscroll={defaults:{debug:false,autoTrigger:true,loadingHtml:"<small>Loading...</small>",padding:0,nextSelector:"a:last",contentSelector:"",pagingSelector:""}};var a=function(e,g){var o=e.data("jscroll"),n=(typeof g==="function")?{callback:g}:g,p=b.extend({},b.jscroll.defaults,n,o||{}),c=(e.css("overflow-y")==="visible"),l=e.find(p.nextSelector).first(),u=b(window),h=b(document),q=c?b(window):e,m=p.contentSelector?l.attr("href")+" "+p.contentSelector:l.attr("href");e.data("jscroll",b.extend({},o,{initialized:true,waiting:false,nextHref:m}));r();k();if(p.autoTrigger){d(l);q.bind("scroll.jscroll",function(){return i()})}else{l.bind("click.jscroll",function(){d(l);t();return false})}function k(){var w=b(p.loadingHtml).filter("img").attr("src");if(w){var v=new Image();v.src=w}}function r(){if(!e.find(".jscroll-inner").length){e.contents().wrapAll('<div class="jscroll-inner" />')}}function d(v){if(p.pagingSelector){var w=v.closest(p.pagingSelector).hide()}else{var w=v.parent().not(".jscroll-inner,.jscroll-added").addClass("jscroll-next-parent").hide();if(!w.length){v.wrap('<div class="jscroll-next-parent" />').parent().hide()}}}function j(){return q.unbind(".jscroll").removeData("jscroll").find(".jscroll-inner").children().unwrap().filter(".jscroll-added").children().unwrap()}function i(){r();var C=e.find("div.jscroll-inner").first(),A=e.data("jscroll"),B=parseInt(e.css("borderTopWidth")),x=isNaN(B)?0:B,w=parseInt(e.css("paddingTop"))+x,z=c?q.scrollTop():e.offset().top,y=C.length?C.offset().top:0,v=Math.ceil(z-y+q.height()+w);if(s(A)&&!A.waiting&&v+p.padding>=C.outerHeight()){A.nextHref=b.trim(A.nextHref+" "+p.contentSelector);f("info","jScroll:",C.outerHeight()-v,"from bottom. Loading next request...");return t()}}function s(v){v=v||e.data("jscroll");if(!v.nextHref){f("warn","jScroll: nextSelector not found - destroying");e.jscroll.destroy();return false}else{return true}}function t(){var w=e.find("div.jscroll-inner").first(),v=e.data("jscroll");v.waiting=true;w.append('<div class="jscroll-added" />').children(".jscroll-added").last().html('<div class="jscroll-loading">'+p.loadingHtml+"</div>");return s(v)&&e.animate({scrollTop:w.outerHeight()},0,function(){w.find("div.jscroll-added").last().load(v.nextHref,function(z,y,A){var x=b(this).find(p.nextSelector).first();v.waiting=false;v.nextHref=p.contentSelector?x.attr("href")+" "+p.contentSelector:x.attr("href");b(".jscroll-next-parent",e).remove();if(p.autoTrigger){d(x)}else{x.bind("click.jscroll",function(){d(x);i();return false})}if(p.callback){p.callback.call(this)}f("dir",v)})})}function f(v){if(p.debug&&typeof console==="object"&&(typeof v==="object"||typeof console[v]==="function")){if(typeof v==="object"){var x=[];for(var w in v){if(typeof console[w]==="function"){x=(v[w].length)?v[w]:[v[w]];console[w].apply(console,x)}else{console.log.apply(console,x)}}}else{console[v].apply(console,Array.prototype.slice.call(arguments,1))}}}b.extend(e.jscroll,{destroy:j});return e};b.fn.jscroll=function(c){return this.each(function(){var f=b(this),e=f.data("jscroll");if(e&&e.initialized){return}var d=new a(f,c)})}})(jQuery); | 237 | 3,132 | 0.692827 |
3d3479ab98cd4b3a0ab3ca1faa1c4f7ddd3c0c2d | 194 | js | JavaScript | client_packages/index.js | yotewach/ragemp | a66c55dcd6dae96e07d5e1f8e7467008ff3d5d4c | [
"MIT"
] | 13 | 2017-09-18T08:42:53.000Z | 2020-09-05T16:16:03.000Z | client_packages/index.js | yotewach/ragemp | a66c55dcd6dae96e07d5e1f8e7467008ff3d5d4c | [
"MIT"
] | 28 | 2017-09-12T03:20:08.000Z | 2020-09-13T16:27:12.000Z | client_packages/index.js | yotewach/ragemp | a66c55dcd6dae96e07d5e1f8e7467008ff3d5d4c | [
"MIT"
] | 12 | 2017-10-28T08:17:10.000Z | 2020-06-07T12:46:01.000Z | require('client/index.js');
require('noclip/index.js');
require("MapEditor/MapEditor.js");
require("MapEditor/object_data.js");
require("MapEditor/Natives.js");
//# sourceMappingURL=index.js.map | 32.333333 | 36 | 0.757732 |
3d35a238ca810a5fca1df4483b50e2876e5ce3cd | 1,349 | js | JavaScript | scripts/.eslintrc.js | bt7s7k7/Vue3GUI | b1eae0c4f0c9c4259a66430b1f5231b1f7666bb3 | [
"MIT"
] | null | null | null | scripts/.eslintrc.js | bt7s7k7/Vue3GUI | b1eae0c4f0c9c4259a66430b1f5231b1f7666bb3 | [
"MIT"
] | null | null | null | scripts/.eslintrc.js | bt7s7k7/Vue3GUI | b1eae0c4f0c9c4259a66430b1f5231b1f7666bb3 | [
"MIT"
] | null | null | null | module.exports = {
root: true,
env: {
node: true
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint"
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
"no-console": "warn",
"no-debugger": "warn",
"prefer-const": "off",
"semi": ["warn", "never"],
"prefer-rest-params": "off",
"quotes": ["warn", "double", { "allowTemplateLiterals": true }],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/ban-types": "off"
},
ignorePatterns: [
"/node_modules",
"/build",
"/dist",
"/ucpem_ports",
]
}
| 30.659091 | 72 | 0.553002 |
3d35f999c6c4f77d4914ed7f27d07815cb8df8e8 | 2,340 | js | JavaScript | assets/mcstatus.js | insanity54/coolworld-simplesite | 2c764efb2ac568d9175a043d682337ab5d93a54a | [
"MIT"
] | null | null | null | assets/mcstatus.js | insanity54/coolworld-simplesite | 2c764efb2ac568d9175a043d682337ab5d93a54a | [
"MIT"
] | 1 | 2018-10-05T03:29:42.000Z | 2018-10-05T03:29:42.000Z | assets/mcstatus.js | insanity54/coolworld-simplesite | 2c764efb2ac568d9175a043d682337ab5d93a54a | [
"MIT"
] | null | null | null | function makeRequests(cb) {
//console.log('checking server! arg received: ' + template);
var res = {};
//
// GET ONLINE/OFFLINE STATUS
//
$.ajax({
url: "https://mcapi.ca/query/coolworld.servegame.com:25565/status",
dataType: "json",
timeout: 10000
})
.fail(function (err) {
console.log('fail on status');
return cb(err);
})
.done(function (data) {
//console.log(data);
res.online = data.status;
if (!res.online) {
res.playerCount = 0;
return cb(null, res);
}
//
// GET PLAYER LIST
//
$.ajax({
url: "https://mcapi.ca/query/coolworld.servegame.com:25565/list",
dataType: "json",
timeout: 10000
})
.fail(function (err) {
console.log('fail on list');
return cb(err);
})
.done(function (data) {
res.playerCount = data.Players.online;
res.players = data.Players.list;
return cb(null, res);
});
});
}
function check() {
makeRequests(function (err, results) {
if (err) {
console.log('error received from makerequests- ' + err);
console.log(err);
$("#status-text").html('<span class="red"><i id="emblem" class="glyphicon glyphicon-flag"></i></span> Problem connecting to status server.');
$("#players-text").html('This can happen if you use a script blocker like privacy badger, script safe, etc. For this status indicator to work, this page must be able to access mcapi.ca');
return tryLater();
}
var playerCount = results.playerCount || 0;
var players = results.players || [];
var statusString;
//console.log('results.online=' + results.online);
if (results.online) {
statusString = '<span class="green"><i id="emblem" class="glyphicon glyphicon-ok"></i></span> ONLINE - ' + playerCount + ' players';
} else {
statusString = '<span class="red"><i id="emblem" class="glyphicon glyphicon-remove"></i></span> OFFLINE';
}
$("#status-text").html(statusString);
$("#players-text").html(players.join(', '));
$('#emblem').animo({
animation: "bounceIn"
});
return tryLater();
});
}
function tryLater() {
setTimeout(check, 30000);
}
$(document).ready(function () {
check();
}); | 24.631579 | 193 | 0.571368 |
3d376937db54ffd90adbfdb63ca76fb385f334a6 | 520 | js | JavaScript | client/util/get-menu-items.js | Iftahh/sagefy | 230a5b6e77136d9b015cbf2da0948cb74f80bb6c | [
"Apache-2.0"
] | 59 | 2018-10-13T04:10:30.000Z | 2021-12-24T00:25:37.000Z | client/util/get-menu-items.js | Iftahh/sagefy | 230a5b6e77136d9b015cbf2da0948cb74f80bb6c | [
"Apache-2.0"
] | 178 | 2015-01-01T00:18:20.000Z | 2017-07-18T14:34:29.000Z | client/util/get-menu-items.js | Iftahh/sagefy | 230a5b6e77136d9b015cbf2da0948cb74f80bb6c | [
"Apache-2.0"
] | 14 | 2018-10-26T04:17:16.000Z | 2021-11-24T18:23:40.000Z | module.exports = function getMenuItems(kind, entityId) {
if (!kind || !entityId)
throw new Error('getMenuItems: Missing kind or entityId')
return [
{
href: `/${kind}/${entityId}/talk`,
icon: 'talk',
name: 'Talk',
itemProp: kind === 'subjects' ? 'discussionUrl' : undefined,
},
{
href: `/${kind}/${entityId}/history`,
icon: 'history',
name: 'History',
},
{
href: `/${kind}/${entityId}/edit`,
icon: 'edit',
name: 'Edit',
},
]
}
| 22.608696 | 66 | 0.519231 |
3d3849fbb334f2c38082ba8818e74e8335adbe4e | 98 | js | JavaScript | resources/js/app.js | truckhang181001/SODE_Store | 28030d1175df504b3f6f766d9816ea7fb3230466 | [
"MIT"
] | null | null | null | resources/js/app.js | truckhang181001/SODE_Store | 28030d1175df504b3f6f766d9816ea7fb3230466 | [
"MIT"
] | null | null | null | resources/js/app.js | truckhang181001/SODE_Store | 28030d1175df504b3f6f766d9816ea7fb3230466 | [
"MIT"
] | null | null | null | require('./bootstrap');
require('./main');
require('./map-custom');
// require('./slick-custom');
| 19.6 | 29 | 0.622449 |
3d3b8c63074e20b48d206ef7fbcbdc065186b5af | 1,144 | js | JavaScript | src-cordova/hooks/android-before-build.js | kazemar/aktnmap | f7d6aa36e8e9053eedaad00ae845240e83796cd3 | [
"MIT"
] | 12 | 2018-09-03T22:55:45.000Z | 2022-01-23T06:47:48.000Z | src-cordova/hooks/android-before-build.js | kazemar/aktnmap | f7d6aa36e8e9053eedaad00ae845240e83796cd3 | [
"MIT"
] | 300 | 2018-05-07T07:41:38.000Z | 2022-03-28T14:04:24.000Z | src-cordova/hooks/android-before-build.js | kazemar/aktnmap | f7d6aa36e8e9053eedaad00ae845240e83796cd3 | [
"MIT"
] | 2 | 2019-11-21T10:12:15.000Z | 2021-08-03T07:07:43.000Z | module.exports = function(context) {
// Copy any build extras
console.log('Copying build extras')
var path = context.requireCordovaModule('path')
var fs = context.requireCordovaModule('fs')
fs.copyFileSync(path.join(__dirname, '..', 'build-extras.gradle'),
path.join(__dirname, '..', 'platforms', 'android', 'build-extras.gradle'))
// Required to manage these issues
// https://github.com/zo0r/react-native-push-notification/issues/748
// https://forum.matomo.org/t/dexarchivebuilderexception-when-building-android-application-with-piwik-sdk/27518
var Q = context.requireCordovaModule('q')
var defer = new Q.defer()
fs.readFile(path.join(__dirname, '..', 'platforms', 'android', 'build.gradle'), (error, data) => {
if (error) {
console.log(error)
defer.resolve()
return
}
console.log('Updating build file')
var buildFile = data.toString().replace(/jcenter\(\)/g, 'maven { url "https://maven.google.com" }\n\tjcenter()')
buildFile = data.toString().replace(/VERSION_1_6/g, 'VERSION_1_8')
fs.writeFileSync(path.join(__dirname, '..', 'platforms', 'android', 'build.gradle'), buildFile)
defer.resolve()
})
}
| 42.37037 | 114 | 0.701923 |
3d3c53e7a030d1a45e08096091ffc966a8f92d5d | 39 | js | JavaScript | packages/2019/08/22/index.js | antonmedv/year | ae5d8524f58eaad481c2ba599389c7a9a38c0819 | [
"MIT"
] | 7 | 2017-07-03T19:53:01.000Z | 2021-04-05T18:15:55.000Z | packages/2019/08/22/index.js | antonmedv/year | ae5d8524f58eaad481c2ba599389c7a9a38c0819 | [
"MIT"
] | 1 | 2018-09-05T11:53:41.000Z | 2018-12-16T12:36:21.000Z | packages/2019/08/22/index.js | antonmedv/year | ae5d8524f58eaad481c2ba599389c7a9a38c0819 | [
"MIT"
] | 2 | 2019-01-27T16:57:34.000Z | 2020-10-11T09:30:25.000Z | module.exports = new Date(2019, 7, 22)
| 19.5 | 38 | 0.692308 |
3d3cbee02a9ab5fe91df678546af4c9f4a38a4a3 | 1,165 | js | JavaScript | js/simulation.js | westoncb/under-game | e27e5e7be86a1004d87ae164361295e1aac73b2a | [
"MIT"
] | 105 | 2018-11-24T08:07:40.000Z | 2021-03-24T18:19:50.000Z | js/simulation.js | westoncb/under-game | e27e5e7be86a1004d87ae164361295e1aac73b2a | [
"MIT"
] | 2 | 2018-12-11T19:41:19.000Z | 2019-12-11T08:44:44.000Z | js/simulation.js | westoncb/under-game | e27e5e7be86a1004d87ae164361295e1aac73b2a | [
"MIT"
] | 6 | 2018-12-10T19:45:17.000Z | 2019-12-11T07:48:23.000Z | const StateTransformer = require('./StateTransformer.js');
const Events = require('./events.js');
/*
This Simulation StateTransformer is always running and just
manages other StateTransformers. It's responsible for swapping
StateTransformers in response to 'change_transformer' events
and calling the framework methods (e.g. update(...)/handleEvent(...))
on the current StateTransformer.
*/
class Simulation extends StateTransformer {
constructor() {
super();
this.subTransformer = new EmptyStateTransformer();
}
update(time, deltaTime) {
while(!Events.empty()) {
this.handleEvent(Events.dequeue());
}
this.subTransformer.update(time, deltaTime);
}
handleEvent(event) {
if (event.name === 'change_transformer') {
this.swapSubTransformer(event.data.transformer);
} else {
this.subTransformer.handleEvent(event);
}
}
render() {
this.subTransformer.render();
}
swapSubTransformer(newTransformer) {
this.subTransformer.tearDown();
newTransformer.setUp();
this.subTransformer = newTransformer;
}
setUp() {}
tearDown() {}
}
class EmptyStateTransformer extends StateTransformer {}
module.exports = Simulation; | 21.981132 | 70 | 0.73133 |
3d3ce8fac3464f2ff29a66ca52ea276c4afbc4aa | 339 | js | JavaScript | server/controllers/movie.controller.js | etarzan/amon | 0371e28970f4de6538fd915cabfb6b57806d95b7 | [
"MIT"
] | 1 | 2019-12-26T17:27:21.000Z | 2019-12-26T17:27:21.000Z | server/controllers/movie.controller.js | Project-Kurama/amon | 0371e28970f4de6538fd915cabfb6b57806d95b7 | [
"MIT"
] | 6 | 2019-12-26T17:48:20.000Z | 2022-03-02T06:47:51.000Z | server/controllers/movie.controller.js | etarzan/amon | 0371e28970f4de6538fd915cabfb6b57806d95b7 | [
"MIT"
] | 1 | 2020-10-22T10:50:26.000Z | 2020-10-22T10:50:26.000Z | var Movie = require('../models/movie.model').Movie;
exports.saveMovie = function(req, res) {
var movie = new Movie(req.body);
console.log(req.body);
movie.save().then((result) => {
console.log("saved", result);
res.json(result);
});
}
exports.getMovies = function(req, res) {
res.json(Movie.find());
} | 24.214286 | 51 | 0.60472 |
3d3cfb77eaf21cc070dca1456ac5a1ca2d79af21 | 1,324 | js | JavaScript | src/services/pagination.js | griyanet/wt-read-api | 3c851bc8a51f8caca3779996fa0b3d240028f3c9 | [
"Apache-2.0"
] | null | null | null | src/services/pagination.js | griyanet/wt-read-api | 3c851bc8a51f8caca3779996fa0b3d240028f3c9 | [
"Apache-2.0"
] | 1 | 2020-09-09T10:18:54.000Z | 2020-09-09T10:18:54.000Z | src/services/pagination.js | griyanet/wt-read-api | 3c851bc8a51f8caca3779996fa0b3d240028f3c9 | [
"Apache-2.0"
] | null | null | null | const {
DEFAULT_PAGE_SIZE,
MAX_PAGE_SIZE,
} = require('../constants');
class LimitValidationError extends Error {};
class MissingStartWithError extends Error {};
const paginate = (items, limit = DEFAULT_PAGE_SIZE, startWith, itemPaginationKey) => {
limit = parseInt(limit);
if (isNaN(limit)) {
throw new LimitValidationError('Limit is not a number.');
}
if (limit > MAX_PAGE_SIZE || limit <= 0) {
throw new LimitValidationError('Limit is out of range.');
}
if (startWith && itemPaginationKey) {
startWith = items.find((i) => i[itemPaginationKey] === startWith);
if (!startWith) {
throw new MissingStartWithError('Cannot find startWith in items list.');
}
}
let startWithIndex = items.indexOf(startWith);
if (startWith && startWithIndex === -1) {
throw new MissingStartWithError('Cannot find startWith in items list.');
} else if (!startWith) {
startWithIndex = 0;
}
let nextStart;
if (startWithIndex + limit < items.length) {
nextStart = items[startWithIndex + limit];
if (itemPaginationKey) {
nextStart = nextStart[itemPaginationKey];
}
}
return {
items: items.slice(startWithIndex, startWithIndex + limit),
limit,
nextStart,
};
};
module.exports = {
paginate,
LimitValidationError,
MissingStartWithError,
};
| 25.960784 | 86 | 0.676737 |
3d3d07baf32c08ecbe78d63cf81004a8762421d7 | 541 | js | JavaScript | lectures/subjects/Subject-01.js | dirty49374/rx-playground | 88f94dfb4990c8bd7610464e74008d8a264eaf4f | [
"MIT"
] | null | null | null | lectures/subjects/Subject-01.js | dirty49374/rx-playground | 88f94dfb4990c8bd7610464e74008d8a264eaf4f | [
"MIT"
] | null | null | null | lectures/subjects/Subject-01.js | dirty49374/rx-playground | 88f94dfb4990c8bd7610464e74008d8a264eaf4f | [
"MIT"
] | null | null | null | // Subject는 subscribe한 이후의 값을 받는다.
const subject = new Subject();
const sub1 = subject.subscribe(console('ob1'));
subject.next(1); // ob1이 받는다
const sub2 = subject.subscribe(console('ob2'));
subject.next(2); // ob1, ob2가 받는다
sub2.unsubscribe();
subject.next(3); // ob1이 받는다
sub1.unsubscribe();
subject.next(4); // 아무도 못 받는다
const sub3 = subject.subscribe(console('ob3'));
subject.next(5); // ob3가 받는다
subject.error(-999); // ob3가 에러를 받는다
subject.next(6); // 무시된다
const sub4 = subject.subscribe(console('ob4')); // 에러를 받고 종료된다.
| 23.521739 | 63 | 0.676525 |
3d3e643e146c24a3c89db6bcc79f554f931755d7 | 216 | js | JavaScript | src/components/header.js | krazov/gatsby-tutorial | 11a262b1367b90221950ab4249a0eb1ccf70b9c2 | [
"MIT"
] | null | null | null | src/components/header.js | krazov/gatsby-tutorial | 11a262b1367b90221950ab4249a0eb1ccf70b9c2 | [
"MIT"
] | null | null | null | src/components/header.js | krazov/gatsby-tutorial | 11a262b1367b90221950ab4249a0eb1ccf70b9c2 | [
"MIT"
] | null | null | null | import React from 'react';
import styles from './header.css';
export default ({ content }) => (
<header className={styles.mainHeader}>
<h1 className={styles.mainHeaderH1}>{content}</h1>
</header>
); | 24 | 58 | 0.648148 |
3d3fe1d5fed4b27a1dcfcd124a7cd2be10b5427b | 896 | js | JavaScript | src/models/dlm/DifficultyLevel.js | FMISoftwareTechnologiesProject/dyslexio | bc4972cb930e5a64be6648e5571940884ad255fc | [
"MIT"
] | 1 | 2015-05-13T16:20:40.000Z | 2015-05-13T16:20:40.000Z | src/models/dlm/DifficultyLevel.js | FMISoftwareTechnologiesProject/dyslexio | bc4972cb930e5a64be6648e5571940884ad255fc | [
"MIT"
] | null | null | null | src/models/dlm/DifficultyLevel.js | FMISoftwareTechnologiesProject/dyslexio | bc4972cb930e5a64be6648e5571940884ad255fc | [
"MIT"
] | null | null | null | 'use strict';
var Dyslexio = Dyslexio || {};
Dyslexio.Models = Dyslexio.Models || {};
Dyslexio.Models.DifficultyLevel = function (level, mistakes, currentWins) {
this.level = level;
this.mistakes = mistakes;
this.currentWins = currentWins;
};
Dyslexio.Models.DifficultyLevel.prototype.getLevel = function () {
return this.level;
};
Dyslexio.Models.DifficultyLevel.prototype.setLevel = function (level) {
return this.level = level;
};
Dyslexio.Models.DifficultyLevel.prototype.getMistakes = function () {
return this.mistakes;
};
Dyslexio.Models.DifficultyLevel.prototype.setMistakes = function (mistakes) {
return this.mistakes = mistakes;
};
Dyslexio.Models.DifficultyLevel.prototype.getCurrentWins = function () {
return this.currentWins;
};
Dyslexio.Models.DifficultyLevel.prototype.setCurrentWins = function (currentWins) {
return this.currentWins = currentWins;
};
| 25.6 | 83 | 0.753348 |
3d40f836ae44ec157f2e56ea45367fd1e24e0949 | 142 | js | JavaScript | src/demo.js | doanythingfordethklok/hugo-starter | 45b8b07ccfa9570a11963cb13e08d69e479685e9 | [
"MIT"
] | null | null | null | src/demo.js | doanythingfordethklok/hugo-starter | 45b8b07ccfa9570a11963cb13e08d69e479685e9 | [
"MIT"
] | 2 | 2021-03-09T18:52:39.000Z | 2021-09-01T23:17:44.000Z | src/demo.js | doanythingfordethklok/hugo-starter | 45b8b07ccfa9570a11963cb13e08d69e479685e9 | [
"MIT"
] | null | null | null | import demo from './elm/Demo.elm';
const el = document.getElementById('loader_demo');
if (el) {
demo.Elm.Demo.init({
node: el
});
}
| 14.2 | 50 | 0.626761 |
3d410114a7eea27392fa29772755d2c51d1e842f | 358 | js | JavaScript | back-end/Modeller/SikSorulanSorularModeli.js | irfanHasbek/mkb-andios-backend | 6948be8d694af38ff124e1960e43c6e439636f4c | [
"MIT"
] | null | null | null | back-end/Modeller/SikSorulanSorularModeli.js | irfanHasbek/mkb-andios-backend | 6948be8d694af38ff124e1960e43c6e439636f4c | [
"MIT"
] | null | null | null | back-end/Modeller/SikSorulanSorularModeli.js | irfanHasbek/mkb-andios-backend | 6948be8d694af38ff124e1960e43c6e439636f4c | [
"MIT"
] | null | null | null | var mongoose = require('mongoose');
Schema = mongoose.Schema;
var SikSorulanSorular = new Schema({
kullaniciKodu : {
type : String,
required : true
},
soru : {
type : String
},
cevap : {
type : String
}
});
module.exports = mongoose.model('sikSorulanSorularModeli', SikSorulanSorular);
| 17.047619 | 79 | 0.572626 |
3d411df38c8aaeb4410ab0fd594717283cbe91b5 | 155 | js | JavaScript | node_modules/mathjax-full/components/src/output/svg/lib/output/svg/Wrappers/scriptbase.js | NishadPatilMuzero/react-native-math-view-customize | da801083993bd6fc4fe236e360f98428fb01c312 | [
"MIT"
] | 4 | 2021-02-06T22:36:36.000Z | 2021-04-12T15:49:54.000Z | node_modules/mathjax-full/components/src/output/svg/lib/output/svg/Wrappers/scriptbase.js | NishadPatilMuzero/react-native-math-view-customize | da801083993bd6fc4fe236e360f98428fb01c312 | [
"MIT"
] | 5 | 2021-06-20T23:58:32.000Z | 2021-06-20T23:58:37.000Z | node_modules/mathjax-full/components/src/output/svg/lib/output/svg/Wrappers/scriptbase.js | NishadPatilMuzero/react-native-math-view-customize | da801083993bd6fc4fe236e360f98428fb01c312 | [
"MIT"
] | 2 | 2020-10-16T01:52:30.000Z | 2020-10-31T04:00:35.000Z | "use strict";
Object.defineProperty(exports, '__esModule', {value: true});
exports.SVGscriptbase = MathJax._.output.svg.Wrappers.scriptbase.SVGscriptbase;
| 38.75 | 79 | 0.793548 |
3d4195c36f4513714ab729bdec42b34970f59119 | 1,060 | js | JavaScript | indexes/mediantime.js | vittoj/indexd | 46b6d2d6933b81156d53285757dac491fcf279b7 | [
"ISC"
] | 52 | 2017-05-05T02:30:20.000Z | 2021-12-26T11:43:49.000Z | indexes/mediantime.js | vittoj/indexd | 46b6d2d6933b81156d53285757dac491fcf279b7 | [
"ISC"
] | 43 | 2017-03-19T04:10:46.000Z | 2021-10-19T03:47:24.000Z | indexes/mediantime.js | vittoj/indexd | 46b6d2d6933b81156d53285757dac491fcf279b7 | [
"ISC"
] | 16 | 2017-05-07T08:58:47.000Z | 2022-02-11T20:00:47.000Z | let typeforce = require('typeforce')
let types = require('./types')
let vstruct = require('varstruct')
let MTPPREFIX = 0x83
let MTPTIP = types.tip(MTPPREFIX)
let MTP = {
keyType: typeforce.compile({
medianTime: typeforce.UInt32,
height: typeforce.UInt32
}),
key: vstruct([
['prefix', vstruct.Value(vstruct.UInt8, MTPPREFIX)],
['medianTime', vstruct.UInt32BE], // big-endian for lexicographical sort
['height', vstruct.UInt32LE]
]),
valueType: typeforce.Null
}
function MtpIndex () {}
MtpIndex.prototype.tip = function (db, callback) {
db.get(MTPTIP, {}, callback)
}
MtpIndex.prototype.connect = function (atomic, block) {
let { height, medianTime } = block
atomic.put(MTP, { medianTime, height })
atomic.put(MTPTIP, {}, block)
}
MtpIndex.prototype.disconnect = function (atomic, block) {
let { height, medianTime } = block
atomic.del(MTP, { medianTime, height })
atomic.put(MTPTIP, {}, { blockId: block.prevBlockId, height })
}
module.exports = MtpIndex
module.exports.types = {
data: MTP,
tip: MTPTIP
}
| 23.555556 | 76 | 0.683019 |
3d41f06615daf1f82cdcac5378cbb0d45e49b920 | 195 | js | JavaScript | src/cpa/definition.js | ebu/cpa.js | 1ead640c55f38adf513535195025343fb231120f | [
"BSD-3-Clause"
] | 3 | 2015-02-24T23:25:10.000Z | 2020-01-02T09:04:10.000Z | src/cpa/definition.js | ebu/cpa.js | 1ead640c55f38adf513535195025343fb231120f | [
"BSD-3-Clause"
] | null | null | null | src/cpa/definition.js | ebu/cpa.js | 1ead640c55f38adf513535195025343fb231120f | [
"BSD-3-Clause"
] | 2 | 2015-05-01T11:56:54.000Z | 2020-01-02T09:04:14.000Z | /*global module*/
'use strict';
module.exports = {
// Endpoints defined in the CPA spec
endpoints: {
register: '/register',
token: '/token',
associate: '/associate',
}
};
| 16.25 | 38 | 0.589744 |
3d41f6e22d5ed327e1a6c88c4c4050d610ec163d | 384 | js | JavaScript | src/actions/index.js | vtkamiji/react-adv-aula1 | 0ccaaee9aee2ce617d9c93089842919f1d215db1 | [
"MIT"
] | null | null | null | src/actions/index.js | vtkamiji/react-adv-aula1 | 0ccaaee9aee2ce617d9c93089842919f1d215db1 | [
"MIT"
] | null | null | null | src/actions/index.js | vtkamiji/react-adv-aula1 | 0ccaaee9aee2ce617d9c93089842919f1d215db1 | [
"MIT"
] | null | null | null | import _ from 'lodash';
export const FETCH_COMMENTS = 'fetch_commnent';
export const ADD_COMMENT = 'add_comment';
const commentList = {};
export function fetchComments() {
return {
type: FETCH_COMMENTS,
payload: {'data': commentList}
}
}
export function addComment(comment) {
return {
type: ADD_COMMENT,
payload: {data: comment}
}
} | 19.2 | 47 | 0.645833 |
3d42891fff0139b06e001ffed4206e817bdc0a8f | 1,087 | js | JavaScript | controllers/farm.js | kshen3778/AgriGate-data | 24c9176cffd99c5c612a6d5ae079934520cda66e | [
"Unlicense",
"MIT"
] | null | null | null | controllers/farm.js | kshen3778/AgriGate-data | 24c9176cffd99c5c612a6d5ae079934520cda66e | [
"Unlicense",
"MIT"
] | null | null | null | controllers/farm.js | kshen3778/AgriGate-data | 24c9176cffd99c5c612a6d5ae079934520cda66e | [
"Unlicense",
"MIT"
] | null | null | null | var Quandl = require("quandl");
var quandl = new Quandl();
var options = {
auth_token: "t3kab3XsYYg6xiKTf1eT"
}
quandl.configure(options);
exports.getData = function(req, res){
quandl.dataset({ source: "USDAERS", table: "USAGRIND" }, function(err, res2){
if(err)
throw err;
console.log(res2);
var response = JSON.parse(res2)
var column_names = response.dataset.column_names;
var filteredData = [];
for(var i=0; i<column_names.length; i++){
column_names[i] = column_names[i].replace(/\s+/g, '');
}
for(var i=0; i<response.dataset.data.length; i++){
var selection = column_names.indexOf(req.params.selection.replace(/\s+/g, ''));
//console.log(selection);
var date = response.dataset.data[i][0];
var value = response.dataset.data[i][selection];
filteredData.push({date: date, value: value});
}
console.log(filteredData);
res.send(filteredData);
});
}; | 30.194444 | 91 | 0.558418 |
3d439415331ce7cf8d502779548a2190aa7ef075 | 2,869 | js | JavaScript | __tests__/calculators/electronics/Resistor.js | Eldelshell/flowsnake | a5a3beca473e0c036e0c4caa5b28221cbf9122ed | [
"MIT"
] | 1 | 2019-05-07T12:47:48.000Z | 2019-05-07T12:47:48.000Z | __tests__/calculators/electronics/Resistor.js | Eldelshell/flowsnake | a5a3beca473e0c036e0c4caa5b28221cbf9122ed | [
"MIT"
] | 9 | 2018-01-26T09:17:39.000Z | 2018-02-08T13:51:38.000Z | __tests__/calculators/electronics/Resistor.js | Eldelshell/flowsnake | a5a3beca473e0c036e0c4caa5b28221cbf9122ed | [
"MIT"
] | null | null | null | import _ from 'lodash';
import Flowsnake from '../../../lib';
import Resistance from '../../../lib/units/electricity/Resistance';
const gigaOhm = Resistance.of(1, 'GΩ')
it('Flowsnake should calculate the resistance for a 3 bands resistor', () => {
const res = Flowsnake.calculate('resistor').of(['brown', 'brown', 'black']);
expect(res.resistance).toBeUnit(11, 'Ω');
expect(res.tolerance).toBe(20);
});
it('Flowsnake should calculate the colors for a 3 bands resistor', () => {
const colors = ['brown', 'brown', 'black'];
const values = {
resistance: Resistance.of(11, 'Ω'),
bands: 3
};
const c = Flowsnake.calculate('resistor').of(values);
expect(_.isEqual(c, colors)).toBeTruthy();
});
it('Flowsnake should calculate the resistance for a 4 bands resistor', () => {
const res = Flowsnake.calculate('resistor').of(['blue', 'grey', 'yellow', 'black']);
expect(res.resistance).toBeUnit(680000, 'Ω');
expect(res.tolerance).toBe(1);
});
it('Flowsnake should calculate the colors for a 4 bands resistor', () => {
const colors = ['blue', 'grey', 'yellow', 'black'];
const values = {
resistance: Resistance.of(680000, 'Ω'),
bands: 4,
tolerance: 1
};
const c = Flowsnake.calculate('resistor').of(values);
expect(_.isEqual(c, colors)).toBeTruthy();
});
it('Flowsnake should calculate the resistance for a 5 bands resistor', () => {
const res = Flowsnake.calculate('resistor').of(['yellow', 'red', 'green', 'violet', 'gold']);
expect(res.resistance).toBeUnit(4250000000, 'Ω');
expect(res.resistance.to(gigaOhm)).toBeDecimal(4.25);
expect(res.tolerance).toBe(5);
});
it('Flowsnake should calculate the colors for a 5 bands resistor', () => {
const colors = ['yellow', 'red', 'green', 'violet', 'gold'];
const values = {
resistance: Resistance.of(4.25, 'GΩ'),
bands: 5,
tolerance: 5
};
const c = Flowsnake.calculate('resistor').of(values);
expect(_.isEqual(c, colors)).toBeTruthy();
});
it('Flowsnake should calculate the resistance for a 6 bands resistor', () => {
const res = Flowsnake.calculate('resistor').of(['white', 'black', 'black', 'grey', 'blue', 'orange']);
expect(res.resistance).toBeUnit(90000000000, 'Ω');
expect(res.resistance.to(gigaOhm)).toBeDecimal(90);
expect(res.tolerance).toBe(0.25);
expect(res.tcr).toBe(25);
});
it('Flowsnake should calculate the E-series for a resistor', () => {
const res = Flowsnake.calculate('resistor').of(['black', 'brown', 'black']);
expect(res.decade).toBe(6);
});
it('Flowsnake should calculate the tolerance range for a resistor', () => {
const res = Flowsnake.calculate('resistor').of(['brown', 'black', 'brown', 'silver']);
expect(res.range.min).toBeUnit(90, 'Ω');
expect(res.range.max).toBeUnit(110, 'Ω');
});
| 36.316456 | 106 | 0.632276 |
3d445258ac16e86f7b0d60843e7b9f42a01d9144 | 230 | js | JavaScript | app/components/navbar/navbar.component.js | cpanz/AngularJS_Webpack_Express | 41ac6074a1dfac91a84a03834fae57d76a331754 | [
"MIT"
] | 1 | 2016-07-21T03:34:52.000Z | 2016-07-21T03:34:52.000Z | app/components/navbar/navbar.component.js | cpanz/AngularJS_Webpack_Express | 41ac6074a1dfac91a84a03834fae57d76a331754 | [
"MIT"
] | null | null | null | app/components/navbar/navbar.component.js | cpanz/AngularJS_Webpack_Express | 41ac6074a1dfac91a84a03834fae57d76a331754 | [
"MIT"
] | null | null | null | import controller from './navbar.controller';
import template from './navbar.html';
let navbarComponent = {
restrict: 'AE',
bindings: {},
template,
controller,
controllerAs: 'navbar'
};
export default navbarComponent;
| 17.692308 | 45 | 0.713043 |
3d44c9d666af4f58c215632a5897f924f7507544 | 4,410 | js | JavaScript | web/js/appcontroller.js | davidwadsworth/cloud-morph | ab79331454631d34cece640f94706150fc52c65c | [
"MIT"
] | 771 | 2020-08-12T20:45:22.000Z | 2022-03-27T21:09:33.000Z | web/js/appcontroller.js | davidwadsworth/cloud-morph | ab79331454631d34cece640f94706150fc52c65c | [
"MIT"
] | 27 | 2020-08-27T09:36:29.000Z | 2022-03-29T08:26:52.000Z | web/js/appcontroller.js | davidwadsworth/cloud-morph | ab79331454631d34cece640f94706150fc52c65c | [
"MIT"
] | 76 | 2020-08-25T05:44:46.000Z | 2022-03-25T07:12:31.000Z | /**
* App controller module.
* @version 1
*/
(() => {
const pingIntervalMs = 2000; // 2 secs
var isFullscreen = false;
// TODO: move to chat.js // Non core logic
const appBody = document.getElementById("app-body");
const appd = document.getElementById("app");
const appTitle = document.getElementById("app-title");
const appScreen = document.getElementById("app-screen");
var offerst;
const onConnectionReady = () => {
start();
};
const start = () => {
if (!rtcp.isConnected()) {
log.error("App cannot load. Please refresh");
return;
}
if (!rtcp.isInputReady()) {
log.error("App is not ready yet. Please wait");
return;
}
log.info("[control] app start");
// TODO: Remove
// socket.start(gameList.getCurrentGame(), env.isMobileDevice(), room.getId());
// // end clear
// input.poll().enable();
};
const onKeyPress = (data) => {
rtcp.input(
JSON.stringify({
type: "KEYDOWN",
data: JSON.stringify({
keyCode: data.key,
}),
})
);
};
const onKeyRelease = (data) => {
rtcp.input(
JSON.stringify({
type: "KEYUP",
data: JSON.stringify({
keyCode: data.key,
}),
})
);
};
const onMouseDown = (data) => {
appScreen.muted = false;
rtcp.input(
JSON.stringify({
type: "MOUSEDOWN",
data: JSON.stringify(data),
})
);
};
const onMouseUp = (data) => {
rtcp.input(
JSON.stringify({
type: "MOUSEUP",
data: JSON.stringify(data),
})
);
};
const onMouseMove = (data) => {
rtcp.input(
JSON.stringify({
type: "MOUSEMOVE",
data: JSON.stringify(data),
})
);
};
document.addEventListener("keydown", (e) => {
//if (
//document.activeElement === username ||
//document.activeElement === chatmessage
//) {
//return;
//}
event.pub(KEY_PRESSED, { key: e.keyCode });
});
document.addEventListener("keyup", (e) => {
//if (
//document.activeElement === username ||
//document.activeElement === chatmessage
//) {
//return;
//}
event.pub(KEY_RELEASED, { key: e.keyCode });
});
appScreen.addEventListener("mousedown", (e) => {
boundRect = appScreen.getBoundingClientRect();
event.pub(MOUSE_DOWN, {
isLeft: e.button == 0 ? 1 : 0, // 1 is right button
x: e.offsetX,
y: e.offsetY,
width: boundRect.width,
height: boundRect.height,
});
});
appScreen.addEventListener("mouseup", (e) => {
boundRect = appScreen.getBoundingClientRect();
event.pub(MOUSE_UP, {
isLeft: e.button == 0 ? 1 : 0, // 1 is right button
x: e.offsetX,
y: e.offsetY,
width: boundRect.width,
height: boundRect.height,
});
});
appScreen.addEventListener("mousemove", function (e) {
boundRect = appScreen.getBoundingClientRect();
event.pub(MOUSE_MOVE, {
isLeft: e.button == 0 ? 1 : 0, // 1 is right button
x: e.clientX - boundRect.left,
y: e.clientY - boundRect.top,
width: boundRect.width,
height: boundRect.height,
});
});
document.addEventListener(
"contextmenu",
function (e) {
if (isFullscreen) {
e.preventDefault();
}
},
false
);
event.sub(MEDIA_STREAM_INITIALIZED, (data) => {
rtcp.start(data.stunturn);
});
event.sub(MEDIA_STREAM_SDP_AVAILABLE, (data) =>
rtcp.setRemoteDescription(data.sdp, appScreen)
);
event.sub(MEDIA_STREAM_CANDIDATE_ADD, (data) =>
rtcp.addCandidate(data.candidate)
);
event.sub(MEDIA_STREAM_CANDIDATE_FLUSH, () => rtcp.flushCandidate());
event.sub(MEDIA_STREAM_READY, () => rtcp.start());
event.sub(CONNECTION_READY, onConnectionReady);
//event.sub(NUM_PLAYER, ({ data }) => updateNumPlayers(data));
//event.sub(CLIENT_INIT, ({ data }) => {
//initApps(JSON.parse(data));
//});
//event.sub(UPDATE_APP_LIST, ({ data }) => {
//updateAppList(JSON.parse(data));
//});
// event.sub(CONNECTION_CLOSED, () => input.poll().disable());
event.sub(KEY_PRESSED, onKeyPress);
event.sub(KEY_RELEASED, onKeyRelease);
event.sub(MOUSE_MOVE, onMouseMove);
event.sub(MOUSE_DOWN, onMouseDown);
event.sub(MOUSE_UP, onMouseUp);
event.sub(KEY_STATE_UPDATED, (data) => rtcp.input(data));
})($, document, event, env);
| 24.364641 | 83 | 0.583447 |
3d465322aa38f62e8cd8a80631c8e2240ce8b4ac | 4,409 | js | JavaScript | src/test.js | pixelmanya/react-a11y-modal | 2f396027d6df4975bc035e9596a2416e955e1db0 | [
"MIT"
] | 9 | 2019-03-29T22:05:10.000Z | 2022-02-07T13:44:13.000Z | src/test.js | pixelmanya/react-a11y-modal | 2f396027d6df4975bc035e9596a2416e955e1db0 | [
"MIT"
] | 28 | 2019-09-16T16:36:54.000Z | 2022-03-22T20:50:37.000Z | src/test.js | pixelmanya/react-a11y-modal | 2f396027d6df4975bc035e9596a2416e955e1db0 | [
"MIT"
] | 2 | 2019-04-02T12:24:08.000Z | 2019-05-08T00:03:49.000Z | import React from 'react';
import { mount } from 'enzyme';
import { Modal } from './index';
// Reusable stuff
const Title = () => <h1>Title</h1>;
const Text = () => <p>Text</p>;
const Button = ({ children, ...props }) => (
<button {...props}>{children || 'Button'}</button>
);
const actionsObj = JSON.parse(
JSON.stringify({
close: () => {},
show: () => {},
getStyle: () => {},
setState: () => {}
})
);
const swallowConsoleLogs = () => {
beforeEach(() => {
jest.spyOn(console, 'error');
console.error.mockImplementation(() => {});
});
afterEach(() => {
console.error.mockRestore();
});
};
swallowConsoleLogs();
describe('Modal component', () => {
it('renders modal with button which closes the modal onClick', () => {
const closeTrigger = jest.fn();
const component = mount(
<Modal.Container>
{({ actions }) => (
<Button
onClick={() => {
if (actions.close) {
actions.close();
closeTrigger();
component.unmount();
}
}}
/>
)}
</Modal.Container>
);
// Check presence of <Modal.Container />
expect(component.find(Modal.Container).exists()).toBeTruthy();
// Check presence of <Button />
expect(component.find(Button).exists()).toBeTruthy();
// and the absence of the Header, Body and Footer
expect(component.find(Modal.Header).exists()).toBeFalsy();
expect(component.find(Modal.Body).exists()).toBeFalsy();
expect(component.find(Modal.Footer).exists()).toBeFalsy();
// Trigger click on button which will close the Modal
component.find(Button).simulate('click');
// Check if closeTrigger fn has been called once
expect(closeTrigger).toHaveBeenCalledTimes(1);
// Finally check if component did unmount
expect(component.exists()).toBe(false);
});
it('renders modal with Header, Body, Footer and some content', () => {
const component = mount(
<Modal.Container>
<Modal.Header>
<Title />
</Modal.Header>
<Modal.Body>
<Text />
</Modal.Body>
<Modal.Footer>
<Button />
</Modal.Footer>
</Modal.Container>
);
// Check presence of <Modal.Container />
expect(component.find(Modal.Container).exists()).toBeTruthy();
// and the presence of the Header, Body and Footer
expect(component.find(Modal.Header).exists()).toBeTruthy();
expect(component.find(Title).exists()).toBeTruthy();
expect(component.find(Modal.Body).exists()).toBeTruthy();
expect(component.find(Text).exists()).toBeTruthy();
expect(component.find(Modal.Footer).exists()).toBeTruthy();
expect(component.find(Button).exists()).toBeTruthy();
});
it(`passes an actions object as first argument when
<Modal.Container /> received a function`, () => {
mount(
<Modal.Container>
{({ actions }) => {
expect(JSON.parse(JSON.stringify(actions))).toMatchObject(actionsObj);
return <Button onClick={actions.close} />;
}}
</Modal.Container>
);
});
it(`passes an actions object as first argument when
<Modal.Header /> received a function`, () => {
mount(
<Modal.Container>
<Modal.Header>
{({ actions }) => {
expect(JSON.parse(JSON.stringify(actions))).toMatchObject(
actionsObj
);
return <Button onClick={actions.close} />;
}}
</Modal.Header>
</Modal.Container>
);
});
it('will apply custom styles to <Modal.Header /> from props', () => {
const styles = {
header: {
padding: '1rem',
background: 'green'
}
};
const component = mount(
<Modal.Container styles={styles}>
<Modal.Header>
<Button />
</Modal.Header>
</Modal.Container>
);
expect(component.find(Modal.Header)).toHaveStyleRule('background', 'green');
expect(component.find(Modal.Header)).toHaveStyleRule('padding', '1rem');
expect(component).toMatchSnapshot();
});
it('will throw an error (from <FocusTrap />) when you initiate a modal without one focusable element', () => {
expect(() => {
mount(
<Modal.Container>A modal without a focusable element!</Modal.Container>
);
}).toThrow();
});
});
| 29.198675 | 112 | 0.576548 |
3d46d34a4d91f8a33343022b8f7f918157998400 | 698 | js | JavaScript | src/server.js | JustinBeckwith/gorgs | 054fd2b617e7a386dca0cb6db535ecae344a0515 | [
"MIT"
] | 2 | 2019-07-25T10:26:10.000Z | 2019-08-06T21:06:07.000Z | src/server.js | JustinBeckwith/gorgs | 054fd2b617e7a386dca0cb6db535ecae344a0515 | [
"MIT"
] | null | null | null | src/server.js | JustinBeckwith/gorgs | 054fd2b617e7a386dca0cb6db535ecae344a0515 | [
"MIT"
] | null | null | null | 'use strict';
const express = require('express');
const sync = require('./sync.js');
const app = express();
let issueCache;
app.get('/issues', async (req, res) => {
// if the request came in before filling the cache, just kinda hang out
// here and wait until something is there.
while (!issueCache) {
console.log('Waiting for initial cache to be loaded.');
await new Promise(r => setTimeout(r, 5000));
}
res.json(issueCache);
});
const port = process.env.PORT || 8080;
app.listen(port, () => {
console.log(`Example app listening on port ${port}!`)
});
// refresh the cache every 5 minutes
sync();
setInterval(async () => {
issueCache = await sync();
}, 1000 * 60 * 5);
| 23.266667 | 73 | 0.648997 |
3d46d58d253034a105ad52dd1c5816bc002e91dc | 227 | js | JavaScript | webpack.config.js | Lilrex2015/Inventory_Management_App | ac380da9a5e0334f2470b86bd829ddc8cddd381c | [
"MIT"
] | null | null | null | webpack.config.js | Lilrex2015/Inventory_Management_App | ac380da9a5e0334f2470b86bd829ddc8cddd381c | [
"MIT"
] | null | null | null | webpack.config.js | Lilrex2015/Inventory_Management_App | ac380da9a5e0334f2470b86bd829ddc8cddd381c | [
"MIT"
] | null | null | null | const path = require("path");
module.exports = {
entry : "./src/client.js",
mode : 'development',
output : {
path : path.resolve(__dirname, 'Public'),
filename : "client.js",
}
} | 20.636364 | 50 | 0.511013 |
3d472990e6b898728c8bd423cda85a9540cc152e | 3,943 | js | JavaScript | sample/App/DocModal/DocConfirmModal.js | kennyooi/ep-ui | e868f7b8c6dfe8f17be1360d23629f931c4e9386 | [
"MIT"
] | null | null | null | sample/App/DocModal/DocConfirmModal.js | kennyooi/ep-ui | e868f7b8c6dfe8f17be1360d23629f931c4e9386 | [
"MIT"
] | null | null | null | sample/App/DocModal/DocConfirmModal.js | kennyooi/ep-ui | e868f7b8c6dfe8f17be1360d23629f931c4e9386 | [
"MIT"
] | null | null | null | import React, { Component } from 'react';
import TableProps from '../TableProps';
import { Button, ConfirmModal } from '../../../src/index';
export default class DocConfirmModal extends Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
return (
<div className="DocConfirmModal">
{this.renderSample()}
{this.renderProps()}
{this.generateModal('modal1', {
onConfirm: () => this.setState({ modal1: false }, () => alert('You Confirmed!'))
})}
{this.generateModal('modal2', {
isSecure: true,
textCancel: 'No',
textConfirm: 'Double Confirm!',
onConfirm: () => this.setState({ modal2: false }, () => alert('You Confirmed!'))
})}
</div>
);
}
renderSample() {
return (
<div className="doc-modal">
<h2 className="page-subtitle"><ConfirmModal /></h2>
<div className="group">
<div className="grid-12 grid-p-sm-15">
<div className="c-sm-4">
<Button theme="orange" onClick={() => this.setState({ modal1: true })}>
Confirm Modal
</Button>
</div>
<div className="c-sm-4">
<Button theme="red" onClick={() => this.setState({ modal2: true })}>
Secure Confirm Modal
</Button>
</div>
</div>
</div>
</div>
);
}
renderProps() {
return (
<div className="group">
<TableProps
dataset={[
{
name : (<i>inherited</i>),
type : '...',
desc : 'Support all props from Modal.'
},
{
name : 'isSecure',
type : 'bool',
desc : 'Enable double confirmation.'
},
{
name : 'textCancel',
type : 'string',
default : 'Cancel',
desc : 'Cancel button text.'
},
{
name : 'textConfirm',
type : 'string',
default : 'Confirm',
desc : 'Confirm button text.'
},
{
name : 'textDelete',
type : 'string',
default : 'DELETE',
desc : 'Double confirmation text.'
},
{
name : 'onConfirm',
type : 'func',
default : '()',
desc : 'Trigger when confirm button clicked.'
}
]}
/>
</div>
);
}
// helpers
generateModal(modalId, props) {
return (
<ConfirmModal
{...props}
isShow={this.state[ modalId ]}
onCancel={() => this.setState({ [modalId]: false })}
onRequestClose={() => this.setState({ [modalId]: false })}
>
<p>Are you sure?</p>
</ConfirmModal>
);
}
} | 33.700855 | 100 | 0.331727 |
3d47a273f48000ced521b5bb2d0db7dad1687df6 | 1,066 | js | JavaScript | client/pages/page-2/film/components/FilmList/index.js | weiishere/fas | 30322bbdc8ce0b483fb1c8b505ffb5453701e2f6 | [
"MIT"
] | null | null | null | client/pages/page-2/film/components/FilmList/index.js | weiishere/fas | 30322bbdc8ce0b483fb1c8b505ffb5453701e2f6 | [
"MIT"
] | null | null | null | client/pages/page-2/film/components/FilmList/index.js | weiishere/fas | 30322bbdc8ce0b483fb1c8b505ffb5453701e2f6 | [
"MIT"
] | null | null | null | import React, {PropTypes} from 'react';
import './style.less'
const FilmList = ({film, activeTab}) => {
const allFilmList = film.get('allFilmList');
const popularityFilmList = film.get('popularityFilmList');
const filmList = activeTab === 'all' ? allFilmList : popularityFilmList;
const items = filmList.get('items');
if (!items) {
return (
<div className="page-loading">载入中,请稍后 ...</div>
);
} else if (items.size === 0) {
return (
<div className="no-items">
<div className="no-items-icon"></div>
<p>暂无记录</p>
</div>
);
}
return (
<ul className="list-group">
{
//item 是每条记录,index 下标值,list 所有数据
items.map((item, index, list) => {
return (
<li key={item.get('id')} className="list-group-item">
<a href={item.get('link')} target="_blank">{item.get('name')}</a>
</li>
);
})
}
</ul>
);
};
FilmList.propTypes = {
film: PropTypes.object,
activeTab: PropTypes.string,
};
export default FilmList; | 23.688889 | 79 | 0.555347 |
3d480c11e6639b4f1189604e8768319a9883f522 | 523 | js | JavaScript | server/node_modules/routing-controllers/esm2015/metadata/InterceptorMetadata.js | dillondow24/SleepApp | 52cec9035c7d588723a2f8ac63a002e455e30791 | [
"MIT"
] | null | null | null | server/node_modules/routing-controllers/esm2015/metadata/InterceptorMetadata.js | dillondow24/SleepApp | 52cec9035c7d588723a2f8ac63a002e455e30791 | [
"MIT"
] | null | null | null | server/node_modules/routing-controllers/esm2015/metadata/InterceptorMetadata.js | dillondow24/SleepApp | 52cec9035c7d588723a2f8ac63a002e455e30791 | [
"MIT"
] | null | null | null | /**
* "Use interceptor" metadata.
*/
export class InterceptorMetadata {
// -------------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------------
constructor(args) {
this.target = args.target;
this.method = args.method;
this.interceptor = args.interceptor;
this.priority = args.priority;
this.global = args.global;
}
}
//# sourceMappingURL=InterceptorMetadata.js.map | 32.6875 | 80 | 0.443595 |
3d4a54774787057122a17729e9c67654900f840b | 2,212 | js | JavaScript | src/utils/authInfoUtils.js | tienlem/ssr-skeleton | 878cad60d1644a8dc6bd25df78b6a12efa5c409a | [
"MIT"
] | null | null | null | src/utils/authInfoUtils.js | tienlem/ssr-skeleton | 878cad60d1644a8dc6bd25df78b6a12efa5c409a | [
"MIT"
] | null | null | null | src/utils/authInfoUtils.js | tienlem/ssr-skeleton | 878cad60d1644a8dc6bd25df78b6a12efa5c409a | [
"MIT"
] | 1 | 2021-01-13T10:12:33.000Z | 2021-01-13T10:12:33.000Z | import get from 'lodash/fp';
import isEmpty from 'lodash/fp';
import isNil from 'lodash/fp';
import Localstorage from 'utils/localStorage';
import AuthInfo from 'models/AuthInfo';
export const AUTH_INFO = 'AuthenticationInfo';
export const ACCOUNT_ID = 'AccountId';
class AuthInfoUtils {
/**
* store AuthInfo to cookie.
*/
storeAuthInfo(authInfo: AuthInfo, accountId: string): void {
this.removeAuthInfo();
if (!isNil(authInfo)) {
Localstorage.setItem(AUTH_INFO, JSON.stringify(authInfo));
}
if (accountId) {
Localstorage.setItem(ACCOUNT_ID, accountId);
}
}
/**
* get authInfo from cookie.
*/
/* eslint-disable no-underscore-dangle */
_getAuthInfo(): AuthInfo {
try {
const jsonData = JSON.parse(Localstorage.getItem(AUTH_INFO));
return !isEmpty(jsonData) ? new AuthInfo(jsonData) : null;
} catch (err) {
return null;
}
}
_getAccountId(): string {
try {
const accountId = Localstorage.getItem(ACCOUNT_ID);
return !isEmpty(accountId) ? accountId : null;
} catch (err) {
return null;
}
}
/**
* get authInfo from cookie and validation before returning object. if error -> user need to re-authenticate.
*/
getAuthInfo(): AuthInfo {
try {
const authInfo = this._getAuthInfo();
// const accountId = this._getAccountId();
if (!isNil(authInfo)) {
return { ...authInfo };
}
return null;
} catch (error) {
return null;
}
}
/**
* get accessToken from authInfo in cookie
*/
getAccessToken(): String {
const authInfo = this.getAuthInfo();
return get('accessToken')(authInfo);
}
getAccountId(): String {
const authInfo = this.getAuthInfo();
return get('accountId')(authInfo);
}
/**
* check if user is authenticated or not.
*/
isAuthenticated(): Boolean {
const authInfo = this._getAuthInfo();
return !isNil(authInfo) ? authInfo.isValid() : false;
}
/**
* remove authInfo from cookie.
*/
removeAuthInfo(): void {
Localstorage.removeItem(AUTH_INFO);
Localstorage.removeItem(ACCOUNT_ID);
}
}
const singleton = new AuthInfoUtils();
export default singleton;
| 23.531915 | 111 | 0.641049 |
7fc9501158e540eb4a7a90481494f4d33c472760 | 80 | js | JavaScript | src/theme/theme.js | HigorMenezes/whats-app-web-clone | e0ecb8c53394cbab2d4e7caf909193eda6b54b90 | [
"MIT"
] | 1 | 2020-08-20T15:33:39.000Z | 2020-08-20T15:33:39.000Z | src/theme/theme.js | HigorMenezes/whats-app-web-clone | e0ecb8c53394cbab2d4e7caf909193eda6b54b90 | [
"MIT"
] | 5 | 2021-03-09T20:12:00.000Z | 2022-02-26T18:50:42.000Z | src/theme/theme.js | HigorMenezes/whats-app-web-clone | e0ecb8c53394cbab2d4e7caf909193eda6b54b90 | [
"MIT"
] | null | null | null | const theme = {
sideBar: {
width: '35rem',
},
};
export default theme;
| 10 | 21 | 0.5625 |
7fc9cea93a0e261496428aa28b18b586d0a3041e | 452 | js | JavaScript | key_get_set.js | DanPhillips888/HolyGrailProj | b0f1d34b9dc08b14d2285eddbcce484663d758cf | [
"MIT"
] | null | null | null | key_get_set.js | DanPhillips888/HolyGrailProj | b0f1d34b9dc08b14d2285eddbcce484663d758cf | [
"MIT"
] | null | null | null | key_get_set.js | DanPhillips888/HolyGrailProj | b0f1d34b9dc08b14d2285eddbcce484663d758cf | [
"MIT"
] | null | null | null | var redis = require("ioredis");
var client = redis.createClient();
// single value write and read
client.set("my_key", "Hello World");
client.get("my_key", function(err, reply) {
console.log(reply);
});
// multiple value write & read
client.mset('header', 0, 'left', 0, 'article', 0, 'right', 0, 'footer', 0);
client.mget(['header', 'left', 'article', 'right', 'footer'],
function(err, value) {
console.log(value);
});
client.quit(); | 26.588235 | 75 | 0.632743 |
7fca9b25173e464edc7fe933fcefed598472df23 | 1,125 | js | JavaScript | compiled/source/ocs/types.js | 4workers/nextcloud-link | f0dc2c5c742142d08d4b583e5cded44a7770e28c | [
"MIT"
] | null | null | null | compiled/source/ocs/types.js | 4workers/nextcloud-link | f0dc2c5c742142d08d4b583e5cded44a7770e28c | [
"MIT"
] | null | null | null | compiled/source/ocs/types.js | 4workers/nextcloud-link | f0dc2c5c742142d08d4b583e5cded44a7770e28c | [
"MIT"
] | null | null | null | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var OcsShareType;
(function (OcsShareType) {
OcsShareType[OcsShareType["user"] = 0] = "user";
OcsShareType[OcsShareType["group"] = 1] = "group";
OcsShareType[OcsShareType["publicLink"] = 3] = "publicLink";
OcsShareType[OcsShareType["federatedCloudShare"] = 6] = "federatedCloudShare";
})(OcsShareType = exports.OcsShareType || (exports.OcsShareType = {}));
var OcsSharePermissions;
(function (OcsSharePermissions) {
OcsSharePermissions[OcsSharePermissions["default"] = -1] = "default";
OcsSharePermissions[OcsSharePermissions["read"] = 1] = "read";
OcsSharePermissions[OcsSharePermissions["update"] = 2] = "update";
OcsSharePermissions[OcsSharePermissions["create"] = 4] = "create";
OcsSharePermissions[OcsSharePermissions["delete"] = 8] = "delete";
OcsSharePermissions[OcsSharePermissions["share"] = 16] = "share";
OcsSharePermissions[OcsSharePermissions["all"] = 31] = "all";
})(OcsSharePermissions = exports.OcsSharePermissions || (exports.OcsSharePermissions = {}));
//# sourceMappingURL=types.js.map | 56.25 | 92 | 0.720889 |
7fcbac72de480a8b6f1eac147d30d0f57ef3bc53 | 1,517 | js | JavaScript | js/tests/CommonLibTests.js | thymely-apps/thymely | 0c1c49e5fd04ad6330d08786de40edbd496c4e7e | [
"MIT"
] | 2 | 2021-07-31T05:26:17.000Z | 2021-08-11T06:09:38.000Z | js/tests/CommonLibTests.js | thymely-apps/thymely | 0c1c49e5fd04ad6330d08786de40edbd496c4e7e | [
"MIT"
] | 2 | 2021-08-02T22:19:46.000Z | 2021-08-03T21:11:02.000Z | js/tests/CommonLibTests.js | thymely-apps/thymely | 0c1c49e5fd04ad6330d08786de40edbd496c4e7e | [
"MIT"
] | null | null | null | 'use strict';
const CommonLibTests = {
Cleanup: function(){
},
ArrayTests: function() {
QUnit.test(
'CommonLib.Array.contains helper ' +
'should return true ' +
'when array contains the target.', (assert) => {
const expected = true;
const actual = CommonLib.Array.contains(['a', 'b', 'c'], 'b');
assert.equal(expected, actual);
});
QUnit.test(
'CommonLib.Array.indexOf helper ' +
'should return index position ' +
'when array contains the target.', (assert) => {
const expected_1 = 0;
const actual_1 = CommonLib.Array.indexOf(['a', 'b', 'c'], 'a');
const expected_2 = 1;
const actual_2 = CommonLib.Array.indexOf(['a', 'b', 'c'], 'b');
const expected_3 = 2;
const actual_3 = CommonLib.Array.indexOf(['a', 'b', 'c'], 'c');
assert.equal(expected_1, actual_1);
assert.equal(expected_2, actual_2);
assert.equal(expected_3, actual_3);
});
QUnit.test(
'CommonLib.Array.indexOf helper ' +
'should return negative index position ' +
'when array does not contain the target.', (assert) => {
const expected = -1;
const actual = CommonLib.Array.indexOf(['a', 'b', 'c'], 'z');
assert.equal(expected, actual);
});
},
Run: function() {
CommonLibTests.ArrayTests();
CommonLibTests.Cleanup();
},
}; | 30.34 | 74 | 0.530653 |
7fcbeec95fc32467a734e00a54f93816486d3b53 | 22,734 | js | JavaScript | screens/ForgotPassword1(3:357)1275006_3_357/index.js | crowdbotics-apps/crators-34100 | 2a099eed4f846c5341fd646d39464321c2e55ac3 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | screens/ForgotPassword1(3:357)1275006_3_357/index.js | crowdbotics-apps/crators-34100 | 2a099eed4f846c5341fd646d39464321c2e55ac3 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | screens/ForgotPassword1(3:357)1275006_3_357/index.js | crowdbotics-apps/crators-34100 | 2a099eed4f846c5341fd646d39464321c2e55ac3 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | import React from "react"
import {
View,
Image,
ImageBackground,
TouchableOpacity,
Text,
Button,
Switch,
TextInput,
StyleSheet,
ScrollView
} from "react-native"
import Icon from "react-native-vector-icons/FontAwesome"
import { CheckBox } from "react-native-elements"
import { connect } from "react-redux"
import {
widthPercentageToDP as wp,
heightPercentageToDP as hp
} from "react-native-responsive-screen"
import { getNavigationScreen } from "@screens"
export class Blank extends React.Component {
constructor(props) {
super(props)
this.state = {}
}
render = () => (
<ScrollView
contentContainerStyle={{ flexGrow: 1 }}
style={styles.ScrollView_1}
>
<View style={styles.View_2} />
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/7d05/6502/8d5f0e74890dfba2802b8b2eeea7070a"
}}
style={styles.ImageBackground_3_363}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/d37f/6b6d/a56f94b86e78fd372e0e3cb59b1d31ba"
}}
style={styles.ImageBackground_3_365}
/>
<View style={styles.View_3_366}>
<Text style={styles.Text_3_366}>Login</Text>
</View>
<View style={styles.View_3_367} />
<View style={styles.View_3_368} />
<View style={styles.View_3_369} />
<View style={styles.View_3_370}>
<Text style={styles.Text_3_370}>Select Account</Text>
</View>
<View style={styles.View_3_371}>
<Text style={styles.Text_3_371}>Username</Text>
</View>
<View style={styles.View_3_372}>
<Text style={styles.Text_3_372}>Password</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/90e4/7a17/9e3359a8028e3a8eb6b346e181c4332d"
}}
style={styles.ImageBackground_3_373}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/876f/ea55/7a99f197cd91ed5be6016bcf833e4645"
}}
style={styles.ImageBackground_3_375}
/>
<View style={styles.View_3_378}>
<View style={styles.View_3_379}>
<Text style={styles.Text_3_379}>Login</Text>
</View>
</View>
<View style={styles.View_3_380}>
<Text style={styles.Text_3_380}>Forgot Password?</Text>
</View>
<View style={styles.View_3_381}>
<Text style={styles.Text_3_381}>Don’t have an account? Sign up</Text>
</View>
<View style={styles.View_3_432}>
<Text style={styles.Text_3_432}>10:09</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/35fd/96d6/595bf241991af997cb140020347716f4"
}}
style={styles.ImageBackground_3_433}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/80cc/aab0/c7567fee8321a42eb94a310152a3b9e2"
}}
style={styles.ImageBackground_3_435}
/>
<View style={styles.View_3_518}>
<View style={styles.View_3_170}>
<Text style={styles.Text_3_170}>Forgot Password?</Text>
</View>
<View style={styles.View_3_171}>
<View style={styles.View_3_172}>
<Text style={styles.Text_3_172}>Login</Text>
</View>
</View>
<View style={styles.View_3_173}>
<Text style={styles.Text_3_173}>Sign in with</Text>
</View>
<View style={styles.View_3_174}>
<Text style={styles.Text_3_174}>Or</Text>
</View>
<View style={styles.View_3_175}>
<Text style={styles.Text_3_175}>Don’t have an account? Sign up</Text>
</View>
<View style={styles.View_3_176}>
<View style={styles.View_3_177}>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/d041/7516/0a405bf355e5b0d08c1b3fc2c5c7475b"
}}
style={styles.ImageBackground_3_178}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/e861/3e1d/8371ef4df30b2456d5ef21bc81645fa6"
}}
style={styles.ImageBackground_3_179}
/>
</View>
<View style={styles.View_3_180}>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/d041/7516/0a405bf355e5b0d08c1b3fc2c5c7475b"
}}
style={styles.ImageBackground_3_181}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/b6f8/fe6e/3edf39b772923d0f102b4b15cc9b356e"
}}
style={styles.ImageBackground_3_182}
/>
</View>
<View style={styles.View_3_183}>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/d041/7516/0a405bf355e5b0d08c1b3fc2c5c7475b"
}}
style={styles.ImageBackground_3_184}
/>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/cfb9/8034/ca7730b76e3f9fc10e4ce2c4f12e13b3"
}}
style={styles.ImageBackground_3_185}
/>
</View>
</View>
<View style={styles.View_3_190} />
<View style={styles.View_3_191}>
<View style={styles.View_3_192}>
<Text style={styles.Text_3_192}>Continue</Text>
</View>
</View>
<View style={styles.View_3_194}>
<View style={styles.View_3_195} />
<View style={styles.View_3_196}>
<View style={styles.View_3_197} />
<View style={styles.View_3_198} />
</View>
<View style={styles.View_3_199}>
<View style={styles.View_3_200} />
<View style={styles.View_3_201} />
</View>
</View>
<View style={styles.View_3_202}>
<Text style={styles.Text_3_202}>Forgot Password</Text>
</View>
<View style={styles.View_3_204}>
<Text style={styles.Text_3_204}>
Please enter your email address below.
</Text>
</View>
<ImageBackground
source={{
uri:
"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/c403/1c39/457e9ed424053418254c7561c518bd24"
}}
style={styles.ImageBackground_3_206}
/>
<View style={styles.View_3_516} />
<View style={styles.View_3_517}>
<Text style={styles.Text_3_517}>Email</Text>
</View>
</View>
</ScrollView>
)
}
const styles = StyleSheet.create({
ScrollView_1: { backgroundColor: "rgba(255, 255, 255, 1)" },
View_2: { height: hp("111%") },
ImageBackground_3_363: {
width: wp("11%"),
height: hp("5%"),
top: hp("7%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%")
},
ImageBackground_3_365: {
width: wp("19%"),
minWidth: wp("19%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("41%"),
top: hp("17%"),
resizeMode: "cover"
},
View_3_366: {
width: wp("23%"),
minWidth: wp("23%"),
minHeight: hp("5%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("10%"),
top: hp("29%"),
justifyContent: "flex-start"
},
Text_3_366: {
color: "rgba(0, 0, 0, 1)",
fontSize: 24,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_367: {
width: wp("87%"),
minWidth: wp("87%"),
height: hp("9%"),
minHeight: hp("9%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("6%"),
top: hp("52%"),
backgroundColor: "rgba(246, 246, 246, 1)"
},
View_3_368: {
width: wp("87%"),
minWidth: wp("87%"),
height: hp("9%"),
minHeight: hp("9%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("6%"),
top: hp("38%"),
backgroundColor: "rgba(246, 246, 246, 1)"
},
View_3_369: {
width: wp("87%"),
minWidth: wp("87%"),
height: hp("9%"),
minHeight: hp("9%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("6%"),
top: hp("65%"),
backgroundColor: "rgba(246, 246, 246, 1)"
},
View_3_370: {
width: wp("39%"),
minWidth: wp("39%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("18%"),
top: hp("41%"),
justifyContent: "flex-start"
},
Text_3_370: {
color: "rgba(128, 128, 128, 1)",
fontSize: 16,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_371: {
width: wp("27%"),
minWidth: wp("27%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("18%"),
top: hp("55%"),
justifyContent: "flex-start"
},
Text_3_371: {
color: "rgba(128, 128, 128, 1)",
fontSize: 16,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_372: {
width: wp("25%"),
minWidth: wp("25%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("18%"),
top: hp("68%"),
justifyContent: "flex-start"
},
Text_3_372: {
color: "rgba(128, 128, 128, 1)",
fontSize: 16,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_3_373: {
width: wp("12%"),
height: hp("6%"),
top: hp("39%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("76%")
},
ImageBackground_3_375: {
width: wp("5%"),
height: hp("2%"),
top: hp("69%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("81%")
},
View_3_378: {
width: wp("78%"),
minWidth: wp("78%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("11%"),
top: hp("86%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_3_379: {
width: wp("15%"),
minWidth: wp("15%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("31%"),
top: hp("2%"),
justifyContent: "flex-start"
},
Text_3_379: {
color: "rgba(255, 255, 255, 1)",
fontSize: 16,
fontWeight: "700",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_380: {
width: wp("35%"),
minWidth: wp("35%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("58%"),
top: hp("76%"),
justifyContent: "flex-start"
},
Text_3_380: {
color: "rgba(48, 157, 143, 1)",
fontSize: 12,
fontWeight: "400",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_381: {
width: wp("62%"),
minWidth: wp("62%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("19%"),
top: hp("98%"),
justifyContent: "flex-start"
},
Text_3_381: {
color: "rgba(0, 0, 0, 1)",
fontSize: 12,
fontWeight: "600",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_432: {
width: wp("10%"),
minWidth: wp("10%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("8%"),
top: hp("2%"),
justifyContent: "flex-start"
},
Text_3_432: {
color: "rgba(0, 0, 0, 1)",
fontSize: 11,
fontWeight: "600",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_3_433: {
width: wp("6%"),
height: hp("1%"),
top: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("81%")
},
ImageBackground_3_435: {
width: wp("5%"),
height: hp("1%"),
top: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("88%")
},
View_3_518: {
width: wp("100%"),
minWidth: wp("100%"),
height: hp("111%"),
minHeight: hp("111%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
View_3_170: {
width: wp("33%"),
minWidth: wp("33%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("58%"),
top: hp("45%"),
justifyContent: "flex-start"
},
Text_3_170: {
color: "rgba(48, 157, 143, 1)",
fontSize: 11,
fontWeight: "400",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_171: {
width: wp("73%"),
minWidth: wp("73%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("13%"),
top: hp("53%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_3_172: {
width: wp("11%"),
minWidth: wp("11%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("31%"),
top: hp("1%"),
justifyContent: "flex-start"
},
Text_3_172: {
color: "rgba(255, 255, 255, 1)",
fontSize: 12,
fontWeight: "600",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_173: {
width: wp("23%"),
minWidth: wp("23%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("39%"),
top: hp("67%"),
justifyContent: "flex-start"
},
Text_3_173: {
color: "rgba(0, 0, 0, 1)",
fontSize: 12,
fontWeight: "400",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_174: {
width: wp("5%"),
minWidth: wp("5%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("47%"),
top: hp("62%"),
justifyContent: "flex-start"
},
Text_3_174: {
color: "rgba(0, 0, 0, 1)",
fontSize: 12,
fontWeight: "500",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_175: {
width: wp("64%"),
minWidth: wp("64%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("18%"),
top: hp("87%"),
justifyContent: "flex-start"
},
Text_3_175: {
color: "rgba(0, 0, 0, 1)",
fontSize: 12,
fontWeight: "600",
textAlign: "center",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_176: {
width: wp("63%"),
minWidth: wp("63%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("19%"),
top: hp("72%"),
backgroundColor: "rgba(0, 0, 0, 0)"
},
View_3_177: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
ImageBackground_3_178: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
ImageBackground_3_179: {
width: wp("4%"),
height: hp("3%"),
top: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("4%")
},
View_3_180: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("25%"),
top: hp("0%")
},
ImageBackground_3_181: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
ImageBackground_3_182: {
width: wp("7%"),
height: hp("3%"),
top: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("2%")
},
View_3_183: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("51%"),
top: hp("0%")
},
ImageBackground_3_184: {
width: wp("12%"),
minWidth: wp("12%"),
height: hp("6%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
ImageBackground_3_185: {
width: wp("6%"),
height: hp("3%"),
top: hp("2%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("3%")
},
View_3_190: {
width: wp("100%"),
minWidth: wp("100%"),
height: hp("66%"),
minHeight: hp("66%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("45%"),
backgroundColor: "rgba(255, 255, 255, 1)"
},
View_3_191: {
width: wp("78%"),
minWidth: wp("78%"),
height: hp("8%"),
minHeight: hp("8%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("95%"),
backgroundColor: "rgba(48, 157, 143, 1)"
},
View_3_192: {
width: wp("25%"),
minWidth: wp("25%"),
minHeight: hp("4%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("26%"),
top: hp("2%"),
justifyContent: "flex-start"
},
Text_3_192: {
color: "rgba(255, 255, 255, 1)",
fontSize: 16,
fontWeight: "700",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_194: {
width: wp("100%"),
minWidth: wp("100%"),
height: hp("52%"),
minHeight: hp("52%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%")
},
View_3_195: {
width: wp("100%"),
minWidth: wp("100%"),
height: hp("45%"),
minHeight: hp("45%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(0, 0, 0, 1)",
opacity: 0.6000000238418579
},
View_3_196: {
width: wp("13%"),
minWidth: wp("13%"),
height: hp("7%"),
minHeight: hp("7%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("45%")
},
View_3_197: {
width: wp("13%"),
minWidth: wp("13%"),
height: hp("7%"),
minHeight: hp("7%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(196, 196, 196, 1)"
},
View_3_198: {
width: wp("13%"),
minWidth: wp("13%"),
height: hp("7%"),
minHeight: hp("7%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(196, 196, 196, 1)",
borderTopLeftRadius: 50,
borderTopRightRadius: 0,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0
},
View_3_199: {
width: wp("13%"),
minWidth: wp("13%"),
height: hp("7%"),
minHeight: hp("7%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("87%"),
top: hp("45%")
},
View_3_200: {
width: wp("13%"),
minWidth: wp("13%"),
height: hp("7%"),
minHeight: hp("7%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(196, 196, 196, 1)"
},
View_3_201: {
width: wp("13%"),
minWidth: wp("13%"),
height: hp("7%"),
minHeight: hp("7%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("0%"),
top: hp("0%"),
backgroundColor: "rgba(196, 196, 196, 1)",
borderTopLeftRadius: 0,
borderTopRightRadius: 50,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0
},
View_3_202: {
width: wp("57%"),
minWidth: wp("57%"),
minHeight: hp("5%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("55%"),
justifyContent: "flex-start"
},
Text_3_202: {
color: "rgba(0, 0, 0, 1)",
fontSize: 20,
fontWeight: "600",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
View_3_204: {
width: wp("65%"),
minWidth: wp("65%"),
minHeight: hp("6%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("7%"),
top: hp("62%"),
justifyContent: "flex-start"
},
Text_3_204: {
color: "rgba(0, 0, 0, 1)",
fontSize: 12,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
},
ImageBackground_3_206: {
width: wp("35%"),
minWidth: wp("35%"),
height: hp("0%"),
minHeight: hp("0%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("33%"),
top: hp("50%")
},
View_3_516: {
width: wp("87%"),
minWidth: wp("87%"),
height: hp("9%"),
minHeight: hp("9%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("6%"),
top: hp("75%"),
backgroundColor: "rgba(246, 246, 246, 1)"
},
View_3_517: {
width: wp("15%"),
minWidth: wp("15%"),
minHeight: hp("3%"),
marginLeft: 0,
marginTop: 0,
position: "absolute",
left: wp("18%"),
top: hp("78%"),
justifyContent: "flex-start"
},
Text_3_517: {
color: "rgba(128, 128, 128, 1)",
fontSize: 16,
fontWeight: "500",
textAlign: "left",
fontStyle: "normal",
letterSpacing: 0,
textTransform: "none"
}
})
const mapStateToProps = state => {
return {}
}
const mapDispatchToProps = () => {
return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(Blank)
| 23.981013 | 117 | 0.536201 |
7fcc48232106548329b96d42a121d204b28f3471 | 6,024 | js | JavaScript | src/rocketjump.js | inmagik/redux-rocketjump | 655fd52251e5358870e3c12e069fda44d4bfe911 | [
"MIT"
] | 2 | 2018-04-05T16:06:25.000Z | 2019-04-12T09:22:50.000Z | src/rocketjump.js | inmagik/redux-rocketjump | 655fd52251e5358870e3c12e069fda44d4bfe911 | [
"MIT"
] | 23 | 2018-09-03T09:15:25.000Z | 2022-02-26T12:02:19.000Z | src/rocketjump.js | inmagik/redux-rocketjump | 655fd52251e5358870e3c12e069fda44d4bfe911 | [
"MIT"
] | 1 | 2019-02-07T12:07:39.000Z | 2019-02-07T12:07:39.000Z | import invariant from 'invariant'
import { forgeRocketJump, createComputeState } from 'rocketjump-core'
import pick from 'lodash.pick'
import { resetReducerOn } from './helpers'
import makeExport from './export'
import { $TYPE_RJ_RUN_CONFIG, $TYPE_RJ_COMBINE_CONFIG } from './internals'
import makeApiSaga from './apiSaga'
import {
enhanceMakeRunConfigWithMutations,
enhanceFinalExportWithMutations,
checkMutationsConfig,
} from './mutations/index'
// NOTE: Why Here?
// To avoid re-looping the rj config over and over
// when re-implement makePartialConfig
// the standard implement simply shallow merge non function parameters (config)
// ... we simply add a check in this poin
function makePartialConfig(partialRjsOrConfigs) {
return partialRjsOrConfigs.reduce((finalConfig, partialRjOrConfig) => {
if (typeof partialRjOrConfig === 'function') {
// ... Is a partial Rj
return finalConfig
}
// ... Is a config
// Check mutation config!
checkMutationsConfig(partialRjOrConfig)
// Merge the as a standard implementation
return {
...finalConfig,
...partialRjOrConfig,
}
}, {})
}
function checkWarns(rjsOrConfigs, extraConfig) {
if (
extraConfig &&
// The last config can be called from rocketjump itself
// or frome the special combineRjs GAnG!
extraConfig.__rjtype !== $TYPE_RJ_RUN_CONFIG &&
extraConfig.__rjtype !== $TYPE_RJ_COMBINE_CONFIG
) {
console.warn(
'[redux-rocketjump] DeprecationWarning: ' +
'the last evalutation should invoke without parameters'
)
}
let cfgToCheck = rjsOrConfigs.filter(
item => typeof item === 'object' && item !== null
)
if (
extraConfig === undefined ||
// Only combineRjs can inject the last config :P
// So for it skip the check for given extra conf
extraConfig.__rjtype === $TYPE_RJ_COMBINE_CONFIG
) {
cfgToCheck = cfgToCheck.slice(0, cfgToCheck.length - 1)
}
cfgToCheck.forEach(config => {
if (config.type || config.api || config.state || config.effect) {
console.warn(
'[redux-rocketjump] DeprecationWarning: ' +
'type, effect and state should be defined only once, in the last object'
)
}
})
}
function makeRunConfig(finalConfig) {
// Detected the run config from partial rjs + configs
// pick only: state, type and api
let runConfig = pick(finalConfig, ['state', 'api', 'type', 'effect'])
// Check for type and state to be required in run config
invariant(
runConfig.type,
'You must specify a type key for actions and reducer'
)
invariant(
runConfig.state !== undefined,
'You must specify a state key for create selectors' +
', if you want to omit the state creation set state explice to false.'
)
// ++ Mutations
runConfig = enhanceMakeRunConfigWithMutations(runConfig, finalConfig)
// Mark as a run config
Object.defineProperty(runConfig, '__rjtype', {
value: $TYPE_RJ_RUN_CONFIG,
})
return runConfig
}
function makeRecursionRjs(
partialRjsOrConfigs,
extraConfig,
isLastRjInvocation
) {
if (process.env.NODE_ENV !== 'production') {
checkWarns(partialRjsOrConfigs, extraConfig)
}
if (extraConfig) {
return partialRjsOrConfigs.concat(extraConfig)
}
return partialRjsOrConfigs
}
function finalizeExport(mergedAlongExport, runConfig, finalConfig) {
// ~~ END OF CHAIN RECURSION ~~
let { sideEffect, computed, reducer, ...rjExport } = mergedAlongExport
// Use the curried-combined-merged side effect descriptor
// to create the really side effect the "saga" generator
// .. or use a custom saga .. old quiet unused rj api ...
let saga
if (typeof finalConfig.saga === 'function') {
// Make custom saga...
saga = finalConfig.saga(
pick(finalConfig, [
'type',
'state',
'api',
'effect',
'effectExtraParams',
'apiExtraParams',
'takeEffect',
'effectCaller',
'callApi',
'successEffect',
'failureEffect',
'takeEffectArgs',
])
)
} else {
let effectCall
if (runConfig.effect) {
effectCall = runConfig.effect
} else if (runConfig.api) {
effectCall = runConfig.api
console.warn(
'[redux-rocketjump] DeprecationWarning: ' +
'api options is deprecated use effect instead.'
)
}
// Make saga using api and merged side effect descriptor!
saga = makeApiSaga(
runConfig.type,
effectCall,
sideEffect.effectExtraParams,
sideEffect.takeEffect,
sideEffect.effectCaller,
sideEffect.needEffect,
sideEffect.successEffect,
sideEffect.failureEffect,
sideEffect.takeEffectArgs,
sideEffect.mapLoadingAction,
sideEffect.mapSuccessAction,
sideEffect.mapFailureAction,
sideEffect.unloadBy
)
}
if (reducer && sideEffect.unloadBy.length > 0) {
// Enhance reducer \w reset only when configurated unloadBy action
// and reducer is not undefined (rj \w state false)
// This should apply at very very last to guarantee the correct
// initial state
reducer = resetReducerOn(sideEffect.unloadBy, reducer)
}
// Create the compute state function by computed config,
// when no computed config is given return null is responsibility
// of useRj .. to check for null
const computeState = createComputeState(computed)
// Finally the rocketjump is created!
/*
{
actions: {},
buildableActions: {}, // Action with official 4LB1312 Builder
computeState: fn, // Compute Y shit \w endless love
selectors: {},
saga,
reducer
}
*/
// Export for RjObject
const finalExport = {
...rjExport,
computeState,
reducer,
saga,
}
// Mutations ++
return enhanceFinalExportWithMutations(
finalExport,
mergedAlongExport,
runConfig
)
}
export const rj = forgeRocketJump({
makePartialConfig,
makeRunConfig,
makeRecursionRjs,
makeExport,
finalizeExport,
})
| 28.018605 | 82 | 0.672809 |
7fcdd3fe2a21bc147ee33ada27f80ecc35396dcb | 2,385 | js | JavaScript | site arquiteto/node_modules/@fortawesome/free-solid-svg-icons/faCoins.js | vinirms/sites-responsivos | a7778b9bc3fd3dde3ad70538e98188cc3c3c2093 | [
"MIT"
] | 49 | 2021-10-06T13:19:33.000Z | 2022-03-16T10:23:54.000Z | site arquiteto/node_modules/@fortawesome/free-solid-svg-icons/faCoins.js | vinirms/sites-responsivos | a7778b9bc3fd3dde3ad70538e98188cc3c3c2093 | [
"MIT"
] | 44 | 2021-10-19T15:25:19.000Z | 2022-03-31T21:00:18.000Z | site arquiteto/node_modules/@fortawesome/free-solid-svg-icons/faCoins.js | vinirms/sites-responsivos | a7778b9bc3fd3dde3ad70538e98188cc3c3c2093 | [
"MIT"
] | 14 | 2021-11-25T04:50:27.000Z | 2022-03-25T16:27:46.000Z | 'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fas';
var iconName = 'coins';
var width = 512;
var height = 512;
var aliases = [];
var unicode = 'f51e';
var svgPathData = 'M512 80C512 98.01 497.7 114.6 473.6 128C444.5 144.1 401.2 155.5 351.3 158.9C347.7 157.2 343.9 155.5 340.1 153.9C300.6 137.4 248.2 128 192 128C183.7 128 175.6 128.2 167.5 128.6L166.4 128C142.3 114.6 128 98.01 128 80C128 35.82 213.1 0 320 0C426 0 512 35.82 512 80V80zM160.7 161.1C170.9 160.4 181.3 160 192 160C254.2 160 309.4 172.3 344.5 191.4C369.3 204.9 384 221.7 384 240C384 243.1 383.3 247.9 381.9 251.7C377.3 264.9 364.1 277 346.9 287.3C346.9 287.3 346.9 287.3 346.9 287.3C346.8 287.3 346.6 287.4 346.5 287.5L346.5 287.5C346.2 287.7 345.9 287.8 345.6 288C310.6 307.4 254.8 320 192 320C132.4 320 79.06 308.7 43.84 290.9C41.97 289.9 40.15 288.1 38.39 288C14.28 274.6 0 258 0 240C0 205.2 53.43 175.5 128 164.6C138.5 163 149.4 161.8 160.7 161.1L160.7 161.1zM391.9 186.6C420.2 182.2 446.1 175.2 468.1 166.1C484.4 159.3 499.5 150.9 512 140.6V176C512 195.3 495.5 213.1 468.2 226.9C453.5 234.3 435.8 240.5 415.8 245.3C415.9 243.6 416 241.8 416 240C416 218.1 405.4 200.1 391.9 186.6V186.6zM384 336C384 354 369.7 370.6 345.6 384C343.8 384.1 342 385.9 340.2 386.9C304.9 404.7 251.6 416 192 416C129.2 416 73.42 403.4 38.39 384C14.28 370.6 .0003 354 .0003 336V300.6C12.45 310.9 27.62 319.3 43.93 326.1C83.44 342.6 135.8 352 192 352C248.2 352 300.6 342.6 340.1 326.1C347.9 322.9 355.4 319.2 362.5 315.2C368.6 311.8 374.3 308 379.7 304C381.2 302.9 382.6 301.7 384 300.6L384 336zM416 278.1C434.1 273.1 452.5 268.6 468.1 262.1C484.4 255.3 499.5 246.9 512 236.6V272C512 282.5 507 293 497.1 302.9C480.8 319.2 452.1 332.6 415.8 341.3C415.9 339.6 416 337.8 416 336V278.1zM192 448C248.2 448 300.6 438.6 340.1 422.1C356.4 415.3 371.5 406.9 384 396.6V432C384 476.2 298 512 192 512C85.96 512 .0003 476.2 .0003 432V396.6C12.45 406.9 27.62 415.3 43.93 422.1C83.44 438.6 135.8 448 192 448z';
exports.definition = {
prefix: prefix,
iconName: iconName,
icon: [
width,
height,
aliases,
unicode,
svgPathData
]};
exports.faCoins = exports.definition;
exports.prefix = prefix;
exports.iconName = iconName;
exports.width = width;
exports.height = height;
exports.ligatures = aliases;
exports.unicode = unicode;
exports.svgPathData = svgPathData;
exports.aliases = aliases; | 79.5 | 1,785 | 0.714885 |
7fce213dbe0216ec18aa68587b7f9af63e03bc26 | 973 | js | JavaScript | src/app.js | andela-skieha/react-user-auth | f893de847d97e2ebf82d3cc3d21332dd8e167364 | [
"MIT"
] | null | null | null | src/app.js | andela-skieha/react-user-auth | f893de847d97e2ebf82d3cc3d21332dd8e167364 | [
"MIT"
] | null | null | null | src/app.js | andela-skieha/react-user-auth | f893de847d97e2ebf82d3cc3d21332dd8e167364 | [
"MIT"
] | null | null | null | // /* eslint-disable */
import ReactStormpath, { Router, HomeRoute, LoginRoute, AuthenticatedRoute } from 'react-stormpath';
import React from 'react';
import ReactDOM from 'react-dom';
import { IndexRoute, Route, browserHistory } from 'react-router';
import MasterPage from './pages/MasterPage';
import IndexPage from './pages/IndexPage';
import LoginPage from './pages/LoginPage';
import RegistrationPage from './pages/RegistrationPage';
import ProfilePage from './pages/ProfilePage';
ReactStormpath.init();
ReactDOM.render((
<Router history={browserHistory}>
<HomeRoute path="/" component={MasterPage}>
<IndexRoute component={IndexPage} />
<LoginRoute path="/login" component={LoginPage} />
<Route path="/register" component={RegistrationPage} />
<AuthenticatedRoute >
<HomeRoute path="/profile" component={ProfilePage} />
</AuthenticatedRoute>
</HomeRoute>
</Router>
),
document.getElementById('app-container')
);
| 33.551724 | 100 | 0.717369 |
7fce5e170d8d2c100f50e0a80128166f1f920378 | 54 | js | JavaScript | src/client/app/index.js | norjs/web-client | 0b15ef0388eac631ee4701779c0db907aab04762 | [
"MIT"
] | 2 | 2018-11-23T05:51:43.000Z | 2018-11-23T07:07:15.000Z | src/client/app/index.js | norjs/norjs | 0b15ef0388eac631ee4701779c0db907aab04762 | [
"MIT"
] | 17 | 2018-11-22T18:05:54.000Z | 2018-11-30T19:52:12.000Z | src/client/app/index.js | norjs/norjs | 0b15ef0388eac631ee4701779c0db907aab04762 | [
"MIT"
] | 1 | 2019-07-27T17:39:56.000Z | 2019-07-27T17:39:56.000Z | import angular from "angular";
export {
angular
};
| 9 | 30 | 0.685185 |