@livinglogic/livingapi 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import*as e from"/npm/@livinglogic/ul4@1.16.1/dist/esm/ul4.js";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var o,r=_getPrototypeOf(e);if(t){var l=_getPrototypeOf(this).constructor;o=Reflect.construct(r,arguments,l)}else o=r.apply(this,arguments);return _possibleConstructorReturn(this,o)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,o){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,o){var r=_superPropBase(e,t);if(r){var l=Object.getOwnPropertyDescriptor(r,t);return l.get?l.get.call(o):l.value}})(e,t,o||e)}function set(e,t,o,r){return(set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,o,r){var l,n=_superPropBase(e,t);if(n){if((l=Object.getOwnPropertyDescriptor(n,t)).set)return l.set.call(r,o),!0;if(!l.writable)return!1}if(l=Object.getOwnPropertyDescriptor(r,t)){if(!l.writable)return!1;l.value=o,Object.defineProperty(r,t,l)}else!function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}(r,t,o);return!0})(e,t,o,r)}function _set(e,t,o,r,l){if(!set(e,t,o,r||e)&&l)throw new Error("failed to set property");return o}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==o)return;var r,l,n=[],a=!0,i=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(n.push(r.value),!t||n.length!==t);a=!0);}catch(e){i=!0,l=e}finally{try{a||null==o.return||o.return()}finally{if(i)throw l}}return n}(e,t)||_unsupportedIterableToArray(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function _createForOfIteratorHelper(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,n=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return n=e.done,e},e:function(e){a=!0,l=e},f:function(){try{n||null==o.return||o.return()}finally{if(a)throw l}}}}var t="1.14.0";function element(t){for(var o=document.createElement(t),r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];for(var a=0,i=l;a<i.length;a++){var u=i[a];"string"==typeof u&&o.appendChild(document.createTextNode(u));var s=u instanceof Map,p=e._isobject(u);if(s||p){p&&(u=Object.entries(u));var c,_=_createForOfIteratorHelper(u);try{for(_.s();!(c=_.n()).done;){var h=_slicedToArray(c.value,2),y=h[0],d=h[1];null!==d&&o.setAttribute(y,d)}}catch(e){_.e(e)}finally{_.f()}}}return o}function _append_param_to_url(t,o,r){if(e._islist(r)||e._isset(r)){var l,n=_createForOfIteratorHelper(r);try{for(n.s();!(l=n.n()).done;){_append_param_to_url(t,o,l.value)}}catch(e){n.e(e)}finally{n.f()}}else"string"==typeof r?t.append(o,r):null!==r&&t.append(o,e._str(r))}function url_with_params(t){for(var o=new URLSearchParams,r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];for(var a=0,i=l;a<i.length;a++){var u=i[a];if(e._islist(u)&&2==u.length)_append_param_to_url.apply(void 0,[o].concat(_toConsumableArray(u)));else if("[object Object]"!==Object.prototype.toString.call(u)||u instanceof e.Proto){if(null!==u&&"object"===_typeof(u)&&"object"===_typeof(u.__proto__)&&u.__proto__===Map.prototype){var s,p=_createForOfIteratorHelper(u);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];_append_param_to_url(o,_,h)}}catch(e){p.e(e)}finally{p.f()}}}else for(var y in u)_append_param_to_url(o,y,u[y])}return(o=o.toString().replace("+","%20")).length>0&&(t+="?"+o),t}var o=function(t){_inherits(Base,e.Proto);var o=_createSuper(Base);function Base(e){var t;return _classCallCheck(this,Base),(t=o.call(this)).id=e,t}return _createClass(Base,[{key:"ul4onid",get:function get(){return this.id}},{key:"ul4ondump",value:function ul4ondump(e){for(var t=0;t<this._ul4onattrs.length;++t)e.dump(this._dumpUL4ONAttr(this._ul4onattrs[t]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return this[e]}},{key:"ul4onload",value:function ul4onload(e){for(var t=0,o=e.loadcontent();;++t){var r=o.next();if(r.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],r.value)}for(;t<this._ul4onattrs.length;++t)this._setDefaultUL4ONAttr(this._ul4onattrs[t])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){this[e]=null}},{key:e.symbols.getattr,value:function value(t){if(this._ul4attrs.has(t)){var value=this[t];if("function"==typeof value){var o=value.bind(this);return o._ul4_name=value._ul4_name||value.name,o._ul4_signature=value._ul4_signature,o._ul4_needsobject=value._ul4_needsobject,o._ul4_needscontext=value._ul4_needscontext,o}return value}if(t.startsWith("x_"))return this.hasOwnProperty(t)?this[t]:null;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,o){if(!t.startsWith("x_"))throw new e.AttributeError(this,t);this[t]=o}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Base}(),r=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}(),l=new(function(t){_inherits(GlobalsType,e.Type);var o=_createSuper(GlobalsType);function GlobalsType(){return _classCallCheck(this,GlobalsType),o.apply(this,arguments)}return _createClass(GlobalsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof n}}]),GlobalsType}())("la","Globals","Global information"),n=function(t){_inherits(Globals,o);var n=_createSuper(Globals);function Globals(e){var t;return _classCallCheck(this,Globals),(t=n.call(this,e)).version=null,t.hostname=null,t.platform=null,t.user=null,t.lang=null,t.datasources=null,t.app=null,t.record=null,t.mode=null,t.maxdbactions=null,t.maxtemplateruntime=null,t.flashmessages=null,t.view_template_id=null,t.email_template_id=null,t.handler=new r,t._log_stack=[],t._current_geo=null,t}return _createClass(Globals,[{key:e.symbols.type,value:function value(){return l}},{key:"dist",value:function dist(e,t){var o=function sqsin(e){return(e=Math.sin(e))*e},r=function sqsos(e){return(e=Math.cos(e))*e},l=Math.PI/180,n=1/298.257223563,a=e.lat*l,i=e.long*l,u=t.lat*l,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*l)/2,_=o(p)*r(c)+r(s)*o(c),h=r(p)*r(c)+o(s)*o(c),y=Math.atan(Math.sqrt(_/h)),d=2*y*6378.137;if(0===d)return d;var f=Math.sqrt(_*h)/y,v=(3*f+1)/(2*_);return d*(1+n*((3*f-1)/(2*h))*o(s)*r(p)-n*v*r(s)*o(p))}},{key:"scaled_url",value:function scaled_url(e,t,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"sm",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,p=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,c=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],_=null;e instanceof Vo&&(e=e.archive_url,(_=encodeURIComponent(e.filename))!=e.filename&&(_=null));var h="https://"+this.hostname;return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==r&&(h+="/rt:"+r),null!=t&&(h+="/w:"+t),null!=o&&(h+="/h:"+o),l&&(h+="/el:1"),null!=n&&(h+="/g:"+n),null!=a&&(h+="/q:"+a),null!==i&&i%360!=0&&(h+="/rot:"+rotatet),null!=u&&(h+="/bl:"+u),null!=s&&(h+="/sh:"+s),null!=p&&(h+="/f:"+p),null!=_&&(h+="/fn:"+_),h+="/plain/"+encodeURIComponent(e)}},{key:"qrcode_url",value:function qrcode_url(e,t){return"https://"+this.hostname+"/qr/generate?data="+encodeURIComponent(e)+"&size="+encodeURIComponent(t)}},{key:e.symbols.repr,value:function value(){return"<Globals version="+e._repr(this.version)+" mode="+e._repr(this.mode)+">"}},{key:"current_geo",value:function current_geo(){return this._current_geo}},{key:"set_current_geo",value:function set_current_geo(e){this._current_geo=new Go(this,e.coords.latitude,e.coords.longitude)}},{key:"_in_form",value:function _in_form(){return null!==this.mode&&this.mode.startsWith("form/")}},{key:"msg_bool",value:function msg_bool(e){switch(e){case!0:return this.msg_bool_true();case!1:return this.msg_bool_false();default:return null}}},{key:"msg_bool_true",value:function msg_bool_true(e){switch(this.lang){case"de":return"Ja";default:return"Yes"}}},{key:"msg_bool_false",value:function msg_bool_false(e){switch(this.lang){case"de":return"Nein";default:return"No"}}},{key:"msg_no_fields",value:function msg_no_fields(){switch(this.lang){case"de":return"(Keine Felder gefunden)";default:return"(No fields found)"}}},{key:"msg_nothing_selected",value:function msg_nothing_selected(){switch(this.lang){case"de":return"(Nichts ausgewählt)";default:return"(Nothing selected)"}}},{key:"_make_log_message",value:function _make_log_message(t){return t.map((function(t){return"string"!=typeof t?e._repr(t):t})).join(" ")}},{key:"begin_logging",value:function begin_logging(e){this._log_stack.push({header:e,output:!1})}},{key:"end_logging",value:function end_logging(){this._log_stack&&(this._log_stack[this._log_stack.length-1].output&&console&&console.groupEnd&&console.groupEnd(),this._log_stack.pop())}},{key:"group_logging",value:function group_logging(e,t){this.begin_logging(e);try{t()}finally{this.end_logging()}}},{key:"_start_log_message",value:function _start_log_message(){var e,t=_createForOfIteratorHelper(this._log_stack);try{for(t.s();!(e=t.n()).done;){var o=e.value;o.output||(console&&console.group&&console.group(o.header),o.output=!0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"log_debug",value:function log_debug(e){this._start_log_message(),console&&console.debug&&console.debug(this._make_log_message(e))}},{key:"log_info",value:function log_info(e){this._start_log_message(),console&&console.info&&console.info(this._make_log_message(e))}},{key:"log_warning",value:function log_warning(e){this._start_log_message(),console&&console.warn&&console.warn(this._make_log_message(e))}},{key:"log_error",value:function log_error(e){this._start_log_message(),console&&console.error&&console.error(this._make_log_message(e))}},{key:"my_apps_url",value:function my_apps_url(){return"https://"+this.hostname+"/apps.htm"}},{key:"my_tasks_url",value:function my_tasks_url(){return"https://"+this.hostname+"/xist4c/web/aufgaben_id_393_.htm"}},{key:"catalog_url",value:function catalog_url(){return"https://"+this.hostname+"/katalog/home.htm"}},{key:"chats_url",value:function chats_url(){return"https://"+this.hostname+"/chats.htm"}},{key:"profile_url",value:function profile_url(){return"https://"+this.hostname+"/profil/index.htm"}},{key:"account_url",value:function account_url(){return"https://"+this.hostname+"/account.htm"}},{key:"logout_url",value:function logout_url(){return"https://"+this.hostname+"/login.htm?logout=standardCug"}}]),Globals}();n.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","lang","datasources","hostname","app","record","mode","view_template_id","email_template_id","view_id"],n.prototype._ul4attrs=new Set(["version","hostname","platform","user","lang","datasources","app","record","maxdbactions","maxtemplateruntime","flashmessages","mode","scaled_url","qrcode_url","dist","current_geo","log_debug","log_info","log_warning","log_error","my_apps_url","my_tasks_url","catalog_url","chats_url","profile_url","account_url","logout_url"]),e.expose(n.prototype.log_debug,["message","*"]),e.expose(n.prototype.log_info,["message","*"]),e.expose(n.prototype.log_warning,["message","*"]),e.expose(n.prototype.log_error,["message","*"]),e.expose(n.prototype.dist,["geo1","pk","geo2","pk"]),e.expose(n.prototype.current_geo,[]),e.expose(n.prototype.scaled_url,["image","p","width","p","height","p","type","k=","fill","enlarge","k=",!0,"gravity","k=","sm","quality","k=",null,"rotate","k=",null,"blur","k=",null,"sharpen","k=",null,"format","k=",null,"cache","k=",!0]);var a=new(function(t){_inherits(FlashMessageType,e.Type);var o=_createSuper(FlashMessageType);function FlashMessageType(){return _classCallCheck(this,FlashMessageType),o.apply(this,arguments)}return _createClass(FlashMessageType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof i}}]),FlashMessageType}())("la","FlashMessage","A flash message in a web page"),i=function(t){_inherits(FlashMessage,o);var r=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),r.apply(this,arguments)}return _createClass(FlashMessage,[{key:e.symbols.type,value:function value(){return a}},{key:e.symbols.repr,value:function value(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();i.prototype._ul4onattrs=["timestamp","type","title","message"],i.prototype._ul4attrs=new Set(["timestamp","type","title","message"]);var u=new(function(t){_inherits(AppType,e.Type);var o=_createSuper(AppType);function AppType(){return _classCallCheck(this,AppType),o.apply(this,arguments)}return _createClass(AppType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof s}}]),AppType}())("la","App","A LivingApps application"),s=function(t){_inherits(App,o);var r=_createSuper(App);function App(){return _classCallCheck(this,App),r.apply(this,arguments)}return _createClass(App,[{key:e.symbols.type,value:function value(){return u}},{key:e.symbols.repr,value:function value(){return"<App id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"insert",value:function insert(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=this[e.symbols.call](t);return this.globals.handler.save(this),o}},{key:"template_url",value:function template_url(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2?arguments[2]:void 0,r="https://"+this.globals.hostname+"/gateway/apps/"+this.id;return null!==t&&(r+="/"+t.id),url_with_params(r,["template",e],o)}},{key:"new_embedded_url",value:function new_embedded_url(e){return url_with_params("https://"+this.globals.hostname+"/dateneingabe/"+this.id+"/new",e)}},{key:"new_standalone_url",value:function new_standalone_url(e){return url_with_params("https://"+this.globals.hostname+"/gateway/apps/"+this.id+"/new",e)}},{key:"home_url",value:function home_url(){return"https://"+this.globals.hostname+"/apps/"+this.id+".htm"}},{key:"datamanagement_url",value:function datamanagement_url(){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id}},{key:"import_url",value:function import_url(){return"https://"+this.globals.hostname+"/import-export/"+this.id+".htm"}},{key:"tasks_url",value:function tasks_url(){return"https://"+this.globals.hostname+"/_id_1073_.htm?uuid="+this.id+"&dId="+this.id+"&p_tpl_uuid="+this.id+"&resetInfo=true&templateIdentifier=created_task_"+this.id}},{key:"datamanagement_config_url",value:function datamanagement_config_url(){return"https://"+this.globals.hostname+"/datenmanagement-konfigurieren/"+this.id+".htm"}},{key:"permissions_url",value:function permissions_url(){return"https://"+this.globals.hostname+"/_id_833_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true"}},{key:"datamanageview_url",value:function datamanageview_url(e){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id+"_datamanage_master_"+e}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:e.symbols.call,value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new v(null,this);if(e._ismap(t)){var r,l=_createForOfIteratorHelper(t.keys());try{for(l.s();!(r=l.n()).done;){var n=r.value;if(!o.fields.has(n))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(n))}}catch(e){l.e(e)}finally{l.f()}o._make_fields(!0,t,null,null)}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var a in t)if(!o.fields.has(a))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(a));o._make_fields(!0,new Map(e._list(e.dicttype.items(t))),null,null)}return o}},{key:e.symbols.getattr,value:function value(t){if(t.startsWith("c_")){if(!this.controls.has(t.substr(2)))throw new e.AttributeError(this,t);return this.controls.get(t.substr(2))}if(t.startsWith("lc_")){if(null===this.layout_controls||!this.layout_controls.has(t.substr(3)))throw new e.AttributeError(this,t);return this.layout_controls.get(t.substr(3))}if(t.startsWith("p_")&&null!==this.params){if(!this.params.has(t.substr(2)))throw new e.AttributeError(this,t);return this.params.get(t.substr(2))}if(t.startsWith("pv_")&&null!==this.params){if(!this.params.has(t.substr(3)))throw new e.AttributeError(this,t);return this.params.get(t.substr(3)).value}return _get(_getPrototypeOf(App.prototype),e.symbols.getattr,this).call(this,t)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(t){if(null===t);else if("string"==typeof t){if(null===this.views||!this.views.has(t))throw new e.ValueError("View "+e._repr(t)+" not found!");t=this.views.get(t)}else{if(!(t instanceof c))throw new e.TypeError(e._repr(t)+" is not a view!");if(t.app!==this)throw new e.ValueError("View "+e._repr(t)+" belongs to the wrong app!")}this._active_view=t}},{key:"layout_controls",get:function get(){return null===this.active_views?new Map:this.active_view.layout_controls}}]),App}();s.prototype._ul4onattrs=["globals","name","description","lang","gramgen","typename_nom_sin","typename_gen_sin","typename_dat_sin","typename_acc_sin","typename_nom_plu","typename_gen_plu","typename_dat_plu","typename_acc_plu","startlink","image","createdby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view","datasource","menus","panels"],s.prototype._ul4attrs=new Set(["id","globals","name","description","lang","gramgen","typename_nom_sin","typename_gen_sin","typename_dat_sin","typename_acc_sin","typename_nom_plu","typename_gen_plu","typename_dat_plu","typename_acc_plu","startlink","image","createdat","createdby","updatedat","updatedby","controls","layout_controls","records","recordcount","installation","categories","params","views","menus","panels","datasource","datamanagement_identifier","insert","favorite","_active_view","template_url","new_embedded_url","new_standalone_url","home_url","datamanagement_url","import_url","tasks_url","datamanagement_config_url","permissions_url","datamanageview_url"]),e.expose(s.prototype[e.symbols.call],["values","**"],{needsobject:!0}),e.expose(s.prototype.insert,["values","**"],{needsobject:!0}),e.expose(s.prototype.template_url,["identifier","p","record","p=",null,"params","**"]),e.expose(s.prototype.new_embedded_url,["params","**"]),e.expose(s.prototype.new_standalone_url,["params","**"]);var p=new(function(t){_inherits(ViewType,e.Type);var o=_createSuper(ViewType);function ViewType(){return _classCallCheck(this,ViewType),o.apply(this,arguments)}return _createClass(ViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof c}}]),ViewType}())("la","View","An input form for a LivingViews application"),c=function(t){_inherits(View,o);var r=_createSuper(View);function View(){return _classCallCheck(this,View),r.apply(this,arguments)}return _createClass(View,[{key:"globals",get:function get(){return this.app.globals}},{key:e.symbols.type,value:function value(){return p}},{key:e.symbols.repr,value:function value(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();c.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"],c.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"]);var _=new(function(t){_inherits(DataSourceType,e.Type);var o=_createSuper(DataSourceType);function DataSourceType(){return _classCallCheck(this,DataSourceType),o.apply(this,arguments)}return _createClass(DataSourceType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof h}}]),DataSourceType}())("la","DataSource","The data resulting from a data source configuration"),h=function(t){_inherits(DataSource,o);var r=_createSuper(DataSource);function DataSource(){return _classCallCheck(this,DataSource),r.apply(this,arguments)}return _createClass(DataSource,[{key:e.symbols.type,value:function value(){return _}},{key:e.symbols.repr,value:function value(){return"<DataSource id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSource}();h.prototype._ul4onattrs=["identifier","app","apps"],h.prototype._ul4attrs=new Set(["id","identifier","app","apps"]),new(function(t){_inherits(DataSourceChildrenType,e.Type);var o=_createSuper(DataSourceChildrenType);function DataSourceChildrenType(){return _classCallCheck(this,DataSourceChildrenType),o.apply(this,arguments)}return _createClass(DataSourceChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof y}}]),DataSourceChildrenType}())("la","DataSourceChildren","A master/detail specification in a data source");var y=function(t){_inherits(DataSourceChildren,o);var r=_createSuper(DataSourceChildren);function DataSourceChildren(){return _classCallCheck(this,DataSourceChildren),r.apply(this,arguments)}return _createClass(DataSourceChildren,[{key:e.symbols.type,value:function value(){return datasourcetypechildren}},{key:e.symbols.repr,value:function value(){return"<DataSourceChildren id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceChildren}();y.prototype._ul4onattrs=["datasource","identifier","control"],y.prototype._ul4attrs=new Set(["id","identifier","datasource","control"]),new(function(t){_inherits(RecordChildrenType,e.Type);var o=_createSuper(RecordChildrenType);function RecordChildrenType(){return _classCallCheck(this,RecordChildrenType),o.apply(this,arguments)}return _createClass(RecordChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof d}}]),RecordChildrenType}())("la","RecordChildren","The child records of a master record");var d=function(t){_inherits(RecordChildren,o);var r=_createSuper(RecordChildren);function RecordChildren(){return _classCallCheck(this,RecordChildren),r.apply(this,arguments)}return _createClass(RecordChildren,[{key:e.symbols.type,value:function value(){return recordtypechildren}},{key:e.symbols.repr,value:function value(){return"<RecordChildren id="+e._repr(this.id)+">"}}]),RecordChildren}();d.prototype._ul4onattrs=["record","datasourcechildren","records"],d.prototype._ul4attrs=new Set(["id","record","datasourcechildren","records"]);var f=new(function(t){_inherits(RecordType,e.Type);var o=_createSuper(RecordType);function RecordType(){return _classCallCheck(this,RecordType),o.apply(this,arguments)}return _createClass(RecordType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof v}}]),RecordType}())("la","Record","A record of a LivingApp application"),v=function(t){_inherits(Record,o);var r=_createSuper(Record);function Record(e,t){var o;return _classCallCheck(this,Record),(o=r.call(this,e)).app=t,o.createdat=null,o.createdby=null,o.updatedat=null,o.updatedby=null,o.updatecount=0,o._sparsevalues=new Map,o._values=null,o._fields=null,o.details=new Map,o._children=null,o.attachments=null,o.errors=[],o._sparsefielderrors=null,o._sparsefieldlookupdata=null,o._is_deleted=!1,o._is_new=!0,o}return _createClass(Record,[{key:e.symbols.type,value:function value(){return f}},{key:"as_text",value:function as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0==e)return"...";var o,r=[],l=_createForOfIteratorHelper(t||this.app.controls);try{for(l.s();!(o=l.n()).done;){var n=_slicedToArray(o.value,2),a=n[0],i=n[1];if(null!==t||i.priority){var u=this.fields.get(a).value_as_text(e-1);null!==u&&r.push([i.label,u])}}}catch(e){l.e(e)}finally{l.f()}if(0===r.length)return this.globals.msg_no_fields();if(1===r.length)return r[0][1];for(var s=[],p=0,c=r;p<c.length;p++){var _=_slicedToArray(c[p],2),h=_[0],y=_[1];s.push(h+": "+y)}return s.join(", ")}},{key:"_make_fields",value:function _make_fields(e,t,o,r){var l,n=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(l=a.n()).done;){var i=l.value,u=i.identifier,s=null;null!==t&&(e&&!t.has(u)?s=i.default:t.has(u)&&(s=t.get(u)));var p=new i.fieldtype(i,this,s);n.set(u,p),null!==o&&o.has(u)&&(p.errors=o.get(u)),null!==r&&r.has(u)&&(p.lookupdata=r.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=n,this._sparsevalues=null,this._sparsefielderrors=null,this._sparselookupdata=null}},{key:"_in_form",value:function _in_form(){var e=this.app.globals;return e._in_form()&&this===e.record}},{key:e.symbols.repr,value:function value(){var t,o=["<Record id=",e._repr(this.id)],r=_createForOfIteratorHelper(this.fields.values());try{for(r.s();!(t=r.n()).done;){var l=t.value;l.control.priority&&!l.is_empty()&&(o.push(" v_"),o.push(l.control.identifier),o.push("="),o.push(e._repr(l.value)))}}catch(e){r.e(e)}finally{r.f()}return o.push(" state="),o.push(e._repr(this.state)),o.push(">"),o.join("")}},{key:"state",get:function get(){return this._is_deleted?"deleted":this._is_new?"new":this.is_dirty()?"dirty":"saved"}},{key:"values",get:function get(){if(null===this._values){this._values=new Map;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){var o=e.value;this._values.set(o.control.identifier,o.value)}}catch(e){t.e(e)}finally{t.f()}}return this._values}},{key:"fields",get:function get(){return null===this._fields&&this._make_fields(!1,this._sparsevalues,this._sparsefielderrors,this._sparsefieldlookupdata),this._fields}},{key:"children",get:function get(){if(null===this._children){this._children=new Map;var e,t=_createForOfIteratorHelper(this.details.values());try{for(t.s();!(e=t.n()).done;){var o=e.value;this._children.set(o.datasourcechildren.identifier,o.records)}}catch(e){t.e(e)}finally{t.f()}}return this._children}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.is_dirty())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.has_errors())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"delete",value:function _delete(){var e=this.app.globals.handler.delete(this);return this._is_deleted=!0,e}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._ismap(t)){var o,r=_createForOfIteratorHelper(t.entries());try{for(r.s();!(o=r.n()).done;){var l=_slicedToArray(o.value,2),n=l[0],a=l[1];if(!this.fields.has(n))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(n));fields.get(n).value=a}}catch(e){r.e(e)}finally{r.f()}}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var i in t){if(!this.fields.has(i))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(i));record.fields.get(i).value=t[i]}}this.app.globals.handler.save(this)}},{key:"template_url",value:function template_url(e,t){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id,["template",e],t)}},{key:"edit_embedded_url",value:function edit_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_standalone_url",value:function edit_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_url",value:function edit_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.edit_standalone_url(t):this.edit_embedded_url(t)}},{key:"display_embedded_url",value:function display_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_standalone_url",value:function display_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_url",value:function display_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.display_standalone_url(t):this.display_embedded_url(t)}},{key:"search",value:function search(t){for(var o in t){var r=t[o];if(e._bool(r)&&!this.fields.get(o).search(r))return!1}return!0}},{key:"ul4onload",value:function ul4onload(e){_get(_getPrototypeOf(Record.prototype),"ul4onload",this).call(this,e),this._is_new=!1}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"values"===e?this._sparsevalues:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"values"===e?(this._sparsevalues=t,this._values=null,this._fields=null):this[e]=t}},{key:e.symbols.getattr,value:function value(t){return t.startsWith("c_")?this.children.get(t.substr(2)):t.startsWith("d_")?this.details.get(t.substr(2)):t.startsWith("f_")?this.fields.get(t.substr(2)):t.startsWith("v_")?this.fields.get(t.substr(2)).value:_get(_getPrototypeOf(Record.prototype),e.symbols.getattr,this).call(this,t)}},{key:e.symbols.setattr,value:function value(t,o){t.startsWith("c_")?this.children[t.substr(2)]=o:t.startsWith("v_")?this.fields.get(t.substr(2)).value=o:_get(_getPrototypeOf(Record.prototype),e.symbols.setattr,this).call(this,t,o)}}]),Record}();v.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","details","errors","_sparsefielderrors","_sparsefieldlookupdata"],v.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","fields","attachments","details","children","errors","template_url","edit_embedded_url","edit_standalone_url"]),e.expose(v.prototype.is_dirty,[]),e.expose(v.prototype.has_errors,[]),e.expose(v.prototype.delete,[]),e.expose(v.prototype.save,[]),e.expose(v.prototype.update,["values","**"],{needsobject:!0}),e.expose(v.prototype.template_url,["identifier","p","params","**"]),e.expose(v.prototype.edit_embedded_url,["params","**"]),e.expose(v.prototype.edit_standalone_url,["params","**"]);var k=function(t){_inherits(FieldType,e.Type);var o=_createSuper(FieldType);function FieldType(){return _classCallCheck(this,FieldType),o.apply(this,arguments)}return _createClass(FieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof C}}]),FieldType}(),m=new k("la","Field","Holds the value of a field of a record (and related information)"),C=function(t){_inherits(Field,o);var r=_createSuper(Field);function Field(e,t,o){var l;return _classCallCheck(this,Field),(l=r.call(this,null)).control=e,l.record=t,l._label=null,l._lookupdata=null,l.errors=[],l._value=null,l._in_form()||(l.value=o),l._dirty=!1,l._enabled=!0,l._writable=!0,l._visible=!0,l._required=null,l._top=null,l._left=null,l}return _createClass(Field,[{key:e.symbols.type,value:function value(){return m}},{key:"value",get:function get(){return this._in_form()?this._get_dom_value():this._value}},{key:"value",set:function set(t){var o=this._value,r={value:t,errors:[]};this._validate(r),e._ne(o,r.value)&&(null!==this.record._values&&this.record._values.set(this.control.identifier,r.value),this._value=r.value,this._dirty=!0),this.errors=r.errors,this._in_form()&&this._set_dom_value(this._value)}},{key:"value_as_text",value:function value_as_text(){return null}},{key:"_validate",value:function _validate(e){}},{key:"_set_dom_label",value:function _set_dom_label(){this._in_form()&&(this._dom_label.textContent=this.label)}},{key:"mode",get:function get(){var e;return null!==(e=this._mode)&&void 0!==e?e:this.control.mode}},{key:"mode",set:function set(e){this._mode=e}},{key:"label",get:function get(){var e;return null!==(e=this._label)&&void 0!==e?e:this.control.label}},{key:"label",set:function set(e){this._label=e,this._set_dom_label()}},{key:"globals",get:function get(){return this.control.globals}},{key:"is_empty",value:function is_empty(){return null===this._value}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"add_error",value:function add_error(e){this.errors.push(e)}},{key:"set_error",value:function set_error(e){this.errors=null!==e?[e]:[]}},{key:"top",get:function get(){var e;return null!==(e=this._top)&&void 0!==e?e:this.control.top}},{key:"top",set:function set(e){this._top=e,this._in_form()&&(this._dom_root.style.top=this.top+"px")}},{key:"left",get:function get(){var e;return null!==(e=this._left)&&void 0!==e?e:this.control.left}},{key:"left",set:function set(e){this._left=e,this._in_form()&&(this._dom_root.style.left=this.left+"px")}},{key:"width",get:function get(){return this.control.width}},{key:"height",get:function get(){return this.control.width}},{key:"search",value:function search(e){return this.control.search(this.value,e)}},{key:"msg_field_required",value:function msg_field_required(e){switch(this.globals.lang){case"de":return'"'.concat(this.label,'" wird benötigt!');default:return'"'.concat(this.label,'" is required!')}}},{key:"msg_field_wrong_type",value:function msg_field_wrong_type(t){return'"'.concat(this.label,"\" doesn't support the type ").concat(e._type(t).name,"!")}},{key:"msg_bool_truerequired",value:function msg_bool_truerequired(e){return'"'.concat(this.label,'" only accepts "Yes"!')}},{key:"msg_string_tooshort",value:function msg_string_tooshort(e){return'"'.concat(this.label,'" is too short. You must use at least ').concat(this.control.minlength," characters!")}},{key:"msg_string_toolong",value:function msg_string_toolong(e){return'"'.concat(this.label,'" is too long. You may use at most ').concat(this.control.maxlength," characters!")}},{key:"msg_email_format",value:function msg_email_format(e){return'"'.concat(this.label,'" must be a valid email address!')}},{key:"msg_url_format",value:function msg_url_format(e){return'"'.concat(this.label,'" must be a valid URL!')}},{key:"msg_tel_format",value:function msg_tel_format(e){return'"'.concat(this.label,'" must be a valid phone number!')}},{key:"msg_date_format",value:function msg_date_format(e){return'"'.concat(this.label,"\" doesn't support this date format!")}},{key:"msg_number_format",value:function msg_number_format(e){return'"'.concat(this.label,"\" doesn't support this number format!")}},{key:"msg_lookup_wrongitem",value:function msg_lookup_wrongitem(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" can't be found!")}},{key:"_in_form",value:function _in_form(){return this.record._in_form()}},{key:"_sel_root",get:function get(){return"#livingapps-form ."+this.control._cssclass_root+".llft-id-"+this.control.identifier}},{key:"_sel_label",get:function get(){return this._sel_root+" label span"}},{key:"_sel_control",get:function get(){return this._sel_root+" "+this.control._cssclass_control}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"_dom_label",get:function get(){return document.querySelector(this._sel_label)}},{key:"_dom_control",get:function get(){return document.querySelector(this._sel_control)}},{key:"_dom_controls",get:function get(){return document.querySelectorAll(this._sel_control)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.value}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.value=null!==e?e:""}},{key:"visible",get:function get(){return this._visible}},{key:"visible",set:function set(e){this._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:"required",get:function get(){var e;return null!==(e=this._required)&&void 0!==e?e:this.control.required}},{key:"required",set:function set(e){this._required=e}},{key:"enabled",get:function get(){return this._in_form()?!this._dom_root.classList.contains("llft-control-readonly"):this._enabled}},{key:"enabled",set:function set(e){if(this._in_form()){var t,o=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.disabled=o}}catch(e){r.e(e)}finally{r.f()}this._dom_root.classList.toggle("llft-control-readonly",o)}this._enabled=e}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){this._writable=e}},{key:e.symbols.repr,value:function value(){var t="<"+this.constructor.name+" identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),this.errors.length>0&&(t+=" has_errors()=True"),t+=">"}},{key:e.symbols.setattr,value:function value(t,o){if("value"===t)this.value=o;else if("visible"===t)this.visible=e._bool(o);else if("enabled"===t)this.enabled=e._bool(o);else if("writable"===t)this.writable=e._bool(o);else if("required"===t)this.required=e._bool(o);else if("top"===t){if(null!==o&&"number"!=typeof o)throw new e.ArgumentError("top must be None or an int");this.top=o}else if("left"===t){if(null!==o&&"number"!=typeof o)throw new e.ArgumentError("left must be None or an int");this.left=o}else _get(_getPrototypeOf(Field.prototype),e.symbols.setattr,this).call(this,t,o)}}]),Field}();C.prototype._ul4onattrs=["control","record","label","value","errors","_visible","_enabled","_writable","_required"],C.prototype._ul4attrs=new Set(["control","record","label","value","mode","errors","visible","enabled","writable","required","top","left","width","height"]),C.prototype._inputevent="input";var g=new(function(e){_inherits(BoolFieldType,k);var t=_createSuper(BoolFieldType);function BoolFieldType(){return _classCallCheck(this,BoolFieldType),t.apply(this,arguments)}return _createClass(BoolFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof b}}]),BoolFieldType}())("la","BoolField","Holds the value of a bool field of a record (and related information)"),b=function(t){_inherits(BoolField,C);var o=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),o.apply(this,arguments)}return _createClass(BoolField,[{key:e.symbols.type,value:function value(){return g}},{key:"_validate",value:function _validate(e){null===e.value?this.control.required&&e.errors.push(this.msg_field_required(e.value)):"string"==typeof e.value?0===e.value.length?(this.control.required&&e.errors.push(this.msg_bool_truerequired(e.value)),e.value=null):["false","no","0","off"].includes(e.value.toLowerCase())?e.value=!1:e.value=!0:"boolean"==typeof e.value?this.control.required&&!e.value&&e.errors.push(this.msg_bool_truerequired(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.checked}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.checked=e}},{key:"value_as_text",value:function value_as_text(){return this.globals.msg_bool(this.value)}}]),BoolField}(),T=new(function(e){_inherits(IntFieldType,k);var t=_createSuper(IntFieldType);function IntFieldType(){return _classCallCheck(this,IntFieldType),t.apply(this,arguments)}return _createClass(IntFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof L}}]),IntFieldType}())("la","IntField","Holds the value of an int field of a record (and related information)"),L=function(t){_inherits(IntField,C);var o=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),o.apply(this,arguments)}return _createClass(IntField,[{key:e.symbols.type,value:function value(){return T}},{key:"_parse",value:function _parse(e){return/^\s*[-+]?\d+\s*$/.test(e)?parseInt(e):null}},{key:"_validate",value:function _validate(e){if(null===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value));else if("string"==typeof e.value){var t=this._parse(e.value);null!==t?e.value=t:e.errors.push(this.msg_number_format(e.value))}else"number"==typeof e.value?Math.round(e.value)!==e.value&&e.errors.push(this.msg_field_wrong_type(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(IntField.prototype),"_get_dom_value",this).call(this);if(e){var t=this._parse(e);null!==t&&(e=t)}return e}},{key:"_set_dom_value",value:function _set_dom_value(e){_get(_getPrototypeOf(IntField.prototype),"_set_dom_value",this).call(this,null!==e?e+"":"")}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null!=e?e+"":null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,o=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=o}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(IntField.prototype),"writable",e,this,!0)}}]),IntField}(),A=new(function(e){_inherits(NumberFieldType,k);var t=_createSuper(NumberFieldType);function NumberFieldType(){return _classCallCheck(this,NumberFieldType),t.apply(this,arguments)}return _createClass(NumberFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof w}}]),NumberFieldType}())("la","NumberField","Holds the value of a number field of a record (and related information)"),w=function(t){_inherits(NumberField,C);var o=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),o.apply(this,arguments)}return _createClass(NumberField,[{key:e.symbols.type,value:function value(){return A}},{key:"_parse",value:function _parse(e){if(null===e)return null;for(var t=e,o="",r=0,l=0,n=0;n<e.length;++n){var a=e[n];","==a?(r++,o+=a):"."==a&&(l++,o+=a)}var i=null;if(0==r)l<=1||(i="de");else if(1==r)i=1==l?".,"==o?"de":"en":"de";else{if(!(l<=1))return null;i="en"}"de"===i?t=t.replace(/\./g,"").replace(/,/g,"."):"en"===i&&(t=t.replace(/,/g,""));var u=parseFloat(t);return isNaN(u)?e:u}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if("string"==typeof t.value){var o=this._parse(t.value);null!==o?(o=this._bound_value(o),null!==this.control.precision&&(o=e._round(o,this.control.precision)),t.value=o):t.errors.push(this.msg_number_format(t.value))}else if("number"==typeof t.value){var r=this._bound_value(t.value);null!==this.control.precision&&(r=e._round(r,this.control.precision)),t.value=r}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_bound_value",value:function _bound_value(e){return null!==this.control.minimum&&e<this.control.minimum&&(e=this.control.minimum),null!==this.control.maximum&&e>this.control.maximum&&(e=this.control.maximum),e}},{key:"_get_dom_value",value:function _get_dom_value(){var t=_get(_getPrototypeOf(NumberField.prototype),"_get_dom_value",this).call(this);if(t){if("string"==typeof t){var o=this._parse(t);null!==o&&(t=o)}"number"==typeof t&&(null!==this.control.precision&&(t=e._round(t,this.control.precision)),t=this._bound_value(t))}else t=null;return t}},{key:"_set_dom_value",value:function _set_dom_value(e){"number"==typeof e?(e=this._bound_value(e),null!==this.control.precision&&(e=e.toFixed(this.control.precision))):null===e&&(e=""),e+="","de"==this.globals.lang&&null===this.control.precision&&(e=e.replace(".",",")),_get(_getPrototypeOf(NumberField.prototype),"_set_dom_value",this).call(this,e)}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:null!==this.control.precision?e.toFixed(this.control.precision):e.toString()}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,o=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=o}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(NumberField.prototype),"writable",e,this,!0)}}]),NumberField}(),S=function(e){_inherits(StringFieldType,k);var t=_createSuper(StringFieldType);function StringFieldType(){return _classCallCheck(this,StringFieldType),t.apply(this,arguments)}return _createClass(StringFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof x}}]),StringFieldType}(),M=new S("la","StringField","Holds the value of a string field of a record (and related information)"),x=function(t){_inherits(StringField,C);var o=_createSuper(StringField);function StringField(){return _classCallCheck(this,StringField),o.apply(this,arguments)}return _createClass(StringField,[{key:e.symbols.type,value:function value(){return M}},{key:"_validate",value:function _validate(e){if(null===e.value||""===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null;else if("string"==typeof e.value){var t=this.control.minlength,o=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==o&&e.value.length>o&&e.errors.push(this.msg_string_toolong(e.value))}else e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,o=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=o}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(StringField.prototype),"writable",e,this,!0)}},{key:"value_as_text",value:function value_as_text(){return this.value}}]),StringField}(),I=new(function(e){_inherits(PasswordFieldType,S);var t=_createSuper(PasswordFieldType);function PasswordFieldType(){return _classCallCheck(this,PasswordFieldType),t.apply(this,arguments)}return _createClass(PasswordFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof H}}]),PasswordFieldType}())("la","PasswordField","Holds the value of a string/password field of a record (and related information)"),H=function(t){_inherits(PasswordField,x);var o=_createSuper(PasswordField);function PasswordField(){return _classCallCheck(this,PasswordField),o.apply(this,arguments)}return _createClass(PasswordField,[{key:e.symbols.type,value:function value(){return I}}]),PasswordField}(),R=new(function(e){_inherits(EmailFieldType,S);var t=_createSuper(EmailFieldType);function EmailFieldType(){return _classCallCheck(this,EmailFieldType),t.apply(this,arguments)}return _createClass(EmailFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof O}}]),EmailFieldType}())("la","EmailField","Holds the value of a string/email field of a record (and related information)"),O=function(t){_inherits(EmailField,x);var o=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),o.apply(this,arguments)}return _createClass(EmailField,[{key:e.symbols.type,value:function value(){return R}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e.value)||e.errors.push(this.msg_email_format(e.value))}_get(_getPrototypeOf(EmailField.prototype),"_validate",this).call(this,e)}}]),EmailField}(),P=new(function(e){_inherits(URLFieldType,S);var t=_createSuper(URLFieldType);function URLFieldType(){return _classCallCheck(this,URLFieldType),t.apply(this,arguments)}return _createClass(URLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof D}}]),URLFieldType}())("la","URLField","Holds the value of a string/url field of a record (and related information)"),D=function(t){_inherits(URLField,x);var o=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),o.apply(this,arguments)}return _createClass(URLField,[{key:e.symbols.type,value:function value(){return P}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){var t=null;try{t=new URL(e.value)}catch(t){e.errors.push(this.msg_url_format(e.value))}null!==t&&"http:"!==t.protocol&&"https:"!==t.protocol&&e.errors.push(this.msg_url_format(e.value))}_get(_getPrototypeOf(URLField.prototype),"_validate",this).call(this,e)}}]),URLField}(),B=new(function(e){_inherits(TelFieldType,S);var t=_createSuper(TelFieldType);function TelFieldType(){return _classCallCheck(this,TelFieldType),t.apply(this,arguments)}return _createClass(TelFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof N}}]),TelFieldType}())("la","TelField","Holds the value of a string/tel field of a record (and related information)"),N=function(t){_inherits(TelField,x);var o=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),o.apply(this,arguments)}return _createClass(TelField,[{key:e.symbols.type,value:function value(){return B}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^\\+?[0-9 /()-]+$/.test(e.value)||e.errors.push(this.msg_tel_format(e.value))}_get(_getPrototypeOf(TelField.prototype),"_validate",this).call(this,e)}}]),TelField}(),U=new(function(e){_inherits(TextAreaFieldType,S);var t=_createSuper(TextAreaFieldType);function TextAreaFieldType(){return _classCallCheck(this,TextAreaFieldType),t.apply(this,arguments)}return _createClass(TextAreaFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof q}}]),TextAreaFieldType}())("la","TextAreaField","Holds the value of a string/textarea field of a record (and related information)"),q=function(t){_inherits(TextAreaField,x);var o=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),o.apply(this,arguments)}return _createClass(TextAreaField,[{key:e.symbols.type,value:function value(){return U}}]),TextAreaField}(),V=new(function(e){_inherits(HTMLFieldType,S);var t=_createSuper(HTMLFieldType);function HTMLFieldType(){return _classCallCheck(this,HTMLFieldType),t.apply(this,arguments)}return _createClass(HTMLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof E}}]),HTMLFieldType}())("la","HTMLField","Holds the value of a string/html field of a record (and related information)"),E=function(t){_inherits(HTMLField,x);var o=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),o.apply(this,arguments)}return _createClass(HTMLField,[{key:e.symbols.type,value:function value(){return V}}]),HTMLField}(),G=new(function(e){_inherits(GeoFieldType,k);var t=_createSuper(GeoFieldType);function GeoFieldType(){return _classCallCheck(this,GeoFieldType),t.apply(this,arguments)}return _createClass(GeoFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof j}}]),GeoFieldType}())("la","GeoField","Holds the value of a geo field of a record (and related information)"),j=function(t){_inherits(GeoField,C);var o=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),o.apply(this,arguments)}return _createClass(GeoField,[{key:e.symbols.type,value:function value(){return G}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var o=e.value;if(o.id.endsWith("_geoinfo")){var r=o.value;if(r)return r=JSON.parse(r),new Go(this.globals,r.geometry.coordinates[0],r.geometry.coordinates[1],r.properties.formatted_address)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){if(null===t){var o,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(o=r.n()).done;){o.value.value=null}}catch(e){r.e(e)}finally{r.f()}}else{var l,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(l=n.n()).done;){var a=l.value;if(a.id.endsWith("_geoinfo")){var i={type:"Feature",geometry:{coordinates:[t.lat,t.long]},properties:{formatted_address:t.info}};a.value=e._asjson(i)}else a.value=t.info}}catch(e){n.e(e)}finally{n.f()}}}},{key:"value_as_text",value:function value_as_text(){var e=this.value;if(null===this.value)return null;var t=e.lat.toFixed(5)+", "+e.long.toFixed(5);return null!==e.info&&(t+=" ("+e.info+")"),t}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof Go||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}();j.prototype._inputevent="llgeo";var W=function(e){_inherits(FileFieldType,k);var t=_createSuper(FileFieldType);function FileFieldType(){return _classCallCheck(this,FileFieldType),t.apply(this,arguments)}return _createClass(FileFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Y}}]),FileFieldType}(),z=new W("la","FileField","Holds the value of a file field of a record (and related information)"),Y=function(t){_inherits(FileField,C);var o=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),o.apply(this,arguments)}return _createClass(FileField,[{key:e.symbols.type,value:function value(){return z}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof Vo||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return null}},{key:"_set_dom_value",value:function _set_dom_value(){}}]),FileField}(),J=new(function(e){_inherits(FileSignatureFieldType,W);var t=_createSuper(FileSignatureFieldType);function FileSignatureFieldType(){return _classCallCheck(this,FileSignatureFieldType),t.apply(this,arguments)}return _createClass(FileSignatureFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof K}}]),FileSignatureFieldType}())("la","FileSignatureField","Holds the value of a file/signature field of a record (and related information)"),K=function(t){_inherits(FileSignatureField,Y);var o=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),o.apply(this,arguments)}return _createClass(FileSignatureField,[{key:e.symbols.type,value:function value(){return J}},{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(),$=function(e){_inherits(DateFieldBaseType,k);var t=_createSuper(DateFieldBaseType);function DateFieldBaseType(){return _classCallCheck(this,DateFieldBaseType),t.apply(this,arguments)}return _createClass(DateFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Q}}]),DateFieldBaseType}(),Z=new $("la","DateFieldBase","Holds the value of a date field of a record (and related information)"),Q=function(t){_inherits(DateFieldBase,C);var o=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),o.apply(this,arguments)}return _createClass(DateFieldBase,[{key:e.symbols.type,value:function value(){return Z}},{key:"value_as_text",value:function value_as_text(){var t=this.value;return null===t?null:"string"==typeof t?t:e._format(t,this.control.formatstring())}},{key:"_parse",value:function _parse(e,t){var o=null,r=null,l=null,n=0,a=0,i=0,u=null;function _int(e,t,o,r){return(e=e.substring(0,t)).length!=t?null:(e=parseInt(e,10),isNaN(e)||e<o||e>r?null:e)}for(;e;){if(!t)return null;if(t.startsWith("%Y")){if(null===(o=_int(e,4)))return null;e=e.substring(4),t=t.substring(2)}else if(t.startsWith("%y")){if(null===(o=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%m")){if(null===(r=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%d")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%H")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%I")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%M")){if(null===(a=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%S")){if(null===(i=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%p")){if(e.toLowerCase().startsWith("pm"))u=!0;else{if(!e.toLowerCase().startsWith("am"))return null;u=!1}e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%%")){if(!e.startsWith("%"))return null;e=e.substring(1),t=t.substring(2)}else if(t.startsWith("%z")){if(!e.startsWith("-")&&!e.startsWith("+"))return null;if(null===_int(e=e.substring(1),2))return null;if(!(e=e.substring(2)).startsWith(":"))return null;if(null===_int(e=e.substring(1),2))return null;e=e.substring(2),t=t.substring(2)}else{if(!e.startsWith(t.substring(0,1)))return null;e=e.substring(1),t=t.substring(1)}}if(t)return null;if(null===o)return null;if(null===r||r<1||r>12)return null;if(null===l||l<1||l>31)return null;if(null===u){if(n<0||n>23)return null}else{if(n<0||n>11)return null;u&&(n+=12)}return a<0||a>59||a<0||a>59||i<0||i>60?null:new Date(o,r-1,l,n,a,i)}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if(t.value instanceof Date)t.value=this._convert(t.value);else if(t.value instanceof e.Date_)t.value=this._convert(t.value._date);else if("string"==typeof t.value){var o,r=null,l=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(l.s();!(o=l.n()).done;){var n=o.value;if(null!==(r=this._parse(t.value,n)))break}}catch(e){l.e(e)}finally{l.f()}null!==r?t.value=this._convert(r):t.errors.push(this.msg_date_format(t.value))}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(DateFieldBase.prototype),"_get_dom_value",this).call(this);if(!e)return null;var t,o=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(o.s();!(t=o.n()).done;){var r=t.value,l=this._parse(e,r);if(null!==l)return this._convert(l)}}catch(e){o.e(e)}finally{o.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){t=null!==t?e._format(t,this.control.formatstring(),this.globals.lang):"",_get(_getPrototypeOf(DateFieldBase.prototype),"_set_dom_value",this).call(this,t)}}]),DateFieldBase}(),X=new(function(e){_inherits(DateFieldType,$);var t=_createSuper(DateFieldType);function DateFieldType(){return _classCallCheck(this,DateFieldType),t.apply(this,arguments)}return _createClass(DateFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ee}}]),DateFieldType}())("la","DateField","Holds the value of a date/date field of a record (and related information)"),ee=function(t){_inherits(DateField,Q);var o=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),o.apply(this,arguments)}return _createClass(DateField,[{key:e.symbols.type,value:function value(){return X}},{key:"_convert",value:function _convert(t){return new e.Date_(t.getFullYear(),t.getMonth()+1,t.getDate())}}]),DateField}(),te=new(function(e){_inherits(DatetimeMinuteFieldType,$);var t=_createSuper(DatetimeMinuteFieldType);function DatetimeMinuteFieldType(){return _classCallCheck(this,DatetimeMinuteFieldType),t.apply(this,arguments)}return _createClass(DatetimeMinuteFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof oe}}]),DatetimeMinuteFieldType}())("la","DatetimeMinuteField","Holds the value of a date/datetimeminute field of a record (and related information)"),oe=function(t){_inherits(DatetimeMinuteField,Q);var o=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),o.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:e.symbols.type,value:function value(){return te}},{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(),re=new(function(e){_inherits(DatetimeSecondFieldType,$);var t=_createSuper(DatetimeSecondFieldType);function DatetimeSecondFieldType(){return _classCallCheck(this,DatetimeSecondFieldType),t.apply(this,arguments)}return _createClass(DatetimeSecondFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof le}}]),DatetimeSecondFieldType}())("la","DatetimeSecondField","Holds the value of a date/datetimesecond field of a record (and related information)"),le=function(t){_inherits(DatetimeSecondField,Q);var o=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),o.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:e.symbols.type,value:function value(){return re}},{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(),ne=function(t){_inherits(ChoiceFieldBase,C);var o=_createSuper(ChoiceFieldBase);function ChoiceFieldBase(){return _classCallCheck(this,ChoiceFieldBase),o.apply(this,arguments)}return _createClass(ChoiceFieldBase,[{key:"_make_option",value:function _make_option(e,t,o){return element("option",o,{value:t,class:t===this.control.none_key?"la-none-option":null,selected:e?"selected":null})}},{key:"_set_dom_lookupdata_select",value:function _set_dom_lookupdata_select(t){var o;null===t&&(t=this.control.lookup_data),e._isobject(t)&&(t=new Map(Object.entries(t)));var r,l=!1,n=new Set,a=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option:checked"));try{for(a.s();!(r=a.n()).done;){var i=r.value.getAttribute("value");t.has(i)?n.add(i):i===this.control.none_key&&(l=!0)}}catch(e){a.e(e)}finally{a.f()}var u=[];null!==this.control.none_key&&u.push(this._make_option(l,this.control.none_key,null!==this.control.none_label?this.control.none_label:this.globals.msg_nothing_selected()));var s,p=_createForOfIteratorHelper(t);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];u.push(this._make_option(n.has(_),_,this._make_label(h)))}}catch(e){p.e(e)}finally{p.f()}(o=this._dom_control).replaceChildren.apply(o,u)}},{key:"_set_dom_lookupdata_input",value:function _set_dom_lookupdata_input(t){null===t?t=this.control.lookupdata:e._isobject(t)&&(t=new Map(Object.entries(t)));var o,r=!1,l=new Set,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(o=n.n()).done;){var a=o.value,i=a.getAttribute("value");a.checked&&(t.has(i)?l.add(i):i===this.control.none_key&&(r=!0))}}catch(e){n.e(e)}finally{n.f()}var u=this._dom_root.querySelector("input[value="+this.control.none_key+"]");null!==u&&(u.checked=r);var s,p=_createForOfIteratorHelper(this.control.lookupdata);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=(c[1],this._dom_root.querySelector("input[value="+_+"]")),y=this._dom_root.querySelector("label[for="+h.id+"]");t.has(_)?(h.style.display="inline",y.style.display="inline",y.innerText=this._make_label(t.get(_))):(h.style.display="none",y.style.display="none",y.checked=!1)}}catch(e){p.e(e)}finally{p.f()}}}]),ChoiceFieldBase}(),ae=function(e){_inherits(LookupFieldBaseType,k);var t=_createSuper(LookupFieldBaseType);function LookupFieldBaseType(){return _classCallCheck(this,LookupFieldBaseType),t.apply(this,arguments)}return _createClass(LookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ue}}]),LookupFieldBaseType}(),ie=new ae("la","LookupFieldBase","Base type of LookupField and MultipleLookupField"),ue=function(t){_inherits(LookupFieldBase,ne);var o=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),o.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:e.symbols.type,value:function value(){return ie}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:this.control.lookupdata}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof Lo?t.label:e._str(t)}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var o=this.control.lookupdata.get(t);if(void 0===o)if(this.control.autoexpandable){var r,l=_createForOfIteratorHelper(this.lookupdata.values());try{for(l.s();!(r=l.n()).done;){var n=r.value;if(t===n.label)return void(e.value=n)}}catch(e){l.e(e)}finally{l.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=o}else if(t instanceof Lo){this.control.lookupdata.get(t.key)!==t&&(e.errors.push(this.msg_lookup_wrongitem(t)),e.value=null)}else e.errors.push(this.msg_field_wrong_type(t)),e.value=null}}]),LookupFieldBase}(),se=function(e){_inherits(LookupFieldType,ae);var t=_createSuper(LookupFieldType);function LookupFieldType(){return _classCallCheck(this,LookupFieldType),t.apply(this,arguments)}return _createClass(LookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ce}}]),LookupFieldType}(),pe=new se("la","LookupField","Holds the value of a lookup field of a record (and related information)"),ce=function(t){_inherits(LookupField,ue);var o=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),o.apply(this,arguments)}return _createClass(LookupField,[{key:e.symbols.type,value:function value(){return pe}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:e.label}},{key:"_validate",value:function _validate(e){var t=e.value;null===t||""===t||this.control.none_key===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}(),_e=new(function(e){_inherits(LookupRadioFieldType,se);var t=_createSuper(LookupRadioFieldType);function LookupRadioFieldType(){return _classCallCheck(this,LookupRadioFieldType),t.apply(this,arguments)}return _createClass(LookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof he}}]),LookupRadioFieldType}())("la","LookupRadioField","Holds the value of a lookup/radio field of a record (and related information)"),he=function(t){_inherits(LookupRadioField,ce);var o=_createSuper(LookupRadioField);function LookupRadioField(){return _classCallCheck(this,LookupRadioField),o.apply(this,arguments)}return _createClass(LookupRadioField,[{key:e.symbols.type,value:function value(){return _e}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var o=e.value;if(o.checked){var r=o.getAttribute("value");return this.control.lookupdata.get(r)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e instanceof Lo&&(e=e.key),null===e&&(e=this.control.none_key);var t,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){var r=t.value;r.checked=r.getAttribute("value")===e}}catch(e){o.e(e)}finally{o.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),LookupRadioField}(),ye=new(function(e){_inherits(LookupSelectFieldType,se);var t=_createSuper(LookupSelectFieldType);function LookupSelectFieldType(){return _classCallCheck(this,LookupSelectFieldType),t.apply(this,arguments)}return _createClass(LookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof de}}]),LookupSelectFieldType}())("la","LookupSelectField","Holds the value of a lookup/select field of a record (and related information)"),de=function(t){_inherits(LookupSelectField,ce);var o=_createSuper(LookupSelectField);function LookupSelectField(){return _classCallCheck(this,LookupSelectField),o.apply(this,arguments)}return _createClass(LookupSelectField,[{key:e.symbols.type,value:function value(){return ye}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(LookupSelectField.prototype),"_get_dom_value",this).call(this);return e&&(e=e===this.control.none_key?null:this.control.lookupdata.get(e)),e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(LookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.key:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),LookupSelectField}(),fe=new(function(e){_inherits(LookupChoiceFieldType,se);var t=_createSuper(LookupChoiceFieldType);function LookupChoiceFieldType(){return _classCallCheck(this,LookupChoiceFieldType),t.apply(this,arguments)}return _createClass(LookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ve}}]),LookupChoiceFieldType}())("la","LookupChoiceField","Holds the value of a lookup/choice field of a record (and related information)"),ve=function(t){_inherits(LookupChoiceField,ce);var o=_createSuper(LookupChoiceField);function LookupChoiceField(){return _classCallCheck(this,LookupChoiceField),o.apply(this,arguments)}return _createClass(LookupChoiceField,[{key:e.symbols.type,value:function value(){return fe}}]),LookupChoiceField}();ve.prototype._inputevent="llchoice";var ke=function(e){_inherits(MultipleLookupFieldType,ae);var t=_createSuper(MultipleLookupFieldType);function MultipleLookupFieldType(){return _classCallCheck(this,MultipleLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ce}}]),MultipleLookupFieldType}(),me=new ke("la","MultipleLookupField","Holds the value of a multiple lookup field of a record (and related information)"),Ce=function(t){_inherits(MultipleLookupField,ue);var o=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),o.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:e.symbols.type,value:function value(){return me}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e||0===e.length?null:e.map((function(e){return e.label})).join(", ")}},{key:"_validate",value:function _validate(e){var t=e.value,o="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||o&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(o){var r,l=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(r=n.n()).done;){var a={value:r.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):l.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=l}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}(),ge=new(function(e){_inherits(MultipleLookupCheckboxFieldType,ke);var t=_createSuper(MultipleLookupCheckboxFieldType);function MultipleLookupCheckboxFieldType(){return _classCallCheck(this,MultipleLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof be}}]),MultipleLookupCheckboxFieldType}())("la","MultipleLookupCheckboxField","Holds the value of a multiplelookup/radio field of a record (and related information)"),be=function(t){_inherits(MultipleLookupCheckboxField,Ce);var o=_createSuper(MultipleLookupCheckboxField);function MultipleLookupCheckboxField(){return _classCallCheck(this,MultipleLookupCheckboxField),o.apply(this,arguments)}return _createClass(MultipleLookupCheckboxField,[{key:e.symbols.type,value:function value(){return ge}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(e=o.n()).done;){var r=e.value;if(r.checked){var l=r.getAttribute("value");t.push(this.control.lookupdata.get(l))}}}catch(e){o.e(e)}finally{o.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var o,r=new Set,l=_createForOfIteratorHelper(t.value);try{for(l.s();!(o=l.n()).done;){var n=o.value;r.add(n.key)}}catch(e){l.e(e)}finally{l.f()}var a,i=_createForOfIteratorHelper(this._dom_controls);try{for(i.s();!(a=i.n()).done;){var u=a.value;u.checked=r.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),MultipleLookupCheckboxField}(),Te=new(function(e){_inherits(MultipleLookupSelectFieldType,ke);var t=_createSuper(MultipleLookupSelectFieldType);function MultipleLookupSelectFieldType(){return _classCallCheck(this,MultipleLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Le}}]),MultipleLookupSelectFieldType}())("la","MultipleLookupSelectField","Holds the value of a multiplelookup/select field of a record (and related information)"),Le=function(t){_inherits(MultipleLookupSelectField,Ce);var o=_createSuper(MultipleLookupSelectField);function MultipleLookupSelectField(){return _classCallCheck(this,MultipleLookupSelectField),o.apply(this,arguments)}return _createClass(MultipleLookupSelectField,[{key:e.symbols.type,value:function value(){return Te}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],o=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(o.s();!(e=o.n()).done;){var r=e.value;r.selected&&t.push(this.control.lookupdata.get(r.getAttribute("value")))}}catch(e){o.e(e)}finally{o.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var o,r=new Set,l=_createForOfIteratorHelper(t.value);try{for(l.s();!(o=l.n()).done;){var n=o.value;r.add(n.key)}}catch(e){l.e(e)}finally{l.f()}var a,i=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(i.s();!(a=i.n()).done;){var u=a.value;u.selected=r.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleLookupSelectField}(),Fe=new(function(e){_inherits(MultipleLookupChoiceFieldType,ke);var t=_createSuper(MultipleLookupChoiceFieldType);function MultipleLookupChoiceFieldType(){return _classCallCheck(this,MultipleLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ae}}]),MultipleLookupChoiceFieldType}())("la","MultipleLookupChoiceField","Holds the value of a multiplelookup/choice field of a record (and related information)"),Ae=function(t){_inherits(MultipleLookupChoiceField,Ce);var o=_createSuper(MultipleLookupChoiceField);function MultipleLookupChoiceField(){return _classCallCheck(this,MultipleLookupChoiceField),o.apply(this,arguments)}return _createClass(MultipleLookupChoiceField,[{key:e.symbols.type,value:function value(){return Fe}}]),MultipleLookupChoiceField}();Ae.prototype._inputevent="llchoice";var we=function(e){_inherits(AppLookupFieldBaseType,k);var t=_createSuper(AppLookupFieldBaseType);function AppLookupFieldBaseType(){return _classCallCheck(this,AppLookupFieldBaseType),t.apply(this,arguments)}return _createClass(AppLookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Me}}]),AppLookupFieldBaseType}(),Se=new we("la","AppLookupFieldBase","Base type of AppLookupField and MultipleAppLookupField"),Me=function(t){_inherits(AppLookupFieldBase,ne);var o=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),o.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:e.symbols.type,value:function value(){return Se}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof v?t.as_text(this.control.lookup_controls):e._str(t)}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var o=null!==this.control.lookup_app.records?this.control.lookup_app.records.get(t):void 0;void 0===o?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=o}else t instanceof v?t.app!==this.control.lookup_app&&(e.errors.push(this.msg_applookup_wrongrecord(t)),e.value=null):(e.errors.push(this.msg_field_wrong_type(t)),e.value=null)}},{key:e.symbols.setattr,value:function value(t,o){"lookupdata"===t?this.lookupdata=o:_get(_getPrototypeOf(AppLookupFieldBase.prototype),e.symbols.setattr,this).call(this,t,o)}}]),AppLookupFieldBase}();Me.prototype._ul4attrs=new Set([].concat(_toConsumableArray(C.prototype._ul4attrs),["lookupdata"]));var xe=function(e){_inherits(AppLookupFieldType,we);var t=_createSuper(AppLookupFieldType);function AppLookupFieldType(){return _classCallCheck(this,AppLookupFieldType),t.apply(this,arguments)}return _createClass(AppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof He}}]),AppLookupFieldType}(),Ie=new xe("la","AppLookupField","Holds the value of a applookup field of a record (and related information)"),He=function(t){_inherits(AppLookupField,Me);var o=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),o.apply(this,arguments)}return _createClass(AppLookupField,[{key:e.symbols.type,value:function value(){return Ie}},{key:"value_as_text",value:function value_as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=this.value;return null===t?null:"("+this.value.as_text(e)+")"}},{key:"_validate",value:function _validate(e){this._find_record(e)}}]),AppLookupField}(),Re=new(function(e){_inherits(AppLookupSelectFieldType,xe);var t=_createSuper(AppLookupSelectFieldType);function AppLookupSelectFieldType(){return _classCallCheck(this,AppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(AppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Oe}}]),AppLookupSelectFieldType}())("la","AppLookupSelectField","Holds the value of a `applookup`/`select` field of a record (and related information)"),Oe=function(t){_inherits(AppLookupSelectField,He);var o=_createSuper(AppLookupSelectField);function AppLookupSelectField(){return _classCallCheck(this,AppLookupSelectField),o.apply(this,arguments)}return _createClass(AppLookupSelectField,[{key:e.symbols.type,value:function value(){return Re}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(AppLookupSelectField.prototype),"_get_dom_value",this).call(this);return null!==this.control.lookup_app.records?void 0===(e=this.control.lookup_app.records.get(e))&&(e=null):e=null,e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(AppLookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.id:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),AppLookupSelectField}(),Pe=new(function(e){_inherits(AppLookupRadioFieldType,xe);var t=_createSuper(AppLookupRadioFieldType);function AppLookupRadioFieldType(){return _classCallCheck(this,AppLookupRadioFieldType),t.apply(this,arguments)}return _createClass(AppLookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof De}}]),AppLookupRadioFieldType}())("la","AppLookupRadioField","Holds the value of a `applookup`/`radio` field of a record (and related information)"),De=function(t){_inherits(AppLookupRadioField,He);var o=_createSuper(AppLookupRadioField);function AppLookupRadioField(){return _classCallCheck(this,AppLookupRadioField),o.apply(this,arguments)}return _createClass(AppLookupRadioField,[{key:e.symbols.type,value:function value(){return Pe}}]),AppLookupRadioField}(),Be=new(function(e){_inherits(AppLookupChoiceFieldType,xe);var t=_createSuper(AppLookupChoiceFieldType);function AppLookupChoiceFieldType(){return _classCallCheck(this,AppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(AppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ne}}]),AppLookupChoiceFieldType}())("la","AppLookupChoiceField","Holds the value of a `applookup`/`choice` field of a record (and related information)"),Ne=function(t){_inherits(AppLookupChoiceField,He);var o=_createSuper(AppLookupChoiceField);function AppLookupChoiceField(e,t,r){var l;return _classCallCheck(this,AppLookupChoiceField),(l=o.call(this,e,t,r))._search_url=null,l._search_param_name=null,l._target_param_name=null,l}return _createClass(AppLookupChoiceField,[{key:e.symbols.type,value:function value(){return Be}},{key:"search_url",get:function get(){var e;return null!==(e=this._search_url)&&void 0!==e?e:this.control.search_url}},{key:"search_url",set:function set(e){this._search_url=e}},{key:"search_param_name",get:function get(){var e;return null!==(e=this._search_param_name)&&void 0!==e?e:this.control.search_param_name}},{key:"search_param_name",set:function set(e){this._search_param_name=e}},{key:"target_param_name",get:function get(){var e;return null!==(e=this._target_param_name)&&void 0!==e?e:this.control.target_param_name}},{key:"target_param_name",set:function set(e){this._target_param_name=e}}]),AppLookupChoiceField}();Ne.prototype._inputevent="llchoice",Ne.prototype._ul4attrs=new Set([].concat(_toConsumableArray(C.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var Ue=function(e){_inherits(MultipleAppLookupFieldType,we);var t=_createSuper(MultipleAppLookupFieldType);function MultipleAppLookupFieldType(){return _classCallCheck(this,MultipleAppLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ve}}]),MultipleAppLookupFieldType}(),qe=new Ue("la","MultipleAppLookupField","Holds the value of a multiple applookup field of a record (and related information)"),Ve=function(t){_inherits(MultipleAppLookupField,Me);var o=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),o.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:e.symbols.type,value:function value(){return qe}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"_validate",value:function _validate(e){var t=e.value,o="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||o&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(o){var r,l=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(r=n.n()).done;){var a={value:r.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):l.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=l}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(),Ee=new(function(e){_inherits(MultipleAppLookupCheckboxFieldType,Ue);var t=_createSuper(MultipleAppLookupCheckboxFieldType);function MultipleAppLookupCheckboxFieldType(){return _classCallCheck(this,MultipleAppLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ge}}]),MultipleAppLookupCheckboxFieldType}())("la","MultipleAppLookupCheckboxField","Holds the value of a `multipleapplookup`/`checkbox` field of a record (and related information)"),Ge=function(t){_inherits(MultipleAppLookupCheckboxField,Ve);var o=_createSuper(MultipleAppLookupCheckboxField);function MultipleAppLookupCheckboxField(){return _classCallCheck(this,MultipleAppLookupCheckboxField),o.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxField,[{key:e.symbols.type,value:function value(){return Ee}}]),MultipleAppLookupCheckboxField}(),je=new(function(e){_inherits(MultipleAppLookupSelectFieldType,Ue);var t=_createSuper(MultipleAppLookupSelectFieldType);function MultipleAppLookupSelectFieldType(){return _classCallCheck(this,MultipleAppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof We}}]),MultipleAppLookupSelectFieldType}())("la","MultipleAppLookupSelectField","Holds the value of a `multipleapplookup`/`select` field of a record (and related information)"),We=function(t){_inherits(MultipleAppLookupSelectField,Ve);var o=_createSuper(MultipleAppLookupSelectField);function MultipleAppLookupSelectField(){return _classCallCheck(this,MultipleAppLookupSelectField),o.apply(this,arguments)}return _createClass(MultipleAppLookupSelectField,[{key:e.symbols.type,value:function value(){return je}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleAppLookupSelectField}(),ze=new(function(e){_inherits(MultipleAppLookupChoiceFieldType,Ue);var t=_createSuper(MultipleAppLookupChoiceFieldType);function MultipleAppLookupChoiceFieldType(){return _classCallCheck(this,MultipleAppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ye}}]),MultipleAppLookupChoiceFieldType}())("la","MultipleAppLookupChoiceField","Holds the value of a `multipleapplookup`/`choice` field of a record (and related information)"),Ye=function(t){_inherits(MultipleAppLookupChoiceField,Ve);var o=_createSuper(MultipleAppLookupChoiceField);function MultipleAppLookupChoiceField(){return _classCallCheck(this,MultipleAppLookupChoiceField),o.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceField,[{key:e.symbols.type,value:function value(){return ze}}]),MultipleAppLookupChoiceField}();Ye.prototype._inputevent="llchoice";var Je=function(t){_inherits(ControlType,e.Type);var o=_createSuper(ControlType);function ControlType(){return _classCallCheck(this,ControlType),o.apply(this,arguments)}return _createClass(ControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $e}}]),ControlType}(),Ke=new Je("la","Control","Metainformation about a field in a LivingApps application"),$e=function(t){_inherits(Control,o);var r=_createSuper(Control);function Control(){return _classCallCheck(this,Control),r.apply(this,arguments)}return _createClass(Control,[{key:e.symbols.type,value:function value(){return Ke}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.app.globals}},{key:"fulltype",get:function get(){return this.subtype?this.type+"/"+this.subtype:this.type}},{key:"label",get:function get(){var e=this._view_control();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"label",set:function set(e){this._label=e}},{key:"default",get:function get(){return null}},{key:"top",get:function get(){var e=this._view_control();return null!==e?e.top:null}},{key:"left",get:function get(){var e=this._view_control();return null!==e?e.left:null}},{key:"width",get:function get(){var e=this._view_control();return null!==e?e.width:null}},{key:"height",get:function get(){var e=this._view_control();return null!==e?e.height:null}},{key:"z_index",get:function get(){var e=this._view_control();return null!==e?e.z_index:null}},{key:"liveupdate",get:function get(){var e=this._view_control();return null!==e&&e.liveupdate}},{key:"tabindex",get:function get(){var e=this._view_control();return null!==e?e.tabindex:null}},{key:"required",get:function get(){var e=this._view_control();return null!==e&&e.required}},{key:"mode",get:function get(){var e=this._view_control();return null!==this.app._active_view&&null===e?null:null===this.app.globals.mode?"display":null!==e?e.mode:"edit"}},{key:"labelpos",get:function get(){var e=this._view_control();return null!==e?e.labelpos:"left"}},{key:"labelwidth",get:function get(){var e=this._view_control();return null!==e?e.labelwidth:null}},{key:"autoalign",get:function get(){var e=this._view_control();return null===e||e.autoalign}},{key:"in_active_view",get:function get(){return null!==this._view_control()}},{key:"_view_control",value:function _view_control(){if(null===this.app._active_view)return null;var e=this.app._active_view.controls.get(this.identifier);return null!=e?e:null}},{key:"_logsearch",value:function _logsearch(e,t){}},{key:"search",value:function search(e,t){return!1}}]),Control}();$e.prototype.type=null,$e.prototype.subtype=null,$e.prototype._ul4onattrs=["identifier","fieldname","app","_label","priority","order","ininsertprocedure","inupdateprocedure"],$e.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","priority","order","ininsertprocedure","inupdateprocedure","fulltype","label","top","left","width","height","z_index","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]),$e.prototype._cssclass_root="llft-control",$e.prototype._cssclass_control="input";var Ze=new(function(e){_inherits(BoolControlType,Je);var t=_createSuper(BoolControlType);function BoolControlType(){return _classCallCheck(this,BoolControlType),t.apply(this,arguments)}return _createClass(BoolControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Qe}}]),BoolControlType}())("la","BoolControl","A LivingApps boolean field (type 'bool')"),Qe=function(t){_inherits(BoolControl,$e);var o=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),o.apply(this,arguments)}return _createClass(BoolControl,[{key:e.symbols.type,value:function value(){return Ze}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}();Qe.prototype.type="bool",Qe.prototype.fieldtype=b;var Xe=new(function(e){_inherits(IntControlType,Je);var t=_createSuper(IntControlType);function IntControlType(){return _classCallCheck(this,IntControlType),t.apply(this,arguments)}return _createClass(IntControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof et}}]),IntControlType}())("la","IntControl","A LivingApps integer field (type 'int')"),et=function(t){_inherits(IntControl,$e);var o=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),o.apply(this,arguments)}return _createClass(IntControl,[{key:e.symbols.type,value:function value(){return Xe}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}();et.prototype.type="int",et.prototype.fieldtype=L;var tt=function(e){_inherits(PlaceholderControlType,Je);var t=_createSuper(PlaceholderControlType);function PlaceholderControlType(){return _classCallCheck(this,PlaceholderControlType),t.apply(this,arguments)}return _createClass(PlaceholderControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof PlaceholderControld}}]),PlaceholderControlType}(),ot=new tt("la","PlaceholderControl","A LivingApps field that has a placeholder"),rt=function(t){_inherits(PlaceholderControl,$e);var o=_createSuper(PlaceholderControl);function PlaceholderControl(){return _classCallCheck(this,PlaceholderControl),o.apply(this,arguments)}return _createClass(PlaceholderControl,[{key:e.symbols.type,value:function value(){return ot}},{key:"placeholder",get:function get(){var e=this._view_control();return null===e?null:e.placeholder}}]),PlaceholderControl}();rt.prototype._ul4attrs=new Set([].concat(_toConsumableArray($e.prototype._ul4attrs),["placeholder"]));var lt=new(function(e){_inherits(NumberControlType,tt);var t=_createSuper(NumberControlType);function NumberControlType(){return _classCallCheck(this,NumberControlType),t.apply(this,arguments)}return _createClass(NumberControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof nt}}]),NumberControlType}())("la","NumberControl","A LivingApps number field (type 'number')"),nt=function(t){_inherits(NumberControl,rt);var o=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),o.apply(this,arguments)}return _createClass(NumberControl,[{key:e.symbols.type,value:function value(){return lt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}();nt.prototype.type="number",nt.prototype.fieldtype=w,nt.prototype._ul4onattrs=[].concat(_toConsumableArray($e.prototype._ul4onattrs),["precision","minimum","maximum"]),nt.prototype._ul4attrs=new Set([].concat(_toConsumableArray($e.prototype._ul4attrs),["precision","minimum","maximum"]));var at=function(e){_inherits(StringControlType,tt);var t=_createSuper(StringControlType);function StringControlType(){return _classCallCheck(this,StringControlType),t.apply(this,arguments)}return _createClass(StringControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ut}}]),StringControlType}(),it=new at("la","StringControl","A LivingApps number field (type 'string')"),ut=function(t){_inherits(StringControl,rt);var o=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),o.apply(this,arguments)}return _createClass(StringControl,[{key:e.symbols.type,value:function value(){return it}},{key:"_user_placeholder",value:function _user_placeholder(t,o){if(null===o)return null;switch(o){case"{gender}":return null!==t?t.gender:null;case"{title}":return null!==t?t.title:null;case"{firstname}":return null!==t?t.firstname:null;case"{surname}":return null!==t?t.surname:null;case"{account}":return null!==t?t.email:null;case"{streetname}":return null!==t?t.streetname:null;case"{streetnumber}":return null!==t?t.streetnumber:null;case"{street}":return null===t?null:null===t.street?t.streetnumber:null===t.streetnumber?t.street:t.street+" "+t.streetnumber;case"{zip}":return null!==t?t.zip:null;case"{phone}":return null!==t?t.phone:null;case"{fax}":return null!==t?t.fax:null;case"{company}":return null!==t?t.company:null;case"{city}":return null!==t?t.city:null;case"{summary}":return null!==t?t.summary:null;case"{interests}":return null!==t?t.interests:null;case"{personal_website}":return null!==t?t.personal_website:null;case"{company_website}":return null!==t?t.company_website:null;case"{position}":return null!==t?t.position:null;case"{department}":return null!==t?t.department:null;case"{today}":return e.today();default:return o}}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:this._user_placeholder(this.app.globals.user,e.default)}},{key:"minlength",get:function get(){var e=this._view_control();if(null===e)return 0;var t=e.minlength;return null===t||t<0?0:t}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return 4e3;var t=e.maxlength;return null===t||t<0||t>4e3?4e3:t}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"contains"===t.operator?null===t.value||null===e?t.value===e:e.toLowerCase().indexOf(t.value.toLowerCase())>=0:void 0}}]),StringControl}();ut.prototype.type="string";var st=new(function(e){_inherits(TextControlType,at);var t=_createSuper(TextControlType);function TextControlType(){return _classCallCheck(this,TextControlType),t.apply(this,arguments)}return _createClass(TextControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof pt}}]),TextControlType}())("la","TextControl","A LivingApps text field (type 'string/text')"),pt=function(t){_inherits(TextControl,ut);var o=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),o.apply(this,arguments)}return _createClass(TextControl,[{key:e.symbols.type,value:function value(){return st}}]),TextControl}();pt.prototype.subtype="text",pt.prototype.fieldtype=x;var ct=new(function(e){_inherits(PasswordControlType,at);var t=_createSuper(PasswordControlType);function PasswordControlType(){return _classCallCheck(this,PasswordControlType),t.apply(this,arguments)}return _createClass(PasswordControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _t}}]),PasswordControlType}())("la","PasswordControl","A LivingApps password field (type 'string/password')"),_t=function(t){_inherits(PasswordControl,ut);var o=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),o.apply(this,arguments)}return _createClass(PasswordControl,[{key:e.symbols.type,value:function value(){return ct}}]),PasswordControl}();_t.prototype.subtype="password",_t.prototype.fieldtype=H;var ht=new(function(e){_inherits(EmailControlType,at);var t=_createSuper(EmailControlType);function EmailControlType(){return _classCallCheck(this,EmailControlType),t.apply(this,arguments)}return _createClass(EmailControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yt}}]),EmailControlType}())("la","EmailControl","A LivingApps email field (type 'string/email')"),yt=function(t){_inherits(EmailControl,ut);var o=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),o.apply(this,arguments)}return _createClass(EmailControl,[{key:e.symbols.type,value:function value(){return ht}}]),EmailControl}();yt.prototype.subtype="email",yt.prototype.fieldtype=O;var dt=new(function(e){_inherits(URLControlType,at);var t=_createSuper(URLControlType);function URLControlType(){return _classCallCheck(this,URLControlType),t.apply(this,arguments)}return _createClass(URLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ft}}]),URLControlType}())("la","URLControl","A LivingApps URL field (type 'string/url')"),ft=function(t){_inherits(URLControl,ut);var o=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),o.apply(this,arguments)}return _createClass(URLControl,[{key:e.symbols.type,value:function value(){return dt}}]),URLControl}();ft.prototype.subtype="url",ft.prototype.fieldtype=D;var vt=new(function(e){_inherits(TelControlType,at);var t=_createSuper(TelControlType);function TelControlType(){return _classCallCheck(this,TelControlType),t.apply(this,arguments)}return _createClass(TelControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof kt}}]),TelControlType}())("la","TelControl","A LivingApps phone number field (type 'string/tel')"),kt=function(t){_inherits(TelControl,ut);var o=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),o.apply(this,arguments)}return _createClass(TelControl,[{key:e.symbols.type,value:function value(){return vt}}]),TelControl}();kt.prototype.subtype="tel",kt.prototype.fieldtype=N;var mt=new(function(e){_inherits(TextAreaControlType,at);var t=_createSuper(TextAreaControlType);function TextAreaControlType(){return _classCallCheck(this,TextAreaControlType),t.apply(this,arguments)}return _createClass(TextAreaControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ct}}]),TextAreaControlType}())("la","TextAreaControl","A LivingApps textarea field (type 'string/textarea')"),Ct=function(t){_inherits(TextAreaControl,ut);var o=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),o.apply(this,arguments)}return _createClass(TextAreaControl,[{key:e.symbols.type,value:function value(){return mt}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return null;if(null!==this.encrypted)return null;var t=e.maxlength;return t<0?null:t}}]),TextAreaControl}();Ct.prototype.subtype="textarea",Ct.prototype.fieldtype=q,Ct.prototype._ul4onattrs=[].concat(_toConsumableArray(ut.prototype._ul4onattrs),["encrypted"]),Ct.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ut.prototype._ul4attrs),["encrypted"])),Ct.prototype._cssclass_control="textarea";var gt=new(function(e){_inherits(HTMLControlType,at);var t=_createSuper(HTMLControlType);function HTMLControlType(){return _classCallCheck(this,HTMLControlType),t.apply(this,arguments)}return _createClass(HTMLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof bt}}]),HTMLControlType}())("la","HTMLControl","A LivingApps HTML field (type 'string/html')"),bt=function(t){_inherits(HTMLControl,ut);var o=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),o.apply(this,arguments)}return _createClass(HTMLControl,[{key:e.symbols.type,value:function value(){return gt}}]),HTMLControl}();bt.prototype.subtype="html",bt.prototype.fieldtype=E;var Tt=function(e){_inherits(DateControlType,tt);var t=_createSuper(DateControlType);function DateControlType(){return _classCallCheck(this,DateControlType),t.apply(this,arguments)}return _createClass(DateControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ft}}]),DateControlType}(),Lt=new Tt("la","DateControl","A LivingApps date field (type 'date/date')"),Ft=function(t){_inherits(DateControl,rt);var o=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),o.apply(this,arguments)}return _createClass(DateControl,[{key:e.symbols.type,value:function value(){return Lt}},{key:"default",get:function get(){var t=this._view_control();return null===t?null:"{today}"===t.default?e.today():null}},{key:"formatstring",value:function formatstring(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),this._formatstrings[e]}},{key:"formatstrings_parse",value:function formatstrings_parse(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),[].concat(_toConsumableArray(this._formatstrings_parse[e]),_toConsumableArray(this._formatstrings_parse.intl))}},{key:"search",value:function search(t,o){this._logsearch(t,o);var r=o.value;return"[object Date]"==Object.prototype.toString.call(r)&&(r=e._format(r,this.formatstring(),this.app.language)),null!==t&&(t=e._format(t,this.formatstring(),this.app.language)),"equals"===o.operator?r===t:"contains"===o.operator&&(null===r||null===t?r===t:t.toLowerCase().indexOf(r.toLowerCase())>=0)}}]),DateControl}();Ft.prototype.type="date",Ft.prototype.subtype="date",Ft.prototype.fieldtype=ee,Ft.prototype._formatstrings={de:"%d.%m.%Y",fr:"%d.%m.%Y",it:"%d.%m.%Y",en:"%m/%d/%Y",intl:"%Y-%m-%d"};var At=[""," %H:%M","T%H:%M"," %H:%M:%S","T%H:%M:%S"," %H:%M:%S.%f","T%H:%M:%S.%f"," %H:%M%z","T%H:%M%z"," %H:%M:%S%z","T%H:%M:%S%z"," %H:%M:%S.%f%z","T%H:%M:%S.%f%z"," %H:%M %z","T%H:%M %z"," %H:%M:%S %z","T%H:%M:%S %z"," %H:%M:%S.%f %z","T%H:%M:%S.%f %z"];Ft.prototype._formatstrings_parse={en:At.map((function(e){return"%m/%d/%Y"+e})),de:At.map((function(e){return"%d.%m.%Y"+e})),fr:At.map((function(e){return"%d.%m.%Y"+e})),it:At.map((function(e){return"%d.%m.%Y"+e})),intl:At.map((function(e){return"%Y-%m-%d"+e}))};var wt=new(function(e){_inherits(DatetimeMinuteControlType,Tt);var t=_createSuper(DatetimeMinuteControlType);function DatetimeMinuteControlType(){return _classCallCheck(this,DatetimeMinuteControlType),t.apply(this,arguments)}return _createClass(DatetimeMinuteControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof St}}]),DatetimeMinuteControlType}())("la","DatetimeMinuteControl","A LivingApps date field (type 'date/datetimeminute')"),St=function(t){_inherits(DatetimeMinuteControl,Ft);var o=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),o.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:e.symbols.type,value:function value(){return wt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setSeconds(0),t.setMilliseconds(0),t}return null}}]),DatetimeMinuteControl}();St.prototype.subtype="datetimeminute",St.prototype.fieldtype=oe,St.prototype._formatstrings={de:"%d.%m.%Y %H:%M",fr:"%d.%m.%Y %H:%M",it:"%d.%m.%Y %H:%M",en:"%m/%d/%Y %H:%M",intl:"%Y-%m-%d %H:%M"};var Mt=new(function(e){_inherits(DatetimeSecondControlType,Tt);var t=_createSuper(DatetimeSecondControlType);function DatetimeSecondControlType(){return _classCallCheck(this,DatetimeSecondControlType),t.apply(this,arguments)}return _createClass(DatetimeSecondControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof xt}}]),DatetimeSecondControlType}())("la","DatetimeSecondControl","A LivingApps date field (type 'date/datetimesecond')"),xt=function(t){_inherits(DatetimeSecondControl,Ft);var o=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),o.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:e.symbols.type,value:function value(){return Mt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setMilliseconds(0),t}return null}}]),DatetimeSecondControl}();xt.prototype.subtype="datetimesecond",xt.prototype.fieldtype=le,xt.prototype._formatstrings={de:"%d.%m.%Y %H:%M:%S",fr:"%d.%m.%Y %H:%M:%S",it:"%d.%m.%Y %H:%M:%S",en:"%m/%d/%Y %H:%M:%S",intl:"%Y-%m-%d %H:%M:%S"};var It=function(e){_inherits(LookupControlType,Je);var t=_createSuper(LookupControlType);function LookupControlType(){return _classCallCheck(this,LookupControlType),t.apply(this,arguments)}return _createClass(LookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Rt}}]),LookupControlType}(),Ht=new It("la","LookupControl","A LivingApps date field (type 'lookup')"),Rt=function(t){_inherits(LookupControl,$e);var o=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),o.apply(this,arguments)}return _createClass(LookupControl,[{key:e.symbols.type,value:function value(){return Ht}},{key:"default",get:function get(){var e,t=this._view_control();return null===t?null:null!==(e=this.lookupdata.get(t))&&void 0!==e?e:null}},{key:"autoexpandable",get:function get(){var e=this._view_control();return null!==e&&e.autoexpandable}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return"equals"===t.operator&&(null===e?null===t.value:e.key===t.value)}}]),LookupControl}();Rt.prototype.type="lookup",Rt.prototype.fieldtype=ce,Rt.prototype._ul4onattrs=[].concat(_toConsumableArray($e.prototype._ul4onattrs),["lookupdata"]),Rt.prototype._ul4attrs=new Set([].concat(_toConsumableArray($e.prototype._ul4attrs),["lookupdata"]));var Ot=new(function(e){_inherits(LookupSelectControlType,It);var t=_createSuper(LookupSelectControlType);function LookupSelectControlType(){return _classCallCheck(this,LookupSelectControlType),t.apply(this,arguments)}return _createClass(LookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pt}}]),LookupSelectControlType}())("la","LookupSelectControl","A LivingApps lookup field (type 'lookup/select')"),Pt=function(t){_inherits(LookupSelectControl,Rt);var o=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),o.apply(this,arguments)}return _createClass(LookupSelectControl,[{key:e.symbols.type,value:function value(){return Ot}}]),LookupSelectControl}();Pt.prototype.subtype="select",Pt.prototype.fieldtype=de,Pt.prototype._cssclass_control="select";var Dt=new(function(e){_inherits(LookupRadioControlType,It);var t=_createSuper(LookupRadioControlType);function LookupRadioControlType(){return _classCallCheck(this,LookupRadioControlType),t.apply(this,arguments)}return _createClass(LookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Bt}}]),LookupRadioControlType}())("la","LookupRadioControl","A LivingApps lookup field (type 'lookup/radio')"),Bt=function(t){_inherits(LookupRadioControl,Rt);var o=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),o.apply(this,arguments)}return _createClass(LookupRadioControl,[{key:e.symbols.type,value:function value(){return Dt}}]),LookupRadioControl}();Bt.prototype.subtype="radio",Bt.prototype.fieldtype=he,Bt.prototype._cssclass_root="llft-element";var Nt=new(function(e){_inherits(LookupChoiceControlType,It);var t=_createSuper(LookupChoiceControlType);function LookupChoiceControlType(){return _classCallCheck(this,LookupChoiceControlType),t.apply(this,arguments)}return _createClass(LookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ut}}]),LookupChoiceControlType}())("la","LookupChoiceControl","A LivingApps lookup field (type 'lookup/choice')"),Ut=function(t){_inherits(LookupChoiceControl,Rt);var o=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),o.apply(this,arguments)}return _createClass(LookupChoiceControl,[{key:e.symbols.type,value:function value(){return Nt}}]),LookupChoiceControl}();Ut.prototype.subtype="choice",Ut.prototype.fieldtype=ve,Ut.prototype._cssclass_control="select";var qt=function(e){_inherits(AppLookupControlType,Je);var t=_createSuper(AppLookupControlType);function AppLookupControlType(){return _classCallCheck(this,AppLookupControlType),t.apply(this,arguments)}return _createClass(AppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Et}}]),AppLookupControlType}(),Vt=new qt("la","AppLookupControl","A LivingApps lookup field (type 'applookup')"),Et=function(t){_inherits(AppLookupControl,$e);var o=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),o.apply(this,arguments)}return _createClass(AppLookupControl,[{key:e.symbols.type,value:function value(){return Vt}},{key:"lookupdata",get:function get(){return null!==this.lookup_app&&null!==this.lookup_app.records?this.lookup_app.records:new Map}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return null===e||null===t.value?e===t.value:e.search(t)}}]),AppLookupControl}();Et.prototype.type="applookup",Et.prototype.fieldtype=He,Et.prototype._ul4onattrs=[].concat(_toConsumableArray($e.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),Et.prototype._ul4attrs=new Set([].concat(_toConsumableArray($e.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var Gt=new(function(e){_inherits(AppLookupSelectControlType,qt);var t=_createSuper(AppLookupSelectControlType);function AppLookupSelectControlType(){return _classCallCheck(this,AppLookupSelectControlType),t.apply(this,arguments)}return _createClass(AppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof jt}}]),AppLookupSelectControlType}())("la","AppLookupSelectControl","A LivingApps applookup field (type 'applookup/select')"),jt=function(t){_inherits(AppLookupSelectControl,Et);var o=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),o.apply(this,arguments)}return _createClass(AppLookupSelectControl,[{key:e.symbols.type,value:function value(){return Gt}}]),AppLookupSelectControl}();jt.prototype.subtype="select",jt.prototype.fieldtype=Oe,jt.prototype._cssclass_control="select";var Wt=new(function(e){_inherits(AppLookupRadioControlType,qt);var t=_createSuper(AppLookupRadioControlType);function AppLookupRadioControlType(){return _classCallCheck(this,AppLookupRadioControlType),t.apply(this,arguments)}return _createClass(AppLookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof zt}}]),AppLookupRadioControlType}())("la","AppLookupRadioControl","A LivingApps applookup field (type 'applookup/radio')"),zt=function(t){_inherits(AppLookupRadioControl,Et);var o=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),o.apply(this,arguments)}return _createClass(AppLookupRadioControl,[{key:e.symbols.type,value:function value(){return Wt}}]),AppLookupRadioControl}();zt.prototype.subtype="radio",zt.prototype.fieldtype=De;var Yt=new(function(e){_inherits(AppLookupChoiceControlType,qt);var t=_createSuper(AppLookupChoiceControlType);function AppLookupChoiceControlType(){return _classCallCheck(this,AppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(AppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Jt}}]),AppLookupChoiceControlType}())("la","AppLookupChoiceControl","A LivingApps applookup field (type 'applookup/choice')"),Jt=function(t){_inherits(AppLookupChoiceControl,Et);var o=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),o.apply(this,arguments)}return _createClass(AppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return Yt}},{key:"search_url",get:function get(){return"field_"+this.identifier+"_search"}},{key:"search_param_name",get:function get(){return"q"}},{key:"target_param_name",get:function get(){return"target"}}]),AppLookupChoiceControl}();Jt.prototype.subtype="choice",Jt.prototype.fieldtype=Ne,Jt.prototype._cssclass_control="select",Jt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Et.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var Kt=function(e){_inherits(MultipleLookupControlType,It);var t=_createSuper(MultipleLookupControlType);function MultipleLookupControlType(){return _classCallCheck(this,MultipleLookupControlType),t.apply(this,arguments)}return _createClass(MultipleLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Zt}}]),MultipleLookupControlType}(),$t=new Kt("la","MultipleLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),Zt=function(t){_inherits(MultipleLookupControl,Rt);var o=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),o.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:e.symbols.type,value:function value(){return $t}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;var t=this.lookupdata.get(e);return void 0!==t?[t]:[]}},{key:"search",value:function search(e,t){if("equals"===t.operator){var o,r=_createForOfIteratorHelper(e);try{for(r.s();!(o=r.n()).done;){if(o.value.key===t.value)return!0}}catch(e){r.e(e)}finally{r.f()}return!1}return!1}}]),MultipleLookupControl}();Zt.prototype.type="multiplelookup",Zt.prototype.fieldtype=Ce;var Qt=new(function(e){_inherits(MultipleLookupCheckboxControlType,Kt);var t=_createSuper(MultipleLookupCheckboxControlType);function MultipleLookupCheckboxControlType(){return _classCallCheck(this,MultipleLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xt}}]),MultipleLookupCheckboxControlType}())("la","MultipleLookupCheckboxControl","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),Xt=function(t){_inherits(MultipleLookupCheckboxControl,Zt);var o=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),o.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return Qt}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}}]),MultipleLookupCheckboxControl}();Xt.prototype.subtype="checkbox",Xt.prototype.fieldtype=be,Xt.prototype._cssclass_root="llft-element";var eo=new(function(e){_inherits(MultipleLookupSelectControlType,Kt);var t=_createSuper(MultipleLookupSelectControlType);function MultipleLookupSelectControlType(){return _classCallCheck(this,MultipleLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof to}}]),MultipleLookupSelectControlType}())("la","MultipleLookupSelectControl","A LivingApps multiplelookup field (type 'multiplelookup/select')"),to=function(t){_inherits(MultipleLookupSelectControl,Zt);var o=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),o.apply(this,arguments)}return _createClass(MultipleLookupSelectControl,[{key:e.symbols.type,value:function value(){return eo}}]),MultipleLookupSelectControl}();to.prototype.subtype="select",to.prototype.fieldtype=Le,to.prototype._cssclass_control="select";var oo=new(function(e){_inherits(MultipleLookupChoiceControlType,Kt);var t=_createSuper(MultipleLookupChoiceControlType);function MultipleLookupChoiceControlType(){return _classCallCheck(this,MultipleLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ro}}]),MultipleLookupChoiceControlType}())("la","MultipleLookupChoiceControl","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),ro=function(t){_inherits(MultipleLookupChoiceControl,Zt);var o=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),o.apply(this,arguments)}return _createClass(MultipleLookupChoiceControl,[{key:e.symbols.type,value:function value(){return oo}}]),MultipleLookupChoiceControl}();ro.prototype.subtype="choice",ro.prototype.fieldtype=Ae,ro.prototype._cssclass_control="select";var lo=function(e){_inherits(MultipleAppLookupControlType,qt);var t=_createSuper(MultipleAppLookupControlType);function MultipleAppLookupControlType(){return _classCallCheck(this,MultipleAppLookupControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ao}}]),MultipleAppLookupControlType}(),no=new lo("la","MultipleAppLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),ao=function(t){_inherits(MultipleAppLookupControl,Et);var o=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),o.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:e.symbols.type,value:function value(){return no}},{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var o,r=_createForOfIteratorHelper(e);try{for(r.s();!(o=r.n()).done;){if(o.value.search(t.value))return!0}}catch(e){r.e(e)}finally{r.f()}return!1}return!1}}]),MultipleAppLookupControl}();ao.prototype.type="multipleapplookup",ao.prototype.fieldtype=Ve;var io=new(function(e){_inherits(MultipleAppLookupSelectControlType,lo);var t=_createSuper(MultipleAppLookupSelectControlType);function MultipleAppLookupSelectControlType(){return _classCallCheck(this,MultipleAppLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof uo}}]),MultipleAppLookupSelectControlType}())("la","MultipleAppLookupSelectControl","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),uo=function(t){_inherits(MultipleAppLookupSelectControl,ao);var o=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),o.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControl,[{key:e.symbols.type,value:function value(){return io}}]),MultipleAppLookupSelectControl}();uo.prototype.subtype="select",uo.prototype.fieldtype=We,uo.prototype._cssclass_control="select";var so=new(function(e){_inherits(MultipleAppLookupCheckboxControlType,lo);var t=_createSuper(MultipleAppLookupCheckboxControlType);function MultipleAppLookupCheckboxControlType(){return _classCallCheck(this,MultipleAppLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof po}}]),MultipleAppLookupCheckboxControlType}())("la","MultipleAppLookupCheckboxControl","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),po=function(t){_inherits(MultipleAppLookupCheckboxControl,ao);var o=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),o.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return so}}]),MultipleAppLookupCheckboxControl}();po.prototype.subtype="checkbox",po.prototype.fieldtype=Ge;var co=new(function(e){_inherits(MultipleAppLookupChoiceControlType,lo);var t=_createSuper(MultipleAppLookupChoiceControlType);function MultipleAppLookupChoiceControlType(){return _classCallCheck(this,MultipleAppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _o}}]),MultipleAppLookupChoiceControlType}())("la","MultipleAppLookupChoiceControl","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),_o=function(t){_inherits(MultipleAppLookupChoiceControl,ao);var o=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),o.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return co}}]),MultipleAppLookupChoiceControl}();_o.prototype.subtype="choice",_o.prototype.fieldtype=Ye,_o.prototype._cssclass_control="select";var ho=new(function(e){_inherits(GeoControlType,Je);var t=_createSuper(GeoControlType);function GeoControlType(){return _classCallCheck(this,GeoControlType),t.apply(this,arguments)}return _createClass(GeoControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yo}}]),GeoControlType}())("la","GeoControl","A LivingApps geo field (type 'geo')"),yo=function(t){_inherits(GeoControl,$e);var o=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),o.apply(this,arguments)}return _createClass(GeoControl,[{key:e.symbols.type,value:function value(){return ho}}]),GeoControl}();yo.prototype.type="geo",yo.prototype.fieldtype=j,yo.prototype._cssclass_root="llft-element";var fo=function(e){_inherits(FileControlType,Je);var t=_createSuper(FileControlType);function FileControlType(){return _classCallCheck(this,FileControlType),t.apply(this,arguments)}return _createClass(FileControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ko}}]),FileControlType}(),vo=new fo("la","FileControl","A LivingApps upload field (type 'file')"),ko=function(t){_inherits(FileControl,$e);var o=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),o.apply(this,arguments)}return _createClass(FileControl,[{key:e.symbols.type,value:function value(){return vo}}]),FileControl}();ko.prototype.type="file",ko.prototype.fieldtype=Y,ko.prototype._cssclass_root="llft-element";var mo=new(function(e){_inherits(FileSignatureControlType,fo);var t=_createSuper(FileSignatureControlType);function FileSignatureControlType(){return _classCallCheck(this,FileSignatureControlType),t.apply(this,arguments)}return _createClass(FileSignatureControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Co}}]),FileSignatureControlType}())("la","FileSignatureControl","A LivingApps signature image field (type 'file/signature')"),Co=function(t){_inherits(FileSignatureControl,ko);var o=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),o.apply(this,arguments)}return _createClass(FileSignatureControl,[{key:e.symbols.type,value:function value(){return mo}}]),FileSignatureControl}();Co.prototype.subtype="signature",Co.prototype.fieldtype=K;var go=new(function(e){_inherits(ButtonControlType,Je);var t=_createSuper(ButtonControlType);function ButtonControlType(){return _classCallCheck(this,ButtonControlType),t.apply(this,arguments)}return _createClass(ButtonControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof bo}}]),ButtonControlType}())("la","ButtonControl","A submit button"),bo=function(t){_inherits(ButtonControl,$e);var o=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),o.apply(this,arguments)}return _createClass(ButtonControl,[{key:e.symbols.type,value:function value(){return go}}]),ButtonControl}();bo.prototype.type="button";var To=new(function(t){_inherits(LookupItemType,e.Type);var o=_createSuper(LookupItemType);function LookupItemType(){return _classCallCheck(this,LookupItemType),o.apply(this,arguments)}return _createClass(LookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Lo}}]),LookupItemType}())("la","LookupItem","An option in a lookup control/field"),Lo=function(t){_inherits(LookupItem,o);var r=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),r.apply(this,arguments)}return _createClass(LookupItem,[{key:e.symbols.type,value:function value(){return To}},{key:"label",get:function get(){if(null===this.control)return this._label;var e=this._view_lookupitem();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"visible",get:function get(){if(null===this.control)return!0;var e=this._view_lookupitem();return null===e||e.visible}},{key:"_view_lookupitem",value:function _view_lookupitem(){var e=this.control.identifier,t=this.control.app.active_view;if(null!==t&&null!==t.controls){var o=t.controls.get(e);if(void 0!==o&&void 0!==o.lookupdata&&null!==o.lookupdata){var r=o.lookupdata.get(this.key);if(void 0!==r)return r}}return null}},{key:e.symbols.repr,value:function value(){var t="<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+="visible=False"),t+">"}}]),LookupItem}();Lo.prototype._ul4onattrs=["control","key","_label"],Lo.prototype._ul4attrs=new Set(["id","control","key","label"]);var Fo=new(function(t){_inherits(ViewLookupItemType,e.Type);var o=_createSuper(ViewLookupItemType);function ViewLookupItemType(){return _classCallCheck(this,ViewLookupItemType),o.apply(this,arguments)}return _createClass(ViewLookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ao}}]),ViewLookupItemType}())("la","ViewLookupItem","View specific information about a lookup item"),Ao=function(t){_inherits(ViewLookupItem,o);var r=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),r.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:e.symbols.type,value:function value(){return Fo}},{key:e.symbols.repr,value:function value(){var t="<ViewLookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+=" visible=False"),t+">"}}]),ViewLookupItem}();Ao.prototype._ul4onattrs=["key","label","visible"],Ao.prototype._ul4attrs=new Set(["key","label","visible"]);var wo=function(t){_inherits(LayoutControlType,e.Type);var o=_createSuper(LayoutControlType);function LayoutControlType(){return _classCallCheck(this,LayoutControlType),o.apply(this,arguments)}return _createClass(LayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Mo}}]),LayoutControlType}(),So=new wo("la","LayoutControl","A decoration in an input form"),Mo=function(t){_inherits(LayoutControl,o);var r=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),r.apply(this,arguments)}return _createClass(LayoutControl,[{key:"LayoutControl",value:function LayoutControl(){this.label=null,this.identifier=null,this.view=null,this.top=null,this.left=null,this.width=null,this.height=null,this._visible=!0}},{key:e.symbols.type,value:function value(){return So}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.view.globals}},{key:"_sel_root",get:function get(){return"#livingapps-form .llft-element.llft-id-"+this.identifier}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"visible",get:function get(){var e;return null===(e=this._visible)||void 0===e||e}},{key:"visible",set:function set(e){this.globals._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:e.symbols.setattr,value:function value(t,o){"visible"===t?this.visible=e._bool(o):_get(_getPrototypeOf(LayoutControl.prototype),e.symbols.setattr,this).call(this,t,o)}}]),LayoutControl}();Mo.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],Mo.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height","visible"]);var xo=new(function(e){_inherits(HTMLLayoutControlType,wo);var t=_createSuper(HTMLLayoutControlType);function HTMLLayoutControlType(){return _classCallCheck(this,HTMLLayoutControlType),t.apply(this,arguments)}return _createClass(HTMLLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Io}}]),HTMLLayoutControlType}())("la","HTMLLayoutControl","HTML decoration in an input form"),Io=function(t){_inherits(HTMLLayoutControl,Mo);var o=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),o.apply(this,arguments)}return _createClass(HTMLLayoutControl,[{key:e.symbols.type,value:function value(){return xo}},{key:"value",get:function get(){return this._value}},{key:"value",set:function set(e){this._value=e,this.globals._in_form()&&this._set_dom_value(this._value)}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_root.innerHTML=e}},{key:e.symbols.setattr,value:function value(t,o){"value"===t?this.value=o:_get(_getPrototypeOf(HTMLLayoutControl.prototype),e.symbols.setattr,this).call(this,t,o)}}]),HTMLLayoutControl}();Io.prototype._ul4onattrs=[].concat(_toConsumableArray(Mo.prototype._ul4onattrs),["_value","_visible"]),Io.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Mo.prototype._ul4attrs),["value"]));var Ho=new(function(e){_inherits(ImageLayoutControlType,wo);var t=_createSuper(ImageLayoutControlType);function ImageLayoutControlType(){return _classCallCheck(this,ImageLayoutControlType),t.apply(this,arguments)}return _createClass(ImageLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ro}}]),ImageLayoutControlType}())("la","ImageLayoutControl","An image decoration in an input form"),Ro=function(t){_inherits(ImageLayoutControl,Mo);var o=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),o.apply(this,arguments)}return _createClass(ImageLayoutControl,[{key:e.symbols.type,value:function value(){return Ho}},{key:"image",get:function get(){return this._image}},{key:"image",set:function set(e){this._image=e,this.globals._in_form()&&this._set_dom_value(this._image)}},{key:"original",get:function get(){return this.image}},{key:"original",set:function set(e){this.image=image}},{key:"_set_dom_value",value:function _set_dom_value(e){var t=this._dom_root.querySelector("img");if(null!==t){var o=null===e?"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==":this.globals.scaled_url(e,this.width,this.height);t.setAttribute("src",o)}}},{key:e.symbols.setattr,value:function value(t,o){"original"===t?this.original=o:"image"===t?this.image=o:_get(_getPrototypeOf(ImageLayoutControl.prototype),e.symbols.setattr,this).call(this,t,o)}}]),ImageLayoutControl}();Ro.prototype._ul4onattrs=[].concat(_toConsumableArray(Mo.prototype._ul4onattrs),["_image","_visible"]),Ro.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Mo.prototype._ul4attrs),["image","original"]));var Oo=new(function(e){_inherits(ButtonLayoutControlType,wo);var t=_createSuper(ButtonLayoutControlType);function ButtonLayoutControlType(){return _classCallCheck(this,ButtonLayoutControlType),t.apply(this,arguments)}return _createClass(ButtonLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Po}}]),ButtonLayoutControlType}())("la","ButtonLayoutControl","A submit button in an input form"),Po=function(t){_inherits(ButtonLayoutControl,Mo);var o=_createSuper(ButtonLayoutControl);function ButtonLayoutControl(){return _classCallCheck(this,ButtonLayoutControl),o.apply(this,arguments)}return _createClass(ButtonLayoutControl,[{key:e.symbols.type,value:function value(){return Oo}}]),ButtonLayoutControl}();Po.prototype._ul4onattrs=[].concat(_toConsumableArray(Mo.prototype._ul4onattrs),["original","scaled","_visible"]);var Do=new(function(t){_inherits(ViewControlType,e.Type);var o=_createSuper(ViewControlType);function ViewControlType(){return _classCallCheck(this,ViewControlType),o.apply(this,arguments)}return _createClass(ViewControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Bo}}]),ViewControlType}())("la","ViewControl","Contains view specific information about a control"),Bo=function(t){_inherits(ViewControl,o);var r=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),r.apply(this,arguments)}return _createClass(ViewControl,[{key:e.symbols.type,value:function value(){return Do}},{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}();Bo.prototype._ul4onattrs=["view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],Bo.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]);var No=new(function(t){_inherits(UserType,e.Type);var o=_createSuper(UserType);function UserType(){return _classCallCheck(this,UserType),o.apply(this,arguments)}return _createClass(UserType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Uo}}]),UserType}())("la","User","A LivingApps user/account"),Uo=function(t){_inherits(User,o);var r=_createSuper(User);function User(){return _classCallCheck(this,User),r.apply(this,arguments)}return _createClass(User,[{key:e.symbols.type,value:function value(){return No}},{key:e.symbols.repr,value:function value(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}}]),User}();Uo.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews","globals"],Uo.prototype._ul4attrs=new Set(["id","globals","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"]);var qo=new(function(t){_inherits(FileType,e.Type);var o=_createSuper(FileType);function FileType(){return _classCallCheck(this,FileType),o.apply(this,arguments)}return _createClass(FileType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Vo}}]),FileType}())("la","File","An uploaded file"),Vo=function(t){_inherits(File,o);var r=_createSuper(File);function File(){return _classCallCheck(this,File),r.apply(this,arguments)}return _createClass(File,[{key:e.symbols.type,value:function value(){return qo}},{key:e.symbols.repr,value:function value(){return"<File url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}},{key:"url",get:function get(){return"https://"+this.globals.hostname+"/files/"+this.contextid+"/"+this.id}},{key:"archive_url",get:function get(){return null===this.archive?this.url:this.archive.url+"/"+this.filename}}]),File}();Vo.prototype._ul4onattrs=["globals","filename","mimetype","width","height","internal_id","createdat","size","duration","geo","recordedat","storagefilename","archive","context_id"],Vo.prototype._ul4attrs=new Set(["globals","id","internal_id","url","archive_url","filename","mimetype","width","height","size","duration","geo","recordedat","archive","createdat","context_id"]);var Eo=new(function(t){_inherits(GeoType,e.Type);var o=_createSuper(GeoType);function GeoType(){return _classCallCheck(this,GeoType),o.apply(this,arguments)}return _createClass(GeoType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Go}}]),GeoType}())("la","Geo","Geographical coordinates and location information"),Go=function(t){_inherits(Geo,o);var r=_createSuper(Geo);function Geo(e,t,o){var l,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _classCallCheck(this,Geo),(l=r.call(this,null)).globals=e,l.lat=t,l.long=o,l.info=n,l}return _createClass(Geo,[{key:e.symbols.type,value:function value(){return Eo}},{key:e.symbols.repr,value:function value(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();Go.prototype._ul4onattrs=["globals","lat","long","info"],Go.prototype._ul4attrs=new Set(["globals","lat","long","info"]);var jo=function(t){_inherits(AttachmentType,e.Type);var o=_createSuper(AttachmentType);function AttachmentType(){return _classCallCheck(this,AttachmentType),o.apply(this,arguments)}return _createClass(AttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof zo}}]),AttachmentType}(),Wo=new jo("la","Attachment","An attachment of a record"),zo=function(t){_inherits(Attachment,o);var r=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),r.apply(this,arguments)}return _createClass(Attachment,[{key:e.symbols.type,value:function value(){return Wo}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}}]),Attachment}();zo.prototype._ul4onattrs=["record","label","active"],zo.prototype._ul4attrs=new Set(["id","record","label","active"]);var Yo=new(function(e){_inherits(NoteAttachmentType,jo);var t=_createSuper(NoteAttachmentType);function NoteAttachmentType(){return _classCallCheck(this,NoteAttachmentType),t.apply(this,arguments)}return _createClass(NoteAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Jo}}]),NoteAttachmentType}())("la","NoteAttachment","A note attachment of a record"),Jo=function(t){_inherits(NoteAttachment,zo);var o=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),o.apply(this,arguments)}return _createClass(NoteAttachment,[{key:e.symbols.type,value:function value(){return Yo}}]),NoteAttachment}();Jo.prototype.type="noteattachment",Jo.prototype._ul4onattrs=[].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]),Jo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]));var Ko=new(function(e){_inherits(URLAttachmentType,jo);var t=_createSuper(URLAttachmentType);function URLAttachmentType(){return _classCallCheck(this,URLAttachmentType),t.apply(this,arguments)}return _createClass(URLAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $o}}]),URLAttachmentType}())("la","URLAttachment","A URL attachment of a record"),$o=function(t){_inherits(URLAttachment,zo);var o=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),o.apply(this,arguments)}return _createClass(URLAttachment,[{key:e.symbols.type,value:function value(){return Ko}}]),URLAttachment}();$o.prototype.type="urlattachment",$o.prototype._ul4onattrs=[].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]),$o.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]));var Zo=new(function(e){_inherits(FileAttachmentType,jo);var t=_createSuper(FileAttachmentType);function FileAttachmentType(){return _classCallCheck(this,FileAttachmentType),t.apply(this,arguments)}return _createClass(FileAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Qo}}]),FileAttachmentType}())("la","FileAttachment","A file attachment of a record"),Qo=function(t){_inherits(FileAttachment,zo);var o=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),o.apply(this,arguments)}return _createClass(FileAttachment,[{key:e.symbols.type,value:function value(){return Zo}}]),FileAttachment}();Qo.prototype.type="fileattachment",Qo.prototype._ul4onattrs=[].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]),Qo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]));var Xo=new(function(e){_inherits(JSONAttachmentType,jo);var t=_createSuper(JSONAttachmentType);function JSONAttachmentType(){return _classCallCheck(this,JSONAttachmentType),t.apply(this,arguments)}return _createClass(JSONAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof er}}]),JSONAttachmentType}())("la","JSONAttachment","A JSON attachment of a record"),er=function(t){_inherits(JSONAttachment,zo);var o=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),o.apply(this,arguments)}return _createClass(JSONAttachment,[{key:e.symbols.type,value:function value(){return Xo}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"value"===t?e._asjson(this.value):this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,o){"value"===t?this.value=e._fromjson(o):this[t]=o}}]),JSONAttachment}();er.prototype.type="jsonattachment",er.prototype._ul4onattrs=[].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]),er.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]));var tr=new(function(t){_inherits(InstallationType,e.Type);var o=_createSuper(InstallationType);function InstallationType(){return _classCallCheck(this,InstallationType),o.apply(this,arguments)}return _createClass(InstallationType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof or}}]),InstallationType}())("la","Installation","The installation that created an app"),or=function(t){_inherits(Installation,o);var r=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),r.apply(this,arguments)}return _createClass(Installation,[{key:e.symbols.type,value:function value(){return tr}},{key:e.symbols.repr,value:function value(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();or.prototype._ul4onattrs=["name"],or.prototype._ul4attrs=new Set(["id","name"]);var rr=new(function(t){_inherits(CategoryType,e.Type);var o=_createSuper(CategoryType);function CategoryType(){return _classCallCheck(this,CategoryType),o.apply(this,arguments)}return _createClass(CategoryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof lr}}]),CategoryType}())("la","Category","A navigation category"),lr=function(t){_inherits(Category,o);var r=_createSuper(Category);function Category(){return _classCallCheck(this,Category),r.apply(this,arguments)}return _createClass(Category,[{key:e.symbols.type,value:function value(){return rr}},{key:e.symbols.repr,value:function value(){for(var t=[],o=this;null!==o;)t.splice(0,0,o.identifier),o=o.parent;return"<Category id="+e._repr(this.id)+" identifierpath="+e._repr(t.join("/"))+NaN+e._repr(this.name)+">"}}]),Category}();lr.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],lr.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]);var nr=new(function(t){_inherits(KeyViewType,e.Type);var o=_createSuper(KeyViewType);function KeyViewType(){return _classCallCheck(this,KeyViewType),o.apply(this,arguments)}return _createClass(KeyViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ar}}]),KeyViewType}())("la","KeyView","Object granting access to a view template"),ar=function(t){_inherits(KeyView,o);var r=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),r.apply(this,arguments)}return _createClass(KeyView,[{key:e.symbols.type,value:function value(){return nr}},{key:e.symbols.repr,value:function value(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();ar.prototype._ul4onattrs=["identifier","name","key","user"],ar.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]);var ir=function(t){_inherits(AppParameterType,e.Type);var o=_createSuper(AppParameterType);function AppParameterType(){return _classCallCheck(this,AppParameterType),o.apply(this,arguments)}return _createClass(AppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof sr}}]),AppParameterType}(),ur=new ir("la","AppParameter","A parameter of a LivingApps application"),sr=function(t){_inherits(AppParameter,o);var r=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),r.apply(this,arguments)}return _createClass(AppParameter,[{key:e.symbols.type,value:function value(){return ur}},{key:e.symbols.repr,value:function value(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof s?this.owner:null}}]),AppParameter}();sr.prototype._ul4onattrs=["owner","parent","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby"],sr.prototype._ul4attrs=new Set(["id","owner","parent","app","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby"]);var pr=new(function(e){_inherits(MutableAppParameterType,ir);var t=_createSuper(MutableAppParameterType);function MutableAppParameterType(){return _classCallCheck(this,MutableAppParameterType),t.apply(this,arguments)}return _createClass(MutableAppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cr}}]),MutableAppParameterType}())("la","MutableAppParameter","A mutable parameter of a LivingApps application"),cr=function(t){_inherits(MutableAppParameter,sr);var o=_createSuper(MutableAppParameter);function MutableAppParameter(){return _classCallCheck(this,MutableAppParameter),o.apply(this,arguments)}return _createClass(MutableAppParameter,[{key:e.symbols.type,value:function value(){return pr}},{key:e.symbols.repr,value:function value(){return"<MutableAppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof s?this.owner:null}}]),MutableAppParameter}(),_r=function(t){_inherits(MenuItemType,e.Type);var o=_createSuper(MenuItemType);function MenuItemType(){return _classCallCheck(this,MenuItemType),o.apply(this,arguments)}return _createClass(MenuItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yr}}]),MenuItemType}(),hr=new _r("la","MenuItem","An additional menu item in an app that links to a target page."),yr=function(t){_inherits(MenuItem,o);var r=_createSuper(MenuItem);function MenuItem(){return _classCallCheck(this,MenuItem),r.apply(this,arguments)}return _createClass(MenuItem,[{key:e.symbols.type,value:function value(){return hr}},{key:e.symbols.repr,value:function value(){return"<MenuItem id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),MenuItem}();yr.prototype._ul4onattrs=["app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"],yr.prototype._ul4attrs=new Set(["id","app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"]);var dr=new _r("la","Panel","An additional panel in an app that is displayed on various LivingApps pages and links to a target page."),fr=function(t){_inherits(Panel,yr);var o=_createSuper(Panel);function Panel(){return _classCallCheck(this,Panel),o.apply(this,arguments)}return _createClass(Panel,[{key:e.symbols.type,value:function value(){return dr}},{key:e.symbols.repr,value:function value(){return"<Panel id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),Panel}();fr.prototype._ul4onattrs=[].concat(_toConsumableArray(yr.prototype._ul4onattrs),["description","description_url","image","row","column","width","height","header_type","header_background","text_color","background_color1","background_color2"]),fr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(yr.prototype._ul4attrs),["description","description_url","image","row","column","width","height"]));var vr=new(function(t){_inherits(FormType,e.Type);var o=_createSuper(FormType);function FormType(){return _classCallCheck(this,FormType),o.apply(this,arguments)}return _createClass(FormType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof kr}}]),FormType}())("la","Form","The input form."),kr=function(t){_inherits(Form,e.Proto);var o=_createSuper(Form);function Form(e,t){var r;_classCallCheck(this,Form),(r=o.call(this)).globals=e,r.template=t,r._geo_wired=!1;var l,n=_createForOfIteratorHelper(e.record.fields.values());try{for(n.s();!(l=n.n()).done;){var a=l.value;r.wire_field(a)}}catch(e){n.e(e)}finally{n.f()}return r.render_template(null),r}return _createClass(Form,[{key:e.symbols.type,value:function value(){return vr}},{key:"_dom_button",get:function get(){return document.querySelector(this._sel_form+" "+this._sel_button)}},{key:"enabled",get:function get(){return!this._dom_button.disabled}},{key:"enabled",set:function set(e){this._dom_button.disabled=!e}},{key:e.symbols.getattr,value:function value(t){if("enabled"===t)return this.enabled;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,o){if("enabled"!==t)throw new e.AttributeError(this,t);this.enabled=e._bool(o)}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" enabled="+e._repr(this.enabled)+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}},{key:"render_template",value:function render_template(t){var o=this,r={datasources:this.globals.datasources,record:this.globals.record,app:this.globals.app,fields:this.globals.record.fields,identifier:t},l={globals:this.globals,form:this,la:br},n="LivingApps update template: ";n+=null===t?"Initialization":"Value change in "+e._repr(t),this.globals.group_logging(n,(function(){try{o.template.renders(r,l)}catch(t){console&&console.error&&(o.globals._start_log_message(),console.group&&console.group("UL4 stacktrace"),e.report_exc(t),console.groupEnd&&console.groupEnd(),console.groupCollapsed&&console.groupCollapsed("Javascript stacktrace"),console.error(t),console.groupEnd&&console.groupEnd())}}))}},{key:"wire_geo",value:function wire_geo(){var e=this;if(!this._geo_wired){if(null!==this.globals.app.active_view&&navigator.geolocation){var t=this.globals.app.active_view.use_geo;"once"!==t&&"watch"!==t||navigator.geolocation.getCurrentPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)})),"watch"===t&&navigator.geolocation.watchPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)}))}this._geo_wired=!0}}},{key:"wire_field",value:function wire_field(e){var t,o=this,r=_createForOfIteratorHelper(e._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.addEventListener(e._inputevent,(function(t){o.wire_geo(),o.globals.mode=o.globals.mode.substring(0,o.globals.mode.lastIndexOf("/")+1)+"input",o.render_template(e.control.identifier)}))}}catch(e){r.e(e)}finally{r.f()}}}]),Form}();kr.prototype._ul4attrs=new Set(["enabled"]),kr.prototype._sel_form="#livingapps-form form",kr.prototype._sel_button="[type=submit]";for(var mr=0,Cr=[n,i,s,c,yr,fr,h,y,d,v,Qe,et,nt,pt,yt,ft,kt,Ct,Ft,St,xt,Rt,Pt,Bt,Ut,Et,jt,zt,Jt,Zt,to,Xt,ro,ao,uo,po,_o,yo,ko,Co,bo,C,b,x,O,D,N,q,E,L,w,j,Y,K,Q,ee,oe,le,ue,ce,Ce,Me,He,Ve,Lo,Ao,Mo,Io,Ro,Po,Bo,Uo,Vo,Go,Jo,$o,Qo,er,or,lr,ar,sr,cr];mr<Cr.length;mr++){var gr=Cr[mr];e.register("de.livinglogic.livingapi."+gr.name.toLowerCase(),gr)}var br=new e.Module("la","LivingAPI types",{FlashMessage:i,File:Vo,Geo:Go,User:Uo,KeyView:ar,Globals:n,App:s,TextControl:pt,URLControl:ft,EmailControl:yt,PasswordControl:_t,TelControl:kt,TextAreaControl:Ct,HTMLControl:bt,IntControl:et,NumberControl:nt,DateControl:Ft,DatetimeMinuteControl:St,DatetimeSecondControl:xt,BoolControl:Qe,LookupSelectControl:Pt,LookupRadioControl:Bt,LookupChoiceControl:Ut,AppLookupSelectControl:jt,AppLookupRadioControl:zt,AppLookupChoiceControl:Jt,MultipleLookupSelectControl:to,MultipleLookupCheckboxControl:Xt,MultipleLookupChoiceControl:ro,MultipleAppLookupSelectControl:uo,MultipleAppLookupCheckboxControl:po,MultipleAppLookupChoiceControl:_o,FileControl:ko,FileSignatureControl:Co,GeoControl:yo,ViewControl:Bo,RecordChildren:d,Record:v,FileAttachment:Qo,URLAttachment:$o,NoteAttachment:Jo,JSONAttachment:er,Installation:or,HTMLLayoutControl:Io,ImageLayoutControl:Ro,ButtonLayoutControl:Po,View:c,DataSource:h,DataSourceChildren:y,LookupItem:Lo,ViewLookupItem:Ao,Category:lr,AppParameter:sr,MutableAppParameter:cr,MenuItem:yr,Panel:fr});export{s as App,Jt as AppLookupChoiceControl,Ne as AppLookupChoiceField,Et as AppLookupControl,He as AppLookupField,Me as AppLookupFieldBase,zt as AppLookupRadioControl,De as AppLookupRadioField,jt as AppLookupSelectControl,Oe as AppLookupSelectField,sr as AppParameter,zo as Attachment,o as Base,Qe as BoolControl,b as BoolField,bo as ButtonControl,Po as ButtonLayoutControl,lr as Category,ne as ChoiceFieldBase,$e as Control,h as DataSource,y as DataSourceChildren,Ft as DateControl,ee as DateField,Q as DateFieldBase,St as DatetimeMinuteControl,oe as DatetimeMinuteField,xt as DatetimeSecondControl,le as DatetimeSecondField,yt as EmailControl,O as EmailField,C as Field,Vo as File,Qo as FileAttachment,ko as FileControl,Y as FileField,Co as FileSignatureControl,K as FileSignatureField,i as FlashMessage,kr as Form,Go as Geo,yo as GeoControl,j as GeoField,n as Globals,bt as HTMLControl,E as HTMLField,Io as HTMLLayoutControl,r as Handler,Ro as ImageLayoutControl,or as Installation,et as IntControl,L as IntField,er as JSONAttachment,ar as KeyView,Mo as LayoutControl,Ut as LookupChoiceControl,ve as LookupChoiceField,Rt as LookupControl,ce as LookupField,ue as LookupFieldBase,Lo as LookupItem,Bt as LookupRadioControl,he as LookupRadioField,Pt as LookupSelectControl,de as LookupSelectField,yr as MenuItem,po as MultipleAppLookupCheckboxControl,Ge as MultipleAppLookupCheckboxField,_o as MultipleAppLookupChoiceControl,Ye as MultipleAppLookupChoiceField,ao as MultipleAppLookupControl,Ve as MultipleAppLookupField,uo as MultipleAppLookupSelectControl,We as MultipleAppLookupSelectField,Xt as MultipleLookupCheckboxControl,be as MultipleLookupCheckboxField,ro as MultipleLookupChoiceControl,Ae as MultipleLookupChoiceField,Zt as MultipleLookupControl,Ce as MultipleLookupField,to as MultipleLookupSelectControl,Le as MultipleLookupSelectField,cr as MutableAppParameter,Jo as NoteAttachment,nt as NumberControl,w as NumberField,fr as Panel,_t as PasswordControl,H as PasswordField,v as Record,d as RecordChildren,ut as StringControl,x as StringField,kt as TelControl,N as TelField,Ct as TextAreaControl,q as TextAreaField,pt as TextControl,$o as URLAttachment,ft as URLControl,D as URLField,Uo as User,c as View,Bo as ViewControl,Ao as ViewLookupItem,element,br as module,url_with_params,t as version};
1
+ import*as e from"/npm/@livinglogic/ul4@1.16.1/dist/esm/ul4.js";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var o,r=_getPrototypeOf(e);if(t){var l=_getPrototypeOf(this).constructor;o=Reflect.construct(r,arguments,l)}else o=r.apply(this,arguments);return _possibleConstructorReturn(this,o)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,o){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,o){var r=_superPropBase(e,t);if(r){var l=Object.getOwnPropertyDescriptor(r,t);return l.get?l.get.call(o):l.value}})(e,t,o||e)}function set(e,t,o,r){return(set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,o,r){var l,n=_superPropBase(e,t);if(n){if((l=Object.getOwnPropertyDescriptor(n,t)).set)return l.set.call(r,o),!0;if(!l.writable)return!1}if(l=Object.getOwnPropertyDescriptor(r,t)){if(!l.writable)return!1;l.value=o,Object.defineProperty(r,t,l)}else!function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}(r,t,o);return!0})(e,t,o,r)}function _set(e,t,o,r,l){if(!set(e,t,o,r||e)&&l)throw new Error("failed to set property");return o}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==o)return;var r,l,n=[],a=!0,i=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(n.push(r.value),!t||n.length!==t);a=!0);}catch(e){i=!0,l=e}finally{try{a||null==o.return||o.return()}finally{if(i)throw l}}return n}(e,t)||_unsupportedIterableToArray(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function _createForOfIteratorHelper(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,n=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return n=e.done,e},e:function(e){a=!0,l=e},f:function(){try{n||null==o.return||o.return()}finally{if(a)throw l}}}}var t="1.15.0";function element(t){for(var o=document.createElement(t),r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];for(var a=0,i=l;a<i.length;a++){var u=i[a];"string"==typeof u&&o.appendChild(document.createTextNode(u));var s=u instanceof Map,p=e._isobject(u);if(s||p){p&&(u=Object.entries(u));var c,_=_createForOfIteratorHelper(u);try{for(_.s();!(c=_.n()).done;){var h=_slicedToArray(c.value,2),y=h[0],d=h[1];null!==d&&o.setAttribute(y,d)}}catch(e){_.e(e)}finally{_.f()}}}return o}function _append_param_to_url(t,o,r){if(e._islist(r)||e._isset(r)){var l,n=_createForOfIteratorHelper(r);try{for(n.s();!(l=n.n()).done;){_append_param_to_url(t,o,l.value)}}catch(e){n.e(e)}finally{n.f()}}else"string"==typeof r?t.append(o,r):null!==r&&t.append(o,e._str(r))}function url_with_params(t){for(var o=new URLSearchParams,r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];for(var a=0,i=l;a<i.length;a++){var u=i[a];if(e._islist(u)&&2==u.length)_append_param_to_url.apply(void 0,[o].concat(_toConsumableArray(u)));else if("[object Object]"!==Object.prototype.toString.call(u)||u instanceof e.Proto){if(null!==u&&"object"===_typeof(u)&&"object"===_typeof(u.__proto__)&&u.__proto__===Map.prototype){var s,p=_createForOfIteratorHelper(u);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];_append_param_to_url(o,_,h)}}catch(e){p.e(e)}finally{p.f()}}}else for(var y in u)_append_param_to_url(o,y,u[y])}return(o=o.toString().replace("+","%20")).length>0&&(t+="?"+o),t}var o=function(t){_inherits(Base,e.Proto);var o=_createSuper(Base);function Base(e){var t;return _classCallCheck(this,Base),(t=o.call(this)).id=e,t}return _createClass(Base,[{key:"ul4onid",get:function get(){return this.id}},{key:"ul4ondump",value:function ul4ondump(e){for(var t=0;t<this._ul4onattrs.length;++t)e.dump(this._dumpUL4ONAttr(this._ul4onattrs[t]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return this[e]}},{key:"ul4onload",value:function ul4onload(e){for(var t=0,o=e.loadcontent();;++t){var r=o.next();if(r.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],r.value)}for(;t<this._ul4onattrs.length;++t)this._setDefaultUL4ONAttr(this._ul4onattrs[t])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){this[e]=null}},{key:e.symbols.getattr,value:function value(t){if(this._ul4attrs.has(t)){var value=this[t];if("function"==typeof value){var o=value.bind(this);return o._ul4_name=value._ul4_name||value.name,o._ul4_signature=value._ul4_signature,o._ul4_needsobject=value._ul4_needsobject,o._ul4_needscontext=value._ul4_needscontext,o}return value}if(t.startsWith("x_"))return this.hasOwnProperty(t)?this[t]:null;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,o){if(!t.startsWith("x_"))throw new e.AttributeError(this,t);this[t]=o}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Base}(),r=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}(),l=new(function(t){_inherits(GlobalsType,e.Type);var o=_createSuper(GlobalsType);function GlobalsType(){return _classCallCheck(this,GlobalsType),o.apply(this,arguments)}return _createClass(GlobalsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof n}}]),GlobalsType}())("la","Globals","Global information"),n=function(t){_inherits(Globals,o);var n=_createSuper(Globals);function Globals(e){var t;return _classCallCheck(this,Globals),(t=n.call(this,e)).version=null,t.hostname=null,t.platform=null,t.user=null,t.lang=null,t.datasources=null,t.app=null,t.record=null,t.mode=null,t.maxdbactions=null,t.maxtemplateruntime=null,t.flashmessages=null,t.view_template_id=null,t.email_template_id=null,t.handler=new r,t._log_stack=[],t._current_geo=null,t}return _createClass(Globals,[{key:e.symbols.type,value:function value(){return l}},{key:"dist",value:function dist(e,t){var o=function sqsin(e){return(e=Math.sin(e))*e},r=function sqsos(e){return(e=Math.cos(e))*e},l=Math.PI/180,n=1/298.257223563,a=e.lat*l,i=e.long*l,u=t.lat*l,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*l)/2,_=o(p)*r(c)+r(s)*o(c),h=r(p)*r(c)+o(s)*o(c),y=Math.atan(Math.sqrt(_/h)),d=2*y*6378.137;if(0===d)return d;var f=Math.sqrt(_*h)/y,v=(3*f+1)/(2*_);return d*(1+n*((3*f-1)/(2*h))*o(s)*r(p)-n*v*r(s)*o(p))}},{key:"scaled_url",value:function scaled_url(e,t,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"sm",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,p=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,c=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],_=null;e instanceof Vo&&(e=e.archive_url,(_=encodeURIComponent(e.filename))!=e.filename&&(_=null));var h="https://"+this.hostname;return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==r&&(h+="/rt:"+r),null!=t&&(h+="/w:"+t),null!=o&&(h+="/h:"+o),l&&(h+="/el:1"),null!=n&&(h+="/g:"+n),null!=a&&(h+="/q:"+a),null!==i&&i%360!=0&&(h+="/rot:"+rotatet),null!=u&&(h+="/bl:"+u),null!=s&&(h+="/sh:"+s),null!=p&&(h+="/f:"+p),null!=_&&(h+="/fn:"+_),h+="/plain/"+encodeURIComponent(e)}},{key:"qrcode_url",value:function qrcode_url(e,t){return"https://"+this.hostname+"/qr/generate?data="+encodeURIComponent(e)+"&size="+encodeURIComponent(t)}},{key:e.symbols.repr,value:function value(){return"<Globals version="+e._repr(this.version)+" mode="+e._repr(this.mode)+">"}},{key:"current_geo",value:function current_geo(){return this._current_geo}},{key:"set_current_geo",value:function set_current_geo(e){this._current_geo=new Go(this,e.coords.latitude,e.coords.longitude)}},{key:"_in_form",value:function _in_form(){return null!==this.mode&&this.mode.startsWith("form/")}},{key:"msg_bool",value:function msg_bool(e){switch(e){case!0:return this.msg_bool_true();case!1:return this.msg_bool_false();default:return null}}},{key:"msg_bool_true",value:function msg_bool_true(e){switch(this.lang){case"de":return"Ja";default:return"Yes"}}},{key:"msg_bool_false",value:function msg_bool_false(e){switch(this.lang){case"de":return"Nein";default:return"No"}}},{key:"msg_no_fields",value:function msg_no_fields(){switch(this.lang){case"de":return"(Keine Felder gefunden)";default:return"(No fields found)"}}},{key:"msg_nothing_selected",value:function msg_nothing_selected(){switch(this.lang){case"de":return"(Nichts ausgewählt)";default:return"(Nothing selected)"}}},{key:"_make_log_message",value:function _make_log_message(t){return t.map((function(t){return"string"!=typeof t?e._repr(t):t})).join(" ")}},{key:"begin_logging",value:function begin_logging(e){this._log_stack.push({header:e,output:!1})}},{key:"end_logging",value:function end_logging(){this._log_stack&&(this._log_stack[this._log_stack.length-1].output&&console&&console.groupEnd&&console.groupEnd(),this._log_stack.pop())}},{key:"group_logging",value:function group_logging(e,t){this.begin_logging(e);try{t()}finally{this.end_logging()}}},{key:"_start_log_message",value:function _start_log_message(){var e,t=_createForOfIteratorHelper(this._log_stack);try{for(t.s();!(e=t.n()).done;){var o=e.value;o.output||(console&&console.group&&console.group(o.header),o.output=!0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"log_debug",value:function log_debug(e){this._start_log_message(),console&&console.debug&&console.debug(this._make_log_message(e))}},{key:"log_info",value:function log_info(e){this._start_log_message(),console&&console.info&&console.info(this._make_log_message(e))}},{key:"log_warning",value:function log_warning(e){this._start_log_message(),console&&console.warn&&console.warn(this._make_log_message(e))}},{key:"log_error",value:function log_error(e){this._start_log_message(),console&&console.error&&console.error(this._make_log_message(e))}},{key:"my_apps_url",value:function my_apps_url(){return"https://"+this.hostname+"/apps.htm"}},{key:"my_tasks_url",value:function my_tasks_url(){return"https://"+this.hostname+"/xist4c/web/aufgaben_id_393_.htm"}},{key:"catalog_url",value:function catalog_url(){return"https://"+this.hostname+"/katalog/home.htm"}},{key:"chats_url",value:function chats_url(){return"https://"+this.hostname+"/chats.htm"}},{key:"profile_url",value:function profile_url(){return"https://"+this.hostname+"/profil/index.htm"}},{key:"account_url",value:function account_url(){return"https://"+this.hostname+"/account.htm"}},{key:"logout_url",value:function logout_url(){return"https://"+this.hostname+"/login.htm?logout=standardCug"}}]),Globals}();n.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","lang","datasources","hostname","app","record","mode","view_template_id","email_template_id","view_id"],n.prototype._ul4attrs=new Set(["version","hostname","platform","user","lang","datasources","app","record","maxdbactions","maxtemplateruntime","flashmessages","mode","scaled_url","qrcode_url","dist","current_geo","log_debug","log_info","log_warning","log_error","my_apps_url","my_tasks_url","catalog_url","chats_url","profile_url","account_url","logout_url"]),e.expose(n.prototype.log_debug,["message","*"]),e.expose(n.prototype.log_info,["message","*"]),e.expose(n.prototype.log_warning,["message","*"]),e.expose(n.prototype.log_error,["message","*"]),e.expose(n.prototype.dist,["geo1","pk","geo2","pk"]),e.expose(n.prototype.current_geo,[]),e.expose(n.prototype.scaled_url,["image","p","width","p","height","p","type","k=","fill","enlarge","k=",!0,"gravity","k=","sm","quality","k=",null,"rotate","k=",null,"blur","k=",null,"sharpen","k=",null,"format","k=",null,"cache","k=",!0]);var a=new(function(t){_inherits(FlashMessageType,e.Type);var o=_createSuper(FlashMessageType);function FlashMessageType(){return _classCallCheck(this,FlashMessageType),o.apply(this,arguments)}return _createClass(FlashMessageType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof i}}]),FlashMessageType}())("la","FlashMessage","A flash message in a web page"),i=function(t){_inherits(FlashMessage,o);var r=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),r.apply(this,arguments)}return _createClass(FlashMessage,[{key:e.symbols.type,value:function value(){return a}},{key:e.symbols.repr,value:function value(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();i.prototype._ul4onattrs=["timestamp","type","title","message"],i.prototype._ul4attrs=new Set(["timestamp","type","title","message"]);var u=new(function(t){_inherits(AppType,e.Type);var o=_createSuper(AppType);function AppType(){return _classCallCheck(this,AppType),o.apply(this,arguments)}return _createClass(AppType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof s}}]),AppType}())("la","App","A LivingApps application"),s=function(t){_inherits(App,o);var r=_createSuper(App);function App(){return _classCallCheck(this,App),r.apply(this,arguments)}return _createClass(App,[{key:e.symbols.type,value:function value(){return u}},{key:e.symbols.repr,value:function value(){return"<App id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"insert",value:function insert(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=this[e.symbols.call](t);return this.globals.handler.save(this),o}},{key:"template_url",value:function template_url(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2?arguments[2]:void 0,r="https://"+this.globals.hostname+"/gateway/apps/"+this.id;return null!==t&&(r+="/"+t.id),url_with_params(r,["template",e],o)}},{key:"new_embedded_url",value:function new_embedded_url(e){return url_with_params("https://"+this.globals.hostname+"/dateneingabe/"+this.id+"/new",e)}},{key:"new_standalone_url",value:function new_standalone_url(e){return url_with_params("https://"+this.globals.hostname+"/gateway/apps/"+this.id+"/new",e)}},{key:"home_url",value:function home_url(){return"https://"+this.globals.hostname+"/apps/"+this.id+".htm"}},{key:"datamanagement_url",value:function datamanagement_url(){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id}},{key:"import_url",value:function import_url(){return"https://"+this.globals.hostname+"/import-export/"+this.id+".htm"}},{key:"tasks_url",value:function tasks_url(){return"https://"+this.globals.hostname+"/_id_1073_.htm?uuid="+this.id+"&dId="+this.id+"&p_tpl_uuid="+this.id+"&resetInfo=true&templateIdentifier=created_task_"+this.id}},{key:"datamanagement_config_url",value:function datamanagement_config_url(){return"https://"+this.globals.hostname+"/datenmanagement-konfigurieren/"+this.id+".htm"}},{key:"permissions_url",value:function permissions_url(){return"https://"+this.globals.hostname+"/_id_833_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true"}},{key:"datamanageview_url",value:function datamanageview_url(e){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id+"_datamanage_master_"+e}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:e.symbols.call,value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new v(null,this);if(e._ismap(t)){var r,l=_createForOfIteratorHelper(t.keys());try{for(l.s();!(r=l.n()).done;){var n=r.value;if(!o.fields.has(n))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(n))}}catch(e){l.e(e)}finally{l.f()}o._make_fields(!0,t,null,null)}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var a in t)if(!o.fields.has(a))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(a));o._make_fields(!0,new Map(e._list(e.dicttype.items(t))),null,null)}return o}},{key:e.symbols.getattr,value:function value(t){if(t.startsWith("c_")){if(!this.controls.has(t.substr(2)))throw new e.AttributeError(this,t);return this.controls.get(t.substr(2))}if(t.startsWith("lc_")){if(null===this.layout_controls||!this.layout_controls.has(t.substr(3)))throw new e.AttributeError(this,t);return this.layout_controls.get(t.substr(3))}if(t.startsWith("p_")&&null!==this.params){if(!this.params.has(t.substr(2)))throw new e.AttributeError(this,t);return this.params.get(t.substr(2))}if(t.startsWith("pv_")&&null!==this.params){if(!this.params.has(t.substr(3)))throw new e.AttributeError(this,t);return this.params.get(t.substr(3)).value}return _get(_getPrototypeOf(App.prototype),e.symbols.getattr,this).call(this,t)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(t){if(null===t);else if("string"==typeof t){if(null===this.views||!this.views.has(t))throw new e.ValueError("View "+e._repr(t)+" not found!");t=this.views.get(t)}else{if(!(t instanceof c))throw new e.TypeError(e._repr(t)+" is not a view!");if(t.app!==this)throw new e.ValueError("View "+e._repr(t)+" belongs to the wrong app!")}this._active_view=t}},{key:"layout_controls",get:function get(){return null===this.active_views?new Map:this.active_view.layout_controls}}]),App}();s.prototype._ul4onattrs=["globals","name","description","lang","gramgen","typename_nom_sin","typename_gen_sin","typename_dat_sin","typename_acc_sin","typename_nom_plu","typename_gen_plu","typename_dat_plu","typename_acc_plu","startlink","image","createdby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view","datasource","menus","panels"],s.prototype._ul4attrs=new Set(["id","globals","name","description","lang","gramgen","typename_nom_sin","typename_gen_sin","typename_dat_sin","typename_acc_sin","typename_nom_plu","typename_gen_plu","typename_dat_plu","typename_acc_plu","startlink","image","createdat","createdby","updatedat","updatedby","controls","layout_controls","records","recordcount","installation","categories","params","views","menus","panels","datasource","datamanagement_identifier","insert","favorite","_active_view","template_url","new_embedded_url","new_standalone_url","home_url","datamanagement_url","import_url","tasks_url","datamanagement_config_url","permissions_url","datamanageview_url"]),e.expose(s.prototype[e.symbols.call],["values","**"],{needsobject:!0}),e.expose(s.prototype.insert,["values","**"],{needsobject:!0}),e.expose(s.prototype.template_url,["identifier","p","record","p=",null,"params","**"]),e.expose(s.prototype.new_embedded_url,["params","**"]),e.expose(s.prototype.new_standalone_url,["params","**"]);var p=new(function(t){_inherits(ViewType,e.Type);var o=_createSuper(ViewType);function ViewType(){return _classCallCheck(this,ViewType),o.apply(this,arguments)}return _createClass(ViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof c}}]),ViewType}())("la","View","An input form for a LivingViews application"),c=function(t){_inherits(View,o);var r=_createSuper(View);function View(){return _classCallCheck(this,View),r.apply(this,arguments)}return _createClass(View,[{key:"globals",get:function get(){return this.app.globals}},{key:e.symbols.type,value:function value(){return p}},{key:e.symbols.repr,value:function value(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();c.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"],c.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"]);var _=new(function(t){_inherits(DataSourceType,e.Type);var o=_createSuper(DataSourceType);function DataSourceType(){return _classCallCheck(this,DataSourceType),o.apply(this,arguments)}return _createClass(DataSourceType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof h}}]),DataSourceType}())("la","DataSource","The data resulting from a data source configuration"),h=function(t){_inherits(DataSource,o);var r=_createSuper(DataSource);function DataSource(){return _classCallCheck(this,DataSource),r.apply(this,arguments)}return _createClass(DataSource,[{key:e.symbols.type,value:function value(){return _}},{key:e.symbols.repr,value:function value(){return"<DataSource id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSource}();h.prototype._ul4onattrs=["identifier","app","apps"],h.prototype._ul4attrs=new Set(["id","identifier","app","apps"]),new(function(t){_inherits(DataSourceChildrenType,e.Type);var o=_createSuper(DataSourceChildrenType);function DataSourceChildrenType(){return _classCallCheck(this,DataSourceChildrenType),o.apply(this,arguments)}return _createClass(DataSourceChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof y}}]),DataSourceChildrenType}())("la","DataSourceChildren","A master/detail specification in a data source");var y=function(t){_inherits(DataSourceChildren,o);var r=_createSuper(DataSourceChildren);function DataSourceChildren(){return _classCallCheck(this,DataSourceChildren),r.apply(this,arguments)}return _createClass(DataSourceChildren,[{key:e.symbols.type,value:function value(){return datasourcetypechildren}},{key:e.symbols.repr,value:function value(){return"<DataSourceChildren id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceChildren}();y.prototype._ul4onattrs=["datasource","identifier","control"],y.prototype._ul4attrs=new Set(["id","identifier","datasource","control"]),new(function(t){_inherits(RecordChildrenType,e.Type);var o=_createSuper(RecordChildrenType);function RecordChildrenType(){return _classCallCheck(this,RecordChildrenType),o.apply(this,arguments)}return _createClass(RecordChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof d}}]),RecordChildrenType}())("la","RecordChildren","The child records of a master record");var d=function(t){_inherits(RecordChildren,o);var r=_createSuper(RecordChildren);function RecordChildren(){return _classCallCheck(this,RecordChildren),r.apply(this,arguments)}return _createClass(RecordChildren,[{key:e.symbols.type,value:function value(){return recordtypechildren}},{key:e.symbols.repr,value:function value(){return"<RecordChildren id="+e._repr(this.id)+">"}}]),RecordChildren}();d.prototype._ul4onattrs=["record","datasourcechildren","records"],d.prototype._ul4attrs=new Set(["id","record","datasourcechildren","records"]);var f=new(function(t){_inherits(RecordType,e.Type);var o=_createSuper(RecordType);function RecordType(){return _classCallCheck(this,RecordType),o.apply(this,arguments)}return _createClass(RecordType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof v}}]),RecordType}())("la","Record","A record of a LivingApp application"),v=function(t){_inherits(Record,o);var r=_createSuper(Record);function Record(e,t){var o;return _classCallCheck(this,Record),(o=r.call(this,e)).app=t,o.createdat=null,o.createdby=null,o.updatedat=null,o.updatedby=null,o.updatecount=0,o._sparsevalues=new Map,o._values=null,o._fields=null,o.details=new Map,o._children=null,o.attachments=null,o.errors=[],o._sparsefielderrors=null,o._sparsefieldlookupdata=null,o._is_deleted=!1,o._is_new=!0,o}return _createClass(Record,[{key:e.symbols.type,value:function value(){return f}},{key:"as_text",value:function as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0==e)return"...";var o,r=[],l=_createForOfIteratorHelper(t||this.app.controls);try{for(l.s();!(o=l.n()).done;){var n=_slicedToArray(o.value,2),a=n[0],i=n[1];if(null!==t||i.priority){var u=this.fields.get(a).value_as_text(e-1);null!==u&&r.push([i.label,u])}}}catch(e){l.e(e)}finally{l.f()}if(0===r.length)return this.globals.msg_no_fields();if(1===r.length)return r[0][1];for(var s=[],p=0,c=r;p<c.length;p++){var _=_slicedToArray(c[p],2),h=_[0],y=_[1];s.push(h+": "+y)}return s.join(", ")}},{key:"_make_fields",value:function _make_fields(e,t,o,r){var l,n=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(l=a.n()).done;){var i=l.value,u=i.identifier,s=null;null!==t&&(e&&!t.has(u)?s=i.default:t.has(u)&&(s=t.get(u)));var p=new i.fieldtype(i,this,s);n.set(u,p),null!==o&&o.has(u)&&(p.errors=o.get(u)),null!==r&&r.has(u)&&(p.lookupdata=r.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=n,this._sparsevalues=null,this._sparsefielderrors=null,this._sparselookupdata=null}},{key:"_in_form",value:function _in_form(){var e=this.app.globals;return e._in_form()&&this===e.record}},{key:e.symbols.repr,value:function value(){var t,o=["<Record id=",e._repr(this.id)],r=_createForOfIteratorHelper(this.fields.values());try{for(r.s();!(t=r.n()).done;){var l=t.value;l.control.priority&&!l.is_empty()&&(o.push(" v_"),o.push(l.control.identifier),o.push("="),o.push(e._repr(l.value)))}}catch(e){r.e(e)}finally{r.f()}return o.push(" state="),o.push(e._repr(this.state)),o.push(">"),o.join("")}},{key:"state",get:function get(){return this._is_deleted?"deleted":this._is_new?"new":this.is_dirty()?"dirty":"saved"}},{key:"values",get:function get(){if(null===this._values){this._values=new Map;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){var o=e.value;this._values.set(o.control.identifier,o.value)}}catch(e){t.e(e)}finally{t.f()}}return this._values}},{key:"fields",get:function get(){return null===this._fields&&this._make_fields(!1,this._sparsevalues,this._sparsefielderrors,this._sparsefieldlookupdata),this._fields}},{key:"children",get:function get(){if(null===this._children){this._children=new Map;var e,t=_createForOfIteratorHelper(this.details.values());try{for(t.s();!(e=t.n()).done;){var o=e.value;this._children.set(o.datasourcechildren.identifier,o.records)}}catch(e){t.e(e)}finally{t.f()}}return this._children}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.is_dirty())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.has_errors())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"delete",value:function _delete(){var e=this.app.globals.handler.delete(this);return this._is_deleted=!0,e}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._ismap(t)){var o,r=_createForOfIteratorHelper(t.entries());try{for(r.s();!(o=r.n()).done;){var l=_slicedToArray(o.value,2),n=l[0],a=l[1];if(!this.fields.has(n))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(n));fields.get(n).value=a}}catch(e){r.e(e)}finally{r.f()}}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var i in t){if(!this.fields.has(i))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(i));record.fields.get(i).value=t[i]}}this.app.globals.handler.save(this)}},{key:"template_url",value:function template_url(e,t){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id,["template",e],t)}},{key:"edit_embedded_url",value:function edit_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_standalone_url",value:function edit_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_url",value:function edit_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.edit_standalone_url(t):this.edit_embedded_url(t)}},{key:"display_embedded_url",value:function display_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_standalone_url",value:function display_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_url",value:function display_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.display_standalone_url(t):this.display_embedded_url(t)}},{key:"search",value:function search(t){for(var o in t){var r=t[o];if(e._bool(r)&&!this.fields.get(o).search(r))return!1}return!0}},{key:"ul4onload",value:function ul4onload(e){_get(_getPrototypeOf(Record.prototype),"ul4onload",this).call(this,e),this._is_new=!1}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"values"===e?this._sparsevalues:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"values"===e?(this._sparsevalues=t,this._values=null,this._fields=null):this[e]=t}},{key:e.symbols.getattr,value:function value(t){return t.startsWith("c_")?this.children.get(t.substr(2)):t.startsWith("d_")?this.details.get(t.substr(2)):t.startsWith("f_")?this.fields.get(t.substr(2)):t.startsWith("v_")?this.fields.get(t.substr(2)).value:_get(_getPrototypeOf(Record.prototype),e.symbols.getattr,this).call(this,t)}},{key:e.symbols.setattr,value:function value(t,o){t.startsWith("c_")?this.children[t.substr(2)]=o:t.startsWith("v_")?this.fields.get(t.substr(2)).value=o:_get(_getPrototypeOf(Record.prototype),e.symbols.setattr,this).call(this,t,o)}}]),Record}();v.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","details","errors","_sparsefielderrors","_sparsefieldlookupdata"],v.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","fields","attachments","details","children","errors","template_url","edit_embedded_url","edit_standalone_url"]),e.expose(v.prototype.is_dirty,[]),e.expose(v.prototype.has_errors,[]),e.expose(v.prototype.delete,[]),e.expose(v.prototype.save,[]),e.expose(v.prototype.update,["values","**"],{needsobject:!0}),e.expose(v.prototype.template_url,["identifier","p","params","**"]),e.expose(v.prototype.edit_embedded_url,["params","**"]),e.expose(v.prototype.edit_standalone_url,["params","**"]);var k=function(t){_inherits(FieldType,e.Type);var o=_createSuper(FieldType);function FieldType(){return _classCallCheck(this,FieldType),o.apply(this,arguments)}return _createClass(FieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof C}}]),FieldType}(),m=new k("la","Field","Holds the value of a field of a record (and related information)"),C=function(t){_inherits(Field,o);var r=_createSuper(Field);function Field(e,t,o){var l;return _classCallCheck(this,Field),(l=r.call(this,null)).control=e,l.record=t,l._label=null,l._description=null,l._lookupdata=null,l.errors=[],l._value=null,l._in_form()||(l.value=o),l._dirty=!1,l._enabled=!0,l._writable=!0,l._visible=!0,l._required=null,l._in_text=null,l._top=null,l._left=null,l}return _createClass(Field,[{key:e.symbols.type,value:function value(){return m}},{key:"value",get:function get(){return this._in_form()?this._get_dom_value():this._value}},{key:"value",set:function set(t){var o=this._value,r={value:t,errors:[]};this._validate(r),e._ne(o,r.value)&&(null!==this.record._values&&this.record._values.set(this.control.identifier,r.value),this._value=r.value,this._dirty=!0),this.errors=r.errors,this._in_form()&&this._set_dom_value(this._value)}},{key:"value_as_text",value:function value_as_text(){return null}},{key:"_validate",value:function _validate(e){}},{key:"_set_dom_label",value:function _set_dom_label(){this._in_form()&&(this._dom_label.textContent=this.label)}},{key:"mode",get:function get(){var e;return null!==(e=this._mode)&&void 0!==e?e:this.control.mode}},{key:"mode",set:function set(e){this._mode=e}},{key:"label",get:function get(){var e;return null!==(e=this._label)&&void 0!==e?e:this.control.label}},{key:"label",set:function set(e){this._label=e,this._set_dom_label()}},{key:"description",get:function get(){var e;return null!==(e=this._description)&&void 0!==e?e:this.control.description}},{key:"description",set:function set(e){this._description=e}},{key:"globals",get:function get(){return this.control.globals}},{key:"is_empty",value:function is_empty(){return null===this._value}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"add_error",value:function add_error(e){this.errors.push(e)}},{key:"set_error",value:function set_error(e){this.errors=null!==e?[e]:[]}},{key:"top",get:function get(){var e;return null!==(e=this._top)&&void 0!==e?e:this.control.top}},{key:"top",set:function set(e){this._top=e,this._in_form()&&(this._dom_root.style.top=this.top+"px")}},{key:"left",get:function get(){var e;return null!==(e=this._left)&&void 0!==e?e:this.control.left}},{key:"left",set:function set(e){this._left=e,this._in_form()&&(this._dom_root.style.left=this.left+"px")}},{key:"width",get:function get(){return this.control.width}},{key:"height",get:function get(){return this.control.width}},{key:"search",value:function search(e){return this.control.search(this.value,e)}},{key:"msg_field_required",value:function msg_field_required(e){switch(this.globals.lang){case"de":return'"'.concat(this.label,'" wird benötigt!');default:return'"'.concat(this.label,'" is required!')}}},{key:"msg_field_wrong_type",value:function msg_field_wrong_type(t){return'"'.concat(this.label,"\" doesn't support the type ").concat(e._type(t).name,"!")}},{key:"msg_bool_truerequired",value:function msg_bool_truerequired(e){return'"'.concat(this.label,'" only accepts "Yes"!')}},{key:"msg_string_tooshort",value:function msg_string_tooshort(e){return'"'.concat(this.label,'" is too short. You must use at least ').concat(this.control.minlength," characters!")}},{key:"msg_string_toolong",value:function msg_string_toolong(e){return'"'.concat(this.label,'" is too long. You may use at most ').concat(this.control.maxlength," characters!")}},{key:"msg_email_format",value:function msg_email_format(e){return'"'.concat(this.label,'" must be a valid email address!')}},{key:"msg_url_format",value:function msg_url_format(e){return'"'.concat(this.label,'" must be a valid URL!')}},{key:"msg_tel_format",value:function msg_tel_format(e){return'"'.concat(this.label,'" must be a valid phone number!')}},{key:"msg_date_format",value:function msg_date_format(e){return'"'.concat(this.label,"\" doesn't support this date format!")}},{key:"msg_number_format",value:function msg_number_format(e){return'"'.concat(this.label,"\" doesn't support this number format!")}},{key:"msg_lookup_wrongitem",value:function msg_lookup_wrongitem(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" can't be found!")}},{key:"_in_form",value:function _in_form(){return this.record._in_form()}},{key:"_sel_root",get:function get(){return"#livingapps-form ."+this.control._cssclass_root+".llft-id-"+this.control.identifier}},{key:"_sel_label",get:function get(){return this._sel_root+" label span"}},{key:"_sel_control",get:function get(){return this._sel_root+" "+this.control._cssclass_control}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"_dom_label",get:function get(){return document.querySelector(this._sel_label)}},{key:"_dom_control",get:function get(){return document.querySelector(this._sel_control)}},{key:"_dom_controls",get:function get(){return document.querySelectorAll(this._sel_control)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.value}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.value=null!==e?e:""}},{key:"visible",get:function get(){return this._visible}},{key:"visible",set:function set(e){this._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:"required",get:function get(){var e;return null!==(e=this._required)&&void 0!==e?e:this.control.required}},{key:"required",set:function set(e){this._required=e}},{key:"in_list",get:function get(){return this.control.in_list}},{key:"in_mobile_list",get:function get(){return this.control.in_mobile_list}},{key:"in_text",get:function get(){var e;return null!==(e=this._in_text)&&void 0!==e?e:this.control.in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"enabled",get:function get(){return this._in_form()?!this._dom_root.classList.contains("llft-control-readonly"):this._enabled}},{key:"enabled",set:function set(e){if(this._in_form()){var t,o=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.disabled=o}}catch(e){r.e(e)}finally{r.f()}this._dom_root.classList.toggle("llft-control-readonly",o)}this._enabled=e}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){this._writable=e}},{key:e.symbols.repr,value:function value(){var t="<"+this.constructor.name+" identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),this.errors.length>0&&(t+=" has_errors()=True"),t+=">"}},{key:e.symbols.setattr,value:function value(t,o){if("value"===t)this.value=o;else if("visible"===t)this.visible=e._bool(o);else if("enabled"===t)this.enabled=e._bool(o);else if("writable"===t)this.writable=e._bool(o);else if("required"===t)this.required=e._bool(o);else if("top"===t){if(null!==o&&"number"!=typeof o)throw new e.ArgumentError("top must be None or an int");this.top=o}else if("left"===t){if(null!==o&&"number"!=typeof o)throw new e.ArgumentError("left must be None or an int");this.left=o}else _get(_getPrototypeOf(Field.prototype),e.symbols.setattr,this).call(this,t,o)}}]),Field}();C.prototype._ul4onattrs=["control","record","label","value","errors","_visible","_enabled","_writable","_required"],C.prototype._ul4attrs=new Set(["control","record","label","description","value","mode","errors","visible","enabled","writable","required","in_text","top","left","width","height"]),C.prototype._inputevent="input";var g=new(function(e){_inherits(BoolFieldType,k);var t=_createSuper(BoolFieldType);function BoolFieldType(){return _classCallCheck(this,BoolFieldType),t.apply(this,arguments)}return _createClass(BoolFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof b}}]),BoolFieldType}())("la","BoolField","Holds the value of a bool field of a record (and related information)"),b=function(t){_inherits(BoolField,C);var o=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),o.apply(this,arguments)}return _createClass(BoolField,[{key:e.symbols.type,value:function value(){return g}},{key:"_validate",value:function _validate(e){null===e.value?this.control.required&&e.errors.push(this.msg_field_required(e.value)):"string"==typeof e.value?0===e.value.length?(this.control.required&&e.errors.push(this.msg_bool_truerequired(e.value)),e.value=null):["false","no","0","off"].includes(e.value.toLowerCase())?e.value=!1:e.value=!0:"boolean"==typeof e.value?this.control.required&&!e.value&&e.errors.push(this.msg_bool_truerequired(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.checked}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.checked=e}},{key:"value_as_text",value:function value_as_text(){return this.globals.msg_bool(this.value)}}]),BoolField}(),T=new(function(e){_inherits(IntFieldType,k);var t=_createSuper(IntFieldType);function IntFieldType(){return _classCallCheck(this,IntFieldType),t.apply(this,arguments)}return _createClass(IntFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof L}}]),IntFieldType}())("la","IntField","Holds the value of an int field of a record (and related information)"),L=function(t){_inherits(IntField,C);var o=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),o.apply(this,arguments)}return _createClass(IntField,[{key:e.symbols.type,value:function value(){return T}},{key:"_parse",value:function _parse(e){return/^\s*[-+]?\d+\s*$/.test(e)?parseInt(e):null}},{key:"_validate",value:function _validate(e){if(null===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value));else if("string"==typeof e.value){var t=this._parse(e.value);null!==t?e.value=t:e.errors.push(this.msg_number_format(e.value))}else"number"==typeof e.value?Math.round(e.value)!==e.value&&e.errors.push(this.msg_field_wrong_type(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(IntField.prototype),"_get_dom_value",this).call(this);if(e){var t=this._parse(e);null!==t&&(e=t)}return e}},{key:"_set_dom_value",value:function _set_dom_value(e){_get(_getPrototypeOf(IntField.prototype),"_set_dom_value",this).call(this,null!==e?e+"":"")}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null!=e?e+"":null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,o=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=o}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(IntField.prototype),"writable",e,this,!0)}}]),IntField}(),A=new(function(e){_inherits(NumberFieldType,k);var t=_createSuper(NumberFieldType);function NumberFieldType(){return _classCallCheck(this,NumberFieldType),t.apply(this,arguments)}return _createClass(NumberFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof w}}]),NumberFieldType}())("la","NumberField","Holds the value of a number field of a record (and related information)"),w=function(t){_inherits(NumberField,C);var o=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),o.apply(this,arguments)}return _createClass(NumberField,[{key:e.symbols.type,value:function value(){return A}},{key:"_parse",value:function _parse(e){if(null===e)return null;for(var t=e,o="",r=0,l=0,n=0;n<e.length;++n){var a=e[n];","==a?(r++,o+=a):"."==a&&(l++,o+=a)}var i=null;if(0==r)l<=1||(i="de");else if(1==r)i=1==l?".,"==o?"de":"en":"de";else{if(!(l<=1))return null;i="en"}"de"===i?t=t.replace(/\./g,"").replace(/,/g,"."):"en"===i&&(t=t.replace(/,/g,""));var u=parseFloat(t);return isNaN(u)?e:u}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if("string"==typeof t.value){var o=this._parse(t.value);null!==o?(o=this._bound_value(o),null!==this.control.precision&&(o=e._round(o,this.control.precision)),t.value=o):t.errors.push(this.msg_number_format(t.value))}else if("number"==typeof t.value){var r=this._bound_value(t.value);null!==this.control.precision&&(r=e._round(r,this.control.precision)),t.value=r}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_bound_value",value:function _bound_value(e){return null!==this.control.minimum&&e<this.control.minimum&&(e=this.control.minimum),null!==this.control.maximum&&e>this.control.maximum&&(e=this.control.maximum),e}},{key:"_get_dom_value",value:function _get_dom_value(){var t=_get(_getPrototypeOf(NumberField.prototype),"_get_dom_value",this).call(this);if(t){if("string"==typeof t){var o=this._parse(t);null!==o&&(t=o)}"number"==typeof t&&(null!==this.control.precision&&(t=e._round(t,this.control.precision)),t=this._bound_value(t))}else t=null;return t}},{key:"_set_dom_value",value:function _set_dom_value(e){"number"==typeof e?(e=this._bound_value(e),null!==this.control.precision&&(e=e.toFixed(this.control.precision))):null===e&&(e=""),e+="","de"==this.globals.lang&&null===this.control.precision&&(e=e.replace(".",",")),_get(_getPrototypeOf(NumberField.prototype),"_set_dom_value",this).call(this,e)}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:null!==this.control.precision?e.toFixed(this.control.precision):e.toString()}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,o=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=o}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(NumberField.prototype),"writable",e,this,!0)}}]),NumberField}(),S=function(e){_inherits(StringFieldType,k);var t=_createSuper(StringFieldType);function StringFieldType(){return _classCallCheck(this,StringFieldType),t.apply(this,arguments)}return _createClass(StringFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof x}}]),StringFieldType}(),M=new S("la","StringField","Holds the value of a string field of a record (and related information)"),x=function(t){_inherits(StringField,C);var o=_createSuper(StringField);function StringField(){return _classCallCheck(this,StringField),o.apply(this,arguments)}return _createClass(StringField,[{key:e.symbols.type,value:function value(){return M}},{key:"_validate",value:function _validate(e){if(null===e.value||""===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null;else if("string"==typeof e.value){var t=this.control.minlength,o=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==o&&e.value.length>o&&e.errors.push(this.msg_string_toolong(e.value))}else e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,o=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=o}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(StringField.prototype),"writable",e,this,!0)}},{key:"value_as_text",value:function value_as_text(){return this.value}}]),StringField}(),I=new(function(e){_inherits(PasswordFieldType,S);var t=_createSuper(PasswordFieldType);function PasswordFieldType(){return _classCallCheck(this,PasswordFieldType),t.apply(this,arguments)}return _createClass(PasswordFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof H}}]),PasswordFieldType}())("la","PasswordField","Holds the value of a string/password field of a record (and related information)"),H=function(t){_inherits(PasswordField,x);var o=_createSuper(PasswordField);function PasswordField(){return _classCallCheck(this,PasswordField),o.apply(this,arguments)}return _createClass(PasswordField,[{key:e.symbols.type,value:function value(){return I}}]),PasswordField}(),R=new(function(e){_inherits(EmailFieldType,S);var t=_createSuper(EmailFieldType);function EmailFieldType(){return _classCallCheck(this,EmailFieldType),t.apply(this,arguments)}return _createClass(EmailFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof O}}]),EmailFieldType}())("la","EmailField","Holds the value of a string/email field of a record (and related information)"),O=function(t){_inherits(EmailField,x);var o=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),o.apply(this,arguments)}return _createClass(EmailField,[{key:e.symbols.type,value:function value(){return R}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e.value)||e.errors.push(this.msg_email_format(e.value))}_get(_getPrototypeOf(EmailField.prototype),"_validate",this).call(this,e)}}]),EmailField}(),P=new(function(e){_inherits(URLFieldType,S);var t=_createSuper(URLFieldType);function URLFieldType(){return _classCallCheck(this,URLFieldType),t.apply(this,arguments)}return _createClass(URLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof D}}]),URLFieldType}())("la","URLField","Holds the value of a string/url field of a record (and related information)"),D=function(t){_inherits(URLField,x);var o=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),o.apply(this,arguments)}return _createClass(URLField,[{key:e.symbols.type,value:function value(){return P}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){var t=null;try{t=new URL(e.value)}catch(t){e.errors.push(this.msg_url_format(e.value))}null!==t&&"http:"!==t.protocol&&"https:"!==t.protocol&&e.errors.push(this.msg_url_format(e.value))}_get(_getPrototypeOf(URLField.prototype),"_validate",this).call(this,e)}}]),URLField}(),B=new(function(e){_inherits(TelFieldType,S);var t=_createSuper(TelFieldType);function TelFieldType(){return _classCallCheck(this,TelFieldType),t.apply(this,arguments)}return _createClass(TelFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof N}}]),TelFieldType}())("la","TelField","Holds the value of a string/tel field of a record (and related information)"),N=function(t){_inherits(TelField,x);var o=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),o.apply(this,arguments)}return _createClass(TelField,[{key:e.symbols.type,value:function value(){return B}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^\\+?[0-9 /()-]+$/.test(e.value)||e.errors.push(this.msg_tel_format(e.value))}_get(_getPrototypeOf(TelField.prototype),"_validate",this).call(this,e)}}]),TelField}(),U=new(function(e){_inherits(TextAreaFieldType,S);var t=_createSuper(TextAreaFieldType);function TextAreaFieldType(){return _classCallCheck(this,TextAreaFieldType),t.apply(this,arguments)}return _createClass(TextAreaFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof q}}]),TextAreaFieldType}())("la","TextAreaField","Holds the value of a string/textarea field of a record (and related information)"),q=function(t){_inherits(TextAreaField,x);var o=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),o.apply(this,arguments)}return _createClass(TextAreaField,[{key:e.symbols.type,value:function value(){return U}}]),TextAreaField}(),V=new(function(e){_inherits(HTMLFieldType,S);var t=_createSuper(HTMLFieldType);function HTMLFieldType(){return _classCallCheck(this,HTMLFieldType),t.apply(this,arguments)}return _createClass(HTMLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof E}}]),HTMLFieldType}())("la","HTMLField","Holds the value of a string/html field of a record (and related information)"),E=function(t){_inherits(HTMLField,x);var o=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),o.apply(this,arguments)}return _createClass(HTMLField,[{key:e.symbols.type,value:function value(){return V}}]),HTMLField}(),G=new(function(e){_inherits(GeoFieldType,k);var t=_createSuper(GeoFieldType);function GeoFieldType(){return _classCallCheck(this,GeoFieldType),t.apply(this,arguments)}return _createClass(GeoFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof j}}]),GeoFieldType}())("la","GeoField","Holds the value of a geo field of a record (and related information)"),j=function(t){_inherits(GeoField,C);var o=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),o.apply(this,arguments)}return _createClass(GeoField,[{key:e.symbols.type,value:function value(){return G}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var o=e.value;if(o.id.endsWith("_geoinfo")){var r=o.value;if(r)return r=JSON.parse(r),new Go(this.globals,r.geometry.coordinates[0],r.geometry.coordinates[1],r.properties.formatted_address)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){if(null===t){var o,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(o=r.n()).done;){o.value.value=null}}catch(e){r.e(e)}finally{r.f()}}else{var l,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(l=n.n()).done;){var a=l.value;if(a.id.endsWith("_geoinfo")){var i={type:"Feature",geometry:{coordinates:[t.lat,t.long]},properties:{formatted_address:t.info}};a.value=e._asjson(i)}else a.value=t.info}}catch(e){n.e(e)}finally{n.f()}}}},{key:"value_as_text",value:function value_as_text(){var e=this.value;if(null===this.value)return null;var t=e.lat.toFixed(5)+", "+e.long.toFixed(5);return null!==e.info&&(t+=" ("+e.info+")"),t}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof Go||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}();j.prototype._inputevent="llgeo";var W=function(e){_inherits(FileFieldType,k);var t=_createSuper(FileFieldType);function FileFieldType(){return _classCallCheck(this,FileFieldType),t.apply(this,arguments)}return _createClass(FileFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Y}}]),FileFieldType}(),z=new W("la","FileField","Holds the value of a file field of a record (and related information)"),Y=function(t){_inherits(FileField,C);var o=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),o.apply(this,arguments)}return _createClass(FileField,[{key:e.symbols.type,value:function value(){return z}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof Vo||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return null}},{key:"_set_dom_value",value:function _set_dom_value(){}}]),FileField}(),J=new(function(e){_inherits(FileSignatureFieldType,W);var t=_createSuper(FileSignatureFieldType);function FileSignatureFieldType(){return _classCallCheck(this,FileSignatureFieldType),t.apply(this,arguments)}return _createClass(FileSignatureFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof K}}]),FileSignatureFieldType}())("la","FileSignatureField","Holds the value of a file/signature field of a record (and related information)"),K=function(t){_inherits(FileSignatureField,Y);var o=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),o.apply(this,arguments)}return _createClass(FileSignatureField,[{key:e.symbols.type,value:function value(){return J}},{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(),$=function(e){_inherits(DateFieldBaseType,k);var t=_createSuper(DateFieldBaseType);function DateFieldBaseType(){return _classCallCheck(this,DateFieldBaseType),t.apply(this,arguments)}return _createClass(DateFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Q}}]),DateFieldBaseType}(),Z=new $("la","DateFieldBase","Holds the value of a date field of a record (and related information)"),Q=function(t){_inherits(DateFieldBase,C);var o=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),o.apply(this,arguments)}return _createClass(DateFieldBase,[{key:e.symbols.type,value:function value(){return Z}},{key:"value_as_text",value:function value_as_text(){var t=this.value;return null===t?null:"string"==typeof t?t:e._format(t,this.control.formatstring())}},{key:"_parse",value:function _parse(e,t){var o=null,r=null,l=null,n=0,a=0,i=0,u=null;function _int(e,t,o,r){return(e=e.substring(0,t)).length!=t?null:(e=parseInt(e,10),isNaN(e)||e<o||e>r?null:e)}for(;e;){if(!t)return null;if(t.startsWith("%Y")){if(null===(o=_int(e,4)))return null;e=e.substring(4),t=t.substring(2)}else if(t.startsWith("%y")){if(null===(o=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%m")){if(null===(r=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%d")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%H")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%I")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%M")){if(null===(a=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%S")){if(null===(i=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%p")){if(e.toLowerCase().startsWith("pm"))u=!0;else{if(!e.toLowerCase().startsWith("am"))return null;u=!1}e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%%")){if(!e.startsWith("%"))return null;e=e.substring(1),t=t.substring(2)}else if(t.startsWith("%z")){if(!e.startsWith("-")&&!e.startsWith("+"))return null;if(null===_int(e=e.substring(1),2))return null;if(!(e=e.substring(2)).startsWith(":"))return null;if(null===_int(e=e.substring(1),2))return null;e=e.substring(2),t=t.substring(2)}else{if(!e.startsWith(t.substring(0,1)))return null;e=e.substring(1),t=t.substring(1)}}if(t)return null;if(null===o)return null;if(null===r||r<1||r>12)return null;if(null===l||l<1||l>31)return null;if(null===u){if(n<0||n>23)return null}else{if(n<0||n>11)return null;u&&(n+=12)}return a<0||a>59||a<0||a>59||i<0||i>60?null:new Date(o,r-1,l,n,a,i)}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if(t.value instanceof Date)t.value=this._convert(t.value);else if(t.value instanceof e.Date_)t.value=this._convert(t.value._date);else if("string"==typeof t.value){var o,r=null,l=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(l.s();!(o=l.n()).done;){var n=o.value;if(null!==(r=this._parse(t.value,n)))break}}catch(e){l.e(e)}finally{l.f()}null!==r?t.value=this._convert(r):t.errors.push(this.msg_date_format(t.value))}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(DateFieldBase.prototype),"_get_dom_value",this).call(this);if(!e)return null;var t,o=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(o.s();!(t=o.n()).done;){var r=t.value,l=this._parse(e,r);if(null!==l)return this._convert(l)}}catch(e){o.e(e)}finally{o.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){t=null!==t?e._format(t,this.control.formatstring(),this.globals.lang):"",_get(_getPrototypeOf(DateFieldBase.prototype),"_set_dom_value",this).call(this,t)}}]),DateFieldBase}(),X=new(function(e){_inherits(DateFieldType,$);var t=_createSuper(DateFieldType);function DateFieldType(){return _classCallCheck(this,DateFieldType),t.apply(this,arguments)}return _createClass(DateFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ee}}]),DateFieldType}())("la","DateField","Holds the value of a date/date field of a record (and related information)"),ee=function(t){_inherits(DateField,Q);var o=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),o.apply(this,arguments)}return _createClass(DateField,[{key:e.symbols.type,value:function value(){return X}},{key:"_convert",value:function _convert(t){return new e.Date_(t.getFullYear(),t.getMonth()+1,t.getDate())}}]),DateField}(),te=new(function(e){_inherits(DatetimeMinuteFieldType,$);var t=_createSuper(DatetimeMinuteFieldType);function DatetimeMinuteFieldType(){return _classCallCheck(this,DatetimeMinuteFieldType),t.apply(this,arguments)}return _createClass(DatetimeMinuteFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof oe}}]),DatetimeMinuteFieldType}())("la","DatetimeMinuteField","Holds the value of a date/datetimeminute field of a record (and related information)"),oe=function(t){_inherits(DatetimeMinuteField,Q);var o=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),o.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:e.symbols.type,value:function value(){return te}},{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(),re=new(function(e){_inherits(DatetimeSecondFieldType,$);var t=_createSuper(DatetimeSecondFieldType);function DatetimeSecondFieldType(){return _classCallCheck(this,DatetimeSecondFieldType),t.apply(this,arguments)}return _createClass(DatetimeSecondFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof le}}]),DatetimeSecondFieldType}())("la","DatetimeSecondField","Holds the value of a date/datetimesecond field of a record (and related information)"),le=function(t){_inherits(DatetimeSecondField,Q);var o=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),o.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:e.symbols.type,value:function value(){return re}},{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(),ne=function(t){_inherits(ChoiceFieldBase,C);var o=_createSuper(ChoiceFieldBase);function ChoiceFieldBase(){return _classCallCheck(this,ChoiceFieldBase),o.apply(this,arguments)}return _createClass(ChoiceFieldBase,[{key:"_make_option",value:function _make_option(e,t,o){return element("option",o,{value:t,class:t===this.control.none_key?"la-none-option":null,selected:e?"selected":null})}},{key:"_set_dom_lookupdata_select",value:function _set_dom_lookupdata_select(t){var o;null===t&&(t=this.control.lookup_data),e._isobject(t)&&(t=new Map(Object.entries(t)));var r,l=!1,n=new Set,a=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option:checked"));try{for(a.s();!(r=a.n()).done;){var i=r.value.getAttribute("value");t.has(i)?n.add(i):i===this.control.none_key&&(l=!0)}}catch(e){a.e(e)}finally{a.f()}var u=[];null!==this.control.none_key&&u.push(this._make_option(l,this.control.none_key,null!==this.control.none_label?this.control.none_label:this.globals.msg_nothing_selected()));var s,p=_createForOfIteratorHelper(t);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];u.push(this._make_option(n.has(_),_,this._make_label(h)))}}catch(e){p.e(e)}finally{p.f()}(o=this._dom_control).replaceChildren.apply(o,u)}},{key:"_set_dom_lookupdata_input",value:function _set_dom_lookupdata_input(t){null===t?t=this.control.lookupdata:e._isobject(t)&&(t=new Map(Object.entries(t)));var o,r=!1,l=new Set,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(o=n.n()).done;){var a=o.value,i=a.getAttribute("value");a.checked&&(t.has(i)?l.add(i):i===this.control.none_key&&(r=!0))}}catch(e){n.e(e)}finally{n.f()}var u=this._dom_root.querySelector("input[value="+this.control.none_key+"]");null!==u&&(u.checked=r);var s,p=_createForOfIteratorHelper(this.control.lookupdata);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=(c[1],this._dom_root.querySelector("input[value="+_+"]")),y=this._dom_root.querySelector("label[for="+h.id+"]");t.has(_)?(h.style.display="inline",y.style.display="inline",y.innerText=this._make_label(t.get(_))):(h.style.display="none",y.style.display="none",y.checked=!1)}}catch(e){p.e(e)}finally{p.f()}}}]),ChoiceFieldBase}(),ae=function(e){_inherits(LookupFieldBaseType,k);var t=_createSuper(LookupFieldBaseType);function LookupFieldBaseType(){return _classCallCheck(this,LookupFieldBaseType),t.apply(this,arguments)}return _createClass(LookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ue}}]),LookupFieldBaseType}(),ie=new ae("la","LookupFieldBase","Base type of LookupField and MultipleLookupField"),ue=function(t){_inherits(LookupFieldBase,ne);var o=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),o.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:e.symbols.type,value:function value(){return ie}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:this.control.lookupdata}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof Lo?t.label:e._str(t)}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var o=this.control.lookupdata.get(t);if(void 0===o)if(this.control.autoexpandable){var r,l=_createForOfIteratorHelper(this.lookupdata.values());try{for(l.s();!(r=l.n()).done;){var n=r.value;if(t===n.label)return void(e.value=n)}}catch(e){l.e(e)}finally{l.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=o}else if(t instanceof Lo){this.control.lookupdata.get(t.key)!==t&&(e.errors.push(this.msg_lookup_wrongitem(t)),e.value=null)}else e.errors.push(this.msg_field_wrong_type(t)),e.value=null}}]),LookupFieldBase}(),se=function(e){_inherits(LookupFieldType,ae);var t=_createSuper(LookupFieldType);function LookupFieldType(){return _classCallCheck(this,LookupFieldType),t.apply(this,arguments)}return _createClass(LookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ce}}]),LookupFieldType}(),pe=new se("la","LookupField","Holds the value of a lookup field of a record (and related information)"),ce=function(t){_inherits(LookupField,ue);var o=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),o.apply(this,arguments)}return _createClass(LookupField,[{key:e.symbols.type,value:function value(){return pe}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:e.label}},{key:"_validate",value:function _validate(e){var t=e.value;null===t||""===t||this.control.none_key===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}(),_e=new(function(e){_inherits(LookupRadioFieldType,se);var t=_createSuper(LookupRadioFieldType);function LookupRadioFieldType(){return _classCallCheck(this,LookupRadioFieldType),t.apply(this,arguments)}return _createClass(LookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof he}}]),LookupRadioFieldType}())("la","LookupRadioField","Holds the value of a lookup/radio field of a record (and related information)"),he=function(t){_inherits(LookupRadioField,ce);var o=_createSuper(LookupRadioField);function LookupRadioField(){return _classCallCheck(this,LookupRadioField),o.apply(this,arguments)}return _createClass(LookupRadioField,[{key:e.symbols.type,value:function value(){return _e}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var o=e.value;if(o.checked){var r=o.getAttribute("value");return this.control.lookupdata.get(r)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e instanceof Lo&&(e=e.key),null===e&&(e=this.control.none_key);var t,o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(t=o.n()).done;){var r=t.value;r.checked=r.getAttribute("value")===e}}catch(e){o.e(e)}finally{o.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),LookupRadioField}(),ye=new(function(e){_inherits(LookupSelectFieldType,se);var t=_createSuper(LookupSelectFieldType);function LookupSelectFieldType(){return _classCallCheck(this,LookupSelectFieldType),t.apply(this,arguments)}return _createClass(LookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof de}}]),LookupSelectFieldType}())("la","LookupSelectField","Holds the value of a lookup/select field of a record (and related information)"),de=function(t){_inherits(LookupSelectField,ce);var o=_createSuper(LookupSelectField);function LookupSelectField(){return _classCallCheck(this,LookupSelectField),o.apply(this,arguments)}return _createClass(LookupSelectField,[{key:e.symbols.type,value:function value(){return ye}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(LookupSelectField.prototype),"_get_dom_value",this).call(this);return e&&(e=e===this.control.none_key?null:this.control.lookupdata.get(e)),e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(LookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.key:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),LookupSelectField}(),fe=new(function(e){_inherits(LookupChoiceFieldType,se);var t=_createSuper(LookupChoiceFieldType);function LookupChoiceFieldType(){return _classCallCheck(this,LookupChoiceFieldType),t.apply(this,arguments)}return _createClass(LookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ve}}]),LookupChoiceFieldType}())("la","LookupChoiceField","Holds the value of a lookup/choice field of a record (and related information)"),ve=function(t){_inherits(LookupChoiceField,ce);var o=_createSuper(LookupChoiceField);function LookupChoiceField(){return _classCallCheck(this,LookupChoiceField),o.apply(this,arguments)}return _createClass(LookupChoiceField,[{key:e.symbols.type,value:function value(){return fe}}]),LookupChoiceField}();ve.prototype._inputevent="llchoice";var ke=function(e){_inherits(MultipleLookupFieldType,ae);var t=_createSuper(MultipleLookupFieldType);function MultipleLookupFieldType(){return _classCallCheck(this,MultipleLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ce}}]),MultipleLookupFieldType}(),me=new ke("la","MultipleLookupField","Holds the value of a multiple lookup field of a record (and related information)"),Ce=function(t){_inherits(MultipleLookupField,ue);var o=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),o.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:e.symbols.type,value:function value(){return me}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e||0===e.length?null:e.map((function(e){return e.label})).join(", ")}},{key:"_validate",value:function _validate(e){var t=e.value,o="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||o&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(o){var r,l=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(r=n.n()).done;){var a={value:r.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):l.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=l}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}(),ge=new(function(e){_inherits(MultipleLookupCheckboxFieldType,ke);var t=_createSuper(MultipleLookupCheckboxFieldType);function MultipleLookupCheckboxFieldType(){return _classCallCheck(this,MultipleLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof be}}]),MultipleLookupCheckboxFieldType}())("la","MultipleLookupCheckboxField","Holds the value of a multiplelookup/radio field of a record (and related information)"),be=function(t){_inherits(MultipleLookupCheckboxField,Ce);var o=_createSuper(MultipleLookupCheckboxField);function MultipleLookupCheckboxField(){return _classCallCheck(this,MultipleLookupCheckboxField),o.apply(this,arguments)}return _createClass(MultipleLookupCheckboxField,[{key:e.symbols.type,value:function value(){return ge}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],o=_createForOfIteratorHelper(this._dom_controls);try{for(o.s();!(e=o.n()).done;){var r=e.value;if(r.checked){var l=r.getAttribute("value");t.push(this.control.lookupdata.get(l))}}}catch(e){o.e(e)}finally{o.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var o,r=new Set,l=_createForOfIteratorHelper(t.value);try{for(l.s();!(o=l.n()).done;){var n=o.value;r.add(n.key)}}catch(e){l.e(e)}finally{l.f()}var a,i=_createForOfIteratorHelper(this._dom_controls);try{for(i.s();!(a=i.n()).done;){var u=a.value;u.checked=r.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),MultipleLookupCheckboxField}(),Te=new(function(e){_inherits(MultipleLookupSelectFieldType,ke);var t=_createSuper(MultipleLookupSelectFieldType);function MultipleLookupSelectFieldType(){return _classCallCheck(this,MultipleLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Le}}]),MultipleLookupSelectFieldType}())("la","MultipleLookupSelectField","Holds the value of a multiplelookup/select field of a record (and related information)"),Le=function(t){_inherits(MultipleLookupSelectField,Ce);var o=_createSuper(MultipleLookupSelectField);function MultipleLookupSelectField(){return _classCallCheck(this,MultipleLookupSelectField),o.apply(this,arguments)}return _createClass(MultipleLookupSelectField,[{key:e.symbols.type,value:function value(){return Te}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],o=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(o.s();!(e=o.n()).done;){var r=e.value;r.selected&&t.push(this.control.lookupdata.get(r.getAttribute("value")))}}catch(e){o.e(e)}finally{o.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var o,r=new Set,l=_createForOfIteratorHelper(t.value);try{for(l.s();!(o=l.n()).done;){var n=o.value;r.add(n.key)}}catch(e){l.e(e)}finally{l.f()}var a,i=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(i.s();!(a=i.n()).done;){var u=a.value;u.selected=r.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleLookupSelectField}(),Fe=new(function(e){_inherits(MultipleLookupChoiceFieldType,ke);var t=_createSuper(MultipleLookupChoiceFieldType);function MultipleLookupChoiceFieldType(){return _classCallCheck(this,MultipleLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ae}}]),MultipleLookupChoiceFieldType}())("la","MultipleLookupChoiceField","Holds the value of a multiplelookup/choice field of a record (and related information)"),Ae=function(t){_inherits(MultipleLookupChoiceField,Ce);var o=_createSuper(MultipleLookupChoiceField);function MultipleLookupChoiceField(){return _classCallCheck(this,MultipleLookupChoiceField),o.apply(this,arguments)}return _createClass(MultipleLookupChoiceField,[{key:e.symbols.type,value:function value(){return Fe}}]),MultipleLookupChoiceField}();Ae.prototype._inputevent="llchoice";var we=function(e){_inherits(AppLookupFieldBaseType,k);var t=_createSuper(AppLookupFieldBaseType);function AppLookupFieldBaseType(){return _classCallCheck(this,AppLookupFieldBaseType),t.apply(this,arguments)}return _createClass(AppLookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Me}}]),AppLookupFieldBaseType}(),Se=new we("la","AppLookupFieldBase","Base type of AppLookupField and MultipleAppLookupField"),Me=function(t){_inherits(AppLookupFieldBase,ne);var o=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),o.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:e.symbols.type,value:function value(){return Se}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof v?t.as_text(this.control.lookup_controls):e._str(t)}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var o=null!==this.control.lookup_app.records?this.control.lookup_app.records.get(t):void 0;void 0===o?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=o}else t instanceof v?t.app!==this.control.lookup_app&&(e.errors.push(this.msg_applookup_wrongrecord(t)),e.value=null):(e.errors.push(this.msg_field_wrong_type(t)),e.value=null)}},{key:e.symbols.setattr,value:function value(t,o){"lookupdata"===t?this.lookupdata=o:_get(_getPrototypeOf(AppLookupFieldBase.prototype),e.symbols.setattr,this).call(this,t,o)}}]),AppLookupFieldBase}();Me.prototype._ul4attrs=new Set([].concat(_toConsumableArray(C.prototype._ul4attrs),["lookupdata"]));var xe=function(e){_inherits(AppLookupFieldType,we);var t=_createSuper(AppLookupFieldType);function AppLookupFieldType(){return _classCallCheck(this,AppLookupFieldType),t.apply(this,arguments)}return _createClass(AppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof He}}]),AppLookupFieldType}(),Ie=new xe("la","AppLookupField","Holds the value of a applookup field of a record (and related information)"),He=function(t){_inherits(AppLookupField,Me);var o=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),o.apply(this,arguments)}return _createClass(AppLookupField,[{key:e.symbols.type,value:function value(){return Ie}},{key:"value_as_text",value:function value_as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=this.value;return null===t?null:"("+this.value.as_text(e)+")"}},{key:"_validate",value:function _validate(e){this._find_record(e)}}]),AppLookupField}(),Re=new(function(e){_inherits(AppLookupSelectFieldType,xe);var t=_createSuper(AppLookupSelectFieldType);function AppLookupSelectFieldType(){return _classCallCheck(this,AppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(AppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Oe}}]),AppLookupSelectFieldType}())("la","AppLookupSelectField","Holds the value of a `applookup`/`select` field of a record (and related information)"),Oe=function(t){_inherits(AppLookupSelectField,He);var o=_createSuper(AppLookupSelectField);function AppLookupSelectField(){return _classCallCheck(this,AppLookupSelectField),o.apply(this,arguments)}return _createClass(AppLookupSelectField,[{key:e.symbols.type,value:function value(){return Re}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(AppLookupSelectField.prototype),"_get_dom_value",this).call(this);return null!==this.control.lookup_app.records?void 0===(e=this.control.lookup_app.records.get(e))&&(e=null):e=null,e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(AppLookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.id:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),AppLookupSelectField}(),Pe=new(function(e){_inherits(AppLookupRadioFieldType,xe);var t=_createSuper(AppLookupRadioFieldType);function AppLookupRadioFieldType(){return _classCallCheck(this,AppLookupRadioFieldType),t.apply(this,arguments)}return _createClass(AppLookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof De}}]),AppLookupRadioFieldType}())("la","AppLookupRadioField","Holds the value of a `applookup`/`radio` field of a record (and related information)"),De=function(t){_inherits(AppLookupRadioField,He);var o=_createSuper(AppLookupRadioField);function AppLookupRadioField(){return _classCallCheck(this,AppLookupRadioField),o.apply(this,arguments)}return _createClass(AppLookupRadioField,[{key:e.symbols.type,value:function value(){return Pe}}]),AppLookupRadioField}(),Be=new(function(e){_inherits(AppLookupChoiceFieldType,xe);var t=_createSuper(AppLookupChoiceFieldType);function AppLookupChoiceFieldType(){return _classCallCheck(this,AppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(AppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ne}}]),AppLookupChoiceFieldType}())("la","AppLookupChoiceField","Holds the value of a `applookup`/`choice` field of a record (and related information)"),Ne=function(t){_inherits(AppLookupChoiceField,He);var o=_createSuper(AppLookupChoiceField);function AppLookupChoiceField(e,t,r){var l;return _classCallCheck(this,AppLookupChoiceField),(l=o.call(this,e,t,r))._search_url=null,l._search_param_name=null,l._target_param_name=null,l}return _createClass(AppLookupChoiceField,[{key:e.symbols.type,value:function value(){return Be}},{key:"search_url",get:function get(){var e;return null!==(e=this._search_url)&&void 0!==e?e:this.control.search_url}},{key:"search_url",set:function set(e){this._search_url=e}},{key:"search_param_name",get:function get(){var e;return null!==(e=this._search_param_name)&&void 0!==e?e:this.control.search_param_name}},{key:"search_param_name",set:function set(e){this._search_param_name=e}},{key:"target_param_name",get:function get(){var e;return null!==(e=this._target_param_name)&&void 0!==e?e:this.control.target_param_name}},{key:"target_param_name",set:function set(e){this._target_param_name=e}}]),AppLookupChoiceField}();Ne.prototype._inputevent="llchoice",Ne.prototype._ul4attrs=new Set([].concat(_toConsumableArray(C.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var Ue=function(e){_inherits(MultipleAppLookupFieldType,we);var t=_createSuper(MultipleAppLookupFieldType);function MultipleAppLookupFieldType(){return _classCallCheck(this,MultipleAppLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ve}}]),MultipleAppLookupFieldType}(),qe=new Ue("la","MultipleAppLookupField","Holds the value of a multiple applookup field of a record (and related information)"),Ve=function(t){_inherits(MultipleAppLookupField,Me);var o=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),o.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:e.symbols.type,value:function value(){return qe}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"_validate",value:function _validate(e){var t=e.value,o="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||o&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(o){var r,l=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(r=n.n()).done;){var a={value:r.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):l.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=l}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(),Ee=new(function(e){_inherits(MultipleAppLookupCheckboxFieldType,Ue);var t=_createSuper(MultipleAppLookupCheckboxFieldType);function MultipleAppLookupCheckboxFieldType(){return _classCallCheck(this,MultipleAppLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ge}}]),MultipleAppLookupCheckboxFieldType}())("la","MultipleAppLookupCheckboxField","Holds the value of a `multipleapplookup`/`checkbox` field of a record (and related information)"),Ge=function(t){_inherits(MultipleAppLookupCheckboxField,Ve);var o=_createSuper(MultipleAppLookupCheckboxField);function MultipleAppLookupCheckboxField(){return _classCallCheck(this,MultipleAppLookupCheckboxField),o.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxField,[{key:e.symbols.type,value:function value(){return Ee}}]),MultipleAppLookupCheckboxField}(),je=new(function(e){_inherits(MultipleAppLookupSelectFieldType,Ue);var t=_createSuper(MultipleAppLookupSelectFieldType);function MultipleAppLookupSelectFieldType(){return _classCallCheck(this,MultipleAppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof We}}]),MultipleAppLookupSelectFieldType}())("la","MultipleAppLookupSelectField","Holds the value of a `multipleapplookup`/`select` field of a record (and related information)"),We=function(t){_inherits(MultipleAppLookupSelectField,Ve);var o=_createSuper(MultipleAppLookupSelectField);function MultipleAppLookupSelectField(){return _classCallCheck(this,MultipleAppLookupSelectField),o.apply(this,arguments)}return _createClass(MultipleAppLookupSelectField,[{key:e.symbols.type,value:function value(){return je}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleAppLookupSelectField}(),ze=new(function(e){_inherits(MultipleAppLookupChoiceFieldType,Ue);var t=_createSuper(MultipleAppLookupChoiceFieldType);function MultipleAppLookupChoiceFieldType(){return _classCallCheck(this,MultipleAppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ye}}]),MultipleAppLookupChoiceFieldType}())("la","MultipleAppLookupChoiceField","Holds the value of a `multipleapplookup`/`choice` field of a record (and related information)"),Ye=function(t){_inherits(MultipleAppLookupChoiceField,Ve);var o=_createSuper(MultipleAppLookupChoiceField);function MultipleAppLookupChoiceField(){return _classCallCheck(this,MultipleAppLookupChoiceField),o.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceField,[{key:e.symbols.type,value:function value(){return ze}}]),MultipleAppLookupChoiceField}();Ye.prototype._inputevent="llchoice";var Je=function(t){_inherits(ControlType,e.Type);var o=_createSuper(ControlType);function ControlType(){return _classCallCheck(this,ControlType),o.apply(this,arguments)}return _createClass(ControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $e}}]),ControlType}(),Ke=new Je("la","Control","Metainformation about a field in a LivingApps application"),$e=function(t){_inherits(Control,o);var r=_createSuper(Control);function Control(){return _classCallCheck(this,Control),r.apply(this,arguments)}return _createClass(Control,[{key:e.symbols.type,value:function value(){return Ke}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.app.globals}},{key:"fulltype",get:function get(){return this.subtype?this.type+"/"+this.subtype:this.type}},{key:"label",get:function get(){var e=this._view_control();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"label",set:function set(e){this._label=e}},{key:"description",get:function get(){return this._description}},{key:"description",set:function set(e){this._description=e}},{key:"priority",get:function get(){return this._priority}},{key:"priority",set:function set(e){this._priority=e}},{key:"in_list",get:function get(){return this._priority}},{key:"in_list",set:function set(e){this._priority=e}},{key:"in_mobile_list",get:function get(){return this._in_mobile_list}},{key:"in_mobile_list",set:function set(e){this._in_mobile_list=e}},{key:"in_text",get:function get(){return this._in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"default",get:function get(){return null}},{key:"top",get:function get(){var e=this._view_control();return null!==e?e.top:null}},{key:"left",get:function get(){var e=this._view_control();return null!==e?e.left:null}},{key:"width",get:function get(){var e=this._view_control();return null!==e?e.width:null}},{key:"height",get:function get(){var e=this._view_control();return null!==e?e.height:null}},{key:"z_index",get:function get(){var e=this._view_control();return null!==e?e.z_index:null}},{key:"liveupdate",get:function get(){var e=this._view_control();return null!==e&&e.liveupdate}},{key:"tabindex",get:function get(){var e=this._view_control();return null!==e?e.tabindex:null}},{key:"required",get:function get(){var e=this._view_control();return null!==e?e.required:this._required}},{key:"required",set:function set(e){this._required=e}},{key:"mode",get:function get(){var e=this._view_control();return null!==this.app._active_view&&null===e?null:null===this.app.globals.mode?"display":null!==e?e.mode:"edit"}},{key:"labelpos",get:function get(){var e=this._view_control();return null!==e?e.labelpos:"left"}},{key:"labelwidth",get:function get(){var e=this._view_control();return null!==e?e.labelwidth:null}},{key:"autoalign",get:function get(){var e=this._view_control();return null===e||e.autoalign}},{key:"in_active_view",get:function get(){return null!==this._view_control()}},{key:"_view_control",value:function _view_control(){if(null===this.app._active_view)return null;var e=this.app._active_view.controls.get(this.identifier);return null!=e?e:null}},{key:"_logsearch",value:function _logsearch(e,t){}},{key:"search",value:function search(e,t){return!1}}]),Control}();$e.prototype.type=null,$e.prototype.subtype=null,$e.prototype._ul4onattrs=["identifier","fieldname","app","_label","_description","_priority","_in_mobile_list","_in_text","_required","order","ininsertprocedure","inupdateprocedure"],$e.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","priority","in_list","in_mobile_list","in_text","order","ininsertprocedure","inupdateprocedure","fulltype","label","description","top","left","width","height","z_index","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]),$e.prototype._cssclass_root="llft-control",$e.prototype._cssclass_control="input";var Ze=new(function(e){_inherits(BoolControlType,Je);var t=_createSuper(BoolControlType);function BoolControlType(){return _classCallCheck(this,BoolControlType),t.apply(this,arguments)}return _createClass(BoolControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Qe}}]),BoolControlType}())("la","BoolControl","A LivingApps boolean field (type 'bool')"),Qe=function(t){_inherits(BoolControl,$e);var o=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),o.apply(this,arguments)}return _createClass(BoolControl,[{key:e.symbols.type,value:function value(){return Ze}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}();Qe.prototype.type="bool",Qe.prototype.fieldtype=b;var Xe=new(function(e){_inherits(IntControlType,Je);var t=_createSuper(IntControlType);function IntControlType(){return _classCallCheck(this,IntControlType),t.apply(this,arguments)}return _createClass(IntControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof et}}]),IntControlType}())("la","IntControl","A LivingApps integer field (type 'int')"),et=function(t){_inherits(IntControl,$e);var o=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),o.apply(this,arguments)}return _createClass(IntControl,[{key:e.symbols.type,value:function value(){return Xe}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}();et.prototype.type="int",et.prototype.fieldtype=L;var tt=function(e){_inherits(PlaceholderControlType,Je);var t=_createSuper(PlaceholderControlType);function PlaceholderControlType(){return _classCallCheck(this,PlaceholderControlType),t.apply(this,arguments)}return _createClass(PlaceholderControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof PlaceholderControld}}]),PlaceholderControlType}(),ot=new tt("la","PlaceholderControl","A LivingApps field that has a placeholder"),rt=function(t){_inherits(PlaceholderControl,$e);var o=_createSuper(PlaceholderControl);function PlaceholderControl(){return _classCallCheck(this,PlaceholderControl),o.apply(this,arguments)}return _createClass(PlaceholderControl,[{key:e.symbols.type,value:function value(){return ot}},{key:"placeholder",get:function get(){var e=this._view_control();return null===e?null:e.placeholder}}]),PlaceholderControl}();rt.prototype._ul4attrs=new Set([].concat(_toConsumableArray($e.prototype._ul4attrs),["placeholder"]));var lt=new(function(e){_inherits(NumberControlType,tt);var t=_createSuper(NumberControlType);function NumberControlType(){return _classCallCheck(this,NumberControlType),t.apply(this,arguments)}return _createClass(NumberControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof nt}}]),NumberControlType}())("la","NumberControl","A LivingApps number field (type 'number')"),nt=function(t){_inherits(NumberControl,rt);var o=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),o.apply(this,arguments)}return _createClass(NumberControl,[{key:e.symbols.type,value:function value(){return lt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}();nt.prototype.type="number",nt.prototype.fieldtype=w,nt.prototype._ul4onattrs=[].concat(_toConsumableArray($e.prototype._ul4onattrs),["precision","minimum","maximum"]),nt.prototype._ul4attrs=new Set([].concat(_toConsumableArray($e.prototype._ul4attrs),["precision","minimum","maximum"]));var at=function(e){_inherits(StringControlType,tt);var t=_createSuper(StringControlType);function StringControlType(){return _classCallCheck(this,StringControlType),t.apply(this,arguments)}return _createClass(StringControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ut}}]),StringControlType}(),it=new at("la","StringControl","A LivingApps number field (type 'string')"),ut=function(t){_inherits(StringControl,rt);var o=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),o.apply(this,arguments)}return _createClass(StringControl,[{key:e.symbols.type,value:function value(){return it}},{key:"_user_placeholder",value:function _user_placeholder(t,o){if(null===o)return null;switch(o){case"{gender}":return null!==t?t.gender:null;case"{title}":return null!==t?t.title:null;case"{firstname}":return null!==t?t.firstname:null;case"{surname}":return null!==t?t.surname:null;case"{account}":return null!==t?t.email:null;case"{streetname}":return null!==t?t.streetname:null;case"{streetnumber}":return null!==t?t.streetnumber:null;case"{street}":return null===t?null:null===t.street?t.streetnumber:null===t.streetnumber?t.street:t.street+" "+t.streetnumber;case"{zip}":return null!==t?t.zip:null;case"{phone}":return null!==t?t.phone:null;case"{fax}":return null!==t?t.fax:null;case"{company}":return null!==t?t.company:null;case"{city}":return null!==t?t.city:null;case"{summary}":return null!==t?t.summary:null;case"{interests}":return null!==t?t.interests:null;case"{personal_website}":return null!==t?t.personal_website:null;case"{company_website}":return null!==t?t.company_website:null;case"{position}":return null!==t?t.position:null;case"{department}":return null!==t?t.department:null;case"{today}":return e.today();default:return o}}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:this._user_placeholder(this.app.globals.user,e.default)}},{key:"minlength",get:function get(){var e=this._view_control();if(null===e)return 0;var t=e.minlength;return null===t||t<0?0:t}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return 4e3;var t=e.maxlength;return null===t||t<0||t>4e3?4e3:t}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"contains"===t.operator?null===t.value||null===e?t.value===e:e.toLowerCase().indexOf(t.value.toLowerCase())>=0:void 0}}]),StringControl}();ut.prototype.type="string";var st=new(function(e){_inherits(TextControlType,at);var t=_createSuper(TextControlType);function TextControlType(){return _classCallCheck(this,TextControlType),t.apply(this,arguments)}return _createClass(TextControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof pt}}]),TextControlType}())("la","TextControl","A LivingApps text field (type 'string/text')"),pt=function(t){_inherits(TextControl,ut);var o=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),o.apply(this,arguments)}return _createClass(TextControl,[{key:e.symbols.type,value:function value(){return st}}]),TextControl}();pt.prototype.subtype="text",pt.prototype.fieldtype=x;var ct=new(function(e){_inherits(PasswordControlType,at);var t=_createSuper(PasswordControlType);function PasswordControlType(){return _classCallCheck(this,PasswordControlType),t.apply(this,arguments)}return _createClass(PasswordControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _t}}]),PasswordControlType}())("la","PasswordControl","A LivingApps password field (type 'string/password')"),_t=function(t){_inherits(PasswordControl,ut);var o=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),o.apply(this,arguments)}return _createClass(PasswordControl,[{key:e.symbols.type,value:function value(){return ct}}]),PasswordControl}();_t.prototype.subtype="password",_t.prototype.fieldtype=H;var ht=new(function(e){_inherits(EmailControlType,at);var t=_createSuper(EmailControlType);function EmailControlType(){return _classCallCheck(this,EmailControlType),t.apply(this,arguments)}return _createClass(EmailControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yt}}]),EmailControlType}())("la","EmailControl","A LivingApps email field (type 'string/email')"),yt=function(t){_inherits(EmailControl,ut);var o=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),o.apply(this,arguments)}return _createClass(EmailControl,[{key:e.symbols.type,value:function value(){return ht}}]),EmailControl}();yt.prototype.subtype="email",yt.prototype.fieldtype=O;var dt=new(function(e){_inherits(URLControlType,at);var t=_createSuper(URLControlType);function URLControlType(){return _classCallCheck(this,URLControlType),t.apply(this,arguments)}return _createClass(URLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ft}}]),URLControlType}())("la","URLControl","A LivingApps URL field (type 'string/url')"),ft=function(t){_inherits(URLControl,ut);var o=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),o.apply(this,arguments)}return _createClass(URLControl,[{key:e.symbols.type,value:function value(){return dt}}]),URLControl}();ft.prototype.subtype="url",ft.prototype.fieldtype=D;var vt=new(function(e){_inherits(TelControlType,at);var t=_createSuper(TelControlType);function TelControlType(){return _classCallCheck(this,TelControlType),t.apply(this,arguments)}return _createClass(TelControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof kt}}]),TelControlType}())("la","TelControl","A LivingApps phone number field (type 'string/tel')"),kt=function(t){_inherits(TelControl,ut);var o=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),o.apply(this,arguments)}return _createClass(TelControl,[{key:e.symbols.type,value:function value(){return vt}}]),TelControl}();kt.prototype.subtype="tel",kt.prototype.fieldtype=N;var mt=new(function(e){_inherits(TextAreaControlType,at);var t=_createSuper(TextAreaControlType);function TextAreaControlType(){return _classCallCheck(this,TextAreaControlType),t.apply(this,arguments)}return _createClass(TextAreaControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ct}}]),TextAreaControlType}())("la","TextAreaControl","A LivingApps textarea field (type 'string/textarea')"),Ct=function(t){_inherits(TextAreaControl,ut);var o=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),o.apply(this,arguments)}return _createClass(TextAreaControl,[{key:e.symbols.type,value:function value(){return mt}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return null;if(null!==this.encrypted)return null;var t=e.maxlength;return t<0?null:t}}]),TextAreaControl}();Ct.prototype.subtype="textarea",Ct.prototype.fieldtype=q,Ct.prototype._ul4onattrs=[].concat(_toConsumableArray(ut.prototype._ul4onattrs),["encrypted"]),Ct.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ut.prototype._ul4attrs),["encrypted"])),Ct.prototype._cssclass_control="textarea";var gt=new(function(e){_inherits(HTMLControlType,at);var t=_createSuper(HTMLControlType);function HTMLControlType(){return _classCallCheck(this,HTMLControlType),t.apply(this,arguments)}return _createClass(HTMLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof bt}}]),HTMLControlType}())("la","HTMLControl","A LivingApps HTML field (type 'string/html')"),bt=function(t){_inherits(HTMLControl,ut);var o=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),o.apply(this,arguments)}return _createClass(HTMLControl,[{key:e.symbols.type,value:function value(){return gt}}]),HTMLControl}();bt.prototype.subtype="html",bt.prototype.fieldtype=E;var Tt=function(e){_inherits(DateControlType,tt);var t=_createSuper(DateControlType);function DateControlType(){return _classCallCheck(this,DateControlType),t.apply(this,arguments)}return _createClass(DateControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ft}}]),DateControlType}(),Lt=new Tt("la","DateControl","A LivingApps date field (type 'date/date')"),Ft=function(t){_inherits(DateControl,rt);var o=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),o.apply(this,arguments)}return _createClass(DateControl,[{key:e.symbols.type,value:function value(){return Lt}},{key:"default",get:function get(){var t=this._view_control();return null===t?null:"{today}"===t.default?e.today():null}},{key:"formatstring",value:function formatstring(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),this._formatstrings[e]}},{key:"formatstrings_parse",value:function formatstrings_parse(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),[].concat(_toConsumableArray(this._formatstrings_parse[e]),_toConsumableArray(this._formatstrings_parse.intl))}},{key:"search",value:function search(t,o){this._logsearch(t,o);var r=o.value;return"[object Date]"==Object.prototype.toString.call(r)&&(r=e._format(r,this.formatstring(),this.app.language)),null!==t&&(t=e._format(t,this.formatstring(),this.app.language)),"equals"===o.operator?r===t:"contains"===o.operator&&(null===r||null===t?r===t:t.toLowerCase().indexOf(r.toLowerCase())>=0)}}]),DateControl}();Ft.prototype.type="date",Ft.prototype.subtype="date",Ft.prototype.fieldtype=ee,Ft.prototype._formatstrings={de:"%d.%m.%Y",fr:"%d.%m.%Y",it:"%d.%m.%Y",en:"%m/%d/%Y",intl:"%Y-%m-%d"};var At=[""," %H:%M","T%H:%M"," %H:%M:%S","T%H:%M:%S"," %H:%M:%S.%f","T%H:%M:%S.%f"," %H:%M%z","T%H:%M%z"," %H:%M:%S%z","T%H:%M:%S%z"," %H:%M:%S.%f%z","T%H:%M:%S.%f%z"," %H:%M %z","T%H:%M %z"," %H:%M:%S %z","T%H:%M:%S %z"," %H:%M:%S.%f %z","T%H:%M:%S.%f %z"];Ft.prototype._formatstrings_parse={en:At.map((function(e){return"%m/%d/%Y"+e})),de:At.map((function(e){return"%d.%m.%Y"+e})),fr:At.map((function(e){return"%d.%m.%Y"+e})),it:At.map((function(e){return"%d.%m.%Y"+e})),intl:At.map((function(e){return"%Y-%m-%d"+e}))};var wt=new(function(e){_inherits(DatetimeMinuteControlType,Tt);var t=_createSuper(DatetimeMinuteControlType);function DatetimeMinuteControlType(){return _classCallCheck(this,DatetimeMinuteControlType),t.apply(this,arguments)}return _createClass(DatetimeMinuteControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof St}}]),DatetimeMinuteControlType}())("la","DatetimeMinuteControl","A LivingApps date field (type 'date/datetimeminute')"),St=function(t){_inherits(DatetimeMinuteControl,Ft);var o=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),o.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:e.symbols.type,value:function value(){return wt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setSeconds(0),t.setMilliseconds(0),t}return null}}]),DatetimeMinuteControl}();St.prototype.subtype="datetimeminute",St.prototype.fieldtype=oe,St.prototype._formatstrings={de:"%d.%m.%Y %H:%M",fr:"%d.%m.%Y %H:%M",it:"%d.%m.%Y %H:%M",en:"%m/%d/%Y %H:%M",intl:"%Y-%m-%d %H:%M"};var Mt=new(function(e){_inherits(DatetimeSecondControlType,Tt);var t=_createSuper(DatetimeSecondControlType);function DatetimeSecondControlType(){return _classCallCheck(this,DatetimeSecondControlType),t.apply(this,arguments)}return _createClass(DatetimeSecondControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof xt}}]),DatetimeSecondControlType}())("la","DatetimeSecondControl","A LivingApps date field (type 'date/datetimesecond')"),xt=function(t){_inherits(DatetimeSecondControl,Ft);var o=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),o.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:e.symbols.type,value:function value(){return Mt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setMilliseconds(0),t}return null}}]),DatetimeSecondControl}();xt.prototype.subtype="datetimesecond",xt.prototype.fieldtype=le,xt.prototype._formatstrings={de:"%d.%m.%Y %H:%M:%S",fr:"%d.%m.%Y %H:%M:%S",it:"%d.%m.%Y %H:%M:%S",en:"%m/%d/%Y %H:%M:%S",intl:"%Y-%m-%d %H:%M:%S"};var It=function(e){_inherits(LookupControlType,Je);var t=_createSuper(LookupControlType);function LookupControlType(){return _classCallCheck(this,LookupControlType),t.apply(this,arguments)}return _createClass(LookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Rt}}]),LookupControlType}(),Ht=new It("la","LookupControl","A LivingApps date field (type 'lookup')"),Rt=function(t){_inherits(LookupControl,$e);var o=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),o.apply(this,arguments)}return _createClass(LookupControl,[{key:e.symbols.type,value:function value(){return Ht}},{key:"default",get:function get(){var e,t=this._view_control();return null===t?null:null!==(e=this.lookupdata.get(t))&&void 0!==e?e:null}},{key:"autoexpandable",get:function get(){var e=this._view_control();return null!==e&&e.autoexpandable}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return"equals"===t.operator&&(null===e?null===t.value:e.key===t.value)}}]),LookupControl}();Rt.prototype.type="lookup",Rt.prototype.fieldtype=ce,Rt.prototype._ul4onattrs=[].concat(_toConsumableArray($e.prototype._ul4onattrs),["lookupdata"]),Rt.prototype._ul4attrs=new Set([].concat(_toConsumableArray($e.prototype._ul4attrs),["lookupdata"]));var Ot=new(function(e){_inherits(LookupSelectControlType,It);var t=_createSuper(LookupSelectControlType);function LookupSelectControlType(){return _classCallCheck(this,LookupSelectControlType),t.apply(this,arguments)}return _createClass(LookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pt}}]),LookupSelectControlType}())("la","LookupSelectControl","A LivingApps lookup field (type 'lookup/select')"),Pt=function(t){_inherits(LookupSelectControl,Rt);var o=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),o.apply(this,arguments)}return _createClass(LookupSelectControl,[{key:e.symbols.type,value:function value(){return Ot}}]),LookupSelectControl}();Pt.prototype.subtype="select",Pt.prototype.fieldtype=de,Pt.prototype._cssclass_control="select";var Dt=new(function(e){_inherits(LookupRadioControlType,It);var t=_createSuper(LookupRadioControlType);function LookupRadioControlType(){return _classCallCheck(this,LookupRadioControlType),t.apply(this,arguments)}return _createClass(LookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Bt}}]),LookupRadioControlType}())("la","LookupRadioControl","A LivingApps lookup field (type 'lookup/radio')"),Bt=function(t){_inherits(LookupRadioControl,Rt);var o=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),o.apply(this,arguments)}return _createClass(LookupRadioControl,[{key:e.symbols.type,value:function value(){return Dt}}]),LookupRadioControl}();Bt.prototype.subtype="radio",Bt.prototype.fieldtype=he,Bt.prototype._cssclass_root="llft-element";var Nt=new(function(e){_inherits(LookupChoiceControlType,It);var t=_createSuper(LookupChoiceControlType);function LookupChoiceControlType(){return _classCallCheck(this,LookupChoiceControlType),t.apply(this,arguments)}return _createClass(LookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ut}}]),LookupChoiceControlType}())("la","LookupChoiceControl","A LivingApps lookup field (type 'lookup/choice')"),Ut=function(t){_inherits(LookupChoiceControl,Rt);var o=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),o.apply(this,arguments)}return _createClass(LookupChoiceControl,[{key:e.symbols.type,value:function value(){return Nt}}]),LookupChoiceControl}();Ut.prototype.subtype="choice",Ut.prototype.fieldtype=ve,Ut.prototype._cssclass_control="select";var qt=function(e){_inherits(AppLookupControlType,Je);var t=_createSuper(AppLookupControlType);function AppLookupControlType(){return _classCallCheck(this,AppLookupControlType),t.apply(this,arguments)}return _createClass(AppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Et}}]),AppLookupControlType}(),Vt=new qt("la","AppLookupControl","A LivingApps lookup field (type 'applookup')"),Et=function(t){_inherits(AppLookupControl,$e);var o=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),o.apply(this,arguments)}return _createClass(AppLookupControl,[{key:e.symbols.type,value:function value(){return Vt}},{key:"lookupdata",get:function get(){return null!==this.lookup_app&&null!==this.lookup_app.records?this.lookup_app.records:new Map}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return null===e||null===t.value?e===t.value:e.search(t)}}]),AppLookupControl}();Et.prototype.type="applookup",Et.prototype.fieldtype=He,Et.prototype._ul4onattrs=[].concat(_toConsumableArray($e.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),Et.prototype._ul4attrs=new Set([].concat(_toConsumableArray($e.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var Gt=new(function(e){_inherits(AppLookupSelectControlType,qt);var t=_createSuper(AppLookupSelectControlType);function AppLookupSelectControlType(){return _classCallCheck(this,AppLookupSelectControlType),t.apply(this,arguments)}return _createClass(AppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof jt}}]),AppLookupSelectControlType}())("la","AppLookupSelectControl","A LivingApps applookup field (type 'applookup/select')"),jt=function(t){_inherits(AppLookupSelectControl,Et);var o=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),o.apply(this,arguments)}return _createClass(AppLookupSelectControl,[{key:e.symbols.type,value:function value(){return Gt}}]),AppLookupSelectControl}();jt.prototype.subtype="select",jt.prototype.fieldtype=Oe,jt.prototype._cssclass_control="select";var Wt=new(function(e){_inherits(AppLookupRadioControlType,qt);var t=_createSuper(AppLookupRadioControlType);function AppLookupRadioControlType(){return _classCallCheck(this,AppLookupRadioControlType),t.apply(this,arguments)}return _createClass(AppLookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof zt}}]),AppLookupRadioControlType}())("la","AppLookupRadioControl","A LivingApps applookup field (type 'applookup/radio')"),zt=function(t){_inherits(AppLookupRadioControl,Et);var o=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),o.apply(this,arguments)}return _createClass(AppLookupRadioControl,[{key:e.symbols.type,value:function value(){return Wt}}]),AppLookupRadioControl}();zt.prototype.subtype="radio",zt.prototype.fieldtype=De;var Yt=new(function(e){_inherits(AppLookupChoiceControlType,qt);var t=_createSuper(AppLookupChoiceControlType);function AppLookupChoiceControlType(){return _classCallCheck(this,AppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(AppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Jt}}]),AppLookupChoiceControlType}())("la","AppLookupChoiceControl","A LivingApps applookup field (type 'applookup/choice')"),Jt=function(t){_inherits(AppLookupChoiceControl,Et);var o=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),o.apply(this,arguments)}return _createClass(AppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return Yt}},{key:"search_url",get:function get(){return"field_"+this.identifier+"_search"}},{key:"search_param_name",get:function get(){return"q"}},{key:"target_param_name",get:function get(){return"target"}}]),AppLookupChoiceControl}();Jt.prototype.subtype="choice",Jt.prototype.fieldtype=Ne,Jt.prototype._cssclass_control="select",Jt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Et.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var Kt=function(e){_inherits(MultipleLookupControlType,It);var t=_createSuper(MultipleLookupControlType);function MultipleLookupControlType(){return _classCallCheck(this,MultipleLookupControlType),t.apply(this,arguments)}return _createClass(MultipleLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Zt}}]),MultipleLookupControlType}(),$t=new Kt("la","MultipleLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),Zt=function(t){_inherits(MultipleLookupControl,Rt);var o=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),o.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:e.symbols.type,value:function value(){return $t}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;var t=this.lookupdata.get(e);return void 0!==t?[t]:[]}},{key:"search",value:function search(e,t){if("equals"===t.operator){var o,r=_createForOfIteratorHelper(e);try{for(r.s();!(o=r.n()).done;){if(o.value.key===t.value)return!0}}catch(e){r.e(e)}finally{r.f()}return!1}return!1}}]),MultipleLookupControl}();Zt.prototype.type="multiplelookup",Zt.prototype.fieldtype=Ce;var Qt=new(function(e){_inherits(MultipleLookupCheckboxControlType,Kt);var t=_createSuper(MultipleLookupCheckboxControlType);function MultipleLookupCheckboxControlType(){return _classCallCheck(this,MultipleLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xt}}]),MultipleLookupCheckboxControlType}())("la","MultipleLookupCheckboxControl","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),Xt=function(t){_inherits(MultipleLookupCheckboxControl,Zt);var o=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),o.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return Qt}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}}]),MultipleLookupCheckboxControl}();Xt.prototype.subtype="checkbox",Xt.prototype.fieldtype=be,Xt.prototype._cssclass_root="llft-element";var eo=new(function(e){_inherits(MultipleLookupSelectControlType,Kt);var t=_createSuper(MultipleLookupSelectControlType);function MultipleLookupSelectControlType(){return _classCallCheck(this,MultipleLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof to}}]),MultipleLookupSelectControlType}())("la","MultipleLookupSelectControl","A LivingApps multiplelookup field (type 'multiplelookup/select')"),to=function(t){_inherits(MultipleLookupSelectControl,Zt);var o=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),o.apply(this,arguments)}return _createClass(MultipleLookupSelectControl,[{key:e.symbols.type,value:function value(){return eo}}]),MultipleLookupSelectControl}();to.prototype.subtype="select",to.prototype.fieldtype=Le,to.prototype._cssclass_control="select";var oo=new(function(e){_inherits(MultipleLookupChoiceControlType,Kt);var t=_createSuper(MultipleLookupChoiceControlType);function MultipleLookupChoiceControlType(){return _classCallCheck(this,MultipleLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ro}}]),MultipleLookupChoiceControlType}())("la","MultipleLookupChoiceControl","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),ro=function(t){_inherits(MultipleLookupChoiceControl,Zt);var o=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),o.apply(this,arguments)}return _createClass(MultipleLookupChoiceControl,[{key:e.symbols.type,value:function value(){return oo}}]),MultipleLookupChoiceControl}();ro.prototype.subtype="choice",ro.prototype.fieldtype=Ae,ro.prototype._cssclass_control="select";var lo=function(e){_inherits(MultipleAppLookupControlType,qt);var t=_createSuper(MultipleAppLookupControlType);function MultipleAppLookupControlType(){return _classCallCheck(this,MultipleAppLookupControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ao}}]),MultipleAppLookupControlType}(),no=new lo("la","MultipleAppLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),ao=function(t){_inherits(MultipleAppLookupControl,Et);var o=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),o.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:e.symbols.type,value:function value(){return no}},{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var o,r=_createForOfIteratorHelper(e);try{for(r.s();!(o=r.n()).done;){if(o.value.search(t.value))return!0}}catch(e){r.e(e)}finally{r.f()}return!1}return!1}}]),MultipleAppLookupControl}();ao.prototype.type="multipleapplookup",ao.prototype.fieldtype=Ve;var io=new(function(e){_inherits(MultipleAppLookupSelectControlType,lo);var t=_createSuper(MultipleAppLookupSelectControlType);function MultipleAppLookupSelectControlType(){return _classCallCheck(this,MultipleAppLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof uo}}]),MultipleAppLookupSelectControlType}())("la","MultipleAppLookupSelectControl","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),uo=function(t){_inherits(MultipleAppLookupSelectControl,ao);var o=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),o.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControl,[{key:e.symbols.type,value:function value(){return io}}]),MultipleAppLookupSelectControl}();uo.prototype.subtype="select",uo.prototype.fieldtype=We,uo.prototype._cssclass_control="select";var so=new(function(e){_inherits(MultipleAppLookupCheckboxControlType,lo);var t=_createSuper(MultipleAppLookupCheckboxControlType);function MultipleAppLookupCheckboxControlType(){return _classCallCheck(this,MultipleAppLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof po}}]),MultipleAppLookupCheckboxControlType}())("la","MultipleAppLookupCheckboxControl","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),po=function(t){_inherits(MultipleAppLookupCheckboxControl,ao);var o=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),o.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return so}}]),MultipleAppLookupCheckboxControl}();po.prototype.subtype="checkbox",po.prototype.fieldtype=Ge;var co=new(function(e){_inherits(MultipleAppLookupChoiceControlType,lo);var t=_createSuper(MultipleAppLookupChoiceControlType);function MultipleAppLookupChoiceControlType(){return _classCallCheck(this,MultipleAppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _o}}]),MultipleAppLookupChoiceControlType}())("la","MultipleAppLookupChoiceControl","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),_o=function(t){_inherits(MultipleAppLookupChoiceControl,ao);var o=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),o.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return co}}]),MultipleAppLookupChoiceControl}();_o.prototype.subtype="choice",_o.prototype.fieldtype=Ye,_o.prototype._cssclass_control="select";var ho=new(function(e){_inherits(GeoControlType,Je);var t=_createSuper(GeoControlType);function GeoControlType(){return _classCallCheck(this,GeoControlType),t.apply(this,arguments)}return _createClass(GeoControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yo}}]),GeoControlType}())("la","GeoControl","A LivingApps geo field (type 'geo')"),yo=function(t){_inherits(GeoControl,$e);var o=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),o.apply(this,arguments)}return _createClass(GeoControl,[{key:e.symbols.type,value:function value(){return ho}}]),GeoControl}();yo.prototype.type="geo",yo.prototype.fieldtype=j,yo.prototype._cssclass_root="llft-element";var fo=function(e){_inherits(FileControlType,Je);var t=_createSuper(FileControlType);function FileControlType(){return _classCallCheck(this,FileControlType),t.apply(this,arguments)}return _createClass(FileControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ko}}]),FileControlType}(),vo=new fo("la","FileControl","A LivingApps upload field (type 'file')"),ko=function(t){_inherits(FileControl,$e);var o=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),o.apply(this,arguments)}return _createClass(FileControl,[{key:e.symbols.type,value:function value(){return vo}}]),FileControl}();ko.prototype.type="file",ko.prototype.fieldtype=Y,ko.prototype._cssclass_root="llft-element";var mo=new(function(e){_inherits(FileSignatureControlType,fo);var t=_createSuper(FileSignatureControlType);function FileSignatureControlType(){return _classCallCheck(this,FileSignatureControlType),t.apply(this,arguments)}return _createClass(FileSignatureControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Co}}]),FileSignatureControlType}())("la","FileSignatureControl","A LivingApps signature image field (type 'file/signature')"),Co=function(t){_inherits(FileSignatureControl,ko);var o=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),o.apply(this,arguments)}return _createClass(FileSignatureControl,[{key:e.symbols.type,value:function value(){return mo}}]),FileSignatureControl}();Co.prototype.subtype="signature",Co.prototype.fieldtype=K;var go=new(function(e){_inherits(ButtonControlType,Je);var t=_createSuper(ButtonControlType);function ButtonControlType(){return _classCallCheck(this,ButtonControlType),t.apply(this,arguments)}return _createClass(ButtonControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof bo}}]),ButtonControlType}())("la","ButtonControl","A submit button"),bo=function(t){_inherits(ButtonControl,$e);var o=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),o.apply(this,arguments)}return _createClass(ButtonControl,[{key:e.symbols.type,value:function value(){return go}}]),ButtonControl}();bo.prototype.type="button";var To=new(function(t){_inherits(LookupItemType,e.Type);var o=_createSuper(LookupItemType);function LookupItemType(){return _classCallCheck(this,LookupItemType),o.apply(this,arguments)}return _createClass(LookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Lo}}]),LookupItemType}())("la","LookupItem","An option in a lookup control/field"),Lo=function(t){_inherits(LookupItem,o);var r=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),r.apply(this,arguments)}return _createClass(LookupItem,[{key:e.symbols.type,value:function value(){return To}},{key:"label",get:function get(){if(null===this.control)return this._label;var e=this._view_lookupitem();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"visible",get:function get(){if(null===this.control)return!0;var e=this._view_lookupitem();return null===e||e.visible}},{key:"_view_lookupitem",value:function _view_lookupitem(){var e=this.control.identifier,t=this.control.app.active_view;if(null!==t&&null!==t.controls){var o=t.controls.get(e);if(void 0!==o&&void 0!==o.lookupdata&&null!==o.lookupdata){var r=o.lookupdata.get(this.key);if(void 0!==r)return r}}return null}},{key:e.symbols.repr,value:function value(){var t="<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+="visible=False"),t+">"}}]),LookupItem}();Lo.prototype._ul4onattrs=["control","key","_label"],Lo.prototype._ul4attrs=new Set(["id","control","key","label"]);var Fo=new(function(t){_inherits(ViewLookupItemType,e.Type);var o=_createSuper(ViewLookupItemType);function ViewLookupItemType(){return _classCallCheck(this,ViewLookupItemType),o.apply(this,arguments)}return _createClass(ViewLookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ao}}]),ViewLookupItemType}())("la","ViewLookupItem","View specific information about a lookup item"),Ao=function(t){_inherits(ViewLookupItem,o);var r=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),r.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:e.symbols.type,value:function value(){return Fo}},{key:e.symbols.repr,value:function value(){var t="<ViewLookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+=" visible=False"),t+">"}}]),ViewLookupItem}();Ao.prototype._ul4onattrs=["key","label","visible"],Ao.prototype._ul4attrs=new Set(["key","label","visible"]);var wo=function(t){_inherits(LayoutControlType,e.Type);var o=_createSuper(LayoutControlType);function LayoutControlType(){return _classCallCheck(this,LayoutControlType),o.apply(this,arguments)}return _createClass(LayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Mo}}]),LayoutControlType}(),So=new wo("la","LayoutControl","A decoration in an input form"),Mo=function(t){_inherits(LayoutControl,o);var r=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),r.apply(this,arguments)}return _createClass(LayoutControl,[{key:"LayoutControl",value:function LayoutControl(){this.label=null,this.identifier=null,this.view=null,this.top=null,this.left=null,this.width=null,this.height=null,this._visible=!0}},{key:e.symbols.type,value:function value(){return So}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.view.globals}},{key:"_sel_root",get:function get(){return"#livingapps-form .llft-element.llft-id-"+this.identifier}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"visible",get:function get(){var e;return null===(e=this._visible)||void 0===e||e}},{key:"visible",set:function set(e){this.globals._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:e.symbols.setattr,value:function value(t,o){"visible"===t?this.visible=e._bool(o):_get(_getPrototypeOf(LayoutControl.prototype),e.symbols.setattr,this).call(this,t,o)}}]),LayoutControl}();Mo.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],Mo.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height","visible"]);var xo=new(function(e){_inherits(HTMLLayoutControlType,wo);var t=_createSuper(HTMLLayoutControlType);function HTMLLayoutControlType(){return _classCallCheck(this,HTMLLayoutControlType),t.apply(this,arguments)}return _createClass(HTMLLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Io}}]),HTMLLayoutControlType}())("la","HTMLLayoutControl","HTML decoration in an input form"),Io=function(t){_inherits(HTMLLayoutControl,Mo);var o=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),o.apply(this,arguments)}return _createClass(HTMLLayoutControl,[{key:e.symbols.type,value:function value(){return xo}},{key:"value",get:function get(){return this._value}},{key:"value",set:function set(e){this._value=e,this.globals._in_form()&&this._set_dom_value(this._value)}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_root.innerHTML=e}},{key:e.symbols.setattr,value:function value(t,o){"value"===t?this.value=o:_get(_getPrototypeOf(HTMLLayoutControl.prototype),e.symbols.setattr,this).call(this,t,o)}}]),HTMLLayoutControl}();Io.prototype._ul4onattrs=[].concat(_toConsumableArray(Mo.prototype._ul4onattrs),["_value","_visible"]),Io.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Mo.prototype._ul4attrs),["value"]));var Ho=new(function(e){_inherits(ImageLayoutControlType,wo);var t=_createSuper(ImageLayoutControlType);function ImageLayoutControlType(){return _classCallCheck(this,ImageLayoutControlType),t.apply(this,arguments)}return _createClass(ImageLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ro}}]),ImageLayoutControlType}())("la","ImageLayoutControl","An image decoration in an input form"),Ro=function(t){_inherits(ImageLayoutControl,Mo);var o=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),o.apply(this,arguments)}return _createClass(ImageLayoutControl,[{key:e.symbols.type,value:function value(){return Ho}},{key:"image",get:function get(){return this._image}},{key:"image",set:function set(e){this._image=e,this.globals._in_form()&&this._set_dom_value(this._image)}},{key:"original",get:function get(){return this.image}},{key:"original",set:function set(e){this.image=image}},{key:"_set_dom_value",value:function _set_dom_value(e){var t=this._dom_root.querySelector("img");if(null!==t){var o=null===e?"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==":this.globals.scaled_url(e,this.width,this.height);t.setAttribute("src",o)}}},{key:e.symbols.setattr,value:function value(t,o){"original"===t?this.original=o:"image"===t?this.image=o:_get(_getPrototypeOf(ImageLayoutControl.prototype),e.symbols.setattr,this).call(this,t,o)}}]),ImageLayoutControl}();Ro.prototype._ul4onattrs=[].concat(_toConsumableArray(Mo.prototype._ul4onattrs),["_image","_visible"]),Ro.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Mo.prototype._ul4attrs),["image","original"]));var Oo=new(function(e){_inherits(ButtonLayoutControlType,wo);var t=_createSuper(ButtonLayoutControlType);function ButtonLayoutControlType(){return _classCallCheck(this,ButtonLayoutControlType),t.apply(this,arguments)}return _createClass(ButtonLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Po}}]),ButtonLayoutControlType}())("la","ButtonLayoutControl","A submit button in an input form"),Po=function(t){_inherits(ButtonLayoutControl,Mo);var o=_createSuper(ButtonLayoutControl);function ButtonLayoutControl(){return _classCallCheck(this,ButtonLayoutControl),o.apply(this,arguments)}return _createClass(ButtonLayoutControl,[{key:e.symbols.type,value:function value(){return Oo}}]),ButtonLayoutControl}();Po.prototype._ul4onattrs=[].concat(_toConsumableArray(Mo.prototype._ul4onattrs),["original","scaled","_visible"]);var Do=new(function(t){_inherits(ViewControlType,e.Type);var o=_createSuper(ViewControlType);function ViewControlType(){return _classCallCheck(this,ViewControlType),o.apply(this,arguments)}return _createClass(ViewControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Bo}}]),ViewControlType}())("la","ViewControl","Contains view specific information about a control"),Bo=function(t){_inherits(ViewControl,o);var r=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),r.apply(this,arguments)}return _createClass(ViewControl,[{key:e.symbols.type,value:function value(){return Do}},{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}();Bo.prototype._ul4onattrs=["view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],Bo.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]);var No=new(function(t){_inherits(UserType,e.Type);var o=_createSuper(UserType);function UserType(){return _classCallCheck(this,UserType),o.apply(this,arguments)}return _createClass(UserType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Uo}}]),UserType}())("la","User","A LivingApps user/account"),Uo=function(t){_inherits(User,o);var r=_createSuper(User);function User(){return _classCallCheck(this,User),r.apply(this,arguments)}return _createClass(User,[{key:e.symbols.type,value:function value(){return No}},{key:e.symbols.repr,value:function value(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}}]),User}();Uo.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews","globals"],Uo.prototype._ul4attrs=new Set(["id","globals","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"]);var qo=new(function(t){_inherits(FileType,e.Type);var o=_createSuper(FileType);function FileType(){return _classCallCheck(this,FileType),o.apply(this,arguments)}return _createClass(FileType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Vo}}]),FileType}())("la","File","An uploaded file"),Vo=function(t){_inherits(File,o);var r=_createSuper(File);function File(){return _classCallCheck(this,File),r.apply(this,arguments)}return _createClass(File,[{key:e.symbols.type,value:function value(){return qo}},{key:e.symbols.repr,value:function value(){return"<File url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}},{key:"url",get:function get(){return"https://"+this.globals.hostname+"/files/"+this.contextid+"/"+this.id}},{key:"archive_url",get:function get(){return null===this.archive?this.url:this.archive.url+"/"+this.filename}}]),File}();Vo.prototype._ul4onattrs=["globals","filename","mimetype","width","height","internal_id","createdat","size","duration","geo","recordedat","storagefilename","archive","context_id"],Vo.prototype._ul4attrs=new Set(["globals","id","internal_id","url","archive_url","filename","mimetype","width","height","size","duration","geo","recordedat","archive","createdat","context_id"]);var Eo=new(function(t){_inherits(GeoType,e.Type);var o=_createSuper(GeoType);function GeoType(){return _classCallCheck(this,GeoType),o.apply(this,arguments)}return _createClass(GeoType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Go}}]),GeoType}())("la","Geo","Geographical coordinates and location information"),Go=function(t){_inherits(Geo,o);var r=_createSuper(Geo);function Geo(e,t,o){var l,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _classCallCheck(this,Geo),(l=r.call(this,null)).globals=e,l.lat=t,l.long=o,l.info=n,l}return _createClass(Geo,[{key:e.symbols.type,value:function value(){return Eo}},{key:e.symbols.repr,value:function value(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();Go.prototype._ul4onattrs=["globals","lat","long","info"],Go.prototype._ul4attrs=new Set(["globals","lat","long","info"]);var jo=function(t){_inherits(AttachmentType,e.Type);var o=_createSuper(AttachmentType);function AttachmentType(){return _classCallCheck(this,AttachmentType),o.apply(this,arguments)}return _createClass(AttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof zo}}]),AttachmentType}(),Wo=new jo("la","Attachment","An attachment of a record"),zo=function(t){_inherits(Attachment,o);var r=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),r.apply(this,arguments)}return _createClass(Attachment,[{key:e.symbols.type,value:function value(){return Wo}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}}]),Attachment}();zo.prototype._ul4onattrs=["record","label","active"],zo.prototype._ul4attrs=new Set(["id","record","label","active"]);var Yo=new(function(e){_inherits(NoteAttachmentType,jo);var t=_createSuper(NoteAttachmentType);function NoteAttachmentType(){return _classCallCheck(this,NoteAttachmentType),t.apply(this,arguments)}return _createClass(NoteAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Jo}}]),NoteAttachmentType}())("la","NoteAttachment","A note attachment of a record"),Jo=function(t){_inherits(NoteAttachment,zo);var o=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),o.apply(this,arguments)}return _createClass(NoteAttachment,[{key:e.symbols.type,value:function value(){return Yo}}]),NoteAttachment}();Jo.prototype.type="noteattachment",Jo.prototype._ul4onattrs=[].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]),Jo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]));var Ko=new(function(e){_inherits(URLAttachmentType,jo);var t=_createSuper(URLAttachmentType);function URLAttachmentType(){return _classCallCheck(this,URLAttachmentType),t.apply(this,arguments)}return _createClass(URLAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $o}}]),URLAttachmentType}())("la","URLAttachment","A URL attachment of a record"),$o=function(t){_inherits(URLAttachment,zo);var o=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),o.apply(this,arguments)}return _createClass(URLAttachment,[{key:e.symbols.type,value:function value(){return Ko}}]),URLAttachment}();$o.prototype.type="urlattachment",$o.prototype._ul4onattrs=[].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]),$o.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]));var Zo=new(function(e){_inherits(FileAttachmentType,jo);var t=_createSuper(FileAttachmentType);function FileAttachmentType(){return _classCallCheck(this,FileAttachmentType),t.apply(this,arguments)}return _createClass(FileAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Qo}}]),FileAttachmentType}())("la","FileAttachment","A file attachment of a record"),Qo=function(t){_inherits(FileAttachment,zo);var o=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),o.apply(this,arguments)}return _createClass(FileAttachment,[{key:e.symbols.type,value:function value(){return Zo}}]),FileAttachment}();Qo.prototype.type="fileattachment",Qo.prototype._ul4onattrs=[].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]),Qo.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]));var Xo=new(function(e){_inherits(JSONAttachmentType,jo);var t=_createSuper(JSONAttachmentType);function JSONAttachmentType(){return _classCallCheck(this,JSONAttachmentType),t.apply(this,arguments)}return _createClass(JSONAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof er}}]),JSONAttachmentType}())("la","JSONAttachment","A JSON attachment of a record"),er=function(t){_inherits(JSONAttachment,zo);var o=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),o.apply(this,arguments)}return _createClass(JSONAttachment,[{key:e.symbols.type,value:function value(){return Xo}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"value"===t?e._asjson(this.value):this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,o){"value"===t?this.value=e._fromjson(o):this[t]=o}}]),JSONAttachment}();er.prototype.type="jsonattachment",er.prototype._ul4onattrs=[].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]),er.prototype._ul4attrs=new Set([].concat(_toConsumableArray(zo.prototype._ul4onattrs),["value"]));var tr=new(function(t){_inherits(InstallationType,e.Type);var o=_createSuper(InstallationType);function InstallationType(){return _classCallCheck(this,InstallationType),o.apply(this,arguments)}return _createClass(InstallationType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof or}}]),InstallationType}())("la","Installation","The installation that created an app"),or=function(t){_inherits(Installation,o);var r=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),r.apply(this,arguments)}return _createClass(Installation,[{key:e.symbols.type,value:function value(){return tr}},{key:e.symbols.repr,value:function value(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();or.prototype._ul4onattrs=["name"],or.prototype._ul4attrs=new Set(["id","name"]);var rr=new(function(t){_inherits(CategoryType,e.Type);var o=_createSuper(CategoryType);function CategoryType(){return _classCallCheck(this,CategoryType),o.apply(this,arguments)}return _createClass(CategoryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof lr}}]),CategoryType}())("la","Category","A navigation category"),lr=function(t){_inherits(Category,o);var r=_createSuper(Category);function Category(){return _classCallCheck(this,Category),r.apply(this,arguments)}return _createClass(Category,[{key:e.symbols.type,value:function value(){return rr}},{key:e.symbols.repr,value:function value(){for(var t=[],o=this;null!==o;)t.splice(0,0,o.identifier),o=o.parent;return"<Category id="+e._repr(this.id)+" identifierpath="+e._repr(t.join("/"))+NaN+e._repr(this.name)+">"}}]),Category}();lr.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],lr.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]);var nr=new(function(t){_inherits(KeyViewType,e.Type);var o=_createSuper(KeyViewType);function KeyViewType(){return _classCallCheck(this,KeyViewType),o.apply(this,arguments)}return _createClass(KeyViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ar}}]),KeyViewType}())("la","KeyView","Object granting access to a view template"),ar=function(t){_inherits(KeyView,o);var r=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),r.apply(this,arguments)}return _createClass(KeyView,[{key:e.symbols.type,value:function value(){return nr}},{key:e.symbols.repr,value:function value(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();ar.prototype._ul4onattrs=["identifier","name","key","user"],ar.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]);var ir=function(t){_inherits(AppParameterType,e.Type);var o=_createSuper(AppParameterType);function AppParameterType(){return _classCallCheck(this,AppParameterType),o.apply(this,arguments)}return _createClass(AppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof sr}}]),AppParameterType}(),ur=new ir("la","AppParameter","A parameter of a LivingApps application"),sr=function(t){_inherits(AppParameter,o);var r=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),r.apply(this,arguments)}return _createClass(AppParameter,[{key:e.symbols.type,value:function value(){return ur}},{key:e.symbols.repr,value:function value(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof s?this.owner:null}}]),AppParameter}();sr.prototype._ul4onattrs=["owner","parent","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby"],sr.prototype._ul4attrs=new Set(["id","owner","parent","app","type","order","identifier","description","value","createdat","createdby","updatedat","updatedby"]);var pr=new(function(e){_inherits(MutableAppParameterType,ir);var t=_createSuper(MutableAppParameterType);function MutableAppParameterType(){return _classCallCheck(this,MutableAppParameterType),t.apply(this,arguments)}return _createClass(MutableAppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cr}}]),MutableAppParameterType}())("la","MutableAppParameter","A mutable parameter of a LivingApps application"),cr=function(t){_inherits(MutableAppParameter,sr);var o=_createSuper(MutableAppParameter);function MutableAppParameter(){return _classCallCheck(this,MutableAppParameter),o.apply(this,arguments)}return _createClass(MutableAppParameter,[{key:e.symbols.type,value:function value(){return pr}},{key:e.symbols.repr,value:function value(){return"<MutableAppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof s?this.owner:null}}]),MutableAppParameter}(),_r=function(t){_inherits(MenuItemType,e.Type);var o=_createSuper(MenuItemType);function MenuItemType(){return _classCallCheck(this,MenuItemType),o.apply(this,arguments)}return _createClass(MenuItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yr}}]),MenuItemType}(),hr=new _r("la","MenuItem","An additional menu item in an app that links to a target page."),yr=function(t){_inherits(MenuItem,o);var r=_createSuper(MenuItem);function MenuItem(){return _classCallCheck(this,MenuItem),r.apply(this,arguments)}return _createClass(MenuItem,[{key:e.symbols.type,value:function value(){return hr}},{key:e.symbols.repr,value:function value(){return"<MenuItem id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),MenuItem}();yr.prototype._ul4onattrs=["app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"],yr.prototype._ul4attrs=new Set(["id","app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"]);var dr=new _r("la","Panel","An additional panel in an app that is displayed on various LivingApps pages and links to a target page."),fr=function(t){_inherits(Panel,yr);var o=_createSuper(Panel);function Panel(){return _classCallCheck(this,Panel),o.apply(this,arguments)}return _createClass(Panel,[{key:e.symbols.type,value:function value(){return dr}},{key:e.symbols.repr,value:function value(){return"<Panel id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),Panel}();fr.prototype._ul4onattrs=[].concat(_toConsumableArray(yr.prototype._ul4onattrs),["description","description_url","image","row","column","width","height","header_type","header_background","text_color","background_color1","background_color2"]),fr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(yr.prototype._ul4attrs),["description","description_url","image","row","column","width","height"]));var vr=new(function(t){_inherits(FormType,e.Type);var o=_createSuper(FormType);function FormType(){return _classCallCheck(this,FormType),o.apply(this,arguments)}return _createClass(FormType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof kr}}]),FormType}())("la","Form","The input form."),kr=function(t){_inherits(Form,e.Proto);var o=_createSuper(Form);function Form(e,t){var r;_classCallCheck(this,Form),(r=o.call(this)).globals=e,r.template=t,r._geo_wired=!1;var l,n=_createForOfIteratorHelper(e.record.fields.values());try{for(n.s();!(l=n.n()).done;){var a=l.value;r.wire_field(a)}}catch(e){n.e(e)}finally{n.f()}return r.render_template(null),r}return _createClass(Form,[{key:e.symbols.type,value:function value(){return vr}},{key:"_dom_button",get:function get(){return document.querySelector(this._sel_form+" "+this._sel_button)}},{key:"enabled",get:function get(){return!this._dom_button.disabled}},{key:"enabled",set:function set(e){this._dom_button.disabled=!e}},{key:e.symbols.getattr,value:function value(t){if("enabled"===t)return this.enabled;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,o){if("enabled"!==t)throw new e.AttributeError(this,t);this.enabled=e._bool(o)}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" enabled="+e._repr(this.enabled)+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}},{key:"render_template",value:function render_template(t){var o=this,r={datasources:this.globals.datasources,record:this.globals.record,app:this.globals.app,fields:this.globals.record.fields,identifier:t},l={globals:this.globals,form:this,la:br},n="LivingApps update template: ";n+=null===t?"Initialization":"Value change in "+e._repr(t),this.globals.group_logging(n,(function(){try{o.template.renders(r,l)}catch(t){console&&console.error&&(o.globals._start_log_message(),console.group&&console.group("UL4 stacktrace"),e.report_exc(t),console.groupEnd&&console.groupEnd(),console.groupCollapsed&&console.groupCollapsed("Javascript stacktrace"),console.error(t),console.groupEnd&&console.groupEnd())}}))}},{key:"wire_geo",value:function wire_geo(){var e=this;if(!this._geo_wired){if(null!==this.globals.app.active_view&&navigator.geolocation){var t=this.globals.app.active_view.use_geo;"once"!==t&&"watch"!==t||navigator.geolocation.getCurrentPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)})),"watch"===t&&navigator.geolocation.watchPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)}))}this._geo_wired=!0}}},{key:"wire_field",value:function wire_field(e){var t,o=this,r=_createForOfIteratorHelper(e._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.addEventListener(e._inputevent,(function(t){o.wire_geo(),o.globals.mode=o.globals.mode.substring(0,o.globals.mode.lastIndexOf("/")+1)+"input",o.render_template(e.control.identifier)}))}}catch(e){r.e(e)}finally{r.f()}}}]),Form}();kr.prototype._ul4attrs=new Set(["enabled"]),kr.prototype._sel_form="#livingapps-form form",kr.prototype._sel_button="[type=submit]";for(var mr=0,Cr=[n,i,s,c,yr,fr,h,y,d,v,Qe,et,nt,pt,yt,ft,kt,Ct,Ft,St,xt,Rt,Pt,Bt,Ut,Et,jt,zt,Jt,Zt,to,Xt,ro,ao,uo,po,_o,yo,ko,Co,bo,C,b,x,O,D,N,q,E,L,w,j,Y,K,Q,ee,oe,le,ue,ce,Ce,Me,He,Ve,Lo,Ao,Mo,Io,Ro,Po,Bo,Uo,Vo,Go,Jo,$o,Qo,er,or,lr,ar,sr,cr];mr<Cr.length;mr++){var gr=Cr[mr];e.register("de.livinglogic.livingapi."+gr.name.toLowerCase(),gr)}var br=new e.Module("la","LivingAPI types",{FlashMessage:i,File:Vo,Geo:Go,User:Uo,KeyView:ar,Globals:n,App:s,TextControl:pt,URLControl:ft,EmailControl:yt,PasswordControl:_t,TelControl:kt,TextAreaControl:Ct,HTMLControl:bt,IntControl:et,NumberControl:nt,DateControl:Ft,DatetimeMinuteControl:St,DatetimeSecondControl:xt,BoolControl:Qe,LookupSelectControl:Pt,LookupRadioControl:Bt,LookupChoiceControl:Ut,AppLookupSelectControl:jt,AppLookupRadioControl:zt,AppLookupChoiceControl:Jt,MultipleLookupSelectControl:to,MultipleLookupCheckboxControl:Xt,MultipleLookupChoiceControl:ro,MultipleAppLookupSelectControl:uo,MultipleAppLookupCheckboxControl:po,MultipleAppLookupChoiceControl:_o,FileControl:ko,FileSignatureControl:Co,GeoControl:yo,ViewControl:Bo,RecordChildren:d,Record:v,FileAttachment:Qo,URLAttachment:$o,NoteAttachment:Jo,JSONAttachment:er,Installation:or,HTMLLayoutControl:Io,ImageLayoutControl:Ro,ButtonLayoutControl:Po,View:c,DataSource:h,DataSourceChildren:y,LookupItem:Lo,ViewLookupItem:Ao,Category:lr,AppParameter:sr,MutableAppParameter:cr,MenuItem:yr,Panel:fr});export{s as App,Jt as AppLookupChoiceControl,Ne as AppLookupChoiceField,Et as AppLookupControl,He as AppLookupField,Me as AppLookupFieldBase,zt as AppLookupRadioControl,De as AppLookupRadioField,jt as AppLookupSelectControl,Oe as AppLookupSelectField,sr as AppParameter,zo as Attachment,o as Base,Qe as BoolControl,b as BoolField,bo as ButtonControl,Po as ButtonLayoutControl,lr as Category,ne as ChoiceFieldBase,$e as Control,h as DataSource,y as DataSourceChildren,Ft as DateControl,ee as DateField,Q as DateFieldBase,St as DatetimeMinuteControl,oe as DatetimeMinuteField,xt as DatetimeSecondControl,le as DatetimeSecondField,yt as EmailControl,O as EmailField,C as Field,Vo as File,Qo as FileAttachment,ko as FileControl,Y as FileField,Co as FileSignatureControl,K as FileSignatureField,i as FlashMessage,kr as Form,Go as Geo,yo as GeoControl,j as GeoField,n as Globals,bt as HTMLControl,E as HTMLField,Io as HTMLLayoutControl,r as Handler,Ro as ImageLayoutControl,or as Installation,et as IntControl,L as IntField,er as JSONAttachment,ar as KeyView,Mo as LayoutControl,Ut as LookupChoiceControl,ve as LookupChoiceField,Rt as LookupControl,ce as LookupField,ue as LookupFieldBase,Lo as LookupItem,Bt as LookupRadioControl,he as LookupRadioField,Pt as LookupSelectControl,de as LookupSelectField,yr as MenuItem,po as MultipleAppLookupCheckboxControl,Ge as MultipleAppLookupCheckboxField,_o as MultipleAppLookupChoiceControl,Ye as MultipleAppLookupChoiceField,ao as MultipleAppLookupControl,Ve as MultipleAppLookupField,uo as MultipleAppLookupSelectControl,We as MultipleAppLookupSelectField,Xt as MultipleLookupCheckboxControl,be as MultipleLookupCheckboxField,ro as MultipleLookupChoiceControl,Ae as MultipleLookupChoiceField,Zt as MultipleLookupControl,Ce as MultipleLookupField,to as MultipleLookupSelectControl,Le as MultipleLookupSelectField,cr as MutableAppParameter,Jo as NoteAttachment,nt as NumberControl,w as NumberField,fr as Panel,_t as PasswordControl,H as PasswordField,v as Record,d as RecordChildren,ut as StringControl,x as StringField,kt as TelControl,N as TelField,Ct as TextAreaControl,q as TextAreaField,pt as TextControl,$o as URLAttachment,ft as URLControl,D as URLField,Uo as User,c as View,Bo as ViewControl,Ao as ViewLookupItem,element,br as module,url_with_params,t as version};
2
2
  //# sourceMappingURL=livingapi.js.map