Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

YUI.add("handlebars-base",function(e,t){
/*!
Handlebars.js - Copyright (C) 2011 Yehuda Katz
https://raw.github.com/wycats/handlebars.js/master/LICENSE
*/
;var n=e.namespace("Handlebars");n.SafeString={},function(e){"use strict";function t(e){this.string=e}t.prototype.toString=function(){return""+this.string},e["default"]=t}(n.SafeString),n.SafeString=n.SafeString["default"],n.Utils={},function(e,t){"use strict";function s(e){return n[e]}function o(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}function l(e){return e instanceof t?e.toString():e==null?"":e?(e=""+e,i.test(e)?e.replace(r,s):e):e+""}function c(e){return!e&&e!==0?!0:f(e)&&e.length===0?!0:!1}function h(e,t){return(e?e+".":"")+t}var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=/[&<>"'`]/g,i=/[&<>"'`]/;e.extend=o;var u=Object.prototype.toString;e.toString=u;var a=function(e){return typeof e=="function"};a(/x/)&&(a=function(e){return typeof e=="function"&&u.call(e)==="[object Function]"});var a;e.isFunction=a;var f=Array.isArray||function(e){return e&&typeof e=="object"?u.call(e)==="[object Array]":!1};e.isArray=f,e.escapeExpression=l,e.isEmpty=c,e.appendContextPath=h}(n.Utils,n.SafeString),n.Exception={},function(e){"use strict";function n(e,n){var r;n&&n.firstLine&&(r=n.firstLine,e+=" - "+r+":"+n.firstColumn);var i=Error.prototype.constructor.call(this,e);for(var s=0;s<t.length;s++)this[t[s]]=i[t[s]];r&&(this.lineNumber=r,this.column=n.firstColumn)}var t=["description","fileName","lineNumber","message","name","number","stack"];n.prototype=new Error,e["default"]=n}(n.Exception),n.Exception=n.Exception["default"],function(e,t,n){"use strict";function l(e,t){this.helpers=e||{},this.partials=t||{},c(this)}function c(e){e.registerHelper("helperMissing",function(){if(arguments.length===1)return undefined;throw new n("Missing helper: '"+arguments[arguments.length-1].name+"'")}),e.registerHelper("blockHelperMissing",function(n,r){var i=r.inverse,s=r.fn;if(n===!0)return s(this);if(n===!1||n==null)return i(this);if(o(n))return n.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(n,r)):i(this);if(r.data&&r.ids){var u=d(r.data);u.contextPath=t.appendContextPath(r.data.contextPath,r.name),r={data:u}}return s(n,r)}),e.registerHelper("each",function(e,r){if(!r)throw new n("Must pass iterator to #each");var i=r.fn,s=r.inverse,a=0,f="",l,c;r.data&&r.ids&&(c=t.appendContextPath(r.data.contextPath,r.ids[0])+"."),u(e)&&(e=e.call(this)),r.data&&(l=d(r.data));if(e&&typeof e=="object")if(o(e))for(var h=e.length;a<h;a++)l&&(l.index=a,l.first=a===0,l.last=a===e.length-1,c&&(l.contextPath=c+a)),f+=i(e[a],{data:l});else for(var p in e)e.hasOwnProperty(p)&&(l&&(l.key=p,l.index=a,l.first=a===0,c&&(l.contextPath=c+p)),f+=i(e[p],{data:l}),a++);return a===0&&(f=s(this)),f}),e.registerHelper("if",function(e,n){return u(e)&&(e=e.call(this)),!n.hash.includeZero&&!e||t.isEmpty(e)?n.inverse(this):n.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,n){u(e)&&(e=e.call(this));var r=n.fn;if(!t.isEmpty(e)){if(n.data&&n.ids){var i=d(n.data);i.contextPath=t.appendContextPath(n.data.contextPath,n.ids[0]),n={data:i}}return r(e,n)}return n.inverse(this)}),e.registerHelper("log",function(t,n){var r=n.data&&n.data.level!=null?parseInt(n.data.level,10):1;e.log(r,t)}),e.registerHelper("lookup",function(e,t){return e&&e[t]})}var r="2.0.0";e.VERSION=r;var i=6;e.COMPILER_REVISION=i;var s={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};e.REVISION_CHANGES=s;var o=t.isArray,u=t.isFunction,a=t.toString,f="[object Object]";e.HandlebarsEnvironment=l,l.prototype={constructor:l,logger:h,log:p,registerHelper:function(e,r){if(a.call(e)===f){if(r)throw new n("Arg not supported with multiple helpers");t.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,n){a.call(e)===f?t.extend(this.partials,e):this.partials[e]=n},unregisterPartial:function(e){delete this.partials[e]}};var h={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(h.level<=e){var n=h.methodMap[e];typeof console!="undefined"&&console[n]&&console[n].call(console,t)}}};e.logger=h;var p=h.log;e.log=p;var d=function(e){var n=t.extend({},e);return n._parent=e,n};e.createFrame=d}(n,n.Utils,n.Exception),n.VM={},function(e,t,n,r,i,s){"use strict";function o(e){var t=e&&e[0]||1,r=i;if(t!==r){if(t<r){var o=s[r],u=s[t];throw new n("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+o+") or downgrade your runtime to an older version ("+u+").")}throw new n("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function u(e,r){if(!r)throw new n("No environment passed to template");if(!e||!e.main)throw new n("Unknown template object: "+typeof e);r.VM.checkRevision(e.compiler);var i=function(i,s,o,u,a,f,l,c,h){a&&(u=t.extend({},u,a));var p=r.VM.invokePartial.call(this,i,o,u,f,l,c,h);if(p==null&&r.compile){var d={helpers:f,partials:l,data:c,depths:h};l[o]=r.compile(i,{data:c!==undefined,compat:e.compat},r),p=l[o](u,d)}if(p!=null){if(s){var v=p.split("\n");for(var m=0,g=v.length;m<g;m++){if(!v[m]&&m+1===g)break;v[m]=s+v[m]}p=v.join("\n")}return p}throw new n("The partial "+o+" could not be compiled when running in runtime-only mode")},s={lookup:function(e,t){var n=e.length;for(var r=0;r<n;r++)if(e[r]&&e[r][t]!=null)return e[r][t]},lambda:function(e,t){return typeof e=="function"?e.call(t):e},escapeExpression:t.escapeExpression,invokePartial:i,fn:function(t){return e[t]},programs:[],program:function(e,t,n){var r=this.programs[e],i=this.fn(e);return t||n?r=a(this,e,i,t,n):r||(r=this.programs[e]=a(this,e,i)),r},data:function(
e,t){while(e&&t--)e=e._parent;return e},merge:function(e,n){var r=e||n;return e&&n&&e!==n&&(r=t.extend({},n,e)),r},noop:r.VM.noop,compilerInfo:e.compiler},o=function(t,n){n=n||{};var r=n.data;o._setup(n),!n.partial&&e.useData&&(r=c(t,r));var i;return e.useDepths&&(i=n.depths?[t].concat(n.depths):[t]),e.main.call(s,t,s.helpers,s.partials,r,i)};return o.isTop=!0,o._setup=function(t){t.partial?(s.helpers=t.helpers,s.partials=t.partials):(s.helpers=s.merge(t.helpers,r.helpers),e.usePartial&&(s.partials=s.merge(t.partials,r.partials)))},o._child=function(t,r,i){if(e.useDepths&&!i)throw new n("must pass parent depths");return a(s,t,e[t],r,i)},o}function a(e,t,n,r,i){var s=function(t,s){return s=s||{},n.call(e,t,e.helpers,e.partials,s.data||r,i&&[t].concat(i))};return s.program=t,s.depth=i?i.length:0,s}function f(e,t,r,i,s,o,u){var a={partial:!0,helpers:i,partials:s,data:o,depths:u};if(e===undefined)throw new n("The partial "+t+" could not be found");if(e instanceof Function)return e(r,a)}function l(){return""}function c(e,t){return!t||typeof t!="object"?t={root:e}:"root"in t||(t=r(t),t.root=e),t}e.checkRevision=o,e.template=u,e.program=a,e.invokePartial=f,e.noop=l}(n.VM,n.Utils,n.Exception,n.createFrame,n.COMPILER_REVISION,n.REVISION_CHANGES),n.template=n.VM.template,n.VERSION+="-yui",n.revive=n.template,e.namespace("Template").Handlebars=n},"3.18.1",{requires:[]});