diff --git a/.gitignore b/.gitignore index e2b0124843..a78d2aa6fa 100644 --- a/.gitignore +++ b/.gitignore @@ -68,4 +68,6 @@ steedos-projects/project-dev/** .npmrc .yarnrc -.rpt2_cache \ No newline at end of file +.rpt2_cache + +steedos-projects/project-template/steedos-packages/metadata-test/** \ No newline at end of file diff --git a/server/bundle/programs/server/packages/modules.js b/server/bundle/programs/server/packages/modules.js index c931265f64..9ea6a2adc5 100644 --- a/server/bundle/programs/server/packages/modules.js +++ b/server/bundle/programs/server/packages/modules.js @@ -1017,7 +1017,7 @@ module.useNode(); // module.exports = { "name": "@steedos/core", - "version": "2.2.27", + "version": "2.2.28", "main": "lib/index.js" }; @@ -1044,7 +1044,7 @@ module.useNode(); // module.exports = { "name": "@steedos/objectql", - "version": "2.2.27", + "version": "2.2.28", "main": "lib/index.js" }; @@ -1071,7 +1071,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-meteor-package-loader", - "version": "2.2.27", + "version": "2.2.28", "main": "index.js" }; @@ -1098,7 +1098,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-api", - "version": "2.2.27", + "version": "2.2.28", "main": "index.js" }; @@ -1125,7 +1125,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-metadata-server", - "version": "2.2.27", + "version": "2.2.28", "main": "index.js" }; @@ -1152,7 +1152,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-package-registry", - "version": "2.2.27", + "version": "2.2.28", "main": "package.service.js" }; @@ -1179,7 +1179,7 @@ module.useNode(); // module.exports = { "name": "@steedos/filters", - "version": "2.2.27", + "version": "2.2.28", "main": "lib/index.js" }; @@ -1206,7 +1206,7 @@ module.useNode(); // module.exports = { "name": "@steedos/i18n", - "version": "2.2.27", + "version": "2.2.28", "main": "lib/index.js" }; @@ -1233,7 +1233,7 @@ module.useNode(); // module.exports = { "name": "@steedos/auth", - "version": "2.2.27", + "version": "2.2.28", "main": "lib/index.js" }; diff --git a/server/bundle/programs/web.browser.legacy/4c44e13ff914121f464bdbe8d475bb74c53c09f3.js b/server/bundle/programs/web.browser.legacy/8f6dc578c9c220f04a76f85927b081a0bd25ff2f.js similarity index 91% rename from server/bundle/programs/web.browser.legacy/4c44e13ff914121f464bdbe8d475bb74c53c09f3.js rename to server/bundle/programs/web.browser.legacy/8f6dc578c9c220f04a76f85927b081a0bd25ff2f.js index 2ff891ac79..920df0d611 100644 --- a/server/bundle/programs/web.browser.legacy/4c44e13ff914121f464bdbe8d475bb74c53c09f3.js +++ b/server/bundle/programs/web.browser.legacy/8f6dc578c9c220f04a76f85927b081a0bd25ff2f.js @@ -95,7 +95,7 @@ https://github.com/nodeca/pako/blob/master/LICENSE * (c) The Knockout.js team - http://knockoutjs.com/ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */ -!function(t){var i=this||(0,eval)("this"),r=i.document,o=i.navigator,a=i.jQuery,s=i.JSON;a||"undefined"==typeof jQuery||(a=jQuery),function(t){"function"==typeof define&&define.amd?define(["exports","require"],t):t("object"==typeof n&&"object"==typeof e?e.exports||n:i.ko={})}((function(e,n){function c(e,t){return(null===e||typeof e in w)&&e===t}function l(e,n){var i;return function(){i||(i=p.a.setTimeout((function(){i=t,e()}),n))}}function u(e,t){var n;return function(){clearTimeout(n),n=p.a.setTimeout(e,t)}}function d(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function h(e,t){null!==t&&t.s&&t.s()}function f(e,t){var n=this.qd,i=n[E];i.ra||(this.Qb&&this.mb[t]?(n.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):i.I[t]||n.uc(t,e,i.J?{da:e}:n.$c(e)),e.Ja&&e.gd())}var p=void 0!==e?e:{},m,_,g,v,y,b;p.b=function(e,t){for(var n=e.split("."),i=p,r=0;rp.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,n){var i=[];if(e)for(var r=0,o=e.length;ri?n&&e.push(t):n||e.splice(i,1)},Ba:d,extend:n,setPrototypeOf:c,Ab:d?c:n,P:e,Ga:function(e,t,n){if(!e)return e;var i={},r;for(r in e)u.call(e,r)&&(i[r]=t.call(n,e[r],r,e));return i},Tb:function(e){for(;e.firstChild;)p.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=p.a.la(e))[0]&&e[0].ownerDocument||r).createElement("div"),n=0,i=e.length;ng?e.setAttribute("selected",t):e.selected=t},Db:function(e){return null===e||e===t?"":e.trim?e.trim():e.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return p.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!p.a.Lb(e,p.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return p.onError?function(){try{return e.apply(this,arguments)}catch(n){throw p.onError&&p.onError(n),n}}:e},setTimeout:function(e,t){return setTimeout(p.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw p.onError&&p.onError(e),e}),0)},B:function(e,t,n){var i=p.a.Ac(n);if(n=_[t],p.options.useOnlyNativeEvents||n||!a)if(n||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var r=function(t){i.call(e,t)},o="on"+t;e.attachEvent(o,r),p.a.K.za(e,(function(){e.detachEvent(o,r)}))}else e.addEventListener(t,i,!1);else y||(y="function"==typeof a(e).on?"on":"bind"),a(e)[y](t,i)},Fb:function(e,t){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var n;if(n=!("input"!==p.a.R(e)||!e.type||"click"!=t.toLowerCase())&&("checkbox"==(n=e.type)||"radio"==n),p.options.useOnlyNativeEvents||!a||n)if("function"==typeof r.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(n=r.createEvent(m[t]||"HTMLEvents")).initEvent(t,!0,!0,i,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(n)}else if(n&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+t)}else a(e).trigger(t)},f:function(e){return p.O(e)?e():e},bc:function(e){return p.O(e)?e.v():e},Eb:function(e,t,n){var i;t&&("object"==typeof e.classList?(i=e.classList[n?"add":"remove"],p.a.D(t.match(v),(function(t){i.call(e.classList,t)}))):"string"==typeof e.className.baseVal?l(e.className,"baseVal",t,n):l(e,"className",t,n))},Bb:function(e,n){var i=p.a.f(n);null!==i&&i!==t||(i="");var r=p.h.firstChild(e);!r||3!=r.nodeType||p.h.nextSibling(r)?p.h.va(e,[e.ownerDocument.createTextNode(i)]):r.data=i,p.a.Ad(e)},Yc:function(e,t){if(e.name=t,7>=g)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(r.createElement(""),!1)}catch(c){}},Ad:function(e){9<=g&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(g){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=p.a.f(e),t=p.a.f(t);for(var n=[],i=e;i<=t;i++)n.push(i);return n},la:function(e){for(var t=[],n=0,i=e.length;n",""],tbody:_,tfoot:_,tr:[2,"","
"],td:g=[3,"","
"],th:g,option:v=[1,""],optgroup:v},b=8>=p.a.W,p.a.ua=function(e,t){var n;if(a){if(a.parseHTML)n=a.parseHTML(e,t)||[];else if((n=a.clean([e],t))&&n[0]){for(var o=n[0];o.parentNode&&11!==o.parentNode.nodeType;)o=o.parentNode;o.parentNode&&o.parentNode.removeChild(o)}}else{(n=t)||(n=r);var o=n.parentWindow||n.defaultView||i,s=p.a.Db(e).toLowerCase(),c=n.createElement("div"),l;for(l=(s=s.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&y[s[1]]||m,s=l[0],l="ignored
"+l[1]+e+l[2]+"
","function"==typeof o.innerShiv?c.appendChild(o.innerShiv(l)):(b&&n.body.appendChild(c),c.innerHTML=l,b&&c.parentNode.removeChild(c));s--;)c=c.lastChild;n=p.a.la(c.lastChild.childNodes)}return n},p.a.Md=function(e,t){var n=p.a.ua(e,t);return n.length&&n[0].parentElement||p.a.Yb(n)},p.a.fc=function(e,n){if(p.a.Tb(e),null!==(n=p.a.f(n))&&n!==t)if("string"!=typeof n&&(n=n.toString()),a)a(e).html(n);else for(var i=p.a.ua(n,e.ownerDocument),r=0;re){if(5e3<=++t){c=a,p.a.Gc(Error("'Too much recursion' after processing "+t+" task groups."));break}e=a}try{n()}catch(i){p.a.Gc(i)}}}function t(){e(),c=a=o.length=0}var n,o=[],a=0,s=1,c=0;return{scheduler:n=i.MutationObserver?function(e){var t=r.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(t):r&&"onreadystatechange"in r.createElement("script")?function(e){var t=r.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,r.documentElement.removeChild(t),t=null,e()},r.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},zb:function(e){return a||p.na.scheduler(t),o[a++]=e,s++},cancel:function(e){(e-=s-a)>=c&&en[0]?s+n[0]:n[0]),s);for(var s=1===l?s:Math.min(t+(n[1]||0),s),l=t+l-2,u=Math.max(s,l),d=[],h=[],f=2;tt;t++)e=e();return e}))},p.toJSON=function(e,t,n){return e=p.ad(e),p.a.hc(e,t,n)},i.prototype={constructor:i,save:function(e,t){var n=p.a.A(this.keys,e);0<=n?this.values[n]=t:(this.keys.push(e),this.values.push(t))},get:function(e){return 0<=(e=p.a.A(this.keys,e))?this.values[e]:t}}}(),p.b("toJS",p.ad),p.b("toJSON",p.toJSON),p.Wd=function(e,t,n){function i(t){var i=p.xb(e,n).extend({ma:"always"}),r=i.subscribe((function(e){e&&(r.s(),t(e))}));return i.notifySubscribers(i.v()),r}return"function"!=typeof Promise||t?i(t.bind(n)):new Promise(i)},p.b("when",p.Wd),p.w={M:function(e){switch(p.a.R(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?p.a.g.get(e,p.c.options.$b):7>=p.a.W?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?p.w.M(e.options[e.selectedIndex]):t;default:return e.value}},cb:function(e,n,i){switch(p.a.R(e)){case"option":"string"==typeof n?(p.a.g.set(e,p.c.options.$b,t),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=n):(p.a.g.set(e,p.c.options.$b,n),e.__ko__hasDomDataOptionValue__=!0,e.value="number"==typeof n?n:"");break;case"select":""!==n&&null!==n||(n=t);for(var r=-1,o=0,a=e.options.length,s;o=c){t.push(a&&s.length?{key:a,value:s.join("")}:{unknown:a||s.join("")}),a=c=0,s=[];continue}}else if(58===d){if(!c&&!a&&1===s.length){a=s.pop();continue}}else{if(47===d&&1arguments.length){if(!(t=r.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!t||1!==t.nodeType&&8!==t.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");h(_(e,n),t)},p.Dc=function(e){return!e||1!==e.nodeType&&8!==e.nodeType?t:p.Td(e)},p.Ec=function(e){return(e=p.Dc(e))?e.$data:t},p.b("bindingHandlers",p.c),p.b("bindingEvent",p.i),p.b("bindingEvent.subscribe",p.i.subscribe),p.b("bindingEvent.startPossiblyAsyncContentBinding",p.i.Cb),p.b("applyBindings",p.vc),p.b("applyBindingsToDescendants",p.Oa),p.b("applyBindingAccessorsToNode",p.ib),p.b("applyBindingsToNode",p.ld),p.b("contextFor",p.Dc),p.b("dataFor",p.Ec)}(),function(e){function t(t,i){var a=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e,s;a?a.subscribe(i):((a=r[t]=new p.T).subscribe(i),n(t,(function(e,n){var i=!(!n||!n.synchronous);o[t]={definition:e,Gd:i},delete r[t],s||i?a.notifySubscribers(e):p.na.zb((function(){a.notifySubscribers(e)}))})),s=!0)}function n(e,t){i("getConfig",[e],(function(n){n?i("loadComponent",[e,n],(function(e){t(e,n)})):t(null,null)}))}function i(t,n,r,o){o||(o=p.j.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var c=!1;if(s.apply(a,n.concat((function(e){c?r(null):null!==e?r(e):i(t,n,r,o)})))!==e&&(c=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else i(t,n,r,o)}else r(null)}var r={},o={};p.j={get:function(n,i){var r=Object.prototype.hasOwnProperty.call(o,n)?o[n]:e;r?r.Gd?p.u.G((function(){i(r.definition)})):p.na.zb((function(){i(r.definition)})):t(n,i)},Bc:function(e){delete o[e]},oc:i},p.j.loaders=[],p.b("components",p.j),p.b("components.get",p.j.get),p.b("components.clearCachedDefinition",p.j.Bc)}(),function(){function e(e,t,n,i){function r(){0==--a&&i(o)}var o={},a=2,c=n.template;n=n.viewModel,c?s(t,c,(function(t){p.j.oc("loadTemplate",[e,t],(function(e){o.template=e,r()}))})):r(),n?s(t,n,(function(t){p.j.oc("loadViewModel",[e,t],(function(e){o[u]=e,r()}))})):r()}function t(e,n,i){if("function"==typeof n)i((function(e){return new n(e)}));else if("function"==typeof n[u])i(n[u]);else if("instance"in n){var r=n.instance;i((function(){return r}))}else"viewModel"in n?t(e,n.viewModel,i):e("Unknown viewModel value: "+n)}function o(e){switch(p.a.R(e)){case"script":return p.a.ua(e.text);case"textarea":return p.a.ua(e.value);case"template":if(a(e.content))return p.a.Ca(e.content.childNodes)}return p.a.Ca(e.childNodes)}function a(e){return i.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function s(e,t,r){"string"==typeof t.require?n||i.require?(n||i.require)([t.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),r(e)})):e("Uses require, but no AMD loader is present"):r(t)}function c(e){return function(t){throw Error("Component '"+e+"': "+t)}}var l={};p.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(p.j.tb(e))throw Error("Component "+e+" is already registered");l[e]=t},p.j.tb=function(e){return Object.prototype.hasOwnProperty.call(l,e)},p.j.unregister=function(e){delete l[e],p.j.Bc(e)},p.j.Fc={getConfig:function(e,t){t(p.j.tb(e)?l[e]:null)},loadComponent:function(t,n,i){var r=c(t);s(r,n,(function(n){e(t,r,n,i)}))},loadTemplate:function(e,t,n){if(e=c(e),"string"==typeof t)n(p.a.ua(t));else if(t instanceof Array)n(t);else if(a(t))n(p.a.la(t.childNodes));else if(t.element)if(t=t.element,i.HTMLElement?t instanceof HTMLElement:t&&t.tagName&&1===t.nodeType)n(o(t));else if("string"==typeof t){var s=r.getElementById(t);s?n(o(s)):e("Cannot find element with ID "+t)}else e("Unknown element type: "+t);else e("Unknown template value: "+t)},loadViewModel:function(e,n,i){t(c(e),n,i)}};var u="createViewModel";p.b("components.register",p.j.register),p.b("components.isRegistered",p.j.tb),p.b("components.unregister",p.j.unregister),p.b("components.defaultLoader",p.j.Fc),p.j.loaders.push(p.j.Fc),p.j.dd=l}(),function(){function e(e,n){var i;if(i=e.getAttribute("params")){var i=t.parseBindingsString(i,n,e,{valueAccessors:!0,bindingParams:!0}),i=p.a.Ga(i,(function(t){return p.o(t,null,{l:e})})),r=p.a.Ga(i,(function(t){var n=t.v();return t.ja()?p.o({read:function(){return p.a.f(t())},write:p.Za(n)&&function(e){t()(e)},l:e}):n}));return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=i),r}return{$raw:{}}}p.j.getComponentNameForNode=function(e){var t=p.a.R(e);if(p.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=p.a.W&&e.tagName===t))return t},p.j.tc=function(t,n,i,r){if(1===n.nodeType){var o=p.j.getComponentNameForNode(n);if(o){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(n,i)};t.component=r?function(){return a}:a}}return t};var t=new p.ga;9>p.a.W&&(p.j.register=function(e){return function(t){return e.apply(this,arguments)}}(p.j.register),r.createDocumentFragment=function(e){return function(){var t=e(),n=p.j.dd,i;for(i in n);return t}}(r.createDocumentFragment))}(),function(){function e(e,t,n){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=p.a.Ca(t),p.h.va(n,e)}function t(e,t,n){var i=e.createViewModel;return i?i.call(e,t,n):t}var n=0;p.c.component={init:function(i,r,o,a,s){function c(){var e=l&&l.dispose;"function"==typeof e&&e.call(l),d&&d.s(),u=l=d=null}var l,u,d,h=p.a.la(p.h.childNodes(i));return p.h.Ea(i),p.a.K.za(i,c),p.o((function(){var o=p.a.f(r()),a,f;if("string"==typeof o?a=o:(a=p.a.f(o.name),f=p.a.f(o.params)),!a)throw Error("No component name specified");var m=p.i.Cb(i,s),_=u=++n;p.j.get(a,(function(n){if(u===_){if(c(),!n)throw Error("Unknown component '"+a+"'");e(a,n,i);var r=t(n,f,{element:i,templateNodes:h});n=m.createChildContext(r,{extend:function(e){e.$component=r,e.$componentTemplateNodes=h}}),r&&r.koDescendantsComplete&&(d=p.i.subscribe(i,p.i.pa,r.koDescendantsComplete,r)),l=r,p.Oa(n,i)}}))}),null,{l:i}),{controlsDescendantBindings:!0}}},p.h.ea.component=!0}();var B={class:"className",for:"htmlFor"};p.c.attr={update:function(e,n){var i=p.a.f(n())||{};p.a.P(i,(function(n,i){i=p.a.f(i);var r=n.indexOf(":"),r="lookupNamespaceURI"in e&&0=p.a.W&&n in B?(n=B[n],o?e.removeAttribute(n):e[n]=i):o||(r?e.setAttributeNS(r,n,i):e.setAttribute(n,i)),"name"===n&&p.a.Yc(e,o?"":i)}))}},p.c.checked={after:["value","attr"],init:function(e,n,i){function r(){var r=e.checked,o=a();if(!p.S.Ya()&&(r||!c&&!p.S.qa())){var l=p.u.G(n);if(u){var h=d?l.v():l,m=f;f=o,m!==o?r&&(p.a.Na(h,o,!0),p.a.Na(h,m,!1)):p.a.Na(h,o,r),d&&p.Za(l)&&l(h)}else s&&(o===t?o=r:r||(o=t)),p.m.eb(l,i,"checked",o,!0)}}function o(){var i=p.a.f(n()),r=a();u?(e.checked=0<=p.a.A(i,r),f=r):e.checked=s&&r===t?!!i:a()===i}var a=p.xb((function(){return i.has("checkedValue")?p.a.f(i.get("checkedValue")):h?i.has("value")?p.a.f(i.get("value")):e.value:void 0})),s="checkbox"==e.type,c="radio"==e.type;if(s||c){var l=n(),u=s&&p.a.f(l)instanceof Array,d=!(u&&l.push&&l.splice),h=c||u,f=u?a():t;c&&!e.name&&p.c.uniqueName.init(e,(function(){return!0})),p.o(r,null,{l:e}),p.a.B(e,"click",r),p.o(o,null,{l:e}),l=t}}},p.m.wa.checked=!0,p.c.checkedValue={update:function(e,t){e.value=p.a.f(t())}},p.c.class={update:function(e,t){var n=p.a.Db(p.a.f(t()));p.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=n,p.a.Eb(e,n,!0)}},p.c.css={update:function(e,t){var n=p.a.f(t());null!==n&&"object"==typeof n?p.a.P(n,(function(t,n){n=p.a.f(n),p.a.Eb(e,t,n)})):p.c.class.update(e,t)}},p.c.enable={update:function(e,t){var n=p.a.f(t());n&&e.disabled?e.removeAttribute("disabled"):n||e.disabled||(e.disabled=!0)}},p.c.disable={update:function(e,t){p.c.enable.update(e,(function(){return!p.a.f(t())}))}},p.c.event={init:function(e,t,n,i,r){var o=t()||{};p.a.P(o,(function(o){"string"==typeof o&&p.a.B(e,o,(function(e){var a,s=t()[o];if(s){try{var c=p.a.la(arguments);i=r.$data,c.unshift(i),a=s.apply(i,c)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===n.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},p.c.foreach={Rc:function(e){return function(){var t=e(),n=p.a.bc(t);return n&&"number"!=typeof n.length?(p.a.f(t),{foreach:n.data,as:n.as,noChildContext:n.noChildContext,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:p.ba.Ma}):{foreach:t,templateEngine:p.ba.Ma}}},init:function(e,t){return p.c.template.init(e,p.c.foreach.Rc(t))},update:function(e,t,n,i,r){return p.c.template.update(e,p.c.foreach.Rc(t),n,i,r)}},p.m.Ra.foreach=!1,p.h.ea.foreach=!0,p.c.hasfocus={init:function(e,t,n){function i(i){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch(a){o=r.body}i=o===e}r=t(),p.m.eb(r,n,"hasfocus",i,!0),e.__ko_hasfocusLastValue=i,e.__ko_hasfocusUpdating=!1}var r=i.bind(null,!0),o=i.bind(null,!1);p.a.B(e,"focus",r),p.a.B(e,"focusin",r),p.a.B(e,"blur",o),p.a.B(e,"focusout",o),e.__ko_hasfocusLastValue=!1},update:function(e,t){var n=!!p.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===n||(n?e.focus():e.blur(),!n&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),p.u.G(p.a.Fb,null,[e,n?"focusin":"focusout"]))}},p.m.wa.hasfocus=!0,p.c.hasFocus=p.c.hasfocus,p.m.wa.hasFocus="hasfocus",p.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){p.a.fc(e,t())}},function(){function e(e,t,n){p.c[e]={init:function(e,i,r,o,a){var s,c,l={},u,d,h;if(t){o=r.get("as");var f=r.get("noChildContext");l={as:o,noChildContext:f,exportDependencies:h=!(o&&f)}}return d=(u="render"==r.get("completeOn"))||r.has(p.i.pa),p.o((function(){var r=p.a.f(i()),o=!n!=!r,f=!c,m;(h||o!==s)&&(d&&(a=p.i.Cb(e,a)),o&&(t&&!h||(l.dataDependency=p.S.o()),m=t?a.createChildContext("function"==typeof r?r:i,l):p.S.qa()?a.extend(null,l):a),f&&p.S.qa()&&(c=p.a.Ca(p.h.childNodes(e),!0)),o?(f||p.h.va(e,p.a.Ca(c)),p.Oa(m,e)):(p.h.Ea(e),u||p.i.ma(e,p.i.H)),s=o)}),null,{l:e}),{controlsDescendantBindings:!0}}},p.m.Ra[e]=!1,p.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),p.c.let={init:function(e,t,n,i,r){return t=r.extend(t),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.let=!0;var O={};p.c.options={init:function(e){if("select"!==p.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0s)var l=p.a.g.Z(),u=p.a.g.Z(),d=function(e){var t=this.activeElement;(t=t&&p.a.g.get(t,u))&&t(e)},h=function(e,t){var n=e.ownerDocument;p.a.g.get(n,l)||(p.a.g.set(n,l,!0),p.a.B(n,"selectionchange",d)),p.a.g.set(e,u,t)};p.c.textInput={init:function(e,n,i){function l(t,n){p.a.B(e,t,n)}function u(){var i=p.a.f(n());null!==i&&i!==t||(i=""),g!==t&&i===g?p.a.setTimeout(u,4):e.value!==i&&(y=!0,e.value=i,y=!1,m=e.value)}function d(){_||(g=e.value,_=p.a.setTimeout(f,4))}function f(){clearTimeout(_),g=_=t;var r=e.value;m!==r&&(m=r,p.m.eb(n(),i,"textInput",r))}var m=e.value,_,g,v=9==p.a.W?d:f,y=!1;s&&l("keypress",f),11>s&&l("propertychange",(function(e){y||"value"!==e.propertyName||v(e)})),8==s&&(l("keyup",f),l("keydown",f)),h&&(h(e,v),l("dragend",d)),(!s||9<=s)&&l("input",v),5>o&&"textarea"===p.a.R(e)?(l("keydown",d),l("paste",d),l("cut",d)):11>r?l("keydown",d):4>a?(l("DOMAutoComplete",f),l("dragdrop",f),l("drop",f)):c&&"number"===e.type&&l("keydown",d),l("change",f),l("blur",f),p.o(u,null,{l:e})}},p.m.wa.textInput=!0,p.c.textinput={preprocess:function(e,t,n){n("textInput",e)}}}(),p.c.uniqueName={init:function(e,t){if(t()){var n="ko_unique_"+ ++p.c.uniqueName.rd;p.a.Yc(e,n)}}},p.c.uniqueName.rd=0,p.c.using={init:function(e,t,n,i,r){var o;return n.has("as")&&(o={as:n.get("as"),noChildContext:n.get("noChildContext")}),t=r.createChildContext(t,o),p.Oa(t,e),{controlsDescendantBindings:!0}}},p.h.ea.using=!0,p.c.value={init:function(e,n,i){var r=p.a.R(e),o="input"==r;if(!o||"checkbox"!=e.type&&"radio"!=e.type){var a=[],s=i.get("valueUpdate"),c=!1,l=null;s&&(a="string"==typeof s?[s]:p.a.wc(s),p.a.Pa(a,"change"));var u=function(){l=null,c=!1;var t=n(),r=p.w.M(e);p.m.eb(t,i,"value",r)},d,h;!p.a.W||!o||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=p.a.A(a,"propertychange")||(p.a.B(e,"propertychange",(function(){c=!0})),p.a.B(e,"focus",(function(){c=!1})),p.a.B(e,"blur",(function(){c&&u()}))),p.a.D(a,(function(t){var n=u;p.a.Ud(t,"after")&&(n=function(){l=p.w.M(e),p.a.setTimeout(u,0)},t=t.substring(5)),p.a.B(e,t,n)})),d=o&&"file"==e.type?function(){var i=p.a.f(n());null===i||i===t||""===i?e.value="":p.u.G(u)}:function(){var o=p.a.f(n()),a=p.w.M(e);null!==l&&o===l?p.a.setTimeout(d,0):o===a&&a!==t||("select"===r?(a=i.get("valueAllowUnset"),p.w.cb(e,o,a),a||o===p.w.M(e)||p.u.G(u)):p.w.cb(e,o))},"select"===r?p.i.subscribe(e,p.i.H,(function(){h?i.get("valueAllowUnset")?d():u():(p.a.B(e,"change",u),h=p.o(d,null,{l:e}))}),null,{notifyImmediately:!0}):(p.a.B(e,"change",u),p.o(d,null,{l:e}))}else p.ib(e,{checkedValue:n})},update:function(){}},p.m.wa.value=!0,p.c.visible={update:function(e,t){var n=p.a.f(t()),i="none"!=e.style.display;n&&!i?e.style.display="":!n&&i&&(e.style.display="none")}},p.c.hidden={update:function(e,t){p.c.visible.update(e,(function(){return!p.a.f(t())}))}},function(e){p.c[e]={init:function(t,n,i,r,o){return p.c.event.init.call(this,t,(function(){var t={};return t[e]=n(),t}),i,r,o)}}}("click"),p.ca=function(){},p.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},p.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},p.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||r).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new p.C.F(n)}if(1==e.nodeType||8==e.nodeType)return new p.C.ia(e);throw Error("Unknown template type: "+e)},p.ca.prototype.renderTemplate=function(e,t,n,i){return e=this.makeTemplateSource(e,i),this.renderTemplateSource(e,t,n,i)},p.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},p.ca.prototype.rewriteTemplate=function(e,t,n){t=t((e=this.makeTemplateSource(e,n)).text()),e.text(t),e.data("isRewritten",!0)},p.b("templateEngine",p.ca),p.kc=function(){function e(e,t,n,i){e=p.m.ac(e);for(var r=p.m.Ra,o=0;o]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,n){t.isTemplateRewritten(e,n)||t.rewriteTemplate(e,(function(e){return p.kc.Ld(e,t)}),n)},Ld:function(i,r){return i.replace(t,(function(t,n,i,o,a){return e(a,n,i,r)})).replace(n,(function(t,n){return e(n,"\x3c!-- ko --\x3e","#comment",r)}))},md:function(e,t){return p.aa.Xb((function(n,i){var r=n.nextSibling;r&&r.nodeName.toLowerCase()===t&&p.ib(r,e,i)}))}}}(),p.b("__tr_ambtns",p.kc.md),function(){p.C={},p.C.F=function(e){if(this.F=e){var t=p.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},p.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?p.a.fc(this.F,t):this.F[e]=t};var e=p.a.g.Z()+"_";p.C.F.prototype.data=function(t){if(1===arguments.length)return p.a.g.get(this.F,e+t);p.a.g.set(this.F,e+t,arguments[1])};var n=p.a.g.Z();p.C.F.prototype.nodes=function(){var e=this.F;if(0==arguments.length){var i=p.a.g.get(e,n)||{},r=i.lb||(3===this.ab?e.content:4===this.ab?e:t);if(!r||i.jd){var o=this.text();o&&o!==i.bb&&(r=p.a.Md(o,e.ownerDocument),p.a.g.set(e,n,{lb:r,bb:o,jd:!0}))}return r}i=arguments[0],this.ab!==t&&this.text(""),p.a.g.set(e,n,{lb:i})},p.C.ia=function(e){this.F=e},p.C.ia.prototype=new p.C.F,p.C.ia.prototype.constructor=p.C.ia,p.C.ia.prototype.text=function(){if(0==arguments.length){var e=p.a.g.get(this.F,n)||{};return e.bb===t&&e.lb&&(e.bb=e.lb.innerHTML),e.bb}p.a.g.set(this.F,n,{bb:arguments[0]})},p.b("templateSources",p.C),p.b("templateSources.domElement",p.C.F),p.b("templateSources.anonymousTemplate",p.C.ia)}(),function(){function e(e,t,n){var i;for(t=p.h.nextSibling(t);e&&(i=e)!==t;)n(i,e=p.h.nextSibling(i))}function n(t,n){if(t.length){var i=t[0],r=t[t.length-1],o=i.parentNode,a=p.ga.instance,s=a.preprocessNode;if(s){if(e(i,r,(function(e,t){var n=e.previousSibling,o=s.call(a,e);o&&(e===i&&(i=o[0]||t),e===r&&(r=o[o.length-1]||n))})),t.length=0,!i)return;i===r?t.push(i):(t.push(i,r),p.a.Ua(t,o))}e(i,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.vc(n,e)})),e(i,r,(function(e){1!==e.nodeType&&8!==e.nodeType||p.aa.cd(e,[n])})),p.a.Ua(t,o)}}function i(e){return e.nodeType?e:0p.a.W||!e.nodes?null:e.nodes())?p.a.la(t.cloneNode(!0).childNodes):(e=e.text(),p.a.ua(e,i))},p.ba.Ma=new p.ba,p.gc(p.ba.Ma),p.b("nativeTemplateEngine",p.ba),function(){p.$a=function(){var e=this.Hd=function(){if(!a||!a.tmpl)return 0;try{if(0<=a.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,n,i,o){if(o=o||r,i=i||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=a.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=a.extend({koBindingContext:n},i.templateOptions),(n=a.tmpl(s,t,n)).appendTo(o.createElement("div")),a.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){r.write("