!function e(t,n,o){function a(r,l){if(!n[r]){if(!t[r]){var s="function"==typeof require&&require;if(!l&&s)return s(r,!0);if(i)return i(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[r]={exports:{}};t[r][0].call(u.exports,(function(e){return a(t[r][1][e]||e)}),u,u.exports,e,t,n,o)}return n[r].exports}for(var i="function"==typeof require&&require,r=0;r0?n.redo():e.exit())}))},t.prototype.subToolbarClicked=function(){var e=this.getUIManager().getModule("Button","Walkthrough");e&&e.setSelect(!1)},t.prototype.setMeasureType=function(e){this.measure.switchOn(),this.measure.setMeasureType(e)},t.prototype.getMeasure=function(){return this.measure},t.prototype.exit=function(){this.measure;this.getSubToolbar().getButtons().find((function(e){if(!0===e.getSelect())return e.setSelect(!1),!0}))},t}(i.default);n.default=l},{"../../../../Event/EventCode":70,"./SubToolbarButton":20}],6:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){return t.name="MeasureAngle",t.iconClass="gld-bf-angle-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_angle,t.selectable=!0,e.call(this,t)||this}return a(t,e),t.prototype.setSelect=function(t){e.prototype.setSelect.call(this,t);var n=this.getUIManager().getModule("Button","Measure");!0===t?n.setMeasureType(window.Glodon.Bimface.Plugins.Measure.MeasureTypeOption.Angle):n.getMeasure().switchOff()},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],7:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="MeasureArea",t.iconClass="gld-bf-area-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_area,t.selectable=!0,(n=e.call(this,t)||this).measure=n.getWebApplication().getPlugin("Measure"),n.subToolbar=null,n}return a(t,e),t.prototype.setSelect=function(t){e.prototype.setSelect.call(this,t),this.subToolbar||(this.subToolbar=this.getUIManager().loadModule("Toolbar","SubToolbarAreaMeasure")),!0===t?(this.subToolbar.show(),this.measure.switchOn(),this.subToolbar.getButtons()[0].setSelect(!0)):(this.subToolbar.hide(),this.measure.switchOff())},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],8:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="MeasureClear",t.iconClass="gld-bf-clear-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_clear,t.clickCallback=function(){n.getUIManager().getModule("Button","Measure").getMeasure().clear()},n=e.call(this,t)||this}return a(t,e),t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],9:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="MeasureDistance",t.iconClass="gld-bf-distance-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_distance,t.selectable=!0,(n=e.call(this,t)||this).measure=n.getWebApplication().getPlugin("Measure"),n.subToolbar=null,n}return a(t,e),t.prototype.setSelect=function(t){e.prototype.setSelect.call(this,t),this.subToolbar||(this.subToolbar=this.getUIManager().loadModule("Toolbar","SubToolbarDistanceMeasure")),!0===t?(this.subToolbar.show(),this.measure.switchOn(),this.subToolbar.getButtons()[0].setSelect(!0)):(this.subToolbar.hide(),this.measure.switchOff())},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],10:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="MesureDistanceGroundLine",t.iconClass="gld-bf-distance-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_groundline_distance,t.selectable=!0,(n=e.call(this,t)||this).measure=n.getWebApplication().getPlugin("Measure"),n}return a(t,e),t.prototype.setSelect=function(t,n){n==this&&0==t||(e.prototype.setSelect.call(this,t),this.switchIcon(t),!0===t&&this.measure.setMeasureType(window.Glodon.Bimface.Plugins.Measure.MeasureTypeOption.GroundlineDistance))},t.prototype.switchIcon=function(e){var t=!0===e?"-selected":"";this.getElement().setHTML('')},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],11:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="MeasureDistance",t.iconClass="gld-bf-distance-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_polyline_distance,t.selectable=!0,(n=e.call(this,t)||this).measure=n.getWebApplication().getPlugin("Measure"),n}return a(t,e),t.prototype.setSelect=function(t,n){n==this&&0==t||(e.prototype.setSelect.call(this,t),this.switchIcon(t),!0===t&&this.measure.setMeasureType(window.Glodon.Bimface.Plugins.Measure.MeasureTypeOption.PolylineDistance))},t.prototype.switchIcon=function(e){var t=!0===e?"-selected":"";this.getElement().setHTML('')},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],12:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){return t.name="MeasurePosition",t.iconClass="gld-bf-coordinate-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_position,t.selectable=!0,e.call(this,t)||this}return a(t,e),t.prototype.setSelect=function(t){e.prototype.setSelect.call(this,t);var n=this.getUIManager().getModule("Button","Measure");!0===t?n.setMeasureType(window.Glodon.Bimface.Plugins.Measure.MeasureTypeOption.Position):n.getMeasure().switchOff()},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],13:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="MeasureProjectedArea",t.tooltip=window.BimfaceLanguage.bf_tip_measure_projected_area,t.selectable=!0,(n=e.call(this,t)||this).measure=n.getWebApplication().getPlugin("Measure"),n}return a(t,e),t.prototype.setSelect=function(t,n){n==this&&0==t||(e.prototype.setSelect.call(this,t),this.switchIcon(t),!0===t&&this.measure.setMeasureType(window.Glodon.Bimface.Plugins.Measure.MeasureTypeOption.ProjectedArea))},t.prototype.switchIcon=function(e){var t=!0===e?"-selected":"";this.getElement().setHTML('')},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],14:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){return t.name="MeasureSetting",t.iconClass="gld-bf-measure-setting-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_setting,t.selectable=!0,t.exclusive=!1,t.linkedPanelName="MeasureSettingPanel",e.call(this,t)||this}return a(t,e),t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],15:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="MeasureSpatialArea",t.tooltip=window.BimfaceLanguage.bf_tip_measure_spatial_area,t.selectable=!0,(n=e.call(this,t)||this).measure=n.getWebApplication().getPlugin("Measure"),n}return a(t,e),t.prototype.setSelect=function(t,n){n==this&&0==t||(e.prototype.setSelect.call(this,t),this.switchIcon(t),!0===t&&this.measure.setMeasureType(window.Glodon.Bimface.Plugins.Measure.MeasureTypeOption.SpatialArea))},t.prototype.switchIcon=function(e){var t=!0===e?"-selected":"";this.getElement().setHTML('')},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],16:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="MeasureSurfaceArea",t.tooltip=window.BimfaceLanguage.bf_tip_measure_surface_area,t.selectable=!0,(n=e.call(this,t)||this).measure=n.getWebApplication().getPlugin("Measure"),n}return a(t,e),t.prototype.setSelect=function(t,n){n==this&&0==t||(e.prototype.setSelect.call(this,t),this.switchIcon(t),!0===t&&this.measure.setMeasureType(window.Glodon.Bimface.Plugins.Measure.MeasureTypeOption.SurfaceArea))},t.prototype.switchIcon=function(e){var t=!0===e?"-selected":"";this.getElement().setHTML('')},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],17:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){return t.name="MeasureTriangleDistance",t.iconClass="gld-bf-triangulation-md",t.tooltip=window.BimfaceLanguage.bf_tip_measure_triangle,t.selectable=!0,e.call(this,t)||this}return a(t,e),t.prototype.setSelect=function(t){e.prototype.setSelect.call(this,t);var n=this.getUIManager().getModule("Button","Measure");!0===t?n.setMeasureType(window.Glodon.Bimface.Plugins.Measure.MeasureTypeOption.TriangleDistance):n.getMeasure().switchOff()},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],18:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){return t.name="Property",t.iconClass="gld-bf-property-md",t.tooltip=window.BimfaceLanguage.bfui_button_property,t.selectable=!0,t.exclusive=!1,t.linkedPanelName="PropertyPanel",e.call(this,t)||this}return a(t,e),t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],19:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){return t.name="Setting",t.iconClass="gld-bf-setting-fill-md",t.tooltip=window.BimfaceLanguage.bf_btn_settings,t.selectable=!0,t.linkedPanelName="SettingPanel",e.call(this,t)||this}return a(t,e),t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],20:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.clickCallback=function(){n.subToolbar&&(n.subToolbar.isVisible()?n.hideSubToolbar():n.showSubToolbar(),n.subToolbar.onClick((function(){n.subToolbarClicked()})))},(n=e.call(this,t)||this).getElement().addClass("bfui-button-dropdown"),n}return a(t,e),t.prototype.setSubToolbar=function(e){this.subToolbar=e},t.prototype.getSubToolbar=function(){return this.subToolbar},t.prototype.showSubToolbar=function(){return this.subToolbar?(this.subToolbar.show(),this):this},t.prototype.hideSubToolbar=function(){return this.subToolbar?(this.subToolbar.hide(),this):this},t.prototype.subToolbarClicked=function(){},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],21:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){return t.name="Walkthrough",t.iconClass="gld-bf-route-md",t.tooltip=window.BimfaceLanguage.bf_btn_nav,t.selectable=!0,t.exclusive=!1,t.linkedPanelName="WalkthroughPanel",e.call(this,t)||this}return a(t,e),t.prototype.setSelect=function(t){e.prototype.setSelect.call(this,t);var n=this.getUIManager().getModule("Button","Measure");!0===t&&n.exit()},t}(e("../MainToolbarButton").MainToolbarButton);n.default=i},{"../MainToolbarButton":1}],22:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;if(t.type="Panel",t.config.draggable=!1,t.config.sizeFixed=!0,(n=e.call(this,t)||this)._element.addClass("bfui-panel-drawer"),n.getEnableUIAnimation()){var o=n.getElement().getDomElement();o.css("marginLeft","-"+o.getWidth()+"px").hide()}return n}return a(t,e),t.prototype.show=function(){if(this._element.topShow(),this.getEnableUIAnimation()){var t=this._element.getDomElement();if(t.isVisible()&&!this._inTransition)return;this._inTransition?(t.show().css({marginLeft:"0px"}),this._inTransition=!1):t.show().removeClass("bfui-transition").css({marginLeft:"-"+t.getWidth()+"px"}).addClass("bfui-transition").css("marginLeft","0px")}else e.prototype.show.call(this);return this},t.prototype.hide=function(){var t=this;if(this.getEnableUIAnimation()){var n=this._element.getDomElement();if(!n.isVisible())return;var o=function(){t._inTransition&&(n.removeClass("bfui-transition").hide().off("transitionend",o),t._inTransition=!1)};this._inTransition=!0,n.addClass("bfui-transition").css({marginLeft:"-"+n.getWidth()+"px"}).on("transitionend",o)}else e.prototype.hide.call(this);return this},t}(e("../UIModule").UIModule);n.default=i},{"../UIModule":44}],23:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t=0||l.toString()===e.toString())&&o.push({text:s,value:l,path:c}),t.children&&t.children.length>0&&a(t,c)}))};return a(t),o},selectHandler:function(e){for(var t=e.data.path,o=0,a=n.getModule("Tree","LayerTree").getElement().getControl({id:"all"});t.length>o;){var i=t[o].index,r=a.getAllControls()[i];r.setExpansion(!0),a=r,o++}switch(n.getModule("Tree","LayerTree").scrollToNode(a),a.getOptions().type){case"GroupLayer":case"TileLayer":case"TerrainLayer":break;default:a.getSelectState()||a.getTreeName().getElement().click()}},parent:o.getContent()}).addClass("bfui-layertree-search"),n.initLayerTree(),n.getWebApplication().on("ModelAdded",(function(e){var t=n.getModule("Tree","LayerTree").getElement().getControl({id:"all"});t.getInstanceIds().includes(e)?t.updateUnloadControl({id:e}):(n.getUIManager().updateLayerTree(),n.initLayerTree())})),n.getWebApplication().on("ModelRemoved",(function(e){n.getUIManager().updateLayerTree(),n.initLayerTree()})),n}return a(t,e),t.prototype.initLayerTree=function(){var e=this._element,t={config:{id:"layerTree",title:"图层",content:this.getViewer().getLayerManager().getLayerConfigsObject().children,parent:e.getContent()}};this.loadModule("Tree","LayerTree",t)},t}(r.default);n.default=s},{"../../../../UI/Controls/Search/Search":96,"../DrawerPanel":22}],24:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n;return t.name="SettingPanel",(n=e.call(this,t)||this)._element.setTitle("Setting"),n}return a(t,e),t}(e("../DrawerPanel").default);n.default=i},{"../DrawerPanel":22}],25:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../Common/Glodon"),r=e("../../UIModule"),l=e("../../../../UI/Control"),s=e("../../../../UI/ControlAnchor/ControlAnchor"),c=function(e){function t(t){var n=this;t.type="Panel",t.config=window.Object.assign({},{sizeFixed:!0,draggable:!0,footerDisabled:!0,width:380,height:320},t.config);var o=(n=e.call(this,t)||this)._element;return o.setTitle(window.BimfaceLanguage.bf_panel_measure_setting),o.addClass("bfui-panel-measure-setting"),o.setPosition({anchor:s.default.MiddleCenter,offset:{x:0,y:0}}),n._measure=n.getWebApplication().getPlugin("Measure"),n.init(),n}return a(t,e),t.prototype.init=function(){this.units=this._measure.getUnits(),this.precision=this._measure.getPrecision(),this.distancePrecisionSelect=null,this.disatanceUnitSelect=null,this.areaPrecisionSelect=null,this.areaUnitSelect=null,this.anglePrecisionSelect=null,this.latLonPrecisionSelect=null,this.initBody(),this.initFooter()},t.prototype.initBody=function(){for(var e=this,t=[],n=0;n<6;n++){var o={text:n?1/Math.pow(10,n):n,value:n};t.push(o)}var a=[{text:"mm",value:window.Glodon.Bimface.Common.Units.LengthUnits.Millimeter},{text:"cm",value:window.Glodon.Bimface.Common.Units.LengthUnits.Centimeter},{text:"m",value:window.Glodon.Bimface.Common.Units.LengthUnits.Meter},{text:"km",value:window.Glodon.Bimface.Common.Units.LengthUnits.Kilometer}],r=[{text:"mm²",value:window.Glodon.Bimface.Common.Units.LengthUnits.Millimeter},{text:"cm²",value:window.Glodon.Bimface.Common.Units.LengthUnits.Centimeter},{text:"m²",value:window.Glodon.Bimface.Common.Units.LengthUnits.Meter},{text:"km²",value:window.Glodon.Bimface.Common.Units.LengthUnits.Kilometer}],s=new i.default.Bimface.Tiles.UI.Label({text:window.BimfaceLanguage.bf_panel_measure_distance});this.distancePrecisionSelect=new i.default.Bimface.Tiles.UI.Select({values:t,onChange:function(t){e.precision.distance=t.value,e.updateMeasureSetting()},defaultIndex:this.precision.distance}),this.disatanceUnitSelect=new i.default.Bimface.Tiles.UI.Select({values:a,onChange:function(t){e.units.distance=t.value,e.updateMeasureSetting()},defaultIndex:r.findIndex((function(t){return t.value==e.units.distance}))});var c=new i.default.Bimface.Tiles.UI.Label({text:window.BimfaceLanguage.bf_panel_measure_area});this.areaPrecisionSelect=new i.default.Bimface.Tiles.UI.Select({values:t,onChange:function(t){e.precision.area=t.value,e.updateMeasureSetting()},defaultIndex:this.precision.area}),this.areaUnitSelect=new i.default.Bimface.Tiles.UI.Select({values:r,onChange:function(t){e.units.area=t.value,e.updateMeasureSetting()},defaultIndex:r.findIndex((function(t){return t.value==e.units.area}))});var u=[];for(n=0;n<4;n++){o={text:n?1/Math.pow(10,n):n,value:n};u.push(o)}var d=new i.default.Bimface.Tiles.UI.Label({text:window.BimfaceLanguage.bf_panel_measure_angle});this.anglePrecisionSelect=new i.default.Bimface.Tiles.UI.Select({values:u,onChange:function(t){e.precision.angle=t.value,e.updateMeasureSetting()},defaultIndex:this.precision.angle});var h=[];for(n=0;n<10;n++){o={text:n?(1/Math.pow(10,n)).toFixed(n):n,value:n};h.push(o)}var p=new i.default.Bimface.Tiles.UI.Label({text:window.BimfaceLanguage.bf_panel_measure_latlon});this.latLonPrecisionSelect=new i.default.Bimface.Tiles.UI.Select({values:h,onChange:function(t){e.precision.latLon=t.value,e.updateMeasureSetting()},defaultIndex:this.precision.latLon});var f=new l.Control({elementParam:{elementType:"table",className:"content-table"}});f.setHTML("\n \n "+window.BimfaceLanguage.bf_panel_measure_precision+"\n "+window.BimfaceLanguage.bf_panel_measure_units+'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n °\n \n \n \n \n °\n ',{distanceLabel:s,distancePrecisionSelect:this.distancePrecisionSelect,disatanceUnitSelect:this.disatanceUnitSelect,areaLabel:c,areaPrecisionSelect:this.areaPrecisionSelect,areaUnitSelect:this.areaUnitSelect,angleLabel:d,anglePrecisionSelect:this.anglePrecisionSelect,latLonLabel:p,latLonPrecisionSelect:this.latLonPrecisionSelect}),this.getElement().getContent().addControl(f)},t.prototype.initFooter=function(){var e=this,t=new i.default.Bimface.Tiles.UI.Button({elementParam:{className:"is-text reset-btn"},text:window.BimfaceLanguage.bf_panel_settings_restore,clickCallback:function(){e.resetMeasureSetting()}}),n=new i.default.Bimface.Tiles.UI.Row({justifyContent:"End"});n.addControl(t),this.getElement().getFooter().addControl(n)},t.prototype.updateMeasureSetting=function(){this._measure.setUnits(this.units),this._measure.setPrecision(this.precision)},t.prototype.resetMeasureSetting=function(){this.units={distance:window.Glodon.Bimface.Common.Units.LengthUnits.Meter,elevation:window.Glodon.Bimface.Common.Units.LengthUnits.Meter,area:window.Glodon.Bimface.Common.Units.LengthUnits.Meter},this.precision={distance:3,elevation:3,area:3,angle:2,latLon:9},this.distancePrecisionSelect.setSelectedByValue(this.precision.distance),this.disatanceUnitSelect.setSelectedByValue(this.units.distance),this.areaPrecisionSelect.setSelectedByValue(this.precision.distance),this.areaUnitSelect.setSelectedByValue(this.units.area),this.anglePrecisionSelect.setSelectedByValue(this.precision.angle),this.latLonPrecisionSelect.setSelectedByValue(this.precision.latLon),this.updateMeasureSetting()},t}(r.UIModule);n.default=c},{"../../../../Common/Glodon":66,"../../../../UI/Control":75,"../../../../UI/ControlAnchor/ControlAnchor":77,"../../UIModule":44}],26:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../UIModule"),r=e("../../../../UI/ControlGroups/PropertyPanel/PropertyPanel"),l=e("../../../../UI/ControlAnchor/ControlAnchor"),s=function(e){function t(t){var n=this;t.type="Panel",t.config=window.Object.assign({},{sizeFixed:!1,draggable:!0,width:300,height:416},t.config);var o=(n=e.call(this,t)||this)._element;return o.setTitle(""+window.BimfaceLanguage.bfui_button_property),o.addClass("bfui-panel-property"),n.init(),n.propertyPanel=new r.PropertyControl({parent:o}),!t.config.customParent&&n.getUIManager().addControl(o,{position:{anchor:l.default.TopRight,offset:{x:-10,y:10}}}),n.initProperty(),n}return a(t,e),t.prototype.getSingleSelection=function(e){var t;return this.getViewer().getModels().some((function(n){var o=[];if(o=e?e[n.modelId]||[]:n.getSelectedComponents(),t||1!==o.length){if(o.length>1||1===o.length&&t&&t.id!==o[0])return t=void 0,!0}else t={modelId:n.modelId,id:o[0]}})),t},t.prototype.init=function(){var e=this,t=window.Glodon.Bimface.Viewer.ViewerGISEvent;this.getViewer().addEventListener(t.ComponentsSelectionChanged,(function(t){"Component"===t.objectType?e.initProperty():e.setPropertyData()}))},t.prototype.initProperty=function(){var e=this.getSingleSelection(),t=this._element;e?this.getProperty(e):t.setTips(window.BimfaceLanguage.bf_panel_props_propSel)},t.prototype.getProperty=function(e){var t=this;this._element.setTips(window.BimfaceLanguage.bf_panel_modelTree_loading,"loading");var n=e.id.split(".")[1]||e.id;this.getViewer().getModel(e.modelId).getComponentProperty(n,(function(e){t.setPropertyData(e.properties)}),(function(e){t._element.setTips(window.BimfaceLanguage.bf_panel_props_noProps)}))},t.prototype.setPropertyData=function(e){var t=this._element;e?(t.clearContent(),this.propertyPanel.createCollapse(e),t.getContent().addControl(this.propertyPanel)):t.setTips(window.BimfaceLanguage.bf_panel_props_propSel)},t.prototype.getPropertyData=function(e){},t.prototype.clear=function(){},t}(i.UIModule);n.default=s},{"../../../../UI/ControlAnchor/ControlAnchor":77,"../../../../UI/ControlGroups/PropertyPanel/PropertyPanel":79,"../../UIModule":44}],27:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("../../../../UI/Dom"),l=e("../../../../UI/Controls/Input/Input"),s=e("./WalkthroughPointMng"),c=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-walkthrough-create"},type:"Collapse"};(n=e.call(this,o)||this).viewer=t.viewer,n.walkthroughManager=t.walkthroughManager;var a=n.pathName=(new l.default).addClass("bfui-walkthrough-info-input"),i=n.pathTime=(new l.default).addClass("bfui-walkthrough-info-time");i.getDomElement().attribute({type:"number",min:1,max:120});var s=n.playBtn=(new r.Dom).createElement({elementType:"div",className:"bfui-walkthrough-control "});s.html(''+window.BimfaceLanguage.bf_panel_nav_playnav+"");var c=(new r.Dom).createElement({elementType:"div",className:"bfui-walkthrough-control"});c.hide().html(''+window.BimfaceLanguage.bf_panel_nav_stop+"");var u=(new r.Dom).createElement({elementType:"span",className:"bfui-walkthrough-add"}).html(''+window.BimfaceLanguage.bf_panel_nav_addKeyframe+""),d=(new r.Dom).createElement({elementType:"span",className:"bfui-walkthrough-clear"}).html(""+window.BimfaceLanguage.bf_panel_nav_clearKeyframe),h=n.tip=(new r.Dom).createElement({elementType:"div",className:"bfui-walkthrough-panel-tips"}).html(""+window.BimfaceLanguage.bf_panel_nav_addHere),p=n.walkthroughPointMngWrap=(new r.Dom).createElement({elementType:"div",className:""});return n.setHTML('\n
\n
'+window.BimfaceLanguage.bf_panel_nav_name+'
\n
'+window.BimfaceLanguage.bf_panel_nav_time+'
s
\n
\n
\n \n \n
',{name_input:a,time_input:i,walkthroughPointMngWrap:p,playBtn:s,stopBtn:c,addBtn:u,delBtn:d,tip:h}),u.on("click",(function(){if(!n.isPlaying()){var e=n.viewer.getCameraStatus(),t=""+window.BimfaceLanguage.bf_panel_nav_keyframe+n.walkthrough.num++,o=n.walkthrough.addKeyFrame(t);n.walkthroughPointMng.addItem({walkItemName:t,keyFrame:o,camera:e})}})),d.on("click",(function(){n.isPlaying()||n.walkthroughPointMng.removeAll()})),s.on("click",(function(){n.active&&n.play(!0)})),c.on("click",(function(){n.play(!1),n.walkthroughPointMng.selected()})),n.addEvent("isPlaying",(function(e){n.pathName.enabled(!e),n.pathTime.enabled(!e),e?(c.show(),s.hide()):(c.hide(),s.show())})),n.config=t,n}return a(t,e),t.prototype.updateBtn=function(){this.active&&this.playBtn.removeClass("bfui-walkthrough-disabled")||this.playBtn.addClass("bfui-walkthrough-disabled")},t.prototype.isPlaying=function(){return this.config.panel.isPlaying},t.prototype.update=function(e,t,n){var o=this;this.pathName.setValue(e._walkthrough.getName()).removeClass("bfui-walkthrough-info-input-invalid"),this.pathTime.setValue(e._walkthrough.walkthroughTime);var a=new r.Dom(this.pathTime.getDomElement().getParent());a.removeClass("bfui-walkthrough-info-input-invalid"),this.pathName.onChange((function(t){""==t?o.pathName.addClass("bfui-walkthrough-info-input-invalid"):(o.pathName.removeClass("bfui-walkthrough-info-input-invalid"),e._walkthrough.setName(t))})),this.pathTime.onChange((function(t){""==t||t<1?a.addClass("bfui-walkthrough-info-input-invalid"):(a.removeClass("bfui-walkthrough-info-input-invalid"),e._walkthrough.setWalkthroughTime(t))}));var i=this.walkthroughPointMng=new s.default({tip:this.tip,data:n.walkthroughPointMng,viewer:this.viewer,parentControl:this});this.active=this.walkthroughPointMng.group.length>1,this.updateBtn(),this.walkthroughPointMngWrap.html(""),this.walkthroughPointMngWrap.append(i.getDomElement()),this.walkthrough=e,this.walkthrough.num=this.walkthroughPointMng.group.length,e.stopCallback((function(){o.fireEvent("isPlaying",!1),i.selected()})),e.setKeyFrameCallback((function(e){i.setSelectedPoint(e)})),this.edit=t,i.addEvent("play",(function(e){o.play(!0,e)})),i.addEvent("notify",(function(e){o.active=e,o.updateBtn()}))},t.prototype.play=function(e,t){""==this.pathName.getValue()&&(this.pathName.setValue(this.walkthrough._walkthrough.name),this.pathName.removeClass("bfui-walkthrough-info-input-invalid"));var n=this.pathTime.getValue();(""==n||n<1)&&(this.pathTime.setValue(this.walkthrough._walkthrough.walkthroughTime),new r.Dom(this.pathTime.getDomElement().getParent()).removeClass("bfui-walkthrough-info-input-invalid")),this.fireEvent("isPlaying",e),e?this.walkthrough.play(t&&t.id):this.walkthrough.stop()},t.prototype.getPath=function(){return{walkthrough:this.walkthrough,walkthroughPointMng:this.walkthroughPointMng,edit:this.edit}},t}(i.Control);n.default=c},{"../../../../UI/Control":75,"../../../../UI/Controls/Input/Input":89,"../../../../UI/Dom":109,"./WalkthroughPointMng":33}],28:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("../../../../UI/Dom"),l=e("./WalkthroughPathMng"),s=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-walkthrough-list"},type:""};n=e.call(this,o)||this;var a=(new r.Dom).createElement({elementType:"div",className:"bfui-panel-tips"}).html(window.BimfaceLanguage.bf_panel_nav_addWalkthroughHere),i=n.walkthroughPathMng=new l.default({tip:a,viewer:t.viewer});return n.setHTML('\n \n \n ',{walkthroughPathMng:i,tip:a}),i.addEvent("notify",(function(e){})),i.addEvent("edit",(function(e){n.fireEvent("edit",e)})),i.addEvent("play",(function(e){n.fireEvent("isPlaying",!0)})),i.addEvent("pause",(function(e){n.fireEvent("isPlaying",!1)})),i.addEvent("stop",(function(e){n.fireEvent("stop"),e&&e.showPlay()})),n.config=t,n}return a(t,e),t.prototype.updatePathItem=function(e){this.walkthroughPathMng.updateItem(e)},t.prototype.addPathItem=function(e){this.walkthroughPathMng.addItem(e)},t}(i.Control);n.default=s},{"../../../../UI/Control":75,"../../../../UI/Dom":109,"./WalkthroughPathMng":31}],29:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../UIModule"),r=e("./WalkthroughList"),l=e("./CreateWalkthrough"),s=e("../../../../UI/ControlAnchor/ControlAnchor"),c=e("../../../../UI/Dom"),u=function(e){function t(t){var n=this;t.type="Panel",t.config=window.Object.assign({},{sizeFixed:!0,draggable:!0,width:300,height:410},t.config);var o=(n=e.call(this,t)||this)._element;return o.setTitle(window.BimfaceLanguage.bf_panel_nav_walkthrough),o.addClass("bfui-panel-walkthrough"),n.num=0,n.init(),n.isPlaying=!1,n.getUIManager().addControl(o,{position:{anchor:s.default.TopRight,offset:{x:-10,y:10}}}),n.createWalkthrough.addEvent("isPlaying",(function(e){n.updatePlayStatus(e)})),n.walkthroughList.addEvent("isPlaying",(function(e){n.updatePlayStatus(e)})),n}return a(t,e),t.prototype.updatePlayStatus=function(e){void 0===e&&(e=this.isPlaying);var t=this._element.getContent();e?(t.addClass("bfui-walkthrough-playing"),this.create.addClass("bfui-walkthrough-disabled"),this.back.addClass("bfui-walkthrough-disabled")):(t.removeClass("bfui-walkthrough-playing"),this.create.removeClass("bfui-walkthrough-disabled"),this.back.removeClass("bfui-walkthrough-disabled")),this.isPlaying=e},t.prototype.init=function(){var e=this,t=new window.Glodon.Bimface.Plugins.Walkthrough.WalkthroughManagerConfig;t.viewer=this.getViewer();var n=this.walkthroughManager=new window.Glodon.Bimface.Plugins.Walkthrough.WalkthroughManager(t),o=this.walkthroughList=new r.default({walkthroughManager:n,viewer:this.getViewer(),panel:this}),a=this.createWalkthrough=new l.default({walkthroughManager:n,viewer:this.getViewer(),panel:this}),i=this.create=(new c.Dom).createElement({elementType:"span",className:"bfui-walkthrough-create-path-btn"}).html(''+window.BimfaceLanguage.bf_panel_nav_addWalkthrough+""),s=this.back=(new c.Dom).createElement({elementType:"span",className:"bfui-walkthrough-return"}).html(""+window.BimfaceLanguage.bf_panel_nav_walkthroughList),u=this._element;u.getContent().setHTML('
',{btn_create:i,btn_return:s}),u.getContent().addControl(this.walkthroughList).addControl(a),a.hide(),s.hide().on("click",(function(){if(!e.isPlaying){s.hide(),i.show(),a.hide(),o.show();var t=a.getPath();t.walkthroughPointMng.group.length>0?t.edit?o.updatePathItem(t):o.addPathItem(t):e.num--}})),i.on("click",(function(){e.isPlaying||e.editPath()})),o.addEvent("edit",(function(t){e.editPath(t)})),o.addEvent("stop",(function(){e.updatePlayStatus(!1)}))},t.prototype.editPath=function(e){void 0===e&&(e={});var t,n={name:e.name||window.BimfaceLanguage.bf_panel_nav_walkthrough1+ ++this.num,walkthroughTime:e.walkthroughTime||20,walkthroughPointMng:e.walkthroughPointMng};if(this.create.hide(),this.back.show(),this.walkthroughList.hide(),this.createWalkthrough.show(),e.walkthrough)t=e.walkthrough,this.createWalkthrough.update(t,!0,n);else{var o=new window.Glodon.Bimface.Plugins.Walkthrough.WalkthroughConfig;o.viewer=this.getViewer(),(t=new window.Glodon.Bimface.Plugins.Walkthrough.Walkthrough(o)).setWalkthroughTime(n.walkthroughTime);var a=this.walkthroughManager.addWalkthrough(n.name,t);t.walkthroughId=a,this.createWalkthrough.update(t,!1,n)}},t}(i.UIModule);n.default=u},{"../../../../UI/ControlAnchor/ControlAnchor":77,"../../../../UI/Dom":109,"../../UIModule":44,"./CreateWalkthrough":27,"./WalkthroughList":28}],30:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("../../../../UI/Dom"),l=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-walkthrough-li"},id:t.id,type:"WalkthroughPath"};(n=e.call(this,o)||this).data={name:t.walkthrough._walkthrough.getName(),walkthroughTime:t.walkthrough._walkthrough.walkthroughTime,walkthrough:t.walkthrough,walkthroughPointMng:t.walkthroughPointMng};var a=n.playBtn=(new r.Dom).createElement({elementType:"div",className:"bfui-walkthrough-play"}),i=n.stopBtn=(new r.Dom).createElement({elementType:"div",className:"bfui-walkthrough-stop"}).hide(),l=(new r.Dom).createElement({elementType:"span",className:"bfui-walkthrough-button"}).html(""+window.BimfaceLanguage.bf_general_edit),s=(new r.Dom).createElement({elementType:"span",className:"bfui-walkthrough-button"}).html(""+window.BimfaceLanguage.bf_general_delete),c=n.pathName=(new r.Dom).createElement({elementType:"span",className:"bfui-walkthrough-name"}).html(n.data.name);return n.setHTML('
',{play:a,stop:i,edit:l,del:s,name:c}),s.on("click",(function(){t.manage.fireEvent("delete",n.getId())})),l.on("click",(function(e){e.stopPropagation(),t.manage.fireEvent("edit",n.data,n.getId())})),a.on("click",(function(e){e.stopPropagation(),n.data.walkthroughPointMng.group.length>1&&(n.showPlay(!1),t.manage.fireEvent("play",n,n.getId()))})),i.on("click",(function(e){e.stopPropagation(),n.showPlay(),t.manage.fireEvent("pause",n.data,n.getId())})),n.getDomElement().on("click",(function(){t.manage.fireEvent("selected",n.getId(),n)})),n}return a(t,e),t.prototype.showPlay=function(e){void 0===e&&(e=!0),e?(this.playBtn.show(),this.stopBtn.hide()):(this.playBtn.hide(),this.stopBtn.show())},t}(i.Control);n.default=l},{"../../../../UI/Control":75,"../../../../UI/Dom":109}],31:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("./WalkthroughPath"),l=function(e){function t(t){var n=this,o={elementParam:{elementType:"ul",className:"bfui-walkthrough-path-list bf-scroll-bar"},type:""};return(n=e.call(this,o)||this).tip=t.tip,n.group=[],n.num=0,n.flying=!1,n.viewer=t.viewer,n.addEvent("delete",(function(e){n.deleteItem(e)})),n.addEvent("selected",(function(e,t){n.flying&&(e==n.selectedId?t.data.walkthrough.stop():(n.currentWalkthrough.data.walkthrough.pause(),n.currentWalkthrough.showPlay())),n.selected(e)})),n.addEvent("play",(function(e,t){n.flying&&(n.currentWalkthrough.data.walkthrough.pause(),n.currentWalkthrough.showPlay()),n.setStopCallback(e),n.selected(t,!0),e.data.walkthrough.play(),n.flying=!0})),n.addEvent("pause",(function(e,t){n.selected(t,!0),e.walkthrough.pause(),n.flying=!1})),n.addEvent("edit",(function(e,t){n.selected(t)})),n}return a(t,e),t.prototype.selected=function(e,t){var n=this;this.group.map((function(o){o.getId()==e?(o.addClass("bfui-walkthrough-selected"),n.selectedId=e,n.currentWalkthrough=o,!t&&n.viewer.setCameraStatus(o.data.walkthroughPointMng.group[0].camera)):o.removeClass("bfui-walkthrough-selected")})),t||(this.flying=!1,this.currentWalkthrough.data.walkthrough.stop(),this.fireEvent("stop",this.currentWalkthrough))},t.prototype.updateItem=function(e){e.edit=!1;var t=this.group.filter((function(t){return t.data.walkthrough.walkthroughId==e.walkthrough.walkthroughId}))[0];t.pathName.html(e.walkthrough._walkthrough.getName()),t.data.walkthroughPointMng=e.walkthroughPointMng.getData(),this.setStopCallback(t)},t.prototype.setStopCallback=function(e){var t=this;e.data.walkthrough.stopCallback((function(){t.fireEvent("stop",e),t.flying=!1}))},t.prototype.addItem=function(e){var t=new r.default({id:this.num,walkthrough:e.walkthrough,manage:this,walkthroughPointMng:e.walkthroughPointMng.getData()});this.getDomElement().append(t.getDomElement()),this.setStopCallback(t),this.group.push(t),this.selected(this.num,!0),this.num++,this.update()},t.prototype.removeAll=function(){this.group=[],this.update()},t.prototype.deleteItem=function(e){this.group=this.group.filter((function(t){return t.getId()!=e||(t.destroy(),!1)})),this.update()},t.prototype.update=function(){0==this.group.length?this.tip.show():this.tip.hide(),this.fireEvent("notify",this.group.length>1)},t}(i.Control);n.default=l},{"../../../../UI/Control":75,"./WalkthroughPath":30}],32:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("../../../../UI/Dom"),l=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-walkthrough-li"},id:t.id,type:"WalkthroughPoint"};(n=e.call(this,o)||this).name=t.name||""+(window.BimfaceLanguage.bf_panel_nav_keyframe+t.id),n.config=t;var a=(new r.Dom).createElement({elementType:"span",className:"bfui-walkthrough-button bfui-walkthrough-play"}).html(""+window.BimfaceLanguage.bf_panel_nav_play),i=(new r.Dom).createElement({elementType:"span",className:"bfui-walkthrough-button"}).html(""+window.BimfaceLanguage.bf_general_delete);return n.setHTML(''+n.name+'
',{play:a,del:i}),i.on("click",(function(){n.fireEvent("delete",n.getId())})),n.getDomElement().on("click",(function(){n.fireEvent("selected",n.getId(),n.config.camera)})),a.on("click",(function(e){e.stopPropagation(),n.fireEvent("play",n.config.keyFrame)})),n}return a(t,e),t.prototype.getData=function(){return{name:this.name,id:this.id,walkItemName:this.config.walkItemName,keyFrame:this.config.keyFrame,camera:this.config.camera}},t}(i.Control);n.default=l},{"../../../../UI/Control":75,"../../../../UI/Dom":109}],33:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("./WalkthroughPoint"),l=function(e){function t(t){var n=this,o={elementParam:{elementType:"ul",className:"bfui-walkthrough-point-list bf-scroll-bar"},type:""};if((n=e.call(this,o)||this).parentControl=t.parentControl,n.tip=t.tip,n.group=[],n.num=0,n.viewer=t.viewer,n.selectedId=-1,t.data){var a=t.data;n.num=a.num,a.group.map((function(e){n.addItem(e)}))}return n.update(),n}return a(t,e),t.prototype.setSelectedPoint=function(e){this.selected(this.group[e].getId())},t.prototype.selected=function(e){this.group.map((function(t){t.getId()==e?t.addClass("bfui-walkthrough-selected"):t.removeClass("bfui-walkthrough-selected")})),this.selectedId=e},t.prototype.addItem=function(e){var t=this;void 0===e&&(e={});var n=window.Object.assign({},{id:e.id||this.num,name:e.name},e),o=new r.default(n);o.addEvent("delete",(function(e){t.deleteItem(e)})),o.addEvent("play",(function(e){t.fireEvent("play",e)})),o.addEvent("selected",(function(e,n){t.parentControl.isPlaying()||(t.selected(e),t.viewer.setCameraStatus(n))}));var a,i=this.group.length,l=i&&this.group[i-1].getId(),s=this.group.filter((function(e,n){return e.getId()==t.selectedId&&(a=n,!0)}));this.selectedId>-1&&this.selectedId!=l?(this.getDomElement().getElement().insertBefore(o.getDomElement().getElement(),s[0].getDomElement().getElement().nextSibling||s[0].getDomElement().getElement()),this.group.splice(a+1,0,o),this.sortKeyframe(a),this.selected(this.selectedId)):(this.getDomElement().append(o.getDomElement()),this.group.push(o)),!e.name&&this.num++,this.update()},t.prototype.sortKeyframe=function(e){var t=this.parentControl.walkthrough,n=t.getKeyFrames(),o=n.pop();n.splice(e+1,0,o),t.setKeyFrames(n)},t.prototype.getData=function(){var e=[];return this.group.map((function(t){e.push(t.getData())})),{num:this.num,group:e}},t.prototype.removeAll=function(){this.parentControl.walkthrough.clearKeyFrames(),this.group=[],this.selectedId=-1,this.setHTML(""),this.update()},t.prototype.deleteItem=function(e){var t=this;this.group=this.group.filter((function(n,o){return n.getId()!=e||(t.parentControl.walkthrough.removeKeyFrame(o),n.destroy(),!1)})),this.update()},t.prototype.update=function(){this.selected(-1),0==this.group.length?this.tip.show():this.tip.hide(),this.fireEvent("notify",this.group.length>1)},t.prototype.setData=function(e){void 0===e?(this.num=0,this.removeAll()):this.num=e.num},t}(i.Control);n.default=l},{"../../../../UI/Control":75,"./WalkthroughPoint":32}],34:[function(e,t,n){"use strict";var o;Object.defineProperty(n,"__esModule",{value:!0}),function(e){e.Default="",e.Red="bfui-theme-red",e.Blue="bfui-theme-blue"}(o||(o={})),n.default=o},{}],35:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.MainToolbar=void 0;var i=function(e){function t(t){return t.name="MainToolbar",t.config.isHorizontal=!0===t.config.isHorizontal,t.config.isFullLength=!1!==t.config.isFullLength,e.call(this,t)||this}return a(t,e),t}(e("./Toolbar").Toolbar);n.MainToolbar=i},{"./Toolbar":40}],36:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.SubToolbar=void 0;var i=function(e){function t(t){var n=this;return t.config.isHorizontal=!0===t.config.isHorizontal,t.config.isFullLength=!1,(n=e.call(this,t)||this).toolbar=t.toolbar,n.getElement().addClass("bfui-subtoolbar"),t.modules&&n.loadModules(t.modules),n._isVisible=!0===t.isVisible,!n._isVisible&&n.hide(),n}return a(t,e),t.prototype.show=function(){this.getEnableUIAnimation()?this.getElement().getDomElement().css("height",this._height+"px").removeClass("bfui-subtoolbar-hide"):e.prototype.show.call(this);return this._isVisible=!0,this},t.prototype.hide=function(){var t=this.getElement().getDomElement();return this.getEnableUIAnimation()?this._height?t.addClass("bfui-subtoolbar-hide").css({height:"0px"}):(this._height=this.getElement().getHeight(),t.addClass("bfui-subtoolbar-hide").css({height:"0px"}),requestAnimationFrame((function(){return t.addClass("bfui-transition")}))):e.prototype.hide.call(this),this._isVisible=!1,this},t.prototype.isVisible=function(){return this._isVisible},t}(e("./Toolbar").Toolbar);n.SubToolbar=i},{"./Toolbar":40}],37:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="SubToolbarAreaMeasure",t.config.isHorizontal=!0,t.config.isFullLength=!1,t.config.elementParam={className:"area-measure-subtoolbar"},(n=e.call(this,t)||this).init(),n}return a(t,e),t.prototype.init=function(){var e=this.getWebApplication().getConfig().toolbars.mainToolbar,t=!0===e.create&&e.items.Measure,n=!0===t.create&&t.items.Area;if(!0===n.create){var o=n.items,a=[];for(var i in o){if(o[i].create){var r={type:"Button",name:"Measure"+i};a.push(r)}}this.loadModules(a)}},t}(e("./Toolbar").Toolbar);n.default=i},{"./Toolbar":40}],38:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t.name="SubToolbarDistanceMeasure",t.config.isHorizontal=!0,t.config.isFullLength=!1,t.config.elementParam={className:"area-measure-subtoolbar"},(n=e.call(this,t)||this).init(),n}return a(t,e),t.prototype.init=function(){var e=this.getWebApplication().getConfig().toolbars.mainToolbar,t=!0===e.create&&e.items.Measure,n=!0===t.create&&t.items.Distance;if(!0===n.create){var o=n.items,a=[];for(var i in o){if(o[i].create){var r={type:"Button",name:"Measure"+i};a.push(r)}}this.loadModules(a)}},t}(e("./Toolbar").Toolbar);n.default=i},{"./Toolbar":40}],39:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){return t.name="SubToolbarMeasure",e.call(this,t)||this}return a(t,e),t}(e("./SubToolbar").SubToolbar);n.default=i},{"./SubToolbar":36}],40:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.Toolbar=void 0;var i=e("../UIModule"),r=e("../UIModuleMap"),l=e("../../../UI/Control"),s=e("../../../Common/Utils/DataUtil"),c=function(e){function t(t){return t.type="Toolbar",t.config.isHorizontal=!0===t.config.isHorizontal,t.config.isFullLength=!1!==t.config.isFullLength,e.call(this,t)||this}return a(t,e),t.prototype.loadModules=function(e){var t=this;return e.forEach((function(e){if(s.default.assertType(e,"obj")&&void 0!==e.type&&void 0!==e.name){var n=e,o=n.type,a=n.name,i=n.option;r.default.hasOwnProperty(o)&&r.default[o].hasOwnProperty(a)&&((i=i||{}).toolbar=t,t.loadModule(o,a,i))}else e instanceof l.Control&&t.addControl(e)})),this},t.prototype.getButton=function(e){return this.getModule("Button",e)||this.getControl({id:e})},t.prototype.getButtons=function(){var e=[];for(var t in this.getAllModules().Button)e.push(this.getAllModules().Button[t]);return e},t}(i.UIModule);n.Toolbar=c},{"../../../Common/Utils/DataUtil":68,"../../../UI/Control":75,"../UIModule":44,"../UIModuleMap":45}],41:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0),hasIsolate:!0,isExpand:"all"===t.typeName,isChecked:"unchecked"!==i,isIsolate:r,instanceIds:this.instanceIds||t};a=t.name?t.name:t;var c=new l.default(s);return c.initTreeNode(a),s.isExpand&&t.items&&this.initNode(c,t.items),c.on("ExpendChanged",(function(e,n){n&&t.items&&!t.items[0].elementIds&&o.initNode(e,t.items),n&&t.items[0].elementIds&&o.initNode(e,t.items[0].elementIds)})),c.on("CheckedChanged",(function(e,t){o.handleCheckedChanged(e,t)})),c.on("SelectionChanged",(function(e,t){o.handleSelectionChanged(e,t)})),c.on("IsolateChanged",(function(e,t){o.currentLayer.isVisible&&o.handleIsolateChanged(e,t)})),c},t.prototype.setInstanceIds=function(e,t,n){if(e.items)for(var o=function(o){if(e.items[o]&&!e.items[0].elementIds)a.setInstanceIds(e.items[o],t,n);else if(e.items[0].elementIds){var i=e.items[0].fileId;return e.items[0].elementIds.map((function(e){i?t.push(i+"."+e):t.push(e)})),"continue"}},a=this,i=0;i0)for(var e=0;e=0){for(var r=0;r0)g(n,l);else if(f&&n.id&&n.id.toString()===f.toString())return m=l,!0}))};if(Array.isArray(t)||(t=[t]),t.some((function(e,n){return!(u&&e.fileIds&&!e.fileIds.includes(u))&&(e.fileIds||"floor"!==e.type||1!==t.length?g(e,i(v,[n])):g(e,i(v)),!!m||void 0)})),m||1==c.length){var y;if(m){(y=a.content._children[0]).collapseWrap&&!y.collapseWrap.element.hasClass("open")&&y.collapseWrap.click();for(var b=1;b0))return;y=p[0][0]}if(!y||y.treeName.hasClass("bfui-selected"))l();else{var _=function(e,t){var n=a._domElement.element&&a._domElement.element.parentElement;if(n&&n.scrollBy)for(var o=e.treeName.element.getBoundingClientRect().top,i=e.treeName.element.offsetHeight,r=o+i,l=0;ls+c)&&n.children[l].hasClass("bfui-tree-component")&&n.children[l].scrollBy({top:u,behavior:t})}},C=a._selectionNode;C&&(_(C,"instant"),C.setSelectState(!1));var M=this.highlightedNodes.get(h);M?this.highlightedNodes.set(h,i(M,[y])):this.highlightedNodes.set(h,[y]),c.length>1?l():(l(),Array.from(this.highlightedNodes.values())[0].map((function(e){e.opt.content==c[0]&&(e.setSelectState(!0),a._selectionNode=e,_(e,"smooth"))})),this.treeClickedNodes&&this.treeClickedNodes.map((function(e){e&&e.getAttribute("title")==c[0]&&e.addClass("bfui-selected")})))}}else l()}else l()}},t}(r.UIModule);n.default=c},{"../../../UI/Controls/Tree/TreeNode":108,"../../WebApplicationGIS/WebApplicationGISEvent":49,"../UIModule":44}],42:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../UIModule"),r=e("../../../UI/Controls/Tree/TreeNode"),l=e("./ComponentsTree"),s=e("../../WebApplicationGIS/WebApplicationGISEvent"),c=e("../../../Common/Utils/DomUtil2D"),u=function(e){function t(t){var n=this;t.type="Tree";var o=(n=e.call(this,t)||this)._element,a=t.config.content;o.addClass("bfui-tree-layer"),n.rootNode=o;var i=[{id:"all",typeName:"all",name:"全部图层",children:a}];return n.initNode(o,i),n}return a(t,e),t.prototype.initNode=function(e,t){var n=this;t.map((function(t){var o,a=e.getControl({id:""+t.id});a?(o=a,a.show()):(o=n.creatTreeNode(e,t),e===n.rootNode?e.addTreeNode(o):e.addChildNode(o))}))},t.prototype.creatTreeNode=function(e,t){var n,o=this,a=this.getViewer().getLayerManager(),i=t.isVisible;if(e!==this.rootNode&&(n=e.getCheckedState()),"all"!==e.getId())switch(n){case"unchecked":i=!1;break;case"checked":case void 0:i=!0;break;default:i=t.isVisible}else i=t.isVisible;var l=!0;("BIMLayer"===t.typeName||"FeatureLayer"===t.typeName||"TilesetLayer"===t.typeName)&&t.isVisible&&t.modelId&&(l=!!this.getViewer().getLayerManager().getLayer(t.id)),this.instanceIds=this.setInstanceIds(t,[]);var u={rootTree:this.rootNode,content:t,id:t.id,type:t.typeName,hasCheckBox:!0,hasSelection:"BIMLayer"===t.typeName||"FeatureLayer"===t.typeName||"TilesetLayer"===t.typeName||"ExternalObjectLayer"===t.typeName,hasCollapse:!!(t.children&&t.children.length>0),isExpand:"all"===t.typeName,isChecked:i,isLoaded:l,instanceIds:this.instanceIds,parent:e},d={type:"svg",name:""};switch(t.typeName){case"all":case"GroupLayer":d.name="gld-bf-folder-open-c-sm";break;case"TileLayer":d.name="gld-bf-map-c-sm";break;case"TerrainLayer":d.name="gld-bf-scene-c-sm";break;default:d.name="gld-bf-file-c-sm"}var h=new r.default(u);return h.initTreeNode(t.name,d),u.isExpand&&t.children&&this.initNode(h,t.children),h.on("ExpendChanged",(function(e,n){n&&t.children&&o.initNode(e,t.children)})),h.on("CheckedChanged",(function(e,n){var i="all"===t.typeName?a.getRootLayer():a.getLayer(t.id);i&&(n?i.show():i.hide()),o.getViewer().render()})),h.on("SelectionChanged",(function(e,n){"BIMLayer"!==t.typeName&&"FeatureLayer"!==t.typeName||(n&&c.DomUtil2D.debounce((function(){return o.creatComponentsTree(t.id,e)}))(),!n&&o.hideComponentsTree(t.id),n&&a.zoomToLayer(t.id)),"TilesetLayer"!==t.typeName&&"ExternalObjectLayer"!==t.typeName||n&&a.zoomToLayer(t.id)})),h.getTreeInfoDom().on("mouseup",(function(e){0!==e.button&&2!==e.button||setTimeout((function(){var n={eventType:2===e.button?"RightClick":"Click",layerType:t.typeName,layerId:t.id,event:e,isSelected:!1},a=h.getOptions();a&&a.hasSelection&&(n.isSelected=Boolean(h.getSelectState())),o.getWebApplication().trigger(s.default.LayerTreeNodeClicked,n)}),0)})),h},t.prototype.creatComponentsTree=function(e,t){var n=this;if(this.parentPanel&&this.parentPanel.getControl({id:"ComponentsTree-"+e}))this.parentPanel.getControl({id:"ComponentsTree-"+e}).show(),this.rootNode.addClass("limit-height"),window.requestAnimationFrame((function(){n.scrollToNode(t),n.rootNode.getParent().getAllControls().map((function(t){t.getId().toString().indexOf(e.toString())<0&&t.hide()}))}));else{var o=this.getViewer().getLayerManager().getLayer(e).model;o&&o.getModelTree((function(o,a,i){if(o){var r={manager:n._manager,type:"Tree",name:"ComponentsTree",config:{id:"ComponentsTree-"+e,title:"构件",content:o}},s=new l.default(r);n.parentPanel=n.getUIManager().getModule("Panel","LayerTreePanel",!1).getElement(),n.parentPanel.addControl(s.getElement()),n.rootNode.addClass("limit-height"),window.requestAnimationFrame((function(){n.scrollToNode(t),n.rootNode.getParent().getAllControls().map((function(t){t.getId().toString().indexOf(e.toString())<0&&t.hide()}))}))}}))}},t.prototype.hideComponentsTree=function(e){var t=this.parentPanel&&this.parentPanel.getControl({id:"ComponentsTree-"+e});t&&t.hide(),this.rootNode.removeClass("limit-height")},t.prototype.setInstanceIds=function(e,t){if(e.children)for(var n=0;nr+l){var s=o-r-2*i;this.getElement().getControl({id:"all"}).setExpansion(!0),t.scrollBy({top:s,behavior:"smooth"})}}},t}(i.UIModule);n.default=u},{"../../../Common/Utils/DomUtil2D":69,"../../../UI/Controls/Tree/TreeNode":108,"../../WebApplicationGIS/WebApplicationGISEvent":49,"../UIModule":44,"./ComponentsTree":41}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("./UIModuleMap"),a=e("./Theme"),i=function(){function e(e){this._modules={},this._controls=[],this._webApplication=e,this.domElement=e.getDomElement()}return e.prototype.getWebApplication=function(){return this._webApplication},e.prototype.loadModule=function(e,t,n){var a=this.getModule(e,t);if(a)return a;if(o.default.hasOwnProperty(e)&&o.default[e].hasOwnProperty(t)){var i={manager:this,type:e,name:t};for(var r in n)i[r]=n[r];i.config=i.config||{},i.config.parent=i.config.parent||this.domElement;var l=new o.default[e][t](i);return this._modules[e]=this._modules[e]||{},this._modules[e][t]=l,l}},e.prototype.getModule=function(e,t,n){if(void 0===n&&(n=!0),n){var o=this.getModule(e,t,!1);if(o)return o;for(var a in this._modules){var i=this._modules[a];for(var r in i){if(o=i[r].getModule(e,t,!0))return o}}}else if(this._modules[e])return this._modules[e][t]},e.prototype.getAllModules=function(){return this._modules},e.prototype.addControl=function(e,t){this._controls.push(e),this.domElement.append(e.getDomElement()),t&&t.position&&e.setPosition(t.position),"Panel"===e.getType()&&e.topShow()},e.prototype.getAllControls=function(){return this._controls},e.prototype.removeControl=function(e){var t=this;return this._controls.some((function(n,o){if(n===e)return t._controls.splice(o,1),t.domElement.remove(n.getDomElement()),!0})),this},e.prototype.getControl=function(e){var t;if(e)return this._controls.some((function(n){if(n.getId()===e.id)return t=n,!0})),t},e.prototype.setTheme=function(e){var t=a.default[e];if(void 0===t)return this;for(var n in a.default){var o=a.default[n];""!==o&&this.domElement.removeClass(o)}return""!==t&&this.domElement.addClass(t),this},e.prototype.getToolbar=function(e){return this.getModule("Toolbar",e)},e.prototype.getContentBrowser=function(){},e.prototype.getLayerBrowser=function(){},e.prototype.getInfoBar=function(){return this._webApplication.getViewer().getInfoBar?this._webApplication.getViewer().getInfoBar():void 0},e.prototype.getScaleBar=function(){return this._webApplication.getViewer().getScaleBar?this._webApplication.getViewer().getScaleBar():void 0},e.prototype.updateLayerTree=function(){var e=this.getModule("Panel","LayerTreePanel");e&&e.getElement().getContent().clearControls(!0)},e.prototype.reset=function(){var e=this;["MainToolbar","SubToolbarMeasure"].forEach((function(t){return function(t){var n=e.getModule("Toolbar",t);n&&n.getButtons().forEach((function(e){e.getSelect()&&e.setSelect(!1)}))}(t)})),this.getModule("Button","MeasureClear").click()},e.prototype.destroy=function(){for(var e in this._modules){var t=this._modules[e];for(var n in t)t[n].destroy()}this._controls.forEach((function(e){return e.destroy()})),this._modules=null,this._controls=null,this._webApplication=null,this.domElement=null},e}();n.default=i},{"./Theme":34,"./UIModuleMap":45}],44:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UIModule=void 0;var o=e("../../UI/bimface.ui"),a=e("./UIModuleMap"),i=function(){function e(e){this._modules={},this._controls=[],this.type=e.type,this.name=e.name,this._UIConfig=e.config,this._manager=e.manager,this.load()}return e.prototype.load=function(){return this._element?this._element.show():this._element=new o.default[this.type](this._UIConfig),this},e.prototype.unload=function(){this._element&&this._element.hide()},e.prototype.destroy=function(){for(var e in this._modules){var t=this._modules[e];for(var n in t)t[n].destroy()}this._controls.forEach((function(e){return e.destroy()})),this._modules=null,this._controls=null,this._element&&this._element.destroy(),this._element=null,this._manager=null},e.prototype.loadModule=function(e,t,n){var o,i=this.getModule(e,t);if(i)return i;if(a.default.hasOwnProperty(e)&&a.default[e].hasOwnProperty(t)){var r={manager:this._manager,type:e,name:t};for(var l in n)r[l]=n[l];r.config=r.config||{},r.config.parent=r.config.parent||this._element.getDomElement(),o=new a.default[e][t](r)}return this._modules[e]=this._modules[e]||{},this._modules[e][t]=o,o},e.prototype.getModule=function(e,t,n){if(void 0===n&&(n=!0),n){var o,a=function(n){var i=n.getModule(e,t,!1);if(i)o=i;else{var r=n.getAllModules();for(var l in r){var s=r[l];for(var c in s){var u=s[c];a(u)}}}};return a(this),o}if(this._modules[e])return this._modules[e][t]},e.prototype.getAllModules=function(){return this._modules},e.prototype.addControl=function(e,t){this._controls.push(e),this._element.getDomElement().append(e.getDomElement()),t&&t.position&&e.setPosition(t.position)},e.prototype.getAllControls=function(){return this._controls},e.prototype.removeControl=function(e){var t=this;return this._controls.some((function(n,o){if(n===e)return t._controls.splice(o,1),t._element.getDomElement().remove(n.getDomElement()),!0})),this},e.prototype.getControl=function(e){var t;if(e)return this._controls.some((function(n){if(n.getId()===e.id)return t=n,!0})),t},e.prototype.getElement=function(){return this._element},e.prototype.getUIManager=function(){return this._manager},e.prototype.getWebApplication=function(){return this.getUIManager().getWebApplication()},e.prototype.getViewer=function(){return this.getWebApplication().getViewer()},e.prototype.getEnableUIAnimation=function(){return this.getWebApplication().getEnableUIAnimation()},e.prototype.show=function(){return this._element.show(),this},e.prototype.hide=function(){return this._element.hide(),this},e.prototype.isVisible=function(){return this._element.isVisible()},e.prototype.getName=function(){return this.name},e.prototype.onClick=function(e){return this.getElement().onClick(e),this},e.prototype.click=function(){return this.getElement().click(),this},e}();n.UIModule=i},{"../../UI/bimface.ui":113,"./UIModuleMap":45}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("./Buttons/MainToolbarButtons/Home"),a=e("./Buttons/MainToolbarButtons/LayerTree"),i=e("./Buttons/MainToolbarButtons/FullScreen"),r=e("./Buttons/MainToolbarButtons/Measure"),l=e("./Buttons/MainToolbarButtons/MeasureDistance"),s=e("./Buttons/MainToolbarButtons/MeasureGroundlineDistance"),c=e("./Buttons/MainToolbarButtons/MeasurePolylineDistance"),u=e("./Buttons/MainToolbarButtons/MeasurePosition"),d=e("./Buttons/MainToolbarButtons/MeasureArea"),h=e("./Buttons/MainToolbarButtons/MeasureSpatialArea"),p=e("./Buttons/MainToolbarButtons/MeasureProjectedArea"),f=e("./Buttons/MainToolbarButtons/MeasureSurfaceArea"),m=e("./Buttons/MainToolbarButtons/MeasureTriangleDistance"),v=e("./Buttons/MainToolbarButtons/MeasureAngle"),g=e("./Buttons/MainToolbarButtons/MeasureSetting"),y=e("./Buttons/MainToolbarButtons/MeasureClear"),b=e("./Buttons/MainToolbarButtons/Walkthrough"),_=e("./Buttons/MainToolbarButtons/Property"),C=e("./Buttons/MainToolbarButtons/Setting"),M=e("./Panels/DrawerPanels/LayerTreePanel"),w=e("./Panels/DrawerPanels/SettingPanel"),S=e("./Panels/PropertyPanel/PropertyPanel"),E=e("./Panels/WalkthroughPanel/WalkthroughPanel"),L=e("./Panels/MeasureSettingPanel/MeasureSettingPanel"),I=e("./Toolbars/MainToolbar"),T=e("./Toolbars/SubToolbarMeasure"),P=e("./Toolbars/SubToolbarAreaMeasure"),x=e("./Toolbars/SubToolbarDistanceMeasure"),A=e("./Tree/LayerTree"),B={Button:{Home:o.default,LayerTree:a.default,Measure:r.default,MeasureDistance:l.default,MeasureGroundlineDistance:s.default,MeasurePolylineDistance:c.default,MeasurePosition:u.default,MeasureArea:d.default,MeasureSpatialArea:h.default,MeasureProjectedArea:p.default,MeasureSurfaceArea:f.default,MeasureTriangleDistance:m.default,MeasureAngle:v.default,MeasureSetting:g.default,MeasureClear:y.default,Walkthrough:b.default,Property:_.default,Setting:C.default,FullScreen:i.default},Panel:{LayerTreePanel:M.default,SettingPanel:w.default,PropertyPanel:S.default,WalkthroughPanel:E.default,MeasureSettingPanel:L.default},Toolbar:{MainToolbar:I.MainToolbar,SubToolbarMeasure:T.default,SubToolbarAreaMeasure:P.default,SubToolbarDistanceMeasure:x.default},Tree:{LayerTree:A.default}};n.default=B},{"./Buttons/MainToolbarButtons/FullScreen":2,"./Buttons/MainToolbarButtons/Home":3,"./Buttons/MainToolbarButtons/LayerTree":4,"./Buttons/MainToolbarButtons/Measure":5,"./Buttons/MainToolbarButtons/MeasureAngle":6,"./Buttons/MainToolbarButtons/MeasureArea":7,"./Buttons/MainToolbarButtons/MeasureClear":8,"./Buttons/MainToolbarButtons/MeasureDistance":9,"./Buttons/MainToolbarButtons/MeasureGroundlineDistance":10,"./Buttons/MainToolbarButtons/MeasurePolylineDistance":11,"./Buttons/MainToolbarButtons/MeasurePosition":12,"./Buttons/MainToolbarButtons/MeasureProjectedArea":13,"./Buttons/MainToolbarButtons/MeasureSetting":14,"./Buttons/MainToolbarButtons/MeasureSpatialArea":15,"./Buttons/MainToolbarButtons/MeasureSurfaceArea":16,"./Buttons/MainToolbarButtons/MeasureTriangleDistance":17,"./Buttons/MainToolbarButtons/Property":18,"./Buttons/MainToolbarButtons/Setting":19,"./Buttons/MainToolbarButtons/Walkthrough":21,"./Panels/DrawerPanels/LayerTreePanel":23,"./Panels/DrawerPanels/SettingPanel":24,"./Panels/MeasureSettingPanel/MeasureSettingPanel":25,"./Panels/PropertyPanel/PropertyPanel":26,"./Panels/WalkthroughPanel/WalkthroughPanel":29,"./Toolbars/MainToolbar":35,"./Toolbars/SubToolbarAreaMeasure":37,"./Toolbars/SubToolbarDistanceMeasure":38,"./Toolbars/SubToolbarMeasure":39,"./Tree/LayerTree":42}],46:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t1&&(e.parentId=t.crumbData[t.crumbData.length-1].id),t.getResourceList(e)})),this.fileCrumb=(new a.Crumb).addClass("bfui-sceneeditor-resource-crumb"),this.crumbData=[{id:"root",text:"全部"}],this.fileCrumb.setValue(this.crumbData).onSelect((function(e){var n=t.crumbData.find((function(t){return t.id===e}));if(n){var o=t.crumbData.indexOf(n);t.crumbData=t.crumbData.slice(0,o+1),t.fileCrumb.setValue(t.crumbData);var a={type:t.tabs.getActiveValue()};"root"!==n.id&&(a.parentId=n.id),t.getResourceList(a)}})),this.fileList=(new a.List).addClass("bfui-sceneeditor-resource-filelist"),this.fileList.onChecked((function(e){t.arrayCheckedData=e.map((function(e){return e.data})),t.updateAddResourceButton()})).onItemClicked((function(e){e.data.isFolder&&(t.getResourceList({parentId:e.id,type:t.tabs.getActiveValue()}),t.crumbData.push({id:e.id,text:e.text}),t.fileCrumb.setValue(t.crumbData))})),s.append(c.getDomElement()).append(this.fileCrumb.getDomElement()).append(this.fileList.getDomElement());var u=(new o.Dom).createElement({elementType:"div",className:"bfui-sceneeditor-resource-container"});this.integrateList=(new a.List).addClass("bfui-sceneeditor-resource-integratelist"),this.integrateList.onChecked((function(e){t.arrayCheckedData=e.map((function(e){return e.data})),t.updateAddResourceButton()}));var d=this.integrateSearch=new i.default;d.onSearch((function(e){t.getResourceList({searchKeyword:e,type:t.tabs.getActiveValue()})})),d.onCancel((function(){var e={type:t.tabs.getActiveValue()};t.getResourceList(e)})),u.append(this.integrateSearch.getDomElement()).append(this.integrateList.getDomElement());var h=this.tabs=new a.Tabs({parent:this.panel.getDomElement(),options:[{content:s,label:"单文件模型",name:"file",value:"file"},{content:u,label:"集成模型",name:"integrate",value:"integrate"}]});h.addClass("bfui-sceneeditor-resource-tabs"),h.onSelect((function(e){"file"===e?c.cancel():d.cancel()})),requestAnimationFrame((function(){h.setActive(0)}));var p=this.buttonConfirm=new a.Button({text:"添加单文件模型"}).addClass("bfui-sceneeditor-button","footer-button","button-primary");p.onClick((function(){return t.confirm()}));var f=new a.Button({text:"取消"}).addClass("bfui-sceneeditor-button","footer-button","button-default").onClick((function(){return t.cancel()})),m=new a.Row({justifyContent:"End"}).addClass("bfui-sceneeditor-panel-footer").addControl(p).addControl(f),v=this.loading=new r.default;v.hide(),this.panel.addControl(v).addControl(h).getFooter().addControl(m),this.emptyListLabel=(new o.Dom).createElement({elementType:"div",className:"bfui-sceneeditor-emptylabel"}),this.emptyListLabel.hide().html("没有找到对应内容"),this.panel.getDomElement().append(this.emptyListLabel),l.eventBus.on(l.WebApplicationGISEditorEvent.AddResourcePanelShow,(function(e){t.show(),t.crumbData=[{id:"root",text:"全部"}],t.fileCrumb.setValue(t.crumbData),requestAnimationFrame((function(){h.setActive(0)})),t.getResourceList({type:t.tabs.getActiveValue()}),t.isUpdateMode="update"===e;var n=t.isUpdateMode?"更新资源":"添加资源";t.panel.setTitle(n)}))}return e.prototype.getDomElement=function(){return this.domElement},e.prototype.getResourceList=function(e){var t=this;this.arrayCheckedData=[],this.updateAddResourceButton(),this.emptyListLabel.hide(),this.loading.show(),e||(e={});var n="file"===this.tabs.getActiveValue();e.type=n?"file":"integrate";var o=function(e){var t=e.isFolder,n=e.name;if(t)return"bf-folder-md";var o=e.suffix||n.slice(n.lastIndexOf(".")+1);if(o){var a=s[o.toLowerCase()];if(a)return"bf-"+a}return"bf-file"};this.app.getConfig().getResourceListHandler(e).then((function(e){t.loading.hide();var a=n?t.fileList:t.integrateList,i=e.map((function(e){return{id:e.id,text:e.name,hasCheckBox:!0,hasIcon:!0,iconType:"svg",iconClass:o(e),data:e}}));a.setValue(i),0===i.length&&t.emptyListLabel.show()})).catch((function(e){return console.log("getResourceListHandler error: "+e)}))},e.prototype.show=function(){var e=this;this.domElement.show(),this.panel.show(),requestAnimationFrame((function(){return e.domElement.addClass("bfui-sceneeditor-modal-show")}))},e.prototype.hide=function(){var e=this;this.domElement.removeClass("bfui-sceneeditor-modal-show");var t=function(){e.domElement.hide(),e.getDomElement().off("transitionend",t)};this.getDomElement().on("transitionend",t)},e.prototype.confirm=function(){var e=this;0!==this.arrayCheckedData.length&&(this.isUpdateMode&&(this.arrayCheckedData=[this.arrayCheckedData[0]]),this.arrayCheckedData.forEach((function(t){t.type=e.tabs.getActiveValue()})),this.app.getConfig().getViewTokenHandler(this.arrayCheckedData).then((function(t){l.eventBus.trigger(l.WebApplicationGISEditorEvent.AddResourceByViewToken,t.map((function(t){if(!t.name){var n=e.arrayCheckedData.filter((function(e){return e.id===t.id}))[0];n&&(t.name=n.name)}return t.modelType="file"===e.tabs.getActiveValue()?"singleModel":"integrateModel",t})),e.isUpdateMode?"update":"add"),e.cancel()})).catch((function(t){console.log("getViewTokenHandler error: "+t),e.cancel()})))},e.prototype.cancel=function(){this.arrayCheckedData=[],this.hide()},e.prototype.updateAddResourceButton=function(){this.buttonConfirm.setHTML((this.isUpdateMode?"更新":"添加")+("file"===this.tabs.getActiveValue()?"单文件":"集成")+"模型"),0===this.arrayCheckedData.length?this.buttonConfirm.addClass("button-disabled"):this.buttonConfirm.removeClass("button-disabled")},e}();n.default=u},{"../../../../UI/Dom":109,"../../../../UI/UIMap":112,"../../libs/EventBus":62,"./Loading":51,"./ResourceSearch":52}],51:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("../../../../UI/Common/Utils/Render"),l=function(e){function t(){var t=this,n={elementParam:{elementType:"div",className:"bfui-sceneeditor-loading"},type:"Loading"};return t=e.call(this,n)||this,r.default('\n
\n
\n
\n ',t.getDomElement()),t}return a(t,e),t.prototype.show=function(){return e.prototype.show.call(this),this},t}(i.Control);n.default=l},{"../../../../UI/Common/Utils/Render":73,"../../../../UI/Control":75}],52:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("../../../../UI/Common/Utils/Render"),l=function(e){function t(){var t=this,n={elementParam:{elementType:"div",className:"bfui-sceneeditor-search"},type:"ResourceSearch"};(t=e.call(this,n)||this).isSearching=!1,t.data={buttonCancelVisible:!1},t.renderItemMap=r.default('\n \n \n \n ',t.getDomElement(),t);var o=t.renderItemMap.input;return o.getDomElement().attribute("placeholder","请输入要搜索的文件名或ID"),o.onInput((function(){t.data.buttonCancelVisible=""!==o.getValue()})),t}return a(t,e),t.prototype.search=function(){var e=this.renderItemMap.input;e.getValue()&&this.searchHandler&&this.searchHandler(e.getValue()),this.isSearching=!0},t.prototype.cancel=function(){this.renderItemMap.input.setValue(""),this.cancelHandler&&this.cancelHandler(),this.data.buttonCancelVisible=!1,this.isSearching=!1},t.prototype.onSearch=function(e){this.searchHandler=e},t.prototype.onCancel=function(e){this.cancelHandler=e},t}(i.Control);n.default=l},{"../../../../UI/Common/Utils/Render":73,"../../../../UI/Control":75}],53:[function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n\n
\n
\n 步骤一\n 选择模型校准点:请依次在模型上选择2个校准点\n
\n \n
\n
\n
\n 步骤二\n 选择地图校准点:请依次在地图上选择2个校准点\n
\n \n
\n
\n
\n 步骤三\n 确认校准:请确认模型与地图校准后位置\n
\n \n
\n ',n,this),l.eventBus.on(l.WebApplicationGISEditorEvent.LayerAdjustmentShow,(function(e){t.getDomElement().show(),l.eventBus.trigger(l.WebApplicationGISEditorEvent.PropertiesHide,!0),t.currentLayerData=e,t.startStep1()})),l.eventBus.on(l.WebApplicationGISEditorEvent.LayerAdjustmentHide,(function(){t.getDomElement().hide(),l.eventBus.trigger(l.WebApplicationGISEditorEvent.PropertiesShow,t.currentLayerData)})),window.adjustment=this}return e.prototype.getDomElement=function(){return this.domElement},e.prototype.confirm=function(){this.formerTransformation=null,this.reset(),l.eventBus.trigger(l.WebApplicationGISEditorEvent.LayerAdjustmentHide),s.zoomToLayer(this.currentLayerData.id,0)},e.prototype.cancel=function(){this.reset(),l.eventBus.trigger(l.WebApplicationGISEditorEvent.LayerAdjustmentHide),s.zoomToLayer(this.currentLayerData.id,0)},e.prototype.startStep1=function(e){var t=this;void 0===e&&(e=!0),this.inited||(s.onViewerClick((function(e){s.clearSelectedComponents(t.currentLayerData.id);var n=e.worldPosition;if(n)if(1===t.data.currentStep){if(e.layerId!==t.currentLayerData.id)return;t.data.modelAdjustPoints.length>=2&&(t.data.modelAdjustPoints=[],s.clearIcon()),s.addPickIcon(n),t.data.modelAdjustPoints=a(t.data.modelAdjustPoints,[n])}else 2===t.data.currentStep&&(t.data.mapAdjustPoints.length>=2&&(t.data.mapAdjustPoints=[],s.clearIcon()),s.addPickIcon(n),t.data.mapAdjustPoints=a(t.data.mapAdjustPoints,[n]))})),this.inited=!0),this.data.currentStep=1,s.clearIcon(),s.clearDashedLine(),e?this.data.modelAdjustPoints=[]:this.data.modelAdjustPoints.forEach((function(e){s.addPickIcon(e)})),this.data.mapAdjustPoints=[],this.tempHidedLayerIds=s.hideAllModelLayer(),s.setLayerVisible(this.currentLayerData.id,!0),s.closeModelEditor()},e.prototype.startStep2=function(e){void 0===e&&(e=!0),this.data.currentStep=2,s.setLayerVisible(this.currentLayerData.id,!1),s.clearIcon(),s.clearDashedLine(),e?this.data.mapAdjustPoints=[]:this.data.mapAdjustPoints.forEach((function(e){s.addPickIcon(e)})),this.formerTransformation&&(s.setTransformation(this.currentLayerData.id,this.formerTransformation),this.formerTransformation=null)},e.prototype.startStep3=function(){this.data.currentStep=3,s.setLayerVisible(this.currentLayerData.id,!0),s.clearIcon(),s.clearDashedLine();var e=o({},this.data.mapAdjustPoints[0]);e.z=this.data.modelAdjustPoints[0].z,s.addPickIcon(e),s.addDashedLine([e,this.data.modelAdjustPoints[0]]),this.formerTransformation=s.getTransformation(this.currentLayerData.id),s.calculateAdjustTransformation(this.currentLayerData.id,this.data.modelAdjustPoints,this.data.mapAdjustPoints)},e.prototype.reset=function(){s.clearIcon(),s.clearDashedLine(),this.data.currentStep=0,this.formerTransformation&&(s.setTransformation(this.currentLayerData.id,this.formerTransformation),this.formerTransformation=null),s.setLayerVisible(this.currentLayerData.id,!1),s.openModelEditor(this.currentLayerData.id),this.tempHidedLayerIds.forEach((function(e){return s.setLayerVisible(e,!0)})),this.tempHidedLayerIds.length=0,l.eventBus.trigger("finishAdjust",null)},e.prototype.onStartStep2=function(){2===this.data.modelAdjustPoints.length&&this.startStep2()},e.prototype.onStartStep3=function(){2===this.data.mapAdjustPoints.length&&this.startStep3()},e.prototype.onReturnStep1=function(){this.startStep1(!1)},e.prototype.onReturnStep2=function(){this.startStep2(!1)},e.prototype.onLeftMaskClick=function(){var e=this;new c.default({parent:this.app.getDomElement(),className:"bfui-sceneeditor-theme-"+this.app.getConfig().theme,content:'
正在进行位置校准,确认要退出校准吗?
',confirmHandler:function(){e.cancel()}})},e}();n.default=u},{"../../../../UI/Common/Utils/Render":73,"../../../../UI/Controls/MessageBox/MessageBox":93,"../../../../UI/Dom":109,"../../libs/EventBus":62,"../../libs/viewerHelper":64}],54:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../../../UI/Control"),r=e("../../../../UI/Dom"),l=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-sceneeditor-contextmenu"},type:"ContextMenu"};return n=e.call(this,o)||this,t.forEach((function(e){var t=(new r.Dom).createElement({elementType:"div",className:"bfui-sceneeditor-contextmenu-item"});t.html(e.text),t.on("click",e.clickHandler),n.getDomElement().append(t)})),n.hide(),n}return a(t,e),t.prototype.showAt=function(e,t){var n=this;this.getDomElement().css({left:e+"px",top:t+"px"}),this.show();var o=function(){setTimeout((function(){n.hide(),document.body.removeEventListener("click",o)}),100)};return document.body.addEventListener("click",o),this},t}(i.Control);n.default=l},{"../../../../UI/Control":75,"../../../../UI/Dom":109}],55:[function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(a,i){function r(e){try{s(o.next(e))}catch(e){i(e)}}function l(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,l)}s((o=o.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,o,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(a=2&i[0]?o.return:i[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,i[1])).done)return a;switch(o=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,o=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=r.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0||l.toString()===e.toString())&&o.push({text:s,value:l,path:c}),t.children&&t.children.length>0&&a(t,c)}))};return a(n),o},selectHandler:function(e){for(var n=e.data.path,o=0,a=t.layerTree.getControl({id:"root"});n.length>o;){var i=n[o].index,r=a.getAllControls()[i];r.setExpansion(!0),a=r,o++}switch(t.scrollToNode(a),a.getOptions().type){case"GroupLayer":case"TileLayer":case"TerrainLayer":break;default:a.getSelectState()||a.getTreeName().getElement().click()}}},this.renderItemMap=l.default('\n
\n
\n \n
\n \n \n \n \n
\n
\n
\n \n
\n
\n ',this.domElement,this),this.renderItemMap.search.getSearchResultGroup().addClass("bfui-sceneeditor-search-content","bfui-sceneeditor-theme-"+this.app.getConfig().theme),this.contextMenu=new f.default([{text:"更新图层",clickHandler:function(){t.reactive.currentLayerData.id;u.eventBus.trigger(u.WebApplicationGISEditorEvent.AddResourcePanelShow,"update")}}]),this.contextMenu.hide(),this.getDomElement().append(this.contextMenu.getDomElement()),this.getDomElement().on("mousewheel",(function(){return t.contextMenu.hide()})),u.eventBus.on(u.WebApplicationGISEditorEvent.SceneAdded,(function(e){t.viewer=e;var n=d.getSceneInfo().resources,o=new s.default({});t.layerTree=o,o.addClass("bfui-tree-layer"),o.on(p.default.RightClicked,(function(e){var n=e.event,o=e.node;o.getSelectState()&&["BIMLayer","FeatureLayer","TilesetLayer"].indexOf(o.getOptions().content.typeName)>=0&&t.contextMenu.showAt(n.x,n.y)})),t.renderItemMap.layerTreeContainer.append(o.getDomElement());var a=[{id:"root",typeName:"GroupLayer",name:"全部资源",children:n}];t.initNode(o,a),t.maxGroupNo=d.getMaxGroupNo()})),u.eventBus.on(u.WebApplicationGISEditorEvent.ModelAdded,(function(e){if(t.getNode(e))t.getRootNode().updateUnloadControl({id:e});else{var n=t.getViewer().getLayerManager().getLayer(e);if(n){n.name||(n.name=n._config.name=n.model._data.name);var o=n.parent.id,a=t.getNode(o);t.initNode(a,[n._config])}}})),u.eventBus.on(u.WebApplicationGISEditorEvent.PropertiesHide,(function(e){!e&&t.reactive.currentLayerData&&(t.getNode(t.reactive.currentLayerData.id).setSelectState(!1),t.reactive.currentLayerData=null)})),u.eventBus.on(u.WebApplicationGISEditorEvent.LayerTreeNodeSelectionChanged,(function(e){e?(t.data.renameDisabled=!1,t.data.removeDisabled=["TileLayer","TerrainLayer","root"].indexOf(e.typeName)>=0):(t.data.renameDisabled=!0,t.data.removeDisabled=!0)})),u.eventBus.on(u.WebApplicationGISEditorEvent.AddResourceByViewToken,(function(e,n){e&&0!==e.length&&("update"!==n?e.forEach((function(e){return t.addModelLayer(e)})):t.updateLayer(e[0]))})),u.eventBus.on(u.WebApplicationGISEditorEvent.LayerNameChanged,(function(e){t.renameLayerSubmit(e)})),u.eventBus.on(u.WebApplicationGISEditorEvent.TileLayerSourceChanged,(function(){var e=t.getNode(d.getTileLayerId());d.isDefaultTiandituKey()?t.addNodeWarningIcon(e,"未输入天地图Key"):t.removeNodeWarningIcon(e)})),u.eventBus.on(u.WebApplicationGISEditorEvent.ModelLayerTransformed,(function(e){var n=t.getNode(e);d.getLayerBeyondDisitance(e)?t.addNodeWarningIcon(n,"资源已远离项目基点,请调整至正确的坐标系"):t.removeNodeWarningIcon(n)})),u.eventBus.on(u.WebApplicationGISEditorEvent.ModelAdded,(function(e){u.eventBus.trigger(u.WebApplicationGISEditorEvent.ModelLayerTransformed,e)}))}return e.prototype.getDomElement=function(){return this.domElement},e.prototype.getViewer=function(){return this.viewer},e.prototype.getRootNode=function(){return this.layerTree.getControl({id:"root"})},e.prototype.getNode=function(e){return"root"===e?this.getRootNode():this.getRootNode().getControl({id:e},!0)},e.prototype.initNode=function(e,t,n){var o=this;t.map((function(t){var a,i=e.getControl({id:""+t.id});i?(a=i,i.show()):(a=o.createTreeNode(e,t),e===o.layerTree?e.addTreeNode(a,{index:n}):e.addChildNode(a,{index:n}))}))},e.prototype.moveNode=function(e,t,n){this.getNode(d.getParentId(e.getId())).getSubNode().removeControl(e),t.addChildNode(e,{index:n}),d.moveLayer(e.getId(),t.getId(),n),d.updateParentPriority(e.getId())},e.prototype.updateCheckState=function(e){var t=this.getNode(d.getParentId(e));t&&(t.setParentCheckState(t),d.updateParentVisible(e))},e.prototype.selectNode=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(o){switch(o.label){case 0:return n=d.getLayerData(e.getId()),t&&"root"!==n.id?(this.reactive.currentLayerData=n,["BIMLayer","FeatureLayer","TilesetLayer"].indexOf(n.typeName)>=0?[4,d.loadLayer(n.id)]:[3,2]):[3,3];case 1:o.sent(),d.zoomToLayer(n.id,0),o.label=2;case 2:return u.eventBus.trigger(u.WebApplicationGISEditorEvent.PropertiesShow,this.getNodeData(n.id)),[3,4];case 3:"root"===n.id&&e.setSelectState(!1),this.reactive.currentLayerData=null,u.eventBus.trigger(u.WebApplicationGISEditorEvent.PropertiesHide),o.label=4;case 4:return[2]}}))}))},e.prototype.createTreeNode=function(e,t){var n,o=this,a=this.getViewer().getLayerManager(),i=t.isVisible;if(e!==this.layerTree&&(n=e.getCheckedState()),"root"!==e.getId())switch(n){case"unchecked":i=!1;break;case"checked":case void 0:i=!0;break;default:i=t.isVisible}else i=t.isVisible;var r=!0;("BIMLayer"===t.typeName||"FeatureLayer"===t.typeName||"TilesetLayer"===t.typeName)&&t.isVisible&&t.modelId&&(r=!!this.getViewer().getModel(t.modelId));var l={rootTree:this.layerTree,content:t,id:t.id,type:t.typeName,hasCheckBox:!0,hasSelection:!0,hasCollapse:["GroupLayer","root"].indexOf(t.typeName)>=0,isExpand:"root"===t.id,isChecked:i,isLoaded:r,parent:e},s={type:"svg",name:""};switch(t.typeName){case"all":case"GroupLayer":s.name="bf-folder-md";break;case"TileLayer":s.name="bf-map";break;case"TerrainLayer":s.name="bf-terrain";break;default:s.name="bf-file"}var u,h=new c.default(l);h.initTreeNode(t.name,s),t.children&&this.initNode(h,t.children),h.on("ExpendChanged",(function(e,n){n&&t.children&&o.initNode(e,t.children)})),h.on("CheckedChanged",(function(e,n){var i="root"===t.id?a.getRootLayer():a.getLayer(t.id);i&&(n?i.show():i.hide()),o.getViewer().render()})),h.on("SelectionChanged",(function(e,t){return o.selectNode(e,t)})),"root"!==t.id&&h.getTreeName().attribute("draggable",!0).on("dragstart",(function(e){var t=e.target;return e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text",t.innerHTML),e.dataTransfer.setDragImage(t,0,0),o.dragNode=h,!0})).on("dragend",(function(e){return e.dataTransfer.clearData("text"),o.dragNode=null,!1})).on("dragover",(function(e){if(e.preventDefault(),h===o.dragNode)return!0;h.getTreeName().removeClass("bfui-sceneeditor-drag-enter","bfui-sceneeditor-drag-insertup","bfui-sceneeditor-drag-insertdown");var n=h.getTreeName().getPosition(),a="bfui-sceneeditor-drag-enter";return u="enter","GroupLayer"===t.typeName?e.clientY-n.top<5?(a="bfui-sceneeditor-drag-insertup",u="insertup"):n.bottom-e.clientY<5&&(a="bfui-sceneeditor-drag-insertdown",u="insertdown"):e.clientY-n.top<(n.bottom-n.top)/2?(a="bfui-sceneeditor-drag-insertup",u="insertup"):(a="bfui-sceneeditor-drag-insertdown",u="insertdown"),h.getTreeName().addClass(a),!0})).on("dragleave",(function(e){return e.preventDefault(),h===o.dragNode||h.getTreeName().removeClass("bfui-sceneeditor-drag-enter","bfui-sceneeditor-drag-insertup","bfui-sceneeditor-drag-insertdown"),!0})).on("dragend",(function(e){return e.preventDefault(),!0})).on("drop",(function(e){if(e.preventDefault(),h===o.dragNode)return!0;h.getTreeName().removeClass("bfui-sceneeditor-drag-enter","bfui-sceneeditor-drag-insertup","bfui-sceneeditor-drag-insertdown");var t=h,n=0,a=d.getParentId(o.dragNode.getId());if("enter"!==u){t=o.getNode(d.getParentId(h.getId()));var i=d.getLayerData(t.getId()),r=d.getLayerData(h.getId());i.children&&(n=i.children.indexOf(r)),"insertdown"===u&&n++}o.moveNode(o.dragNode,t,n),o.updateCheckState(o.dragNode.getId());var l=d.getLayerData(a);return l.children&&l.children.length>0&&o.updateCheckState(l.children[0].id),t.setExpansion(!0),!0}));var p=d.getTileLayerId();return t.id===p&&d.isDefaultTiandituKey()&&this.addNodeWarningIcon(h,"未输入天地图Key"),Number.isNaN(t.priority)&&d.setPriority(t.id,0),h},e.prototype.initLayer=function(e,t){if(this.reactive.currentLayerData&&"root"!==this.reactive.currentLayerData.id){var n=void 0,o=void 0,a=0,i=void 0;o=v(this.reactive.currentLayerData)?this.reactive.currentLayerData.id:d.getParentId(this.reactive.currentLayerData.id),i=this.getNode(o),n=d.getLayerData(o),!v(this.reactive.currentLayerData)&&n.children&&(a=n.children.indexOf(this.reactive.currentLayerData)),n.children&&(n.priority&&(e.priority=n.priority),e.isNewFolder&&v(this.reactive.currentLayerData)?(n.children.unshift(e),d.moveLayer(e.id,o,0)):(n.children.splice(a,0,e),d.moveLayer(e.id,o,a)),d.addLayer(e,o,t),this.initNode(i,[e],a),this.getNode(e.id).setCheckState(!0),this.updateCheckState(e.id)),i.setExpansion(!0)}else{var r=this.getRootNode();this.initNode(r,[e],0),this.getNode(e.id).setCheckState(!0),this.updateCheckState(e.id),d.addLayer(e,void 0,t),d.addLayerData(e,0)}},e.prototype.onAddLayer=function(){u.eventBus.trigger(u.WebApplicationGISEditorEvent.AddResourcePanelShow)},e.prototype.onAddGroupLayer=function(){this.maxGroupNo+=1;var e={name:"新建文件夹",id:"group_"+this.maxGroupNo,typeName:"GroupLayer",isVisible:!0,priority:0,children:[]};this.initLayer(e);var t=this.getNode(e.id);this.selectNode(t,!0),u.eventBus.trigger(u.WebApplicationGISEditorEvent.PropertiesHide,!0),this.renameLayer(!0),t.setExpansion(!0)},e.prototype.addModelLayer=function(e){var t="BIMLayer";e.name&&e.name.indexOf(".")>=0&&(t=function(e){return["rvt","max"].indexOf(e)>=0?"BIMLayer":["shpzip"].indexOf(e)>=0?"FeatureLayer":["osgbzip","las","laszip"].indexOf(e)>=0?"TilesetLayer":"BIMLayer"}(e.name.slice(e.name.lastIndexOf(".")+1)));var n=e.name.indexOf(".")>=0?e.name.slice(0,e.name.lastIndexOf(".")):e.name,o=d.getRealLayerInfo(e.id,n),a=o.layerId,i=o.customId,r={typeName:t,isVisible:!0,id:a,name:o.name,fileName:e.name,modelId:e.id,viewToken:e.viewToken,layerVersion:"1",priority:3,style:{color:null,opacity:1,wireframe:!1,enableVisualRange:!1},shadow:{receiveShadow:!1,castShadow:!1},coordSys:"",region:"",transformation:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],modelType:e.modelType,config:null,boundingBox:null};i&&(r.customId=i),this.initLayer(r,(function(){var e,t,n,o;r.config=d.getLayerConfigById(r.id);var a=null===(t=null===(e=r.config)||void 0===e?void 0:e.coordinateSystem)||void 0===t?void 0:t.geogCS,i=(null==a?void 0:a.epsg)||(null==a?void 0:a.EPSG);i&&((c=h.coordSysOptions.filter((function(e){var t;return(null===(t=e.epsg)||void 0===t?void 0:t.toString())===i.toString()}))[0])&&(r.coordSys=c.value));var l=null===(o=null===(n=r.config)||void 0===n?void 0:n.coordinateSystem)||void 0===o?void 0:o.projCS,s=(null==l?void 0:l.epsg)||(null==l?void 0:l.EPSG);if(r.coordSys)if(null==l?void 0:l.centralMeridian)r.region="Custom_"+(l.name||"自定义");else if(s){var c;(c=("CGCS2000"===r.coordSys?h.regionSysOptionsCGCS2000:h.regionSysOptionsWGS84).filter((function(e){return e.value==="EPSG:"+s}))[0])&&(r.region="EPSG:"+s)}r.boundingBox=d.getLayerBoundingBox(r.id)}))},e.prototype.updateLayer=function(e){var t;if(this.reactive.currentLayerData){var n=this.reactive.currentLayerData,o=d.getRealLayerInfo(e.id,e.name).customId,a={fileName:e.name,modelId:e.id,layerVersion:(null===(t=n.layerVersion)||void 0===t?void 0:t.toString()).includes("*")?n.layerVersion:Number(n.layerVersion)+1+"*",modelType:e.modelType,transformation:n.transformation,viewToken:e.viewToken};for(var i in o&&(a.customId=o),delete n.databagId,a){var r=a[i];n[i]=r}var l=n.id;u.eventBus.trigger(u.WebApplicationGISEditorEvent.PropertiesHide),d.updateLayer(l,n,(function(){n.config=d.getLayerConfigById(l,!0),n.boundingBox=d.getLayerBoundingBox(l)}))}},e.prototype.onRenameLayer=function(){this.data.renameDisabled||this.renameLayer()},e.prototype.renameLayer=function(e){var t=this;if(this.reactive.currentLayerData&&!this.currentRename){var n=this.getNode(this.reactive.currentLayerData.id);if(n){n.getTreeName().hide();var o=this.renderInputRename(n.getTreeInfoDom());this.currentRename=o.element,o.input.setValue(d.getLayerName(this.reactive.currentLayerData.id)),o.input.getDomElement().getElement().select();var a=!1,i=function(){if(!a){var e=o.input.getValue()||t.getNodeData(n).name;t.renameLayerSubmit(e,n),a=!0}};o.buttonConfirm.on("mousedown",i),o.buttonCancel.on("mousedown",(function(){t.closeRenameLayer(n),e&&t.removeLayer()})),o.input.getDomElement().on("blur",(function(){requestAnimationFrame((function(){t.reactive.currentLayerData&&t.currentRename&&!a&&i()}))})),o.input.getDomElement().on("keydown",(function(e){"Enter"===e.key&&i()}))}}},e.prototype.renameLayerSubmit=function(e,t){var n=t||this.getNode(this.reactive.currentLayerData.id);if(n){var o=n.getTreeName().html(),a=//.exec(o)[0]+e;n.getTreeName().html(a),this.getNodeData(n).name=e,this.closeRenameLayer(n),d.setLayerName(n.getId(),e),u.eventBus.trigger(u.WebApplicationGISEditorEvent.PropertiesShow,this.reactive.currentLayerData)}},e.prototype.closeRenameLayer=function(e){if(this.reactive.currentLayerData&&this.currentRename){var t=e||this.getNode(this.reactive.currentLayerData.id);t&&(t.getTreeName().show(),t.getTreeInfoDom().remove(this.currentRename),this.currentRename=null)}},e.prototype.onRemoveLayer=function(){var e=this;this.data.removeDisabled||new m.default({parent:this.app.getDomElement(),className:"bfui-sceneeditor-theme-"+this.app.getConfig().theme,content:'
确认要删除所选资源吗?
',confirmHandler:function(){return e.removeLayer()}})},e.prototype.removeLayer=function(){var e=this,t=this.getNode(this.reactive.currentLayerData.id);if(t){var n=function(e){var t=!1;return e&&"GroupLayer"===e.typeName&&e.children.some((function(e){return["TileLayer","TerrainLayer"].indexOf(e.typeName)>=0?(t=!0,!0):(t=n(e),!1)})),t},o=function(t){var n=d.getParentId(t.getId());e.getNode(n).getSubNode().removeControl(t),d.removeLayer(t.getId()),e.reactive.currentLayerData=null,u.eventBus.trigger(u.WebApplicationGISEditorEvent.PropertiesHide)};if("GroupLayer"===this.reactive.currentLayerData.typeName){var a=function(e){var t=d.getLayerData(e.getId());"GroupLayer"===t.typeName&&n(t)?e.getAllControls().forEach((function(e){var t=d.getLayerData(e.getId());"GroupLayer"===t.typeName?n(t)?a(e):o(e):["TileLayer","TerrainLayer"].indexOf(t.typeName)<0&&o(e)})):o(e)};a(t)}else o(t)}},e.prototype.getNodeData=function(e){var t;return"root"===(t=e instanceof c.default?e:this.getNode(e)).getId()?{}:d.getLayerData(t.getId())},e.prototype.renderInputRename=function(e){return l.default('\n
\n \n \n \n
\n ',e)},e.prototype.scrollToNode=function(e){var t=this.layerTree.getDomElement().getElement();if(t&&t.scrollBy){var n=e.getTreeName().getPosition(),o=n.top,a=n.bottom,i=a-o,r=t.getBoundingClientRect().top,l=t.clientHeight;if(or+l){var s=o-r-2*i;t.scrollBy({top:s,behavior:"smooth"})}}},e.prototype.addNodeWarningIcon=function(e,t){this.removeNodeWarningIcon(e);var n=(new r.Dom).createElement({elementType:"i",className:"bfui-sceneeditor-icon-warning bf-warning-md"});t&&n.attribute("title",t),e.getTreeName().append(n)},e.prototype.removeNodeWarningIcon=function(e){var t=e.getTreeName().getElement().querySelector(".bfui-sceneeditor-icon-warning");t&&e.getTreeName().getElement().removeChild(t)},e}();n.default=g},{"../../../../UI/Common/Utils/Render":73,"../../../../UI/Controls/MessageBox/MessageBox":93,"../../../../UI/Controls/Tree/Tree":107,"../../../../UI/Controls/Tree/TreeNode":108,"../../../../UI/Dom":109,"../../../../UI/UIEvents":111,"../../libs/EventBus":62,"../../libs/options":63,"../../libs/viewerHelper":64,"./ContextMenu":54}],56:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("../../../../UI/Dom"),a=e("../../../../UI/Common/Utils/Render"),i=e("../../libs/EventBus"),r=e("../../../../UI/UIMap"),l=e("../../libs/options"),s=e("../../libs/viewerHelper"),c=e("../../../../UI/Controls/Tooltip/Tooltip"),u=function(){function e(e){var t=this;this.app=e,this.domElement=(new o.Dom).createElement({elementType:"div"}).css("height","100%"),this.data={currentLayerData:null,isModelLayer:!1,isBIMLayer:!1,isFeatureLayer:!1,isTilesetLayer:!1,isTileLayer:!1,isTerrainLayer:!1,isGroupLayer:!1,isTiandituKeyVisible:!1,isTiandituKeyIconVisible:!1,featureType:""},this.renderItemMap=a.default('\n
\n \n \n
\n
\n
\n 基本信息\n
\n
\n
\n \n \n
\n
\n \n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n 显示样式\n
\n
\n
\n \n
\n \n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n 资源\n
\n
\n
\n \n \n
\n
\n \n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n 位置\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n \n
\n \n \n \n
\n
\n
\n \n
\n
\n ',this.domElement,this),this.renderItemMap.buttonClose.on("click",(function(){return i.eventBus.trigger(i.WebApplicationGISEditorEvent.PropertiesHide)})),this.renderItemMap.inputFileName.enabled(!1),this.renderItemMap.inputTypeName.enabled(!1),this.renderItemMap.inputLayerId.enabled(!1),this.renderItemMap.inputModelId.enabled(!1),this.renderItemMap.inputVersion.enabled(!1),this.renderItemMap.inputFeatureType.enabled(!1),this.renderItemMap.inputMapCoordSys.enabled(!1);var n=this.renderItemMap.inputLayerName;n.onChange((function(e){t.data.currentLayerData.name=e,n.setTooltip(e),i.eventBus.trigger(i.WebApplicationGISEditorEvent.LayerNameChanged,e)}));var r=this.renderItemMap.selectPriority;r.setValues(l.priorityOptions),this.setSelectTheme(r),r.onChange((function(e){return t.initing?t.data.currentLayerData.priority=e.value:s.setPriority(t.data.currentLayerData.id,e.value)}));var u=this.renderItemMap.sliderOpacity;u.setEnableTooltip(!0),u.setTooltipFormater((function(e){return e+"%"})),u.onChange((function(e){var n=t.data.currentLayerData.style.opacity=e/100;s.setLayerOpacity(t.data.currentLayerData.id,n)}));var d=this.renderItemMap.selectBorder;d.setValues(l.booleanOptions),this.setSelectTheme(d),d.onChange((function(e){s.setLayerBorderLineVisible(t.data.currentLayerData.id,e.value),t.data.currentLayerData.style.wireframe=e.value}));var h=this.renderItemMap.selectReceiveShadow;h.setValues(l.booleanOptions),this.setSelectTheme(h),h.onChange((function(e){s.setLayerReceiveShadow(t.data.currentLayerData.id,e.value),t.data.currentLayerData.shadow.receiveShadow=e.value}));var p=this.renderItemMap.selectCastShadow;p.setValues(l.booleanOptions),this.setSelectTheme(p),p.onChange((function(e){s.setLayerCastShadow(t.data.currentLayerData.id,e.value),t.data.currentLayerData.shadow.castShadow=e.value}));var f=this.renderItemMap.inputTiandituKey,m=function(e){var n=e||l.defaultTiandituKey;t.data.currentLayerData.url=t.data.currentLayerData.url.split("&tk=")[0]+"&tk="+n,i.eventBus.trigger(i.WebApplicationGISEditorEvent.TileLayerSourceChanged),t.data.isTiandituKeyIconVisible=s.isDefaultTiandituKey()};f.onChange(m);var v=this.renderItemMap.iconTianditu,g=(new c.default({hostDom:v,width:300,content:'\n 请输入在\n http://lbs.tianditu.gov.cn/server/ MapService.html\n 申请的天地图Key,否则仅可在bimface域名下成功发起天地图资源调用。\n '}),this.renderItemMap.selectMapSource),y=this.renderItemMap.selectMaxLevel;g.setValues(l.mapSourceOptions),this.setSelectTheme(g),this.setSelectTheme(y),g.onChange((function(e){var n=l.mapSourceOptionMap[e.value],o=n.url,a=n.credit,r=n.defaultLevel,c=n.maxLevel,u=n.coordSys;t.data.currentLayerData.url=o,s.setMapSource({url:o,credit:a}),t.setItemValue("inputMapCoordSys",u),t.setMapMaxLevelOptions(c),s.setMapMaxLevel(r),t.data.currentLayerData.maxLevel=r,t.initTiandituKey(),t.data.isTiandituKeyVisible&&m(f.getValue()),i.eventBus.trigger(i.WebApplicationGISEditorEvent.TileLayerSourceChanged)})),y.onChange((function(e){if(e){var n=e.value;s.setMapMaxLevel(n),t.data.currentLayerData.maxLevel=n}}));var b=this.renderItemMap.selectCoordSys;b.setValues(l.coordSysOptions),this.setSelectTheme(b),b.onChange((function(e){if(!t.initing){var n=e.value;t.data.currentLayerData.coordSys=n,t.data.currentLayerData.region="",t.setRegionOptions(n),t.setTransformParams(),b.setTooltip(n)}}));var _=this.renderItemMap.selectRegion;this.setSelectTheme(_),_.onChange((function(e){t.initing||(t.data.currentLayerData.region=e?e.value:"",e&&(s.convertCoordSys(t.data.currentLayerData.id,e.value),t.setTransformParams(),_.setTooltip(e.value)))}));var C=this.renderItemMap.inputLongitude,M=this.renderItemMap.inputLatitude,w=function(){var e=Number(C.getValue()),n=Number(M.getValue());s.setLayerLatLon(t.data.currentLayerData.id,n,e)};C.onChange(w),M.onChange(w),this.renderItemMap.inputAltitude.onChange((function(e){s.setLayerAltitude(t.data.currentLayerData.id,e)}));var S=this.renderItemMap.inputRotation,E=this.renderItemMap.sliderRotation;E.setValueRange(0,360),S.onChange((function(e){var n=Number(e);(isNaN(n)||n>360||n<0)&&(n=0),t.setSliderRotationValue(n),s.setLayerRotateAngle(t.data.currentLayerData.id,n)})),E.onChange((function(e){S.setValue(e),s.setLayerRotateAngle(t.data.currentLayerData.id,e)})),this.renderItemMap.colorPicker.onChange((function(e){t.data.currentLayerData.style.color=e,s.setLayerColor(t.data.currentLayerData.id,e,t.data.currentLayerData.style.opacity)}));var L=this.renderItemMap.selectVisualRange;L.setValues(l.booleanOptions),this.setSelectTheme(L),L.onChange((function(e){t.data.currentLayerData.style.enableVisualRange=e.value,t.setVisualRange()})),this.renderItemMap.inputVisualMax.enabled(!1),this.renderItemMap.inputVisualMax.setPlaceholder("请输入最大距离"),this.renderItemMap.inputVisualMin.enabled(!1),this.renderItemMap.inputVisualMin.setPlaceholder("请输入最小距离");var I=this.renderItemMap.inputVisualMax;I.enabled(!1),I.setPlaceholder("请输入最大距离"),I.onChange((function(e){if(""!==e&&!isNaN(e)&&Number(e)>0){var n=Number(Number(e).toFixed(3));t.data.currentLayerData.style.visualRange.max=n,I.setValue(n),s.setLayerVisualRange(t.data.currentLayerData.id,t.data.currentLayerData.style.visualRange)}else I.setValue(t.data.currentLayerData.style.visualRange.max)}));var T=this.renderItemMap.inputVisualMin;T.enabled(!1),T.setPlaceholder("请输入最小距离"),T.onChange((function(e){if(""!==e&&!isNaN(e)&&Number(e)>=0){var n=Number(Number(e).toFixed(3));t.data.currentLayerData.style.visualRange.min=n,T.setValue(n),s.setLayerVisualRange(t.data.currentLayerData.id,t.data.currentLayerData.style.visualRange)}else T.setValue(t.data.currentLayerData.style.visualRange.min)})),i.eventBus.on(i.WebApplicationGISEditorEvent.PropertiesShow,(function(e){t.setProperties(e)}))}return e.prototype.getDomElement=function(){return this.domElement},e.prototype.setProperties=function(e){var t=this;if(this.initing=!0,e.style||(e.style={color:null,opacity:1,wireframe:!1}),e.shadow||(e.shadow={receiveShadow:!1,castShadow:!1}),e.shadow.castShadow=!0===e.shadow.castShadow,e.shadow.receiveShadow=!0===e.shadow.receiveShadow,this.data.currentLayerData=e,["GroupLayer","BIMLayer","TilesetLayer","FeatureLayer","TileLayer","TerrainLayer"].forEach((function(n){t.data["is"+n]=e.typeName===n})),this.data.isModelLayer=["BIMLayer","TilesetLayer","FeatureLayer"].indexOf(e.typeName)>=0,this.data.featureType="",this.setItemValue("inputFileName",e.fileName),this.setItemValue("inputLayerName",e.name),this.setItemValue("inputTypeName",e.typeName),this.setItemValue("inputLayerId",e.id),this.setItemValue("inputModelId",e.modelId),this.setItemValue("inputVersion",e.layerVersion),this.setItemValue("selectPriority",e.priority),this.data.isFeatureLayer&&(this.data.featureType=s.getFeatureType(e.id),this.setItemValue("inputFeatureType",this.data.featureType),this.setItemValue("colorPicker",e.style.color||null)),this.data.isGroupLayer||(this.setItemValue("sliderOpacity",100*e.style.opacity),!this.data.isTerrainLayer&&this.setItemValue("selectReceiveShadow",e.shadow.receiveShadow),!this.data.isTileLayer&&this.setItemValue("selectCastShadow",e.shadow.castShadow)),this.data.isTiandituKeyVisible=!1,this.data.isTileLayer&&(this.initTiandituKey(),this.setMapSource()),this.data.isModelLayer){if(this.setItemValue("selectBorder",e.style.wireframe),this.setItemValue("selectCoordSys",e.coordSys),this.setRegionOptions(e.coordSys),e.region.indexOf("Custom_")>=0){s.defineCustomCoordSys(e.id,e.region);var n=this.renderItemMap.selectRegion,o=e.region.split("Custom_")[1];n.setText(o),n.setTooltip(o)}else this.setItemValue("selectRegion",e.region);this.setTransformParams(),s.onModelEditorChanged((function(){return t.setTransformParams()})),void 0===e.style.enableVisualRange&&(e.style.enableVisualRange=!1),this.setItemValue("selectVisualRange",e.style.enableVisualRange),this.setVisualRange()}this.initing=!1},e.prototype.setItemValue=function(e,t){if(void 0!==t){var n=this.renderItemMap[e];n instanceof r.Select?n.setSelectedByValue(t):n.setValue(t),["inputLayerName","selectCoordSys","selectRegion"].indexOf(e)>=0&&n.setTooltip(t)}},e.prototype.setRegionOptions=function(e){var t=this.renderItemMap.selectRegion;switch(t.setDisabled(!1).clearSelection("无"),this.setItemValue("selectRegion",""),e){case"CGCS2000":t.setValues(l.regionSysOptionsCGCS2000);break;case"WGS84":t.setValues(l.regionSysOptionsWGS84);break;default:this.initing||s.resetCoordSys(this.data.currentLayerData.id),t.setDisabled(!0)}},e.prototype.setSliderRotationValue=function(e){this.renderItemMap.sliderRotation.setValue(Number(e))},e.prototype.setTransformParams=function(){var e=s.getTransformParams(this.data.currentLayerData.id);this.renderItemMap.inputLongitude.setValue(e.longitude),this.renderItemMap.inputLatitude.setValue(e.latitude),this.renderItemMap.inputAltitude.setValue(e.altitude),this.renderItemMap.inputRotation.setValue(e.rotateAngle),this.setSliderRotationValue(e.rotateAngle),this.data.currentLayerData.transformation=e.transformation,i.eventBus.trigger(i.WebApplicationGISEditorEvent.ModelLayerTransformed,this.data.currentLayerData.id)},e.prototype.setMapMaxLevelOptions=function(e){for(var t=this.renderItemMap.selectMaxLevel,n=[],o=1;o<=e;o++)n.push({text:o,value:o});t.setValues(n)},e.prototype.setMapSource=function(){var e;for(var t in l.mapSourceOptionMap){var n=l.mapSourceOptionMap[t];if(n.url.includes("tianditu")){if(n.url.split("&tk=")[0]===this.data.currentLayerData.url.split("&tk=")[0]){e=n;break}}else if(n.url===this.data.currentLayerData.url){e=n;break}}var o=e.name,a=e.maxLevel,i=e.coordSys,r=l.mapSourceOptions.filter((function(e){return e.text===o}))[0].value;this.setItemValue("selectMapSource",r),this.setMapMaxLevelOptions(a);var s=Number(this.data.currentLayerData.maxLevel);this.setItemValue("selectMaxLevel",s),this.setItemValue("inputMapCoordSys",i)},e.prototype.setSelectTheme=function(e){e.content.addClass("bfui-sceneeditor-theme-"+this.app.getConfig().theme),e.setMaxHeight(280)},e.prototype.showLayerAdjustment=function(){i.eventBus.trigger(i.WebApplicationGISEditorEvent.LayerAdjustmentShow,this.data.currentLayerData)},e.prototype.hideLayerAdjustment=function(){i.eventBus.trigger(i.WebApplicationGISEditorEvent.LayerAdjustmentHide)},e.prototype.initTiandituKey=function(){var e=this.data.currentLayerData.url;if(e.includes("tianditu")){this.data.isTiandituKeyVisible=!0;var t=e.split("&tk=")[1];t!==l.defaultTiandituKey&&this.setItemValue("inputTiandituKey",t),this.data.isTiandituKeyIconVisible=s.isDefaultTiandituKey()}else this.data.isTiandituKeyVisible=!1},e.prototype.setVisualRange=function(){var e=this.data.currentLayerData.style;if(e.enableVisualRange&&!e.visualRange){var t=Number(s.getLayerGeoErrDistance(this.data.currentLayerData.id)).toFixed(3);e.visualRange={min:0,max:Number(t)}}this.renderItemMap.inputVisualMax.enabled(e.enableVisualRange),this.renderItemMap.inputVisualMin.enabled(e.enableVisualRange),e.enableVisualRange?(this.setItemValue("inputVisualMax",this.data.currentLayerData.style.visualRange.max),this.setItemValue("inputVisualMin",this.data.currentLayerData.style.visualRange.min),s.setLayerVisualRange(this.data.currentLayerData.id,this.data.currentLayerData.style.visualRange)):(this.setItemValue("inputVisualMax",""),this.setItemValue("inputVisualMin",""),delete e.visualRange,s.setLayerVisualRange(this.data.currentLayerData.id))},e}();n.default=u},{"../../../../UI/Common/Utils/Render":73,"../../../../UI/Controls/Tooltip/Tooltip":106,"../../../../UI/Dom":109,"../../../../UI/UIMap":112,"../../libs/EventBus":62,"../../libs/options":63,"../../libs/viewerHelper":64}],57:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("../../../../UI/Dom"),a=e("../../../../UI/Controls/Tabs/Tabs"),i=e("../SceneInfo/SceneInfo"),r=e("../LayerManage/LayerManage"),l=function(){function e(e){this.domElement=(new o.Dom).createElement({elementType:"div",className:"bfui-sceneeditor-leftside"});var t=new i.default,n=this.layerManage=new r.default(e),l=new a.default({parent:this.domElement,options:[{content:t.getDomElement(),label:"场景信息",name:"sceneInfo"},{content:n.getDomElement(),label:"图层管理",name:"layerManage"}]}),s=(new o.Dom).createElement({elementType:"i",className:"bfui-sceneeditor-icon bf-confirm-md icon-help"});s.attribute("title","如何使用场景设置?"),s.on("click",(function(){return window.open("https://bimface.com/docs/model-viewer/v1/developers-guide/create-scene.html","__blank")})),this.domElement.append(s),requestAnimationFrame((function(){l.setActive(0)}))}return e.prototype.getDomElement=function(){return this.domElement},e.prototype.getLayerManage=function(){return this.layerManage},e}();n.default=l},{"../../../../UI/Controls/Tabs/Tabs":105,"../../../../UI/Dom":109,"../LayerManage/LayerManage":55,"../SceneInfo/SceneInfo":58}],58:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("../../../../UI/Dom"),a=e("../../../../UI/Common/Utils/Render"),i=e("../../libs/viewerHelper"),r=e("../../libs/EventBus"),l=function(){function e(){var e=this;this.domElement=(new o.Dom).createElement({elementType:"div",className:"bfui-sceneeditor-sceneinfo"}),this.renderItemMap=a.default('\n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n \n
\n
\n \n \n
\n ',this.domElement);var t=i.getSceneInfo();t?this.init(t):r.eventBus.on(r.WebApplicationGISEditorEvent.SceneAdded,(function(){e.init(i.getSceneInfo())}))}return e.prototype.init=function(e){var t=this.renderItemMap.inputSceneName;t.setValue(e.name),t.setTooltip(e.name),t.onInput((function(){var n=t.getValue();n.length<=32?(e.name=n,t.setTooltip(e.name)):t.setValue(e.name)})),this.renderItemMap.labelLon.html(e.baseLatLon.lon+" °"),this.renderItemMap.labelLat.html(e.baseLatLon.lat+" °"),this.renderItemMap.labelAlt.html(i.getBaseHeight(e.baseLatLon).z+" m"),this.renderItemMap.buttonSetCameraStatus.onClick((function(){i.setHomeView()})),this.renderItemMap.buttonGotoCameraStatus.onClick((function(){i.gotoHomeView()}))},e.prototype.getDomElement=function(){return this.domElement},e}();n.default=l},{"../../../../UI/Common/Utils/Render":73,"../../../../UI/Dom":109,"../../libs/EventBus":62,"../../libs/viewerHelper":64}],59:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../WebApplication"),r=e("../../Common/Glodon"),l=e("../../UI/Common/Utils/Render"),s=e("./Components/LeftSide/LeftSide"),c=e("./Components/LayerProperties/LayerProperties"),u=e("./Components/AddResource/AddResource"),d=e("./Components/LayerAdjustment/LayerAdjustment"),h=e("./libs/EventBus"),p=e("./libs/viewerHelper");e("./style/iconfont/iconfontSvg");var f=function(e){function t(t){var n=e.call(this,t)||this;return n.initUI(t),n}return a(t,e),t.prototype.initUI=function(e){var t=this._config,n=l.default('\n
\n
\n
\n
\n
\n
\n ',this.getDomElement());e.theme||(e.theme="default"),this.getDomElement().addClass("bfui-sceneeditor-theme-"+e.theme),this.viewerElement=n.viewer.getElement(),this.addScene(t.viewToken),h.eventBus.reset(),h.eventBus.on(h.WebApplicationGISEditorEvent.PropertiesShow,(function(e){n.properties.removeClass("hide"),p.openModelEditor(e.id),e})),h.eventBus.on(h.WebApplicationGISEditorEvent.PropertiesHide,(function(){n.properties.addClass("hide"),p.closeModelEditor()}));var o=new s.default(this);n.left.append(o.getDomElement());var a=new c.default(this);n.properties.append(a.getDomElement());var i=new u.default(this);n.container.append(i.getDomElement());var r=new d.default(this);n.container.append(r.getDomElement()),r.getDomElement().hide()},t.prototype.getViewer=function(){var e=this;if(!this._viewer){var t=new r.default.Bimface.Viewer.ViewerGISConfig;for(var n in t.enableStorage=!1,this._config)t[n]=this._config[n];t.domElement=this.viewerElement,this._viewer=new r.default.Bimface.Viewer.ViewerGIS(t),p.registerViewer(this._viewer,r.default),this._viewer.addEventListener(r.default.Bimface.Viewer.ViewerGISEvent.ModelRemoved,(function(e){h.eventBus.trigger(h.WebApplicationGISEditorEvent.ModelRemoved,e)})),this._viewer.addEventListener(r.default.Bimface.Viewer.ViewerGISEvent.ModelAdded,(function(e){h.eventBus.trigger(h.WebApplicationGISEditorEvent.ModelAdded,e)})),this._viewer.addEventListener(r.default.Bimface.Viewer.ViewerGISEvent.SceneAdded,(function(){h.eventBus.trigger(h.WebApplicationGISEditorEvent.SceneAdded,e._viewer),requestAnimationFrame((function(){return p.initTiandituMap()}))}))}return this._viewer},t.prototype.addScene=function(e){this.getViewer().addScene(e)},t.prototype.getPublishData=function(){var e=p.getSceneInfo(),t=p.getLayerConfigsObject(),n=function(e){e.children&&e.children.forEach((function(e){delete e.parent,e.databagId&&delete e.viewToken,delete e.layerVersion,["BIMLayer","FeatureLayer","TilesetLayer"].indexOf(e.typeName)>=0&&(e.config=p.getLayerConfigById(e.id,!0),e.boundingBox=p.getBoundingBoxById(e.id),e.modelType||(e.modelType=p.getModelType(e.id))),"GroupLayer"===e.typeName&&n(e)}))};n(t),e.resources=t.children;var o=e.id,a=e.name,i=e.baseLatLon,r=e.homeView;return{id:o,name:a,renderingSettings:{},sceneJson:JSON.stringify(e),sceneSetting:{baseLatLon:i,homeView:r}}},t.prototype.getConfig=function(){return this._config},t.prototype.destroy=function(){h.eventBus.reset(),p.unregisterViewer(),e.prototype.destroy.call(this)},t}(i.WebApplication);n.default=f},{"../../Common/Glodon":66,"../../UI/Common/Utils/Render":73,"../WebApplication":46,"./Components/AddResource/AddResource":50,"./Components/LayerAdjustment/LayerAdjustment":53,"./Components/LayerProperties/LayerProperties":56,"./Components/LeftSide/LeftSide":57,"./libs/EventBus":62,"./libs/viewerHelper":64,"./style/iconfont/iconfontSvg":65}],60:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WebApplicationGISEditorConfig=void 0;var o=function(e){var t={type:"WebApplicationGISEditor",enableUIAnimation:!0,theme:"default",getResourceListHandler:null,getViewTokenHandler:null};return e&&(t.domElement=e),t};n.WebApplicationGISEditorConfig=o},{}],61:[function(e,t,n){"use strict";var o;Object.defineProperty(n,"__esModule",{value:!0}),function(e){e.Loaded="Loaded",e.ViewChanged="ViewChanged",e.ModelAdded="ModelAdded",e.ModelRemoved="ModelRemoved",e.LayerTreeNodeClicked="LayerTreeNodeClicked",e.SceneAdded="SceneAdded",e.PropertiesShow="PropertiesShow",e.PropertiesHide="PropertiesHide",e.LayerTreeNodeSelectionChanged="LayerTreeNodeSelectionChanged",e.AddResourceByViewToken="AddResourceByViewToken",e.AddResourcePanelShow="AddResourcePanelShow",e.UpdateResourcePanelShow="UpdateResourcePanelShow",e.LayerNameChanged="LayerNameChanged",e.LayerAdjustmentShow="LayerAdjustmentShow",e.LayerAdjustmentHide="LayerAdjustmentHide",e.TileLayerSourceChanged="TileLayerSourceChanged",e.ModelLayerTransformed="ModelLayerTransformed"}(o||(o={})),n.default=o},{}],62:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WebApplicationGISEditorEvent=n.EventEmmiter=n.eventBus=void 0;var o=e("../../../Event/EventEmmiter");n.EventEmmiter=o.default;var a=e("../WebApplicationGISEditorEvent");n.WebApplicationGISEditorEvent=a.default;var i=new o.default;n.eventBus=i},{"../../../Event/EventEmmiter":71,"../WebApplicationGISEditorEvent":61}],63:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.booleanOptions=n.defaultTiandituKey=n.regionSysOptionsWGS84=n.regionSysOptionsCGCS2000=n.coordSysOptions=n.mapSourceOptionMap=n.mapSourceOptions=n.priorityOptions=void 0;n.priorityOptions=[{text:"高",value:1},{text:"较高",value:2},{text:"中",value:3},{text:"较低",value:4},{text:"低",value:5},{text:"-",value:0,visible:!1}];n.mapSourceOptions=[{text:"天地图全球影像地图",value:"tiandituImg"},{text:"天地图全球道路地图",value:"tiandituRoad"},{text:"OSM全球道路地图",value:"osm"},{text:"高德全球影像地图",value:"amapImg"},{text:"高德全球道路地图",value:"amapRoad"},{text:"ArcGIS全球道路地图",value:"arcgis"},{text:"BingMap全球影像地图",value:"bingMap"}];n.defaultTiandituKey="9fe0f60cd462f38c726d9a12565e4524";var o={tiandituImg:{name:"天地图全球影像地图",url:"https://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={x}&TILECOL={y}&tk=9fe0f60cd462f38c726d9a12565e4524",credit:"Tianditu",coordSys:"CGCS-2000",defaultLevel:18,maxLevel:18},tiandituRoad:{name:"天地图全球道路地图",url:"https://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={x}&TILECOL={y}&tk=9fe0f60cd462f38c726d9a12565e4524",credit:"Tianditu",coordSys:"CGCS-2000",defaultLevel:18,maxLevel:18},osm:{name:"OSM全球道路地图",url:"https://c.tile.openstreetmap.org/{z}/{x}/{y}.png",credit:"OSM",coordSys:"WGS84",defaultLevel:18,maxLevel:18},amapImg:{name:"高德全球影像地图",url:"https://webst01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=6&x={x}&y={y}&z={z}",credit:"Amap",coordSys:"GCJ-02",defaultLevel:18,maxLevel:19},amapRoad:{name:"高德全球道路地图",url:"https://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",credit:"Amap",coordSys:"GCJ-02",defaultLevel:18,maxLevel:19},arcgis:{name:"ArcGIS全球道路地图",url:"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",credit:"ArcGIS",coordSys:"GCJ-02",defaultLevel:18,maxLevel:19},bingMap:{name:"BingMap全球影像地图",url:"https://ecn.t3.tiles.virtualearth.net",credit:"BingMap",coordSys:"WGS84",defaultLevel:18,maxLevel:18}};n.mapSourceOptionMap=o;n.coordSysOptions=[{text:"无",value:"",epsg:""},{text:"CGCS2000",value:"CGCS2000",epsg:"4490"},{text:"WGS84",value:"WGS84",epsg:"4326"}];n.regionSysOptionsCGCS2000=[{text:"3-degree GaussKruger zone 25",value:"EPSG:4513"},{text:"3-degree GaussKruger zone 26",value:"EPSG:4514"},{text:"3-degree GaussKruger zone 27",value:"EPSG:4515"},{text:"3-degree GaussKruger zone 28",value:"EPSG:4516"},{text:"3-degree GaussKruger zone 29",value:"EPSG:4517"},{text:"3-degree GaussKruger zone 30",value:"EPSG:4518"},{text:"3-degree GaussKruger zone 31",value:"EPSG:4519"},{text:"3-degree GaussKruger zone 32",value:"EPSG:4520"},{text:"3-degree GaussKruger zone 33",value:"EPSG:4521"},{text:"3-degree GaussKruger zone 34",value:"EPSG:4522"},{text:"3-degree GaussKruger zone 35",value:"EPSG:4523"},{text:"3-degree GaussKruger zone 36",value:"EPSG:4524"},{text:"3-degree GaussKruger zone 37",value:"EPSG:4525"},{text:"3-degree GaussKruger zone 38",value:"EPSG:4526"},{text:"3-degree GaussKruger zone 39",value:"EPSG:4527"},{text:"3-degree GaussKruger zone 40",value:"EPSG:4528"},{text:"3-degree GaussKruger zone 41",value:"EPSG:4529"},{text:"3-degree GaussKruger zone 42",value:"EPSG:4530"},{text:"3-degree GaussKruger zone 43",value:"EPSG:4531"},{text:"3-degree GaussKruger zone 44",value:"EPSG:4532"},{text:"3-degree GaussKruger zone 45",value:"EPSG:4533"},{text:"3-degree GaussKruger CM 75E",value:"EPSG:4534"},{text:"3-degree GaussKruger CM 78E",value:"EPSG:4535"},{text:"3-degree GaussKruger CM 81E",value:"EPSG:4536"},{text:"3-degree GaussKruger CM 84E",value:"EPSG:4537"},{text:"3-degree GaussKruger CM 87E",value:"EPSG:4538"},{text:"3-degree GaussKruger CM 90E",value:"EPSG:4539"},{text:"3-degree GaussKruger CM 93E",value:"EPSG:4540"},{text:"3-degree GaussKruger CM 96E",value:"EPSG:4541"},{text:"3-degree GaussKruger CM 99E",value:"EPSG:4542"},{text:"3-degree GaussKruger CM 102E",value:"EPSG:4543"},{text:"3-degree GaussKruger CM 105E",value:"EPSG:4544"},{text:"3-degree GaussKruger CM 108E",value:"EPSG:4545"},{text:"3-degree GaussKruger CM 111E",value:"EPSG:4546"},{text:"3-degree GaussKruger CM 114E",value:"EPSG:4547"},{text:"3-degree GaussKruger CM 117E",value:"EPSG:4548"},{text:"3-degree GaussKruger CM 120E",value:"EPSG:4549"},{text:"3-degree GaussKruger CM 123E",value:"EPSG:4550"},{text:"3-degree GaussKruger CM 126E",value:"EPSG:4551"},{text:"3-degree GaussKruger CM 129E",value:"EPSG:4552"},{text:"3-degree GaussKruger CM 132E",value:"EPSG:4553"},{text:"3-degree GaussKruger CM 135E",value:"EPSG:4554"}];n.regionSysOptionsWGS84=[{text:"Pseudo-Mercator",value:"EPSG:3857"}];n.booleanOptions=[{text:"是",value:!0},{text:"否",value:!1}]},{}],64:[function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n=0},u=function(e){return a.getLayerManager().getLayer(e)};n.getLayer=u;var d=function(e,t){if(t){var n=i.Bimface.Viewer.ViewerGISEvent.ModelAdded,o=function(i){i===e&&(t(),a.removeEventListener(n,o))};a.addEventListener(n,o)}};n.addLayer=function(e,t,n){var r=new i.Bimface.Layer[e.typeName](o({},e));a.getLayerManager().addLayer(r,t),r.show(),c(r)&&n&&d(r.id,n)};n.updateLayer=function(e,t,n){var o=u(e);o&&c(o)&&(o.update(t),n&&d(e,n))};var h=function(e){var t=u(e);return t?t.parent.id:null};n.getParentId=h;var p=function(e,t){var n=u(e);n&&(c(n)&&!n.databagId||(t?n.show():n.hide()),"TerrainLayer"===n.typeName&&a.render())};n.setLayerVisible=p;n.hideAllModelLayer=function(){var e=a.getLayerManager().query(".BIMLayer .FeatureLayer .TilesetLayer").map((function(e){return e.id}));return e.forEach((function(e){return p(e,!1)})),e};n.loadLayer=function(e){return new Promise((function(t){var n=u(e);if(n&&c(n)&&!n.loaded){var o=n.isVisible;n.show();var r=i.Bimface.Viewer.ViewerGISEvent.ModelAdded,l=function(e){e===n.id&&(t(!0),o||n.hide(),a.removeEventListener(r,l))};a.addEventListener(r,l)}else t(!0)}))};var f=function(e,t){var n=u(e);n&&c(n)&&a.zoomToBoundingBox({boundingBox:n.getBoundingBox(),duration:t})};n.zoomToLayer=f;n.getBoundingBoxById=function(e){var t,n=u(e);return n?c(n)&&"loaded"===n.loadStatus?n.getBoundingBox():null===(t=n._config)||void 0===t?void 0:t.boundingBox:null};n.updateParentVisible=function(e){var t=u(e);t&&t.updateParentsVisible()};n.moveLayer=function(e,t,n){var o=u(e),a=u(t);if(o&&a){var i=o.parent.children.indexOf(o);o.parent.children.splice(i,1),a.children.splice(n,0,o);var r=A(e),l=A(o.parent.id),s=l.children.indexOf(r);l.children.splice(s,1),A(t).children.splice(n,0,r),o.parent=a}};n.renameLayer=function(e,t){var n=u(e);n&&n.setName(t)};n.setLayerOpacity=function(e,t){var n=u(e);if(n){if("TerrainLayer"===n.typeName)a.getLayerManager().baseMap.setOpacity(t);else n.setOpacity(t);a.render()}};var m=function(e){delete e.protocol,delete e.provider,a.getLayerManager().baseMap.setSource(e),a.render()};n.setMapSource=m;var v=function(e){a.getLayerManager().baseMap.setMaxLevel(e),a.render()};n.setMapMaxLevel=v;n.setLayerReceiveShadow=function(e,t){var n=u(e);n&&n.enableReceiveShadow&&(n.enableReceiveShadow(t),a.render())};n.setLayerCastShadow=function(e,t){var n=u(e);if(n){if("TerrainLayer"===n.typeName)a.getLayerManager().baseMap.enableCastShadow(t);else n.enableCastShadow&&n.enableCastShadow(t);a.render()}};n.setLayerBorderLineVisible=function(e,t){var n=u(e);n&&n.setBorderLineVisible&&(n.setBorderLineVisible(t),a.render())};var g=function(e){var t,n,o,a=e.getBoundingBox();return a&&(t=(a.min.x+a.max.x)/2,n=(a.min.y+a.max.y)/2,o=(a.min.z+a.max.z)/2),{x:t,y:n,z:o}};n.getLayerBoundingBox=function(e){var t=u(e);return t&&c(t)?t.getBoundingBox():null};n.getLayerBeyondDisitance=function(e,t){var n=u(e);if(n&&c(n)&&n.loaded){var o=t||5e5,a=g(n),i=a.x,r=a.y;return Math.sqrt(Math.pow(i,2)+Math.pow(r,2))>o}return!1};var y;n.addModelAddedEventListener=function(e){var t=i.Bimface.Viewer.ViewerGISEvent.ModelAdded;a.addEventListener(t,e)};var b=function(e,t){var n=u(e);if(n){n.setTransformation([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),!1!==t&&f(e,0)}};n.resetCoordSys=b;var _=function(e,t){var n,o,i;return t?null===(n=a.getViewer().getModelManager().getModel(e.modelId))||void 0===n?void 0:n._config:(null===(o=e._config)||void 0===o?void 0:o.config)||(null===(i=a.getViewer().getModelManager().getModel(e.modelId))||void 0===i?void 0:i._config)};n.getLayerConfigById=function(e,t){var n=u(e);return n?_(n,t):null};n.convertCoordSys=function(e,t){var n,o,r,l=u(e);if(y=y||new i.Bimface.Common.CoordinateConvertor,l){var s=_(l),c=void 0,d=void 0,h=null===(r=null===(o=null==s?void 0:s.coordinateSystem)||void 0===o?void 0:o.projCS)||void 0===r?void 0:r.offset;!h||0===h[0]&&0===h[1]?(b(e,!1),c=(n=g(l)).x,d=n.y):(c=h[0],d=h[1]);var p=y.translateXY({x:c,y:d},t,"EPSG:4490");p.lon>360&&(p.lon%=360),p.lon>180&&(p.lon-=360);var m=a.latLonToWorld({latLon:p}),v=[1,0,0,0,0,1,0,0,0,0,1,0,m.x,m.y,0,1];l.setTransformation(v),f(e,0)}};var C;n.getCoordSysConfig=function(e){var t,n,o=u(e);if(o){var a=_(o),i=null===(n=null===(t=null==a?void 0:a.coordinateSystem)||void 0===t?void 0:t.projCS)||void 0===n?void 0:n.epsg;if(i){var l="EPSG:"+i,s="";if(r.regionSysOptionsCGCS2000.map((function(e){return e.value})).indexOf(l)>=0?s="CGCS2000":r.regionSysOptionsWGS84.map((function(e){return e.value})).indexOf(l)>=0&&(s="WGS84"),s)return{coordSys:s,region:l}}}return{coordSys:"",region:""}};var M=function(){C&&C.exit(),C=null};n.closeModelEditor=M;n.openModelEditor=function(e){M();var t=u(e);if(t&&c(t)){var n=i.Bimface.Plugins.ModelEditor,o=new n.ModelEditorToolbarConfig;o.viewer=a,o.modelId=t.customId||t.modelId,o.buttons={translate:!0,rotate:!0,scale:!0},o.rotationController={X:!1,Y:!1},o.scaleController={X:!1,Y:!1,Z:!1},(C=new n.ModelEditorToolbar(o)).show()}};n.onModelEditorChanged=function(e){if(C){var t=i.Bimface.Plugins.ModelEditor.ModelEditorToolbarEvent.ModelTransformEnd;C.addEventListener(t,e)}};n.removeLayer=function(e){var t=u(e);if(t){var n=A(t.parent.id),o=A(t.id),a=n.children.indexOf(o);a>=0&&n.children.splice(a,1),M(),t.parent.remove(t)}};var w=function(e){var t=u(e);if(t&&c(t)){var n=t.getTransformation(),o=i.Bimface.Utils.Transformation,r=o.getTranslation(n),l=o.getQuaternion(n),s=Math.round(o.quaternionToEulerAngles(l).z*(180/Math.PI));s<0&&(s+=360);var d=a.worldToLatLon(r);return{latitude:d.lat.toFixed(9),longitude:d.lon.toFixed(9),altitude:r.z.toFixed(3),basePoint:r,rotateAngle:s,transformation:n}}return null};n.getTransformParams=w;n.setLayerAltitude=function(e,t){var n=u(e);if(n&&c(n)&&!isNaN(Number(t))){var o=n.getTransformation();o[14]=Number(t),n.setTransformation(o)}};n.setLayerLatLon=function(e,t,n){var o=u(e);if(o&&c(o)&&!isNaN(Number(t))&&!isNaN(Number(n))){var i=a.latLonToWorld({latLon:{lat:Number(t),lon:Number(n)}}),r=o.getTransformation();r[12]=i.x,r[13]=i.y,o.setTransformation(r)}};n.setLayerRotateAngle=function(e,t){var n=u(e);if(n&&c(n)&&!isNaN(t)){var o=w(e),a=o.basePoint,i=o.rotateAngle,r=(Number(t)-i)*(Math.PI/180);n.setRotationZ(a,r)}};n.getFeatureType=function(e){var t=u(e);if(t&&"FeatureLayer"===t.typeName){var n=_(t);if(n)return{point:"点",line:"线",polygon:"面"}[n.metadata.FeatureType]}return""};n.setLayerColor=function(e,t,n){var o=u(e);o&&"FeatureLayer"===o.typeName&&(o.getPolygonFeatureManager().overrideColor({all:!0},new i.Web.Graphics.Color(t,n)),a.render())};n.clearLayerColor=function(e){var t=u(e);t&&"FeatureLayer"===t.typeName&&t.getPolygonFeatureManager().restoreColor({all:!0})};var S,E=function(e){var t=u(e);return!(!t||!c(t)||"loading"!==t.loadStatus)};n.isLayerIniting=E;var L,I=function(){if(!S){var e=new i.Bimface.Plugins.Drawable.DrawableContainerConfig;e.viewer=a,S=new i.Bimface.Plugins.Drawable.DrawableContainer(e)}return S};n.getDrawableContainer=I;var T=function(){return L=L||new i.Bimface.Plugins.ExternalObject.ExternalObjectManager(a)};n.onViewerClick=function(e){a.addEventListener("MouseClicked",e)};n.offViewerClick=function(e){a.removeEventListener("MouseClicked",e)};n.setPickCursor=function(){a.getDomElement().style.cursor="url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjFweCIgaGVpZ2h0PSIyMXB4IiB2aWV3Qm94PSIwIDAgMjEgMjEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+5b2i54q257uT5ZCIPC90aXRsZT4KICAgIDxkZWZzPgogICAgICAgIDxwYXRoIGQ9Ik0xMSw1IEwxMSwxMCBMMTYsMTAgTDE2LDExIEwxMSwxMSBMMTEsMTYgTDEwLDE2IEwxMCwxMSBMNSwxMSBMNSwxMCBMMTAsMTAgTDEwLDUgTDExLDUgWiIgaWQ9InBhdGgtMSI+PC9wYXRoPgogICAgICAgIDxmaWx0ZXIgeD0iLTYzLjYlIiB5PSItNjMuNiUiIHdpZHRoPSIyMjcuMyUiIGhlaWdodD0iMjI3LjMlIiBmaWx0ZXJVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giIGlkPSJmaWx0ZXItMiI+CiAgICAgICAgICAgIDxmZU1vcnBob2xvZ3kgcmFkaXVzPSIxIiBvcGVyYXRvcj0iZGlsYXRlIiBpbj0iU291cmNlQWxwaGEiIHJlc3VsdD0ic2hhZG93U3ByZWFkT3V0ZXIxIj48L2ZlTW9ycGhvbG9neT4KICAgICAgICAgICAgPGZlT2Zmc2V0IGR4PSIwIiBkeT0iMCIgaW49InNoYWRvd1NwcmVhZE91dGVyMSIgcmVzdWx0PSJzaGFkb3dPZmZzZXRPdXRlcjEiPjwvZmVPZmZzZXQ+CiAgICAgICAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSI+PC9mZUdhdXNzaWFuQmx1cj4KICAgICAgICAgICAgPGZlQ29tcG9zaXRlIGluPSJzaGFkb3dCbHVyT3V0ZXIxIiBpbjI9IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0ib3V0IiByZXN1bHQ9InNoYWRvd0JsdXJPdXRlcjEiPjwvZmVDb21wb3NpdGU+CiAgICAgICAgICAgIDxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwICAgMCAwIDAgMCAwICAgMCAwIDAgMCAwICAwIDAgMCAwLjUgMCIgdHlwZT0ibWF0cml4IiBpbj0ic2hhZG93Qmx1ck91dGVyMSI+PC9mZUNvbG9yTWF0cml4PgogICAgICAgIDwvZmlsdGVyPgogICAgPC9kZWZzPgogICAgPGcgaWQ9IuWFtuS7luWKn+iDvSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IuW9oueKtue7k+WQiCI+CiAgICAgICAgICAgIDx1c2UgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMSIgZmlsdGVyPSJ1cmwoI2ZpbHRlci0yKSIgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+CiAgICAgICAgICAgIDxwYXRoIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLXdpZHRoPSIxIiBkPSJNMTEuNSw0LjUgTDExLjUsOS41IEwxNi41LDkuNSBMMTYuNSwxMS41IEwxMS41LDExLjUgTDExLjUsMTYuNSBMOS41LDE2LjUgTDkuNSwxMS41IEw0LjUsMTEuNSBMNC41LDkuNSBMOS41LDkuNSBMOS41LDQuNSBMMTEuNSw0LjUgWiIgZmlsbD0iI0ZGRkZGRiIgZmlsbC1ydWxlPSJldmVub2RkIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=)10 10,auto"};var P;n.resetCursor=function(){a.getDomElement().style.cursor=""};n.addPickIcon=function(e){if(!P){var t=document.createElement("canvas");t.width=20,t.height=20;var n=t.getContext("2d");n.fillStyle="#FF9D0B",n.fillRect(0,8.5,20,3),n.fillRect(8.5,0,3,20),P=t.toDataURL()}var o=new i.Bimface.Plugins.Drawable.ImageConfig;o.worldPosition=e,o.src=P,o.width=20,o.height=20,o.opacity=1;var a=new i.Bimface.Plugins.Drawable.Image(o);I().addItem(a)};n.clearIcon=function(){I().clear()};var x=0;n.addDashedLine=function(e){var t=new i.Bimface.Plugins.Geometry.SplineCurve(e);t.setWidth(2),t.setColor(new i.Web.Graphics.Color("#FF9D0B",1)),t.setStyle({lineType:"Dashed",lineStyle:{dashLength:2,gapLength:1}}),t.setType("polyline"),T().loadObject({name:"dashedLine_"+x,object:t}),x+=1};n.clearDashedLine=function(){T().clear()};n.getTransformation=function(e){var t=u(e);return t&&c(t)&&!E(e)?t.getTransformation():null};n.setTransformation=function(e,t){var n=u(e);n&&c(n)&&!E(e)&&n.setTransformation(t)};n.clearSelectedComponents=function(e){var t=u(e);t&&c(t)&&!E(e)&&t.model.clearSelectedComponents()};n.calculateAdjustTransformation=function(e,t,n){var o=u(e);if(o&&c(o)&&!E(e)){var a=window.THREE,i=new a.Vector3(t[0].x,t[0].y,t[0].z),r=new a.Vector3(t[1].x,t[1].y,t[1].z),l=new a.Vector3(n[0].x,n[0].y,n[0].z),s=new a.Vector3(n[1].x,n[1].y,n[1].z),d=r.clone().sub(i),h=s.clone().sub(l),p=new a.Vector2(d.x,d.y),f=new a.Vector2(h.x,h.y).angle()-p.angle(),m=l.clone().sub(i);o.setRotationZ(i,f),o.setTranslation({x:m.x,y:m.y,z:0})}};var A=function(e){var t,n=u(e);if(!n)return null;if("root"===e)return{id:"root",children:a._config.resources};var o,i,r="TerrainLayer"===n.typeName,l=function(n){n.children&&n.children.some((function(n){return r?(n.id===e?o=n:n.id===a.getLayerManager().baseMap.id&&(i=n),!(!o||!i)):n.id===e?(t=n,!0):("GroupLayer"===n.typeName&&l(n),!1)}))};return l({id:"root",children:a._config.resources}),r&&(o.style=i.style,o.shadow=i.shadow,t=o),t};n.getLayerData=A;n.addLayerData=function(e,t){a._config.resources.splice(t,0,e)};n.getMaxGroupNo=function(){var e=0,t=function(n){n.children&&n.children.forEach((function(n){var o=n.id.split("group_");if(2===o.length){var a=o[1];e=Math.max(e,Number(a))}"GroupLayer"===n.typeName&&t(n)}))};return t({id:"root",children:a._config.resources}),++e};n.getRealLayerInfo=function(e,t){var n=[];a.getLayerManager().query(".BIMLayer .FeatureLayer .TilesetLayer").forEach((function(t){var o=t.id.toString();if(o.indexOf(e)>=0)n.push(o);else{var a=t.getModelId().toString();a.indexOf(e)>=0&&n.push(a)}}));var o={layerId:"layer_"+e,customId:void 0,name:t};if(n.length>0){var i=0;n.forEach((function(e){var t=e.split("_");if(t[2]){var n=Number(t[2]);n>i&&(i=n)}})),i+=1,o.layerId="layer_"+e+"_"+i,o.customId=o.layerId,o.name=t+"-"+i}return o};n.getLayerName=function(e){var t=u(e);return t?t.name:""};n.setLayerName=function(e,t){var n=u(e);n&&(n.name=t)};n.getSceneInfo=function(){return a._config};n.getLayerConfigsObject=function(){return a.getLayerManager().getLayerConfigsObject()};var B=function(){if(u("layer_map_1"))return"layer_map_1";var e=a.getLayerManager().query(".TileLayer")[0];return e?e.id:""};n.getTileLayerId=B;n.initTiandituMap=function(){var e=A(B());if(e.url.indexOf("tianditu")>=0){var t=e.url.indexOf("img_w")>=0?l.mapSourceOptionMap.tiandituImg.url:l.mapSourceOptionMap.tiandituRoad.url,n=l.mapSourceOptionMap.tiandituImg.credit;m({url:t,credit:n}),v(e.maxLevel||l.mapSourceOptionMap.tiandituImg.defaultLevel)}};n.isDefaultTiandituKey=function(){var e=A(B());if(e.url.indexOf("tianditu")>=0&&e.url.split("&tk=")[1]===l.defaultTiandituKey)return!0;return!1};var D=function(e){var t=h(e);if(null!==t&&"root"!==t){var n=A(t),o=null;n.children.some((function(e){if(!e.priority)return o=0,!0;if(null===o)o=e.priority;else if(o!==e.priority)return o=0,!0})),n.priority=o||0,D(t)}};n.updateParentPriority=D;var k=function(e,t,n){void 0===n&&(n=!0);var o=A(e),a=u(e);o&&a&&(o.priority=t,a.priority=t,Array.isArray(o.children)&&o.children.forEach((function(e){k(e.id,t,!1)})),n&&D(e))};n.setPriority=k;n.getModelType=function(e){var t=u(e);return t?t._config.modelType:""};n.setLayerVisualRange=function(e,t){var n=u(e);if(n){if(n&&n.getRootGeoErrDistance)if(t)n.setVisualRange(t);else{var o=n.getRootGeoErrDistance();n.setVisualRange({min:0,max:o})}a.render()}};n.getLayerGeoErrDistance=function(e){var t=u(e);return t&&t.getRootGeoErrDistance?t.getRootGeoErrDistance():""};n.defineCustomCoordSys=function(e,t){var n;y=y||new i.Bimface.Common.CoordinateConvertor;var o=u(e);if(o){var a=_(o),r=null===(n=null==a?void 0:a.coordinateSystem)||void 0===n?void 0:n.projCS;r&&y.defineCustomCoordSys(t,r)}};n.unregisterViewer=function(){M(),a=null}},{"./options":63}],65:[function(e,t,n){!function(e){var t,n,o,a,i,r,l='',s=(s=document.getElementsByTagName("script"))[s.length-1].getAttribute("data-injectcss");if(s&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(e){console&&console.log(e)}}function c(){i||(i=!0,o())}t=function(){var e,t,n;(n=document.createElement("div")).innerHTML=l,l=null,(t=n.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",e=t,(n=document.body).firstChild?(t=n.firstChild).parentNode.insertBefore(e,t):n.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(o=t,a=e.document,i=!1,(r=function(){try{a.documentElement.doScroll("left")}catch(e){return void setTimeout(r,50)}c()})(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,c())})}(window)},{}],66:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=window.Glodon||{};window.Glodon=o,n.default=o},{}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getUINamespace=n.SDM=void 0;var o=e("./Utils/DataUtil"),a=window.Glodon.Bimface.Data.StatisticsDataManager.getInstance();n.SDM=a;n.getUINamespace=function(e){return o.default.assertType(e,"str")&&e.length>0?("."!==e[0]&&(e="."+e),"Gldon.Bimface.Tiles.UI"+e):"Gldon.Bimface.Tiles.UI"}},{"./Utils/DataUtil":68}],68:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o={assertType:function(e,t){var n=function(t){return Object.prototype.toString.call(e)==="[object "+t+"]"};switch(t){case"obj":case"Obj":case"object":case"Object":return n("Object");case"arr":case"Arr":case"array":case"Array":return n("Array");case"num":case"Num":case"number":case"Number":return n("Number");case"func":case"Func":case"function":case"Function":return n("Function");case"str":case"Str":case"string":case"String":return n("String");default:return n(t)}},assertParamsType:function(){for(var e=this,t=[],n=0;n1){var o=t.splice(t.length-1,1)[0],a=!0;return t.every((function(t){return a=e.assertType(t,o)})),a}},hasProperty:function(e,t){if(this.assertType(e,"obj"))return void 0!==e[t]}};n.default=o},{}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DomUtil2D=void 0;var o=function(){function e(){}return e.create=function(e,t,n){var o=document.createElement(e);return o.id=t||"",o.style.position="absolute",o.style.width="100%",o.style.top=0,o.style.bottom=0,n&&n.appendChild(o),o},e.remove=function(e){var t=e.parentNode;t&&t.removeChild(e)},e.setPosition=function(e,t){e.position=t,e.style.left=t.x+"px",e.style.top=t.y+"px"},e.setOpacity=function(t,n){"opacity"in t.style?t.style.opacity=n:"filter"in t.style&&e._setOpacityIE(t,n)},e._setOpacityIE=function(e,t){var n=!1,o="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(o)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+o+"(opacity="+t+")"},e.splitStr=function(e){return e.trim().split(/\s+/g)},e.getContainerOffsetToClient=function(e){var t,n;if(e!=document){var o=(n=e).getBoundingClientRect?function(e){var t=e.getBoundingClientRect(),n=document.body,o=document.documentElement,a=o.clientTop||n.clientTop,i=o.clientLeft||n.clientLeft,r=t.top-a,l=t.left-i;return{top:Math.round(r),left:Math.round(l)}}(n):function(e){for(var t=0,n=0;e;)t+=e.offsetTop,n+=e.offsetLeft,e=e.offsetParent;var o=document.body,a=document.documentElement;return{top:t-=window.pageYOffset||a.scrollTop||o.scrollTop,left:n-=window.pageXOffset||a.scrollLeft||o.scrollLeft}}(n);t={width:e.offsetWidth,height:e.offsetHeight,left:o.left,top:o.top}}else t={width:window.innerWidth,height:window.innerHeight,left:0,top:0};return t},e.setClassName=function(e,t){var n=document.getElementById(e);n&&(n.className=t)},e.addClassName=function(e,t){var n,o,a,i,r,l=document.getElementById(e);if(l&&(o=l,t&&"string"==typeof t&&(n=t.split(/\s+/),1===o.nodeType)))if(o.className||1!==n.length){for(a=" "+o.className+" ",i=0,r=n.length;i=0;)o=o.replace(" "+n[i]+" "," ");a.className=t?o.trim():""}},e.showOrHideElement=function(e,t){var n=document.getElementById(e);n&&(n.style.display=t?"":"none")},e.prototype.getStyleString=function(e){var t=[];for(var n in e){var o=e[n];t.push(n),t.push(":"),t.push(o),t.push("; ")}return t.join("")},e.cloneStyle=function(e){var t={};for(var n in e)t[n]=e[n];return t},e.removeStyleAttribute=function(e,t){Array.isArray(t)||(t=[t]),t.forEach((function(t){t in e&&delete e[t]}))},e.trimRight=function(e){if(0===e.length)return"";for(var t=e.length-1,n=t;n>=0;--n)if(" "!==e.charAt(n)){t=n;break}return e.substr(0,t+1)},e.trimLeft=function(e){if(0===e.length)return"";for(var t=0,n=0;n=0&&this._onceEvents[e].splice(n,1),0===this._onceEvents[e].length&&delete this._onceEvents[e]),this._pausedEvents[e]&&((n=this._pausedEvents[e].indexOf(t))>=0&&this._pausedEvents[e].splice(n,1),0===this._pausedEvents[e].length&&delete this._pausedEvents[e]),this.removeEvent(e,t)},t.prototype.trigger=function(e){for(var t=this,n=[],o=1;o=0&&this._pausedEvents[e].splice(n,1),0===this._pausedEvents[e].length&&delete this._pausedEvents[e],this},t.prototype.reset=function(){this._onceEvents={},this._pausedEvents={},e.prototype.reset.call(this)},t}(e("./EventManager").EventManager);n.default=r},{"./EventManager":72}],72:[function(e,t,n){"use strict";var o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t=0&&this._eventContainer[e].splice(n,1)}return this},e.prototype.fireEvent=function(e){for(var t=[],n=1;n"===c?(l===sign_enum.SIGN_START&&(i=n,o.map((function(e,t){if(i.children||(i.children=[]),t===o.length-1){var n=(r=r.replace(/^\s*/g,"")).match(/^[a-zA-Z0-9]*\s*/)[0].replace(/\s/g,""),l=r.replace(n," ").match(/(^|\s)(\S+?=".+?")/g),s={},c={};l&&l.map((function(e){if(e){var t=/="(.+?)"/.exec(e)[1],n=e.split("=")[0].replace(/\s/g,"");if("style"===n)return t.split(";").map((function(e){e&&(c[e.split(":")[0]]=e.split(":")[1])})),s[n]=c;s[n]=t}})),i.children.push(__assign({nodeName:n,children:[]},s))}a=i.children.length-1,i=i.children[a]})),o.push(a),r="",l=sign_enum.SIGN_START_OK),l===sign_enum.SIGN_END&&(o.pop(),i=n,o.map((function(e){i.children[e]&&(i=i.children[e])})),r="",l=sign_enum.SIGN_END_OK)):r+=c}return n},attributeKeysList=["title"],render=function(html,container,scope){var parseResult=htmlStrParser(html),renderItemMap={},createItem=function(propsMap,parentItem){var nodeName=propsMap.nodeName,ref=propsMap.ref,text=propsMap.text,style=propsMap.style,className=propsMap.class,item,dom;if(UIMap[nodeName]){var config=void 0!==ref?{id:ref}:{};propsMap["bf-config"]&&scope&&"[object Object]"===Object.prototype.toString.call(scope[propsMap["bf-config"]])&&(config=__assign(__assign({},config),scope[propsMap["bf-config"]])),item=new UIMap[propsMap.nodeName](config),dom=item.getDomElement(),className&&item.addClass.apply(item,className.split(" "))}else item=dom=(new Dom_1.Dom).createElement({elementType:nodeName,className:className});if(void 0!==text&&dom.html(text),style&&dom.css(style),propsMap.hasOwnProperty("disabled")&&"false"!==propsMap.disabled&&dom.attribute("disabled",!0),attributeKeysList.forEach((function(e){propsMap.hasOwnProperty(e)&&dom.attribute(e,propsMap[e])})),parentItem.append(dom),scope){var expressionValue_1={},listen_1=function(key,execute){if(propsMap[key].indexOf("scope.data")>=0){var update_1=function(){var lastValue=expressionValue_1[key],value;try{value=eval(propsMap[key]),expressionValue_1[key]=value}catch(e){console.log(e),eventEmmiter_1.off("ValueChanged",update_1)}execute(value,lastValue)};eventEmmiter_1.on("ValueChanged",update_1),update_1()}else scope.data.hasOwnProperty(propsMap[key])&&(execute(scope.data[propsMap[key]]),eventEmmiter_1.on(propsMap[key],execute))},eventEmmiter_1=new EventEmmiter_1.default,proxy=new Proxy(scope.data,{set:function(e,t,n){var o=e[t];return e[t]=n,eventEmmiter_1.trigger(t,n,o),eventEmmiter_1.trigger("ValueChanged",t,n,o),!0}});scope.data=proxy;var _loop_1=function(e){0===e.indexOf("@")&&"[object Function]"===Object.prototype.toString.call(scope[propsMap[e]])&&dom.on(e.slice(1),(function(){return scope[propsMap[e]]()})),"bf-disabled"===e&&listen_1("bf-disabled",(function(e){"[object Boolean]"===Object.prototype.toString.call(e)&&dom.attribute("disabled",e)})),"bf-class"===e&&listen_1("bf-class",(function(e,t){"[object String]"===Object.prototype.toString.call(e)&&(t&&dom.removeClass(t),e&&dom.addClass(e))})),"bf-show"===e&&listen_1("bf-show",(function(e){"[object Boolean]"===Object.prototype.toString.call(e)&&(e?dom.show():dom.hide())})),attributeKeysList.forEach((function(t){e==="bf-"+t&&listen_1("bf-"+t,(function(e){"[object String]"===Object.prototype.toString.call(e)&&dom.attribute(t,e)}))}))};for(var key in propsMap)_loop_1(key)}propsMap.children.length>0&&propsMap.children.forEach((function(e){createItem(e,item)})),ref&&(renderItemMap[ref]=item)};return parseResult.children.forEach((function(e){createItem(e,container)})),renderItemMap};exports.default=render},{"../../../Event/EventEmmiter":71,"../../Dom":109,"../../UIMap":112}],74:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(){}return e.formatElementParam=function(e,t){if(void 0===t)return e;var n=e.className,o=t.className;o&&(n=n+" "+o);var a=window.Object.assign(e,t);return a.className=n,a},e}();n.default=o},{}],75:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.Control=void 0;var i=e("../Event/EventEmmiter"),r=e("./Dom"),l=e("./UIEvents"),s=e("./ControlAnchor/ControlAnchor"),c=function(e){function t(n){var o=e.call(this)||this;(o._domElement=n.element||(new r.Dom).createElement(n.elementParam),n.parent)&&((n.parent instanceof t?n.parent._domElement:n.parent instanceof r.Dom?n.parent:new r.Dom(n.parent)).append(o._domElement),n.parent instanceof t&&(o._parent=n.parent));return o.id=n.id,o.type=n.type,o.position={anchor:"TopLeft",offset:{x:0,y:0}},o}return a(t,e),t.prototype.getParent=function(){return this._parent},t.prototype.setParent=function(e){this._parent=e},t.prototype.getDomElement=function(){return this._domElement},t.prototype.onClick=function(e){var t=this;return this._domElement.on("click",(function(n){e(n),t.trigger(l.default.Clicked,t)})),this},t.prototype.onMouseOver=function(e){var t=this;return this._domElement.on("mouseover",(function(n){e(n),t.trigger(l.default.MouseOver,t)})),this},t.prototype.onMouseOut=function(e){var t=this;return this._domElement.on("mouseout",(function(n){e(n),t.trigger(l.default.MouseOut,t)})),this},t.prototype.show=function(){return this._domElement.show(),this},t.prototype.hide=function(){return this._domElement.hide(),this},t.prototype.isVisible=function(){return this._domElement.isVisible()},t.prototype.destroy=function(){this._domElement.destroy()},t.prototype.addClass=function(){for(var e,t=[],n=0;n=0?{marginRight:-t+"px"}:{marginLeft:t+"px"}).setStyle(o.indexOf("bottom")>=0?{marginBottom:-n+"px"}:{marginTop:n+"px"}),this.position.offset.x=t,this.position.offset.y=n}return this},t.prototype.getPositionParam=function(){return this.position},t.prototype.getId=function(){return this.id},t.prototype.getType=function(){return this.type},t.prototype.getPosition=function(){return this._domElement.getPosition()},t.prototype.getDimensions=function(){return this._domElement.getDimensions()},t.prototype.getWidth=function(){return this._domElement.getWidth()},t.prototype.getHeight=function(){return this._domElement.getHeight()},t.prototype.setStyle=function(e){return this._domElement.css(e),this},t.prototype.getTooltip=function(){return this.tooltip},t.prototype.setTooltip=function(e){return this.tooltip=e,this.getDomElement().attribute("title",e),this},t.prototype.setHTML=function(e,t){var n=/<[C,c]ontrol id="(.*?)".*?>.*?<\/[C,c]ontrol>/g,o=e.replace(n,(function(e){var t=n.exec(e);return n.lastIndex=0,'
'})),a=this.getDomElement();for(var i in a.html(o),t){var l=a.getElement().getElementsByClassName("BFUI_Control_"+i);if(1===l.length){var s=l[0];new r.Dom(s.parentElement).replace(t[i].getDomElement&&t[i].getDomElement()||t[i],new r.Dom(s))}}return this},t.prototype.click=function(){return this.getDomElement().click(),this},t}(i.default);n.Control=c},{"../Event/EventEmmiter":71,"./ControlAnchor/ControlAnchor":77,"./Dom":109,"./UIEvents":111}],76:[function(e,t,n){"use strict";var o;Object.defineProperty(n,"__esModule",{value:!0}),function(e){e.Left="Left",e.Center="Center",e.Right="Right",e.Top="Top",e.Middle="Middle",e.Bottom="Bottom"}(o||(o={})),n.default=o},{}],77:[function(e,t,n){"use strict";var o;Object.defineProperty(n,"__esModule",{value:!0}),function(e){e.TopLeft="TopLeft",e.TopCenter="TopCenter",e.TopRight="TopRight",e.MiddleLeft="MiddleLeft",e.MiddleRight="MiddleRight",e.BottomLeft="BottomLeft",e.BottomCenter="BottomCenter",e.BottomRight="BottomRight",e.MiddleCenter="MiddleCenter"}(o||(o={})),n.default=o},{}],78:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.Control=n.ControlGroup=void 0;var i=e("./Control");Object.defineProperty(n,"Control",{enumerable:!0,get:function(){return i.Control}});var r=function(e){function t(t){var n=e.call(this,t)||this;return n._children=[],n}return a(t,e),t.prototype.addControl=function(e,t){if(!t||isNaN(t.index)||-1===t.index)this._children.push(e),e.setParent(this),this._domElement.append(e.getDomElement());else{var n=t.index;n<-1&&(n=this.getControlCount()+n+1),this.insertControl(e,n)}return this},t.prototype.insertControl=function(e,t){return!isNaN(t)&&t=0&&(this._children.splice(t,1),e.setParent(void 0),this._domElement.remove(e.getDomElement())),this},t.prototype.clearControls=function(e){for(void 0===e&&(e=!1);this.getControlCount()>0;){var t=this.getControl({index:0});this.removeControl(t),e&&t.destroy()}return this},t.prototype.getControl=function(e){var t;if(e)return e.id?this.getAllControls().some((function(n){if(n.getId()===e.id)return t=n,!0})):!isNaN(e.index)&&e.index-1)}))},t.prototype.getEnabled=function(){var e=[];return this.radioArray.forEach((function(t,n){t.isEnabled()&&e.push(n)})),e},t.prototype.onChange=function(e){return this.on(r.default.ValueChanged,e),this},t}(i.Control);n.default=u},{"../../../Common/StatisticsDataManager":67,"../../Control":75,"../../Controls/Radio/Radio":95,"../../UIEvents":111}],81:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i,r=e("../../ControlGroup");!function(e){e.Start="flex-start",e.End="flex-end",e.Center="center",e.Between="space-between",e.Around="space-around"}(i||(i={}));var l=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-row"},type:"Row",id:(t=t||{}).id,parent:t.parent};return(n=e.call(this,o)||this).setJustifyContent(t.justifyContent),t.contents&&t.contents.forEach((function(e){n.addControl(e)})),n}return a(t,e),t.prototype.setJustifyContent=function(e){var t=Object.keys(i).indexOf(e)>=0?e:"Between",n=i[t];this.getDomElement().css("justifyContent",n)},t}(r.ControlGroup);n.default=l},{"../../ControlGroup":78}],82:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../ControlGroup"),r=e("../../ControlAlign/ControlAlignOption"),l=e("../../Common/Utils/StyleUtil"),s=function(e){function t(t){var n=this;t=t||{};var o={elementParam:l.default.formatElementParam({elementType:"div",className:"bfui-toolbar"},t.elementParam),type:"Toolbar",id:t.id,parent:t.parent};(n=e.call(this,o)||this).isHorizontal=!1!==t.isHorizontal,n.isFullLength=!0===t.isFullLength,n.controlAlign=t.controlAlign||(n.isHorizontal?r.default.Left:r.default.Top);var a=n.isFullLength?"-full":"";return n.isHorizontal?n.addClass("bfui-toolbar-horizontal"+a):n.addClass("bfui-toolbar-vertical"+a),n.addClass("bfui-align-"+n.controlAlign.toLowerCase()),n}return a(t,e),t}(i.ControlGroup);n.default=s},{"../../Common/Utils/StyleUtil":74,"../../ControlAlign/ControlAlignOption":76,"../../ControlGroup":78}],83:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../Dom"),l=e("../../Common/Utils/StyleUtil"),s=e("../../../Common/StatisticsDataManager"),c=s.getUINamespace("Button"),u=function(e){function t(t){var n=this;s.SDM.send(c,"bf_c_UIButton_new"),t=t||{};var o={elementParam:l.default.formatElementParam({elementType:"div",className:"bfui-button"},t.elementParam),type:"Button",id:t.id,parent:t.parent};return n=e.call(this,o)||this,t.text&&n.setText(t.text),n.selectable=!0===t.selectable,n.selectable&&(n.select=!1),t.iconClass&&n.setIcon(t.iconClass),t.tooltip&&n.setTooltip(t.tooltip),t.clickCallback instanceof Function&&n.onClick(t.clickCallback),n}return a(t,e),t.prototype.getText=function(){return this._domElement.html()},t.prototype.setText=function(e){return this._domElement.html(e),this},t.prototype.setIcon=function(e){return e?(this.icon?this.icon.removeClass(this.iconClass):(this.icon=(new r.Dom).createElement({elementType:"div",className:"bfui-button-icon"}),this._domElement.append(this.icon)),this.iconClass=e,this.icon.addClass(e),this):this},t.prototype.isSelectable=function(){return this.selectable},t.prototype.isSelected=function(){return this.select},t.prototype.setSelected=function(e){return this.selectable?((e=!0===e)?this._domElement.addClass("bfui-button-select"):this._domElement.removeClass("bfui-button-select"),this.select=e,this):this},t}(i.Control);n.default=u},{"../../../Common/StatisticsDataManager":67,"../../Common/Utils/StyleUtil":74,"../../Control":75,"../../Dom":109}],84:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.CheckState=void 0;var i=e("../../Control"),r=e("../../UIEvents"),l=e("../../Dom"),s=function(e){function t(t){var n=e.call(this,t)||this,o=n.inputPart=(new l.Dom).createElement({elementType:"input",className:t.className});o.attribute("type",t.name),n._domElement.on("click",(function(e){e.target.hasClass(t.className)||n.inputPart.getElement().click()})),o.on("change",(function(){n.trigger(r.default.ValueChanged,n,n.getValue(),n.isChecked())}));var a=n.textPart=(new l.Dom).createElement({elementType:"label",className:"bfui-checkState-text"});return n._domElement.append(o).append(a),n.setValue(void 0===t.value||t.value),t.label&&n.setLabel(t.label),!1===t.enabled&&n.setEnabled(t.enabled),!0===t.checked&&n.setChecked(t.checked),n}return a(t,e),t.prototype.onChange=function(e){return this.on(r.default.ValueChanged,e),this},t.prototype.getLabel=function(){return this.textPart.html()},t.prototype.setLabel=function(e){return this.textPart.html(e),this},t.prototype.isEnabled=function(){return!this.inputPart.attribute("disabled")},t.prototype.setEnabled=function(e){return e!=this.isEnabled()&&(this.textPart.toggle("bfui-checkState-text-disabled"),this.inputPart.attribute("disabled",!e)),this},t.prototype.isChecked=function(){return this.inputPart.attribute("checked")},t.prototype.setChecked=function(e){return e!=this.isChecked()&&(this.inputPart.attribute("checked",e),this.trigger(r.default.ValueChanged,this,this.getValue(),e)),this},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e){return this.value=e,this},t}(i.Control);n.CheckState=s},{"../../Control":75,"../../Dom":109,"../../UIEvents":111}],85:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("./../CheckState/CheckState"),r=e("../../../Common/StatisticsDataManager"),l=r.getUINamespace("Checkbox"),s=function(e){function t(t){r.SDM.send(l,"bf_c_UICheckBox_new");var n={elementParam:{elementType:"div",className:"bfui-checkbox"},type:"Checkbox",name:"checkbox",id:t.id,className:"bfui-checkbox-checkbox",parent:t.parent};return t=Object.assign({},n,t),e.call(this,t)||this}return a(t,e),t}(i.CheckState);n.default=s},{"../../../Common/StatisticsDataManager":67,"./../CheckState/CheckState":84}],86:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.Collapse=void 0;var i=e("../../Control"),r=e("../../Dom"),l=e("../../../Common/StatisticsDataManager"),s=l.getUINamespace("Collapse"),c=function(e){function t(t){var n;l.SDM.send(s,"bf_c_UICollapse_new");var o={elementParam:{elementType:"tbody",className:"bfui-collapse-tbody"},type:"Collapse",parent:t.parent},a=(n=e.call(this,o)||this)._domElement,i=(new r.Dom).createElement({elementType:"tr",className:"bfui-collapse-title bfui-transition"});return i.html(''+t.group+""),a.append(i),t.items&&t.items.length>0&&t.items.forEach((function(e){var t=(new r.Dom).createElement({elementType:"tr",className:"bfui-collapse-content"});t.html('
'+e.key+'
'+e.value+""),a.append(t)})),i.on("click",(function(){a.toggleClass("bfui-collapse-collapse")})),n}return a(t,e),t}(i.Control);n.Collapse=c},{"../../../Common/StatisticsDataManager":67,"../../Control":75,"../../Dom":109}],87:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../Dom"),l=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-colorpicker"},type:"ColorPicker",id:(t=t||{}).id,parent:t.parent};return(n=e.call(this,o)||this).inputColor=(new r.Dom).createElement({elementType:"input",className:"bfui-colorpicker-input"}),n.inputColor.attribute("type","color"),n._domElement.append(n.inputColor),n.onClick((function(){n.inputColor.click()})),n.onInput((function(){})),n.setValue(""),n}return a(t,e),t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e){return this.value=e,e?(this.inputColor.attribute("value",e),this.getDomElement().css("background",e),this.getDomElement().removeClass("no-color")):(this.getDomElement().css("background","none"),this.getDomElement().addClass("no-color")),this},t.prototype.onChange=function(e){var t=this;return this.onChangeFn&&this._domElement.off("change",this.onChangeFn),this.onChangeFn=function(n){var o=n.target.value;t.value=o,t.getDomElement().css("background",o),t.getDomElement().removeClass("no-color"),e(o)},this._domElement.on("change",this.onChangeFn),this},t.prototype.onInput=function(e){var t=this;return this.onInputFn&&this._domElement.off("input",this.onInputFn),this.onInputFn=function(n){var o=n.target.value;t.value=o,t.getDomElement().css("background",o),t.getDomElement().removeClass("no-color"),e(o)},this._domElement.on("input",this.onInputFn),this},t}(i.Control);n.default=l},{"../../Control":75,"../../Dom":109}],88:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../Dom"),l=e("../../../Common/StatisticsDataManager"),s=l.getUINamespace("Input"),c=function(e){function t(t){var n=this;l.SDM.send(s,"bf_c_UICrumb_new");var o={elementParam:{elementType:"div",className:"bfui-crumb"},type:"Crumb",id:(t=t||{}).id,parent:t.parent};return(n=e.call(this,o)||this).value=[],n.getDomElement().on("click",(function(e){var t=new r.Dom(e.target).attribute("data-id");t&&n._selectHandler&&n._selectHandler(t)})),n}return a(t,e),t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e){var t=this;return this.value=e,this.getDomElement().clear(),e.forEach((function(n,o){var a=(new r.Dom).createElement({elementType:"a",className:"bfui-crumb-item"});if(a.html(n.text),a.attribute("title",n.text),a.attribute("data-id",n.id),t.getDomElement().append(a),o!==e.length-1){var i=(new r.Dom).createElement({elementType:"i",className:"bfui-crumb-array gld-bf-arrow-up-sm"});t.getDomElement().append(i)}})),this},t.prototype.onSelect=function(e){return this._selectHandler=e,this},t}(i.Control);n.default=c},{"../../../Common/StatisticsDataManager":67,"../../Control":75,"../../Dom":109}],89:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../../Common/StatisticsDataManager"),l=r.getUINamespace("Input"),s=function(e){function t(t){var n=this;r.SDM.send(l,"bf_c_UIInput_new");var o={elementParam:{elementType:"input",className:"bfui-input"},type:"Input",id:(t=t||{}).id,parent:t.parent};return(n=e.call(this,o)||this)._domElement.attribute("type","text"),t.onClick&&n.onClick(t.onClick),t.onBlur&&n.onBlur(t.onBlur),n}return a(t,e),t.prototype.getValue=function(){return this._domElement.attribute("value")},t.prototype.setValue=function(e){return this._domElement.attribute("value",e)},t.prototype.onChange=function(e){var t=this;return this.onChangeFn&&this._domElement.off("change",this.onChangeFn),this._domElement.on("change",(function(e){t.onChangeFn(e.target.value)})),this.onChangeFn=e,this},t.prototype.onBlur=function(e){return this.onBlurFn&&this._domElement.off("blur",this.onBlurFn),this._domElement.on("blur",e),this.onBlurFn=e,this},t.prototype.onFocus=function(e){return this._domElement.on("focus",e),this},t.prototype.onInput=function(e){return this._domElement.on("input",e),this},t.prototype.enabled=function(e){return this._domElement.attribute("disabled",!e||""),this},t.prototype.setPlaceholder=function(e){this._domElement.attribute("placeholder",e)},t}(i.Control);n.default=s},{"../../../Common/StatisticsDataManager":67,"../../Control":75}],90:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../../Common/StatisticsDataManager"),l=r.getUINamespace("Label"),s=function(e){function t(t){var n=this;r.SDM.send(l,"bf_c_UILabel_new");var o={elementParam:{elementType:"div",className:"bfui-label"},type:"Label",id:(t=t||{}).id,parent:t.parent};return n=e.call(this,o)||this,t.text&&n.setText(t.text),t.onClick&&n.onClick(t.onClick),t.className&&n.addClass(t.className),n}return a(t,e),t.prototype.getText=function(){return this._domElement.html()},t.prototype.setText=function(e){return this._domElement.html(e),this},t}(i.Control);n.default=s},{"../../../Common/StatisticsDataManager":67,"../../Control":75}],91:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../../Common/StatisticsDataManager"),l=r.getUINamespace("Link"),s=function(e){function t(t){var n=this;r.SDM.send(l,"bf_c_UILink_new");var o={elementParam:{elementType:"a",className:"bfui-link"},type:"Link",id:(t=t||{}).id,parent:t.parent};return n=e.call(this,o)||this,t.text&&n.setText(t.text),n.setHref(t.href),t.onClick&&n.onClick(t.onClick),n}return a(t,e),t.prototype.getText=function(){return this._domElement.html()},t.prototype.setText=function(e){return this._domElement.html(e),this},t.prototype.getHref=function(){return this.href},t.prototype.setHref=function(e){return this.href=e||"javascript:void(0)",this._domElement.attribute("href",this.href),this},t}(i.Control);n.default=s},{"../../../Common/StatisticsDataManager":67,"../../Control":75}],92:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t=0&&t._checkedList.splice(n,1)}t._checkedHandler&&t._checkedHandler(i(t._checkedList))})),t._domElements.push(o.getDomElement()),n.addControl(o),e.checked&&o.setChecked(!0)}if(e.hasIcon){var a=void 0;"svg"===e.iconType?(a=(new l.Dom).createElement({elementType:"div",className:"bfui-list-icon"})).html(''):a=(new l.Dom).createElement({elementType:"i",className:"bfui-list-icon "+(e.iconClass?e.iconClass:"")}),n.getDomElement().append(a)}var r=(new l.Dom).createElement({elementType:"div",className:"bfui-list-text"});r.html(e.text),r.on("click",(function(){t._itemClickedHandler&&t._itemClickedHandler(e)})),t._domElements.push(r),n.getDomElement().append(r),t.getDomElement().append(n.getDomElement())})),this},t.prototype.onChecked=function(e){return this._checkedHandler=e,this},t.prototype.onItemClicked=function(e){return this._itemClickedHandler=e,this},t.prototype.getCheckedIds=function(){return this._checkedList.map((function(e){return e.id}))},t.prototype.getCheckedValue=function(){return this._checkedList},t}(r.Control);n.default=d},{"../../../Common/StatisticsDataManager":67,"../../Control":75,"../../Dom":109,"../../UIMap":112}],93:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n\n
'+t.content+'
\n \n \n ",n.getDomElement(),n),t.className&&n.addClass(t.className),t.parent?t.parent instanceof r.Control?t.parent.getDomElement().append(n.getDomElement()):t.parent instanceof s.Dom?t.parent.append(n.getDomElement()):t.parent instanceof HTMLElement&&t.parent.appendChild(n.getDomElement().element):document.body.appendChild(n.getDomElement().element),requestAnimationFrame((function(){return n.addClass("bfui-messagebox-show")})),n}return a(t,e),t.prototype.confirm=function(){var e=this;this.data.confirmHandler&&this.data.confirmHandler(),this.removeClass("bfui-messagebox-show"),this.getDomElement().on("transitionend",(function(){return e.destroy()}))},t.prototype.cancel=function(){var e=this;this.data.cancelHandler&&this.data.cancelHandler(),this.removeClass("bfui-messagebox-show"),this.getDomElement().on("transitionend",(function(){return e.destroy()}))},t}(r.Control);n.default=c},{"../../Common/Utils/Render":73,"../../Control":75,"../../Dom":109}],94:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../ControlGroup"),r=e("../../Dom"),l=e("../../../Common/StatisticsDataManager"),s=l.getUINamespace("Panel"),c=function(e){function t(t){var n=this;l.SDM.send(s,"bf_c_UIPanel_new");var o={elementParam:{elementType:"div",className:"bfui-panel"},type:"Panel",id:(t=t||{}).id,parent:t.parent};n=e.call(this,o)||this,t.onClick&&n.onClick(t.onClick);var a=n.header=(new r.Dom).createElement({elementType:"div",className:"bfui-panel-header"}),c={elementParam:{elementType:"div",className:"bfui-panel-content"},type:"ControlGroup"},u=n.content=new i.ControlGroup(c);n._domElement.append(a).append(u.getDomElement());var d=n.title=(new r.Dom).createElement({elementType:"div",className:"bfui-panel-title"}),h=n.headerCloseButton=(new r.Dom).createElement({elementType:"div",className:"bfui-button bfui-panel-headerclosebutton gld-bf-close-sm"});if(a.append(d).append(h),n.onCloseFn=function(){n.hide()},h.on("click",n.onCloseFn),t.title&&n.setTitle(t.title),n.sizeFixed=!0===t.sizeFixed,n.draggable=!1!==t.draggable,n.footerDisabled=!0===t.footerDisabled,t.position&&n.setPosition(t.position),isNaN(t.width)?n.width=300:(n.width=t.width,!isNaN(t.minWidth)&&t.minWidth>n.width&&(t.minWidth=n.width)),t.minWidth=t.minWidth||100,n.getDomElement().css({width:n.width+"px"}),isNaN(t.height)?(n.height=200,n.getDomElement().css({minHeight:"200px",maxHeight:"420px"})):(n.height=t.height,!isNaN(t.minHeight)&&t.minHeight>n.height&&(t.minHeight=n.height),n.getDomElement().css("height",n.height+"px")),t.minHeight=t.minHeight||80,n.getDomElement().on("mousedown",(function(){n.topShow()})),n.draggable){var p,f,m,v,g,y,b,_,C=!1,M=function(e){if(C){var t,o,a,i,r=e.clientX-p+m,l=e.clientY-f+v,s=y.width,c=y.height,u=b.width,d=b.height;_.indexOf("left")>=0?(t=0,a=s-u):_.indexOf("right")>=0?(t=-s+u,a=0):_.indexOf("center")>=0&&(t=-(s-u)/2,a=(s-u)/2),_.indexOf("top")>=0?(o=0,i=c-d):_.indexOf("bottom")>=0?(o=-c+d,i=0):_.indexOf("middle")>=0&&(o=-(c-d)/2,i=(c-d)/2),r=Math.max(r,t),r=Math.min(r,a),l=Math.max(l,o),l=Math.min(l,i),n.setOffset({x:r,y:l})}},w=function(e){C=!1,g.off("mousemove",M).off("mouseup",w)};a.on("mousedown",(function(e){C=!0,p=e.clientX,f=e.clientY;var t=n.getPositionParam(),o=t.anchor,a=t.offset,i=a.x,l=a.y;_=o.toLowerCase(),m=i,v=l,(g=g||new r.Dom(n.getDomElement().getElement().parentElement)).on("mousemove",M).on("mouseup",w),y=g.getDimensions(),b=n.getDimensions()})).on("mousemove",M).on("mouseup",w).addClass("bfui-panel-header-dragable")}if(!n.sizeFixed){var S=t.minWidth,E=t.minHeight;n.sizeFixedDom=(new r.Dom).createElement({elementType:"div",className:"bfui-panel-sizefixed"}),n.getDomElement().append(n.sizeFixedDom);var L,I,T,P,x,A=!1,B=function(e){if(A){var t=n.width,o=n.height;n.width=e.clientX-L+T,n.height=e.clientY-I+P,n.width=0&&(r+=c/2),s.indexOf("Middle")>=0&&(l+=u/2),s.indexOf("Right")>=0&&(r+=c),s.indexOf("Bottom")>=0&&(l+=u),n.setOffset({x:r,y:l})}},D=function(e){A=!1,x.off("mousemove",B).off("mouseup",D)};n.sizeFixedDom.on("mousedown",(function(e){n.getDomElement().css({height:n.getHeight()+"px"}).css({minWidth:S+"px",minHeight:E+"px",maxHeight:""}),A=!0,L=e.clientX,I=e.clientY,T=n.getWidth(),P=n.getHeight(),(x=x||new r.Dom(n.getDomElement().getElement().parentElement)).on("mousemove",B).on("mouseup",D)})).on("mousemove",B).on("mouseup",D)}if(n.footerDisabled){var k={elementParam:{elementType:"div",className:"bfui-panel-footer"},type:"ControlGroup"};n.footer=new i.ControlGroup(k),n._domElement.append(n.footer.getDomElement())}return n}return a(t,e),t.prototype.setTips=function(e,t){this.tipsElement&&this.tipsElement.destroy();var n={default:"bfui-panel-tips",loading:"bfui-panel-loading"},o=n[t]||n.default,a=(new r.Dom).createElement({elementType:"div",className:o});a.html(e),this.tipsElement=a,this.showTips()},t.prototype.showTips=function(){if(this.tipsElement)return this.content.getDomElement().html(""),this.content.getDomElement().append(this.tipsElement),this},t.prototype.getContent=function(){return this.content},t.prototype.clearContent=function(){return this.content.getDomElement().html(""),this},t.prototype.getFooter=function(){return this.footer},t.prototype.clearFooter=function(){return this.footerDisabled&&this.footer.getDomElement().html(""),this},t.prototype.setTitle=function(e){return this.title.html(e),this},t.prototype.getTitle=function(){return this.title.html()},t.prototype.addControl=function(e,t){return this.content.addControl(e,t),this},t.prototype.removeControl=function(e){return this.content.removeControl(e),this},t.prototype.indexOf=function(e){return this.content.indexOf(e)},t.prototype.getControl=function(e){return this.content.getControl(e)},t.prototype.getAllControls=function(){return this.content.getAllControls()},t.prototype.onClose=function(e,t){var n=this;return void 0===t&&(t=!0),this.headerCloseButton.off("click",this.onCloseFn),this.onCloseFn=function(o){e(o),t&&n.hide()},this.headerCloseButton.on("click",this.onCloseFn),this},t.prototype.topShow=function(){document.querySelectorAll(".bfui-panel").forEach((function(e){new r.Dom(e).removeClass("bfui-panel-topshow")})),this.getDomElement().addClass("bfui-panel-topshow")},t}(i.Control);n.default=c},{"../../../Common/StatisticsDataManager":67,"../../ControlGroup":78,"../../Dom":109}],95:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("./../CheckState/CheckState"),r=e("../../../Common/StatisticsDataManager"),l=r.getUINamespace("Radio"),s=function(e){function t(t){r.SDM.send(l,"bf_c_UIRadio_new");var n={elementParam:{elementType:"div",className:"bfui-radio"},type:"Radio",name:"radio",id:t.id,className:"bfui-radio-radio",parent:t.parent};return t=Object.assign({},n,t),e.call(this,t)||this}return a(t,e),t}(i.CheckState);n.default=s},{"../../../Common/StatisticsDataManager":67,"./../CheckState/CheckState":84}],96:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../UIEvents"),l=e("../../Dom"),s=e("../../../Common/StatisticsDataManager"),c=e("../Input/Input"),u=e("./SearchResultOptionGroup"),d=(s.getUINamespace("Search"),function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-search"},type:"Search",id:(t=t||{}).id,parent:t.parent};(n=e.call(this,o)||this).enableAnimation=!1!==t.enableAnimation;(new l.Dom).createElement({elementType:"i",className:"bfui-search-icon gld-bf-search-md",parent:n.getDomElement()});return n.input=new c.default({parent:n}),n.input.addClass("bfui-search-input").onBlur((function(){return window.setTimeout((function(){return n.searchResult.hide()}),100)})).onFocus((function(){n.input.getValue()&&n.onSearch()})),t.placeholder&&n.setPlaceholder(t.placeholder),n.noResultText=t.noResultText||"没有找到对应内容",n.setSearchHandler(t.searchHandler||function(){return[]}),n.setSelectHandler(t.selectHandler||function(){return null}),n.searchResult=new u.default({enableAnimation:n.enableAnimation}),new l.Dom(document.body).append(n.searchResult.getDomElement()),n.searchResult.on(r.default.ValueChanged,(function(e){e&&n.input.setValue(e.text),n.searchResult.hide(),n.selectHandler instanceof Function&&n.selectHandler(e)})),n}return a(t,e),t.prototype.onSearch=function(){var e=this,t=this.input.getValue();if(t){var n=this.searchResultValue=this.searchHandler(t);n&&n.length>0?this.searchResult.setValues(n):this.searchResult.setValues([{html:this.noResultText,class:"bfui-search-noresult"},{html:"",class:"bfui-search-noresult"}]);var o=this.getPosition();this.searchResult.setFixedPosition(o),requestAnimationFrame((function(){return e.searchResult.show()}))}else this.searchResult.hide()},t.prototype.setSearchHandler=function(e){var t=this;e instanceof Function&&(this.searchHandler=e,this.input.onInput((function(){t.onSearch()})))},t.prototype.setSelectHandler=function(e){e instanceof Function&&(this.selectHandler=e)},t.prototype.setPlaceholder=function(e){this.input.getDomElement().attribute("placeholder",e)},t.prototype.setNoResultText=function(e){this.noResultText=e},t.prototype.getSearchResultGroup=function(){return this.searchResult},t}(i.Control));n.default=d},{"../../../Common/StatisticsDataManager":67,"../../Control":75,"../../Dom":109,"../../UIEvents":111,"../Input/Input":89,"./SearchResultOptionGroup":98}],97:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.SearchResultOption=void 0;var i=e("../../Control"),r=e("../../UIEvents"),l=function(e){function t(t){var n=this;t=t||{};var o={elementParam:{elementType:"div",className:"bfui-search-option"},type:"SearchResultOption"};return(n=e.call(this,o)||this).getDomElement().html(t.html||t.text||""),n.param=t,n.disabled=!0===t.disabled,n.selected=!0===t.selected,n.value=t.value,n.text=t.text,n.setTooltip(n.text),n.setDisabled(n.disabled).setSelected(n.selected),t.class&&n.addClass(t.class),n.onClick((function(){n.selected||n.disabled||n._parent.setSelected(n),n.trigger(r.default.Clicked)})),n}return a(t,e),t.prototype.setSelected=function(e){return this.disabled||this.selected===e||(this.selected=e,e?this.addClass("bfui-search-option-selected"):this.removeClass("bfui-search-option-selected")),this},t.prototype.setDisabled=function(e){return this.disabled!==e&&(this.setSelected(!1),this.disabled=e,e?this.addClass("bfui-search-option-disabled"):this.removeClass("bfui-search-option-disabled")),this},t.prototype.getText=function(){return this.text},t.prototype.getValue=function(){return void 0===this.value?this.getText():this.value},t.prototype.getParam=function(){return this.param},t}(i.Control);n.SearchResultOption=l},{"../../Control":75,"../../UIEvents":111}],98:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../ControlGroup"),r=e("../../UIEvents"),l=e("./SearchResultOption"),s=e("../../../Common/Utils/DataUtil"),c=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-search-content"},type:"ControlGroup"};return(n=e.call(this,o)||this).enableAnimation=!1!==t.enableAnimation,n.enableAnimation&&n.addClass("bfui-search-animation"),t.values&&n.setValues(t.values),n.hide(),n}return a(t,e),t.prototype.setValues=function(e){var t=this;return this.clearControls(!0),this.values=[],e.forEach((function(e){var n;n=s.default.assertType(e,"obj")?e:{html:e.toString()},t.values.push(n);var o=new l.SearchResultOption(n);t.addControl(o),o.on(r.default.Clicked,(function(){t.trigger(r.default.Clicked,o)}))})),this},t.prototype.isVisible=function(){return this.enableAnimation?this._visible:e.prototype.isVisible.call(this)},t.prototype.setFixedPosition=function(e){var t=window.innerHeight,n=this.getDomElement().getElement(),o=Math.min(125,this._height);e.bottom+o>t?(n.style.top="",n.style.bottom=t-e.top+"px"):(n.style.top=e.bottom+"px",n.style.bottom=""),n.style.left=e.left+"px",n.style.width=e.right-e.left+"px"},t.prototype.show=function(){var t=this;if(this.enableAnimation){this._visible=!0;var n=function(){t._inTransition&&(t.getDomElement().removeClass("bfui-search-overflow-hidden").off("transitionend",n),t._inTransition=!1)};if(this._inTransition=!0,this._children.length>0){var o=this._children[0].getDimensions().height;this._height=this._children.length*o+2}this.getDomElement().addClass("bfui-search-overflow-hidden").css({"border-width":"1px",height:this._height+"px"}).on("transitionend",n)}else e.prototype.show.call(this);return this},t.prototype.hide=function(){return this.enableAnimation?(this._visible=!1,this.getDomElement().addClass("bfui-search-overflow-hidden").css({"border-width":"0px",height:"0px"})):e.prototype.hide.call(this),this},t.prototype.setSelected=function(e){if(void 0!==e){var t=!1;if(e instanceof l.SearchResultOption?this.indexOf(e)>=0&&(t=!0):this.getAllControls().some((function(n){if(n.getText()===e.toString())return e=n,t=!0,!0})),t&&this.selected!==e){this.getAllControls().forEach((function(t){t.setSelected(t===e)})),this.selected=e;var n=this.indexOf(this.selected),o=this.selected.getValue(),a=this.selected.getText(),i=this.selected.getParam();this.trigger(r.default.ValueChanged,{text:a,value:o,index:n,data:i})}return this}},t.prototype.setSelectedByIndex=function(e){var t=this.getControl({index:e});return t&&this.setSelected(t),this},t.prototype.setSelectedByValue=function(e){var t;return this.getAllControls().some((function(n){if((n=n).getValue()===e)return t=n,!0})),this.setSelected(t)},t.prototype.getSelected=function(){return this.selected},t.prototype.getValues=function(){return this.values},t.prototype.clearSelection=function(){this.selected=null,this.trigger(r.default.ValueChanged)},t}(i.ControlGroup);n.default=c},{"../../../Common/Utils/DataUtil":68,"../../ControlGroup":78,"../../UIEvents":111,"./SearchResultOption":97}],99:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../UIEvents"),l=e("../../Dom"),s=e("./SelectOptionGroup"),c=e("../../../Common/StatisticsDataManager"),u=c.getUINamespace("Select"),d=function(e){function t(t){var n=this;c.SDM.send(u,"bf_c_UISelect_new");var o={elementParam:{elementType:"div",className:"bfui-select"},type:"Select",id:(t=t||{}).id,parent:t.parent};(n=e.call(this,o)||this).enableAnimation=!1!==t.enableAnimation;var a=n.header=(new l.Dom).createElement({elementType:"div",className:"bfui-select-header"}),i=n.title=(new l.Dom).createElement({elementType:"div",className:"bfui-select-title"});i.html("请选择");var d=n.toggleButton=(new l.Dom).createElement({elementType:"div",className:"bfui-button bfui-select-togglebutton gld-bf-arrow-down-sm"});n.enableAnimation&&d.addClass("bfui-select-animation"),a.append(i).append(d).on("click",(function(e){n.disabled||(n.content.isVisible()?n.hideContent():n.showContent())}));var h=n.content=new s.default({enableAnimation:n.enableAnimation,values:t.values,maxHeight:t.maxHeight});return n.getDomElement().append(a),new l.Dom(document.body).append(h.getDomElement()),n.onChange(t.onChange),h.on(r.default.ValueChanged,(function(e){e&&n.title.html(e.text),n.onChangeCallback instanceof Function&&n.onChangeCallback(e)})),h.on(r.default.Clicked,(function(e){n.hideContent()})),void 0!==t.defaultIndex&&n.setSelected(t.defaultIndex),t.width&&n.getDomElement().css("width",t.width+"px"),document.addEventListener("mousedown",(function(e){var t=a.getElement(),o=e.target.parentElement;e.target!=t&&o!=t&&o!=h.getDomElement().getElement()&&e.target!=h.getDomElement().getElement()&&n.hideContent()}),!1),window.addEventListener("resize",(function(){n._resize()})),n.scrollFunc=n._scrollFunc.bind(n),n}return a(t,e),t.prototype._resize=function(){var e=this.header.getPosition();this.content.setFixedPosition(e)},t.prototype.setValues=function(e){return this.content.setValues(e),this},t.prototype.setSelected=function(e){return this.content.setSelectedByIndex(e),this.title.html(this.content.getSelected().getText()),this.hideContent(),this},t.prototype.setSelectedByValue=function(e){return this.content.setSelectedByValue(e),this},t.prototype.setDisabled=function(e){return void 0===e&&(e=!0),this.disabled=e,e?this.addClass("bfui-select-disabled"):this.removeClass("bfui-select-disabled"),this},t.prototype.onChange=function(e){return e instanceof Function&&(this.onChangeCallback=e),this},t.prototype._scrollFunc=function(){this.hideContent(),this.getDomElement().getParent().removeEventListener("scroll",this.scrollFunc,!1)},t.prototype.showContent=function(){return this.toggleButton.addClass("bfui-select-togglebutton-opened"),this._resize(),this.content.show(),this.getDomElement().getParent().addEventListener("scroll",this.scrollFunc,!1),this},t.prototype.hideContent=function(){return this.toggleButton.removeClass("bfui-select-togglebutton-opened"),this.content.hide(),this},t.prototype.clearSelection=function(e){return this.content.clearSelection(),this.setText(e),this},t.prototype.setText=function(e){return this.title.html(e),this},t.prototype.setMaxHeight=function(e){this.content.setMaxHeight(e)},t}(i.Control);n.default=d},{"../../../Common/StatisticsDataManager":67,"../../Control":75,"../../Dom":109,"../../UIEvents":111,"./SelectOptionGroup":101}],100:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.SelectOption=void 0;var i=e("../../Control"),r=e("../../UIEvents"),l=function(e){function t(t){var n=this;t=t||{};var o={elementParam:{elementType:"div",className:"bfui-select-option"},type:"SelectOption"};return(n=e.call(this,o)||this).setTooltip(t.text).getDomElement().html(t.text),n.disabled=!0===t.disabled,n.selected=!0===t.selected,n.value=t.value,n.setDisabled(n.disabled).setSelected(n.selected),!1===t.visible&&n.hide(),n.onClick((function(){n.selected||n.disabled||n._parent.setSelected(n),n.trigger(r.default.Clicked)})),n}return a(t,e),t.prototype.setSelected=function(e){return this.disabled||this.selected===e||(this.selected=e,e?this.addClass("bfui-select-option-selected"):this.removeClass("bfui-select-option-selected")),this},t.prototype.setDisabled=function(e){return this.disabled!==e&&(this.setSelected(!1),this.disabled=e,e?this.addClass("bfui-select-option-disabled"):this.removeClass("bfui-select-option-disabled")),this},t.prototype.getText=function(){return this.getDomElement().html()},t.prototype.getValue=function(){return void 0===this.value?this.getText():this.value},t}(i.Control);n.SelectOption=l},{"../../Control":75,"../../UIEvents":111}],101:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../ControlGroup"),r=e("../../UIEvents"),l=e("./SelectOption"),s=e("../../../Common/Utils/DataUtil"),c=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-select-content"},type:"ControlGroup"};return(n=e.call(this,o)||this).enableAnimation=!1!==t.enableAnimation,n.enableAnimation&&n.addClass("bfui-select-animation"),n._maxHeight=t.maxHeight||125,n.getDomElement().css("maxHeight",n._maxHeight+"px"),t.values&&n.setValues(t.values),n.hide(),n}return a(t,e),t.prototype.setValues=function(e){var t=this;return this.clearControls(),this.values=[],e.forEach((function(e){var n;n=s.default.assertType(e,"obj")?e:{text:e.toString()},t.values.push(n);var o=new l.SelectOption(n);t.addControl(o),o.on(r.default.Clicked,(function(){t.trigger(r.default.Clicked,o)}))})),this._height=0,this},t.prototype.isVisible=function(){return this.enableAnimation?this._visible:e.prototype.isVisible.call(this)},t.prototype.getOptionsHeight=function(){if(!this._height){var e=2;this._children&&this._children.forEach((function(t){t.isVisible()&&(e+=t.getHeight())})),this._height=e}return this._height},t.prototype.setFixedPosition=function(e){var t=window.innerHeight,n=this._maxHeight,o=this.getDomElement().getElement(),a=Math.min(n,this.getOptionsHeight());e.bottom+a>t?(o.style.top="",o.style.bottom=t-e.top+"px"):(o.style.top=e.bottom+"px",o.style.bottom=""),o.style.left=e.left+"px",o.style.width=e.right-e.left+"px"},t.prototype.show=function(){var t=this;if(this.enableAnimation){this._visible=!0;var n=function(){t._inTransition&&(t.getDomElement().removeClass("bfui-select-overflow-hidden").off("transitionend",n),t._inTransition=!1)};this._inTransition=!0,this.getDomElement().addClass("bfui-select-overflow-hidden").css({"border-width":"1px",height:this.getOptionsHeight()+"px"}).on("transitionend",n)}else e.prototype.show.call(this);return this},t.prototype.hide=function(){return this.enableAnimation?(this._visible=!1,this.getDomElement().addClass("bfui-select-overflow-hidden").css({"border-width":"0px",height:"0px"})):e.prototype.hide.call(this),this},t.prototype.setSelected=function(e){if(void 0!==e){var t=!1;if(e instanceof l.SelectOption?this.indexOf(e)>=0&&(t=!0):this.getAllControls().some((function(n){if(n.getText()===e.toString())return e=n,t=!0,!0})),t&&this.selected!==e){this.getAllControls().forEach((function(t){t.setSelected(t===e)})),this.selected=e;var n=this.selected.getText(),o=this.indexOf(this.selected),a=this.selected.getValue();this.trigger(r.default.ValueChanged,{text:n,value:a,index:o})}return this}},t.prototype.setSelectedByIndex=function(e){var t=this.getControl({index:e});return t&&this.setSelected(t),this},t.prototype.setSelectedByValue=function(e){var t;return this.getAllControls().some((function(n){if((n=n).getValue()===e)return t=n,!0})),this.setSelected(t)},t.prototype.getSelected=function(){return this.selected},t.prototype.getValues=function(){return this.values},t.prototype.clearSelection=function(){this.selected=null,this.trigger(r.default.ValueChanged)},t.prototype.setMaxHeight=function(e){this._maxHeight=e,this.getDomElement().css("maxHeight",this._maxHeight+"px")},t}(i.ControlGroup);n.default=c},{"../../../Common/Utils/DataUtil":68,"../../ControlGroup":78,"../../UIEvents":111,"./SelectOption":100}],102:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../Control"),r=e("../../UIEvents"),l=e("../../Dom"),s=e("../../../Common/StatisticsDataManager"),c=e("../Tooltip/Tooltip"),u=s.getUINamespace("Slider"),d=function(e){function t(t){var n=this;s.SDM.send(u,"bf_c_UISlider_new");var o={elementParam:{elementType:"div",className:"bfui-slider"},type:"Slider",id:(t=t||{}).id,parent:t.parent};(n=e.call(this,o)||this).minValue=t.minValue||0,n.maxValue=t.maxValue||100,t.onClick&&n.onClick(t.onClick),n.onChangeCallback=t.onChangeCallback;var a=n.sliderLinePart=(new l.Dom).createElement({elementType:"div",className:"bfui-slider-line"}),i=n.sliderLeftPart=(new l.Dom).createElement({elementType:"div",className:"bfui-slider-left"}),c=n.sliderValuePart=(new l.Dom).createElement({elementType:"div",className:"bfui-slider-value"});n._domElement.append(a).append(i).append(c),n.setValue(t.value||0),n.setEnableTooltip(t.enableTooltip),n.on(r.default.ValueChanged,(function(e){n.onChangeCallback instanceof Function&&n.onChangeCallback(Math.round(e))}));var d,h,p=!1;c.on("mousedown",(function(e){p=!0,d=e.clientX,h=n.getValue(),n.enableTooltip&&n.tooltipControl&&n.tooltipControl.setEnableAlwaysShow(!0)}));var f=function(e){if(p){var t=e.clientX,o=h+(t-d)*(n.maxValue-n.minValue)/(n.sliderLinePart.getWidth()-10);o>n.maxValue&&(o=n.maxValue),o'),e.forEach((function(e,o){null==t&&e.actived&&(t=o),n.addTab(e)})),this.setActive(null==t?0:t)},t.prototype.getOptions=function(){var e=[];return this.tabsArray.forEach((function(t){e.push(t.param)})),e},t.prototype.setActive=function(e){var t=this,n=0;this.tabsArray.forEach((function(o,a){if(a===e){t.activeValue=o.getValue();var i=t.header.getElement().querySelector(".is-active"),r=t.content.getElement().querySelector(".is-active");i&&i.removeClass("is-active"),r&&r.removeClass("is-active"),o.setActive(),t.content.getElement().querySelector("#pane-"+o.param.name).addClass("is-active");var l=t.header.getElement().querySelector(".bfui-tabs-active-bar");l.style.transform="translateX("+n+"px)",l.style.width=o.getDomElement().getWidth()+"px"}else n=n+o.getDomElement().getWidth()+20})),this.selectHandler&&this.selectHandler(this.activeValue)},t.prototype.getActiveValue=function(){return this.activeValue},t.prototype.clearOptions=function(){this.tabsArray=[],this.header.html(""),this.content.html("")},t.prototype.setEnabled=function(e){this.tabsArray.forEach((function(t,n){t.setEnabled(e.indexOf(n)>-1)}))},t.prototype.onSelect=function(e){this.selectHandler=e},t}(i.Control);n.default=d},{"../../../Common/StatisticsDataManager":67,"../../Control":75,"../../Dom":109,"../../UIEvents":111,"./Tab":104}],106:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=function(e){function t(t){var n=this,o={elementParam:{elementType:"div",className:"bfui-tooltip"},type:"Tooltip",id:t.id,parent:t.parent};(n=e.call(this,o)||this).hostDom=t.hostDom,n.placement=t.placement||"right",n.addClass("bfui-tooltip-"+n.placement).setHTML(t.content).hide(),"dark"===t.theme&&n.addClass("bfui-tooltip-dark"),t.className&&n.addClass(t.className),t.width&&n.getDomElement().css({width:t.width+"px"});var a=!1,i=null,r=function(){a=!1,n.enableAlwaysShow||(i&&(clearTimeout(i),i=null),i=setTimeout((function(){a||n.hide()}),500))};return t.hostDom.on("mouseenter",(function(){a=!0,n.show(),requestAnimationFrame((function(){n.updatePosition()}))})).on("mouseleave",r),n.getDomElement().on("mouseenter",(function(){a=!0})).on("mouseleave",r),document.body.appendChild(n.getDomElement().getElement()),n}return a(t,e),t.prototype.setEnableAlwaysShow=function(e){this.enableAlwaysShow=e,e?this.show():this.hide(),this.updatePosition()},t.prototype.updatePosition=function(){var e,t,n=this,o=this.hostDom.getPosition(),a=o.top,i=o.right,r=(o.bottom,o.left),l=this.hostDom.getDimensions(),s=l.height,c=l.width,u=this.getDimensions(),d=u.width,h=u.height;switch(this.placement){case"right":e=a+s/2-h/2,t=i+10,n.getDomElement().css({left:t+"px",top:e+"px"});break;case"top":!function(){var e=a-h-10,t=r+c/2-d/2;n.getDomElement().css({left:t+"px",top:e+"px"})}()}},t}(e("../../Control").Control);n.default=i},{"../../Control":75}],107:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../ControlGroup"),r=e("../../UIEvents"),l=e("../../Dom"),s=e("../../../Common/StatisticsDataManager"),c=s.getUINamespace("Tree"),u=function(e){function t(t){var n=this;s.SDM.send(c,"bf_c_UITree_new");var o={elementParam:{elementType:"div",className:"bfui-tree"},type:"Tree",id:(t=t||{}).id,parent:t.parent},a={elementParam:{elementType:"div",className:"bfui-tree-content"},type:"ControlGroup"},r=(n=e.call(this,o)||this).content=new i.ControlGroup(a);n.header=(new l.Dom).createElement({elementType:"div",className:"bfui-tree-header"}),n.footer=(new l.Dom).createElement({elementType:"div",className:"bfui-tree-footer"}),n.title=(new l.Dom).createElement({elementType:"div",className:"bfui-tree-title"});return n._domElement.append(r.getDomElement()),t.title&&n.setTitle(t.title),n.sizeFixed=t.sizeFixed,n}return a(t,e),t.prototype.addTreeNode=function(e,t){var n=this;this.content.addControl(e,t),e.on(r.default.RightClicked,(function(e){n.trigger(r.default.RightClicked,e)}))},t.prototype.getControl=function(e){return this.content.getControl(e)},t.prototype.getAllControls=function(){return this.content.getAllControls()},t.prototype.setTitle=function(e){return this.title.html(e),this},t.prototype.getTitle=function(){return this.title.html()},t.prototype.getSelection=function(){},t.prototype.clearSelection=function(){},t}(i.Control);n.default=u},{"../../../Common/StatisticsDataManager":67,"../../ControlGroup":78,"../../Dom":109,"../../UIEvents":111}],108:[function(e,t,n){"use strict";var o,a=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var i=e("../../ControlGroup"),r=e("../../UIEvents"),l=e("../../Dom"),s=function(e){function t(t){var n=this;void 0===(t=t||{}).isLoaded&&(t.isLoaded=!0);var o={elementParam:{elementType:"div",className:t.isLoaded?"bfui-tree-node":"bfui-tree-node not-allowed"},type:"TreeNode",id:t.id,parent:t.parent},a={elementParam:{elementType:"div",className:"bfui-subtree"},type:"ControlGroup"};(n=e.call(this,o)||this).subNode=new i.ControlGroup(a);return n.opt=t,n.opt.isChecked?n.checkedState="checked":n.checkedState="unchecked",n}return a(t,e),t.prototype.initTreeNode=function(e,t){var n=this,o=(new l.Dom).createElement({elementType:"div",className:"bfui-tree-info"});if(this.opt.hasCollapse){var a=this.opt.hasCollapse&&this.opt.isExpand?"open":"";this.opt.isExpand?this.subNode.show():this.subNode.hide();var i=this.collapseWrap=(new l.Dom).createElement({elementType:"span",className:"bfui-collapse "+a});i.html(''),i.on("click",(function(){n.toggleExpansion()}))}if(this.opt.hasCheckBox){var s="";this.opt.isChecked&&(this.isChildHasUncheckState(this.opt.content.children)&&"checked"!==this.opt.parent.checkedState?(s="bfui-checkbox bfui-half",this.checkedState="half"):s="bfui-checked"),(this.checkbox=(new l.Dom).createElement({elementType:"span",className:"bfui-checkbox "+s})).on("click",(function(){var e=!n.opt.isChecked;n.setCheckState(e),n.trigger(r.default.CheckedChanged,n,e)}))}if(this.opt.hasIsolate){var c=this.opt.isIsolate?"gld-bf-component-sm":"gld-bf-component-fill-sm";(this.isolateBox=(new l.Dom).createElement({elementType:"i",className:"bfui-isolate bimface-icon "+c})).on("click",(function(){n.setIsolateState(!n.opt.isIsolate),n.trigger(r.default.IsolateChanged,n,!n.opt.isIsolate)}))}var u=this.treeName=(new l.Dom).createElement({elementType:"span",className:"bfui-tree-name"}),d="";t&&(d="svg"===t.type?'':''),u.html(""+d+e),u.attribute("title",""+e),u.on("click",(function(){if(!n.opt.hasSelection&&n.opt.hasCollapse)n.toggleExpansion();else{var e=!n.selectionState;n.currentUnSelect(n.opt.rootTree),n.setSelectState(e),n.trigger(r.default.SelectionChanged,n,e)}})),u.on("contextmenu",(function(e){e.preventDefault(),n.trigger(r.default.RightClicked,{event:e,node:n})})),this._domElement.append(o),this.checkbox&&o.append(this.checkbox),this.collapseWrap&&o.append(this.collapseWrap),this.isolateBox&&o.append(this.isolateBox),o.append(this.treeName),this.getTreeInfoDom=function(){return o},this._domElement.append(this.subNode.getDomElement())},t.prototype.getSelectState=function(){return this.selectionState},t.prototype.setSelectState=function(e){this.selectionState=e,this.selectionState?this.opt.hasSelection&&this.treeName.addClass("bfui-selected"):this.treeName&&this.treeName.removeClass("bfui-selected")},t.prototype.currentUnSelect=function(e){for(var t=0,n=e.getAllControls();t0){for(var n=void 0,o=0,a=t.length;o0)for(var a=0;a0;)o()}return!!t.includes(!1)},t.prototype.getIsolateState=function(){return this.opt.isIsolate},t.prototype.setIsolateState=function(e){(this.opt.isIsolate=e,this.opt.hasIsolate)&&(e?(this.isolateBox.removeClass("gld-bf-component-fill-sm"),this.isolateBox.addClass("gld-bf-component-sm")):(this.isolateBox.addClass("gld-bf-component-fill-sm"),this.isolateBox.removeClass("gld-bf-component-sm")),this.getAllControls().forEach((function(t){t.setIsolateState(e)})))},t.prototype.setParentIsolateState=function(e){var t=this.getAllControls();if(t&&t.length>0){for(var n=0,o=0;o=0;t--)this.subNode.removeControl(e[t])},t.prototype.getControl=function(e,t){if(void 0===t&&(t=!1),!t)return this.subNode.getControl(e);if(this.subNode.getControl(e))return this.subNode.getControl(e);for(var n=0,o=this.getAllControls();nt?this.element.insertBefore(e.element,this.element.childNodes[t]):this.append(e),this},e.prototype.remove=function(e){return this.element.removeChild(e.element),this},e.prototype.clear=function(){for(;this.element.childNodes.length>0;)this.element.removeChild(this.element.childNodes[0]);return this},e.prototype.replace=function(e,t){return this.element.replaceChild(e.getElement(),t.getElement()),this},e.prototype.show=function(){return this.visible||(this.element.style.display=this.displayType,this.visible=!0),this},e.prototype.hide=function(){return this.visible?(this.displayType=this.element.style.display,"none"===this.displayType&&(this.displayType=void 0),this.element.style.display="none",this.visible=!1,this):this},e.prototype.isVisible=function(){return this.visible},e.prototype.on=function(e,t){return this.element.addEventListener(e,t),this.eventMap[e]=this.eventMap[e]||[],this.eventMap[e].push(t),this},e.prototype.off=function(e,t){if(this.element.removeEventListener(e,t),this.eventMap[e]){var n=this.eventMap[e].indexOf(t);n>=0&&this.eventMap[e].splice(n,1)}return this},e.prototype.destroy=function(){var e=this,t=function(t){n.eventMap[t].forEach((function(n){e.off(t,n)}))},n=this;for(var o in this.eventMap)t(o);this.element.parentElement&&this.element.parentElement.removeChild(this.element),this.eventMap=void 0,this.displayType=void 0,this.themeType=void 0,this.element=void 0},e.prototype.getClass=function(){return this.getElement().getAttribute("class")},e.prototype.hasClass=function(e){var t=this.getClass();return!!t&&(t&&t.split(" ")).indexOf(e)>-1},e.prototype.addClass=function(){for(var e,t=[],n=0;n.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}")}catch(e){console&&console.log(e)}}function s(){i||(i=!0,o())}t=function(){var e,t;(t=document.createElement("div")).innerHTML=r,r=null,(e=t.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",t=e,(e=document.body).firstChild?function(e,t){t.parentNode.insertBefore(e,t)}(t,e.firstChild):e.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(o=t,a=e.document,i=!1,function e(){try{a.documentElement.doScroll("left")}catch(t){return void setTimeout(e,50)}s()}(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,s())})}(window)},{}],111:[function(e,t,n){"use strict";var o;Object.defineProperty(n,"__esModule",{value:!0}),function(e){e.ValueChanged="ValueChanged",e.Clicked="Clicked",e.RightClicked="RightClicked",e.MouseOver="MouseOver",e.MouseOut="MouseOut",e.CheckedChanged="CheckedChanged",e.SelectionChanged="SelectionChanged",e.ExpendChanged="ExpendChanged",e.IsolateChanged="IsolateChanged"}(o||(o={})),n.default=o},{}],112:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ColorPicker=n.Search=n.List=n.Crumb=n.ControlAlignOption=n.ControlAnchor=n.Tabs=n.Tree=n.Slider=n.Radio=n.Collapse=n.Checkbox=n.Switch=n.Select=n.Panel=n.Input=n.Link=n.Label=n.UIEvents=n.PropertyPanel=n.RadioGroup=n.Row=n.Toolbar=n.Button=void 0;var o=e("./Controls/Button/Button");n.Button=o.default;var a=e("./Controls/Label/Label");n.Label=a.default;var i=e("./Controls/Link/Link");n.Link=i.default;var r=e("./Controls/Input/Input");n.Input=r.default;var l=e("./Controls/Panel/Panel");n.Panel=l.default;var s=e("./Controls/Select/Select");n.Select=s.default;var c=e("./Controls/Switch/Switch");n.Switch=c.default;var u=e("./Controls/Checkbox/Checkbox");n.Checkbox=u.default;var d=e("./Controls/Collapse/Collapse");Object.defineProperty(n,"Collapse",{enumerable:!0,get:function(){return d.Collapse}});var h=e("./Controls/Radio/Radio");n.Radio=h.default;var p=e("./Controls/Slider/Slider");n.Slider=p.default;var f=e("./Controls/Tree/Tree");n.Tree=f.default;var m=e("./ControlGroups/Toolbar/Toolbar");n.Toolbar=m.default;var v=e("./ControlGroups/Row/Row");n.Row=v.default;var g=e("./ControlGroups/RadioGroup/RadioGroup");n.RadioGroup=g.default;var y=e("./ControlGroups/PropertyPanel/PropertyPanel"),b=e("./ControlAlign/ControlAlignOption");n.ControlAlignOption=b.default;var _=e("./ControlAnchor/ControlAnchor");n.ControlAnchor=_.default;var C=e("./Controls/Tabs/Tabs");n.Tabs=C.default;var M=e("./Controls/Crumb/Crumb");n.Crumb=M.default;var w=e("./Controls/List/List");n.List=w.default;var S=e("./Controls/Search/Search");n.Search=S.default;var E=e("./Controls/ColorPicker/ColorPicker");n.ColorPicker=E.default;var L=e("./UIEvents");n.UIEvents=L.default;var I=y.PropertyControl;n.PropertyPanel=I},{"./ControlAlign/ControlAlignOption":76,"./ControlAnchor/ControlAnchor":77,"./ControlGroups/PropertyPanel/PropertyPanel":79,"./ControlGroups/RadioGroup/RadioGroup":80,"./ControlGroups/Row/Row":81,"./ControlGroups/Toolbar/Toolbar":82,"./Controls/Button/Button":83,"./Controls/Checkbox/Checkbox":85,"./Controls/Collapse/Collapse":86,"./Controls/ColorPicker/ColorPicker":87,"./Controls/Crumb/Crumb":88,"./Controls/Input/Input":89,"./Controls/Label/Label":90,"./Controls/Link/Link":91,"./Controls/List/List":92,"./Controls/Panel/Panel":94,"./Controls/Radio/Radio":95,"./Controls/Search/Search":96,"./Controls/Select/Select":99,"./Controls/Slider/Slider":102,"./Controls/Switch/Switch":103,"./Controls/Tabs/Tabs":105,"./Controls/Tree/Tree":107,"./UIEvents":111}],113:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e("../Common/Glodon"),a=e("../Application/WebApplicationGIS/WebApplicationGIS"),i=e("../Application/WebApplicationGIS/WebApplicationGISConfig"),r=e("../../src/Application/WebApplicationGIS/WebApplicationGISEvent"),l=e("../Application/WebApplicationGISEditor/WebApplicationGISEditor"),s=e("../Application/WebApplicationGISEditor/WebApplicationGISEditorConfig"),c=e("../Application/WebApplicationGISEditor/WebApplicationGISEditorEvent"),u=e("./UIMap");e("./Fonts/gld-bf/iconfont"),o.default.Bimface=o.default.Bimface||{},o.default.Bimface.Tiles=o.default.Bimface.Tiles||{};var d=o.default.Bimface.Tiles.UI=o.default.Bimface.Tiles.UI||u,h=o.default.Bimface.Application=o.default.Bimface.Application||{};h.WebApplicationGIS=a.default,h.WebApplicationGISConfig=i.WebApplicationGISConfig,h.WebApplicationGISEvent=r.default,h.WebApplicationGISEditor=l.default,h.WebApplicationGISEditorConfig=s.WebApplicationGISEditorConfig,h.WebApplicationGISEditorEvent=c.default,n.default=d},{"../../src/Application/WebApplicationGIS/WebApplicationGISEvent":49,"../Application/WebApplicationGIS/WebApplicationGIS":47,"../Application/WebApplicationGIS/WebApplicationGISConfig":48,"../Application/WebApplicationGISEditor/WebApplicationGISEditor":59,"../Application/WebApplicationGISEditor/WebApplicationGISEditorConfig":60,"../Application/WebApplicationGISEditor/WebApplicationGISEditorEvent":61,"../Common/Glodon":66,"./Fonts/gld-bf/iconfont":110,"./UIMap":112}]},{},[113]);