New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

oc

Package Overview
Dependencies
Maintainers
1
Versions
472
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oc - npm Package Compare versions

Comparing version 0.10.4 to 0.10.5

2

client/oc-client.min.js

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jade=e()}}(function(){return function e(t,n,r){function o(i,c){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!c&&l)return l(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";function r(e){return null!=e&&""!==e}function o(e){return(Array.isArray(e)?e.map(o):e&&"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}):[e]).filter(r).join(" ")}n.merge=function a(e,t){if(1===arguments.length){for(var n=e[0],o=1;o<e.length;o++)n=a(n,e[o]);return n}var i=e["class"],c=t["class"];(i||c)&&(i=i||[],c=c||[],Array.isArray(i)||(i=[i]),Array.isArray(c)||(c=[c]),e["class"]=i.concat(c).filter(r));for(var l in t)"class"!=l&&(e[l]=t[l]);return e},n.joinClasses=o,n.cls=function(e,t){for(var r=[],a=0;a<e.length;a++)r.push(t&&t[a]?n.escape(o([e[a]])):o(e[a]));var i=o(r);return i.length?' class="'+i+'"':""},n.style=function(e){return e&&"object"==typeof e?Object.keys(e).map(function(t){return t+":"+e[t]}).join(";"):e},n.attr=function(e,t,r,o){return"style"===e&&(t=n.style(t)),"boolean"==typeof t||null==t?t?" "+(o?e:e+'="'+e+'"'):"":0==e.indexOf("data")&&"string"!=typeof t?(-1!==JSON.stringify(t).indexOf("&")&&console.warn("Since Jade 2.0.0, ampersands (`&`) in data attributes will be escaped to `&amp;`"),t&&"function"==typeof t.toISOString&&console.warn("Jade will eliminate the double quotes around dates in ISO form after 2.0.0")," "+e+"='"+JSON.stringify(t).replace(/'/g,"&apos;")+"'"):r?(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+n.escape(t)+'"'):(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+t+'"')},n.attrs=function(e,t){var r=[],a=Object.keys(e);if(a.length)for(var i=0;i<a.length;++i){var c=a[i],l=e[c];"class"==c?(l=o(l))&&r.push(" "+c+'="'+l+'"'):r.push(n.attr(c,l,!1,t))}return r.join("")},n.escape=function(e){var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return t===""+e?e:t},n.rethrow=function i(t,n,r,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||o))throw t.message+=" on line "+r,t;try{o=o||e("fs").readFileSync(n,"utf8")}catch(a){i(t,null,r)}var c=3,l=o.split("\n"),s=Math.max(r-c,0),u=Math.min(l.length,r+c),c=l.slice(s,u).map(function(e,t){var n=t+s+1;return(n==r?" > ":" ")+n+"| "+e}).join("\n");throw t.path=n,t.message=(n||"Jade")+":"+r+"\n"+c+"\n\n"+t.message,t}},{fs:2}],2:[function(){},{}]},{},[1])(1)});var Handlebars=function(){var e=function(){"use strict";function e(e){this.string=e}var t;return e.prototype.toString=function(){return""+this.string},t=e}(),t=function(e){"use strict";function t(e){return c[e]||"&amp;"}function n(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof i?e.toString():e||0===e?(e=""+e,s.test(e)?e.replace(l,t):e):""}function o(e){return e||0===e?d(e)&&0===e.length?!0:!1:!0}var a={},i=e,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},l=/[&<>"'`]/g,s=/[&<>"'`]/;a.extend=n;var u=Object.prototype.toString;a.toString=u;var f=function(e){return"function"==typeof e};f(/x/)&&(f=function(e){return"function"==typeof e&&"[object Function]"===u.call(e)});var f;a.isFunction=f;var d=Array.isArray||function(e){return e&&"object"==typeof e?"[object Array]"===u.call(e):!1};return a.isArray=d,a.escapeExpression=r,a.isEmpty=o,a}(e),n=function(){"use strict";function e(e,t){var r;t&&t.firstLine&&(r=t.firstLine,e+=" - "+r+":"+t.firstColumn);for(var o=Error.prototype.constructor.call(this,e),a=0;a<n.length;a++)this[n[a]]=o[n[a]];r&&(this.lineNumber=r,this.column=t.firstColumn)}var t,n=["description","fileName","lineNumber","message","name","number","stack"];return e.prototype=new Error,t=e}(),r=function(e,t){"use strict";function n(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){if(2===arguments.length)return void 0;throw new c("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse||function(){},o=n.fn;return d(t)&&(t=t.call(this)),t===!0?o(this):t===!1||null==t?r(this):f(t)?t.length>0?e.helpers.each(t,n):r(this):o(t)}),e.registerHelper("each",function(e,t){var n,r=t.fn,o=t.inverse,a=0,i="";if(d(e)&&(e=e.call(this)),t.data&&(n=v(t.data)),e&&"object"==typeof e)if(f(e))for(var c=e.length;c>a;a++)n&&(n.index=a,n.first=0===a,n.last=a===e.length-1),i+=r(e[a],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=a,n.first=0===a),i+=r(e[l],{data:n}),a++);return 0===a&&(i=o(this)),i}),e.registerHelper("if",function(e,t){return d(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||i.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){return d(e)&&(e=e.call(this)),i.isEmpty(e)?void 0:t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(r,t)})}function o(e,t){m.log(e,t)}var a={},i=e,c=t,l="1.3.0";a.VERSION=l;var s=4;a.COMPILER_REVISION=s;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};a.REVISION_CHANGES=u;var f=i.isArray,d=i.isFunction,p=i.toString,h="[object Object]";a.HandlebarsEnvironment=n,n.prototype={constructor:n,logger:m,log:o,registerHelper:function(e,t,n){if(p.call(e)===h){if(n||t)throw new c("Arg not supported with multiple helpers");i.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){p.call(e)===h?i.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};a.logger=m,a.log=o;var v=function(e){var t={};return i.extend(t,e),t};return a.createFrame=v,a}(t,n),o=function(e,t,n){"use strict";function r(e){var t=e&&e[0]||1,n=d;if(t!==n){if(n>t){var r=p[n],o=p[t];throw new f("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new f("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function o(e,t){if(!t)throw new f("No environment passed to template");var n=function(e,n,r,o,a,i){var c=t.VM.invokePartial.apply(this,arguments);if(null!=c)return c;if(t.compile){var l={helpers:o,partials:a,data:i};return a[n]=t.compile(e,{data:void 0!==i},t),a[n](r,l)}throw new f("The partial "+n+" could not be compiled when running in runtime-only mode")},r={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=i(e,t,n):r||(r=this.programs[e]=i(e,t)),r},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},u.extend(n,t),u.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,o){o=o||{};var a,i,c=o.partial?o:t;o.partial||(a=o.helpers,i=o.partials);var l=e.call(r,c,n,a,i,o.data);return o.partial||t.VM.checkRevision(r.compilerInfo),l}}function a(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=function(e,o){return o=o||{},t.apply(this,[e,o.data||n].concat(r))};return o.program=e,o.depth=r.length,o}function i(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r}function c(e,t,n,r,o,a){var i={partial:!0,helpers:r,partials:o,data:a};if(void 0===e)throw new f("The partial "+t+" could not be found");return e instanceof Function?e(n,i):void 0}function l(){return""}var s={},u=e,f=t,d=n.COMPILER_REVISION,p=n.REVISION_CHANGES;return s.checkRevision=r,s.template=o,s.programWithDepth=a,s.program=i,s.invokePartial=c,s.noop=l,s}(t,n,r),a=function(e,t,n,r,o){"use strict";var a,i=e,c=t,l=n,s=r,u=o,f=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=c,e.Exception=l,e.Utils=s,e.VM=u,e.template=function(t){return u.template(t,e)},e},d=f();return d.create=f,a=d}(r,e,n,t,o);return a}();!function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;r>n;n++)t.call(e,e[n],n)}}function o(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function a(e){return o("Function",e)}function i(e){return o("Array",e)}function c(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function l(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,r,o){var a="object"==typeof e?e:{test:e,success:t?i(t)?t:[t]:!1,failure:r?i(r)?r:[r]:!1,callback:o||n},c=!!a.test;return c&&a.success?(a.success.push(a.callback),L.load.apply(null,a.success)):!c&&a.failure?(a.failure.push(a.callback),L.load.apply(null,a.failure)):o(),L}function u(e){var t={};if("object"==typeof e)for(var n in e)e[n]&&(t={name:n,url:e[n]});else t={name:c(e),url:e};var r=M[t.name];return r&&r.url===t.url?r:(M[t.name]=t,t)}function f(e){e=e||M;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==C)return!1;return!0}function d(e){e.state=N,r(e.onpreload,function(e){e.call()})}function p(e){e.state===t&&(e.state=k,e.onpreload=[],g({url:e.url,type:"cache"},function(){d(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),o=n[0];return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(o?(r(n,function(e){!a(e)&&e&&p(u(e))}),v(u(e[0]),a(o)?o:function(){L.load.apply(null,n)})):v(u(e[0])),L)}function m(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(r(e,function(e){e!==t&&(e=u(e),n[e.name]=e)}),r(e,function(e){e!==t&&(e=u(e),v(e,function(){f(n)&&l(t)}))}),L)}function v(e,t){return t=t||n,e.state===C?void t():e.state===H?void L.ready(e.name,t):e.state===k?void e.onpreload.push(function(){v(e,t)}):(e.state=H,void g(e,function(){e.state=C,t(),r(T[e.name],function(e){l(e)}),x&&f()&&r(T.ALL,function(e){l(e)})}))}function y(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function g(t,r){function o(t){t=t||e.event,c.onload=c.onreadystatechange=c.onerror=null,r()}function a(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(c.readyState)&&(!S.documentMode||S.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),c.onload=c.onreadystatechange=c.onerror=null,r())}function i(){if(t.state!==C&&t.cssRetries<=20){for(var n=0,r=S.styleSheets.length;r>n;n++)if(S.styleSheets[n].href===c.href)return void a({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(i,250)}}r=r||n;var c,l=y(t.url);"css"===l?(c=S.createElement("link"),c.type="text/"+(t.type||"css"),c.rel="stylesheet",c.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(i,500)):(c=S.createElement("script"),c.type="text/"+(t.type||"javascript"),c.src=t.url),c.onload=c.onreadystatechange=a,c.onerror=o,c.async=!1,c.defer=!1,t.errorTimeout=e.setTimeout(function(){o({type:"timeout"})},7e3);var s=S.head||S.getElementsByTagName("head")[0];s.insertBefore(c,s.lastChild)}function w(){for(var e=S.getElementsByTagName("script"),t=0,n=e.length;n>t;t++){var r=e[t].getAttribute("data-headjs-load");if(r)return void L.load(r)}}function b(e,t){if(e===S)return x?l(t):O.push(t),L;if(a(e)&&(t=e,e="ALL"),i(e)){var n={};return r(e,function(e){n[e]=M[e],L.ready(e,function(){f(n)&&l(t)})}),L}if("string"!=typeof e||!a(t))return L;var o=M[e];if(o&&o.state===C||"ALL"===e&&f()&&x)return l(t),L;var c=T[e];return c?c.push(t):c=T[e]=[t],L}function E(){return S.body?void(x||(x=!0,w(),r(O,function(e){l(e)}))):(e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(E,50)))}function j(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",j,!1),E()):"complete"===S.readyState&&(S.detachEvent("onreadystatechange",j),E())}var x,S=e.document,O=[],T={},M={},A="async"in S.createElement("script")||"MozAppearance"in S.documentElement.style||e.opera,I=e.head_conf&&e.head_conf.head||"head",L=e[I]=e[I]||function(){L.ready.apply(null,arguments)},k=1,N=2,H=3,C=4;if("complete"===S.readyState)E();else if(S.addEventListener)S.addEventListener("DOMContentLoaded",j,!1),e.addEventListener("load",E,!1);else{S.attachEvent("onreadystatechange",j),e.attachEvent("onload",E);var R=!1;try{R=!e.frameElement&&S.documentElement}catch(q){}R&&R.doScroll&&!function P(){if(!x){try{R.doScroll("left")}catch(t){return e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(P,50))}E()}}()}L.load=L.js=A?m:h,L.test=s,L.ready=b,L.ready(S,function(){f()&&r(T.ALL,function(e){l(e)}),L.feature&&L.feature("domloaded",!0)})}(window);var oc=oc||{};!function(e,t,n,r,o){var a="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js",i="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js",c=5e3,l=500,s="oc-component",u="Href parameter missing",f="Error loading {0} component",d="Error rendering component: {0}, error: {1}",p="Failed to retrieve the component. Retrying in {0} seconds...".replace("{0}",c/1e3),h="Error loading component: view engine {0} not supported",m="Loading...",v="Component '{0}' correctly rendered",y="Unrendered component found. Trying to retrieve it...",g="undefined"!=typeof jQuery?jQuery:void 0,w=function(){},b=r.navigator.userAgent,E=!!b.match(/MSIE 8/),j=!!b.match(/MSIE 9/),x=!1,S=!1,O=[],T={error:function(e){return console.log(e)},info:function(e){return o?console.log(e):void 0}},M=function(e,t,n){var r=Math.floor(9999999999*Math.random());e.html(t.html),e.attr("id",r),e.attr("data-rendered",!0),e.attr("data-rendering",!1),e.attr("data-version",t.version),t.key&&(e.attr("data-hash",t.key),oc.setEventListeners(e)),n()};oc.ready=function(e){if(x)return e();if(S)O.push(e);else{S=!0;var n=function(e){E||j?t.load(a,e):e()},r=function(){x=!0,S=!1,e();for(var t=0;t<O.length;t++)O[t]()};g?n(r):t.load(i,function(){g=jQuery,n(r)})}},oc.render=function(t,n,r){oc.ready(function(){if(oc.components[t.key]){var o="";if("handlebars"===t.type){var a=e.template(oc.components[t.key],[]);o=a(n)}else{if("jade"!==t.type)return r(h.replace("{0}",t.type));o=oc.components[t.key](n)}r(null,o)}else r(f.replace("{0}",t.key))})},oc.renderNestedComponent=function(e,t){oc.ready(function(){var n=e.attr("data-rendering"),r=e.attr("data-rendered"),o="boolean"==typeof n?n:"true"===n,a="boolean"==typeof r?r:"true"===r;o||a?setTimeout(t,l):(T.info(y),e.attr("data-rendering",!0),e.html('<div class="oc-loading">'+m+"</div>"),oc.renderByHref(e.attr("href"),function(n,r){return!n&&r&&r.html?void M(e,r,t):T.error(n)}))})},oc.renderByHref=function(e,n){oc.ready(function(){return""===e?n(d.replace("{1}",u)):void g.ajax({url:e,headers:{Accept:"application/vnd.oc.prerendered+json"},contentType:"text/plain",crossDomain:!0,async:!0,success:function(e){if("pre-rendered"===e.renderMode)t.load([e.template.src],function(){oc.render(e.template,e.data,function(t,r){return t?n(d.replace("{0}",e.href).replace("{1}",t)):(T.info(v.replace("{0}",e.template.src)),void n(null,{html:r,key:e.template.key,version:e.version}))})});else if("rendered"===e.renderMode){T.info(v.replace("{0}",e.href));var r=e.html.slice(e.html.indexOf(">")+1),o=r.slice(0,r.lastIndexOf("<"));n(null,{html:o,version:e.version})}},error:function(){T.error(p),setTimeout(function(){oc.renderByHref(e,n)},c)}})})},oc.renderUnloadedComponents=function(){oc.ready(function(){var e=E?"div[data-oc-component=true]":s,t=g(e+"[data-rendered!=true]"),n=function(e,t){oc.renderNestedComponent(g(e[t]),function(){t++,t<e.length?n(e,t):oc.renderUnloadedComponents()})};t.length>0&&n(t,0)})},oc.setEventListeners=function(e){oc.ready(function(){e.off("reRender"),e.on("reRender",function(e,t){var n=g(e.target);return t&&""!==t&&n.attr("href",t),n.attr("data-hash",""),n.attr("data-rendered",!1),oc.renderUnloadedComponents(),!1}),e.trigger("loaded")})},oc.load=function(e,t,n){oc.ready(function(){if("function"!=typeof n&&(n=w),g(e)){g(e).html("<"+s+' href="'+t+'" />');var r=g(s,e);oc.renderNestedComponent(r,function(){n(r)})}})},oc.ready(oc.renderUnloadedComponents)}(Handlebars,head,document,window,!0),oc.clientVersion="0.10.4";
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jade=e()}}(function(){return function e(t,n,r){function o(i,c){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!c&&l)return l(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";function r(e){return null!=e&&""!==e}function o(e){return(Array.isArray(e)?e.map(o):e&&"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}):[e]).filter(r).join(" ")}n.merge=function a(e,t){if(1===arguments.length){for(var n=e[0],o=1;o<e.length;o++)n=a(n,e[o]);return n}var i=e["class"],c=t["class"];(i||c)&&(i=i||[],c=c||[],Array.isArray(i)||(i=[i]),Array.isArray(c)||(c=[c]),e["class"]=i.concat(c).filter(r));for(var l in t)"class"!=l&&(e[l]=t[l]);return e},n.joinClasses=o,n.cls=function(e,t){for(var r=[],a=0;a<e.length;a++)r.push(t&&t[a]?n.escape(o([e[a]])):o(e[a]));var i=o(r);return i.length?' class="'+i+'"':""},n.style=function(e){return e&&"object"==typeof e?Object.keys(e).map(function(t){return t+":"+e[t]}).join(";"):e},n.attr=function(e,t,r,o){return"style"===e&&(t=n.style(t)),"boolean"==typeof t||null==t?t?" "+(o?e:e+'="'+e+'"'):"":0==e.indexOf("data")&&"string"!=typeof t?(-1!==JSON.stringify(t).indexOf("&")&&console.warn("Since Jade 2.0.0, ampersands (`&`) in data attributes will be escaped to `&amp;`"),t&&"function"==typeof t.toISOString&&console.warn("Jade will eliminate the double quotes around dates in ISO form after 2.0.0")," "+e+"='"+JSON.stringify(t).replace(/'/g,"&apos;")+"'"):r?(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+n.escape(t)+'"'):(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+t+'"')},n.attrs=function(e,t){var r=[],a=Object.keys(e);if(a.length)for(var i=0;i<a.length;++i){var c=a[i],l=e[c];"class"==c?(l=o(l))&&r.push(" "+c+'="'+l+'"'):r.push(n.attr(c,l,!1,t))}return r.join("")},n.escape=function(e){var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return t===""+e?e:t},n.rethrow=function i(t,n,r,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||o))throw t.message+=" on line "+r,t;try{o=o||e("fs").readFileSync(n,"utf8")}catch(a){i(t,null,r)}var c=3,l=o.split("\n"),s=Math.max(r-c,0),u=Math.min(l.length,r+c),c=l.slice(s,u).map(function(e,t){var n=t+s+1;return(n==r?" > ":" ")+n+"| "+e}).join("\n");throw t.path=n,t.message=(n||"Jade")+":"+r+"\n"+c+"\n\n"+t.message,t}},{fs:2}],2:[function(){},{}]},{},[1])(1)});var Handlebars=function(){var e=function(){"use strict";function e(e){this.string=e}var t;return e.prototype.toString=function(){return""+this.string},t=e}(),t=function(e){"use strict";function t(e){return c[e]||"&amp;"}function n(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof i?e.toString():e||0===e?(e=""+e,s.test(e)?e.replace(l,t):e):""}function o(e){return e||0===e?d(e)&&0===e.length?!0:!1:!0}var a={},i=e,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},l=/[&<>"'`]/g,s=/[&<>"'`]/;a.extend=n;var u=Object.prototype.toString;a.toString=u;var f=function(e){return"function"==typeof e};f(/x/)&&(f=function(e){return"function"==typeof e&&"[object Function]"===u.call(e)});var f;a.isFunction=f;var d=Array.isArray||function(e){return e&&"object"==typeof e?"[object Array]"===u.call(e):!1};return a.isArray=d,a.escapeExpression=r,a.isEmpty=o,a}(e),n=function(){"use strict";function e(e,t){var r;t&&t.firstLine&&(r=t.firstLine,e+=" - "+r+":"+t.firstColumn);for(var o=Error.prototype.constructor.call(this,e),a=0;a<n.length;a++)this[n[a]]=o[n[a]];r&&(this.lineNumber=r,this.column=t.firstColumn)}var t,n=["description","fileName","lineNumber","message","name","number","stack"];return e.prototype=new Error,t=e}(),r=function(e,t){"use strict";function n(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){if(2===arguments.length)return void 0;throw new c("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse||function(){},o=n.fn;return d(t)&&(t=t.call(this)),t===!0?o(this):t===!1||null==t?r(this):f(t)?t.length>0?e.helpers.each(t,n):r(this):o(t)}),e.registerHelper("each",function(e,t){var n,r=t.fn,o=t.inverse,a=0,i="";if(d(e)&&(e=e.call(this)),t.data&&(n=v(t.data)),e&&"object"==typeof e)if(f(e))for(var c=e.length;c>a;a++)n&&(n.index=a,n.first=0===a,n.last=a===e.length-1),i+=r(e[a],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=a,n.first=0===a),i+=r(e[l],{data:n}),a++);return 0===a&&(i=o(this)),i}),e.registerHelper("if",function(e,t){return d(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||i.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){return d(e)&&(e=e.call(this)),i.isEmpty(e)?void 0:t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(r,t)})}function o(e,t){m.log(e,t)}var a={},i=e,c=t,l="1.3.0";a.VERSION=l;var s=4;a.COMPILER_REVISION=s;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};a.REVISION_CHANGES=u;var f=i.isArray,d=i.isFunction,p=i.toString,h="[object Object]";a.HandlebarsEnvironment=n,n.prototype={constructor:n,logger:m,log:o,registerHelper:function(e,t,n){if(p.call(e)===h){if(n||t)throw new c("Arg not supported with multiple helpers");i.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){p.call(e)===h?i.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};a.logger=m,a.log=o;var v=function(e){var t={};return i.extend(t,e),t};return a.createFrame=v,a}(t,n),o=function(e,t,n){"use strict";function r(e){var t=e&&e[0]||1,n=d;if(t!==n){if(n>t){var r=p[n],o=p[t];throw new f("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new f("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function o(e,t){if(!t)throw new f("No environment passed to template");var n=function(e,n,r,o,a,i){var c=t.VM.invokePartial.apply(this,arguments);if(null!=c)return c;if(t.compile){var l={helpers:o,partials:a,data:i};return a[n]=t.compile(e,{data:void 0!==i},t),a[n](r,l)}throw new f("The partial "+n+" could not be compiled when running in runtime-only mode")},r={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=i(e,t,n):r||(r=this.programs[e]=i(e,t)),r},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},u.extend(n,t),u.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,o){o=o||{};var a,i,c=o.partial?o:t;o.partial||(a=o.helpers,i=o.partials);var l=e.call(r,c,n,a,i,o.data);return o.partial||t.VM.checkRevision(r.compilerInfo),l}}function a(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=function(e,o){return o=o||{},t.apply(this,[e,o.data||n].concat(r))};return o.program=e,o.depth=r.length,o}function i(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r}function c(e,t,n,r,o,a){var i={partial:!0,helpers:r,partials:o,data:a};if(void 0===e)throw new f("The partial "+t+" could not be found");return e instanceof Function?e(n,i):void 0}function l(){return""}var s={},u=e,f=t,d=n.COMPILER_REVISION,p=n.REVISION_CHANGES;return s.checkRevision=r,s.template=o,s.programWithDepth=a,s.program=i,s.invokePartial=c,s.noop=l,s}(t,n,r),a=function(e,t,n,r,o){"use strict";var a,i=e,c=t,l=n,s=r,u=o,f=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=c,e.Exception=l,e.Utils=s,e.VM=u,e.template=function(t){return u.template(t,e)},e},d=f();return d.create=f,a=d}(r,e,n,t,o);return a}();!function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;r>n;n++)t.call(e,e[n],n)}}function o(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function a(e){return o("Function",e)}function i(e){return o("Array",e)}function c(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function l(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,r,o){var a="object"==typeof e?e:{test:e,success:t?i(t)?t:[t]:!1,failure:r?i(r)?r:[r]:!1,callback:o||n},c=!!a.test;return c&&a.success?(a.success.push(a.callback),L.load.apply(null,a.success)):!c&&a.failure?(a.failure.push(a.callback),L.load.apply(null,a.failure)):o(),L}function u(e){var t={};if("object"==typeof e)for(var n in e)e[n]&&(t={name:n,url:e[n]});else t={name:c(e),url:e};var r=M[t.name];return r&&r.url===t.url?r:(M[t.name]=t,t)}function f(e){e=e||M;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==C)return!1;return!0}function d(e){e.state=N,r(e.onpreload,function(e){e.call()})}function p(e){e.state===t&&(e.state=k,e.onpreload=[],g({url:e.url,type:"cache"},function(){d(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),o=n[0];return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(o?(r(n,function(e){!a(e)&&e&&p(u(e))}),v(u(e[0]),a(o)?o:function(){L.load.apply(null,n)})):v(u(e[0])),L)}function m(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(r(e,function(e){e!==t&&(e=u(e),n[e.name]=e)}),r(e,function(e){e!==t&&(e=u(e),v(e,function(){f(n)&&l(t)}))}),L)}function v(e,t){return t=t||n,e.state===C?void t():e.state===H?void L.ready(e.name,t):e.state===k?void e.onpreload.push(function(){v(e,t)}):(e.state=H,void g(e,function(){e.state=C,t(),r(T[e.name],function(e){l(e)}),x&&f()&&r(T.ALL,function(e){l(e)})}))}function y(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function g(t,r){function o(t){t=t||e.event,c.onload=c.onreadystatechange=c.onerror=null,r()}function a(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(c.readyState)&&(!S.documentMode||S.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),c.onload=c.onreadystatechange=c.onerror=null,r())}function i(){if(t.state!==C&&t.cssRetries<=20){for(var n=0,r=S.styleSheets.length;r>n;n++)if(S.styleSheets[n].href===c.href)return void a({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(i,250)}}r=r||n;var c,l=y(t.url);"css"===l?(c=S.createElement("link"),c.type="text/"+(t.type||"css"),c.rel="stylesheet",c.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(i,500)):(c=S.createElement("script"),c.type="text/"+(t.type||"javascript"),c.src=t.url),c.onload=c.onreadystatechange=a,c.onerror=o,c.async=!1,c.defer=!1,t.errorTimeout=e.setTimeout(function(){o({type:"timeout"})},7e3);var s=S.head||S.getElementsByTagName("head")[0];s.insertBefore(c,s.lastChild)}function w(){for(var e=S.getElementsByTagName("script"),t=0,n=e.length;n>t;t++){var r=e[t].getAttribute("data-headjs-load");if(r)return void L.load(r)}}function b(e,t){if(e===S)return x?l(t):O.push(t),L;if(a(e)&&(t=e,e="ALL"),i(e)){var n={};return r(e,function(e){n[e]=M[e],L.ready(e,function(){f(n)&&l(t)})}),L}if("string"!=typeof e||!a(t))return L;var o=M[e];if(o&&o.state===C||"ALL"===e&&f()&&x)return l(t),L;var c=T[e];return c?c.push(t):c=T[e]=[t],L}function E(){return S.body?void(x||(x=!0,w(),r(O,function(e){l(e)}))):(e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(E,50)))}function j(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",j,!1),E()):"complete"===S.readyState&&(S.detachEvent("onreadystatechange",j),E())}var x,S=e.document,O=[],T={},M={},A="async"in S.createElement("script")||"MozAppearance"in S.documentElement.style||e.opera,I=e.head_conf&&e.head_conf.head||"head",L=e[I]=e[I]||function(){L.ready.apply(null,arguments)},k=1,N=2,H=3,C=4;if("complete"===S.readyState)E();else if(S.addEventListener)S.addEventListener("DOMContentLoaded",j,!1),e.addEventListener("load",E,!1);else{S.attachEvent("onreadystatechange",j),e.attachEvent("onload",E);var R=!1;try{R=!e.frameElement&&S.documentElement}catch(q){}R&&R.doScroll&&!function P(){if(!x){try{R.doScroll("left")}catch(t){return e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(P,50))}E()}}()}L.load=L.js=A?m:h,L.test=s,L.ready=b,L.ready(S,function(){f()&&r(T.ALL,function(e){l(e)}),L.feature&&L.feature("domloaded",!0)})}(window);var oc=oc||{};!function(e,t,n,r,o){var a="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js",i="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js",c=5e3,l=500,s="oc-component",u="Href parameter missing",f="Error loading {0} component",d="Error rendering component: {0}, error: {1}",p="Failed to retrieve the component. Retrying in {0} seconds...".replace("{0}",c/1e3),h="Error loading component: view engine {0} not supported",m="Loading...",v="Component '{0}' correctly rendered",y="Unrendered component found. Trying to retrieve it...",g="undefined"!=typeof jQuery?jQuery:void 0,w=function(){},b=r.navigator.userAgent,E=!!b.match(/MSIE 8/),j=!!b.match(/MSIE 9/),x=!1,S=!1,O=[],T={error:function(e){return console.log(e)},info:function(e){return o?console.log(e):void 0}},M=function(e,t,n){var r=Math.floor(9999999999*Math.random());e.html(t.html),e.attr("id",r),e.attr("data-rendered",!0),e.attr("data-rendering",!1),e.attr("data-version",t.version),t.key&&(e.attr("data-hash",t.key),oc.setEventListeners(e)),n()};oc.ready=function(e){if(x)return e();if(S)O.push(e);else{S=!0;var n=function(e){E||j?t.load(a,e):e()},r=function(){x=!0,S=!1,e();for(var t=0;t<O.length;t++)O[t]()};g?n(r):t.load(i,function(){g=jQuery,n(r)})}},oc.render=function(t,n,r){oc.ready(function(){if(oc.components[t.key]){var o="";if("handlebars"===t.type){var a=e.template(oc.components[t.key],[]);o=a(n)}else{if("jade"!==t.type)return r(h.replace("{0}",t.type));o=oc.components[t.key](n)}r(null,o)}else r(f.replace("{0}",t.key))})},oc.renderNestedComponent=function(e,t){oc.ready(function(){var n=e.attr("data-rendering"),r=e.attr("data-rendered"),o="boolean"==typeof n?n:"true"===n,a="boolean"==typeof r?r:"true"===r;o||a?setTimeout(t,l):(T.info(y),e.attr("data-rendering",!0),e.html('<div class="oc-loading">'+m+"</div>"),oc.renderByHref(e.attr("href"),function(n,r){return!n&&r&&r.html?void M(e,r,t):T.error(n)}))})},oc.renderByHref=function(e,n){oc.ready(function(){return""===e?n(d.replace("{1}",u)):void g.ajax({url:e,headers:{Accept:"application/vnd.oc.prerendered+json"},contentType:"text/plain",crossDomain:!0,async:!0,success:function(e){if("pre-rendered"===e.renderMode)t.load([e.template.src],function(){oc.render(e.template,e.data,function(t,r){return t?n(d.replace("{0}",e.href).replace("{1}",t)):(T.info(v.replace("{0}",e.template.src)),void n(null,{html:r,key:e.template.key,version:e.version}))})});else if("rendered"===e.renderMode){T.info(v.replace("{0}",e.href));var r=e.html.slice(e.html.indexOf(">")+1),o=r.slice(0,r.lastIndexOf("<"));n(null,{html:o,version:e.version})}},error:function(){T.error(p),setTimeout(function(){oc.renderByHref(e,n)},c)}})})},oc.renderUnloadedComponents=function(){oc.ready(function(){var e=E?"div[data-oc-component=true]":s,t=g(e+"[data-rendered!=true]"),n=function(e,t){oc.renderNestedComponent(g(e[t]),function(){t++,t<e.length?n(e,t):oc.renderUnloadedComponents()})};t.length>0&&n(t,0)})},oc.setEventListeners=function(e){oc.ready(function(){e.off("reRender"),e.on("reRender",function(e,t){var n=g(e.target);return t&&""!==t&&n.attr("href",t),n.attr("data-hash",""),n.attr("data-rendered",!1),oc.renderUnloadedComponents(),!1}),e.trigger("loaded")})},oc.load=function(e,t,n){oc.ready(function(){if("function"!=typeof n&&(n=w),g(e)){g(e).html("<"+s+' href="'+t+'" />');var r=g(s,e);oc.renderNestedComponent(r,function(){n(r)})}})},oc.ready(oc.renderUnloadedComponents)}(Handlebars,head,document,window,!0),oc.clientVersion="0.10.5";
{
"name": "oc-client",
"description": "",
"version": "0.10.4",
"version": "0.10.5",
"dependencies": {},

@@ -24,4 +24,4 @@ "repository": "",

},
"version": "0.10.4"
"version": "0.10.5"
}
}

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jade=e()}}(function(){return function e(t,n,r){function o(i,c){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!c&&l)return l(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";function r(e){return null!=e&&""!==e}function o(e){return(Array.isArray(e)?e.map(o):e&&"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}):[e]).filter(r).join(" ")}n.merge=function a(e,t){if(1===arguments.length){for(var n=e[0],o=1;o<e.length;o++)n=a(n,e[o]);return n}var i=e["class"],c=t["class"];(i||c)&&(i=i||[],c=c||[],Array.isArray(i)||(i=[i]),Array.isArray(c)||(c=[c]),e["class"]=i.concat(c).filter(r));for(var l in t)"class"!=l&&(e[l]=t[l]);return e},n.joinClasses=o,n.cls=function(e,t){for(var r=[],a=0;a<e.length;a++)r.push(t&&t[a]?n.escape(o([e[a]])):o(e[a]));var i=o(r);return i.length?' class="'+i+'"':""},n.style=function(e){return e&&"object"==typeof e?Object.keys(e).map(function(t){return t+":"+e[t]}).join(";"):e},n.attr=function(e,t,r,o){return"style"===e&&(t=n.style(t)),"boolean"==typeof t||null==t?t?" "+(o?e:e+'="'+e+'"'):"":0==e.indexOf("data")&&"string"!=typeof t?(-1!==JSON.stringify(t).indexOf("&")&&console.warn("Since Jade 2.0.0, ampersands (`&`) in data attributes will be escaped to `&amp;`"),t&&"function"==typeof t.toISOString&&console.warn("Jade will eliminate the double quotes around dates in ISO form after 2.0.0")," "+e+"='"+JSON.stringify(t).replace(/'/g,"&apos;")+"'"):r?(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+n.escape(t)+'"'):(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+t+'"')},n.attrs=function(e,t){var r=[],a=Object.keys(e);if(a.length)for(var i=0;i<a.length;++i){var c=a[i],l=e[c];"class"==c?(l=o(l))&&r.push(" "+c+'="'+l+'"'):r.push(n.attr(c,l,!1,t))}return r.join("")},n.escape=function(e){var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return t===""+e?e:t},n.rethrow=function i(t,n,r,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||o))throw t.message+=" on line "+r,t;try{o=o||e("fs").readFileSync(n,"utf8")}catch(a){i(t,null,r)}var c=3,l=o.split("\n"),s=Math.max(r-c,0),u=Math.min(l.length,r+c),c=l.slice(s,u).map(function(e,t){var n=t+s+1;return(n==r?" > ":" ")+n+"| "+e}).join("\n");throw t.path=n,t.message=(n||"Jade")+":"+r+"\n"+c+"\n\n"+t.message,t}},{fs:2}],2:[function(){},{}]},{},[1])(1)});var Handlebars=function(){var e=function(){"use strict";function e(e){this.string=e}var t;return e.prototype.toString=function(){return""+this.string},t=e}(),t=function(e){"use strict";function t(e){return c[e]||"&amp;"}function n(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof i?e.toString():e||0===e?(e=""+e,s.test(e)?e.replace(l,t):e):""}function o(e){return e||0===e?d(e)&&0===e.length?!0:!1:!0}var a={},i=e,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},l=/[&<>"'`]/g,s=/[&<>"'`]/;a.extend=n;var u=Object.prototype.toString;a.toString=u;var f=function(e){return"function"==typeof e};f(/x/)&&(f=function(e){return"function"==typeof e&&"[object Function]"===u.call(e)});var f;a.isFunction=f;var d=Array.isArray||function(e){return e&&"object"==typeof e?"[object Array]"===u.call(e):!1};return a.isArray=d,a.escapeExpression=r,a.isEmpty=o,a}(e),n=function(){"use strict";function e(e,t){var r;t&&t.firstLine&&(r=t.firstLine,e+=" - "+r+":"+t.firstColumn);for(var o=Error.prototype.constructor.call(this,e),a=0;a<n.length;a++)this[n[a]]=o[n[a]];r&&(this.lineNumber=r,this.column=t.firstColumn)}var t,n=["description","fileName","lineNumber","message","name","number","stack"];return e.prototype=new Error,t=e}(),r=function(e,t){"use strict";function n(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){if(2===arguments.length)return void 0;throw new c("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse||function(){},o=n.fn;return d(t)&&(t=t.call(this)),t===!0?o(this):t===!1||null==t?r(this):f(t)?t.length>0?e.helpers.each(t,n):r(this):o(t)}),e.registerHelper("each",function(e,t){var n,r=t.fn,o=t.inverse,a=0,i="";if(d(e)&&(e=e.call(this)),t.data&&(n=v(t.data)),e&&"object"==typeof e)if(f(e))for(var c=e.length;c>a;a++)n&&(n.index=a,n.first=0===a,n.last=a===e.length-1),i+=r(e[a],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=a,n.first=0===a),i+=r(e[l],{data:n}),a++);return 0===a&&(i=o(this)),i}),e.registerHelper("if",function(e,t){return d(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||i.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){return d(e)&&(e=e.call(this)),i.isEmpty(e)?void 0:t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(r,t)})}function o(e,t){m.log(e,t)}var a={},i=e,c=t,l="1.3.0";a.VERSION=l;var s=4;a.COMPILER_REVISION=s;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};a.REVISION_CHANGES=u;var f=i.isArray,d=i.isFunction,p=i.toString,h="[object Object]";a.HandlebarsEnvironment=n,n.prototype={constructor:n,logger:m,log:o,registerHelper:function(e,t,n){if(p.call(e)===h){if(n||t)throw new c("Arg not supported with multiple helpers");i.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){p.call(e)===h?i.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};a.logger=m,a.log=o;var v=function(e){var t={};return i.extend(t,e),t};return a.createFrame=v,a}(t,n),o=function(e,t,n){"use strict";function r(e){var t=e&&e[0]||1,n=d;if(t!==n){if(n>t){var r=p[n],o=p[t];throw new f("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new f("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function o(e,t){if(!t)throw new f("No environment passed to template");var n=function(e,n,r,o,a,i){var c=t.VM.invokePartial.apply(this,arguments);if(null!=c)return c;if(t.compile){var l={helpers:o,partials:a,data:i};return a[n]=t.compile(e,{data:void 0!==i},t),a[n](r,l)}throw new f("The partial "+n+" could not be compiled when running in runtime-only mode")},r={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=i(e,t,n):r||(r=this.programs[e]=i(e,t)),r},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},u.extend(n,t),u.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,o){o=o||{};var a,i,c=o.partial?o:t;o.partial||(a=o.helpers,i=o.partials);var l=e.call(r,c,n,a,i,o.data);return o.partial||t.VM.checkRevision(r.compilerInfo),l}}function a(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=function(e,o){return o=o||{},t.apply(this,[e,o.data||n].concat(r))};return o.program=e,o.depth=r.length,o}function i(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r}function c(e,t,n,r,o,a){var i={partial:!0,helpers:r,partials:o,data:a};if(void 0===e)throw new f("The partial "+t+" could not be found");return e instanceof Function?e(n,i):void 0}function l(){return""}var s={},u=e,f=t,d=n.COMPILER_REVISION,p=n.REVISION_CHANGES;return s.checkRevision=r,s.template=o,s.programWithDepth=a,s.program=i,s.invokePartial=c,s.noop=l,s}(t,n,r),a=function(e,t,n,r,o){"use strict";var a,i=e,c=t,l=n,s=r,u=o,f=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=c,e.Exception=l,e.Utils=s,e.VM=u,e.template=function(t){return u.template(t,e)},e},d=f();return d.create=f,a=d}(r,e,n,t,o);return a}();!function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;r>n;n++)t.call(e,e[n],n)}}function o(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function a(e){return o("Function",e)}function i(e){return o("Array",e)}function c(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function l(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,r,o){var a="object"==typeof e?e:{test:e,success:t?i(t)?t:[t]:!1,failure:r?i(r)?r:[r]:!1,callback:o||n},c=!!a.test;return c&&a.success?(a.success.push(a.callback),L.load.apply(null,a.success)):!c&&a.failure?(a.failure.push(a.callback),L.load.apply(null,a.failure)):o(),L}function u(e){var t={};if("object"==typeof e)for(var n in e)e[n]&&(t={name:n,url:e[n]});else t={name:c(e),url:e};var r=M[t.name];return r&&r.url===t.url?r:(M[t.name]=t,t)}function f(e){e=e||M;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==C)return!1;return!0}function d(e){e.state=N,r(e.onpreload,function(e){e.call()})}function p(e){e.state===t&&(e.state=k,e.onpreload=[],g({url:e.url,type:"cache"},function(){d(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),o=n[0];return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(o?(r(n,function(e){!a(e)&&e&&p(u(e))}),v(u(e[0]),a(o)?o:function(){L.load.apply(null,n)})):v(u(e[0])),L)}function m(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(r(e,function(e){e!==t&&(e=u(e),n[e.name]=e)}),r(e,function(e){e!==t&&(e=u(e),v(e,function(){f(n)&&l(t)}))}),L)}function v(e,t){return t=t||n,e.state===C?void t():e.state===H?void L.ready(e.name,t):e.state===k?void e.onpreload.push(function(){v(e,t)}):(e.state=H,void g(e,function(){e.state=C,t(),r(T[e.name],function(e){l(e)}),x&&f()&&r(T.ALL,function(e){l(e)})}))}function y(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function g(t,r){function o(t){t=t||e.event,c.onload=c.onreadystatechange=c.onerror=null,r()}function a(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(c.readyState)&&(!S.documentMode||S.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),c.onload=c.onreadystatechange=c.onerror=null,r())}function i(){if(t.state!==C&&t.cssRetries<=20){for(var n=0,r=S.styleSheets.length;r>n;n++)if(S.styleSheets[n].href===c.href)return void a({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(i,250)}}r=r||n;var c,l=y(t.url);"css"===l?(c=S.createElement("link"),c.type="text/"+(t.type||"css"),c.rel="stylesheet",c.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(i,500)):(c=S.createElement("script"),c.type="text/"+(t.type||"javascript"),c.src=t.url),c.onload=c.onreadystatechange=a,c.onerror=o,c.async=!1,c.defer=!1,t.errorTimeout=e.setTimeout(function(){o({type:"timeout"})},7e3);var s=S.head||S.getElementsByTagName("head")[0];s.insertBefore(c,s.lastChild)}function w(){for(var e=S.getElementsByTagName("script"),t=0,n=e.length;n>t;t++){var r=e[t].getAttribute("data-headjs-load");if(r)return void L.load(r)}}function b(e,t){if(e===S)return x?l(t):O.push(t),L;if(a(e)&&(t=e,e="ALL"),i(e)){var n={};return r(e,function(e){n[e]=M[e],L.ready(e,function(){f(n)&&l(t)})}),L}if("string"!=typeof e||!a(t))return L;var o=M[e];if(o&&o.state===C||"ALL"===e&&f()&&x)return l(t),L;var c=T[e];return c?c.push(t):c=T[e]=[t],L}function E(){return S.body?void(x||(x=!0,w(),r(O,function(e){l(e)}))):(e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(E,50)))}function j(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",j,!1),E()):"complete"===S.readyState&&(S.detachEvent("onreadystatechange",j),E())}var x,S=e.document,O=[],T={},M={},A="async"in S.createElement("script")||"MozAppearance"in S.documentElement.style||e.opera,I=e.head_conf&&e.head_conf.head||"head",L=e[I]=e[I]||function(){L.ready.apply(null,arguments)},k=1,N=2,H=3,C=4;if("complete"===S.readyState)E();else if(S.addEventListener)S.addEventListener("DOMContentLoaded",j,!1),e.addEventListener("load",E,!1);else{S.attachEvent("onreadystatechange",j),e.attachEvent("onload",E);var R=!1;try{R=!e.frameElement&&S.documentElement}catch(q){}R&&R.doScroll&&!function P(){if(!x){try{R.doScroll("left")}catch(t){return e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(P,50))}E()}}()}L.load=L.js=A?m:h,L.test=s,L.ready=b,L.ready(S,function(){f()&&r(T.ALL,function(e){l(e)}),L.feature&&L.feature("domloaded",!0)})}(window);var oc=oc||{};!function(e,t,n,r,o){var a="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js",i="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js",c=5e3,l=500,s="oc-component",u="Href parameter missing",f="Error loading {0} component",d="Error rendering component: {0}, error: {1}",p="Failed to retrieve the component. Retrying in {0} seconds...".replace("{0}",c/1e3),h="Error loading component: view engine {0} not supported",m="Loading...",v="Component '{0}' correctly rendered",y="Unrendered component found. Trying to retrieve it...",g="undefined"!=typeof jQuery?jQuery:void 0,w=function(){},b=r.navigator.userAgent,E=!!b.match(/MSIE 8/),j=!!b.match(/MSIE 9/),x=!1,S=!1,O=[],T={error:function(e){return console.log(e)},info:function(e){return o?console.log(e):void 0}},M=function(e,t,n){var r=Math.floor(9999999999*Math.random());e.html(t.html),e.attr("id",r),e.attr("data-rendered",!0),e.attr("data-rendering",!1),e.attr("data-version",t.version),t.key&&(e.attr("data-hash",t.key),oc.setEventListeners(e)),n()};oc.ready=function(e){if(x)return e();if(S)O.push(e);else{S=!0;var n=function(e){E||j?t.load(a,e):e()},r=function(){x=!0,S=!1,e();for(var t=0;t<O.length;t++)O[t]()};g?n(r):t.load(i,function(){g=jQuery,n(r)})}},oc.render=function(t,n,r){oc.ready(function(){if(oc.components[t.key]){var o="";if("handlebars"===t.type){var a=e.template(oc.components[t.key],[]);o=a(n)}else{if("jade"!==t.type)return r(h.replace("{0}",t.type));o=oc.components[t.key](n)}r(null,o)}else r(f.replace("{0}",t.key))})},oc.renderNestedComponent=function(e,t){oc.ready(function(){var n=e.attr("data-rendering"),r=e.attr("data-rendered"),o="boolean"==typeof n?n:"true"===n,a="boolean"==typeof r?r:"true"===r;o||a?setTimeout(t,l):(T.info(y),e.attr("data-rendering",!0),e.html('<div class="oc-loading">'+m+"</div>"),oc.renderByHref(e.attr("href"),function(n,r){return!n&&r&&r.html?void M(e,r,t):T.error(n)}))})},oc.renderByHref=function(e,n){oc.ready(function(){return""===e?n(d.replace("{1}",u)):void g.ajax({url:e,headers:{Accept:"application/vnd.oc.prerendered+json"},contentType:"text/plain",crossDomain:!0,async:!0,success:function(e){if("pre-rendered"===e.renderMode)t.load([e.template.src],function(){oc.render(e.template,e.data,function(t,r){return t?n(d.replace("{0}",e.href).replace("{1}",t)):(T.info(v.replace("{0}",e.template.src)),void n(null,{html:r,key:e.template.key,version:e.version}))})});else if("rendered"===e.renderMode){T.info(v.replace("{0}",e.href));var r=e.html.slice(e.html.indexOf(">")+1),o=r.slice(0,r.lastIndexOf("<"));n(null,{html:o,version:e.version})}},error:function(){T.error(p),setTimeout(function(){oc.renderByHref(e,n)},c)}})})},oc.renderUnloadedComponents=function(){oc.ready(function(){var e=E?"div[data-oc-component=true]":s,t=g(e+"[data-rendered!=true]"),n=function(e,t){oc.renderNestedComponent(g(e[t]),function(){t++,t<e.length?n(e,t):oc.renderUnloadedComponents()})};t.length>0&&n(t,0)})},oc.setEventListeners=function(e){oc.ready(function(){e.off("reRender"),e.on("reRender",function(e,t){var n=g(e.target);return t&&""!==t&&n.attr("href",t),n.attr("data-hash",""),n.attr("data-rendered",!1),oc.renderUnloadedComponents(),!1}),e.trigger("loaded")})},oc.load=function(e,t,n){oc.ready(function(){if("function"!=typeof n&&(n=w),g(e)){g(e).html("<"+s+' href="'+t+'" />');var r=g(s,e);oc.renderNestedComponent(r,function(){n(r)})}})},oc.ready(oc.renderUnloadedComponents)}(Handlebars,head,document,window,!0),oc.clientVersion="0.10.4";
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jade=e()}}(function(){return function e(t,n,r){function o(i,c){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!c&&l)return l(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";function r(e){return null!=e&&""!==e}function o(e){return(Array.isArray(e)?e.map(o):e&&"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}):[e]).filter(r).join(" ")}n.merge=function a(e,t){if(1===arguments.length){for(var n=e[0],o=1;o<e.length;o++)n=a(n,e[o]);return n}var i=e["class"],c=t["class"];(i||c)&&(i=i||[],c=c||[],Array.isArray(i)||(i=[i]),Array.isArray(c)||(c=[c]),e["class"]=i.concat(c).filter(r));for(var l in t)"class"!=l&&(e[l]=t[l]);return e},n.joinClasses=o,n.cls=function(e,t){for(var r=[],a=0;a<e.length;a++)r.push(t&&t[a]?n.escape(o([e[a]])):o(e[a]));var i=o(r);return i.length?' class="'+i+'"':""},n.style=function(e){return e&&"object"==typeof e?Object.keys(e).map(function(t){return t+":"+e[t]}).join(";"):e},n.attr=function(e,t,r,o){return"style"===e&&(t=n.style(t)),"boolean"==typeof t||null==t?t?" "+(o?e:e+'="'+e+'"'):"":0==e.indexOf("data")&&"string"!=typeof t?(-1!==JSON.stringify(t).indexOf("&")&&console.warn("Since Jade 2.0.0, ampersands (`&`) in data attributes will be escaped to `&amp;`"),t&&"function"==typeof t.toISOString&&console.warn("Jade will eliminate the double quotes around dates in ISO form after 2.0.0")," "+e+"='"+JSON.stringify(t).replace(/'/g,"&apos;")+"'"):r?(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+n.escape(t)+'"'):(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+t+'"')},n.attrs=function(e,t){var r=[],a=Object.keys(e);if(a.length)for(var i=0;i<a.length;++i){var c=a[i],l=e[c];"class"==c?(l=o(l))&&r.push(" "+c+'="'+l+'"'):r.push(n.attr(c,l,!1,t))}return r.join("")},n.escape=function(e){var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return t===""+e?e:t},n.rethrow=function i(t,n,r,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||o))throw t.message+=" on line "+r,t;try{o=o||e("fs").readFileSync(n,"utf8")}catch(a){i(t,null,r)}var c=3,l=o.split("\n"),s=Math.max(r-c,0),u=Math.min(l.length,r+c),c=l.slice(s,u).map(function(e,t){var n=t+s+1;return(n==r?" > ":" ")+n+"| "+e}).join("\n");throw t.path=n,t.message=(n||"Jade")+":"+r+"\n"+c+"\n\n"+t.message,t}},{fs:2}],2:[function(){},{}]},{},[1])(1)});var Handlebars=function(){var e=function(){"use strict";function e(e){this.string=e}var t;return e.prototype.toString=function(){return""+this.string},t=e}(),t=function(e){"use strict";function t(e){return c[e]||"&amp;"}function n(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof i?e.toString():e||0===e?(e=""+e,s.test(e)?e.replace(l,t):e):""}function o(e){return e||0===e?d(e)&&0===e.length?!0:!1:!0}var a={},i=e,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},l=/[&<>"'`]/g,s=/[&<>"'`]/;a.extend=n;var u=Object.prototype.toString;a.toString=u;var f=function(e){return"function"==typeof e};f(/x/)&&(f=function(e){return"function"==typeof e&&"[object Function]"===u.call(e)});var f;a.isFunction=f;var d=Array.isArray||function(e){return e&&"object"==typeof e?"[object Array]"===u.call(e):!1};return a.isArray=d,a.escapeExpression=r,a.isEmpty=o,a}(e),n=function(){"use strict";function e(e,t){var r;t&&t.firstLine&&(r=t.firstLine,e+=" - "+r+":"+t.firstColumn);for(var o=Error.prototype.constructor.call(this,e),a=0;a<n.length;a++)this[n[a]]=o[n[a]];r&&(this.lineNumber=r,this.column=t.firstColumn)}var t,n=["description","fileName","lineNumber","message","name","number","stack"];return e.prototype=new Error,t=e}(),r=function(e,t){"use strict";function n(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){if(2===arguments.length)return void 0;throw new c("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse||function(){},o=n.fn;return d(t)&&(t=t.call(this)),t===!0?o(this):t===!1||null==t?r(this):f(t)?t.length>0?e.helpers.each(t,n):r(this):o(t)}),e.registerHelper("each",function(e,t){var n,r=t.fn,o=t.inverse,a=0,i="";if(d(e)&&(e=e.call(this)),t.data&&(n=v(t.data)),e&&"object"==typeof e)if(f(e))for(var c=e.length;c>a;a++)n&&(n.index=a,n.first=0===a,n.last=a===e.length-1),i+=r(e[a],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=a,n.first=0===a),i+=r(e[l],{data:n}),a++);return 0===a&&(i=o(this)),i}),e.registerHelper("if",function(e,t){return d(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||i.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){return d(e)&&(e=e.call(this)),i.isEmpty(e)?void 0:t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(r,t)})}function o(e,t){m.log(e,t)}var a={},i=e,c=t,l="1.3.0";a.VERSION=l;var s=4;a.COMPILER_REVISION=s;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};a.REVISION_CHANGES=u;var f=i.isArray,d=i.isFunction,p=i.toString,h="[object Object]";a.HandlebarsEnvironment=n,n.prototype={constructor:n,logger:m,log:o,registerHelper:function(e,t,n){if(p.call(e)===h){if(n||t)throw new c("Arg not supported with multiple helpers");i.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){p.call(e)===h?i.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};a.logger=m,a.log=o;var v=function(e){var t={};return i.extend(t,e),t};return a.createFrame=v,a}(t,n),o=function(e,t,n){"use strict";function r(e){var t=e&&e[0]||1,n=d;if(t!==n){if(n>t){var r=p[n],o=p[t];throw new f("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new f("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function o(e,t){if(!t)throw new f("No environment passed to template");var n=function(e,n,r,o,a,i){var c=t.VM.invokePartial.apply(this,arguments);if(null!=c)return c;if(t.compile){var l={helpers:o,partials:a,data:i};return a[n]=t.compile(e,{data:void 0!==i},t),a[n](r,l)}throw new f("The partial "+n+" could not be compiled when running in runtime-only mode")},r={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=i(e,t,n):r||(r=this.programs[e]=i(e,t)),r},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},u.extend(n,t),u.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,o){o=o||{};var a,i,c=o.partial?o:t;o.partial||(a=o.helpers,i=o.partials);var l=e.call(r,c,n,a,i,o.data);return o.partial||t.VM.checkRevision(r.compilerInfo),l}}function a(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=function(e,o){return o=o||{},t.apply(this,[e,o.data||n].concat(r))};return o.program=e,o.depth=r.length,o}function i(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r}function c(e,t,n,r,o,a){var i={partial:!0,helpers:r,partials:o,data:a};if(void 0===e)throw new f("The partial "+t+" could not be found");return e instanceof Function?e(n,i):void 0}function l(){return""}var s={},u=e,f=t,d=n.COMPILER_REVISION,p=n.REVISION_CHANGES;return s.checkRevision=r,s.template=o,s.programWithDepth=a,s.program=i,s.invokePartial=c,s.noop=l,s}(t,n,r),a=function(e,t,n,r,o){"use strict";var a,i=e,c=t,l=n,s=r,u=o,f=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=c,e.Exception=l,e.Utils=s,e.VM=u,e.template=function(t){return u.template(t,e)},e},d=f();return d.create=f,a=d}(r,e,n,t,o);return a}();!function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;r>n;n++)t.call(e,e[n],n)}}function o(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function a(e){return o("Function",e)}function i(e){return o("Array",e)}function c(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function l(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,r,o){var a="object"==typeof e?e:{test:e,success:t?i(t)?t:[t]:!1,failure:r?i(r)?r:[r]:!1,callback:o||n},c=!!a.test;return c&&a.success?(a.success.push(a.callback),L.load.apply(null,a.success)):!c&&a.failure?(a.failure.push(a.callback),L.load.apply(null,a.failure)):o(),L}function u(e){var t={};if("object"==typeof e)for(var n in e)e[n]&&(t={name:n,url:e[n]});else t={name:c(e),url:e};var r=M[t.name];return r&&r.url===t.url?r:(M[t.name]=t,t)}function f(e){e=e||M;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==C)return!1;return!0}function d(e){e.state=N,r(e.onpreload,function(e){e.call()})}function p(e){e.state===t&&(e.state=k,e.onpreload=[],g({url:e.url,type:"cache"},function(){d(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),o=n[0];return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(o?(r(n,function(e){!a(e)&&e&&p(u(e))}),v(u(e[0]),a(o)?o:function(){L.load.apply(null,n)})):v(u(e[0])),L)}function m(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(r(e,function(e){e!==t&&(e=u(e),n[e.name]=e)}),r(e,function(e){e!==t&&(e=u(e),v(e,function(){f(n)&&l(t)}))}),L)}function v(e,t){return t=t||n,e.state===C?void t():e.state===H?void L.ready(e.name,t):e.state===k?void e.onpreload.push(function(){v(e,t)}):(e.state=H,void g(e,function(){e.state=C,t(),r(T[e.name],function(e){l(e)}),x&&f()&&r(T.ALL,function(e){l(e)})}))}function y(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function g(t,r){function o(t){t=t||e.event,c.onload=c.onreadystatechange=c.onerror=null,r()}function a(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(c.readyState)&&(!S.documentMode||S.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),c.onload=c.onreadystatechange=c.onerror=null,r())}function i(){if(t.state!==C&&t.cssRetries<=20){for(var n=0,r=S.styleSheets.length;r>n;n++)if(S.styleSheets[n].href===c.href)return void a({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(i,250)}}r=r||n;var c,l=y(t.url);"css"===l?(c=S.createElement("link"),c.type="text/"+(t.type||"css"),c.rel="stylesheet",c.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(i,500)):(c=S.createElement("script"),c.type="text/"+(t.type||"javascript"),c.src=t.url),c.onload=c.onreadystatechange=a,c.onerror=o,c.async=!1,c.defer=!1,t.errorTimeout=e.setTimeout(function(){o({type:"timeout"})},7e3);var s=S.head||S.getElementsByTagName("head")[0];s.insertBefore(c,s.lastChild)}function w(){for(var e=S.getElementsByTagName("script"),t=0,n=e.length;n>t;t++){var r=e[t].getAttribute("data-headjs-load");if(r)return void L.load(r)}}function b(e,t){if(e===S)return x?l(t):O.push(t),L;if(a(e)&&(t=e,e="ALL"),i(e)){var n={};return r(e,function(e){n[e]=M[e],L.ready(e,function(){f(n)&&l(t)})}),L}if("string"!=typeof e||!a(t))return L;var o=M[e];if(o&&o.state===C||"ALL"===e&&f()&&x)return l(t),L;var c=T[e];return c?c.push(t):c=T[e]=[t],L}function E(){return S.body?void(x||(x=!0,w(),r(O,function(e){l(e)}))):(e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(E,50)))}function j(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",j,!1),E()):"complete"===S.readyState&&(S.detachEvent("onreadystatechange",j),E())}var x,S=e.document,O=[],T={},M={},A="async"in S.createElement("script")||"MozAppearance"in S.documentElement.style||e.opera,I=e.head_conf&&e.head_conf.head||"head",L=e[I]=e[I]||function(){L.ready.apply(null,arguments)},k=1,N=2,H=3,C=4;if("complete"===S.readyState)E();else if(S.addEventListener)S.addEventListener("DOMContentLoaded",j,!1),e.addEventListener("load",E,!1);else{S.attachEvent("onreadystatechange",j),e.attachEvent("onload",E);var R=!1;try{R=!e.frameElement&&S.documentElement}catch(q){}R&&R.doScroll&&!function P(){if(!x){try{R.doScroll("left")}catch(t){return e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(P,50))}E()}}()}L.load=L.js=A?m:h,L.test=s,L.ready=b,L.ready(S,function(){f()&&r(T.ALL,function(e){l(e)}),L.feature&&L.feature("domloaded",!0)})}(window);var oc=oc||{};!function(e,t,n,r,o){var a="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js",i="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js",c=5e3,l=500,s="oc-component",u="Href parameter missing",f="Error loading {0} component",d="Error rendering component: {0}, error: {1}",p="Failed to retrieve the component. Retrying in {0} seconds...".replace("{0}",c/1e3),h="Error loading component: view engine {0} not supported",m="Loading...",v="Component '{0}' correctly rendered",y="Unrendered component found. Trying to retrieve it...",g="undefined"!=typeof jQuery?jQuery:void 0,w=function(){},b=r.navigator.userAgent,E=!!b.match(/MSIE 8/),j=!!b.match(/MSIE 9/),x=!1,S=!1,O=[],T={error:function(e){return console.log(e)},info:function(e){return o?console.log(e):void 0}},M=function(e,t,n){var r=Math.floor(9999999999*Math.random());e.html(t.html),e.attr("id",r),e.attr("data-rendered",!0),e.attr("data-rendering",!1),e.attr("data-version",t.version),t.key&&(e.attr("data-hash",t.key),oc.setEventListeners(e)),n()};oc.ready=function(e){if(x)return e();if(S)O.push(e);else{S=!0;var n=function(e){E||j?t.load(a,e):e()},r=function(){x=!0,S=!1,e();for(var t=0;t<O.length;t++)O[t]()};g?n(r):t.load(i,function(){g=jQuery,n(r)})}},oc.render=function(t,n,r){oc.ready(function(){if(oc.components[t.key]){var o="";if("handlebars"===t.type){var a=e.template(oc.components[t.key],[]);o=a(n)}else{if("jade"!==t.type)return r(h.replace("{0}",t.type));o=oc.components[t.key](n)}r(null,o)}else r(f.replace("{0}",t.key))})},oc.renderNestedComponent=function(e,t){oc.ready(function(){var n=e.attr("data-rendering"),r=e.attr("data-rendered"),o="boolean"==typeof n?n:"true"===n,a="boolean"==typeof r?r:"true"===r;o||a?setTimeout(t,l):(T.info(y),e.attr("data-rendering",!0),e.html('<div class="oc-loading">'+m+"</div>"),oc.renderByHref(e.attr("href"),function(n,r){return!n&&r&&r.html?void M(e,r,t):T.error(n)}))})},oc.renderByHref=function(e,n){oc.ready(function(){return""===e?n(d.replace("{1}",u)):void g.ajax({url:e,headers:{Accept:"application/vnd.oc.prerendered+json"},contentType:"text/plain",crossDomain:!0,async:!0,success:function(e){if("pre-rendered"===e.renderMode)t.load([e.template.src],function(){oc.render(e.template,e.data,function(t,r){return t?n(d.replace("{0}",e.href).replace("{1}",t)):(T.info(v.replace("{0}",e.template.src)),void n(null,{html:r,key:e.template.key,version:e.version}))})});else if("rendered"===e.renderMode){T.info(v.replace("{0}",e.href));var r=e.html.slice(e.html.indexOf(">")+1),o=r.slice(0,r.lastIndexOf("<"));n(null,{html:o,version:e.version})}},error:function(){T.error(p),setTimeout(function(){oc.renderByHref(e,n)},c)}})})},oc.renderUnloadedComponents=function(){oc.ready(function(){var e=E?"div[data-oc-component=true]":s,t=g(e+"[data-rendered!=true]"),n=function(e,t){oc.renderNestedComponent(g(e[t]),function(){t++,t<e.length?n(e,t):oc.renderUnloadedComponents()})};t.length>0&&n(t,0)})},oc.setEventListeners=function(e){oc.ready(function(){e.off("reRender"),e.on("reRender",function(e,t){var n=g(e.target);return t&&""!==t&&n.attr("href",t),n.attr("data-hash",""),n.attr("data-rendered",!1),oc.renderUnloadedComponents(),!1}),e.trigger("loaded")})},oc.load=function(e,t,n){oc.ready(function(){if("function"!=typeof n&&(n=w),g(e)){g(e).html("<"+s+' href="'+t+'" />');var r=g(s,e);oc.renderNestedComponent(r,function(){n(r)})}})},oc.ready(oc.renderUnloadedComponents)}(Handlebars,head,document,window,!0),oc.clientVersion="0.10.5";
{
"name": "oc-client",
"description": "",
"version": "0.10.4",
"version": "0.10.5",
"dependencies": {},

@@ -6,0 +6,0 @@ "repository": "",

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jade=e()}}(function(){return function e(t,n,r){function o(i,c){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!c&&l)return l(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";function r(e){return null!=e&&""!==e}function o(e){return(Array.isArray(e)?e.map(o):e&&"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}):[e]).filter(r).join(" ")}n.merge=function a(e,t){if(1===arguments.length){for(var n=e[0],o=1;o<e.length;o++)n=a(n,e[o]);return n}var i=e["class"],c=t["class"];(i||c)&&(i=i||[],c=c||[],Array.isArray(i)||(i=[i]),Array.isArray(c)||(c=[c]),e["class"]=i.concat(c).filter(r));for(var l in t)"class"!=l&&(e[l]=t[l]);return e},n.joinClasses=o,n.cls=function(e,t){for(var r=[],a=0;a<e.length;a++)r.push(t&&t[a]?n.escape(o([e[a]])):o(e[a]));var i=o(r);return i.length?' class="'+i+'"':""},n.style=function(e){return e&&"object"==typeof e?Object.keys(e).map(function(t){return t+":"+e[t]}).join(";"):e},n.attr=function(e,t,r,o){return"style"===e&&(t=n.style(t)),"boolean"==typeof t||null==t?t?" "+(o?e:e+'="'+e+'"'):"":0==e.indexOf("data")&&"string"!=typeof t?(-1!==JSON.stringify(t).indexOf("&")&&console.warn("Since Jade 2.0.0, ampersands (`&`) in data attributes will be escaped to `&amp;`"),t&&"function"==typeof t.toISOString&&console.warn("Jade will eliminate the double quotes around dates in ISO form after 2.0.0")," "+e+"='"+JSON.stringify(t).replace(/'/g,"&apos;")+"'"):r?(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+n.escape(t)+'"'):(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+t+'"')},n.attrs=function(e,t){var r=[],a=Object.keys(e);if(a.length)for(var i=0;i<a.length;++i){var c=a[i],l=e[c];"class"==c?(l=o(l))&&r.push(" "+c+'="'+l+'"'):r.push(n.attr(c,l,!1,t))}return r.join("")},n.escape=function(e){var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return t===""+e?e:t},n.rethrow=function i(t,n,r,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||o))throw t.message+=" on line "+r,t;try{o=o||e("fs").readFileSync(n,"utf8")}catch(a){i(t,null,r)}var c=3,l=o.split("\n"),s=Math.max(r-c,0),u=Math.min(l.length,r+c),c=l.slice(s,u).map(function(e,t){var n=t+s+1;return(n==r?" > ":" ")+n+"| "+e}).join("\n");throw t.path=n,t.message=(n||"Jade")+":"+r+"\n"+c+"\n\n"+t.message,t}},{fs:2}],2:[function(){},{}]},{},[1])(1)});var Handlebars=function(){var e=function(){"use strict";function e(e){this.string=e}var t;return e.prototype.toString=function(){return""+this.string},t=e}(),t=function(e){"use strict";function t(e){return c[e]||"&amp;"}function n(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof i?e.toString():e||0===e?(e=""+e,s.test(e)?e.replace(l,t):e):""}function o(e){return e||0===e?d(e)&&0===e.length?!0:!1:!0}var a={},i=e,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},l=/[&<>"'`]/g,s=/[&<>"'`]/;a.extend=n;var u=Object.prototype.toString;a.toString=u;var f=function(e){return"function"==typeof e};f(/x/)&&(f=function(e){return"function"==typeof e&&"[object Function]"===u.call(e)});var f;a.isFunction=f;var d=Array.isArray||function(e){return e&&"object"==typeof e?"[object Array]"===u.call(e):!1};return a.isArray=d,a.escapeExpression=r,a.isEmpty=o,a}(e),n=function(){"use strict";function e(e,t){var r;t&&t.firstLine&&(r=t.firstLine,e+=" - "+r+":"+t.firstColumn);for(var o=Error.prototype.constructor.call(this,e),a=0;a<n.length;a++)this[n[a]]=o[n[a]];r&&(this.lineNumber=r,this.column=t.firstColumn)}var t,n=["description","fileName","lineNumber","message","name","number","stack"];return e.prototype=new Error,t=e}(),r=function(e,t){"use strict";function n(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){if(2===arguments.length)return void 0;throw new c("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse||function(){},o=n.fn;return d(t)&&(t=t.call(this)),t===!0?o(this):t===!1||null==t?r(this):f(t)?t.length>0?e.helpers.each(t,n):r(this):o(t)}),e.registerHelper("each",function(e,t){var n,r=t.fn,o=t.inverse,a=0,i="";if(d(e)&&(e=e.call(this)),t.data&&(n=v(t.data)),e&&"object"==typeof e)if(f(e))for(var c=e.length;c>a;a++)n&&(n.index=a,n.first=0===a,n.last=a===e.length-1),i+=r(e[a],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=a,n.first=0===a),i+=r(e[l],{data:n}),a++);return 0===a&&(i=o(this)),i}),e.registerHelper("if",function(e,t){return d(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||i.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){return d(e)&&(e=e.call(this)),i.isEmpty(e)?void 0:t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(r,t)})}function o(e,t){m.log(e,t)}var a={},i=e,c=t,l="1.3.0";a.VERSION=l;var s=4;a.COMPILER_REVISION=s;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};a.REVISION_CHANGES=u;var f=i.isArray,d=i.isFunction,p=i.toString,h="[object Object]";a.HandlebarsEnvironment=n,n.prototype={constructor:n,logger:m,log:o,registerHelper:function(e,t,n){if(p.call(e)===h){if(n||t)throw new c("Arg not supported with multiple helpers");i.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){p.call(e)===h?i.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};a.logger=m,a.log=o;var v=function(e){var t={};return i.extend(t,e),t};return a.createFrame=v,a}(t,n),o=function(e,t,n){"use strict";function r(e){var t=e&&e[0]||1,n=d;if(t!==n){if(n>t){var r=p[n],o=p[t];throw new f("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new f("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function o(e,t){if(!t)throw new f("No environment passed to template");var n=function(e,n,r,o,a,i){var c=t.VM.invokePartial.apply(this,arguments);if(null!=c)return c;if(t.compile){var l={helpers:o,partials:a,data:i};return a[n]=t.compile(e,{data:void 0!==i},t),a[n](r,l)}throw new f("The partial "+n+" could not be compiled when running in runtime-only mode")},r={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=i(e,t,n):r||(r=this.programs[e]=i(e,t)),r},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},u.extend(n,t),u.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,o){o=o||{};var a,i,c=o.partial?o:t;o.partial||(a=o.helpers,i=o.partials);var l=e.call(r,c,n,a,i,o.data);return o.partial||t.VM.checkRevision(r.compilerInfo),l}}function a(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=function(e,o){return o=o||{},t.apply(this,[e,o.data||n].concat(r))};return o.program=e,o.depth=r.length,o}function i(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r}function c(e,t,n,r,o,a){var i={partial:!0,helpers:r,partials:o,data:a};if(void 0===e)throw new f("The partial "+t+" could not be found");return e instanceof Function?e(n,i):void 0}function l(){return""}var s={},u=e,f=t,d=n.COMPILER_REVISION,p=n.REVISION_CHANGES;return s.checkRevision=r,s.template=o,s.programWithDepth=a,s.program=i,s.invokePartial=c,s.noop=l,s}(t,n,r),a=function(e,t,n,r,o){"use strict";var a,i=e,c=t,l=n,s=r,u=o,f=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=c,e.Exception=l,e.Utils=s,e.VM=u,e.template=function(t){return u.template(t,e)},e},d=f();return d.create=f,a=d}(r,e,n,t,o);return a}();!function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;r>n;n++)t.call(e,e[n],n)}}function o(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function a(e){return o("Function",e)}function i(e){return o("Array",e)}function c(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function l(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,r,o){var a="object"==typeof e?e:{test:e,success:t?i(t)?t:[t]:!1,failure:r?i(r)?r:[r]:!1,callback:o||n},c=!!a.test;return c&&a.success?(a.success.push(a.callback),L.load.apply(null,a.success)):!c&&a.failure?(a.failure.push(a.callback),L.load.apply(null,a.failure)):o(),L}function u(e){var t={};if("object"==typeof e)for(var n in e)e[n]&&(t={name:n,url:e[n]});else t={name:c(e),url:e};var r=M[t.name];return r&&r.url===t.url?r:(M[t.name]=t,t)}function f(e){e=e||M;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==C)return!1;return!0}function d(e){e.state=N,r(e.onpreload,function(e){e.call()})}function p(e){e.state===t&&(e.state=k,e.onpreload=[],g({url:e.url,type:"cache"},function(){d(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),o=n[0];return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(o?(r(n,function(e){!a(e)&&e&&p(u(e))}),v(u(e[0]),a(o)?o:function(){L.load.apply(null,n)})):v(u(e[0])),L)}function m(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(r(e,function(e){e!==t&&(e=u(e),n[e.name]=e)}),r(e,function(e){e!==t&&(e=u(e),v(e,function(){f(n)&&l(t)}))}),L)}function v(e,t){return t=t||n,e.state===C?void t():e.state===H?void L.ready(e.name,t):e.state===k?void e.onpreload.push(function(){v(e,t)}):(e.state=H,void g(e,function(){e.state=C,t(),r(T[e.name],function(e){l(e)}),x&&f()&&r(T.ALL,function(e){l(e)})}))}function y(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function g(t,r){function o(t){t=t||e.event,c.onload=c.onreadystatechange=c.onerror=null,r()}function a(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(c.readyState)&&(!S.documentMode||S.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),c.onload=c.onreadystatechange=c.onerror=null,r())}function i(){if(t.state!==C&&t.cssRetries<=20){for(var n=0,r=S.styleSheets.length;r>n;n++)if(S.styleSheets[n].href===c.href)return void a({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(i,250)}}r=r||n;var c,l=y(t.url);"css"===l?(c=S.createElement("link"),c.type="text/"+(t.type||"css"),c.rel="stylesheet",c.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(i,500)):(c=S.createElement("script"),c.type="text/"+(t.type||"javascript"),c.src=t.url),c.onload=c.onreadystatechange=a,c.onerror=o,c.async=!1,c.defer=!1,t.errorTimeout=e.setTimeout(function(){o({type:"timeout"})},7e3);var s=S.head||S.getElementsByTagName("head")[0];s.insertBefore(c,s.lastChild)}function w(){for(var e=S.getElementsByTagName("script"),t=0,n=e.length;n>t;t++){var r=e[t].getAttribute("data-headjs-load");if(r)return void L.load(r)}}function b(e,t){if(e===S)return x?l(t):O.push(t),L;if(a(e)&&(t=e,e="ALL"),i(e)){var n={};return r(e,function(e){n[e]=M[e],L.ready(e,function(){f(n)&&l(t)})}),L}if("string"!=typeof e||!a(t))return L;var o=M[e];if(o&&o.state===C||"ALL"===e&&f()&&x)return l(t),L;var c=T[e];return c?c.push(t):c=T[e]=[t],L}function E(){return S.body?void(x||(x=!0,w(),r(O,function(e){l(e)}))):(e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(E,50)))}function j(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",j,!1),E()):"complete"===S.readyState&&(S.detachEvent("onreadystatechange",j),E())}var x,S=e.document,O=[],T={},M={},A="async"in S.createElement("script")||"MozAppearance"in S.documentElement.style||e.opera,I=e.head_conf&&e.head_conf.head||"head",L=e[I]=e[I]||function(){L.ready.apply(null,arguments)},k=1,N=2,H=3,C=4;if("complete"===S.readyState)E();else if(S.addEventListener)S.addEventListener("DOMContentLoaded",j,!1),e.addEventListener("load",E,!1);else{S.attachEvent("onreadystatechange",j),e.attachEvent("onload",E);var R=!1;try{R=!e.frameElement&&S.documentElement}catch(q){}R&&R.doScroll&&!function P(){if(!x){try{R.doScroll("left")}catch(t){return e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(P,50))}E()}}()}L.load=L.js=A?m:h,L.test=s,L.ready=b,L.ready(S,function(){f()&&r(T.ALL,function(e){l(e)}),L.feature&&L.feature("domloaded",!0)})}(window);var oc=oc||{};!function(e,t,n,r,o){var a="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js",i="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js",c=5e3,l=500,s="oc-component",u="Href parameter missing",f="Error loading {0} component",d="Error rendering component: {0}, error: {1}",p="Failed to retrieve the component. Retrying in {0} seconds...".replace("{0}",c/1e3),h="Error loading component: view engine {0} not supported",m="Loading...",v="Component '{0}' correctly rendered",y="Unrendered component found. Trying to retrieve it...",g="undefined"!=typeof jQuery?jQuery:void 0,w=function(){},b=r.navigator.userAgent,E=!!b.match(/MSIE 8/),j=!!b.match(/MSIE 9/),x=!1,S=!1,O=[],T={error:function(e){return console.log(e)},info:function(e){return o?console.log(e):void 0}},M=function(e,t,n){var r=Math.floor(9999999999*Math.random());e.html(t.html),e.attr("id",r),e.attr("data-rendered",!0),e.attr("data-rendering",!1),e.attr("data-version",t.version),t.key&&(e.attr("data-hash",t.key),oc.setEventListeners(e)),n()};oc.ready=function(e){if(x)return e();if(S)O.push(e);else{S=!0;var n=function(e){E||j?t.load(a,e):e()},r=function(){x=!0,S=!1,e();for(var t=0;t<O.length;t++)O[t]()};g?n(r):t.load(i,function(){g=jQuery,n(r)})}},oc.render=function(t,n,r){oc.ready(function(){if(oc.components[t.key]){var o="";if("handlebars"===t.type){var a=e.template(oc.components[t.key],[]);o=a(n)}else{if("jade"!==t.type)return r(h.replace("{0}",t.type));o=oc.components[t.key](n)}r(null,o)}else r(f.replace("{0}",t.key))})},oc.renderNestedComponent=function(e,t){oc.ready(function(){var n=e.attr("data-rendering"),r=e.attr("data-rendered"),o="boolean"==typeof n?n:"true"===n,a="boolean"==typeof r?r:"true"===r;o||a?setTimeout(t,l):(T.info(y),e.attr("data-rendering",!0),e.html('<div class="oc-loading">'+m+"</div>"),oc.renderByHref(e.attr("href"),function(n,r){return!n&&r&&r.html?void M(e,r,t):T.error(n)}))})},oc.renderByHref=function(e,n){oc.ready(function(){return""===e?n(d.replace("{1}",u)):void g.ajax({url:e,headers:{Accept:"application/vnd.oc.prerendered+json"},contentType:"text/plain",crossDomain:!0,async:!0,success:function(e){if("pre-rendered"===e.renderMode)t.load([e.template.src],function(){oc.render(e.template,e.data,function(t,r){return t?n(d.replace("{0}",e.href).replace("{1}",t)):(T.info(v.replace("{0}",e.template.src)),void n(null,{html:r,key:e.template.key,version:e.version}))})});else if("rendered"===e.renderMode){T.info(v.replace("{0}",e.href));var r=e.html.slice(e.html.indexOf(">")+1),o=r.slice(0,r.lastIndexOf("<"));n(null,{html:o,version:e.version})}},error:function(){T.error(p),setTimeout(function(){oc.renderByHref(e,n)},c)}})})},oc.renderUnloadedComponents=function(){oc.ready(function(){var e=E?"div[data-oc-component=true]":s,t=g(e+"[data-rendered!=true]"),n=function(e,t){oc.renderNestedComponent(g(e[t]),function(){t++,t<e.length?n(e,t):oc.renderUnloadedComponents()})};t.length>0&&n(t,0)})},oc.setEventListeners=function(e){oc.ready(function(){e.off("reRender"),e.on("reRender",function(e,t){var n=g(e.target);return t&&""!==t&&n.attr("href",t),n.attr("data-hash",""),n.attr("data-rendered",!1),oc.renderUnloadedComponents(),!1}),e.trigger("loaded")})},oc.load=function(e,t,n){oc.ready(function(){if("function"!=typeof n&&(n=w),g(e)){g(e).html("<"+s+' href="'+t+'" />');var r=g(s,e);oc.renderNestedComponent(r,function(){n(r)})}})},oc.ready(oc.renderUnloadedComponents)}(Handlebars,head,document,window,!0),oc.clientVersion="0.10.4";
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.jade=e()}}(function(){return function e(t,n,r){function o(i,c){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!c&&l)return l(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n?n:e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";function r(e){return null!=e&&""!==e}function o(e){return(Array.isArray(e)?e.map(o):e&&"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}):[e]).filter(r).join(" ")}n.merge=function a(e,t){if(1===arguments.length){for(var n=e[0],o=1;o<e.length;o++)n=a(n,e[o]);return n}var i=e["class"],c=t["class"];(i||c)&&(i=i||[],c=c||[],Array.isArray(i)||(i=[i]),Array.isArray(c)||(c=[c]),e["class"]=i.concat(c).filter(r));for(var l in t)"class"!=l&&(e[l]=t[l]);return e},n.joinClasses=o,n.cls=function(e,t){for(var r=[],a=0;a<e.length;a++)r.push(t&&t[a]?n.escape(o([e[a]])):o(e[a]));var i=o(r);return i.length?' class="'+i+'"':""},n.style=function(e){return e&&"object"==typeof e?Object.keys(e).map(function(t){return t+":"+e[t]}).join(";"):e},n.attr=function(e,t,r,o){return"style"===e&&(t=n.style(t)),"boolean"==typeof t||null==t?t?" "+(o?e:e+'="'+e+'"'):"":0==e.indexOf("data")&&"string"!=typeof t?(-1!==JSON.stringify(t).indexOf("&")&&console.warn("Since Jade 2.0.0, ampersands (`&`) in data attributes will be escaped to `&amp;`"),t&&"function"==typeof t.toISOString&&console.warn("Jade will eliminate the double quotes around dates in ISO form after 2.0.0")," "+e+"='"+JSON.stringify(t).replace(/'/g,"&apos;")+"'"):r?(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+n.escape(t)+'"'):(t&&"function"==typeof t.toISOString&&console.warn("Jade will stringify dates in ISO form after 2.0.0")," "+e+'="'+t+'"')},n.attrs=function(e,t){var r=[],a=Object.keys(e);if(a.length)for(var i=0;i<a.length;++i){var c=a[i],l=e[c];"class"==c?(l=o(l))&&r.push(" "+c+'="'+l+'"'):r.push(n.attr(c,l,!1,t))}return r.join("")},n.escape=function(e){var t=String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return t===""+e?e:t},n.rethrow=function i(t,n,r,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||o))throw t.message+=" on line "+r,t;try{o=o||e("fs").readFileSync(n,"utf8")}catch(a){i(t,null,r)}var c=3,l=o.split("\n"),s=Math.max(r-c,0),u=Math.min(l.length,r+c),c=l.slice(s,u).map(function(e,t){var n=t+s+1;return(n==r?" > ":" ")+n+"| "+e}).join("\n");throw t.path=n,t.message=(n||"Jade")+":"+r+"\n"+c+"\n\n"+t.message,t}},{fs:2}],2:[function(){},{}]},{},[1])(1)});var Handlebars=function(){var e=function(){"use strict";function e(e){this.string=e}var t;return e.prototype.toString=function(){return""+this.string},t=e}(),t=function(e){"use strict";function t(e){return c[e]||"&amp;"}function n(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function r(e){return e instanceof i?e.toString():e||0===e?(e=""+e,s.test(e)?e.replace(l,t):e):""}function o(e){return e||0===e?d(e)&&0===e.length?!0:!1:!0}var a={},i=e,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},l=/[&<>"'`]/g,s=/[&<>"'`]/;a.extend=n;var u=Object.prototype.toString;a.toString=u;var f=function(e){return"function"==typeof e};f(/x/)&&(f=function(e){return"function"==typeof e&&"[object Function]"===u.call(e)});var f;a.isFunction=f;var d=Array.isArray||function(e){return e&&"object"==typeof e?"[object Array]"===u.call(e):!1};return a.isArray=d,a.escapeExpression=r,a.isEmpty=o,a}(e),n=function(){"use strict";function e(e,t){var r;t&&t.firstLine&&(r=t.firstLine,e+=" - "+r+":"+t.firstColumn);for(var o=Error.prototype.constructor.call(this,e),a=0;a<n.length;a++)this[n[a]]=o[n[a]];r&&(this.lineNumber=r,this.column=t.firstColumn)}var t,n=["description","fileName","lineNumber","message","name","number","stack"];return e.prototype=new Error,t=e}(),r=function(e,t){"use strict";function n(e,t){this.helpers=e||{},this.partials=t||{},r(this)}function r(e){e.registerHelper("helperMissing",function(e){if(2===arguments.length)return void 0;throw new c("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse||function(){},o=n.fn;return d(t)&&(t=t.call(this)),t===!0?o(this):t===!1||null==t?r(this):f(t)?t.length>0?e.helpers.each(t,n):r(this):o(t)}),e.registerHelper("each",function(e,t){var n,r=t.fn,o=t.inverse,a=0,i="";if(d(e)&&(e=e.call(this)),t.data&&(n=v(t.data)),e&&"object"==typeof e)if(f(e))for(var c=e.length;c>a;a++)n&&(n.index=a,n.first=0===a,n.last=a===e.length-1),i+=r(e[a],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=a,n.first=0===a),i+=r(e[l],{data:n}),a++);return 0===a&&(i=o(this)),i}),e.registerHelper("if",function(e,t){return d(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||i.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){return d(e)&&(e=e.call(this)),i.isEmpty(e)?void 0:t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(r,t)})}function o(e,t){m.log(e,t)}var a={},i=e,c=t,l="1.3.0";a.VERSION=l;var s=4;a.COMPILER_REVISION=s;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};a.REVISION_CHANGES=u;var f=i.isArray,d=i.isFunction,p=i.toString,h="[object Object]";a.HandlebarsEnvironment=n,n.prototype={constructor:n,logger:m,log:o,registerHelper:function(e,t,n){if(p.call(e)===h){if(n||t)throw new c("Arg not supported with multiple helpers");i.extend(this.helpers,e)}else n&&(t.not=n),this.helpers[e]=t},registerPartial:function(e,t){p.call(e)===h?i.extend(this.partials,e):this.partials[e]=t}};var m={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(m.level<=e){var n=m.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}};a.logger=m,a.log=o;var v=function(e){var t={};return i.extend(t,e),t};return a.createFrame=v,a}(t,n),o=function(e,t,n){"use strict";function r(e){var t=e&&e[0]||1,n=d;if(t!==n){if(n>t){var r=p[n],o=p[t];throw new f("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new f("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function o(e,t){if(!t)throw new f("No environment passed to template");var n=function(e,n,r,o,a,i){var c=t.VM.invokePartial.apply(this,arguments);if(null!=c)return c;if(t.compile){var l={helpers:o,partials:a,data:i};return a[n]=t.compile(e,{data:void 0!==i},t),a[n](r,l)}throw new f("The partial "+n+" could not be compiled when running in runtime-only mode")},r={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=i(e,t,n):r||(r=this.programs[e]=i(e,t)),r},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n={},u.extend(n,t),u.extend(n,e)),n},programWithDepth:t.VM.programWithDepth,noop:t.VM.noop,compilerInfo:null};return function(n,o){o=o||{};var a,i,c=o.partial?o:t;o.partial||(a=o.helpers,i=o.partials);var l=e.call(r,c,n,a,i,o.data);return o.partial||t.VM.checkRevision(r.compilerInfo),l}}function a(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=function(e,o){return o=o||{},t.apply(this,[e,o.data||n].concat(r))};return o.program=e,o.depth=r.length,o}function i(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r}function c(e,t,n,r,o,a){var i={partial:!0,helpers:r,partials:o,data:a};if(void 0===e)throw new f("The partial "+t+" could not be found");return e instanceof Function?e(n,i):void 0}function l(){return""}var s={},u=e,f=t,d=n.COMPILER_REVISION,p=n.REVISION_CHANGES;return s.checkRevision=r,s.template=o,s.programWithDepth=a,s.program=i,s.invokePartial=c,s.noop=l,s}(t,n,r),a=function(e,t,n,r,o){"use strict";var a,i=e,c=t,l=n,s=r,u=o,f=function(){var e=new i.HandlebarsEnvironment;return s.extend(e,i),e.SafeString=c,e.Exception=l,e.Utils=s,e.VM=u,e.template=function(t){return u.template(t,e)},e},d=f();return d.create=f,a=d}(r,e,n,t,o);return a}();!function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;r>n;n++)t.call(e,e[n],n)}}function o(e,n){var r=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&r===e}function a(e){return o("Function",e)}function i(e){return o("Array",e)}function c(e){var t=e.split("/"),n=t[t.length-1],r=n.indexOf("?");return-1!==r?n.substring(0,r):n}function l(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,r,o){var a="object"==typeof e?e:{test:e,success:t?i(t)?t:[t]:!1,failure:r?i(r)?r:[r]:!1,callback:o||n},c=!!a.test;return c&&a.success?(a.success.push(a.callback),L.load.apply(null,a.success)):!c&&a.failure?(a.failure.push(a.callback),L.load.apply(null,a.failure)):o(),L}function u(e){var t={};if("object"==typeof e)for(var n in e)e[n]&&(t={name:n,url:e[n]});else t={name:c(e),url:e};var r=M[t.name];return r&&r.url===t.url?r:(M[t.name]=t,t)}function f(e){e=e||M;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==C)return!1;return!0}function d(e){e.state=N,r(e.onpreload,function(e){e.call()})}function p(e){e.state===t&&(e.state=k,e.onpreload=[],g({url:e.url,type:"cache"},function(){d(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),o=n[0];return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(o?(r(n,function(e){!a(e)&&e&&p(u(e))}),v(u(e[0]),a(o)?o:function(){L.load.apply(null,n)})):v(u(e[0])),L)}function m(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),i(e[0])?(e[0].push(t),L.load.apply(null,e[0]),L):(r(e,function(e){e!==t&&(e=u(e),n[e.name]=e)}),r(e,function(e){e!==t&&(e=u(e),v(e,function(){f(n)&&l(t)}))}),L)}function v(e,t){return t=t||n,e.state===C?void t():e.state===H?void L.ready(e.name,t):e.state===k?void e.onpreload.push(function(){v(e,t)}):(e.state=H,void g(e,function(){e.state=C,t(),r(T[e.name],function(e){l(e)}),x&&f()&&r(T.ALL,function(e){l(e)})}))}function y(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function g(t,r){function o(t){t=t||e.event,c.onload=c.onreadystatechange=c.onerror=null,r()}function a(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(c.readyState)&&(!S.documentMode||S.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),c.onload=c.onreadystatechange=c.onerror=null,r())}function i(){if(t.state!==C&&t.cssRetries<=20){for(var n=0,r=S.styleSheets.length;r>n;n++)if(S.styleSheets[n].href===c.href)return void a({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(i,250)}}r=r||n;var c,l=y(t.url);"css"===l?(c=S.createElement("link"),c.type="text/"+(t.type||"css"),c.rel="stylesheet",c.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(i,500)):(c=S.createElement("script"),c.type="text/"+(t.type||"javascript"),c.src=t.url),c.onload=c.onreadystatechange=a,c.onerror=o,c.async=!1,c.defer=!1,t.errorTimeout=e.setTimeout(function(){o({type:"timeout"})},7e3);var s=S.head||S.getElementsByTagName("head")[0];s.insertBefore(c,s.lastChild)}function w(){for(var e=S.getElementsByTagName("script"),t=0,n=e.length;n>t;t++){var r=e[t].getAttribute("data-headjs-load");if(r)return void L.load(r)}}function b(e,t){if(e===S)return x?l(t):O.push(t),L;if(a(e)&&(t=e,e="ALL"),i(e)){var n={};return r(e,function(e){n[e]=M[e],L.ready(e,function(){f(n)&&l(t)})}),L}if("string"!=typeof e||!a(t))return L;var o=M[e];if(o&&o.state===C||"ALL"===e&&f()&&x)return l(t),L;var c=T[e];return c?c.push(t):c=T[e]=[t],L}function E(){return S.body?void(x||(x=!0,w(),r(O,function(e){l(e)}))):(e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(E,50)))}function j(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",j,!1),E()):"complete"===S.readyState&&(S.detachEvent("onreadystatechange",j),E())}var x,S=e.document,O=[],T={},M={},A="async"in S.createElement("script")||"MozAppearance"in S.documentElement.style||e.opera,I=e.head_conf&&e.head_conf.head||"head",L=e[I]=e[I]||function(){L.ready.apply(null,arguments)},k=1,N=2,H=3,C=4;if("complete"===S.readyState)E();else if(S.addEventListener)S.addEventListener("DOMContentLoaded",j,!1),e.addEventListener("load",E,!1);else{S.attachEvent("onreadystatechange",j),e.attachEvent("onload",E);var R=!1;try{R=!e.frameElement&&S.documentElement}catch(q){}R&&R.doScroll&&!function P(){if(!x){try{R.doScroll("left")}catch(t){return e.clearTimeout(L.readyTimeout),void(L.readyTimeout=e.setTimeout(P,50))}E()}}()}L.load=L.js=A?m:h,L.test=s,L.ready=b,L.ready(S,function(){f()&&r(T.ALL,function(e){l(e)}),L.feature&&L.feature("domloaded",!0)})}(window);var oc=oc||{};!function(e,t,n,r,o){var a="https://cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js",i="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js",c=5e3,l=500,s="oc-component",u="Href parameter missing",f="Error loading {0} component",d="Error rendering component: {0}, error: {1}",p="Failed to retrieve the component. Retrying in {0} seconds...".replace("{0}",c/1e3),h="Error loading component: view engine {0} not supported",m="Loading...",v="Component '{0}' correctly rendered",y="Unrendered component found. Trying to retrieve it...",g="undefined"!=typeof jQuery?jQuery:void 0,w=function(){},b=r.navigator.userAgent,E=!!b.match(/MSIE 8/),j=!!b.match(/MSIE 9/),x=!1,S=!1,O=[],T={error:function(e){return console.log(e)},info:function(e){return o?console.log(e):void 0}},M=function(e,t,n){var r=Math.floor(9999999999*Math.random());e.html(t.html),e.attr("id",r),e.attr("data-rendered",!0),e.attr("data-rendering",!1),e.attr("data-version",t.version),t.key&&(e.attr("data-hash",t.key),oc.setEventListeners(e)),n()};oc.ready=function(e){if(x)return e();if(S)O.push(e);else{S=!0;var n=function(e){E||j?t.load(a,e):e()},r=function(){x=!0,S=!1,e();for(var t=0;t<O.length;t++)O[t]()};g?n(r):t.load(i,function(){g=jQuery,n(r)})}},oc.render=function(t,n,r){oc.ready(function(){if(oc.components[t.key]){var o="";if("handlebars"===t.type){var a=e.template(oc.components[t.key],[]);o=a(n)}else{if("jade"!==t.type)return r(h.replace("{0}",t.type));o=oc.components[t.key](n)}r(null,o)}else r(f.replace("{0}",t.key))})},oc.renderNestedComponent=function(e,t){oc.ready(function(){var n=e.attr("data-rendering"),r=e.attr("data-rendered"),o="boolean"==typeof n?n:"true"===n,a="boolean"==typeof r?r:"true"===r;o||a?setTimeout(t,l):(T.info(y),e.attr("data-rendering",!0),e.html('<div class="oc-loading">'+m+"</div>"),oc.renderByHref(e.attr("href"),function(n,r){return!n&&r&&r.html?void M(e,r,t):T.error(n)}))})},oc.renderByHref=function(e,n){oc.ready(function(){return""===e?n(d.replace("{1}",u)):void g.ajax({url:e,headers:{Accept:"application/vnd.oc.prerendered+json"},contentType:"text/plain",crossDomain:!0,async:!0,success:function(e){if("pre-rendered"===e.renderMode)t.load([e.template.src],function(){oc.render(e.template,e.data,function(t,r){return t?n(d.replace("{0}",e.href).replace("{1}",t)):(T.info(v.replace("{0}",e.template.src)),void n(null,{html:r,key:e.template.key,version:e.version}))})});else if("rendered"===e.renderMode){T.info(v.replace("{0}",e.href));var r=e.html.slice(e.html.indexOf(">")+1),o=r.slice(0,r.lastIndexOf("<"));n(null,{html:o,version:e.version})}},error:function(){T.error(p),setTimeout(function(){oc.renderByHref(e,n)},c)}})})},oc.renderUnloadedComponents=function(){oc.ready(function(){var e=E?"div[data-oc-component=true]":s,t=g(e+"[data-rendered!=true]"),n=function(e,t){oc.renderNestedComponent(g(e[t]),function(){t++,t<e.length?n(e,t):oc.renderUnloadedComponents()})};t.length>0&&n(t,0)})},oc.setEventListeners=function(e){oc.ready(function(){e.off("reRender"),e.on("reRender",function(e,t){var n=g(e.target);return t&&""!==t&&n.attr("href",t),n.attr("data-hash",""),n.attr("data-rendered",!1),oc.renderUnloadedComponents(),!1}),e.trigger("loaded")})},oc.load=function(e,t,n){oc.ready(function(){if("function"!=typeof n&&(n=w),g(e)){g(e).html("<"+s+' href="'+t+'" />');var r=g(s,e);oc.renderNestedComponent(r,function(){n(r)})}})},oc.ready(oc.renderUnloadedComponents)}(Handlebars,head,document,window,!0),oc.clientVersion="0.10.5";
{
"name": "oc",
"version": "0.10.4",
"version": "0.10.5",
"description": "An experimental framework to develop and distribute html components",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,3 +16,3 @@ 'use strict';

handler({
var data = {
duration: parseFloat((now() - req.startTime).toFixed(3)) * 1000,

@@ -26,3 +26,9 @@ headers: req.headers,

statusCode: res.statusCode
});
};
if(!!res.errorDetails){
data.errorDetails = res.errorDetails;
}
handler(data);
};

@@ -29,0 +35,0 @@

@@ -37,3 +37,4 @@ 'use strict';

if(err){
return res.json(404, { error: 'cdn not available'});
res.errorDetails = 'cdn not available';
return res.json(404, { error: res.errorDetails });
}

@@ -57,2 +58,3 @@

if(err){
res.errorDetails = err;
return res.json(404, { err: err });

@@ -82,2 +84,3 @@ }

if(err){
res.errorDetails = err;
return res.json(404, { err: err });

@@ -93,3 +96,4 @@ }

if(!result.isValid){
return res.json(400, { error: result.errors.message });
res.errorDetails = result.errors.message;
return res.json(400, { error: res.errorDetails });
}

@@ -99,3 +103,4 @@

if(err){
return res.json(502, { error: 'component data resolving error' });
res.errorDetails = 'component data resolving error';
return res.json(502, { error: res.errorDetails });
}

@@ -180,3 +185,4 @@

if(err){
return res.json(502, { error: 'component resolving error'});
res.errorDetails = 'component resolving error';
return res.json(502, { error: res.errorDetails });
}

@@ -220,3 +226,4 @@

if(!fs.existsSync(filePath)){
return res.json(404, { err: 'file not found' });
res.errorDetails = format('File {0} not found', filePath);
return res.json(404, { err: res.errorDetails });
}

@@ -234,11 +241,14 @@

if(!req.params.componentName || !req.params.componentVersion){
return res.json(409, { error: 'malformed request'});
res.errorDetails = 'malformed request';
return res.json(409, { error: res.errorDetails });
}
if(!validator.validateVersion(req.params.componentVersion).isValid){
return res.json(409, { error: 'not a valid version' });
res.errorDetails = 'not a valid version';
return res.json(409, { error: res.errorDetails });
}
if(!validator.validatePackage(req.files).isValid){
return res.json(409, { error: 'package is not valid' });
res.errorDetails = 'package is not valid';
return res.json(409, { error: res.errorDetails });
}

@@ -255,2 +265,3 @@

if(!!err){
res.errorDetails = format('Package file is not valid: {0}', err);
return res.json(500, { error: 'package file is not valid', details: err });

@@ -263,8 +274,12 @@ }

if(err.code === 'not_allowed'){
res.errorDetails = format('Publish not allowed: {0}', err.msg);
return res.json(403, { error: err.msg });
} else if(err.code === 'already_exists'){
res.errorDetails = format('Component already exists: {0}', err.msg);
return res.json(403, { error: err.msg });
} else if(err.code === 'name_not_valid'){
res.errorDetails = format('Component name not valid: {0}', err.msg);
return res.json(409, { error: err.msg });
} else {
res.errorDetails = format('Publish failed: {0}', err.msg);
return res.json(500, { error: err.msg });

@@ -271,0 +286,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc