diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..e4f9be68 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,9 @@ +{ + "name": "iCub Firmware Models Documentation", + "build": { + "dockerfile": "../.gitpod.Dockerfile" + }, + "extensions": [], + "forwardPorts": [8000], + "remoteUser": "gitpod" +} diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..1bbc5094 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,57 @@ +name: GitHub Pages + +on: + push: + branches: + - docs + workflow_dispatch: + repository_dispatch: + types: [build_documentation] + +concurrency: + group: publish_gh_pages + cancel-in-progress: true + +jobs: + docs: + name: "Deploy" + runs-on: ubuntu-latest + + steps: + - name: Checkout docs + uses: actions/checkout@main + with: + ref: 'docs' + + - name: Dependencies + run: | + sudo apt update + sudo apt install -y python3-wheel python3-setuptools + pip install --upgrade Jinja2 + pip install --user mkdocs + pip install --user $(mkdocs get-deps) + pip install --upgrade pygments + echo "${HOME}/.local/bin" >> ${GITHUB_PATH} + + - name: Configure Git + run: | + git config --global push.default upstream + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git + + - name: Build Mkdocs + run: | + mkdocs build + + - name: Create and prepare gh-pages anew + run: | + git checkout --orphan gh-pages + rm -R `ls -A | grep -v -E "^(.git|site)$"` + mv site/* ./ + + - name: Commit and push + run: | + git add . + git commit -m "publish site" + git push --force --set-upstream origin gh-pages \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..6dcdea2b --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +site +*~ +~* +build* +*.slxc +*.autosave +*.mexw64 +*.mexa64 +slprj* +*.zip +*_ert_rtw +cache* +codegen* diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 00000000..141bbd16 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:latest +LABEL org.opencontainers.image.authors="Ugo Pattacini " + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && \ + apt install -y sudo apt-utils bash-completion wget ruby git \ + python3 python3-pip python3-setuptools python3-wheel + +RUN pip install mkdocs && \ + wget https://raw.githubusercontent.com/robotology/icub-firmware-models/docs/mkdocs.yml && \ + pip install $(mkdocs get-deps) && \ + rm mkdocs.yml + +RUN gem install yaml + +RUN rm -Rf /var/lib/apt/lists/* + +RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod && \ + sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers + +EXPOSE 8000 + +WORKDIR /workspace +CMD ["bash"] diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 00000000..e201b7c8 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,5 @@ +image: + file: .gitpod.Dockerfile +ports: +- port: 8000 + onOpen: notify diff --git a/README.md b/README.md new file mode 100644 index 00000000..14eac42c --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +iCub Firmware Models +==================== + +This repository hosts all the models underlying the iCub Firmware. diff --git a/docs/assets/head-solid.png b/docs/assets/head-solid.png new file mode 100644 index 00000000..8a1c6dd2 Binary files /dev/null and b/docs/assets/head-solid.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..0a816979 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,5 @@ +# Welcome to the iCub Firmware Models +This documentation contains a guide to the Simulink models we used to generate the firmware running +onboard the iCub robot. + +#### [:zap:{.blink} Documentation resources for the `AMCBLDC` firmware](models/boards/amcbldc/webview.html){target=_blank}. diff --git a/docs/javascripts/config.js b/docs/javascripts/config.js new file mode 100644 index 00000000..73e99721 --- /dev/null +++ b/docs/javascripts/config.js @@ -0,0 +1,17 @@ +window.MathJax = { + tex: { + inlineMath: [["\\(", "\\)"]], + displayMath: [["\\[", "\\]"]], + processEscapes: true, + processEnvironments: true + }, + options: { + ignoreHtmlClass: ".*|", + processHtmlClass: "arithmatex" + } + }; + + document$.subscribe(() => { + MathJax.typesetPromise() + }) + \ No newline at end of file diff --git a/docs/models/boards/amcbldc/stylesheets/combined.css b/docs/models/boards/amcbldc/stylesheets/combined.css new file mode 100644 index 00000000..e69de29b diff --git a/docs/models/boards/amcbldc/support/lib/bundle.main.js b/docs/models/boards/amcbldc/support/lib/bundle.main.js new file mode 100644 index 00000000..795f8510 --- /dev/null +++ b/docs/models/boards/amcbldc/support/lib/bundle.main.js @@ -0,0 +1,666 @@ +(function(A){function I(u){for(var r=u[0],i=u[1],n,e,s=0,c=[];s=0;--z)P=U[z].prototype,P.hasOwnProperty("declaredClass")||(P.declaredClass="uniqName_"+i++),$=P.declaredClass,K.hasOwnProperty($)||(K[$]={count:0,refs:[],cls:U[z]},++H),X=K[$],W&&W!==X&&(X.refs.push(W),++W.count),W=X;++W.count,L[0].refs.push(W)}for(;L.length;){for(W=L.pop(),w.push(W.cls),--H;J=W.refs,J.length==1;){if(W=J[0],!W||--W.count){W=0;break}w.push(W.cls),--H}if(W)for(j=0,Y=J.length;j=0;--Y)H=b[Y],j=H._meta,H=j?j.ctor:H,H&&H.apply(this,U?U[Y]:w);H=this.postscript,H&&H.apply(this,L)}}function R(b,M){return function(){var w=arguments,L=w,K=w[0],H;if(!(this instanceof w.callee))return F(w);M&&(K&&(H=K.preamble,H&&(L=H.apply(this,L)||L)),H=this.preamble,H&&H.apply(this,L)),b&&b.apply(this,w),H=this.postscript,H&&H.apply(this,w)}}function B(b){return function(){var M=arguments,w=0,L,K;if(!(this instanceof M.callee))return F(M);for(;L=b[w];++w)if(K=L._meta,L=K?K.ctor:L,L){L.apply(this,M);break}L=this.postscript,L&&L.apply(this,M)}}function T(b,M,w){return function(){var L,K,H,Y=0,j=1;for(w&&(Y=M.length-1,j=-1);L=M[Y];Y+=j)K=L._meta,H=(K?K.hidden:L.prototype)[b],H&&H.apply(this,arguments)}}function N(b){r.prototype=b.prototype;var M=new r;return r.prototype=null,M}function F(b){var M=b.callee,w=N(M);return M.apply(w,b),w}function O(b,M,w){typeof b!="string"&&(w=M,M=b,b=""),w=w||{};var L,K,H,Y,j,z,U,_=1,W=M;if(u.call(M)=="[object Array]"?(z=s(M,b),H=z[0],_=z.length-H,M=z[_]):(z=[0],M?u.call(M)=="[object Function]"?(H=M._meta,z=z.concat(H?H.bases:M)):e("base class is not a callable constructor.",b):M!==null&&e("unknown base class. Did you use dojo.require to pull it in?",b)),M)for(K=_-1;L=N(M),!!K;--K)H=z[K],(H._meta?o:g)(L,H.prototype),a("csp-restrictions")?Y=function(){}:Y=new Function,Y.superclass=M,Y.prototype=L,M=L.constructor=Y;else L={};for(O.safeMixin(L,w),H=w.constructor,H!==l.constructor&&(H.nom=n,L.constructor=H),K=_-1;K;--K)H=z[K]._meta,H&&H.chains&&(U=g(U||{},H.chains));if(L["-chains-"]&&(U=g(U||{},L["-chains-"])),M&&M.prototype&&M.prototype["-chains-"]&&(U=g(U||{},M.prototype["-chains-"])),H=!U||!U.hasOwnProperty(n),z[0]=Y=U&&U.constructor==="manual"?B(z):z.length==1?R(w.constructor,H):S(z,H),Y._meta={bases:z,hidden:w,chains:U,parents:W,ctor:w.constructor},Y.superclass=M&&M.prototype,Y.extend=f,Y.createSubclass=C,Y.prototype=L,L.constructor=Y,L.getInherited=d,L.isInstanceOf=p,L.inherited=D,L.__inherited=c,b&&(L.declaredClass=b,h.setObject(b,Y)),U)for(j in U)L[j]&&typeof U[j]=="string"&&j!=n&&(H=L[j]=T(j,z,U[j]==="after"),H.nom=j);return Y}return v.safeMixin=O.safeMixin=m,v.declare=O,O},A,I),A.exports=x},function(A,I,t){var y,x;y=[t(3),t(5),t(9)],x=t.dj.d(y,function(v,a){a.add("bug-for-in-skips-shadowed",function(){for(var e in{toString:1})return 0;return 1});var h=a("bug-for-in-skips-shadowed")?"hasOwnProperty.valueOf.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.constructor".split("."):[],g=h.length,l=function(e,s,c){c||(e[0]&&v.scopeMap[e[0]]?c=v.scopeMap[e.shift()][1]:c=v.global);try{for(var d=0;d2)return n._hitchArgs.apply(v,arguments);if(s||(s=e,e=null),n.isString(s)){if(e=e||v.global,!e[s])throw['lang.hitch: scope["',s,'"] is null (scope="',e,'")'].join("");return function(){return e[s].apply(e,arguments||[])}}return e?function(){return s.apply(e,arguments||[])}:s},delegate:function(){function e(){}return function(s,c){e.prototype=s;var d=new e;return e.prototype=null,c&&n._mixin(d,c),d}}(),_toArray:a("ie")?function(){function e(s,c,d){for(var E=d||[],D=c||0;D0)return n.lastIndexOf(E,D,p);var m=E&&E.length||0,f=e?m+d:c,C;for(p===l?C=e?c:m+d:p<0?(C=m+p,C<0&&(C=c)):C=p>=m?m+d:p,m&&typeof E=="string"&&(E=E.split(""));C!=f;C+=s)if(E[C]==D)return C;return-1}}var n={every:r(!1),some:r(!0),indexOf:i(!0),lastIndexOf:i(!1),forEach:function(e,s,c){var d=0,E=e&&e.length||0;if(E&&typeof e=="string"&&(e=e.split("")),typeof s=="string"){if(a("csp-restrictions"))throw new TypeError("callback must be a function");s=g[s]||u(s)}if(c)for(;d-1&&(L=F.split(/\s*,\s*/)),L){for(var K=[],H=0,Y;Y=L[H++];)K.push(l.parse(N,Y,O,b,M,w));return K.remove=function(){for(var j=0;j0||window.navigator.msMaxTouchPoints),g.add("touch-events","ontouchstart"in document),g.add("pointer-events","pointerEnabled"in window.navigator?window.navigator.pointerEnabled:"PointerEvent"in window),g.add("MSPointer",window.navigator.msPointerEnabled),g.add("touch-action",g("touch")&&g("pointer-events")),g.add("device-width",screen.availWidth||innerWidth);var n=document.createElement("form");g.add("dom-attributes-explicit",n.attributes.length==0),g.add("dom-attributes-specified-flag",n.attributes.length>0&&n.attributes.length<40)}return g.clearElement=function(e){return e.innerHTML="",e},g.normalize=function(e,s){var c=e.match(/[\?:]|[^:\?]*/g),d=0,E=function(D){var p=c[d++];return p==":"?0:c[d++]=="?"?!D&&g(p)?E():(E(!0),E(D)):p||0};return e=E(),e&&s(e)},g.load=function(e,s,c){e?s([e],c):c()},g},A,I),A.exports=x},function(A,I,t){var y,x;y=[t(9),t(7),t(13)],x=t.dj.d(y,function(v,a,h){var g,l={};v("webkit")?g=function(D){var p;if(D.nodeType==1){var o=D.ownerDocument.defaultView;p=o.getComputedStyle(D,null),!p&&D.style&&(D.style.display="",p=o.getComputedStyle(D,null))}return p||{}}:v("ie")&&(v("ie")<9||v("quirks"))?g=function(D){return D.nodeType==1&&D.currentStyle?D.currentStyle:{}}:g=function(D){if(D.nodeType===1){var p=D.ownerDocument.defaultView,o=p.opener?p:h.global.window;return o.getComputedStyle(D,null)||{}}return{}},l.getComputedStyle=g;var u;v("ie")?u=function(D,p){if(!p)return 0;if(p=="medium")return 4;if(p.slice&&p.slice(-2)=="px")return parseFloat(p);var o=D.style,m=D.runtimeStyle,f=D.currentStyle,C=o.left,S=m.left;m.left=f.left;try{o.left=p,p=o.pixelLeft}catch(R){p=0}return o.left=C,m.left=S,p}:u=function(D,p){return parseFloat(p)||0},l.toPixelValue=u;var r="DXImageTransform.Microsoft.Alpha",i=function(D,p){try{return D.filters.item(r)}catch(o){return p?{}:null}},n=v("ie")<9||v("ie")<10&&v("quirks")?function(D){try{return i(D).Opacity/100}catch(p){return 1}}:function(D){return g(D).opacity},e=v("ie")<9||v("ie")<10&&v("quirks")?function(D,p){p===""&&(p=1);var o=p*100,m=p===1;if(m?(D.style.zoom="",i(D)&&(D.style.filter=D.style.filter.replace(new RegExp("\\s*progid:"+r+"\\([^\\)]+?\\)","i"),""))):(D.style.zoom=1,i(D)?i(D,1).Opacity=o:D.style.filter+=" progid:"+r+"(Opacity="+o+")",i(D,1).Enabled=!0),D.tagName.toLowerCase()=="tr")for(var f=D.firstChild;f;f=f.nextSibling)f.tagName.toLowerCase()=="td"&&e(f,p);return p}:function(D,p){return D.style.opacity=p},s={left:!0,top:!0},c=/margin|padding|width|height|max|min|offset/;function d(D,p,o){if(p=p.toLowerCase(),o=="auto"){if(p=="height")return D.offsetHeight;if(p=="width")return D.offsetWidth}if(p=="fontweight")switch(o){case 700:return"bold";case 400:default:return"normal"}return p in s||(s[p]=c.test(p)),s[p]?u(D,o):o}var E={cssFloat:1,styleFloat:1,float:1};return l.get=function(p,o){var m=a.byId(p),f=arguments.length,C=o=="opacity";if(f==2&&C)return n(m);o=E[o]?"cssFloat"in m.style?"cssFloat":"styleFloat":o;var S=l.getComputedStyle(m);return f==1?S:d(m,o,S[o]||m.style[o])},l.set=function(p,o,m){var f=a.byId(p),C=arguments.length,S=o=="opacity";if(o=E[o]?"cssFloat"in f.style?"cssFloat":"styleFloat":o,C==3)return S?e(f,m):f.style[o]=m;for(var R in o)l.set(p,R,o[R]);return l.getComputedStyle(f)},l},A,I),A.exports=x},function(A,I,t){var y,x;y=[t(9),t(13),t(3)],x=t.dj.d(y,function(v,a,h){if(v("ie")<=7)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(r){}var g={};v("ie")?g.byId=function(r,i){if(typeof r!="string")return r||null;var n=i||a.doc,e=r&&n.getElementById(r);if(e&&(e.attributes.id.value==r||e.id==r))return e;var s=n.all[r];(!s||s.nodeName)&&(s=[s]);for(var c=0;e=s[c++];)if(e.attributes&&e.attributes.id&&e.attributes.id.value==r||e.id==r)return e;return null}:g.byId=function(r,i){return(typeof r=="string"?(i||a.doc).getElementById(r):r)||null};var l=h.global.document||null;v.add("dom-contains",!!(l&&l.contains)),g.isDescendant=function(r,i){try{for(r=g.byId(r),i=g.byId(i);r;){if(r==i)return!0;r=r.parentNode}}catch(n){}return!1},v.add("css-user-select",function(r,i,n){if(!n)return!1;var e=n.style,s=["Khtml","O","Moz","Webkit"],c=s.length,d="userSelect",E;do if(typeof e[d]!="undefined")return d;while(c--&&(d=s[c]+"UserSelect"));return!1});var u=v("css-user-select");return g.setSelectable=u?function(r,i){g.byId(r).style[u]=i?"":"none"}:function(r,i){r=g.byId(r);var n=r.getElementsByTagName("*"),e=n.length;if(i)for(r.removeAttribute("unselectable");e--;)n[e].removeAttribute("unselectable");else for(r.setAttribute("unselectable","on");e--;)n[e].setAttribute("unselectable","on")},g},A,I),A.exports=x},function(A,I,t){var y,x;y=[t(1),t(2),t(7)],x=t.dj.d(y,function(v,a,h){var g="className",l,u=/\s+/,r=[""];function i(e){if(typeof e=="string"||e instanceof String){if(e&&!u.test(e))return r[0]=e,r;var s=e.split(u);return s.length&&!s[0]&&s.shift(),s.length&&!s[s.length-1]&&s.pop(),s}return e?a.filter(e,function(c){return c}):[]}var n={};return l={contains:function(s,c){return(" "+h.byId(s)[g]+" ").indexOf(" "+c+" ")>=0},add:function(s,c){s=h.byId(s),c=i(c);var d=s[g],E;d=d?" "+d+" ":" ",E=d.length;for(var D=0,p=c.length,o;D=0),v.add("wp",parseFloat(h.split("Windows Phone")[1])||void 0),v.add("msapp",parseFloat(h.split("MSAppHost/")[1])||void 0),v.add("khtml",g.indexOf("Konqueror")>=0?l:void 0),v.add("edge",parseFloat(h.split("Edge/")[1])||void 0),v.add("opr",parseFloat(h.split("OPR/")[1])||void 0),v.add("webkit",!v("wp")&&!v("edge")&&parseFloat(h.split("WebKit/")[1])||void 0),v.add("chrome",!v("edge")&&!v("opr")&&parseFloat(h.split("Chrome/")[1])||void 0),v.add("android",!v("wp")&&parseFloat(h.split("Android ")[1])||void 0),v.add("safari",g.indexOf("Safari")>=0&&!v("wp")&&!v("chrome")&&!v("android")&&!v("edge")&&!v("opr")?parseFloat(g.split("Version/")[1]):void 0),v.add("mac",g.indexOf("Macintosh")>=0),v.add("quirks",document.compatMode=="BackCompat"),!v("wp")&&h.match(/(iPhone|iPod|iPad)/)){var u=RegExp.$1.replace(/P/,"p"),r=h.match(/OS ([\d_]+)/)?RegExp.$1:"1",i=parseFloat(r.replace(/_/,".").replace(/_/g,""));v.add(u,i),v.add("ios",i)}if(v.add("bb",(h.indexOf("BlackBerry")>=0||h.indexOf("BB10")>=0)&&parseFloat(h.split("Version/")[1])||void 0),v.add("trident",parseFloat(g.split("Trident/")[1])||void 0),v.add("svg",typeof SVGAngle!="undefined"),!v("webkit")){if(h.indexOf("Opera")>=0&&v.add("opera",l>=9.8&&parseFloat(h.split("Version/")[1])||l),h.indexOf("Gecko")>=0&&!v("wp")&&!v("khtml")&&!v("trident")&&!v("edge")&&v.add("mozilla",l),v("mozilla")&&v.add("ff",parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0),document.all&&!v("opera")){var n=parseFloat(g.split("MSIE ")[1])||void 0,e=document.documentMode;e&&e!=5&&Math.floor(n)!=e&&(n=e),v.add("ie",n)}v.add("wii",typeof opera!="undefined"&&opera.wiiremote)}}return v},A,I),A.exports=x},function(A,I,t){var y,x;y=[t(9),t(13),t(7),t(6)],x=t.dj.d(y,function(v,a,h,g){var l={};l.boxModel="content-box",v("ie")&&(l.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box"),l.getPadExtents=function(d,E){d=h.byId(d);var D=E||g.getComputedStyle(d),p=g.toPixelValue,o=p(d,D.paddingLeft),m=p(d,D.paddingTop),f=p(d,D.paddingRight),C=p(d,D.paddingBottom);return{l:o,t:m,r:f,b:C,w:o+f,h:m+C}};var u="none";l.getBorderExtents=function(d,E){d=h.byId(d);var D=g.toPixelValue,p=E||g.getComputedStyle(d),o=p.borderLeftStyle!=u?D(d,p.borderLeftWidth):0,m=p.borderTopStyle!=u?D(d,p.borderTopWidth):0,f=p.borderRightStyle!=u?D(d,p.borderRightWidth):0,C=p.borderBottomStyle!=u?D(d,p.borderBottomWidth):0;return{l:o,t:m,r:f,b:C,w:o+f,h:m+C}},l.getPadBorderExtents=function(d,E){d=h.byId(d);var D=E||g.getComputedStyle(d),p=l.getPadExtents(d,D),o=l.getBorderExtents(d,D);return{l:p.l+o.l,t:p.t+o.t,r:p.r+o.r,b:p.b+o.b,w:p.w+o.w,h:p.h+o.h}},l.getMarginExtents=function(d,E){d=h.byId(d);var D=E||g.getComputedStyle(d),p=g.toPixelValue,o=p(d,D.marginLeft),m=p(d,D.marginTop),f=p(d,D.marginRight),C=p(d,D.marginBottom);return{l:o,t:m,r:f,b:C,w:o+f,h:m+C}},l.getMarginBox=function(d,E){d=h.byId(d);var D=E||g.getComputedStyle(d),p=l.getMarginExtents(d,D),o=d.offsetLeft-p.l,m=d.offsetTop-p.t,f=d.parentNode,C=g.toPixelValue,S;if(v("mozilla")){var R=parseFloat(D.left),B=parseFloat(D.top);!isNaN(R)&&!isNaN(B)?(o=R,m=B):f&&f.style&&(S=g.getComputedStyle(f),S.overflow!="visible"&&(o+=S.borderLeftStyle!=u?C(d,S.borderLeftWidth):0,m+=S.borderTopStyle!=u?C(d,S.borderTopWidth):0))}else(v("opera")||v("ie")==8&&!v("quirks"))&&f&&(S=g.getComputedStyle(f),o-=S.borderLeftStyle!=u?C(d,S.borderLeftWidth):0,m-=S.borderTopStyle!=u?C(d,S.borderTopWidth):0);return{l:o,t:m,w:d.offsetWidth+p.w,h:d.offsetHeight+p.h}},l.getContentBox=function(d,E){d=h.byId(d);var D=E||g.getComputedStyle(d),p=d.clientWidth,o,m=l.getPadExtents(d,D),f=l.getBorderExtents(d,D);return p?(o=d.clientHeight,f.w=f.h=0):(p=d.offsetWidth,o=d.offsetHeight),v("opera")&&(m.l+=f.l,m.t+=f.t),{l:m.l,t:m.t,w:p-m.w-f.w,h:o-m.h-f.h}};function r(c,d,E,D,p,o){o=o||"px";var m=c.style;isNaN(d)||(m.left=d+o),isNaN(E)||(m.top=E+o),D>=0&&(m.width=D+o),p>=0&&(m.height=p+o)}function i(c){return c.tagName.toLowerCase()=="button"||c.tagName.toLowerCase()=="input"&&(c.getAttribute("type")||"").toLowerCase()=="button"}function n(c){return l.boxModel=="border-box"||c.tagName.toLowerCase()=="table"||i(c)}function e(c){var d={x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0},E;try{E=c.getBoundingClientRect()}catch(D){return d}return typeof E.left=="undefined"?d:E}l.setContentSize=function(d,E,D){d=h.byId(d);var p=E.w,o=E.h;if(n(d)){var m=l.getPadBorderExtents(d,D);p>=0&&(p+=m.w),o>=0&&(o+=m.h)}r(d,NaN,NaN,p,o)};var s={l:0,t:0,w:0,h:0};return l.setMarginBox=function(d,E,D){d=h.byId(d);var p=D||g.getComputedStyle(d),o=E.w,m=E.h,f=n(d)?s:l.getPadBorderExtents(d,p),C=l.getMarginExtents(d,p);if(v("webkit")&&i(d)){var S=d.style;o>=0&&!S.width&&(S.width="4px"),m>=0&&!S.height&&(S.height="4px")}o>=0&&(o=Math.max(o-f.w-C.w,0)),m>=0&&(m=Math.max(m-f.h-C.h,0)),r(d,E.l,E.t,o,m)},l.isBodyLtr=function(d){return d=d||a.doc,(a.body(d).dir||d.documentElement.dir||"ltr").toLowerCase()=="ltr"},l.docScroll=function(d){d=d||a.doc;var E=d.parentWindow||d.defaultView;return"pageXOffset"in E?{x:E.pageXOffset,y:E.pageYOffset}:(E=v("quirks")?a.body(d):d.documentElement)&&{x:l.fixIeBiDiScrollLeft(E.scrollLeft||0,d),y:E.scrollTop||0}},l.getIeDocumentElementOffset=function(c){return{x:0,y:0}},l.fixIeBiDiScrollLeft=function(d,E){E=E||a.doc;var D=v("ie");if(D&&!l.isBodyLtr(E)){var p=v("quirks"),o=p?a.body(E):E.documentElement,m=a.global;return D==6&&!p&&m.frameElement&&o.scrollHeight>o.clientHeight&&(d+=o.clientLeft),D<8||p?d+o.clientWidth-o.scrollWidth:-d}return d},l.position=function(c,d){c=h.byId(c);var E=a.body(c.ownerDocument),D=e(c);if(D={x:D.left,y:D.top,w:D.right-D.left,h:D.bottom-D.top},v("ie")<9&&(D.x-=v("quirks")?E.clientLeft+E.offsetLeft:0,D.y-=v("quirks")?E.clientTop+E.offsetTop:0),d){var p=l.docScroll(c.ownerDocument);D.x+=p.x,D.y+=p.y}return D},l.getMarginSize=function(d,E){d=h.byId(d);var D=l.getMarginExtents(d,E||g.getComputedStyle(d)),p=e(d);return{w:p.right-p.left+D.w,h:p.bottom-p.top+D.h}},l.normalizeEvent=function(c){if("layerX"in c||(c.layerX=c.offsetX,c.layerY=c.offsetY),!("pageX"in c)){var d=c.target,E=d&&d.ownerDocument||document,D=v("quirks")?E.body:E.documentElement;c.pageX=c.clientX+l.fixIeBiDiScrollLeft(D.scrollLeft||0,E),c.pageY=c.clientY+(D.scrollTop||0)}},l},A,I),A.exports=x},function(A,I,t){var y,x;y=[],x=t.dj.d(y,function(){"use strict";var v;function a(r,i,n,e){var s=r[i],c=i=="around",d;if(c){var E=n(function(){return s.advice(this,arguments)});d={remove:function(){E&&(E=r=n=null)},advice:function(D,p){return E?E.apply(D,p):s.advice(D,p)}}}else d={remove:function(){if(d.advice){var D=d.previous,p=d.next;!p&&!D?delete r[i]:(D?D.next=p:r[i]=p,p&&(p.previous=D)),r=n=d.advice=null}},id:r.nextId++,advice:n,receiveArguments:e};if(s&&!c)if(i=="after"){for(;s.next&&(s=s.next););s.next=d,d.previous=s}else i=="before"&&(r[i]=d,d.next=s,s.previous=d);else r[i]=d;return d}function h(r){return function(i,n,e,s){var c=i[n],d;(!c||c.target!=i)&&(i[n]=d=function(){for(var D=d.nextId,p=arguments,o=d.before;o;)o.advice&&(p=o.advice.apply(this,p)||p),o=o.next;if(d.around)var m=d.around.advice(this,p);for(var f=d.after;f&&f.id&]/g,function(s){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[s]})},buildRendering:function(){if(!this._rendered){this.templateString||(this.templateString=v(this.templatePath,{sanitize:!0}));var e=n.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),s;if(g.isString(e)){if(s=h.toDom(this._stringRepl(e),this.ownerDocument),s.nodeType!=1)throw new Error("Invalid template: "+e)}else s=e.cloneNode(!0);this.domNode=s}this.inherited(arguments),this._rendered||this._fillContent(this.srcNodeRef),this._rendered=!0},_fillContent:function(e){var s=this.containerNode;if(e&&s)for(;e.hasChildNodes();)s.appendChild(e.firstChild)}});return n._templateCache={},n.getCachedTemplate=function(e,s,c){var d=n._templateCache,E=e,D=d[E];if(D){try{if(!D.ownerDocument||D.ownerDocument==(c||document))return D}catch(o){}h.destroy(D)}if(e=r.trim(e),s||e.match(/\$\{([^\}]+)\}/g))return d[E]=e;var p=h.toDom(e,c);if(p.nodeType!=1)throw new Error("Invalid template: "+e);return d[E]=p},u("ie")&&l(window,"unload",function(){var e=n._templateCache;for(var s in e){var c=e[s];typeof c=="object"&&h.destroy(c),delete e[s]}}),n},A,I),A.exports=x},function(A,I,t){var y,x;y=[t(3),t(1),t(9)],x=t.dj.d(y,function(v,a,h){var g={global:v.global,doc:v.global.document||null,body:function(l){return l=l||v.doc,l.body||l.getElementsByTagName("body")[0]},setContext:function(l,u){v.global=g.global=l,v.doc=g.doc=u},withGlobal:function(l,u,r,i){var n=v.global;try{return v.global=g.global=l,g.withDoc.call(null,l.document,u,r,i)}finally{v.global=g.global=n}},withDoc:function(l,u,r,i){var n=g.doc,e=h("quirks"),s=h("ie"),c,d,E;try{return v.doc=g.doc=l,v.isQuirks=h.add("quirks",v.doc.compatMode=="BackCompat",!0,!0),h("ie")&&(E=l.parentWindow)&&E.navigator&&(c=parseFloat(E.navigator.appVersion.split("MSIE ")[1])||void 0,d=l.documentMode,d&&d!=5&&Math.floor(c)!=d&&(c=d),v.isIE=h.add("ie",c,!0,!0)),r&&typeof u=="string"&&(u=r[u]),u.apply(r,i||[])}finally{v.doc=g.doc=n,v.isQuirks=h.add("quirks",e,!0,!0),v.isIE=h.add("ie",s,!0,!0)}}};return h("extend-dojo")&&a.mixin(v,g),g},A,I),A.exports=x},function(A,I,t){var y,x;y=[t(3),t(9)],x=t.dj.d(y,function(v,a){return v.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:a("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:a("mac")&&!a("air")?a("safari")?91:224:17}},A,I),A.exports=x},function(A,I,t){var y,x;y=[t(40)],x=t.dj.d(y,function(v){var a=new v;return{publish:function(h,g){return a.emit.apply(a,arguments)},subscribe:function(h,g){return a.on.apply(a,arguments)}}},A,I),A.exports=x},function(A,I,t){var y,x;y=[I,t(9),t(1),t(7),t(6),t(96)],x=t.dj.d(y,function(v,a,h,g,l,u){var r={innerHTML:1,textContent:1,className:1,htmlFor:a("ie")?1:0,value:1},i={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};function n(e,s){var c=e.getAttributeNode&&e.getAttributeNode(s);return!!c&&c.specified}v.has=function(s,c){var d=c.toLowerCase();return!!r[u.names[d]||c]||n(g.byId(s),i[d]||c)},v.get=function(s,c){s=g.byId(s);var d=c.toLowerCase(),E=u.names[d]||c,D=r[E],p=s[E];if(D&&typeof p!="undefined")return p;if(E=="textContent")return u.get(s,E);if(E!="href"&&(typeof p=="boolean"||h.isFunction(p)))return p;var o=i[d]||c;return n(s,o)?s.getAttribute(o):null},v.set=function(s,c,d){if(s=g.byId(s),arguments.length==2){for(var E in c)v.set(s,E,c[E]);return s}var D=c.toLowerCase(),p=u.names[D]||c,o=r[p];return p=="style"&&typeof d!="string"?(l.set(s,d),s):o||typeof d=="boolean"||h.isFunction(d)?u.set(s,c,d):(s.setAttribute(i[D]||c,d),s)},v.remove=function(s,c){g.byId(s).removeAttribute(i[c.toLowerCase()]||c)},v.getNodeProp=function(s,c){s=g.byId(s);var d=c.toLowerCase(),E=u.names[d]||c;if(E in s&&E!="href")return s[E];var D=i[d]||c;return n(s,D)?s.getAttribute(D):null}},A,I),A.exports=x},function(A,I,t){var y,x;y=[I,t(3),t(9),t(13),t(7),t(16)],x=t.dj.d(y,function(v,a,h,g,l,u){var r={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},i=/<\s*([\w\:]+)/,n={},e=0,s="__"+a._scopeName+"ToDomId";for(var c in r)if(r.hasOwnProperty(c)){var d=r[c];d.pre=c=="option"?'