text: /*
      artifact generator: C:\My\wizzi\wizzi\node_modules\wizzi-legacy-v5\lib\artifacts\js\module\gen\main.js
      primary source IttfDocument: c:\my\wizzi\wizzi\node_modules\wizzi-core\lib\artifacts\wfschema\model\gen\ittf\wfschema-model.js.ittf
      utc time: Tue, 11 Jun 2019 14:07:15 GMT
  */
  'use strict';
  // generated by v5-wizzi-js.artifacts.js.module.main
  function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
  var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
  
  var util = require('util');
  var path = require('path');
  var _ = require('lodash');
  var wzutils = require('wizzi-utils');
  var verify = wzutils.verify;
  var _md = module.exports = {};
  var wzSourceLineInfo = (function () {
      function wzSourceLineInfo(row, col, sourceKey) {
          _classCallCheck(this, wzSourceLineInfo);
          this.row = row;
          this.col = col;
          this.sourceKey = sourceKey;
      }
      wzSourceLineInfo.prototype.toString = function(instance) {
          if (instance) {
              return 'row: ' + this.row + ', col: ' + this.col + ', file: ' + instance.wzSourceFilepath(this.sourceKey);
          }
          else {
              return 'row: ' + this.row + ', col: ' + this.col + ', sourceKey: ' + this.sourceKey;
          }
      }
      return wzSourceLineInfo;
  })();
  
  _md.wzSourceLineInfo = wzSourceLineInfo;
  var siteBase = (function () {
      function siteBase(name, sourceLineInfo) {
          _classCallCheck(this, siteBase);
          this.wzName = name || '';
          this.wzParent = null;
          this.wzSourceLineInfo = sourceLineInfo;
          this.wzChildren = [];
      }
      siteBase.prototype.wzRoot = function() {
          return this.wzParent == null ? this : this.wzParent.wzRoot();
      }
      siteBase.prototype.wzSourceFilepath = function(sourceKey) {
          return this.wzRoot().loadHistory.getIttfDocumentUri(sourceKey);
      }
      siteBase.prototype.wzSourceErrorLines = function(node, message) {
          return this.wzRoot().loadHistory.getIttfDocumentErrorLines(node.u, {
                  row: node.r, 
                  col: node.c, 
                  description: message
              }, true);
      }
      siteBase.prototype.wzVerify = function() {
      }
      siteBase.prototype.wzInitialize = function() {
      }
      siteBase.prototype.wzInitializeAsync = function(ctx, callback) {
          callback(null);
      }
      siteBase.prototype.wzAddChild = function(node) {
          node.wzParent = this;
          this.wzChildren.push(node);
      }
      siteBase.prototype.wzAddChildToColl = function(node, coll) {
          node.wzParent = this;
          node.wzMoved = true;
          coll.push(node);
      }
      siteBase.prototype.wzMoveChildToColl = function(node, coll, fromColl) {
          var index = fromColl.indexOf(node);
          if (index < 0) {
              this.error('wzMoveChildToColl error. The from collection does not contain the node.', node);
          }
          fromColl.splice(index, 1);
          this.wzAddChildToColl(node, coll);
      }
      siteBase.prototype.wzLoadToChildColl = function(child, type, coll) {
          var item = new type(child.v, new wzSourceLineInfo(child.r, child.c, child.u));
          item.wzTag = child.n;
          item.wzParent = this;
          coll.push(item);
          if (item.loadFromNode) {
              item.loadFromNode(child);
          }
          return true;
      }
      siteBase.prototype.wzCreateChildColl = function(tag, name, type, coll) {
          var item = new type(name, this.wzSourceLineInfo);
          item.wzTag = tag;
          item.wzParent = this;
          item.wzCreated = true;
          coll.push(item);
          return item;
      }
      siteBase.prototype.wzLoadToChildren = function(child, type) {
          var item = new type(child.v, new wzSourceLineInfo(child.r, child.c, child.u));
          item.wzTag = child.n;
          item.wzParent = this;
          this.wzChildren.push(item);
          if (item.loadFromNode) {
              item.loadFromNode(child);
          }
          return true;
      }
      siteBase.prototype.wzLoadOneToOne = function(child, type, fieldName) {
          var item = new type(child.v, new wzSourceLineInfo(child.r, child.c, child.u));
          item.wzParent = this;
          this[fieldName] = item;
          if (item.loadFromNode) {
              item.loadFromNode(child);
          }
          return true;
      }
      siteBase.prototype.wzRemove = function(fromColl) {
          var index = fromColl.indexOf(this);
          if (index < 0) {
              this.error('wzRemove error. The from collection does not contain the node.', this);
          }
          fromColl.splice(index, 1);
      }
      siteBase.prototype.error = function(message, node) {
          throw new _md.siteModelException(message, node, this);
      }
      return siteBase;
  })();
  
  _md.siteBase = siteBase;
  // element comment
  var comment = (function (siteBase) {
      _inherits(comment, siteBase);
      function comment(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(comment.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, comment);
          this.wzElement = "comment";
          // relation comment
          this.comments = [];
      }
      comment.prototype.addComment = function(name, sourceLineInfo) {
          var retval = new _md.comment(name, sourceLineInfo);
          retval.wzParent = this;
          this.comments.push(retval);
          return retval;
      }
      comment.prototype.getComment = function(name) {
          var found = null;
          this.comments.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      comment.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 1 && _ch == '#') {
              if (name === '#') {
                  return this.wzLoadToChildColl(child, _md.comment, this.comments);
              }
          }
          if (_l == 1 && _ch == '@') {
              if (name === '@') {
                  return this.wzLoadToChildColl(child, _md.attribute, this.comments);
              }
          }
          if (_l == 1 && _ch == 'a') {
              if (name === 'a') {
                  return this.wzLoadToChildColl(child, _md.a, this.comments);
              }
          }
          if (_l == 1 && _ch == 'p') {
              if (name === 'p') {
                  return this.wzLoadToChildColl(child, _md.p, this.comments);
              }
          }
          if (_l == 2 && _ch == 'h') {
              if (name === 'h1') {
                  return this.wzLoadToChildColl(child, _md.h1, this.comments);
              }
              else if (name === 'h2') {
                  return this.wzLoadToChildColl(child, _md.h2, this.comments);
              }
              else if (name === 'h3') {
                  return this.wzLoadToChildColl(child, _md.h3, this.comments);
              }
              else if (name === 'h4') {
                  return this.wzLoadToChildColl(child, _md.h4, this.comments);
              }
          }
          if (_l == 2 && _ch == 'l') {
              if (name === 'li') {
                  return this.wzLoadToChildColl(child, _md.li, this.comments);
              }
          }
          if (_l == 2 && _ch == 'u') {
              if (name === 'ul') {
                  return this.wzLoadToChildColl(child, _md.ul, this.comments);
              }
          }
          if (_l == 3 && _ch == 'd') {
              if (name === 'div') {
                  return this.wzLoadToChildColl(child, _md.div, this.comments);
              }
          }
          if (_l == 4 && _ch == 'c') {
              if (name === 'card') {
                  return this.wzLoadToChildColl(child, _md.card, this.comments);
              }
          }
          if (_l == 4 && _ch == 'd') {
              if (name === 'demo') {
                  return this.wzLoadToChildColl(child, _md.demo, this.comments);
              }
          }
          if (_l == 4 && _ch == 'f') {
              if (name === 'flex') {
                  return this.wzLoadToChildColl(child, _md.flex, this.comments);
              }
          }
          if (_l == 4 && _ch == 'g') {
              if (name === 'grid') {
                  return this.wzLoadToChildColl(child, _md.grid, this.comments);
              }
          }
          if (_l == 4 && _ch == 'i') {
              if (name === 'item') {
                  return this.wzLoadToChildColl(child, _md.item, this.comments);
              }
          }
          if (_l == 4 && _ch == 'l') {
              if (name === 'link') {
                  return this.wzLoadToChildColl(child, _md.link, this.comments);
              }
              else if (name === 'logo') {
                  return this.wzLoadToChildColl(child, _md.logo, this.comments);
              }
          }
          if (_l == 4 && _ch == 'm') {
              if (name === 'meta') {
                  return this.wzLoadToChildColl(child, _md.meta, this.comments);
              }
              else if (name === 'menu') {
                  return this.wzLoadToChildColl(child, _md.menu, this.comments);
              }
          }
          if (_l == 4 && _ch == 's') {
              if (name === 'site') {
                  return this.wzLoadToChildColl(child, _md.site, this.comments);
              }
              else if (name === 'span') {
                  return this.wzLoadToChildColl(child, _md.span, this.comments);
              }
          }
          if (_l == 5 && _ch == 'c') {
              if (name === 'color') {
                  return this.wzLoadToChildColl(child, _md.color, this.comments);
              }
          }
          if (_l == 5 && _ch == 'i') {
              if (name === 'image') {
                  return this.wzLoadToChildColl(child, _md.image, this.comments);
              }
          }
          if (_l == 5 && _ch == 'p') {
              if (name === 'press') {
                  return this.wzLoadToChildColl(child, _md.press, this.comments);
              }
              else if (name === 'panel') {
                  return this.wzLoadToChildColl(child, _md.panel, this.comments);
              }
          }
          if (_l == 5 && _ch == 's') {
              if (name === 'style') {
                  return this.wzLoadToChildColl(child, _md.style, this.comments);
              }
          }
          if (_l == 5 && _ch == 't') {
              if (name === 'table') {
                  return this.wzLoadToChildColl(child, _md.table, this.comments);
              }
              else if (name === 'theme') {
                  return this.wzLoadToChildColl(child, _md.theme, this.comments);
              }
          }
          if (_l == 6 && _ch == 'a') {
              if (name === 'awards') {
                  return this.wzLoadToChildColl(child, _md.awards, this.comments);
              }
          }
          if (_l == 6 && _ch == 'f') {
              if (name === 'footer') {
                  return this.wzLoadToChildColl(child, _md.footer, this.comments);
              }
          }
          if (_l == 6 && _ch == 'h') {
              if (name === 'header') {
                  return this.wzLoadToChildColl(child, _md.header, this.comments);
              }
          }
          if (_l == 6 && _ch == 'm') {
              if (name === 'markup') {
                  return this.wzLoadToChildColl(child, _md.markup, this.comments);
              }
          }
          if (_l == 6 && _ch == 'w') {
              if (name === 'widget') {
                  return this.wzLoadToChildColl(child, _md.widget, this.comments);
              }
          }
          if (_l == 7 && _ch == 'a') {
              if (name === 'aboutus') {
                  return this.wzLoadToChildColl(child, _md.aboutUs, this.comments);
              }
          }
          if (_l == 7 && _ch == 's') {
              if (name === 'sitemap') {
                  return this.wzLoadToChildColl(child, _md.siteMap, this.comments);
              }
          }
          if (_l == 8 && _ch == 'c') {
              if (name === 'category') {
                  return this.wzLoadToChildColl(child, _md.category, this.comments);
              }
          }
          if (_l == 8 && _ch == 'g') {
              if (name === 'griditem') {
                  return this.wzLoadToChildColl(child, _md.gridItem, this.comments);
              }
          }
          if (_l == 8 && _ch == 'h') {
              if (name === 'headline') {
                  return this.wzLoadToChildColl(child, _md.headline, this.comments);
              }
          }
          if (_l == 8 && _ch == 'm') {
              if (name === 'menuitem') {
                  return this.wzLoadToChildColl(child, _md.menuitem, this.comments);
              }
          }
          if (_l == 9 && _ch == 'c') {
              if (name === 'copyright') {
                  return this.wzLoadToChildColl(child, _md.copyright, this.comments);
              }
          }
          if (_l == 9 && _ch == 'g') {
              if (name === 'grid-item') {
                  return this.wzLoadToChildColl(child, _md.gridItem, this.comments);
              }
          }
          if (_l == 9 && _ch == 'm') {
              if (name === 'menu-item') {
                  return this.wzLoadToChildColl(child, _md.menuitem, this.comments);
              }
          }
          if (_l == 9 && _ch == 's') {
              if (name === 'searchbar') {
                  return this.wzLoadToChildColl(child, _md.searchBar, this.comments);
              }
              else if (name === 'subfooter') {
                  return this.wzLoadToChildColl(child, _md.subFooter, this.comments);
              }
          }
          if (_l == 9 && _ch == 't') {
              if (name === 'termofuse') {
                  return this.wzLoadToChildColl(child, _md.termOfUse, this.comments);
              }
          }
          if (_l == 10 && _ch == 'f') {
              if (name === 'footeritem') {
                  return this.wzLoadToChildColl(child, _md.footerItem, this.comments);
              }
          }
          if (_l == 10 && _ch == 'g') {
              if (name === 'givebutton') {
                  return this.wzLoadToChildColl(child, _md.giveButton, this.comments);
              }
          }
          if (_l == 10 && _ch == 'h') {
              if (name === 'headeritem') {
                  return this.wzLoadToChildColl(child, _md.headerItem, this.comments);
              }
          }
          if (_l == 10 && _ch == 'n') {
              if (name === 'navigation') {
                  return this.wzLoadToChildColl(child, _md.navigation, this.comments);
              }
              else if (name === 'newsletter') {
                  return this.wzLoadToChildColl(child, _md.newsletter, this.comments);
              }
          }
          if (_l == 11 && _ch == 'c') {
              if (name === 'contactform') {
                  return this.wzLoadToChildColl(child, _md.contactForm, this.comments);
              }
          }
          if (_l == 11 && _ch == 'm') {
              if (name === 'memberlogin') {
                  return this.wzLoadToChildColl(child, _md.memberLogin, this.comments);
              }
              else if (name === 'minigallery') {
                  return this.wzLoadToChildColl(child, _md.miniGallery, this.comments);
              }
          }
          if (_l == 11 && _ch == 's') {
              if (name === 'socialmedia') {
                  return this.wzLoadToChildColl(child, _md.socialMedia, this.comments);
              }
              else if (name === 'seokeywords') {
                  return this.wzLoadToChildColl(child, _md.seoKeywords, this.comments);
              }
          }
          if (_l == 12 && _ch == 'c') {
              if (name === 'calltoaction') {
                  return this.wzLoadToChildColl(child, _md.callToAction, this.comments);
              }
              else if (name === 'calltoaction') {
                  return this.wzLoadToChildColl(child, _md.callToAction, this.comments);
              }
          }
          if (_l == 13 && _ch == 'p') {
              if (name === 'popularrecent') {
                  return this.wzLoadToChildColl(child, _md.popularRecent, this.comments);
              }
          }
          if (_l == 15 && _ch == 's') {
              if (name === 'supportingimage') {
                  return this.wzLoadToChildColl(child, _md.supportingImage, this.comments);
              }
          }
          return ok;
      }
      comment.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      comment.prototype.wzVerify = function(ctx) {
          var i, i_items=this.comments, i_len=this.comments.length, item;
          for (i=0; i<i_len; i++) {
              item = this.comments[i];
              item.wzVerify(ctx);
          }
          _md.siteBase.prototype.wzVerify.call(this, ctx);
      }
      comment.prototype.wzInitialize = function(ctx) {
          var i, i_items=this.comments, i_len=this.comments.length, item;
          for (i=0; i<i_len; i++) {
              item = this.comments[i];
              item.wzInitialize(ctx);
          }
          _md.siteBase.prototype.wzInitialize.call(this, ctx);
      }
      return comment;
  })(siteBase);
  
  _md.comment = comment;
  // element item
  var item = (function (comment) {
      _inherits(item, comment);
      function item(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(item.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, item);
          this.wzElement = "item";
          // relation item
          this.items = [];
      }
      item.prototype.addItem = function(name, sourceLineInfo) {
          var retval = new _md.item(name, sourceLineInfo);
          retval.wzParent = this;
          this.items.push(retval);
          return retval;
      }
      item.prototype.getItem = function(name) {
          var found = null;
          this.items.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      item.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 4 && _ch == 'i') {
              if (name === 'item') {
                  return this.wzLoadToChildColl(child, _md.item, this.items);
              }
          }
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      item.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      item.prototype.wzVerify = function(ctx) {
          var i, i_items=this.items, i_len=this.items.length, item;
          for (i=0; i<i_len; i++) {
              item = this.items[i];
              item.wzVerify(ctx);
          }
          _md.comment.prototype.wzVerify.call(this, ctx);
      }
      item.prototype.wzInitialize = function(ctx) {
          var i, i_items=this.items, i_len=this.items.length, item;
          for (i=0; i<i_len; i++) {
              item = this.items[i];
              item.wzInitialize(ctx);
          }
          _md.comment.prototype.wzInitialize.call(this, ctx);
      }
      return item;
  })(comment);
  
  _md.item = item;
  /**
      element site
       The root element of the site schema.
  */
  var site = (function (comment) {
      _inherits(site, comment);
      function site(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(site.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, site);
          this.wzElement = "site";
          // relation page
          this.pages = [];
          // relation meta
          this.metas = [];
      }
      site.prototype.addPage = function(name, sourceLineInfo) {
          var retval = new _md.page(name, sourceLineInfo);
          retval.wzParent = this;
          this.pages.push(retval);
          return retval;
      }
      site.prototype.getPage = function(name) {
          var found = null;
          this.pages.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      site.prototype.addMeta = function(name, sourceLineInfo) {
          var retval = new _md.meta(name, sourceLineInfo);
          retval.wzParent = this;
          this.metas.push(retval);
          return retval;
      }
      site.prototype.getMeta = function(name) {
          var found = null;
          this.metas.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      site.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 4 && _ch == 'd') {
              if (name === 'demo') {
                  return this.wzLoadToChildColl(child, _md.demo, this.metas);
              }
          }
          if (_l == 4 && _ch == 'l') {
              if (name === 'link') {
                  return this.wzLoadToChildColl(child, _md.link, this.metas);
              }
          }
          if (_l == 4 && _ch == 'm') {
              if (name === 'meta') {
                  return this.wzLoadToChildColl(child, _md.meta, this.metas);
              }
          }
          if (_l == 4 && _ch == 'p') {
              if (name === 'page') {
                  return this.wzLoadToChildColl(child, _md.page, this.pages);
              }
          }
          if (_l == 8 && _ch == 'c') {
              if (name === 'category') {
                  return this.wzLoadToChildColl(child, _md.category, this.metas);
              }
          }
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      site.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      site.prototype.wzVerify = function(ctx) {
          var i, i_items=this.pages, i_len=this.pages.length, item;
          for (i=0; i<i_len; i++) {
              item = this.pages[i];
              item.wzVerify(ctx);
          }
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              item.wzVerify(ctx);
          }
          _md.comment.prototype.wzVerify.call(this, ctx);
      }
      site.prototype.wzInitialize = function(ctx) {
          var i, i_items=this.pages, i_len=this.pages.length, item;
          for (i=0; i<i_len; i++) {
              item = this.pages[i];
              item.wzInitialize(ctx);
          }
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              item.wzInitialize(ctx);
          }
          _md.comment.prototype.wzInitialize.call(this, ctx);
      }
      site.prototype.getDemosByPath = function(path) {
          var ret;
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              if (item.getDemosByPath) {
                  ret = item.getDemosByPath(path);
                  if (ret) {
                      return ret;
                  }
              }
          }
          return [];
      }
      site.prototype.getCategoriesByPath = function(path) {
          var ret;
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              if (item.getCategoriesByPath) {
                  ret = item.getCategoriesByPath(path);
                  if (ret) {
                      return ret;
                  }
              }
          }
          return [];
      }
      site.prototype.getLinksByPath = function(path) {
          var ret;
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              if (item.getLinksByPath) {
                  ret = item.getLinksByPath(path);
                  if (ret) {
                      return ret;
                  }
              }
          }
          return [];
      }
      return site;
  })(comment);
  
  _md.site = site;
  // element page
  var page = (function (siteBase) {
      _inherits(page, siteBase);
      function page(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(page.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, page);
          this.wzElement = "page";
          // relation header
          this.header = null;
          // relation footer
          this.footer = null;
          // relation meta
          this.metas = [];
      }
      page.prototype.addMeta = function(name, sourceLineInfo) {
          var retval = new _md.meta(name, sourceLineInfo);
          retval.wzParent = this;
          this.metas.push(retval);
          return retval;
      }
      page.prototype.getMeta = function(name) {
          var found = null;
          this.metas.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      page.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 4 && _ch == 'd') {
              if (name === 'demo') {
                  return this.wzLoadToChildColl(child, _md.demo, this.metas);
              }
          }
          if (_l == 4 && _ch == 'l') {
              if (name === 'link') {
                  return this.wzLoadToChildColl(child, _md.link, this.metas);
              }
          }
          if (_l == 4 && _ch == 'm') {
              if (name === 'meta') {
                  return this.wzLoadToChildColl(child, _md.meta, this.metas);
              }
          }
          if (_l == 6 && _ch == 'f') {
              if (name === 'footer') {
                  return this.wzLoadOneToOne(child, _md.footer, 'footer');
              }
          }
          if (_l == 6 && _ch == 'h') {
              if (name === 'header') {
                  return this.wzLoadOneToOne(child, _md.header, 'header');
              }
          }
          if (_l == 8 && _ch == 'c') {
              if (name === 'category') {
                  return this.wzLoadToChildColl(child, _md.category, this.metas);
              }
          }
          return ok;
      }
      page.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      page.prototype.wzVerify = function(ctx) {
          if (this.header != null) {
              this.header.wzVerify(ctx);
          }
          if (this.footer != null) {
              this.footer.wzVerify(ctx);
          }
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              item.wzVerify(ctx);
          }
          _md.siteBase.prototype.wzVerify.call(this, ctx);
      }
      page.prototype.wzInitialize = function(ctx) {
          if (this.header != null) {
              this.header.wzInitialize(ctx);
          }
          if (this.footer != null) {
              this.footer.wzInitialize(ctx);
          }
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              item.wzInitialize(ctx);
          }
          _md.siteBase.prototype.wzInitialize.call(this, ctx);
      }
      return page;
  })(siteBase);
  
  _md.page = page;
  // element contextModel
  var contextModel = (function (siteBase) {
      _inherits(contextModel, siteBase);
      function contextModel(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(contextModel.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, contextModel);
          this.wzElement = "contextModel";
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.type = null
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.path = null
      }
      contextModel.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 4 && _ch == 'p') {
              if (name === 'path') {
                  this.path = child.v; return true;
              }
          }
          if (_l == 4 && _ch == 't') {
              if (name === 'type') {
                  this.type = child.v; return true;
              }
          }
          return ok;
      }
      contextModel.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      return contextModel;
  })(siteBase);
  
  _md.contextModel = contextModel;
  // element meta
  var meta = (function (comment) {
      _inherits(meta, comment);
      function meta(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(meta.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, meta);
          this.wzElement = "meta";
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.label = null
          // relation markup
          this.markup = null;
          // relation meta
          this.metas = [];
          // relation contextModel
          this.contextModels = [];
      }
      meta.prototype.addMeta = function(name, sourceLineInfo) {
          var retval = new _md.meta(name, sourceLineInfo);
          retval.wzParent = this;
          this.metas.push(retval);
          return retval;
      }
      meta.prototype.getMeta = function(name) {
          var found = null;
          this.metas.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      meta.prototype.addContextModel = function(name, sourceLineInfo) {
          var retval = new _md.contextModel(name, sourceLineInfo);
          retval.wzParent = this;
          this.contextModels.push(retval);
          return retval;
      }
      meta.prototype.getContextModel = function(name) {
          var found = null;
          this.contextModels.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      meta.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 1 && _ch == 'a') {
              if (name === 'a') {
                  return this.wzLoadOneToOne(child, _md.a, 'markup');
              }
          }
          if (_l == 1 && _ch == 'p') {
              if (name === 'p') {
                  return this.wzLoadOneToOne(child, _md.p, 'markup');
              }
          }
          if (_l == 2 && _ch == 'h') {
              if (name === 'h1') {
                  return this.wzLoadOneToOne(child, _md.h1, 'markup');
              }
              else if (name === 'h2') {
                  return this.wzLoadOneToOne(child, _md.h2, 'markup');
              }
              else if (name === 'h3') {
                  return this.wzLoadOneToOne(child, _md.h3, 'markup');
              }
              else if (name === 'h4') {
                  return this.wzLoadOneToOne(child, _md.h4, 'markup');
              }
          }
          if (_l == 2 && _ch == 'l') {
              if (name === 'li') {
                  return this.wzLoadOneToOne(child, _md.li, 'markup');
              }
          }
          if (_l == 2 && _ch == 'u') {
              if (name === 'ul') {
                  return this.wzLoadOneToOne(child, _md.ul, 'markup');
              }
          }
          if (_l == 3 && _ch == 'd') {
              if (name === 'div') {
                  return this.wzLoadOneToOne(child, _md.div, 'markup');
              }
          }
          if (_l == 4 && _ch == 'd') {
              if (name === 'demo') {
                  return this.wzLoadToChildColl(child, _md.demo, this.metas);
              }
          }
          if (_l == 4 && _ch == 'l') {
              if (name === 'link') {
                  return this.wzLoadToChildColl(child, _md.link, this.metas);
              }
          }
          if (_l == 4 && _ch == 'm') {
              if (name === 'meta') {
                  return this.wzLoadToChildColl(child, _md.meta, this.metas);
              }
          }
          if (_l == 4 && _ch == 's') {
              if (name === 'span') {
                  return this.wzLoadOneToOne(child, _md.span, 'markup');
              }
          }
          if (_l == 5 && _ch == 'l') {
              if (name === 'label') {
                  this.label = child.v; return true;
              }
          }
          if (_l == 6 && _ch == 'm') {
              if (name === 'markup') {
                  return this.wzLoadOneToOne(child, _md.markup, 'markup');
              }
          }
          if (_l == 8 && _ch == 'c') {
              if (name === 'category') {
                  return this.wzLoadToChildColl(child, _md.category, this.metas);
              }
          }
          if (_l == 12 && _ch == 'c') {
              if (name === 'contextmodel') {
                  return this.wzLoadToChildColl(child, _md.contextModel, this.contextModels);
              }
          }
          if (_l == 13 && _ch == 'c') {
              if (name === 'context-model') {
                  return this.wzLoadToChildColl(child, _md.contextModel, this.contextModels);
              }
          }
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      meta.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      meta.prototype.wzVerify = function(ctx) {
          if (this.markup != null) {
              this.markup.wzVerify(ctx);
          }
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              item.wzVerify(ctx);
          }
          var i, i_items=this.contextModels, i_len=this.contextModels.length, item;
          for (i=0; i<i_len; i++) {
              item = this.contextModels[i];
              item.wzVerify(ctx);
          }
          _md.comment.prototype.wzVerify.call(this, ctx);
      }
      meta.prototype.wzInitialize = function(ctx) {
          if (this.markup != null) {
              this.markup.wzInitialize(ctx);
          }
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              item.wzInitialize(ctx);
          }
          var i, i_items=this.contextModels, i_len=this.contextModels.length, item;
          for (i=0; i<i_len; i++) {
              item = this.contextModels[i];
              item.wzInitialize(ctx);
          }
          _md.comment.prototype.wzInitialize.call(this, ctx);
      }
      return meta;
  })(comment);
  
  _md.meta = meta;
  // element category
  var category = (function (meta) {
      _inherits(category, meta);
      function category(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(category.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, category);
          this.wzElement = "category";
      }
      category.prototype.wzInitialize = function(ctx) {
          this.nameLower = this.wzName.toLowerCase();
          var cpath = [this.nameLower];
          var prn = this.wzParent;
          while (prn && prn.wzElement === 'category') {
              cpath.splice(0, 0, prn.wzName.toLowerCase());
              prn = prn.wzParent;
          }
          this.categoryPath = cpath.join('/');
          _md.meta.prototype.wzInitialize.call(this, ctx);
      }
      category.prototype.getDemos = function() {
          var ret = [];
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              if (item.wzElement === 'demo') {
                  ret.push(item);
              }
          }
          return ret;
      }
      category.prototype.getCategories = function() {
          var ret = [];
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              if (item.wzElement === 'category') {
                  ret.push(item);
              }
          }
          return ret;
      }
      category.prototype.getLinks = function() {
          var ret = [];
          var i, i_items=this.metas, i_len=this.metas.length, item;
          for (i=0; i<i_len; i++) {
              item = this.metas[i];
              if (item.wzElement === 'link') {
                  ret.push(item);
              }
          }
          return ret;
      }
      category.prototype.getDemosByPath = function(path) {
          if (this.categoryPath === path) {
              return this.getDemos();
          }
          else {
              var ret;
              var i, i_items=this.metas, i_len=this.metas.length, item;
              for (i=0; i<i_len; i++) {
                  item = this.metas[i];
                  if (item.getDemosByPath) {
                      ret = item.getDemosByPath(path);
                      if (ret) {
                          return ret;
                      }
                  }
              }
              return null;
          }
      }
      category.prototype.getCategoriesByPath = function(path) {
          if (this.categoryPath === path) {
              return this.getCategories();
          }
          else {
              var ret;
              var i, i_items=this.metas, i_len=this.metas.length, item;
              for (i=0; i<i_len; i++) {
                  item = this.metas[i];
                  if (item.getCategoriesByPath) {
                      ret = item.getCategoriesByPath(path);
                      if (ret) {
                          return ret;
                      }
                  }
              }
              return null;
          }
      }
      category.prototype.getLinksByPath = function(path) {
          if (this.categoryPath === path) {
              return this.getLinks();
          }
          else {
              var ret;
              var i, i_items=this.metas, i_len=this.metas.length, item;
              for (i=0; i<i_len; i++) {
                  item = this.metas[i];
                  if (item.getCategoriesByPath) {
                      ret = item.getLinksByPath(path);
                      if (ret) {
                          return ret;
                      }
                  }
              }
              return null;
          }
      }
      return category;
  })(meta);
  
  _md.category = category;
  // element demo
  var demo = (function (meta) {
      _inherits(demo, meta);
      function demo(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(demo.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, demo);
          this.wzElement = "demo";
      }
      demo.prototype.wzInitialize = function(ctx) {
          this.nameLower = this.wzName.toLowerCase();
          var cpath = [this.nameLower];
          var prn = this.wzParent;
          while (prn && prn.wzElement === 'category') {
              cpath.splice(0, 0, prn.wzName.toLowerCase());
              prn = prn.wzParent;
          }
          this.demoPath = cpath.join('/');
          _md.meta.prototype.wzInitialize.call(this, ctx);
      }
      demo.prototype.getUri = function() {
          var sb = [ this.demoPath, '/index.html.ittf' ];
          if (this.contextModels.length > 0) {
              sb.push('?_context=');
              var seen = false;
              var i, i_items=this.contextModels, i_len=this.contextModels.length, item;
              for (i=0; i<i_len; i++) {
                  item = this.contextModels[i];
                  if (seen) {
                      sb.push(';');
                  }
                  sb.push(item.wzName);
              }
              var i, i_items=this.contextModels, i_len=this.contextModels.length, item;
              for (i=0; i<i_len; i++) {
                  item = this.contextModels[i];
                  sb.push('&_' + item.wzName + '=' + item.type);
                  if (verify.isNotEmpty(item.path)) {
                      sb.push(';' + item.path);
                  }
              }
          }
          return sb.join('');
      }
      return demo;
  })(meta);
  
  _md.demo = demo;
  // element link
  var link = (function (meta) {
      _inherits(link, meta);
      function link(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(link.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, link);
          this.wzElement = "link";
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.stars = null
      }
      link.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 5 && _ch == 's') {
              if (name === 'stars') {
                  this.stars = child.v; return true;
              }
          }
          ok = _md.meta.prototype.loadChild.call(this, child);
          return ok;
      }
      link.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      return link;
  })(meta);
  
  _md.link = link;
  // element headerItem
  var headerItem = (function (comment) {
      _inherits(headerItem, comment);
      function headerItem(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(headerItem.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, headerItem);
          this.wzElement = "headerItem";
      }
      headerItem.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      headerItem.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      return headerItem;
  })(comment);
  
  _md.headerItem = headerItem;
  // element header
  var header = (function (headerItem) {
      _inherits(header, headerItem);
      function header(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(header.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, header);
          this.wzElement = "header";
      }
      return header;
  })(headerItem);
  
  _md.header = header;
  // element logo
  var logo = (function (headerItem) {
      _inherits(logo, headerItem);
      function logo(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(logo.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, logo);
          this.wzElement = "logo";
      }
      return logo;
  })(headerItem);
  
  _md.logo = logo;
  // element navigation
  var navigation = (function (headerItem) {
      _inherits(navigation, headerItem);
      function navigation(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(navigation.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, navigation);
          this.wzElement = "navigation";
      }
      return navigation;
  })(headerItem);
  
  _md.navigation = navigation;
  // element searchBar
  var searchBar = (function (headerItem) {
      _inherits(searchBar, headerItem);
      function searchBar(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(searchBar.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, searchBar);
          this.wzElement = "searchBar";
      }
      return searchBar;
  })(headerItem);
  
  _md.searchBar = searchBar;
  // element memberLogin
  var memberLogin = (function (headerItem) {
      _inherits(memberLogin, headerItem);
      function memberLogin(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(memberLogin.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, memberLogin);
          this.wzElement = "memberLogin";
      }
      return memberLogin;
  })(headerItem);
  
  _md.memberLogin = memberLogin;
  // element socialMedia
  var socialMedia = (function (headerItem) {
      _inherits(socialMedia, headerItem);
      function socialMedia(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(socialMedia.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, socialMedia);
          this.wzElement = "socialMedia";
      }
      return socialMedia;
  })(headerItem);
  
  _md.socialMedia = socialMedia;
  // element giveButton
  var giveButton = (function (headerItem) {
      _inherits(giveButton, headerItem);
      function giveButton(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(giveButton.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, giveButton);
          this.wzElement = "giveButton";
      }
      return giveButton;
  })(headerItem);
  
  _md.giveButton = giveButton;
  // element footerItem
  var footerItem = (function (comment) {
      _inherits(footerItem, comment);
      function footerItem(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(footerItem.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, footerItem);
          this.wzElement = "footerItem";
          // relation footerItem
          this.footerItems = [];
      }
      footerItem.prototype.addFooterItem = function(name, sourceLineInfo) {
          var retval = new _md.footerItem(name, sourceLineInfo);
          retval.wzParent = this;
          this.footerItems.push(retval);
          return retval;
      }
      footerItem.prototype.getFooterItem = function(name) {
          var found = null;
          this.footerItems.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      footerItem.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 5 && _ch == 'p') {
              if (name === 'press') {
                  return this.wzLoadToChildColl(child, _md.press, this.footerItems);
              }
          }
          if (_l == 6 && _ch == 'a') {
              if (name === 'awards') {
                  return this.wzLoadToChildColl(child, _md.awards, this.footerItems);
              }
          }
          if (_l == 6 && _ch == 'f') {
              if (name === 'footer') {
                  return this.wzLoadToChildColl(child, _md.footer, this.footerItems);
              }
          }
          if (_l == 7 && _ch == 'a') {
              if (name === 'aboutus') {
                  return this.wzLoadToChildColl(child, _md.aboutUs, this.footerItems);
              }
          }
          if (_l == 7 && _ch == 's') {
              if (name === 'sitemap') {
                  return this.wzLoadToChildColl(child, _md.siteMap, this.footerItems);
              }
          }
          if (_l == 9 && _ch == 'c') {
              if (name === 'copyright') {
                  return this.wzLoadToChildColl(child, _md.copyright, this.footerItems);
              }
          }
          if (_l == 9 && _ch == 's') {
              if (name === 'subfooter') {
                  return this.wzLoadToChildColl(child, _md.subFooter, this.footerItems);
              }
          }
          if (_l == 9 && _ch == 't') {
              if (name === 'termofuse') {
                  return this.wzLoadToChildColl(child, _md.termOfUse, this.footerItems);
              }
          }
          if (_l == 10 && _ch == 'f') {
              if (name === 'footeritem') {
                  return this.wzLoadToChildColl(child, _md.footerItem, this.footerItems);
              }
          }
          if (_l == 10 && _ch == 'n') {
              if (name === 'newsletter') {
                  return this.wzLoadToChildColl(child, _md.newsletter, this.footerItems);
              }
          }
          if (_l == 11 && _ch == 'c') {
              if (name === 'contactform') {
                  return this.wzLoadToChildColl(child, _md.contactForm, this.footerItems);
              }
          }
          if (_l == 11 && _ch == 'm') {
              if (name === 'minigallery') {
                  return this.wzLoadToChildColl(child, _md.miniGallery, this.footerItems);
              }
          }
          if (_l == 11 && _ch == 's') {
              if (name === 'seokeywords') {
                  return this.wzLoadToChildColl(child, _md.seoKeywords, this.footerItems);
              }
          }
          if (_l == 12 && _ch == 'c') {
              if (name === 'calltoaction') {
                  return this.wzLoadToChildColl(child, _md.callToAction, this.footerItems);
              }
          }
          if (_l == 13 && _ch == 'p') {
              if (name === 'popularrecent') {
                  return this.wzLoadToChildColl(child, _md.popularRecent, this.footerItems);
              }
          }
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      footerItem.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      footerItem.prototype.wzVerify = function(ctx) {
          var i, i_items=this.footerItems, i_len=this.footerItems.length, item;
          for (i=0; i<i_len; i++) {
              item = this.footerItems[i];
              item.wzVerify(ctx);
          }
          _md.comment.prototype.wzVerify.call(this, ctx);
      }
      footerItem.prototype.wzInitialize = function(ctx) {
          var i, i_items=this.footerItems, i_len=this.footerItems.length, item;
          for (i=0; i<i_len; i++) {
              item = this.footerItems[i];
              item.wzInitialize(ctx);
          }
          _md.comment.prototype.wzInitialize.call(this, ctx);
      }
      return footerItem;
  })(comment);
  
  _md.footerItem = footerItem;
  /**
      element footer
       https://icons8.com/articles/website-footer-design/
       https://mayvendev.com/blog/15-tips-for-creating-a-great-website-footer
  */
  var footer = (function (footerItem) {
      _inherits(footer, footerItem);
      function footer(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(footer.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, footer);
          this.wzElement = "footer";
      }
      return footer;
  })(footerItem);
  
  _md.footer = footer;
  // element subFooter
  var subFooter = (function (footerItem) {
      _inherits(subFooter, footerItem);
      function subFooter(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(subFooter.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, subFooter);
          this.wzElement = "subFooter";
      }
      return subFooter;
  })(footerItem);
  
  _md.subFooter = subFooter;
  // element copyright
  var copyright = (function (footerItem) {
      _inherits(copyright, footerItem);
      function copyright(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(copyright.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, copyright);
          this.wzElement = "copyright";
      }
      return copyright;
  })(footerItem);
  
  _md.copyright = copyright;
  // element newsletter
  var newsletter = (function (footerItem) {
      _inherits(newsletter, footerItem);
      function newsletter(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(newsletter.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, newsletter);
          this.wzElement = "newsletter";
      }
      return newsletter;
  })(footerItem);
  
  _md.newsletter = newsletter;
  // element contactForm
  var contactForm = (function (footerItem) {
      _inherits(contactForm, footerItem);
      function contactForm(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(contactForm.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, contactForm);
          this.wzElement = "contactForm";
      }
      return contactForm;
  })(footerItem);
  
  _md.contactForm = contactForm;
  // element press
  var press = (function (footerItem) {
      _inherits(press, footerItem);
      function press(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(press.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, press);
          this.wzElement = "press";
      }
      return press;
  })(footerItem);
  
  _md.press = press;
  // element siteMap
  var siteMap = (function (footerItem) {
      _inherits(siteMap, footerItem);
      function siteMap(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(siteMap.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, siteMap);
          this.wzElement = "siteMap";
      }
      return siteMap;
  })(footerItem);
  
  _md.siteMap = siteMap;
  // element termOfUse
  var termOfUse = (function (footerItem) {
      _inherits(termOfUse, footerItem);
      function termOfUse(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(termOfUse.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, termOfUse);
          this.wzElement = "termOfUse";
      }
      return termOfUse;
  })(footerItem);
  
  _md.termOfUse = termOfUse;
  // element aboutUs
  var aboutUs = (function (footerItem) {
      _inherits(aboutUs, footerItem);
      function aboutUs(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(aboutUs.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, aboutUs);
          this.wzElement = "aboutUs";
      }
      return aboutUs;
  })(footerItem);
  
  _md.aboutUs = aboutUs;
  // element seoKeywords
  var seoKeywords = (function (footerItem) {
      _inherits(seoKeywords, footerItem);
      function seoKeywords(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(seoKeywords.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, seoKeywords);
          this.wzElement = "seoKeywords";
      }
      return seoKeywords;
  })(footerItem);
  
  _md.seoKeywords = seoKeywords;
  // element miniGallery
  var miniGallery = (function (footerItem) {
      _inherits(miniGallery, footerItem);
      function miniGallery(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(miniGallery.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, miniGallery);
          this.wzElement = "miniGallery";
      }
      return miniGallery;
  })(footerItem);
  
  _md.miniGallery = miniGallery;
  // element awards
  var awards = (function (footerItem) {
      _inherits(awards, footerItem);
      function awards(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(awards.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, awards);
          this.wzElement = "awards";
      }
      return awards;
  })(footerItem);
  
  _md.awards = awards;
  // element popularRecent
  var popularRecent = (function (footerItem) {
      _inherits(popularRecent, footerItem);
      function popularRecent(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(popularRecent.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, popularRecent);
          this.wzElement = "popularRecent";
      }
      return popularRecent;
  })(footerItem);
  
  _md.popularRecent = popularRecent;
  // element callToAction
  var callToAction = (function (footerItem) {
      _inherits(callToAction, footerItem);
      function callToAction(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(callToAction.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, callToAction);
          this.wzElement = "callToAction";
      }
      return callToAction;
  })(footerItem);
  
  _md.callToAction = callToAction;
  // element panel
  var panel = (function (comment) {
      _inherits(panel, comment);
      function panel(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(panel.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, panel);
          this.wzElement = "panel";
          // relation panel
          this.panels = [];
          // relation widget
          this.widgets = [];
      }
      panel.prototype.addPanel = function(name, sourceLineInfo) {
          var retval = new _md.panel(name, sourceLineInfo);
          retval.wzParent = this;
          this.panels.push(retval);
          return retval;
      }
      panel.prototype.getPanel = function(name) {
          var found = null;
          this.panels.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      panel.prototype.addWidget = function(name, sourceLineInfo) {
          var retval = new _md.widget(name, sourceLineInfo);
          retval.wzParent = this;
          this.widgets.push(retval);
          return retval;
      }
      panel.prototype.getWidget = function(name) {
          var found = null;
          this.widgets.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      panel.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 4 && _ch == 'c') {
              if (name === 'card') {
                  return this.wzLoadToChildColl(child, _md.card, this.widgets);
              }
          }
          if (_l == 4 && _ch == 'f') {
              if (name === 'flex') {
                  return this.wzLoadToChildColl(child, _md.flex, this.panels);
              }
          }
          if (_l == 4 && _ch == 'g') {
              if (name === 'grid') {
                  return this.wzLoadToChildColl(child, _md.grid, this.panels);
              }
          }
          if (_l == 4 && _ch == 'm') {
              if (name === 'menu') {
                  return this.wzLoadToChildColl(child, _md.menu, this.widgets);
              }
          }
          if (_l == 5 && _ch == 'i') {
              if (name === 'image') {
                  return this.wzLoadToChildColl(child, _md.image, this.widgets);
              }
          }
          if (_l == 5 && _ch == 'p') {
              if (name === 'panel') {
                  return this.wzLoadToChildColl(child, _md.panel, this.panels);
              }
          }
          if (_l == 5 && _ch == 't') {
              if (name === 'table') {
                  return this.wzLoadToChildColl(child, _md.table, this.panels);
              }
          }
          if (_l == 6 && _ch == 'w') {
              if (name === 'widget') {
                  return this.wzLoadToChildColl(child, _md.widget, this.widgets);
              }
          }
          if (_l == 8 && _ch == 'g') {
              if (name === 'griditem') {
                  return this.wzLoadToChildColl(child, _md.gridItem, this.panels);
              }
          }
          if (_l == 8 && _ch == 'h') {
              if (name === 'headline') {
                  return this.wzLoadToChildColl(child, _md.headline, this.widgets);
              }
          }
          if (_l == 8 && _ch == 'm') {
              if (name === 'menuitem') {
                  return this.wzLoadToChildColl(child, _md.menuitem, this.widgets);
              }
          }
          if (_l == 9 && _ch == 'g') {
              if (name === 'grid-item') {
                  return this.wzLoadToChildColl(child, _md.gridItem, this.panels);
              }
          }
          if (_l == 9 && _ch == 'm') {
              if (name === 'menu-item') {
                  return this.wzLoadToChildColl(child, _md.menuitem, this.widgets);
              }
          }
          if (_l == 12 && _ch == 'c') {
              if (name === 'calltoaction') {
                  return this.wzLoadToChildColl(child, _md.callToAction, this.widgets);
              }
          }
          if (_l == 15 && _ch == 's') {
              if (name === 'supportingimage') {
                  return this.wzLoadToChildColl(child, _md.supportingImage, this.widgets);
              }
          }
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      panel.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      panel.prototype.wzVerify = function(ctx) {
          var i, i_items=this.panels, i_len=this.panels.length, item;
          for (i=0; i<i_len; i++) {
              item = this.panels[i];
              item.wzVerify(ctx);
          }
          var i, i_items=this.widgets, i_len=this.widgets.length, item;
          for (i=0; i<i_len; i++) {
              item = this.widgets[i];
              item.wzVerify(ctx);
          }
          _md.comment.prototype.wzVerify.call(this, ctx);
      }
      panel.prototype.wzInitialize = function(ctx) {
          var i, i_items=this.panels, i_len=this.panels.length, item;
          for (i=0; i<i_len; i++) {
              item = this.panels[i];
              item.wzInitialize(ctx);
          }
          var i, i_items=this.widgets, i_len=this.widgets.length, item;
          for (i=0; i<i_len; i++) {
              item = this.widgets[i];
              item.wzInitialize(ctx);
          }
          _md.comment.prototype.wzInitialize.call(this, ctx);
      }
      return panel;
  })(comment);
  
  _md.panel = panel;
  // element grid
  var grid = (function (panel) {
      _inherits(grid, panel);
      function grid(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(grid.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, grid);
          this.wzElement = "grid";
      }
      return grid;
  })(panel);
  
  _md.grid = grid;
  // element flex
  var flex = (function (panel) {
      _inherits(flex, panel);
      function flex(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(flex.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, flex);
          this.wzElement = "flex";
      }
      return flex;
  })(panel);
  
  _md.flex = flex;
  // element gridItem
  var gridItem = (function (panel) {
      _inherits(gridItem, panel);
      function gridItem(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(gridItem.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, gridItem);
          this.wzElement = "gridItem";
      }
      return gridItem;
  })(panel);
  
  _md.gridItem = gridItem;
  // element table
  var table = (function (panel) {
      _inherits(table, panel);
      function table(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(table.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, table);
          this.wzElement = "table";
      }
      return table;
  })(panel);
  
  _md.table = table;
  // element style
  var style = (function (comment) {
      _inherits(style, comment);
      function style(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(style.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, style);
          this.wzElement = "style";
          // relation style
          this.styles = [];
      }
      style.prototype.addStyle = function(name, sourceLineInfo) {
          var retval = new _md.style(name, sourceLineInfo);
          retval.wzParent = this;
          this.styles.push(retval);
          return retval;
      }
      style.prototype.getStyle = function(name) {
          var found = null;
          this.styles.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      style.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 5 && _ch == 'c') {
              if (name === 'color') {
                  return this.wzLoadToChildColl(child, _md.color, this.styles);
              }
          }
          if (_l == 5 && _ch == 's') {
              if (name === 'style') {
                  return this.wzLoadToChildColl(child, _md.style, this.styles);
              }
          }
          if (_l == 5 && _ch == 't') {
              if (name === 'theme') {
                  return this.wzLoadToChildColl(child, _md.theme, this.styles);
              }
          }
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      style.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      style.prototype.wzVerify = function(ctx) {
          var i, i_items=this.styles, i_len=this.styles.length, item;
          for (i=0; i<i_len; i++) {
              item = this.styles[i];
              item.wzVerify(ctx);
          }
          _md.comment.prototype.wzVerify.call(this, ctx);
      }
      style.prototype.wzInitialize = function(ctx) {
          var i, i_items=this.styles, i_len=this.styles.length, item;
          for (i=0; i<i_len; i++) {
              item = this.styles[i];
              item.wzInitialize(ctx);
          }
          _md.comment.prototype.wzInitialize.call(this, ctx);
      }
      return style;
  })(comment);
  
  _md.style = style;
  // element theme
  var theme = (function (style) {
      _inherits(theme, style);
      function theme(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(theme.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, theme);
          this.wzElement = "theme";
      }
      return theme;
  })(style);
  
  _md.theme = theme;
  // element color
  var color = (function (style) {
      _inherits(color, style);
      function color(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(color.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, color);
          this.wzElement = "color";
      }
      return color;
  })(style);
  
  _md.color = color;
  // element attribute
  var attribute = (function (comment) {
      _inherits(attribute, comment);
      function attribute(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(attribute.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, attribute);
          this.wzElement = "attribute";
      }
      return attribute;
  })(comment);
  
  _md.attribute = attribute;
  // element markup
  var markup = (function (comment) {
      _inherits(markup, comment);
      function markup(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(markup.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, markup);
          this.wzElement = "markup";
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.id = null
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.class = null
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.title = null
          // relation attribute
          this.attributes = [];
          // relation markup
          this.markups = [];
      }
      markup.prototype.addAttribute = function(name, sourceLineInfo) {
          var retval = new _md.attribute(name, sourceLineInfo);
          retval.wzParent = this;
          this.attributes.push(retval);
          return retval;
      }
      markup.prototype.getAttribute = function(name) {
          var found = null;
          this.attributes.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      markup.prototype.addMarkup = function(name, sourceLineInfo) {
          var retval = new _md.markup(name, sourceLineInfo);
          retval.wzParent = this;
          this.markups.push(retval);
          return retval;
      }
      markup.prototype.getMarkup = function(name) {
          var found = null;
          this.markups.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      markup.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 1 && _ch == '@') {
              if (name === '@') {
                  return this.wzLoadToChildColl(child, _md.attribute, this.attributes);
              }
          }
          if (_l == 1 && _ch == 'a') {
              if (name === 'a') {
                  return this.wzLoadToChildColl(child, _md.a, this.markups);
              }
          }
          if (_l == 1 && _ch == 'p') {
              if (name === 'p') {
                  return this.wzLoadToChildColl(child, _md.p, this.markups);
              }
          }
          if (_l == 2 && _ch == 'h') {
              if (name === 'h1') {
                  return this.wzLoadToChildColl(child, _md.h1, this.markups);
              }
              else if (name === 'h2') {
                  return this.wzLoadToChildColl(child, _md.h2, this.markups);
              }
              else if (name === 'h3') {
                  return this.wzLoadToChildColl(child, _md.h3, this.markups);
              }
              else if (name === 'h4') {
                  return this.wzLoadToChildColl(child, _md.h4, this.markups);
              }
          }
          if (_l == 2 && _ch == 'i') {
              if (name === 'id') {
                  this.id = child.v; return true;
              }
          }
          if (_l == 2 && _ch == 'l') {
              if (name === 'li') {
                  return this.wzLoadToChildColl(child, _md.li, this.markups);
              }
          }
          if (_l == 2 && _ch == 'u') {
              if (name === 'ul') {
                  return this.wzLoadToChildColl(child, _md.ul, this.markups);
              }
          }
          if (_l == 3 && _ch == 'd') {
              if (name === 'div') {
                  return this.wzLoadToChildColl(child, _md.div, this.markups);
              }
          }
          if (_l == 4 && _ch == 's') {
              if (name === 'span') {
                  return this.wzLoadToChildColl(child, _md.span, this.markups);
              }
          }
          if (_l == 5 && _ch == 'c') {
              if (name === 'class') {
                  this.class = child.v; return true;
              }
          }
          if (_l == 5 && _ch == 't') {
              if (name === 'title') {
                  this.title = child.v; return true;
              }
          }
          if (_l == 6 && _ch == 'm') {
              if (name === 'markup') {
                  return this.wzLoadToChildColl(child, _md.markup, this.markups);
              }
          }
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      markup.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      markup.prototype.wzVerify = function(ctx) {
          var i, i_items=this.attributes, i_len=this.attributes.length, item;
          for (i=0; i<i_len; i++) {
              item = this.attributes[i];
              item.wzVerify(ctx);
          }
          var i, i_items=this.markups, i_len=this.markups.length, item;
          for (i=0; i<i_len; i++) {
              item = this.markups[i];
              item.wzVerify(ctx);
          }
          _md.comment.prototype.wzVerify.call(this, ctx);
      }
      markup.prototype.wzInitialize = function(ctx) {
          var i, i_items=this.attributes, i_len=this.attributes.length, item;
          for (i=0; i<i_len; i++) {
              item = this.attributes[i];
              item.wzInitialize(ctx);
          }
          var i, i_items=this.markups, i_len=this.markups.length, item;
          for (i=0; i<i_len; i++) {
              item = this.markups[i];
              item.wzInitialize(ctx);
          }
          _md.comment.prototype.wzInitialize.call(this, ctx);
      }
      return markup;
  })(comment);
  
  _md.markup = markup;
  // element div
  var div = (function (markup) {
      _inherits(div, markup);
      function div(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(div.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, div);
          this.wzElement = "div";
      }
      return div;
  })(markup);
  
  _md.div = div;
  // element p
  var p = (function (markup) {
      _inherits(p, markup);
      function p(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(p.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, p);
          this.wzElement = "p";
      }
      return p;
  })(markup);
  
  _md.p = p;
  // element span
  var span = (function (markup) {
      _inherits(span, markup);
      function span(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(span.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, span);
          this.wzElement = "span";
      }
      return span;
  })(markup);
  
  _md.span = span;
  // element ul
  var ul = (function (markup) {
      _inherits(ul, markup);
      function ul(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(ul.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, ul);
          this.wzElement = "ul";
      }
      return ul;
  })(markup);
  
  _md.ul = ul;
  // element li
  var li = (function (markup) {
      _inherits(li, markup);
      function li(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(li.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, li);
          this.wzElement = "li";
      }
      return li;
  })(markup);
  
  _md.li = li;
  // element a
  var a = (function (markup) {
      _inherits(a, markup);
      function a(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(a.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, a);
          this.wzElement = "a";
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.href = null
      }
      a.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 4 && _ch == 'h') {
              if (name === 'href') {
                  this.href = child.v; return true;
              }
          }
          ok = _md.markup.prototype.loadChild.call(this, child);
          return ok;
      }
      a.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      return a;
  })(markup);
  
  _md.a = a;
  // element h1
  var h1 = (function (markup) {
      _inherits(h1, markup);
      function h1(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(h1.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, h1);
          this.wzElement = "h1";
      }
      return h1;
  })(markup);
  
  _md.h1 = h1;
  // element h2
  var h2 = (function (markup) {
      _inherits(h2, markup);
      function h2(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(h2.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, h2);
          this.wzElement = "h2";
      }
      return h2;
  })(markup);
  
  _md.h2 = h2;
  // element h3
  var h3 = (function (markup) {
      _inherits(h3, markup);
      function h3(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(h3.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, h3);
          this.wzElement = "h3";
      }
      return h3;
  })(markup);
  
  _md.h3 = h3;
  // element h4
  var h4 = (function (markup) {
      _inherits(h4, markup);
      function h4(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(h4.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, h4);
          this.wzElement = "h4";
      }
      return h4;
  })(markup);
  
  _md.h4 = h4;
  // element widget
  var widget = (function (comment) {
      _inherits(widget, comment);
      function widget(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(widget.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, widget);
          this.wzElement = "widget";
      }
      widget.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          ok = _md.comment.prototype.loadChild.call(this, child);
          return ok;
      }
      widget.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      return widget;
  })(comment);
  
  _md.widget = widget;
  // element headline
  var headline = (function (widget) {
      _inherits(headline, widget);
      function headline(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(headline.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, headline);
          this.wzElement = "headline";
      }
      return headline;
  })(widget);
  
  _md.headline = headline;
  // element callToAction
  var callToAction = (function (widget) {
      _inherits(callToAction, widget);
      function callToAction(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(callToAction.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, callToAction);
          this.wzElement = "callToAction";
      }
      return callToAction;
  })(widget);
  
  _md.callToAction = callToAction;
  // element supportingImage
  var supportingImage = (function (widget) {
      _inherits(supportingImage, widget);
      function supportingImage(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(supportingImage.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, supportingImage);
          this.wzElement = "supportingImage";
      }
      return supportingImage;
  })(widget);
  
  _md.supportingImage = supportingImage;
  // element card
  var card = (function (widget) {
      _inherits(card, widget);
      function card(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(card.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, card);
          this.wzElement = "card";
      }
      return card;
  })(widget);
  
  _md.card = card;
  // element image
  var image = (function (widget) {
      _inherits(image, widget);
      function image(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(image.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, image);
          this.wzElement = "image";
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.src = null
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.title = null
      }
      image.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 3 && _ch == 's') {
              if (name === 'src') {
                  this.src = child.v; return true;
              }
          }
          if (_l == 5 && _ch == 't') {
              if (name === 'title') {
                  this.title = child.v; return true;
              }
          }
          ok = _md.widget.prototype.loadChild.call(this, child);
          return ok;
      }
      image.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      return image;
  })(widget);
  
  _md.image = image;
  // element menu
  var menu = (function (widget) {
      _inherits(menu, widget);
      function menu(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(menu.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, menu);
          this.wzElement = "menu";
          // relation menuitem
          this.menuitems = [];
      }
      menu.prototype.addMenuitem = function(name, sourceLineInfo) {
          var retval = new _md.menuitem(name, sourceLineInfo);
          retval.wzParent = this;
          this.menuitems.push(retval);
          return retval;
      }
      menu.prototype.getMenuitem = function(name) {
          var found = null;
          this.menuitems.forEach(function(item) {
              found = found || (item.wzName === name ? item : null);
          });
          return found;
      }
      menu.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 8 && _ch == 'm') {
              if (name === 'menuitem') {
                  return this.wzLoadToChildColl(child, _md.menuitem, this.menuitems);
              }
          }
          if (_l == 9 && _ch == 'm') {
              if (name === 'menu-item') {
                  return this.wzLoadToChildColl(child, _md.menuitem, this.menuitems);
              }
          }
          ok = _md.widget.prototype.loadChild.call(this, child);
          return ok;
      }
      menu.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      menu.prototype.wzVerify = function(ctx) {
          var i, i_items=this.menuitems, i_len=this.menuitems.length, item;
          for (i=0; i<i_len; i++) {
              item = this.menuitems[i];
              item.wzVerify(ctx);
          }
          _md.widget.prototype.wzVerify.call(this, ctx);
      }
      menu.prototype.wzInitialize = function(ctx) {
          var i, i_items=this.menuitems, i_len=this.menuitems.length, item;
          for (i=0; i<i_len; i++) {
              item = this.menuitems[i];
              item.wzInitialize(ctx);
          }
          _md.widget.prototype.wzInitialize.call(this, ctx);
      }
      return menu;
  })(widget);
  
  _md.menu = menu;
  // element menuitem
  var menuitem = (function (widget) {
      _inherits(menuitem, widget);
      function menuitem(name, sourceLineInfo) {
          _get(Object.getPrototypeOf(menuitem.prototype), 'constructor', this).call(this, name,sourceLineInfo);
          _classCallCheck(this, menuitem);
          this.wzElement = "menuitem";
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.url = null
          // TODO avoid this declaration, attributes should be tested for undefined not null
          // set this.title = null
          // relation image
          this.image = null;
      }
      menuitem.prototype.loadChild = function(child) {
          // Make test case insensitive
          var item,
              ok = false,
              name = child.n.toLowerCase(),
              _l = name.length,
              _ch = name[0];
          if (_l == 3 && _ch == 'u') {
              if (name === 'url') {
                  this.url = child.v; return true;
              }
          }
          if (_l == 5 && _ch == 'i') {
              if (name === 'image') {
                  return this.wzLoadOneToOne(child, _md.image, 'image');
              }
          }
          if (_l == 5 && _ch == 't') {
              if (name === 'title') {
                  this.title = child.v; return true;
              }
          }
          ok = _md.widget.prototype.loadChild.call(this, child);
          return ok;
      }
      menuitem.prototype.loadFromNode = function(node) {
          var loaded = false;
          // TODO VIA after transition to node.children
          var children = node.children;
          var i, i_items=children, i_len=children.length, item;
          for (i=0; i<i_len; i++) {
              item = children[i];
              loaded = this.loadChild(item);
              if (!loaded) {
                  throw new _md.siteModelException("Tag not recognized: " + item.n, item, this);
              }
          }
      }
      menuitem.prototype.wzVerify = function(ctx) {
          if (this.image != null) {
              this.image.wzVerify(ctx);
          }
          _md.widget.prototype.wzVerify.call(this, ctx);
      }
      menuitem.prototype.wzInitialize = function(ctx) {
          if (this.image != null) {
              this.image.wzInitialize(ctx);
          }
          _md.widget.prototype.wzInitialize.call(this, ctx);
      }
      return menuitem;
  })(widget);
  
  _md.menuitem = menuitem;
  _md.__tagElementMapping = { '#': 'comment', 'grid-item': 'gridItem', 'griditem': 'gridItem', '@': 'attribute', 'menu-item': 'menuitem', 'context-model': 'contextModel', 'contextmodel': 'contextModel' };
  // model/replaceUnknownElement( )
  var siteModelException = (function () {
      function siteModelException(message, node, instance) {
          _classCallCheck(this, siteModelException);
          // TODO node seems superflous
          if (node && instance) {
              this.message = message + ', wzElement: ' + node.wzElement + ', wzName:' + (node.wzName || '') + ', row:' + node.r + ', col:' + node.c + ', source:' + instance.wzSourceFilepath(node.u);
              this.errorLines = instance.wzSourceErrorLines(node, message);
          }
          else if (instance) {
              this.message = message + instance.wzSourceLineInfo.toString(instance);
          }
          else {
              this.message = message;
          }
          console.log('message', this.message);
          this.stack = (new Error()).stack;
          this.node = node;
      }
      return siteModelException;
  })();
  
  _md.siteModelException = siteModelException;
  var siteContext = (function () {
      function siteContext() {
          _classCallCheck(this, siteContext);
          this.validationErrors = [];
      }
      siteContext.prototype.schemaIsValid = function() {
          return this.validationErrors.length == 0;
      }
      siteContext.prototype.addError = function(message, node) {
          var at = node ? ' At ' + node.wzSourceLineInfo.toString(node) : '';
          this.validationErrors.push(message + at);
      }
      return siteContext;
  })();
  
  _md.siteContext = siteContext;
  function parsestring(value, defaultValue, node) {
      if (isEmpty( value )) {
          return defaultValue;
      }
      return value;
  }
  function isString(value) {
      return (typeof value === 'string' || value instanceof String);
  }
  function isEmpty(value) {
      return !isString( value ) || value.length === 0;
  }
  function isBoolean(value) {
      return value === 'true' || value === 'false';
  }
  
  