var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(X,la,ea){X instanceof String&&(X=String(X));for(var T=X.length,fa=0;fa<T;fa++){var aa=X[fa];if(la.call(ea,aa,fa,X))return{i:fa,v:aa}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(X,la,ea){if(X==Array.prototype||X==Object.prototype)return X;X[la]=ea.value;return X};$jscomp.getGlobal=function(X){X=["object"==typeof globalThis&&globalThis,X,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var la=0;la<X.length;++la){var ea=X[la];if(ea&&ea.Math==Math)return ea}throw Error("Cannot find global object");};
$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(X,la){var ea=$jscomp.propertyToPolyfillSymbol[la];if(null==ea)return X[la];ea=X[ea];return void 0!==ea?ea:X[la]};
$jscomp.polyfill=function(X,la,ea,T){la&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(X,la,ea,T):$jscomp.polyfillUnisolated(X,la,ea,T))};$jscomp.polyfillUnisolated=function(X,la,ea,T){ea=$jscomp.global;X=X.split(".");for(T=0;T<X.length-1;T++){var fa=X[T];if(!(fa in ea))return;ea=ea[fa]}X=X[X.length-1];T=ea[X];la=la(T);la!=T&&null!=la&&$jscomp.defineProperty(ea,X,{configurable:!0,writable:!0,value:la})};
$jscomp.polyfillIsolated=function(X,la,ea,T){var fa=X.split(".");X=1===fa.length;T=fa[0];T=!X&&T in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var aa=0;aa<fa.length-1;aa++){var ya=fa[aa];if(!(ya in T))return;T=T[ya]}fa=fa[fa.length-1];ea=$jscomp.IS_SYMBOL_NATIVE&&"es6"===ea?T[fa]:null;la=la(ea);null!=la&&(X?$jscomp.defineProperty($jscomp.polyfills,fa,{configurable:!0,writable:!0,value:la}):la!==ea&&(void 0===$jscomp.propertyToPolyfillSymbol[fa]&&(ea=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[fa]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(fa):$jscomp.POLYFILL_PREFIX+ea+"$"+fa),$jscomp.defineProperty(T,$jscomp.propertyToPolyfillSymbol[fa],{configurable:!0,writable:!0,value:la})))};$jscomp.polyfill("Array.prototype.find",function(X){return X?X:function(la,ea){return $jscomp.findInternal(this,la,ea).v}},"es6","es3");
(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.map&&(com.kingdee.bos.qing.map={});var X=com.kingdee.bos.qing.map,la,ea;(function(){var T=com.kingdee.bos.qing.framework.common;la=T.AbstractFacade;ea=T.AbstractIcons})();X.IntegrationRegister=new function(){var T,fa;this.registerImageSelector=
function(aa){T=aa};this.selectImage=function(aa,ya){T(aa,ya)};this.registerImageVisitor=function(aa){fa=aa};this.getImage=function(aa,ya){fa(aa,ya)}};X.Facade=function(T,fa,aa,ya){la.call(this,T,fa,aa,ya);var Fa=this.protectedMethod;this.preview=function(Ea){Ea={model:JSON.stringify(Ea)};Fa.remote("preview",Ea)}};X.Icons=new function(){ea.call(this);var T=this.protectedMethod,fa;this.setComboIconImpl=function(Fa){fa=Fa};this.protectedInit=function(Fa,Ea){if(!fa)throw Error("Please setComboIconImpl() first.");
fa.define(Ea,"toolbar");ya(0,0,"btn_undo");ya(0,1,"btn_redo");ya(0,2,"btn_page");ya(0,3,"btn_preview");fa.define(Ea,"icons");aa(0,0,"icn_arrow_down");aa(0,1,"icn_zoom_100%");aa(0,2,"icn_zoom_x%");aa(0,5,"icn_empty");aa(1,0,"icn_eye1");aa(1,1,"icn_eye2");aa(1,2,"icn_pen");fa.define(Ea,"states");aa(0,0,"state_select");aa(0,1,"state_move");aa(1,0,"state_create");aa(1,1,"state_insert");aa(1,2,"state_erase");aa(1,3,"state_cut");aa(2,0,"state_motion");aa(2,1,"state_zoom_in");aa(2,2,"state_zoom_out")};var aa=
function(Fa,Ea,Ma){T.registIcon(Fa,Ea,Ma)},ya=function(Fa,Ea,Ma){aa(Fa,Ea,Ma);aa(Fa+1,Ea,Ma+"_hover");aa(Fa+2,Ea,Ma+"_disabled")}};X.CursorHelper=new function(){this.setCursor=function(fa,aa,ya){aa=T(aa);ya&&(aa+=", "+ya);fa.css("cursor",aa)};this.getCursorIconUrl=function(fa){return T(fa)};var T=function(fa){return"url('../qinganalysis/map-designer/cursor/"+fa+"')"}};X.Svg=new function(){var T=this;this.createNode=function(fa){return document.createElementNS("http://www.w3.org/2000/svg",fa)};this.createWithAttrs=
function(fa,aa){fa=T.createNode(fa);T.setAttributes(fa,aa);return fa};this.setAttributes=function(fa,aa){for(var ya in aa)fa.setAttribute(ya,aa[ya])}};X.AssistiveStyle=function(){this.getPathLineWidth=function(){return.5};this.getPathLineColor=function(){return"#c60"};this.getPathFillColor=function(){return"rgba(255,102,0, 0.1)"};this.getPointWide=function(){return 5};this.getPointColor=function(){return"#f90"};this.getKeyPointColor=function(){return"#093"};this.getSelectedPointColor=function(){return"#039"}}})();(function(){function X(){var P=this,Q,D=new ua;this.addModelChangedListener=function(c){D.addListener(c)};this.removeModelChangedListener=function(c){D.removeListener(c)};var u=function(c){D.fireEvent(function(a){a(c)})};this.getPage=function(){Q||(Q=new Ma,m());return Q};var m=function(){var c,a;Q.addChangedListener(function(e){!c&&(c=new la);c.append(e);a&&clearTimeout(a);e.isActionTarget()?(e=c,c=null,u(e)):a=setTimeout(function(){var g=c;c=null;u(g)},100)})};this.toJsonObject=function(){var c=
{};c.page=P.getPage().toJsonObject();return c};this.fromJsonObject=function(c,a){var e=c.isTooModern?!0:!1;a&&a.setTooModern(e);c=c.page;P.getPage().fromJsonObject(c)}}function la(){var P=this,Q={},D=null;this.append=function(u){if(u.isActionTarget())D=u;else{var m=Q[u.getEventKey()];m||(m=[],Q[u.getEventKey()]=m);m.push(u)}};this.isContainKey=function(u){return D&&D.getEventKey()==u?!0:Q[u]?!0:!1};this.isContainOneOfKeys=function(u){for(var m=0;m<u.length;m++)if(P.isContainKey(u[m]))return!0;return!1};
this.getActionTarget=function(){return D};this.getTarget=function(u){return(u=Q[u])?u[0]:null};this.getTargets=function(u){return(u=Q[u])?u.slice():[]}}function ea(P,Q){var D;this.getEventKey=function(){return P};this.isActionTarget=function(){return!1};this.getMe=function(){return Q};this.addAncestor=function(u){!D&&(D=[]);D.push(u)};this.getAncestor=function(u){return D?D[u]:null}}function T(P,Q){ea.call(this,P,Q);var D;this.isActionTarget=function(){return!0};this.setAdditional=function(u){D=u};
this.getAdditional=function(){return D}}function fa(P,Q){ea.call(this,P,Q)}function aa(P,Q,D){ea.call(this,P,Q);this.getSubStructure=function(){return D}}function ya(){this.getDefaultFillColor=function(){return"#dddddd"};this.getDefaultBorderColor=function(){return"#ffffff"};this.getDefaultHoverFillColor=function(){return"#56A4FF"};this.getDefaultHoverBorderColor=function(){return null};var P=this.getDefaultFillColor(),Q=this.getDefaultBorderColor(),D=this.getDefaultHoverFillColor(),u=this.getDefaultHoverBorderColor(),
m=null,c=null,a=null,e=null;this.setFillColor=function(g){P=g};this.getFillColor=function(){return P};this.setBorderColor=function(g){Q=g};this.getBorderColor=function(){return Q};this.setHoverFillColor=function(g){D=g};this.getHoverFillColor=function(){return D};this.setHoverBorderColor=function(g){u=g};this.getHoverBorderColor=function(){return u};this.setFillOpacity=function(g){m=g};this.getFillOpacity=function(){return m||0===m?m:100};this.setBorderOpacity=function(g){c=g};this.getBorderOpacity=
function(){return c||0===c?c:100};this.setHoverFillOpacity=function(g){a=g};this.getHoverFillOpacity=function(){return a||0===a?a:100};this.setHoverBorderOpacity=function(g){e=g};this.getHoverBorderOpacity=function(){return e||0===e?e:100};this.toJsonObject=function(){var g={};g.fillColor=P;g.borderColor=Q;g.hoverFillColor=D;g.hoverBorderColor=u;var l=function(K){return!K&&0!==K||100==K?null:K};g.fillOpacity=l(m);g.borderOpacity=l(c);g.hoverFillOpacity=l(a);g.hoverBorderOpacity=l(e);return g};this.fromJsonObject=
function(g){P=g.fillColor;Q=g.borderColor;D=g.hoverFillColor;u=g.hoverBorderColor;var l=function(K){return!K&&0!==K||100==K?null:K};m=l(g.fillOpacity);c=l(g.borderOpacity);a=l(g.hoverFillOpacity);e=l(g.hoverBorderOpacity)}}function Fa(){var P=!1,Q=new ya;this.setBackImageOutputable=function(D){P=D};this.isBackImageOutputable=function(){return P};this.getCommonStyle=function(){return Q};this.toJsonObject=function(){var D={};D.imgOutputable=P;D.commonStyle=Q.toJsonObject();return D};this.fromJsonObject=
function(D){P=D.imgOutputable;Q.fromJsonObject(D.commonStyle)}}function Ea(){var P=this,Q=new ua;this.fireActionEvent=function(c,a){m(c,a)};this.addChangedListener=function(c){Q.addListener(c)};this.removeChangedListener=function(c){Q.removeListener(c)};var D=function(c){Q.fireEvent(function(a){a(c)})},u=function(c){c.addAncestor(P);D(c)},m=function(c,a){c=new T(c,P);a&&c.setAdditional(a);D(c)};this.protectedMethod={fireActionEventBySelf:m,firePropertyChangedEventBySelf:function(c){D(new fa(c,P))},
fireStructureChangedEventBySelf:function(c,a){D(new aa(c,P,a))},fireChangedEventByChild:u,adoptChild:function(c){c.addChangedListener(u)},abandonChild:function(c){c.removeChangedListener(u)}}}function Ma(){Ea.call(this);var P=this.protectedMethod,Q=640,D=480,u,m=[],c=new Fa,a=!0;this.getOutputConfig=function(){return c};this.setWidth=function(e){Q=e;P.firePropertyChangedEventBySelf(X.P_PAGE_SIZE)};this.getWidth=function(){return Q};this.setHeight=function(e){D=e;P.firePropertyChangedEventBySelf(X.P_PAGE_SIZE)};
this.getHeight=function(){return D};this.setBackImageId=function(e){u!=e&&(u=e,P.firePropertyChangedEventBySelf(X.P_PAGE_BACKIMAGE))};this.getBackImageId=function(){return u};this.setImageDesigntimeVisible=function(e){a!=e&&(a=e,P.firePropertyChangedEventBySelf(X.P_PAGE_BACKIMAGE))};this.isImageDesigntimeVisible=function(){return a};this.carryLayersOut=function(){return m};this.carryLayersIn=function(e){m=e;P.fireStructureChangedEventBySelf(X.S_ORDERING_LAYERS,null)};this.getLayersCount=function(){return m.length};
this.getLayer=function(e){return m[e]};this.addLayer=function(e,g){P.adoptChild(e);void 0===g?m.push(e):m.splice(g,0,e);P.fireStructureChangedEventBySelf(X.S_ADD_LAYER,e)};this.removeLayer=function(e){for(var g,l=m.length-1;0<=l;l--)if(e==m[l]){g=l;P.abandonChild(e);m.splice(g,1);P.fireStructureChangedEventBySelf(X.S_REMOVE_LAYER,e);break}return g};this.isLayerNameDuplicated=function(e,g){for(var l=0;l<m.length;l++){var K=m[l];if(K!=g&&K.getDisplayName()==e)return!0}return!1};this.toJsonObject=function(){for(var e=
[],g=0;g<m.length;g++){var l=m[g].toJsonObject();e.push(l)}g={};g.width=Q;g.height=D;g.backImage=u;g.layers=e;g.config=c.toJsonObject();return g};this.fromJsonObject=function(e){Q=e.width;D=e.height;u=e.backImage;var g=e.layers;m=[];for(var l=0;l<g.length;l++){var K=g[l],E=new Oa;E.fromJsonObject(K);P.adoptChild(E);m.push(E)}c.fromJsonObject(e.config)}}function Oa(){Ea.call(this);var P=this.protectedMethod,Q,D,u=[],m=2;this.isVisible=function(){return 0!=m};var c=function(a,e){a=e?m|a:m^a;a!=m&&(m=
a,P.firePropertyChangedEventBySelf(X.P_LAYER_VISIBLE))};this.setCurrentVisible=function(a){c(1,a)};this.isCurrentVisible=function(){return 1==(m&1)};this.setRequiredVisible=function(a){c(2,a)};this.isRequiredVisible=function(){return 2==(m&2)};this.setId=function(a){Q=a};this.getId=function(){return Q};this.setDisplayName=function(a){D=a;P.firePropertyChangedEventBySelf(X.P_LAYER_NAME)};this.getDisplayName=function(){return D};this.getPathsCount=function(){return u.length};this.getPath=function(a){return u[a]};
this.addPath=function(a){P.adoptChild(a);u.push(a);P.fireStructureChangedEventBySelf(X.S_ADD_PATH,a)};this.insertPath=function(a,e){P.adoptChild(a);u.splice(e,0,a);P.fireStructureChangedEventBySelf(X.S_ADD_PATH,a)};this.removePath=function(a){for(var e=u.length-1;0<=e;e--)if(a==u[e])return P.abandonChild(a),u.splice(e,1),P.fireStructureChangedEventBySelf(X.S_REMOVE_PATH,a),e;return-1};this.visitingPoints=function(a){for(var e=0;e<u.length;e++)for(var g=u[e],l=0;l<g.getPointsCount();l++){var K=g.getPoint(l);
if(a(g,K))return}};this.toJsonObject=function(){for(var a=[],e=0;e<u.length;e++){var g=u[e].toJsonObject();a.push(g)}e={};e.id=Q;e.name=D;e.paths=a;return e};this.fromJsonObject=function(a){Q=a.id;D=a.name;a=a.paths;u=[];for(var e=0;e<a.length;e++){var g=a[e],l=new Ra;l.fromJsonObject(g);P.adoptChild(l);u.push(l)}}}function Ra(){Ea.call(this);var P=this,Q=this.protectedMethod,D=[],u=!1,m;this.getUiTag=function(){m||(m=Ta.create("P"));return m};this.setClosed=function(c){c!=u&&(u=c,Q.firePropertyChangedEventBySelf(X.P_PATH_CLOSED))};
this.isClosed=function(){return u};this.getPointsCount=function(){return D.length};this.getPoint=function(c){return D[c]};this.getHeadPoint=function(){return 0<D.length?D[0]:null};this.getTailPoint=function(){return 0<D.length?D[D.length-1]:null};this.addPoint=function(c){P.insertPoint(c,D.length)};this.removePoint=function(c){for(var a=D.length-1;0<=a;a--)if(c==D[a]){P.deletePointAt(a);break}};this.insertPoint=function(c,a){c.setPositionChangedListener(function(e){Q.fireChangedEventByChild(new fa(X.P_POINT_POSITION,
e))});D.splice(a,0,c);Q.fireStructureChangedEventBySelf(X.S_ADD_POINT,c)};this.deletePointAt=function(c){var a=D[c];a.setPositionChangedListener(null);D.splice(c,1);Q.fireStructureChangedEventBySelf(X.S_REMOVE_POINT,a)};this.carryPointsInto=function(c){D=c};this.reversePoints=function(){D.reverse()};this.copy=function(){var c=new Ra;c.setClosed(u);for(var a=0;a<D.length;a++){var e=D[a],g=new za;g.setEnlargedX(e.getEnlargedX());g.setEnlargedY(e.getEnlargedY());c.addPoint(g)}return c};this.cloneWithUiTag=
function(){var c=new Ra;c.protectedMethod.setUiTag(m);c.setClosed(u);return c};this.toJsonObject=function(){for(var c=[],a=0;a<D.length;a++){var e=D[a].toJsonObject();c.push(e)}a={};a.points=c;a.closed=u;return a};this.fromJsonObject=function(c){u=c.closed;c=c.points;D=[];for(var a=0;a<c.length;a++){var e=c[a],g=new za;g.fromJsonObject(e);P.addPoint(g)}};this.protectedMethod={setUiTag:function(c){m=c}}}function za(){var P=this,Q,D,u,m;this.getUiTag=function(){m||(m=Ta.create("A"));return m};this.setPosition=
function(c){Q=parseInt(100*c[0]+.5);D=parseInt(100*c[1]+.5);u&&u(P)};this.getPosition=function(){return[P.getX(),P.getY()]};this.getX=function(){return Q/100};this.getY=function(){return D/100};this.setEnlargedX=function(c){Q=c};this.getEnlargedX=function(){return Q};this.setEnlargedY=function(c){D=c};this.getEnlargedY=function(){return D};this.setPositionChangedListener=function(c){u=c};this.cloneWithUiTag=function(){var c=new za;c.protectedMethod.setUiTag(m);c.setEnlargedX(Q);c.setEnlargedY(D);
return c};this.toJsonObject=function(){var c={};c.x=Q;c.y=D;return c};this.fromJsonObject=function(c){Q=c.x;D=c.y};this.protectedMethod={setUiTag:function(c){m=c}}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.map&&(com.kingdee.bos.qing.map={});"undefined"==typeof com.kingdee.bos.qing.map.model&&
(com.kingdee.bos.qing.map.model={});var Ga=com.kingdee.bos.qing.map.model;Ga.MapModel=X;Ga.Layer=Oa;Ga.Path=Ra;Ga.Point=za;Ga.LayersSelectionModel=function(){var P=this,Q=null,D=[],u=new ua,m=new ua;this.addSelectionChangedListener=function(e){u.addListener(e)};var c=function(){u.fireEvent(function(e){e(P)})};this.syncSelecteds=function(e){D=e;c();e=P.getCurrentLayer();if(Q!=e){var g=Q;Q&&Q.setCurrentVisible(!1);(Q=e)&&Q.setCurrentVisible(!0);a(g)}};this.isSingleSelected=function(){return 1==D.length};
this.isAnySelected=function(){return 0<D.length};this.getSingleSelected=function(){return P.isSingleSelected()?D[0]:null};this.getSelectedCount=function(){return D.length};this.getSelecteds=function(){return D.slice()};this.addCurrentChangedListener=function(e){m.addListener(e)};var a=function(e){m.fireEvent(function(g){g(P,e,Q)})};this.isCurrentConfirmed=function(){return 0<D.length};this.getCurrentLayer=function(){return P.isCurrentConfirmed()?D[0]:null}};Ga.PointsSelectionModel=function(){var P=
this,Q=null,D={},u=new ua;this.addSelectionChangedListener=function(a){u.addListener(a)};var m=function(a,e,g){u.fireEvent(function(l){l(P,a,e,g)})};this.getTheLayer=function(){return Q};this.isSingleSelected=function(){a:{var a=!1;for(var e in D){if(a){a=!1;break a}a=!0}}return a};this.isAnySelected=function(){return!c()};this.isSelected=function(a){return D[a.getUiTag()]?!0:!1};this.isSelectedCheckingUiTag=function(a){return D[a]?!0:!1};this.searchAllSelecteds=function(){var a=[];Q&&Q.visitingPoints(function(e,
g){P.isSelected(g)&&a.push(g)});return a};this.searchSelectedsUiTagMap=function(){var a={};Q&&Q.visitingPoints(function(e,g){P.isSelected(g)&&(a[g.getUiTag()]=!0)});return a};this.setSelecteds=function(a,e){Q=null;D={};P.appendSelecteds(a,e)};this.clearSelecteds=function(){var a=P.searchAllSelecteds(),e=Q;Q=null;D={};m(e,[],a)};this.appendSelecteds=function(a,e){if(Q&&Q!=a)throw Error("Confusing layer");Q=a;a=[];for(var g=0;g<e.length;g++){var l=e[g];D[l.getUiTag()]=!0;a.push(l)}m(Q,a,[])};this.inverseSelecteds=
function(a,e){if(Q&&Q!=a)throw Error("Confusing layer");Q=a;a=[];for(var g=[],l=0;l<e.length;l++){var K=e[l];D[K.getUiTag()]?(delete D[K.getUiTag()],g.push(K)):(D[K.getUiTag()]=!0,a.push(K))}e=Q;c()&&(Q=null);m(e,a,g)};var c=function(){var a=!0,e;for(e in D){a=!1;break}return a}};var ua=com.kingdee.bos.qing.common.EventListenerList;X.P_PAGE_SIZE="page-size";X.P_PAGE_BACKIMAGE="page-backImage";X.P_LAYER_NAME="layer-name";X.P_LAYER_VISIBLE="layer-visible";X.P_PATH_CLOSED="path-closed";X.P_POINT_POSITION=
"point-position";X.S_ADD_LAYER="addLayer";X.S_REMOVE_LAYER="removeLayer";X.S_ORDERING_LAYERS="orderingLayers";X.S_ADD_PATH="addPath";X.S_REMOVE_PATH="removePath";X.S_ADD_POINT="addPoint";X.S_REMOVE_POINT="removePoint";Oa.createId=function(){return"L"+(new Date).getTime()};var Ta=new function(){var P=0;this.create=function(Q){return Q+P++}}})();(function(){function X(){var c=!1,a=!1,e;this.setLayersSelectionBackupable=function(g){c=g};this.isLayersSelectionBackupable=function(){return c};this.setOperatingStateBackupable=function(g){a=g};this.isOperatingStateBackupable=function(){return a};this.setStateBackups=function(g){e=g};this.getStateBackups=function(){return e}}function la(){X.call(this);var c;this.setCaption=function(a){c=a};this.getCaption=function(){return c};this.perform=function(){throw Error("Override me.");};this.unperform=
function(){throw Error("Override me.");}}function ea(){la.call(this);var c=[],a;this.appendUnitAction=function(e){c.push(e)};this.perform=function(){a&&a(!0);for(var e=0,g=c.length-1;e<=g;e++)c[e].perform();a&&a(!1)};this.unperform=function(){a&&a(!0);for(var e=c.length-1;0<=e;e--)c[e].unperform();a&&a(!1)};this.setAnnouncer=function(e){a=e}}function T(){la.call(this);var c,a=[],e;this.setValue=function(g,l,K){c=l;for(var E=0;E<l.length;E++){for(var I=l[E],ca=[],ba=E,sa=I,va=ca,Ba=[],R=0;R<sa.getPathsCount();R++){var wa=
[],Ha=sa.getPath(R);a:{var Ua=Ha;for(var ra=wa,Sa=0;Sa<a.length;Sa++)for(var jb=a[Sa],db=0;db<jb.length;db++){var Va=jb[db],fb=Ua,Wa=!1,eb=Va.getPointsCount();if(eb==fb.getPointsCount()){Wa=!0;for(var Za=0;Za<eb;Za++){var $a=Va.getPoint(Za),gb=fb.getPoint(Za);if($a.getEnlargedX()!=gb.getEnlargedX()||$a.getEnlargedY()!=gb.getEnlargedY()){Wa=!1;break}}if(!Wa)for(Wa=!0,Za=0;Za<eb;Za++)if($a=Va.getPoint(Za),gb=fb.getPoint(eb-Za-1),$a.getEnlargedX()!=gb.getEnlargedX()||$a.getEnlargedY()!=gb.getEnlargedY()){Wa=
!1;break}}if(Wa){ra[0]=Sa;ra[1]=db;Ua=!0;break a}}Ua=!1}Ua?va[0]=wa[0]:(wa=Ha.copy(),Ba.push(wa))}a[ba]=Ba;if(0<ca.length){K.push(l[ca[0]].getDisplayName());K.push(I.getDisplayName());break}}e=new fa;e.setValue(g,l.slice(1))};this.perform=function(){for(var g=c[0],l=1;l<a.length;l++)for(var K=a[l],E=0;E<K.length;E++)g.addPath(K[E]);e.perform();g.fireActionEvent(T.FORWARD,[g])};this.unperform=function(){for(var g=c[0],l=a.length-1;0<l;l--)for(var K=a[l],E=K.length-1;0<=E;E--)g.removePath(K[E]);e.unperform();
g.fireActionEvent(T.BACKWARD,c)}}function fa(){la.call(this);var c,a,e;this.setValue=function(g,l){c=g;a=l};this.perform=function(){e=[];for(var g=0;g<a.length;g++){var l=c.removeLayer(a[g]);e.push(l)}};this.unperform=function(){for(var g=a.length-1;0<=g;g--)c.addLayer(a[g],e[g])}}function aa(){la.call(this);this.setLayersSelectionBackupable(!0);this.setOperatingStateBackupable(!0)}function ya(){aa.call(this);var c,a;this.setValue=function(e,g,l){c=e;e=new m;e.setPosition([g,l]);a=new u;a.addPoint(e)};
this.perform=function(){c.addPath(a);c.fireActionEvent(ya.FORWARD,a)};this.unperform=function(){var e=[a.getPoint(0)];c.removePath(a);c.fireActionEvent(ya.BACKWARD,e)}}function Fa(){aa.call(this);var c,a;this.setValue=function(e,g,l){c=e;a=new m;a.setPosition([g,l])};this.perform=function(){c.addPoint(a);c.fireActionEvent(Fa.FORWARD)};this.unperform=function(){c.removePoint(a);c.fireActionEvent(Fa.BACKWARD)}}function Ea(){aa.call(this);var c;this.setValue=function(a){c=a};this.perform=function(){c.setClosed(!0);
c.fireActionEvent(Ea.FORWARD)};this.unperform=function(){c.setClosed(!1);c.fireActionEvent(Ea.BACKWARD)}}function Ma(){aa.call(this);var c,a;this.setValue=function(e,g){c=e;a=g};this.perform=function(){!a&&c.reversePoints();c.fireActionEvent(Ma.FORWARD)};this.unperform=function(){var e=[c.getTailPoint()];!a&&c.reversePoints();c.fireActionEvent(Ma.BACKWARD,e)}}function Oa(){aa.call(this);var c,a,e,g,l,K;this.setValue=function(E,I,ca,ba){c=E;a=I;e=ca;g=ba};this.perform=function(){l=e.getPointsCount();
for(var E=[],I=e.getPointsCount()-1;0<=I;I--){var ca=e.getPoint(I);e.deletePointAt(I);E.push(ca)}K=c.removePath(e);!g&&E.reverse();for(I=E.length-1;0<=I;I--)a.addPoint(E[I]);a.fireActionEvent(Oa.FORWARD)};this.unperform=function(){for(var E=[],I=0;I<l;I++){var ca=a.getPointsCount()-1,ba=a.getPoint(ca);a.deletePointAt(ca);E.push(ba)}c.insertPath(e,K);!g&&E.reverse();for(I=l-1;0<=I;I--)e.addPoint(E[I]);a.fireActionEvent(Oa.BACKWARD)}}function Ra(){la.call(this);this.setLayersSelectionBackupable(!0);
var c,a,e;this.setValue=function(g,l){c=g;a=l};this.perform=function(){var g=[],l=[],K=[],E=[],I=[],ca=[];e=[g,l,K,E,I,ca];for(var ba=c.getPathsCount()-1;0<=ba;ba--){var sa=c.getPath(ba);I.push(sa);for(var va=[],Ba=sa.getPointsCount()-1;0<=Ba;Ba--){var R=sa.getPoint(Ba);if(a[R.getUiTag()]){if(0<va.length){for(var wa=new u,Ha=0;Ha<va.length;Ha++)sa.removePoint(va[Ha]),g.push([sa,va[Ha]]);for(Ha=va.length-1;0<=Ha;Ha--)wa.addPoint(va[Ha]);va=[];c.insertPath(wa,ba+1);l.push(wa)}sa.removePoint(R);g.push([sa,
R]);ca.push(R);sa.isClosed()&&(sa.setClosed(!1),E.push(sa))}else va.push(R)}0==sa.getPointsCount()&&(c.removePath(sa),K.push([sa,ba]))}c.fireActionEvent(Ra.FORWARD,[I,ca])};this.unperform=function(){var g=e[0],l=e[1],K=e[2],E=e[3],I=e[4],ca=e[5];e=null;for(var ba=0;ba<l.length;ba++){var sa=l[ba];c.removePath(sa)}for(ba=K.length-1;0<=ba;ba--)l=K[ba],sa=l[0],c.insertPath(sa,l[1]);for(ba=g.length-1;0<=ba;ba--)l=g[ba],sa=l[0],sa.addPoint(l[1]);for(ba=0;ba<E.length;ba++)sa=E[ba],sa.setClosed(!0);c.fireActionEvent(Ra.BACKWARD,
[I,ca])}}function za(){aa.call(this);var c,a,e,g;this.setValue=function(l,K){c=l;c.visitingPoints(function(E,I){return I.getUiTag()==K?(a=E,e=I,!0):!1})};this.perform=function(){for(var l=-1,K=-1,E=a.isClosed(),I=a.getPointsCount(),ca=0;ca<I;ca++)if(a.getPoint(ca)==e){K=ca;a.deletePointAt(ca);1==I?l=c.removePath(a):3>=I&&a.setClosed(!1);break}if(-1==K)throw Error("The point is not inside the layer.");g=[l,K,E];c.fireActionEvent(za.FORWARD,[a,e])};this.unperform=function(){var l=g[0],K=g[1],E=g[2];
0<=l&&c.insertPath(a,l);a.insertPoint(e,K);a.setClosed(E);c.fireActionEvent(za.BACKWARD,[a,e])}}function Ga(){aa.call(this);var c,a,e,g;this.setValue=function(l,K,E,I,ca){c=l;e=K;a=new m;a.setPosition([E,I]);g=ca};this.perform=function(){c.insertPoint(a,e);c.fireActionEvent(Ga.FORWARD,[a,g])};this.unperform=function(){c.deletePointAt(e);c.fireActionEvent(Ga.BACKWARD,[a])}}function ua(){aa.call(this);var c,a,e,g;this.setValue=function(l,K,E){c=l;a=K;e=E};this.perform=function(){var l=c.getPath(a),
K=[l.getPoint(e-1),l.getPoint(e==l.getPointsCount()?0:e)],E=[],I=null;if(l.isClosed()){for(var ca=0;ca<l.getPointsCount();ca++)E.push(l.getPoint(ca));var ba=[];for(ca=e;ca<l.getPointsCount();ca++)ba.push(l.getPoint(ca));for(ca=0;ca<e;ca++)ba.push(l.getPoint(ca));l.carryPointsInto(ba);l.setClosed(!1)}else{I=new u;for(ca=e;ca<l.getPointsCount();ca++)I.addPoint(l.getPoint(ca));c.insertPath(I,a+1);ba=[];for(ca=0;ca<e;ca++)ba.push(l.getPoint(ca));l.carryPointsInto(ba)}g=[l,K,E,I];l=[l];I&&l.push(I);c.fireActionEvent(ua.FORWARD,
[l,K])};this.unperform=function(){var l=g[0],K=g[1],E=g[2],I=g[3];if(I)for(c.removePath(I),E=0;E<I.getPointsCount();E++)l.addPoint(I.getPoint(E));else l.carryPointsInto(E),l.setClosed(!0);l=[l];I&&l.push(I);c.fireActionEvent(ua.BACKWARD,[l,K])}}function Ta(){aa.call(this);var c,a,e,g,l;this.setValue=function(K,E,I,ca){c=K;a=E;e=I;g=ca};this.perform=function(){var K=[];l={};c.visitingPoints(function(E,I){if(a[I.getUiTag()]){E=I.getX();var ca=I.getY();I.setPosition([E+e,ca+g]);l[I.getUiTag()]=[E,ca];
K.push(I)}});c.fireActionEvent(Ta.FORWARD,K)};this.unperform=function(){var K=[];c.visitingPoints(function(E,I){if(E=l[I.getUiTag()])I.setPosition(E),K.push(I)});c.fireActionEvent(Ta.BACKWARD,K)}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.map&&(com.kingdee.bos.qing.map={});"undefined"==typeof com.kingdee.bos.qing.map.controller&&
(com.kingdee.bos.qing.map.controller={});var P=com.kingdee.bos.qing.map.controller;P.CommandManager=function(){var c=[],a=[],e=null,g=!1,l=new Q,K=new Q,E,I;this.setStateChanger=function(R,wa){E=R;I=wa};this.addPerformedListener=function(R){K.addListener(R)};var ca=function(R,wa,Ha){K.fireEvent(function(Ua){Ua(R,wa,Ha)})};this.perform=function(R){e?e.appendUnitAction(R):ba(R)};this.compositeStart=function(R){if(null!=e)throw Error("Can not start composite command twice.");e=new ea;e.setAnnouncer(Ba);
e.setCaption(R)};this.compositeEnd=function(){ba(e);e=null};this.compositeAbort=function(){e=null};this.isCompositeStarted=function(){return null!=e};this.createCompositeAction=function(){var R=new ea;R.setAnnouncer(Ba);return R};this.untilWakeup=function(R){g?l.addListener(R):R()};this.isCanUndo=function(){return 0<c.length};this.isCanRedo=function(){return 0<a.length};this.undo=function(){var R=c.pop();R&&(I&&I(R),R.unperform(),sa(a,R),ca(R,!1,!0))};this.redo=function(){var R=a.pop();R&&(I&&I(R),
R.perform(),sa(c,R),ca(R,!1,!1))};this.reset=function(){c.length=0;a.length=0;ca(null)};var ba=function(R){E&&E(R);R.perform();sa(c,R);a.length=0;ca(R,!0)},sa=function(R,wa){R.push(wa);64<R.length&&R.splice(0,1)},va=function(){g=!1;l.fireEvent(function(R){R()});l.removeAllListener()},Ba=function(R){R?g=!0:va()}};P.CompositeAction=ea;P.ActionChangeProperty=function(){la.call(this);var c=this,a,e,g;this.setMethod=function(l,K){a=l;e=K};this.setValue=function(l){g=l};this.perform=function(){var l=a();
e(g);g=l};this.unperform=function(){c.perform()}};P.ActionCreateLayer=function(){la.call(this);var c,a;this.setValue=function(e,g){c=e;a=new D;a.setId(D.createId());a.setDisplayName(g)};this.perform=function(){c.addLayer(a)};this.unperform=function(){c.removeLayer(a)}};P.ActionCopyLayer=function(){la.call(this);var c,a,e;this.setValue=function(g,l,K){for(var E=0;E<g.getLayersCount();E++)if(l==g.getLayer(E)){e=E+1;break}var I=new D;I.setId(D.createId());I.setDisplayName(K);I.setRequiredVisible(l.isRequiredVisible());
for(E=0;E<l.getPathsCount();E++)K=l.getPath(E).copy(),I.addPath(K);c=g;a=I};this.perform=function(){c.addLayer(a,e)};this.unperform=function(){c.removeLayer(a)}};P.ActionMergeLayers=T;P.ActionDeleteLayers=fa;P.ActionEstablishPath=ya;P.ActionCreatingPath=Fa;P.ActionClosePath=Ea;P.ActionContinueToCreatePath=Ma;P.ActionMergePath=Oa;P.ActionDeletePoints=Ra;P.ActionErasePoint=za;P.ActionInsertPoint=Ga;P.ActionCutPath=ua;P.ActionMovePoints=Ta;var Q,D,u,m;(function(){var c=com.kingdee.bos.qing.common;Q=
c.EventListenerList;c=com.kingdee.bos.qing.map.model;D=c.Layer;u=c.Path;m=c.Point})();T.FORWARD="AF_MergeLayers";T.BACKWARD="AB_MergeLayers";ya.FORWARD="AF_EstablishPath";ya.BACKWARD="AB_EstablishPath";Fa.FORWARD="AF_CreatingPath";Fa.BACKWARD="AB_CreatingPath";Ea.FORWARD="AF_ClosePath";Ea.BACKWARD="AB_ClosePath";Ma.FORWARD="AF_ContinueToCreatePath";Ma.BACKWARD="AB_ContinueToCreatePath";Oa.FORWARD="AF_MergePath";Oa.BACKWARD="AB_MergePath";Ra.FORWARD="AF_DeletePoints";Ra.BACKWARD="AB_DeletePoints";
za.FORWARD="AF_ErasePoint";za.BACKWARD="AB_ErasePoint";Ga.FORWARD="AF_InsertPoint";Ga.BACKWARD="AB_InsertPoint";ua.FORWARD="AF_CutPath";ua.BACKWARD="AB_CutPath";Ta.FORWARD="AF_MovePoints";Ta.BACKWARD="AB_MovePoints"})();(function(){function X(){function m(){var Z=$("<div>"),ia=$("<div>");this.setTitle=function(N){Z.text(N)};this.createJqUi=function(){Z.css("background-color","#f7f7f7");Z.css("padding-left","6px");Z.css("line-height","26px");ea.layoutCtrlWithLRTB(Z,0,0,null,0,null,26);ea.layoutCtrlWithLRTB(ia,20,20,null,32,10,null);var N=$("<div>");N.append(Z);N.append(ia);return N};this.addCtrl=function(N,Ca,Ja,Qa,kb,sb,tb){N=N.getJqUi?N.getJqUi():N;ia.append(N);ea.layoutCtrlWithLRTB(N,Ca,Ja,Qa,kb,sb,tb)};this.addTitleBarButton=
function(N,Ca){N=new Oa(N);N.addActionListener(Ca);N.getJqUi().css("position","relative");N.getJqUi().css("float","right");N.getJqUi().css("top","3px");N.getJqUi().css("width","100px");N.getJqUi().css("height","20px");N.getJqUi().appendTo(Z)}}var c=new Fa,a=new P,e=new Ma,g=new Ea,l=new Ea,K=$("<div>"),E=new ua,I=new ua,ca=new ua,ba=new ua,sa=new Ga,va=new Ga,Ba=new Ga,R=new Ga,wa=new Q,Ha=new Q,Ua=new Q,ra=new Q,Sa,jb,db;this.hookMaskDisplayer=function(Z){Sa=Z};this.setModel=function(Z){jb=Z;var ia=
Z.getOutputConfig(),N=ia.getCommonStyle();db=N;c.setModel(Z.getBackImageId());e.setOn(ia.isBackImageOutputable());g.setValue(Z.getWidth());l.setValue(Z.getHeight());Va(E,sa,N.getFillColor(),N.getDefaultFillColor());Va(I,va,N.getBorderColor(),N.getDefaultBorderColor());Va(ca,Ba,N.getHoverFillColor(),N.getDefaultHoverFillColor());Va(ba,R,N.getHoverBorderColor(),N.getDefaultHoverBorderColor());Z=N.getFillOpacity();wa.setValue(Z);Z=N.getBorderOpacity();Ha.setValue(Z);Z=N.getHoverFillOpacity();Ua.setValue(Z);
N=N.getHoverBorderOpacity();ra.setValue(N)};var Va=function(Z,ia,N,Ca){Z.setChecked(N?!0:!1);ia.getModel().decodeFrom(N?N:Ca)},fb=function(Z,ia){return Z.isChecked()?ia.getModel().encodeToHexRgb():null},Wa=function(Z,ia){return Z.isChecked()?ia.getValue():100};this.getModifiedActions=function(Z){var ia=Z.getOutputConfig(),N=ia.getCommonStyle(),Ca=fb(E,sa),Ja=fb(I,va),Qa=fb(ca,Ba),kb=fb(ba,R),sb=Wa(E,wa),tb=Wa(I,Ha),pb=Wa(ca,Ua),ub=Wa(ba,ra),Xa=function(b,f,d){var h=new D;h.setMethod(b,f);h.setValue(d);
return h};return[Xa(Z.getWidth,Z.setWidth,g.getValue()),Xa(Z.getHeight,Z.setHeight,l.getValue()),Xa(Z.getBackImageId,Z.setBackImageId,c.getModel()),Xa(ia.isBackImageOutputable,ia.setBackImageOutputable,e.isOn()),Xa(N.getFillColor,N.setFillColor,Ca),Xa(N.getBorderColor,N.setBorderColor,Ja),Xa(N.getHoverFillColor,N.setHoverFillColor,Qa),Xa(N.getHoverBorderColor,N.setHoverBorderColor,kb),Xa(N.getFillOpacity,N.setFillOpacity,sb),Xa(N.getBorderOpacity,N.setBorderOpacity,tb),Xa(N.getHoverFillOpacity,N.setHoverFillOpacity,
pb),Xa(N.getHoverBorderOpacity,N.setHoverBorderOpacity,ub)]};this.createJqUi=function(){g.setConstraint(1,9999,1);l.setConstraint(1,9999,1);g.addValueChangedListener(hb);l.addValueChangedListener(hb);ab();c.setClearable(!0);c.setCustomPainter(Za);c.addActionListener($a);c.addClearListener(gb);var Z=new ya(T.get("picture","\u56fe\u7247")),ia=new ya(T.get("outputWithBackImage","\u643a\u5e26\u5e95\u56fe\u8f93\u51fa")),N=new m;N.setTitle(T.get("backImage","\u5e95\u56fe"));N.addCtrl(Z,0,null,100,0,null,
23);N.addCtrl(c,100,0,null,0,null,23);N.addCtrl(ia,0,null,100,30,null,23);N.addCtrl(e,100,null,80,30,null,23);ia=new ya(T.get("pageWidth","\u753b\u9762\u5bbd"));var Ca=new ya(T.get("pageHeight","\u753b\u9762\u9ad8"));Z=new m;Z.setTitle(T.get("pageSize","\u753b\u9762\u5c3a\u5bf8"));Z.addTitleBarButton(T.get("sizeAsSameAsImage","\u4e0e\u5e95\u56fe\u7b49\u540c\u5c3a\u5bf8"),lb);Z.addCtrl(ia,0,null,100,0,null,23);Z.addCtrl(g,100,null,80,0,null,23);Z.addCtrl(Ca,0,null,100,30,null,23);Z.addCtrl(l,100,null,
80,30,null,23);Z.addCtrl(K,220,0,null,6,0,null);E.setText(T.get("fillColor","\u586b\u5145\u989c\u8272"));I.setText(T.get("borderColor","\u63cf\u8fb9\u989c\u8272"));ca.setText(T.get("hoverFillColor","\u9f20\u6807\u5212\u8fc7\u586b\u5145"));ba.setText(T.get("hoverBorderColor","\u9f20\u6807\u5212\u8fc7\u63cf\u8fb9"));ia=new m;ia.setTitle(T.get("areaStyle","\u533a\u57df\u6837\u5f0f\uff08\u53ef\u9884\u89c8\u67e5\u770b\uff09"));ia.addTitleBarButton(T.get("resetAreaStyle","\u91cd\u7f6e\u4e3a\u9ed8\u8ba4"),
nb);eb(ia,0,0,E,sa,wa);eb(ia,0,30,I,va,Ha);eb(ia,320,0,ca,Ba,Ua);eb(ia,320,30,ba,R,ra);N=[[N,0,100],[Z,100,100],[ia,200,100]];Z=$("<div>");for(ia=0;ia<N.length;ia++){var Ja=N[ia];Ca=Ja[1];var Qa=Ja[2];Ja=Ja[0].createJqUi();Z.append(Ja);ea.layoutCtrlWithLRTB(Ja,0,0,null,Ca,null,Qa)}a.appendInvislbelUiTo(Z);return Z};var eb=function(Z,ia,N,Ca,Ja,Qa){Z.addCtrl(Ca,ia,null,100,N,null,23);Z.addCtrl(Ja,100+ia,null,80,N,null,23);Z.addCtrl(Qa,190+ia,null,60,N,null,23);Ca.addCheckedListener(function(kb,sb){Ja.setEnabled(Ca.isChecked());
Qa.setEnabled(Ca.isChecked())});Ja.setEnabled(Ca.isChecked());Qa.setEnabled(Ca.isChecked())},Za=function(Z){return Z?T.get("backImageSetted","\u5df2\u8bbe\u7f6e"):T.get("backImageUnset","\u672a\u8bbe\u7f6e")},$a=function(Z){u.selectImage(a,function(ia){ia&&(c.setModel(ia),Sa&&Sa(!0),ib(ia,function(N,Ca){Sa&&Sa(!1);g.getValue()==N&&l.getValue()==Ca||mb(N,Ca)}))})},gb=function(Z){c.setModel(null)},lb=function(Z){(Z=c.getModel())?(Sa&&Sa(!0),ib(Z,function(ia,N){Sa&&Sa(!1);mb(ia,N)})):bb(T.get("promptBackImageUnset",
"\u672a\u8bbe\u7f6e\u5e95\u56fe\u3002"),c)},mb=function(Z,ia){if(g.getValue()==Z&&l.getValue()==ia)bb(T.get("promptAsSameAlready","\u753b\u9762\u5c3a\u5bf8\u5df2\u7ecf\u4e0e\u5e95\u56fe\u7b49\u540c\u5927\u5c0f\u3002"),g);else{var N=T.get("promptAsSameConfirm","\u662f\u5426\u5c06\u753b\u9762\u5c3a\u5bf8\u8c03\u6574\u4e3a\u4e0e\u5e95\u56fe\u7b49\u540c\u5927\u5c0f\uff1a#1 x #2 \uff1f").replace("#1",Z).replace("#2",ia);bb(N,g,function(){g.setValue(Z);l.setValue(ia);ab()})}},ab=function(){for(var Z=g.getValue(),
ia=l.getValue(),N=!1,Ca=0;Ca<jb.getLayersCount();Ca++)jb.getLayer(Ca).visitingPoints(function(Ja,Qa){Ja=Qa.getX();Qa=Qa.getY();var kb=!1;0<=Ja&&Ja<Z&&0<=Qa&&Qa<ia||(kb=N=!0);return kb});N?(K.css({color:"#900","white-space":"pre-wrap"}),K.text(T.get("promptPointOutsideWhenPageChanged","\u4ee5\u524d\u521b\u5efa\u7684\u67d0\u4e9b\u951a\u70b9\u4f4d\u4e8e\u753b\u9762\u4e4b\u5916\u3002\u540e\u7eed\u8bb0\u5f97\u4fee\u6539\u90a3\u4e9b\u951a\u70b9\u3002"))):K.text("")},hb=function(Z,ia,N,Ca){Ca!=Ea.CHANGED_BY_API&&
ab()},nb=function(Z){Va(E,sa,db.getDefaultFillColor(),"#ffffff");Va(I,va,db.getDefaultBorderColor(),"#ffffff");Va(ca,Ba,db.getDefaultHoverFillColor(),"#ffffff");Va(ba,R,db.getDefaultHoverBorderColor(),"#ffffff");wa.setValue(100);Ha.setValue(100);Ua.setValue(100);ra.setValue(100);bb(T.get("promptResetAreaStyleAlready","\u5df2\u91cd\u7f6e\u4e3a\u9ed8\u8ba4\u6837\u5f0f\u3002"),sa)},bb=function(Z,ia,N){var Ca=new Ra;Ca.setText(Z);Z=!0;N&&(Z=!1,Ca.setConfirmedListener(function(Ja){Ja&&N()}));Ca.show(ia.getJqUi(),
Z)},ib=function(Z,ia){u.getImage(Z,function(N){var Ca=new Image;Ca.onload=function(Ja){Ja=Ja.currentTarget;ia(Ja.width,Ja.height)};Ca.src=N})}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.map&&(com.kingdee.bos.qing.map={});"undefined"==typeof com.kingdee.bos.qing.map.ui&&(com.kingdee.bos.qing.map.ui=
{});var la=com.kingdee.bos.qing.map.ui;la.PreviewDialog=function(){aa.call(this);var m=this,c=this.protectedMethod,a,e,g;this.show=function(ba,sa,va){m.setSize(ba,sa);c.setTitle(T.get("preview","\u9884\u89c8"));c.setContentPaneCreator(l);c.setFooterPaneCreator(K);c.setClosingAction(function(){});c.getDialogCtrl().setResizeEnabled();c.getDialogCtrl().setFullScreenEnabled();c.getDialogCtrl().createToolbarButton(T.get("backward","\u8fd4\u56de"),E);m.showDialog();c.getDialogCtrl().setToolbarVisible(!0);
var Ba=$("<div>");ea.layoutCtrlWithLRTB(Ba,10,10,null,10,10,null);Ba.appendTo(a);var R=Ba.prop("clientWidth"),wa=Ba.prop("clientHeight");va(g,function(){g.draw(Ba[0],R,wa)})};var l=function(){g=new fa;g.getAttr().setRegionMapping(null);a=$("<div>");a.css("background-color","#f8f9fb");a.on("mouseover",I);a.on("mouseleave",ca);return a},K=function(ba){e=ba;e.css("height","30px");e.css("text-align","center");a.parent().css("bottom","30px")},E=function(ba){c.destroy()},I=function(ba){"path"==ba.target.tagName?
(ba=$(ba.target).attr("title"),e.text(ba)):e.text("")},ca=function(ba){e.text("")}};la.PageSettingDialog=function(){aa.call(this);var m=this,c=this.protectedMethod,a,e,g,l,K;this.setCommandManager=function(ba){l=ba};this.setModel=function(ba){K=ba;!a&&E();a.setModel(K)};var E=function(){a=new X;a.hookMaskDisplayer(ca);m.setSize(640,480);c.setTitle(I());c.setContentPaneCreator(function(){return e=a.createJqUi()});c.setClosingAction(function(ba){if(ba){ba=a.getModifiedActions(K);l.compositeStart(I());
for(var sa=0;sa<ba.length;sa++)l.perform(ba[sa]);l.compositeEnd()}})},I=function(){return T.get("pageSetup","\u753b\u9762\u8bbe\u7f6e")},ca=function(ba){ba?!g&&(ba=ea.upwardSearchHasClass(e,$(document.body),"sa-ctrl-dialog"))&&(g=$("<div>"),g.css({"z-index":65535,"background-color":"rgba(255, 255, 255, 0.01)"}),g.appendTo(ba),ea.layoutCtrlWithLRTB(g,0,0,null,0,0,null)):g&&(g.remove(),g=null)}};la.LayerNamingDialog=function(){aa.call(this);var m=this,c=this.protectedMethod,a=new za,e,g,l;(function(){m.setSize(480,
200);c.setContentPaneCreator(function(){var E=new ya(T.get("layerName","\u540d\u79f0"));ea.layoutCtrlWithLRTB(E.getJqUi(),0,null,80,0,null,23);ea.layoutCtrlWithLRTB(a.getJqUi(),80,0,null,0,null,23);var I=$("<div>");I.append(E.getJqUi());I.append(a.getJqUi());return I});c.setClosingChecker(function(){return K()});c.setClosingAction(function(E){E&&l($.trim(a.getText()))})})();this.setTitle=function(E){c.setTitle(E)};this.setContext=function(E,I,ca){e=E;g=I;l=ca};this.setLayerName=function(E){a.setText(E)};
this.showMeBeside=function(E){var I=[E.outerWidth(),0];I=ea.upwardCoordinate(E[0],I,document.body);m.setPosition(I[0],I[1]);m.showDialog();a.requestFocus()};var K=function(){var E=$.trim(a.getText());return E?50<E.length?(c.getMessageCurtain().showPrompt(T.get("promptLayerNameTooLong","\u540d\u79f0\u4e0d\u80fd\u8d85\u8fc7#1\u4e2a\u5b57\u7b26\u3002").replace("#1",50),3E3),a.requestFocus(),!1):e.isLayerNameDuplicated(E,g)?(c.getMessageCurtain().showPrompt(T.get("promptLayerNameDuplicated","\u540d\u79f0\u91cd\u590d\u3002"),
3E3),a.requestFocus(),!1):!0:(c.getMessageCurtain().showPrompt(T.get("promptLayerNameEmpty","\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\u3002"),3E3),a.requestFocus(),!1)}};la.LayersOrdringDialog=function(){aa.call(this);var m=this,c=this.protectedMethod,a=new Ta,e;(function(){m.setSize(480,400);c.setMaxSize(720,560);c.setContentPaneCreator(function(){return a.createJqUi()});c.setClosingAction(function(l){l&&e(a.getItems())})})();this.setTitle=function(l){c.setTitle(l)};this.setContext=function(l,K){a.setItems(l,
g);e=K};var g=function(l,K){l.text(K.getDisplayName())}};la.ScalingRatioDialog=function(){aa.call(this);var m=this,c=this.protectedMethod,a,e;(function(){m.setSize(320,160);c.setContentPaneCreator(function(){c.setTitle(T.get("scalingRatioDialogTitle","\u7f29\u653e\u6bd4\u4f8b"));var g=new ya(T.get("percent","\u767e\u5206\u6bd4")),l=parseInt(100*e.getScalingRatio()+.5);a=new Ea;a.setValue(l);a.setConstraint(10,1E3,10);ea.layoutCtrlWithLRTB(g.getJqUi(),0,null,80,0,null,23);ea.layoutCtrlWithLRTB(a.getJqUi(),
80,0,null,0,null,23);l=$("<div>");l.append(g.getJqUi());l.append(a.getJqUi());return l});c.setClosingAction(function(g){g&&(g=a.getValue(),e.setScalingRatio(g/100))})})();this.setContext=function(g){e=g};this.showMeBeside=function(g){var l=[g.outerWidth(),0];l=ea.upwardCoordinate(g[0],l,document.body);m.setPosition(l[0],l[1]-80);m.showDialog()}};la.PointPositionDialog=function(){aa.call(this);var m=this,c=this.protectedMethod,a,e,g,l,K,E,I,ca;(function(){m.setSize(280,210);c.setContentPaneCreator(function(){var va=
new ya(T.get("xPosition","\u6a2a\u5750\u6807")),Ba=new ya(T.get("yPosition","\u7eb5\u5750\u6807"));a=ba(K.getX(),l.getWidth()-.01);e=ba(K.getY(),l.getHeight()-.01);g=$("<div>");g.css("color","#900");sa();ea.layoutCtrlWithLRTB(va.getJqUi(),0,null,80,0,null,23);ea.layoutCtrlWithLRTB(a.getJqUi(),80,0,null,0,null,23);ea.layoutCtrlWithLRTB(Ba.getJqUi(),0,null,80,33,null,23);ea.layoutCtrlWithLRTB(e.getJqUi(),80,0,null,33,null,23);ea.layoutCtrlWithLRTB(g,0,0,null,66,null,23);var R=$("<div>");R.append(va.getJqUi());
R.append(a.getJqUi());R.append(Ba.getJqUi());R.append(e.getJqUi());R.append(g);return R});c.setClosingChecker(function(){return sa()});c.setClosingAction(function(va){if(va){va=a.getValue()-K.getX();var Ba=e.getValue()-K.getY(),R={};R[K.getUiTag()]=!0;E(R,va,Ba)}})})();this.setTitle=function(va){c.setTitle(va)};this.setContext=function(va,Ba,R,wa,Ha){l=va;K=Ba;E=R;I=wa;ca=Ha};this.showMeBeside=function(va){var Ba=$(document.body).prop("clientHeight")-20,R=[0,0];R=ea.upwardCoordinate(va[0],R,document.body);
va=R[0]-280;R=R[1]-40;R+210>Ba&&(R=Ba-210);m.setPosition(va,R);m.showDialog()};var ba=function(va,Ba){var R=new Ea;R.setValue(va);R.setConstraint(0,Ba,1);R.setAcceptEditingDecorator(function(wa){return parseInt(100*wa+.5)/100});R.addValueChangedListener(function(wa,Ha,Ua,ra){sa()});return R},sa=function(){var va=a.getValue(),Ba=e.getValue();Ba=(va=I(va,Ba))?"":ca();g.text(Ba);return va}};var ea,T,fa,aa,ya,Fa,Ea,Ma,Oa,Ra,za,Ga,ua,Ta,P,Q,D,u;(function(){var m=com.kingdee.bos.qing.common;ea=m.DomUtil;
m=com.kingdee.bos.qing.framework.common;T=m.MultilanguageManager.createPackageAccessor(la);m=com.kingdee.bos.qing.chart.square;fa=m.MapChart;m=com.kingdee.bos.qing.ui.component;aa=m.AbstractModalDialog;ya=m.Label;Fa=m.F7Selector;Ea=m.Spinner;Ma=m.SwitchButton;Oa=m.WorkButton;Ra=m.SimpleConfirmer;za=m.TextField;Ga=m.ComboColor;ua=m.CheckBox;m=com.kingdee.bos.qing.common.ui;Ta=m.ManualOrderingList;P=m.LocalFileSelector;Q=m.OpacityEditor;m=com.kingdee.bos.qing.map.controller;D=m.ActionChangeProperty;
m=com.kingdee.bos.qing.map;u=m.IntegrationRegister})()})();(function(){function X(){var b=!1,f=!1;this.setError=function(d){b=d};this.isError=function(){return b};this.setTooModern=function(d){f=d};this.isTooModern=function(){return f}}function la(b,f,d){this.setCurrentName=function(h){f.setCurrentName(h)};this.showShortPrompt=function(h,k,t){f.showShortPrompt(h,k,t)};this.setDirtyListener=function(h){d.hookDirtyListener(h)};this.clearDirty=function(){d.setDirty(!1)};this.isDirty=function(){return d.isDirty()};this.insertToolbarButton=function(h,k,t,q){return b.addButtonForHeadCustom(h,
k,t,q)};this.appendToolbarButton=function(h,k,t,q){return b.addButtonForTailCustom(h,k,t,q)};this.insertToolbarSeperator=function(){b.addSeperatorForHeadCustom()};this.insertToolbarMenu=function(h,k,t,q){return b.addMenuButtonForHeadCustom(function(){return h},k,t,q)};this.appendToolbarMenu=function(h,k,t,q){return b.addMenuButtonForTailCustom(function(){return h},k,t,q)}}function ea(){var b=new c,f,d=$("<div>"),h=$("<div>"),k=$("<div>");this.getJqUi=function(){f||(f=b.getJqUi(),f.addClass("map-toolbar"),
t(d),t(h),t(k));return f};this.refresh=function(){b.refresh()};this.addSeperator=function(){b.appendSeperator(h)};this.addSeperatorForHeadCustom=function(){b.appendSeperator(d)};this.addButton=function(A,H,F,x){return q(h,!1,A,H,F,x)};this.addButtonForHeadCustom=function(A,H,F,x){return q(d,!1,A,H,F,x)};this.addButtonForTailCustom=function(A,H,F,x){return q(k,!1,A,H,F,x)};this.addMenuButton=function(A,H,F,x){return q(h,!0,A,H,F,x)};this.addMenuButtonForHeadCustom=function(A,H,F,x){return q(d,!0,A,
H,F,x)};this.addMenuButtonForTailCustom=function(A,H,F,x){return q(k,!0,A,H,F,x)};var t=function(A){A.css({"float":"left",position:"relative",height:"100%"});A.appendTo(f)},q=function(A,H,F,x,U,Y){A=b.createButton(A,H,F,U,Y);A.setIconSetter(function(G,da){R.background(G,da)});A.setIconName(x);return A}}function T(){var b=this,f,d,h,k,t,q;this.getJqUi=function(){if(!f){f=$("<div>");f.addClass("map-statusbar");d=A("map-statusbar-name");h=A("map-statusbar-dirtystate");k=A("map-statusbar-prompt");t=A("map-statusbar-coordinate");
var F=$("<span style='background-size:100%'>"),x=$("<span>");t.append(F);t.append(x);t.css("padding-left","30px")}return f};var A=function(F){var x=$("<span>");x.addClass("map-statusbar-item");x.addClass(F);x.appendTo(f);return x};this.setCurrentName=function(F){d.text(F)};this.showDirtyState=function(F){h.text(F?"*":"")};this.showCoordinate=function(F,x,U){var Y=t.children(),G=Y.first();Y=Y.last();F?G.is(":visible")||(G.css("display","block"),x?(G.css("opacity","1"),G.css("background-image",""),
G.css("background-color",x),u.layoutCtrl(G,16,6,6,6)):U&&(G.css("opacity","0.75"),G.css("background-image",wa.getCursorIconUrl(U)),G.css("background-color",""),u.layoutCtrl(G,14,2,14,14))):G.css("display","none");Y.text(F)};this.showOperatingTips=function(F){F=F?m.get("operatingPrompt","\u64cd\u4f5c\u63d0\u793a\uff1a#1").replace("#1",F):"";b.showShortPrompt(F,!0)};this.showShortPrompt=function(F,x,U){clearTimeout(q);k.text(F);k.css("color",U?U:"");if(x){var Y=0,G=function(){if(4<Y)H(1E4);else{if(0==
Y%2){k.text(F);var da=350}else k.text(""),da=250;q=setTimeout(G,da);Y++}};G()}else H(5E3)};var H=function(F){q=setTimeout(function(){k.text("")},F)}}function fa(){var b=this,f,d,h,k=new aa,t=new ya,q=new Oa,A=new Ma(q),H=new Ra,F,x,U;this.setGlobalDependence=function(C){f=C;f.getCommandManager().setStateChanger(V,O)};this.updateMapModel=function(){if(h){var C=f.getMapModel();k.setMapModel(C);q.setMapModel(C);A.setMapModel(C);t.setMapModel(C);p().setMapModel(C)}q.setScalingRatio(1)};this.resize=function(){h.resize()};
this.getJqUi=function(){h||Y();return h.getJqUi()};var Y=function(){k.setWizardStarter(function(C){var ha=H.getJqPathCreatorForWizard(),y=q.getJqPageForWizard();f.showStartingWizard(C,ha,y)});k.setDependence(f,z());t.setDependence(f,z());H.setDependence(f,z());q.setDependence(f,z());A.setDependence(f,z());G();b.updateMapModel()},G=function(){var C=new l;C.setHorizontalSplit(!1);C.setSplitLineWide(8);C.setResizeMode(l.RESIZE_MODE_SECOND_FIXED);C.setFirstSize(-1,100,-1);C.setSecondSize(160,60,-1);C.setFirstChild(l.createChildWrapper(k.getJqUi()));
C.setSecondChild(l.createChildWrapper(A.getJqUi(),function(J){!J&&A.resize()}));var ha=$("<div>");q.getJqUi().css("z-index",1);H.getJqUi().css("z-index",2);ha.append(q.getJqUi());ha.append(H.getJqUi());u.layoutCtrlWithLRTB(q.getJqUi(),0,0,null,0,0,null);u.layoutCtrlWithLRTB(H.getJqUi(),0,null,50,0,null,null);da();var y=new l;y.setHorizontalSplit(!0);y.setSplitLineWide(8);y.setResizeMode(l.RESIZE_MODE_SECOND_FIXED);y.setFirstSize(-1,120,-1);y.setSecondSize(180,60,-1);y.setSecondChild(l.createChildWrapper(t.getJqUi()));
y.setFirstChild(l.createChildWrapper(ha,function(J){!J&&A.resize()}));h=new l;h.setHorizontalSplit(!0);h.setSplitLineWide(8);h.setResizeMode(l.RESIZE_MODE_FIRST_FIXED);h.setFirstSize(200,60,-1);h.setSecondSize(-1,600,-1);h.setFirstChild(C);h.setSecondChild(y);h.getJqUi().addClass("map-desk")},da=function(){var C=H.relayout();H.getJqUi().css("height",C)},ma=function(){F||(F=new db,F.addCurrentChangedListener(function(C,ha,y){pa().clearSelecteds();C.isCurrentConfirmed()?(H.setWorkingLayerConfirmed(!0),
C=p().getCurrent(),p().setCurrent(za.SELECTING),p().setCurrent(C)):(H.setWorkingLayerConfirmed(!1),p().setCurrent(za.MOTION))}));return F},pa=function(){x||(x=new Va,x.addSelectionChangedListener(function(C,ha,y,J){C=p().getCurrent();p().getActor(f,z(),C).respondToPointsSelected(ha)}));return x},p=function(){U||(U=new za);return U},z=function(){d||(d={},d.getLayersSelectionModel=ma,d.getPointsSelectionModel=pa,d.getOperatingStates=p,d.searchLayerUi=q.searchLayerUi,d.searchPointUi=q.searchPointUi,
d.updatePointMarkedness=q.updatePointMarkedness,d.updatePointsFlashing=q.updatePointsFlashing,d.redrawPathPeer=q.redrawPathPeer,d.createPathPeerInsteadPoints=q.createPathPeerInsteadPoints,d.scrollToPointVisible=q.scrollToPointVisible,d.scrollToKeepViewInCenter=q.scrollToKeepViewInCenter,d.getAssistiveStyle=q.getAssistiveStyle,d.getScalingRatio=q.getScalingRatio,d.setScalingRatio=q.setScalingRatio);return d},V=function(C){var ha=[];C.isLayersSelectionBackupable()&&(ha[0]=ma().getSelecteds());if(C.isOperatingStateBackupable()){var y=
p().getCurrent();ha[1]=y;ha[2]=y.getActor().keep()}C.setStateBackups(ha)},O=function(C){var ha=C.getStateBackups();C.isLayersSelectionBackupable()&&ma().syncSelecteds(ha[0]);C.isOperatingStateBackupable()&&(C=ha[1],p().setCurrent(C),C.getActor().restore(ha[2]))}}function aa(){var b,f,d,h,k,t,q,A,H;this.setDependence=function(w,S){b=w;f=S};this.setMapModel=function(w){d&&d.removeModelChangedListener(Ia);d=w;d.addModelChangedListener(Ia);h&&(G(),V(),z())};this.getJqUi=function(){if(!h){var w=$("<div>");
w.text(m.get("layerListTitle","\u533a\u57df\u56fe\u5c42"));u.makeTextOmissible(w);k=new Ea;k.addMenuItem(m.get("layerListMenuCreate","\u65b0\u5efa")+"...",ta);k.addMenuItem(m.get("layerListMenuRename","\u91cd\u547d\u540d")+"...",n,J);k.addMenuItem(m.get("layerListMenuOrdering","\u8c03\u6574\u987a\u5e8f")+"...",v,oa);k.addSeperator();k.addMenuItem(m.get("layerListMenuCopy","\u590d\u5236"),W,J);k.addMenuItem(m.get("layerListMenuMerge","\u5408\u5e76"),qa,ja);k.addSeperator();k.addMenuItem(m.get("layerListMenuDelete",
"\u5220\u9664"),xa,y);var S=$("<div>");S.addClass("map-deskarea-titlebar");S.append(w);S.append(k.getJqUi());u.layoutCtrlMiddleAlign(w,20);u.layoutCtrlWithLRTB(w,4,24,null,null,null,null);u.layoutCtrlWithLRTB(k.getJqUi(),null,2,20,2,2,null);t=Y(m.get("allLayerVisible","\u5168\u90e8\u53ef\u89c1"),C);q=Y(m.get("backImageVisible","\u5e95\u56fe"),ha);w=$("<div>");w.addClass("map-layerarea-opbar");w.append(t.getJqUi());w.append(q.getJqUi());u.layoutCtrlWithLRTB(t.getJqUi(),4,null,"50%",0,0,null);u.layoutCtrlWithLRTB(q.getJqUi(),
null,4,80,0,0,null);q.getJqUi().css("max-width","40%");A=new K;A.setMultiSelectable(!0);A.setContinuousSelectingEnabled(!0);A.setToggleSelectingEnabled(!0);A.setBorderVisible(!1);A.setCustomItemPainter(ma);U();h=$("<div>");h.addClass("map-deskarea");h.append(S);h.append(w);h.append(A.getJqUi());u.layoutCtrlWithLRTB(S,0,0,null,0,null,26);u.layoutCtrlWithLRTB(w,0,0,null,27,null,26);u.layoutCtrlWithLRTB(A.getJqUi(),0,0,null,54,0,null);d&&(G(),V(),z())}return h};this.setWizardStarter=function(w){H=w};
var F=function(){return d.getPage()},x=function(){return f.getLayersSelectionModel()},U=function(){var w=!1,S=!1;A.addSelectedChangedListener(function(ka,Aa,Na){w||(S=!0,x().syncSelecteds(Na),S=!1)});x().addSelectionChangedListener(function(ka){S||(w=!0,A.setSelecteds(ka.getSelecteds()),w=!1)})},Y=function(w,S){var ka=!1,Aa=function(ob){ka=ob;R.background(Na,ka?"icn_eye2":"icn_empty")},Na=$("<div>");Na.css("cursor","pointer");Na.css("box-shadow","0 0 0 1px #ccc inset");Na.on("mousedown",function(ob){ob=
S(ka);Aa(ob)});w=(new ca(w)).getJqUi();var cb=$("<div>");cb.css("cursor","default");cb.append(Na);cb.append(w);u.layoutCtrlMiddleAlign(Na,16);u.layoutCtrlMiddleAlign(w,16);u.layoutCtrlWithLRTB(Na,1,null,16,null,null,null);u.layoutCtrlWithLRTB(w,20,0,null,null,null,null);w={getJqUi:function(){return cb},isChecked:function(){return ka}};w.setChecked=Aa;return w},G=function(){var w=F(),S=w.getLayersCount();if(0==S)da(),A.setItemModels([]);else{h.find(".map-layerarea-wizard").remove();for(var ka=[],Aa=
0;Aa<S;Aa++)ka.push(w.getLayer(Aa));A.setItemModels(ka)}},da=function(){var w=new E(m.get("wizardStart","\u4ece\u54ea\u91cc\u5f00\u59cb\uff1f"));w.addActionListener(function(S){H(k.getJqUi())});u.layoutCtrlWithLRTB(w.getJqUi(),10,10,null,80,null,30);w.getJqUi().addClass("map-layerarea-wizard");w.getJqUi().appendTo(h)},ma=function(w,S){var ka=$("<div>");ka.css("background-color","#fff");var Aa=$("<div>");Aa.css("cursor","pointer");Aa.on("mousedown",function(ob){ob.stopPropagation();S.setRequiredVisible(!S.isRequiredVisible())});
var Na=$("<div>"),cb=$("<div>");w.css("height",26);u.layoutCtrlMiddleAlign(Aa,16);u.layoutCtrlMiddleAlign(Na,16);u.layoutCtrlMiddleAlign(cb,20);u.layoutCtrlWithLRTB(ka,0,null,38,0,0,null);u.layoutCtrlWithLRTB(Aa,4,null,16,null,null,null);u.layoutCtrlWithLRTB(Na,22,null,16,null,null,null);u.layoutCtrlWithLRTB(cb,40,0,null,null,null,null);w.append(ka);w.append(Aa);w.append(Na);w.append(cb);p(w,S);pa(w,S)},pa=function(w,S){w.children().eq(3).text(S.getDisplayName())},p=function(w,S){var ka=w.children().eq(1);
S.isVisible()?(ka.css("box-shadow","0 0 0 1px #eee inset"),R.background(ka,S.isRequiredVisible()?"icn_eye2":"icn_eye1")):(ka.css("box-shadow","0 0 0 1px #ccc inset"),R.background(ka,"icn_empty"));w=w.children().eq(2);S.isCurrentVisible()?(w.attr("title",m.get("currentLayer","\u5f53\u524d\u5de5\u4f5c\u56fe\u5c42")),R.background(w,"icn_pen")):(w.attr("title",""),R.background(w,"icn_empty"))},z=function(){F().getBackImageId()?(q.getJqUi().css("display",""),q.setChecked(F().isImageDesigntimeVisible())):
q.getJqUi().css("display","none")},V=function(w){0==F().getLayersCount()?t.getJqUi().css("display","none"):(t.getJqUi().css("display",""),t.setChecked(void 0===w?O():w))},O=function(){for(var w=!0,S=0;S<F().getLayersCount();S++)if(!F().getLayer(S).isRequiredVisible()){w=!1;break}return w},C=function(w){w=!O();for(var S=0;S<F().getLayersCount();S++)F().getLayer(S).setRequiredVisible(w);return w},ha=function(w){w=!F().isImageDesigntimeVisible();F().setImageDesigntimeVisible(w);return w},y=function(){return x().isAnySelected()},
J=function(){return x().isSingleSelected()},ja=function(){return 1<x().getSelectedCount()},oa=function(){return 1<F().getLayersCount()},ta=function(w){var S=m.get("layerDefaultNamePrefix","\u533a\u57df"),ka=1;do w=S+ka++;while(F().isLayerNameDuplicated(w));S=new Qa;S.setTitle(m.get("captionCreateLayer","\u65b0\u5efa\u533a\u57df"));S.setLayerName(w);S.setContext(F(),null,function(Aa){var Na=new eb;Na.setCaption(m.get("captionCreateLayer","\u65b0\u5efa\u533a\u57df")+"-"+Aa);Na.setValue(F(),Aa);b.getCommandManager().perform(Na)});
S.showMeBeside(A.getJqUi())},xa=function(w){A.scrollSelectedToVisible();w=A.getItemUiByModel(A.getSelecteds()[0]);if(x().isSingleSelected()){var S=x().getSingleSelected();var ka=m.get("captionDeleteOneLayer","\u5220\u9664\u533a\u57df\u56fe\u5c42\u201c#1\u201d").replace("#1",S.getDisplayName())}else S=x().getSelectedCount(),ka=m.get("captionDeleteSomeLayers","\u5220\u9664\u9009\u4e2d\u7684#1\u4e2a\u533a\u57df\u56fe\u5c42").replace("#1",S);S=m.get("promptDeleteLayerConfirm","\u786e\u5b9a#1\u5417\uff1f").replace("#1",
ka);var Aa=new I;Aa.setText(S);Aa.setConfirmedListener(function(Na){if(Na){Na=x().getSelecteds();var cb=new gb;cb.setCaption(ka);cb.setValue(F(),Na);b.getCommandManager().perform(cb)}});Aa.show(w)},n=function(w){var S=x().getSingleSelected();w=new Qa;w.setTitle(m.get("captionRenameLayer","\u91cd\u547d\u540d\u533a\u57df"));w.setLayerName(S.getDisplayName());w.setContext(F(),S,function(ka){var Aa=new Wa;Aa.setCaption(m.get("captionRenameLayer","\u91cd\u547d\u540d\u533a\u57df")+"-"+ka);Aa.setMethod(S.getDisplayName,
S.setDisplayName);Aa.setValue(ka);b.getCommandManager().perform(Aa)});w.showMeBeside(A.getJqUi())},v=function(w){w=new kb;w.setTitle(m.get("captionOrderingLayers","\u8c03\u6574\u533a\u57df\u987a\u5e8f"));w.setContext(F().carryLayersOut().slice(),function(S){var ka=new Wa;ka.setCaption(m.get("captionOrderingLayers","\u8c03\u6574\u533a\u57df\u987a\u5e8f"));ka.setMethod(F().carryLayersOut,F().carryLayersIn);ka.setValue(S);b.getCommandManager().perform(ka)});w.showDialog()},W=function(w){w=x().getSingleSelected();
for(var S=w.getDisplayName()+"_"+m.get("layerDuplicatedNamePostfix","\u526f\u672c"),ka=1,Aa=S;F().isLayerNameDuplicated(Aa);)Aa=S+ka++;S=new Za;S.setCaption(m.get("captionCopyLayer","\u590d\u5236\u533a\u57df")+"-"+Aa);S.setValue(F(),w,Aa);b.getCommandManager().perform(S)},qa=function(w){w=[];var S=x().getSelecteds(),ka=new $a;ka.setCaption(m.get("captionMergeLayers","\u5408\u5e76\u533a\u57df"));ka.setValue(F(),S,w);0<w.length?(S=w[0],ka=w[1],w=m.get("promptMergeLayerSuggest","\u201c#1\u201d\u548c\u201c#2\u201d\u5b58\u5728\u4f4d\u7f6e\u5b8c\u5168\u4e00\u6837\u7684\u8def\u5f84\uff0c\u4e0d\u5efa\u8bae\u5408\u5e76\u3002"),
w=w.replace("#1",S),w=w.replace("#2",ka),S=new I,S.setText(w),A.scrollSelectedToVisible(),w=A.getItemUiByModel(A.getSelecteds()[0]),S.show(w,!0)):b.getCommandManager().perform(ka)},Ia=function(w){if(w.isContainOneOfKeys([$a.FORWARD,$a.BACKWARD])){var S=w.getActionTarget(),ka=S.getAdditional();G();x().syncSelecteds(ka);V()}else if(w.isContainKey(ra.S_ORDERING_LAYERS))G();else if(w.isContainKey(ra.P_LAYER_NAME))S=w.getTarget(ra.P_LAYER_NAME).getMe(),ka=A.getItemUiByModel(S),pa(ka,S);else if(w.isContainKey(ra.P_LAYER_VISIBLE)){w=
w.getTargets(ra.P_LAYER_VISIBLE);for(var Aa=0;Aa<w.length;Aa++)S=w[Aa],S=S.getMe(),ka=A.getItemUiByModel(S),p(ka,S);V()}else if(w.isContainKey(ra.S_ADD_LAYER)){G();ka=[];w=w.getTargets(ra.S_ADD_LAYER);for(Aa=w.length-1;0<=Aa;Aa--)S=w[Aa],S=S.getSubStructure(),ka.push(S);x().syncSelecteds(ka)}else w.isContainKey(ra.S_REMOVE_LAYER)?(G(),x().syncSelecteds([]),V()):w.isContainKey(ra.P_PAGE_BACKIMAGE)&&z()}}function ya(){var b,f,d,h,k;this.setDependence=function(n,v){b=n;f=v};this.setMapModel=function(n){d&&
d.removeModelChangedListener(xa);d=n;d.addModelChangedListener(xa);h&&ma()};this.getJqUi=function(){if(!h){var n=$("<div>");n.text(m.get("pointListTitle","\u5de5\u4f5c\u56fe\u5c42\u5185\u5bb9"));u.makeTextOmissible(n);var v=new Ea;v.addMenuItem(m.get("pointListMenuDelete","\u5220\u9664"),y,C);v.addMenuItem(m.get("pointListMenuModify","\u4fee\u6539\u4f4d\u7f6e")+"...",J,ha);var W=$("<div>");W.addClass("map-deskarea-titlebar");W.append(n);W.append(v.getJqUi());u.layoutCtrlMiddleAlign(n,20);u.layoutCtrlWithLRTB(n,
4,24,null,null,null,null);u.layoutCtrlWithLRTB(v.getJqUi(),null,2,20,2,2,null);k=new ba;k.setRoot(new ba.BranchNode);k.getRoot().setExpanded(!0);k.setRootVisible(!1);k.setMultiSelectable(!0);k.setNodePainter(Y);k.addSelectingListener(U);A();h=$("<div>");h.addClass("map-deskarea");h.append(W);h.append(k.getJqUi());u.layoutCtrlWithLRTB(W,0,0,null,0,null,26);u.layoutCtrlWithLRTB(k.getJqUi(),0,0,null,27,0,null);d&&ma()}return h};var t=function(){return f.getLayersSelectionModel().getCurrentLayer()},q=
function(){return f.getPointsSelectionModel()},A=function(){f.getLayersSelectionModel().addCurrentChangedListener(function(v,W,qa){ma()});var n=!1;k.addSelectedListener(function(v){v=x(k.getSelecteds());n=!0;q().setSelecteds(t(),v);n=!1;0<v.length&&(f.scrollToPointVisible(v),f.updatePointsFlashing(t(),v))});q().addSelectionChangedListener(function(v,W,qa,Ia){if(!n){W={};v=F(v.searchSelectedsUiTagMap(),W);k.setSelecteds(v);for(var w in W)k.expandToNode(W[w],!0);0<qa.length?(qa=H(qa[0]),k.scrollNodeToVisible(qa)):
0<Ia.length&&(qa=H(Ia[0]),k.scrollNodeToVisible(qa))}})},H=function(n){var v;k.getRoot().visiting(function(W){var qa=!1;W.getUserObject()==n&&(v=W,qa=!0);return qa});return v},F=function(n,v){var W=[];k.getRoot().deepFirstVisiting(function(qa){if(qa.isLeafNode()){var Ia=qa.getUserObject();n[Ia.getUiTag()]&&(W.push(qa),v[qa.getParent().getUiTag()]=qa.getParent())}});return W},x=function(n){for(var v=[],W=0;W<n.length;W++)v.push(n[W].getUserObject());return v},U=function(n,v){v.isLeafNode()||(n=x(v.getAllChildren()),
q().setSelecteds(t(),n),0<n.length&&(f.scrollToPointVisible(n),f.updatePointsFlashing(t(),n)))},Y=function(n,v){v=v.getUserObject();v instanceof Sa?(n.text(m.get("path","\u8def\u5f84")),3>v.getPointsCount()?da(n,m.get("warnPathPoints","\u8def\u5f84\u5c11\u4e8e3\u4e2a\u951a\u70b9\uff0c\u4e0d\u80fd\u56f4\u8d77\u4e00\u5757\u9762\u79ef\u3002")):v.isClosed()?G(n):da(n,m.get("warnPathClosed","\u8def\u5f84\u672a\u95ed\u5408"))):v instanceof jb&&(n.text(ub.formatPoint(v)),oa(v.getX(),v.getY())?G(n):da(n,
ta()))},G=function(n){n.css("padding-left",4);n.css("padding-right",4);n.attr("title",null)},da=function(n,v){var W=sa.createWarning();u.layoutCtrl(W,0,0,null,null);W.appendTo(n);n.css("padding-left",12);n.css("padding-right",4);n.attr("title",v)},ma=function(){var n=z();0<n.length?k.scrollNodeToVisible(n[0]):0<k.getRoot().getChildCount()&&k.scrollNodeToVisible(k.getRoot().getChild(0))},pa=function(n){if(n){n=p(n);var v=n.getUserObject();k.removeAllChildren(n);n.setExpanded(!0);V(n,v,{},null);k.refresh(n)}else{n=
{};v=k.getRoot();for(var W=v.getChildCount()-1;0<=W;W--){var qa=v.getChild(W),Ia=qa.getUserObject();n[Ia.getUiTag()]=qa.isExpanded()}z(n)}},p=function(n){for(var v=k.getRoot(),W=v.getChildCount()-1;0<=W;W--){var qa=v.getChild(W);if(n==qa.getUserObject())return qa}return null},z=function(n){h.find(".map-pointarea-emptyprompt").remove();k.getRoot().removeAllChildren();var v=[];if(f.getLayersSelectionModel().isCurrentConfirmed()){var W=t(),qa=W.getPathsCount();if(0<qa){for(var Ia=q().searchSelectedsUiTagMap(),
w=0;w<qa;w++){var S=W.getPath(w),ka=new ba.BranchNode(S);ka.setSelectable(!1);ka.setExpanded(n&&!1===n[S.getUiTag()]?!1:!0);V(ka,S,Ia,v);k.getRoot().addChild(ka)}k.setSelecteds(v)}else O(m.get("pointListPromptNothing","\u6ca1\u6709\u951a\u70b9"))}else O(m.get("pointListPromptNoLayer","\u672a\u786e\u5b9a\u5de5\u4f5c\u56fe\u5c42"));k.refresh();return v},V=function(n,v,W,qa){for(var Ia=0;Ia<v.getPointsCount();Ia++){var w=v.getPoint(Ia),S=new ba.LeafNode(w);n.addChild(S);W[w.getUiTag()]&&qa.push(S)}},
O=function(n){var v=$("<div>");v.text(n);v.addClass("map-pointarea-emptyprompt");v.appendTo(h);u.layoutCtrlWithLRTB(v,2,2,null,40,null,20)},C=function(){return q().isAnySelected()},ha=function(){return q().isSingleSelected()},y=function(n){n=new bb;n.setCaption(m.get("captionDeletePoint","\u5220\u9664\u951a\u70b9"));n.setValue(t(),q().searchSelectedsUiTagMap());b.getCommandManager().perform(n)},J=function(n){n=q().searchAllSelecteds()[0];var v=H(n);k.expandToNode(v);k.scrollSelectedToVisible();v=
k.searchUiByModel(v);var W=new tb;W.setTitle(m.get("captionModifyPointPosition","\u4fee\u6539\u951a\u70b9\u4f4d\u7f6e"));W.setContext(d.getPage(),n,ja,oa,ta);W.showMeBeside(v)},ja=function(n,v,W){var qa=new N;qa.setOperatingStateBackupable(!1);qa.setValue(t(),n,v,W);qa.setCaption(m.get("captionModifyPointPosition","\u4fee\u6539\u951a\u70b9\u4f4d\u7f6e"));b.getCommandManager().perform(qa)},oa=function(n,v){return 0<=n&&n<d.getPage().getWidth()&&0<=v&&v<d.getPage().getHeight()},ta=function(){var n=
m.get("warnPointPositionOutside","\u5750\u6807\u4e0d\u5e94\u8d85\u8fc7\u753b\u9762\u5c3a\u5bf8\uff1a#1*#2");n=n.replace("#1",d.getPage().getWidth());return n=n.replace("#2",d.getPage().getHeight())},xa=function(n){n.isContainKey(ra.P_PAGE_SIZE)&&pa();if(n.isContainOneOfKeys([N.FORWARD,N.BACKWARD])){pa();var v=n.getActionTarget();n=v.getMe();v=v.getAdditional();q().setSelecteds(n,v)}else if(n.isContainOneOfKeys([bb.FORWARD,bb.BACKWARD])){var W=n.getActionTarget(),qa=W.getAdditional();v=qa[0];qa=qa[1];
pa();if(n.isContainKey(bb.FORWARD)){for(n=v.length-1;0<=n;n--)if(W=p(v[n]))k.expandToNode(W,!0),k.scrollNodeToVisible(W);q().clearSelecteds()}else n=W.getMe(),q().setSelecteds(n,qa)}else if(n.isContainOneOfKeys([lb.FORWARD,lb.BACKWARD]))pa(),n.isContainKey(lb.FORWARD)?(v=n.getActionTarget(),n=v.getMe(),v=v.getAdditional().getTailPoint(),q().setSelecteds(n,[v])):q().clearSelecteds();else if(n.isContainOneOfKeys([mb.FORWARD,mb.BACKWARD]))v=n.getActionTarget(),n=v.getAncestor(0),v=v.getMe(),W=v.getTailPoint(),
pa(v),q().setSelecteds(n,[W]);else if(n.isContainOneOfKeys([ab.FORWARD,ab.BACKWARD]))W=n.getActionTarget(),v=W.getMe(),n.isContainKey(ab.FORWARD)?q().clearSelecteds():(n=W.getAncestor(0),W=v.getTailPoint(),q().setSelecteds(n,[W])),k.refresh(H(v));else if(n.isContainOneOfKeys([hb.FORWARD,hb.BACKWARD]))W=n.getActionTarget(),v=W.getMe(),pa(v),n.isContainKey(hb.FORWARD)?(n=W.getAncestor(0),v=v.getTailPoint(),q().setSelecteds(n,[v])):q().clearSelecteds();else if(n.isContainOneOfKeys([nb.FORWARD,nb.BACKWARD]))pa(),
v=n.getActionTarget(),n=v.getAncestor(0),v=v.getMe().getTailPoint(),q().setSelecteds(n,[v]);else if(n.isContainOneOfKeys([Z.FORWARD,Z.BACKWARD]))v=n.getActionTarget(),W=v.getMe(),pa(W),n.isContainKey(Z.FORWARD)?(n=v.getAncestor(0),v=v.getAdditional()[0],q().setSelecteds(n,[v])):q().clearSelecteds();else if(n.isContainOneOfKeys([ib.FORWARD,ib.BACKWARD]))if(pa(),W=n.getActionTarget(),v=W.getMe(),qa=W.getAdditional(),W=qa[0],qa=qa[1],n.isContainKey(ib.FORWARD)){if(n=p(W))k.expandToNode(n,!0),k.scrollNodeToVisible(n);
q().clearSelecteds()}else q().setSelecteds(v,[qa]);else if(n.isContainOneOfKeys([ia.FORWARD,ia.BACKWARD]))for(pa(),n=n.getActionTarget(),n.getMe(),n=n.getAdditional()[0],v=0;v<n.length;v++){if(W=p(n[v]))k.expandToNode(W,!0),k.scrollNodeToVisible(W)}else n.isContainOneOfKeys([$a.FORWARD,$a.BACKWARD])&&pa()}}function Fa(b){var f,d;this.setActionListener=function(h){d=h};this.getJqUi=function(){if(!f){var h=$("<div>");R.background(h,b);u.layoutCtrlCenterAlign(h,16);u.layoutCtrlMiddleAlign(h,16);f=$("<div>");
f.addClass("map-deskarea-titlebarbutton");f.append(h);f.on("mousedown",d)}return f}}function Ea(){Fa.call(this,"icn_arrow_down");this.setActionListener(function(d){var h=$(d.currentTarget);d=$(d.target);if(f().isShowing())f().hide();else{for(var k=f().getModel(),t=0,q=k.getItemCount();t<q;t++){var A=k.getItemModel(t);if(!k.isSeperator(A)){var H=A.getUserObject();H&&(H=H(),A.setEnabled(H))}}k=$(document.body);t=[h.outerWidth()-120,h.outerHeight()];t=u.upwardCoordinate(h[0],t,k[0]);f().show(k,t[0],
t[1],d,!1)}});var b;this.addMenuItem=function(d,h,k){h=new g(h);h.setText(d);h.setUserObject(k);f().getModel().addItemModel(h)};this.addSeperator=function(){f().getModel().addSeperator()};var f=function(){b||(b=new a,b.setWidth(120),b.setModel(new e));return b}}function Ma(b){var f,d,h,k,t,q,A,H,F;this.setDependence=function(y,J){f=y};this.setMapModel=function(y){d&&d.removeModelChangedListener(O);d=y;d.addModelChangedListener(O);h&&(pa(),p(),V())};this.resize=function(){d&&setTimeout(function(){pa();
V()},0)};this.getJqUi=function(){!h&&x();return h};var x=function(){b.setViewChangedListener(C);H=new Q;H.setAssistiveStyle(b.getAssistiveStyle());H.setCoordinateTransformer(function(oa){return parseInt(oa*F+.5)});var y=$("<div>");y.text(m.get("overallView","\u5168\u5c40\u89c6\u56fe"));u.makeTextOmissible(y);var J=$("<div>");J.addClass("map-deskarea-titlebar");J.append(y);u.layoutCtrlMiddleAlign(y,20);u.layoutCtrlWithLRTB(y,4,50,null,null,null,null);U(J);y=$("<div>");y.addClass("map-overallview-container");
y.css("overflow","hidden");var ja=y.append;t=$("<div>");t.addClass("map-pageview-page");q=$("<div>");q.addClass("map-overallview-viewport");k=$("<div>");k.addClass("map-pageview");k.append(t);k.append(q);ja.call(y,k);A=$("<div>");A.addClass("map-overallview-footer");h=$("<div>");h.addClass("map-deskarea");h.append(J);h.append(y);h.append(A);u.layoutCtrlWithLRTB(J,0,0,null,0,null,26);u.layoutCtrlWithLRTB(y,0,0,null,27,17,null);u.layoutCtrlWithLRTB(A,0,0,null,null,0,16);d&&(pa(),p(),V());Y();G()},U=
function(y){var J=new Fa("icn_zoom_100%");J.setActionListener(function(ja){1==b.getScalingRatio()?f.getStatusBar().showShortPrompt(m.get("tipsZoom100Already","\u7f29\u653e\u6bd4\u4f8b\u5df2\u662f100%\u3002"),!0):(f.getStatusBar().showShortPrompt(""),b.setViewportState(0,0),b.setScalingRatio(1))});J.getJqUi().appendTo(y);u.layoutCtrlWithLRTB(J.getJqUi(),null,30,20,2,2,null);J=new Fa("icn_zoom_x%");J.setActionListener(function(ja){ja=new sb;ja.setContext(b);ja.showMeBeside(y)});J.getJqUi().appendTo(y);
u.layoutCtrlWithLRTB(J.getJqUi(),null,4,20,2,2,null)},Y=function(){k.on("click",function(y){if(y.target!=q[0]){var J=u.upwardCoordinate(q[0],[0,0],document.body),ja=q.prop("offsetLeft")+(y.pageX-J[0]);y=q.prop("offsetTop")+(y.pageY-J[1]);ja-=q.prop("offsetWidth")>>1;y-=q.prop("offsetHeight")>>1;J=da();ma(ja,y,J[0],J[1]);ha()}})},G=function(){var y=!1,J=!1,ja,oa,ta;k.on("mousedown",function(xa){xa.target==q[0]&&(y=!0)});k.on("mousemove",function(xa){J&&ma(xa.clientX-ja[0]+oa[0],xa.clientY-ja[1]+oa[1],
ta[0],ta[1]);y&&(y=!1,J=!0,ja=[xa.clientX,xa.clientY],oa=[q.prop("offsetLeft"),q.prop("offsetTop")],ta=da())});k.parent().on("mouseup",function(xa){J&&ha();J=y=!1});k.parent().on("mouseleave",function(xa){J&&ha();J=y=!1})},da=function(){return[k.prop("clientWidth")-q.prop("offsetWidth"),k.prop("clientHeight")-q.prop("offsetHeight")]},ma=function(y,J,ja,oa){y>ja&&(y=ja);0>y&&(y=0);J>oa&&(J=oa);0>J&&(J=0);q.css({left:y,top:J})},pa=function(){var y=b.getViewState(),J=y[0],ja=y[1],oa=y[2],ta=y[3],xa=
y[4];y=y[5];var n=k.parent(),v=n.prop("clientWidth")-8;n=n.prop("clientHeight")-8;var W=J/ja;W<v/n?(ja=parseInt(n*W+.5),v=n):(ja=v,v=parseInt(v/W+.5));u.layoutCtrl(k,"50%","50%",ja,v);k.css({"margin-left":-(ja>>1)+"px","margin-top":-(v>>1)+"px"});J=ja/J;oa=parseInt(oa*J+.5);ta=parseInt(ta*J+.5);xa=parseInt(xa*J+.5);y=parseInt(y*J+.5);u.layoutCtrl(t,oa,ta,xa,y);F=b.getScalingRatio()*J;z()},p=function(){Xa.draw(d.getPage(),t)},z=function(){t.empty();H.makeDrawable(t[0]);for(var y=0;y<d.getPage().getLayersCount();y++){var J=
d.getPage().getLayer(y);if(J.isVisible())for(var ja=0;ja<J.getPathsCount();ja++){var oa=J.getPath(ja);H.drawPath(oa,t)}}},V=function(){var y=b.getViewportState(),J=y[0],ja=y[1],oa=y[2],ta=y[3],xa=y[4];y=k.prop("clientWidth");var n=k.prop("clientHeight");J=y/J;ja=parseInt(ja*J+.5);oa=parseInt(oa*J+.5);ta=parseInt(ta*J+.5);xa=parseInt(xa*J+.5);u.layoutCtrl(q,ja,oa,ta,xa);q.css("cursor",0==ja&&0==oa&&ta==y&&xa==n?"default":"move")},O=function(y){y.isContainKey(ra.P_PAGE_SIZE)&&(pa(),V());y.isContainKey(ra.P_PAGE_BACKIMAGE)&&
p();y.isContainOneOfKeys([ra.P_LAYER_VISIBLE,ra.P_PATH_CLOSED,ra.P_POINT_POSITION,ra.S_ADD_POINT,ra.S_REMOVE_POINT,ra.S_ADD_PATH,ra.S_REMOVE_LAYER])&&z()},C=function(y,J){setTimeout(function(){!y&&pa();V();J&&A.text(J)},0)},ha=function(){var y=b.getViewportState()[0]/k.prop("clientWidth"),J=parseInt(q.prop("offsetLeft")*y);y=parseInt(q.prop("offsetTop")*y);b.setViewportState(J,y)}}function Oa(){var b,f,d,h,k,t,q=new Ua,A=new function(){var r=this,B,M,L,na,Ka;this.bindMouseEvent=function(Da){B=Da;
L=M=!1;Ka=na=null};this.isCtrlPressed=function(){return B.ctrlKey};this.isShiftPressed=function(){return B.shiftKey};this.getMouseXY=function(){return[B.clientX,B.clientY]};this.getX=function(){return La()[0]};this.getY=function(){return La()[1]};var La=function(){if(!na){var Da=B.pageX,Ya=B.pageY,Pa=u.upwardCoordinate(k[0],[0,0],document.body);Da-=Pa[0];Ya-=Pa[1];Pa=Math.max(0,Math.min(Da,z(d.getPage().getWidth())-1));var qb=Math.max(0,Math.min(Ya,z(d.getPage().getHeight())-1)),vb=Da+k.prop("offsetLeft")-
h.prop("scrollLeft"),rb=Ya+k.prop("offsetTop")-h.prop("scrollTop");na=[r.viewToModel(Pa),r.viewToModel(qb)];L=M=!1;vb<h.prop("clientWidth")&&rb<h.prop("clientHeight")&&(M=!0,Pa==Da&&qb==Ya&&(L=!0))}return na};this.viewToModel=function(Da){return parseInt(Da/H*100+.5)/100};this.modelToView=function(Da){return z(Da)};this.getJqPage=function(){return k};this.isInsideView=function(){La();return M};this.isInsidePage=function(){La();return L};this.isAtAnyPoint=function(){if(!Ka&&r.isInsidePage()){var Da=
$(B.target);Da.hasClass("point")&&(Ka=Da)}return Ka?!0:!1};this.isAtThePoint=function(Da){return r.getTargetPointUiTag()==Da.getUiTag()};this.getTargetPointUiTag=function(){return Ka.attr("name")};this.getTargetJqPoint=function(){return Ka};this.searchTargetPoint=function(){var Da=null;f.getLayersSelectionModel().getCurrentLayer().visitingPoints(function(Ya,Pa){return r.isAtThePoint(Pa)?(Da=Pa,!0):!1});return Da}},H,F;this.setDependence=function(r,B){b=r;f=B};this.setMapModel=function(r){d&&d.removeModelChangedListener(v);
d=r;d.addModelChangedListener(v);h&&(ma(),pa(),V())};this.getJqUi=function(){!h&&U();return h};this.getJqPageForWizard=function(){return k};this.searchLayerUi=function(r){return C(r)};this.searchPointUi=function(r,B,M){return ja(r,B,M)};this.updatePointMarkedness=function(r,B,M){ta(r,B,M)};this.updatePointsFlashing=function(r,B){var M=[],L=[],na=null;r=C(r);for(var Ka=0;Ka<B.length;Ka++){var La=B[Ka],Da=ja(La,r);0==Da.length&&(!na&&(na=$(document.createDocumentFragment())),Da=J(La,na),L.push(Da[0]));
M.push(Da[0])}na&&na.appendTo(r);B=$(M);xa(B,function(){$(L).remove()})};this.redrawPathPeer=function(r,B,M){r=C(r);for(var L=0;L<B.length;L++)n(B[L],r);if(M){B=$(document.createDocumentFragment());for(L=0;L<M.length;L++){var na=J(M[L],B);ta(na,q.getSelectedPointColor())}B.appendTo(r)}};this.createPathPeerInsteadPoints=function(r,B){r=C(r);for(var M=0;M<B.length;M++)ja(B[M],r).remove();var L=$("<div>");for(M=0;M<B.length;M++){var na=J(B[M],L);ta(na,q.getSelectedPointColor())}u.layoutCtrl(L,0,0,"100%",
"100%");L.appendTo(r);return L};this.scrollToPointVisible=function(r){for(var B=k.prop("offsetLeft"),M=k.prop("offsetTop"),L=h.prop("clientWidth"),na=h.prop("scrollLeft"),Ka=h.prop("clientHeight"),La=h.prop("scrollTop"),Da=0,Ya=2147483647,Pa=0,qb=2147483647,vb=0;vb<r.length;vb++){var rb=r[vb],wb=z(rb.getX())+B,xb=z(rb.getY())+M;rb=Math.max(Da,wb-L+20);wb=Math.min(Ya,Math.max(0,wb-100));var yb=Math.max(Pa,xb-Ka+20);xb=Math.min(qb,Math.max(0,xb-20));if(rb>wb||yb>xb)break;Da=rb;Ya=wb;Pa=yb;qb=xb}r=Da<=
na&&na<=Ya;B=Pa<=La&&La<=qb;if(r&&B)return!1;!r&&(na=na<Da?Da:Ya);!B&&(La=La<Pa?Pa:qb);h.animate({scrollLeft:na,scrollTop:La},225);return!0};this.scrollToKeepViewInCenter=function(r,B){var M=h.prop("clientWidth"),L=h.prop("clientHeight");B=Math.max(0,B-(L>>1));h.prop("scrollLeft",Math.max(0,r-(M>>1)));h.prop("scrollTop",B)};this.getAssistiveStyle=function(){return q};this.setScalingRatio=function(r){H!=r&&(H=r,ma(),V(),r=pb.formatToDisplay(r),F(!1,r))};this.getScalingRatio=function(){return H};this.getViewState=
function(){var r=h.prop("scrollWidth"),B=h.prop("scrollHeight"),M=k.prop("offsetWidth"),L=k.prop("offsetHeight");return[r,B,60,10,M,L]};this.getViewportState=function(){var r=h.prop("scrollWidth"),B=h.prop("scrollLeft"),M=h.prop("scrollTop"),L=h.prop("clientWidth"),na=h.prop("clientHeight");return[r,B,M,L,na]};this.setViewportState=function(r,B){h.prop("scrollLeft",r);h.prop("scrollTop",B)};this.setViewChangedListener=function(r){F=r};var x=function(r){return f.getOperatingStates().getActor(b,f,r)},
U=function(){t=new Q;t.setAssistiveStyle(q);t.setCoordinateTransformer(z);h=$("<div>");h.addClass("map-drawingboard map-pageview");h.css("overflow","auto");h.on("scroll",function(r){F(!0,void 0)});k=$("<div>");k.addClass("map-pageview-page");k.appendTo(h);da();Y();$("<div>").appendTo(h);d&&(ma(),pa(),V());x().hello()},Y=function(){f.getLayersSelectionModel().addCurrentChangedListener(function(r,B,M){B&&ja(null,C(B)).css("cursor","");G()});f.getOperatingStates().addCurrentChangedListener(function(r,
B,M){x(B).bye();x().hello();G()});h.on("mousedown",Aa);h.on("mouseup",Na);h.on("mousemove",cb);h.on("mouseleave",ob)},G=function(){if(f.getLayersSelectionModel().isCurrentConfirmed()||f.getOperatingStates().getCurrent().isEnabledAlways()){var r=null;f.getLayersSelectionModel().isCurrentConfirmed()&&(r=f.getLayersSelectionModel().getCurrentLayer(),r=C(r),r=ja(null,r));x().updateCursor(k,r)}else da()},da=function(){wa.setCursor(k,"cur_forbid.png","not-allowed")},ma=function(){var r=z(d.getPage().getWidth())-
1,B=z(d.getPage().getHeight())-1;u.layoutCtrl(k,60,10,r,B);u.layoutCtrl(k.siblings(),r+60+20,B+10+20,1,1)},pa=function(){Xa.draw(d.getPage(),k)},p=function(){for(var r=f.getLayersSelectionModel().getCurrentLayer(),B=0,M=d.getPage().getLayersCount();B<M;B++){var L=d.getPage().getLayer(B),na=C(L),Ka=L==r;na.css({"z-index":Ka?2:1,opacity:Ka?1:.4,display:L.isVisible()?"":"none"})}},z=function(r){return parseInt(r*H+(0>r?-.5:.5))},V=function(){k.empty();for(var r=$(document.createDocumentFragment()),B=
0,M=d.getPage().getLayersCount();B<M;B++){var L=d.getPage().getLayer(B);O(L,r)}r.appendTo(k);p()},O=function(r,B){var M=$("<div>");M.attr("name",r.getId());u.layoutCtrlWithLRTB(M,0,0,null,0,0,null);t.makeDrawable(M[0]);for(var L=0,na=r.getPathsCount();L<na;L++){var Ka=r.getPath(L);ha(Ka,M);n(Ka,M)}M.appendTo(B)},C=function(r){return k.children("[name='"+r.getId()+"']")},ha=function(r,B){for(var M=0,L=r.getPointsCount();M<L;M++){var na=r.getPoint(M);J(na,B)}},y=function(r,B){for(var M=0,L=r.getPointsCount();M<
L;M++){var na=r.getPoint(M);ja(na,B).remove()}},J=function(r,B){var M=$("<div>");M.attr("name",r.getUiTag());M.addClass("point");M.css("background-color",q.getPointColor());M.css("box-sizing","border-box");M.css("border","1px solid #fff");oa(M,r);M.appendTo(B);return M},ja=function(r,B,M){if(r)return B?B.children("[name='"+r.getUiTag()+"']"):k.find("[name='"+r.getUiTag()+"']");r=B?B.children(".point"):k.find(".point");if(M){M={};for(B=0;B<r.length;B++){var L=r.eq(B);M[L.attr("name")]=L}return M}return r},
oa=function(r,B){var M=z(B.getX());B=z(B.getY());var L=q.getPointWide()+2,na=L>>1;u.layoutCtrl(r,M-na,B-na,L,L)},ta=function(r,B,M){r.css({"background-color":B?B:q.getPointColor(),"z-index":M?1:""})},xa=function(r,B){var M="0 0 4px 1px "+r.eq(0).css("background-color"),L=function(na){0<na?(na--,r.css("box-shadow",0==na%2?"":M),setTimeout(function(){L(na)},225)):B()};L(6)},n=function(r,B){t.clearPath(r,B);t.drawPath(r,B)},v=function(r){if(r.isContainOneOfKeys([ab.FORWARD,ab.BACKWARD])){var B=r.getActionTarget(),
M=B.getMe(),L=B.getAncestor(0);L=C(L);n(M,L)}else r.isContainOneOfKeys([ia.FORWARD,ia.BACKWARD])&&(B=r.getActionTarget(),L=B.getMe(),B=B.getAdditional()[0],M=B[0],B=B[1],L=C(L),r.isContainKey(ia.FORWARD)?(n(M,L),B&&y(B,L)):!B&&n(M,L));W(r);qa(r)},W=function(r){r.isContainKey(ra.P_PAGE_SIZE)&&ma();r.isContainKey(ra.P_PAGE_BACKIMAGE)&&pa();r.isContainKey(ra.P_LAYER_VISIBLE)&&p();if(r.isContainKey(ra.P_POINT_POSITION)){var B=null;S(r.getTargets(ra.P_POINT_POSITION),function(M){return[M.getAncestor(1),
M.getAncestor(0),M.getMe()]},function(M,L){!B&&(B=ja(null,L,!0));L=B[M.getUiTag()];oa(L,M)})}},qa=function(r){if(r.isContainKey(ra.S_ADD_LAYER)){var B=$(document.createDocumentFragment());Ia(r.getTargets(ra.S_ADD_LAYER),function(L){O(L,B)});B.appendTo(k);p()}r.isContainKey(ra.S_REMOVE_LAYER)&&Ia(r.getTargets(ra.S_REMOVE_LAYER),function(L){C(L).remove()});r.isContainKey(ra.S_REMOVE_POINT)&&S(r.getTargets(ra.S_REMOVE_POINT),function(L){return[L.getAncestor(0),L.getMe(),L.getSubStructure()]},function(L,
na){ja(L,na).remove()});if(r.isContainKey(ra.S_ADD_PATH)){B=$(document.createDocumentFragment());var M;w(r.getTargets(ra.S_ADD_PATH),function(L,na){M=na;ha(L,B);n(L,M)});B.appendTo(M)}r.isContainKey(ra.S_REMOVE_PATH)&&w(r.getTargets(ra.S_REMOVE_PATH),function(L,na){y(L,na);t.clearPath(L,na)});r.isContainKey(ra.S_ADD_POINT)&&S(r.getTargets(ra.S_ADD_POINT),function(L){return[L.getAncestor(0),L.getMe(),L.getSubStructure()]},function(L,na){J(L,na)})},Ia=function(r,B){for(var M=0;M<r.length;M++){var L=
r[M].getSubStructure();B(L)}},w=function(r,B){for(var M=0;M<r.length;M++){var L=r[M],na=L.getSubStructure();L=L.getMe();L=C(L);B(na,L)}},S=function(r,B,M){for(var L={},na=[],Ka=0;Ka<r.length;Ka++){var La=B(r[Ka]),Da=La[0],Ya=La[1],Pa=La[2];La=L[Da.getId()];La||(La=C(Da),L[Da.getId()]=La);M(Pa,La);Da=!1;for(Pa=0;Pa<na.length;Pa++)if(Ya==na[Pa][0]){Da=!0;break}Da||na.push([Ya,La])}for(Ka=0;Ka<na.length;Ka++)Ya=na[Ka][0],La=na[Ka][1],n(Ya,La)},ka=function(r){return f.getLayersSelectionModel().isCurrentConfirmed()||
f.getOperatingStates().getCurrent().isEnabledAlways()?(A.bindMouseEvent(r),!0):!1},Aa=function(r){ka(r)?x().pressDown(A):b.getStatusBar().showOperatingTips(m.get("tipsCurrentLayerNeeded","\u8bf7\u5148\u9009\u62e9\u4e00\u4e2a\u533a\u57df\u56fe\u5c42\uff0c\u4f5c\u4e3a\u5f53\u524d\u5de5\u4f5c\u56fe\u5c42\u3002"))},Na=function(r){ka(r)&&x().pressUp(A)},cb=function(r){ka(r)&&x().moving(A)},ob=function(r){ka(r)&&x().moveOut(A)}}function Ra(){var b,f,d,h=0,k=!1;this.setDependence=function(G,da){b=G;f=da};
this.setWorkingLayerConfirmed=function(G){G!=k&&(k=G,F())};this.getJqUi=function(){d||(d=$("<div>"),d.addClass("map-opstatearea"),t());return d};this.relayout=function(){var G=d.innerWidth();if(G!=h){h=G;var da=10,ma=10;q(function(pa){var p=da+28;0<da&&p>h&&(da=10,p=da+28,ma+=36);u.layoutCtrl(pa,da,ma,28,28);da=p+8});return ma+28+10}return-1};this.getJqPathCreatorForWizard=function(){var G;q(function(da){da.data("myState")==za.CREATING&&(G=da)});return G};var t=function(){f.getOperatingStates().addCurrentChangedListener(function(ma,
pa,p){H(p)});for(var G=f.getOperatingStates().getAll(),da=0;da<G.length;da++)A(G[da]);F();H(f.getOperatingStates().getCurrent())},q=function(G){for(var da=d.find(".map-opstate-button"),ma=0;ma<da.length;ma++)G(da.eq(ma))},A=function(G){var da=$("<div>");da.addClass("map-opstate-button");da.data("myState",G);da.appendTo(d);da.on("click",x);da.on("mouseenter",U);da.on("mouseleave",Y);var ma=$("<div>");ma.appendTo(da);R.background(ma,G.getIconName());u.layoutCtrlCenterAlign(ma,24);u.layoutCtrlMiddleAlign(ma,
24);ma=$("<div>");ma.text(G.getDisplayText());ma.addClass("map-opstate-buttontips-text");G=$("<div>");G.addClass("map-opstate-buttontips-arrow");u.layoutCtrl(G,-3,8,4,4);var pa=$("<div>");pa.append(ma);pa.append(G);pa.addClass("map-opstate-buttontips");pa.css({display:"inline-block",position:"relative",left:"120%","white-space":"nowrap"});pa.css("display","none");pa.appendTo(da)},H=function(G){q(function(da){da.data("myState")==G?da.addClass("map-opstate-button_selected"):da.removeClass("map-opstate-button_selected")})},
F=function(){q(function(G){k||G.data("myState").isEnabledAlways()?(G.addClass("map-opstate-button_enabled"),G.removeClass("map-opstate-button_disabled")):(G.removeClass("map-opstate-button_enabled"),G.addClass("map-opstate-button_disabled"))})},x=function(G){G=$(G.currentTarget).data("myState");G.isEnabledAlways()||k?(f.getOperatingStates().setCurrent(G),b.getStatusBar().showOperatingTips("")):b.getStatusBar().showOperatingTips(m.get("tipsCurrentLayerNeeded","\u8bf7\u5148\u9009\u62e9\u4e00\u4e2a\u533a\u57df\u56fe\u5c42\uff0c\u4f5c\u4e3a\u5f53\u524d\u5de5\u4f5c\u56fe\u5c42\u3002"))},
U=function(G){$(G.currentTarget).children().eq(1).css("display","inline-block")},Y=function(G){$(G.currentTarget).children().eq(1).css("display","none")}}function za(){var b=this,f,d=za.SELECTING,h=[];this.setMapModel=function(t){f&&f.removeModelChangedListener(k);f=t;f.addModelChangedListener(k)};this.getAll=function(){return[za.SELECTING,za.MOVING,za.CREATING,za.INSERTING,za.ERASING,za.CUTPATH,za.MOTION,za.ZOOMIN,za.ZOOMOUT]};this.getCurrent=function(){return d};this.setCurrent=function(t){if(t!=
d){var q=d;d=t;for(t=0;t<h.length;t++)(0,h[t])(b,q,d)}};this.addCurrentChangedListener=function(t){h.push(t)};this.getActor=function(t,q,A){A=A?A:d;var H=A.getActor();H||(H=A.createActor(),H.setDependence(t,q));return H};var k=function(t){d.getActor().respondToModelChanged(t);t.isContainKey(ab.FORWARD)?b.setCurrent(za.SELECTING):t.isContainKey(Z.FORWARD)&&t.getActionTarget().getAdditional()[1]&&b.setCurrent(za.MOVING)}}function Ga(b,f,d,h){var k;this.getIconName=function(){return b};this.getDisplayText=
function(){return m.get(f[0],f[1])};this.createActor=function(){return k=new d};this.getActor=function(){return k};this.isEnabledAlways=function(){return h}}function ua(){var b=this,f,d,h;this.setDependence=function(x,U){f=x;d=U};this.keep=function(){};this.restore=function(){};this.updateCursor=function(x,U){};this.hello=function(){};this.bye=function(){};this.respondToPointsSelected=function(x){};this.respondToModelChanged=function(x){if(x.isContainOneOfKeys([bb.FORWARD,bb.BACKWARD])){var U=x.getActionTarget();
U=U.getAdditional()[1];A(U)&&q(U)}else x.isContainOneOfKeys([N.FORWARD,N.BACKWARD])&&(U=x.getActionTarget(),U=U.getAdditional(),A(U));b.protectedRespondToModelChanged(x)};this.protectedRespondToModelChanged=function(x){};this.pressDown=function(x){};this.pressUp=function(x){};this.moving=function(x){};this.moveOut=function(x){F().showCoordinate("");b.protectedMoveOut(x)};this.protectedMoveOut=function(x){};var k=function(x,U){x&&x.css("box-shadow",U?"0 0 2px 1px "+U:"")},t=function(x,U){if(x&&U){var Y=
U[0];U=U[1];Y?wa.setCursor(x,Y,U):x.css("cursor",U)}},q=function(x,U){U=U?U:H();d.updatePointsFlashing(U,x)},A=function(x){return d.scrollToPointVisible(x)},H=function(){return d.getLayersSelectionModel().getCurrentLayer()},F=function(){return f.getStatusBar()};this.protectedMethod={showMousePosition:function(x,U){x=x?ub.formatPairs(x.getX(),x.getY()):"";F().showCoordinate(x,null,U)},hoverPoint:function(x,U,Y,G){x?(x=x.getTargetJqPoint(),h&&x[0]==h[0]||(t(h,U),k(h,null),h=x,t(h,Y),k(h,G))):(t(h,U),
k(h,null),h=null)},updatePointCursor:t,updatePointHover:k,updatePointMarkedness:function(x,U,Y){x&&d.updatePointMarkedness(x,U,Y)},updatePointsFlashing:q,getAssistiveStyle:function(){return d.getAssistiveStyle()},scrollToPointVisible:A,getCurrentLayer:H,getPointsSelectionModel:function(){return d.getPointsSelectionModel()},searchLayerUi:function(x){return d.searchLayerUi(x)},searchPointUi:function(x,U,Y){return d.searchPointUi(x,U,Y)},getNationwide:function(){return d},getStatusBar:F,getMapModel:function(){return f.getMapModel()},
performAction:function(x){f.getCommandManager().perform(x)}}}function Ta(){ua.call(this);var b=this.protectedMethod;this.hello=function(){f()};this.bye=function(){var d=b.getPointsSelectionModel().getTheLayer();d&&(d=b.searchLayerUi(d),d=b.searchPointUi(null,d),b.updatePointMarkedness(d,null))};this.respondToPointsSelected=function(d){f(d)};var f=function(d){var h=b.getPointsSelectionModel();if(d=d?d:h.getTheLayer()){var k=b.searchLayerUi(d),t=b.searchPointUi(null,k,!0);d.visitingPoints(function(q,
A){q=t[A.getUiTag()];var H=(A=h.isSelected(A))?b.getAssistiveStyle().getSelectedPointColor():null;b.updatePointMarkedness(q,H,A)})}}}function P(){ua.call(this);var b=this,f=this.protectedMethod,d,h,k;this.updateCursor=function(H,F){t(H,!1);f.updatePointCursor(F,[null,""])};this.hello=function(){d=f.searchLayerUi(f.getCurrentLayer())};this.bye=function(){d=null;A(null,null)};this.moving=function(H){var F=q(H)?!0:!1;t(H.getJqPage(),F);b.protectedMoving(H,F)};this.protectedMoving=function(H,F){};var t=
function(H,F){F?wa.setCursor(H,b.protectedGetActiveCursor(),"pointer"):wa.setCursor(H,"cur_select.png","default")};this.protectedGetActiveCursor=function(){throw Error("Override");};var q=function(H){if(!H.isAtAnyPoint()&&H.isInsidePage())for(var F=H.viewToModel(f.getAssistiveStyle().getPointWide()>>1),x=H.viewToModel(4),U=f.getCurrentLayer(),Y=U.getPathsCount()-1;0<=Y;Y--){var G=U.getPath(Y),da=G.getPointsCount();if(!(2>da))for(var ma=0;ma<da;ma++)if(0!=ma||G.isClosed()){var pa=G.getPoint(0==ma?
da-1:ma-1),p=G.getPoint(ma),z=H.getX(),V=H.getY();var O=z;var C=V,ha=pa,y=p,J=F,ja=x,oa=ha.getX();ha=ha.getY();var ta=y.getX();y=y.getY();var xa=Math.max(oa,ta)+J,n=Math.min(ha,y)-J,v=Math.max(ha,y)+J;Math.min(oa,ta)-J<=O&&O<=xa&&n<=C&&C<=v?(J=y-ha,xa=oa-ta,O=Math.abs(J*O+xa*C+(ta*ha-oa*y))/Math.sqrt(J*J+xa*xa)<ja):O=!1;if(O)return A(pa,p),[G,0==ma?da:ma,z,V]}}A(null,null);return null},A=function(H,F){if(h!=H){if(h){var x=f.searchPointUi(h,d),U=f.searchPointUi(k,d);f.updatePointHover(x,null);f.updatePointHover(U,
null)}h=H;k=F;h&&(x=f.searchPointUi(h,d),U=f.searchPointUi(k,d),f.updatePointHover(x,f.getAssistiveStyle().getSelectedPointColor()),f.updatePointHover(U,f.getAssistiveStyle().getSelectedPointColor()))}};this.protectedMethod.searchTarget=q}function Q(){var b,f;this.setAssistiveStyle=function(h){b=h};this.setCoordinateTransformer=function(h){f=h};this.makeDrawable=function(h){var k=Ha.createWithAttrs("svg",{width:"100%",height:"100%"});k.style.position="absolute";h.appendChild(k)};this.drawPath=function(h,
k){if(1<h.getPointsCount()){if(h.isClosed()){var t={};t.points=d(h);t.fill=b.getPathFillColor();t["stroke-width"]=b.getPathLineWidth();t.stroke=b.getPathLineColor();t=Ha.createWithAttrs("polygon",t)}else{t={};t.points=d(h);t.fill="transparent";t["stroke-width"]=b.getPathLineWidth();t.stroke=b.getPathLineColor();var q={};q.x1=f(h.getHeadPoint().getX());q.y1=f(h.getHeadPoint().getY());q.x2=f(h.getTailPoint().getX());q.y2=f(h.getTailPoint().getY());q["stroke-dasharray"]="4,4";q["stroke-width"]=b.getPathLineWidth();
q.stroke=b.getPathLineColor();var A=Ha.createNode("g");A.appendChild(Ha.createWithAttrs("polyline",t));A.appendChild(Ha.createWithAttrs("line",q));t=A}t.setAttribute("name",h.getUiTag());k.children("svg")[0].appendChild(t)}};this.clearPath=function(h,k){h.getUiTag()&&k.children("svg").children("[name='"+h.getUiTag()+"']").remove()};var d=function(h){for(var k="",t=0,q=h.getPointsCount();t<q;t++){var A=h.getPoint(t),H=f(A.getX());A=f(A.getY());k+=H+","+A+" "}return k}}"undefined"==typeof com&&(com=
{});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.map&&(com.kingdee.bos.qing.map={});"undefined"==typeof com.kingdee.bos.qing.map.ui&&(com.kingdee.bos.qing.map.ui={});var D=com.kingdee.bos.qing.map.ui;D.Designer=function(){var b,f,d=new ea,h=new T,k,t=new fb,q,A,H=!1,F,x,U=new function(){this.getMapModel=function(){b||(b=new ra);
return b};this.getCommandManager=function(){return t};this.createFacade=function(O,C,ha){return new Ba(q,O,C,ha)};this.getStatusBar=function(){return h};this.showStartingWizard=function(O,C,ha){V(O,C,ha)}};this.setRemoteImpl=function(O){q=O};this.getConductor=function(){if(!A){var O={};O.setDirty=z;O.isDirty=function(){return H};O.hookDirtyListener=function(C){F=C};A=new la(d,h,O)}return A};this.createJqUi=function(){f=$("<div onselectstart='return false'>");Y();f.append(d.getJqUi());f.append(h.getJqUi());
k=new fa;k.setGlobalDependence(U);f.append(k.getJqUi());t.addPerformedListener(p);return f};this.resize=function(){k.resize();d.refresh()};this.setJsonModel=function(O,C){var ha=new X;b=new ra;try{b.fromJsonObject(O,ha)}catch(y){ha.setError(!0),window.console&&console.error(y)}k&&k.updateMapModel();z(!1);ha.isTooModern()&&h.showShortPrompt(m.get("loadHighVersion","\u517c\u5bb9\u6027\u52a0\u8f7d\u9ad8\u7248\u672c\u6587\u6863"),!0,"#930");C&&C(ha)};this.getJsonModel=function(){return U.getMapModel().toJsonObject()};
var Y=function(){var O=d.addButton(ma,"btn_undo",m.get("undo","\u64a4\u6d88")),C=d.addButton(pa,"btn_redo",m.get("redo","\u53cd\u64a4\u6d88"));O.setEnabled(t.isCanUndo());C.setEnabled(t.isCanRedo());t.addPerformedListener(function(ha,y,J){O.setEnabled(t.isCanUndo());C.setEnabled(t.isCanRedo())});d.addSeperator();x=d.addButton(G,"btn_page",m.get("pageSetup","\u753b\u9762\u8bbe\u7f6e"));d.addButton(da,"btn_preview",m.get("preview","\u9884\u89c8"))},G=function(){var O=new Ja;O.setCommandManager(U.getCommandManager());
O.setModel(U.getMapModel().getPage());O.showDialog()},da=function(){var O=$(document.body),C=O.innerWidth()-200;O=O.innerHeight()-60;(new Ca).show(C,O,function(ha,y){var J=2,ja=function(){J--;0==J&&y()},oa=U.getMapModel(),ta=oa.getPage(),xa=ta.getOutputConfig(),n=ta.getBackImageId();xa.isBackImageOutputable()&&n?va.getImage(n,function(v){ha.getAttr().setBackImageUrl(v);ha.getAttr().setPageSize(ta.getWidth(),ta.getHeight());ja()}):ja();U.createFacade(function(v){ha.getAttr().setTemplateContent(v);
ja()}).preview(oa.toJsonObject())})},ma=function(){t.isCanUndo()&&t.undo()},pa=function(){t.isCanRedo()&&t.redo()},p=function(O,C,ha){z(!0);O&&(C=C?"":(ha?m.get("undo","\u64a4\u6d88"):m.get("redo","\u91cd\u505a"))+" ",C+=O.getCaption(),h.showShortPrompt(C))},z=function(O){H=O;h&&h.showDirtyState(H);F&&F(H)},V=function(O,C,ha){var y=function(oa,ta,xa){var n=new I;n.setText(ta);xa&&n.setSecondRelatedYGetter(function(v){return xa});return[n,oa]},J=function(oa){if(0!=oa.length){var ta=oa.shift(),xa=ta[0],
n=ta[1];n.css("box-shadow","0 0 10px 2px red inset");xa.setConfirmedListener(function(v){n.css("box-shadow","");J(oa)});xa.show(n,!0)}},ja=Math.min(U.getMapModel().getPage().getHeight(),200);O=[y(x.getJqUi(),m.get("wizardStep1","\u4ee5\u4e0b\u51714\u6b65\u3002\u7b2c1\u6b65\uff0c\u53ef\u4ee5\u5148\u5bfc\u5165\u4e00\u5f20\u56fe\u7247\u4f5c\u4e3a\u5e95\u56fe\u3002")),y(O,m.get("wizardStep2","\u7b2c2\u6b65\uff0c\u65b0\u5efa\u4e00\u4e2a\u8868\u793a\u533a\u57df\u7684\u56fe\u5c42\u3002")),y(C,m.get("wizardStep3",
"\u7b2c3\u6b65\uff0c\u7ed8\u56fe\u533a\u72b6\u6001\u5207\u6362\u5230\u201c\u7ed8\u5236\u8def\u5f84\u201d\u6a21\u5f0f\u3002")),y(ha,m.get("wizardStep4","\u7b2c4\u6b65\uff0c\u6cbf\u7740\u5e95\u56fe\u4e0a\u7684\u533a\u57df\u8fb9\u7f18\u70b9\u51fb\u9f20\u6807\uff0c\u7528\u951a\u70b9\u628a\u533a\u57df\u56f4\u8d77\u6765\u3002\u91cd\u590d\u7b2c2\u30013\u30014\u6b65\u3002"),ja)];J(O)}};var u,m,c,a,e,g,l,K,E,I,ca,ba,sa,va,Ba,R,wa,Ha,Ua,ra,Sa,jb,db,Va,fb,Wa,eb,Za,$a,gb,lb,mb,ab,hb,nb,bb,ib,Z,ia,N,Ca=D.PreviewDialog,
Ja=D.PageSettingDialog,Qa=D.LayerNamingDialog,kb=D.LayersOrdringDialog,sb=D.ScalingRatioDialog,tb=D.PointPositionDialog;(function(){var b=com.kingdee.bos.qing.common;u=b.DomUtil;b=com.kingdee.bos.qing.framework.common;m=b.MultilanguageManager.createPackageAccessor(D);b=com.kingdee.bos.qing.ui.component;c=b.Toolbar;a=b.Menu;e=b.MenuModel;g=b.MenuItemModel;l=b.SplitPane;K=b.List;E=b.WorkButton;I=b.SimpleConfirmer;ca=b.Label;ba=b.Tree;b=com.kingdee.bos.qing.common.ui;sa=b.CommonIconUtil;b=com.kingdee.bos.qing.map;
va=b.IntegrationRegister;Ba=b.Facade;R=b.Icons;wa=b.CursorHelper;Ha=b.Svg;Ua=b.AssistiveStyle;b=com.kingdee.bos.qing.map.model;ra=b.MapModel;Sa=b.Path;jb=b.Point;db=b.LayersSelectionModel;Va=b.PointsSelectionModel;b=com.kingdee.bos.qing.map.controller;fb=b.CommandManager;Wa=b.ActionChangeProperty;eb=b.ActionCreateLayer;Za=b.ActionCopyLayer;$a=b.ActionMergeLayers;gb=b.ActionDeleteLayers;lb=b.ActionEstablishPath;mb=b.ActionCreatingPath;ab=b.ActionClosePath;hb=b.ActionContinueToCreatePath;nb=b.ActionMergePath;
bb=b.ActionDeletePoints;ib=b.ActionErasePoint;Z=b.ActionInsertPoint;ia=b.ActionCutPath;N=b.ActionMovePoints})();za.SELECTING=new Ga("state_select",["operatingSelect","\u9009\u62e9\u951a\u70b9"],function(){Ta.call(this);var b=this.protectedMethod,f=this,d=!1,h=!1,k,t,q;this.updateCursor=function(Y,G){wa.setCursor(Y,"cur_select.png","default");wa.setCursor(G,"cur_select.png","default")};var A=this.bye;this.bye=function(){A();U(null);H()};this.pressDown=function(Y){if(h)f.pressUp(Y);else if(Y.isAtAnyPoint()){var G=
Y.searchTargetPoint();x(Y,[G])}else Y.isInsideView()&&(x(Y,[]),d=!0,h=!1,k=Y.getX(),t=Y.getY())};this.pressUp=function(Y){if(h){var G=Y.getX(),da=Y.getY();G=F(Math.min(k,G),Math.min(t,da),Math.max(k,G),Math.max(t,da));x(Y,G)}H()};this.moving=function(Y){if(d||h){if(!d||k!=Y.getX()||t!=Y.getY()){d=!1;h=!0;b.showMousePosition(Y.isInsideView()?Y:null,"cur_select.png");q||(q=$("<div>"),q.css("border","1px dashed #039"),q.appendTo(Y.getJqPage()));var G=Y.modelToView(Math.min(k,Y.getX())),da=Y.modelToView(Math.min(t,
Y.getY())),ma=Y.modelToView(Math.abs(k-Y.getX()));Y=Y.modelToView(Math.abs(t-Y.getY()));u.layoutCtrl(q,G,da,ma,Y)}}else b.showMousePosition(Y.isInsidePage()?Y:null,"cur_select.png"),Y.isAtAnyPoint()?U(Y,["cur_select.png","default"]):U(null)};var H=function(){h=d=!1;q&&q.remove();q=null},F=function(Y,G,da,ma){var pa=[];b.getCurrentLayer().visitingPoints(function(p,z){Y<=z.getX()&&z.getX()<=da&&G<=z.getY()&&z.getY()<=ma&&pa.push(z)});return pa},x=function(Y,G){Y.isCtrlPressed()?b.getPointsSelectionModel().inverseSelecteds(b.getCurrentLayer(),
G):Y.isShiftPressed()?b.getPointsSelectionModel().appendSelecteds(b.getCurrentLayer(),G):b.getPointsSelectionModel().setSelecteds(b.getCurrentLayer(),G)},U=function(Y,G,da){b.hoverPoint(Y,[null,"cur_select.png"],[G,da],b.getAssistiveStyle().getSelectedPointColor())}},!1);za.MOVING=new Ga("state_move",["operatingMove","\u79fb\u52a8\u951a\u70b9"],function(){Ta.call(this);var b=this.protectedMethod,f=this,d=!1,h=!1,k,t,q,A,H,F,x,U;this.updateCursor=function(p,z){wa.setCursor(p,"cur_move.png","move");
b.updatePointCursor(z,[null,""])};var Y=this.bye;this.bye=function(){Y();pa(null);ma()};this.pressDown=function(p){h?f.pressUp(p):p.isAtAnyPoint()?(d=!0,h=!1,k=p.getX(),t=p.getY(),A=p.searchTargetPoint(),q=null,b.getPointsSelectionModel().isSelectedCheckingUiTag(p.getTargetPointUiTag())||(q=A)):b.getStatusBar().showOperatingTips(m.get("tipsHowToMove","\u79fb\u5230\u76ee\u6807\u951a\u70b9\u4e0a\u5e76\u62d6\u62fd\u3002"))};this.pressUp=function(p){if(h){var z=G(p);p=z[0];z=z[1];b.getNationwide().redrawPathPeer(b.getCurrentLayer(),
x,F);var V=b.getPointsSelectionModel().searchSelectedsUiTagMap(),O=new N;O.setValue(b.getCurrentLayer(),V,p,z);O.setCaption(m.get("captionMovePoint","\u79fb\u52a8\u951a\u70b9"));b.performAction(O)}ma();b.getStatusBar().showCoordinate("")};this.moving=function(p){if(d||h){if(d){if(k==p.getX()&&t==p.getY())return;q&&(b.getPointsSelectionModel().setSelecteds(b.getCurrentLayer(),[q]),q=null);H=[];F=[];x=[];for(var z=b.getCurrentLayer(),V=0;V<z.getPathsCount();V++){for(var O=z.getPath(V),C=[],ha=0;ha<
O.getPointsCount();ha++){var y=O.getPoint(ha);if(b.getPointsSelectionModel().isSelected(y)){var J=y.cloneWithUiTag();C.push(J);F.push(J);H.push(y)}else C.push(y)}O=O.cloneWithUiTag();O.carryPointsInto(C);x.push(O)}U=b.getNationwide().createPathPeerInsteadPoints(b.getCurrentLayer(),F);z=b.searchPointUi(A,U);b.updatePointMarkedness(z,b.getAssistiveStyle().getKeyPointColor())}d=!1;h=!0;V=G(p);z=V[0];V=V[1];b.getNationwide().redrawPathPeer(b.getCurrentLayer(),x);U.css({left:p.modelToView(z),top:p.modelToView(V)});
p=ub.formatPairs(A.getX()+z,A.getY()+V);b.getStatusBar().showCoordinate(p,b.getAssistiveStyle().getKeyPointColor())}else p.isAtAnyPoint()?(wa.setCursor(p.getJqPage(),"cur_move.png","move"),pa(p)):(wa.setCursor(p.getJqPage(),"cur_select.png","default"),pa(null))};var G=function(p){var z=p.getX()-k,V=p.getY()-t;p=da(p,z,V);z=p[0];V=p[1];var O=b.getMapModel().getPage().getWidth();p=b.getMapModel().getPage().getHeight();for(var C=2147483647,ha=-1,y=2147483647,J=-1,ja=0;ja<H.length;ja++){var oa=H[ja],
ta=oa.getX()+z;oa=oa.getY()+V;C=Math.min(C,ta);ha=Math.max(ha,ta);y=Math.min(y,oa);J=Math.max(J,oa)}ha>=O&&(O=O-ha-.01,z+=O,C+=O);0>C&&(z+=0-C);J>=p&&(O=p-J-.01,V+=O,y+=O);0>y&&(V+=0-y);p=[z,V];z=p[0];V=p[1];for(C=0;C<F.length;C++)y=H[C],F[C].setPosition([y.getX()+z,y.getY()+V]);return p},da=function(p,z,V){p=p.viewToModel(b.getAssistiveStyle().getPointWide());var O=A.getX()+z,C=A.getY()+V,ha=O-p,y=O+p,J=C-p,ja=C+p,oa=32767,ta=[0,0];p=b.getCurrentLayer();for(var xa=b.getMapModel().getPage(),n=0,v=
xa.getLayersCount();n<v;n++){var W=xa.getLayer(n);W.isVisible()&&W!=p&&W.visitingPoints(function(qa,Ia){if(ha<Ia.getX()&&Ia.getX()<y&&J<Ia.getY()&&Ia.getY()<ja){qa=Ia.getX()-O;Ia=Ia.getY()-C;var w=Math.pow(qa,2)+Math.pow(Ia,2);w<oa&&(oa=w,ta=[qa,Ia]);if(0==oa)return!0}return!1})}return[z+ta[0],V+ta[1]]},ma=function(){h=d=!1;x=F=H=A=q=null;U&&U.remove();U=null},pa=function(p){b.hoverPoint(p,null,null,b.getAssistiveStyle().getSelectedPointColor())}},!1);za.CREATING=new Ga("state_create",["operatingCreate",
"\u7ed8\u5236\u8def\u5f84"],function(){ua.call(this);var b=this.protectedMethod,f,d,h,k=null;this.updateCursor=function(p,z){wa.setCursor(p,"cur_add_point.png","copy");b.updatePointCursor(z,[null,"default"])};this.keep=function(){return[h,f,d]};this.restore=function(p){x();h=p[0];f=p[1];d=p[2]};this.hello=function(){F()};this.bye=function(){U(null);Y(null);x();H(null)};this.protectedRespondToModelChanged=function(p){if(p.isContainKey(lb.FORWARD)){var z=p.getActionTarget();p=z.getMe();z=z.getAdditional();
x();H(z,p);F()}else p.isContainOneOfKeys([mb.FORWARD,mb.BACKWARD,nb.FORWARD,nb.BACKWARD,hb.FORWARD])?(z=p.getActionTarget(),p=z.getAncestor(0),z=z.getMe(),x(),H(z,p),F()):p.isContainOneOfKeys([lb.BACKWARD,hb.BACKWARD])?(x(),H(null),z=p.getActionTarget(),p=z.getAdditional(),b.scrollToPointVisible(p)&&b.updatePointsFlashing(p)):p.isContainKey(ab.BACKWARD)?F():p.isContainKey(ab.FORWARD)?(p=[f.getHeadPoint(),f.getTailPoint()],b.scrollToPointVisible(p)&&b.updatePointsFlashing(p)):p.isContainOneOfKeys([bb.FORWARD,
bb.BACKWARD])&&(x(),H(null))};this.moving=function(p){t(!1,p)};this.pressDown=function(p){t(!0,p)};var t=function(p,z){p=!p;if(z.isAtAnyPoint()){if(f)if(z.isAtThePoint(f.getHeadPoint())&&1<f.getPointsCount())p?U(z,"cur_close_path.png","pointer"):(z=new ab,z.setCaption(m.get("captionClosePath","\u95ed\u5408\u8def\u5f84")),z.setValue(f),b.performAction(z));else{var V=q(z);(V=V==f?null:V)?ma(p,z,V,!0):(V=A(z),(V=V==f?null:V)?ma(p,z,V,!1):p?b.updatePointCursor(z.getTargetJqPoint(),[null,"default"]):pa())}else(V=
A(z))?da(p,z,V,!0):(V=q(z))?da(p,z,V,!1):p?b.updatePointCursor(z.getTargetJqPoint(),[null,"default"]):pa();b.showMousePosition(null)}else if(z.isInsidePage()){U(null);V=z.getX();var O=z.getY(),C=G(z,V,O);C&&(V=C.getX(),O=C.getY());p?Y(C):(Y(null),f?(p=new mb,p.setValue(f,V,O)):(p=new lb,p.setValue(b.getCurrentLayer(),V,O)),p.setCaption(m.get("captionDrawPath","\u7ed8\u5236\u8def\u5f84")),b.performAction(p));b.showMousePosition(z,"cur_add_point.png")}else b.showMousePosition(null),!p&&pa()},q=function(p){for(var z=
b.getCurrentLayer(),V=0,O=z.getPathsCount();V<O;V++){var C=z.getPath(V);if(!C.isClosed()&&p.isAtThePoint(C.getHeadPoint()))return C}return null},A=function(p){for(var z=b.getCurrentLayer(),V=0,O=z.getPathsCount();V<O;V++){var C=z.getPath(V);if(!C.isClosed()&&p.isAtThePoint(C.getTailPoint()))return C}return null},H=function(p,z){d=(f=p&&0<p.getPointsCount()?p:null)?f.getTailPoint():null;h=f?z:null},F=function(){if(d){var p=b.searchLayerUi(h);p=b.searchPointUi(d,p);b.updatePointMarkedness(p,b.getAssistiveStyle().getKeyPointColor());
b.scrollToPointVisible([d])&&b.updatePointsFlashing([d],h);b.getPointsSelectionModel().setSelecteds(b.getCurrentLayer(),[d])}},x=function(){if(d){var p=b.searchLayerUi(h);p=b.searchPointUi(d,p);b.updatePointMarkedness(p,null);b.getPointsSelectionModel().clearSelecteds()}},U=function(p,z,V){b.hoverPoint(p,[null,"default"],[z,V],b.getAssistiveStyle().getKeyPointColor())},Y=function(p){var z=function(V,O){V&&V.css("box-shadow",O?"0 0 0 1px "+O:"")};p=p?b.searchPointUi(p):null;k&&p&&p[0]==k[0]||(z(k,
null),k=p,z(k,b.getAssistiveStyle().getPointColor()))},G=function(p,z,V){p=p.viewToModel(b.getAssistiveStyle().getPointWide()+2>>1);var O=z-p,C=z+p,ha=V-p,y=V+p,J=32767,ja=null;p=b.getCurrentLayer();for(var oa=b.getMapModel().getPage(),ta=0,xa=oa.getLayersCount();ta<xa;ta++){var n=oa.getLayer(ta);n.isVisible()&&n!=p&&n.visitingPoints(function(v,W){if(O<=W.getX()&&W.getX()<=C&&ha<=W.getY()&&W.getY()<=y){v=W.getX()-z;var qa=W.getY()-V;v=Math.pow(v,2)+Math.pow(qa,2);v<J&&(J=v,ja=W);if(0==J)return!0}return!1})}return ja},
da=function(p,z,V,O){p?U(z,null,"pointer"):(p=new hb,p.setCaption(m.get("captionContinueToDrawPath","\u7eed\u5efa\u8def\u5f84")),p.setValue(V,O),b.performAction(p))},ma=function(p,z,V,O){p?U(z,"cur_merge_path.png","pointer"):(p=new nb,p.setCaption(m.get("captionMergePath","\u62fc\u63a5\u8def\u5f84")),p.setValue(h,f,V,O),b.performAction(p))},pa=function(){b.getStatusBar().showOperatingTips(m.get("tipsHowToCreatePath","\u70b9\u51fb\u7a7a\u767d\u5904\uff0c\u6216\u70b9\u51fb\u672a\u95ed\u5408\u8def\u5f84\u7684\u7aef\u70b9\u3002"))}},
!1);za.INSERTING=new Ga("state_insert",["operatingInsert","\u63d2\u5165\u951a\u70b9"],function(){P.call(this);var b=this.protectedMethod;this.protectedRespondToModelChanged=function(f){f.isContainKey(Z.FORWARD)?(f=f.getActionTarget(),f=f.getAdditional()[0],b.scrollToPointVisible([f])&&b.updatePointsFlashing([f])):f.isContainKey(Z.BACKWARD)&&(f=f.getActionTarget(),f=f.getAdditional(),b.scrollToPointVisible(f)&&b.updatePointsFlashing(f))};this.protectedGetActiveCursor=function(){return"cur_add_point.png"};
this.protectedMoving=function(f,d){b.showMousePosition(d?f:null,"cur_add_point.png")};this.pressDown=function(f){var d=b.searchTarget(f);if(d){f=!f.isCtrlPressed();var h=d[0],k=d[1],t=d[2];d=d[3];var q=new Z;q.setCaption(m.get("captionInsertPoint","\u63d2\u5165\u951a\u70b9"));q.setValue(h,k,t,d,f);b.performAction(q)}else b.getStatusBar().showOperatingTips(m.get("tipsHowToInsertPoint","\u5728\u951a\u70b9\u8fde\u7ebf\u4e0a\u70b9\u51fb\uff0c\u63d2\u5165\u65b0\u7684\u951a\u70b9\u3002"))}},!1);za.ERASING=
new Ga("state_erase",["operatingErase","\u5254\u9664\u951a\u70b9"],function(){ua.call(this);var b=this.protectedMethod;this.updateCursor=function(d,h){wa.setCursor(d,"cur_select.png","default");b.updatePointCursor(h,["cur_remove_point.png","pointer"])};this.bye=function(){f(null)};this.protectedRespondToModelChanged=function(d){d.isContainKey(ib.FORWARD)?(d=d.getActionTarget(),d=d.getAdditional(),d=[d[1]],b.scrollToPointVisible(d)&&b.updatePointsFlashing(d)):d.isContainKey(ib.BACKWARD)&&(d=d.getActionTarget(),
d=d.getAdditional(),d=[d[1]],b.scrollToPointVisible(d)&&b.updatePointsFlashing(d))};this.moving=function(d){d.isAtAnyPoint()?f(d):f(null)};this.pressDown=function(d){if(d.isAtAnyPoint()){var h=b.getCurrentLayer();d=d.getTargetPointUiTag();var k=new ib;k.setCaption(m.get("captionErasePoint","\u5254\u9664\u951a\u70b9"));k.setValue(h,d);b.performAction(k)}else b.getStatusBar().showOperatingTips(m.get("tipsHowToErasePoint","\u70b9\u51fb\u951a\u70b9\u5c06\u5176\u5254\u9664\u3002"))};var f=function(d){b.hoverPoint(d,
null,["cur_remove_point.png","pointer"],b.getAssistiveStyle().getSelectedPointColor())}},!1);za.CUTPATH=new Ga("state_cut",["operatingCut","\u65ad\u5f00\u8def\u5f84"],function(){P.call(this);var b=this.protectedMethod;this.protectedRespondToModelChanged=function(f){f.isContainOneOfKeys([ia.FORWARD,ia.BACKWARD])&&(f=f.getActionTarget().getAdditional()[1],b.scrollToPointVisible(f)&&b.updatePointsFlashing(f))};this.protectedGetActiveCursor=function(){return"cur_cut_path.png"};this.pressDown=function(f){var d=
b.searchTarget(f);if(d){f=d[0];d=d[1];for(var h=b.getCurrentLayer(),k,t=0;t<h.getPathsCount();t++)if(h.getPath(t)==f){k=t;break}f=new ia;f.setCaption(m.get("captionCutPath","\u65ad\u5f00\u8def\u5f84"));f.setValue(h,k,d);b.performAction(f)}else b.getStatusBar().showOperatingTips(m.get("tipsHowToCutPath","\u5728\u951a\u70b9\u8fde\u7ebf\u4e0a\u70b9\u51fb\uff0c\u65ad\u5f00\u8def\u5f84\u3002"))}},!1);za.MOTION=new Ga("state_motion",["operatingMotion","\u79fb\u52a8\u753b\u9762"],function(){ua.call(this);
var b=this.protectedMethod,f=!1,d,h,k,t;this.updateCursor=function(q,A){wa.setCursor(q,"cur_motion.png","default");b.updatePointCursor(A,[null,""])};this.hello=function(){f=!1};this.protectedMoveOut=function(q){f=!1};this.pressUp=function(q){f=!1};this.pressDown=function(q){q.isInsidePage()&&(f=!0,d=q.getJqPage().parent(),h=q.getMouseXY(),k=d.prop("scrollLeft"),t=d.prop("scrollTop"))};this.moving=function(q){if(f){q=q.getMouseXY();var A=q[1]-h[1];d.prop("scrollLeft",k-(q[0]-h[0]));d.prop("scrollTop",
t-A)}}},!0);za.ZOOMIN=new Ga("state_zoom_in",["operatingZoomIn","\u653e\u5927\u753b\u9762"],function(){ua.call(this);var b=this.protectedMethod;this.updateCursor=function(f,d){wa.setCursor(f,"cur_zoom_in.png","default");b.updatePointCursor(d,[null,""])};this.pressDown=function(f){if(f.isInsidePage()){var d=b.getNationwide().getScalingRatio();pb.isZoomInEnabled(d)?(d=pb.zoomInToNextGrade(d),b.getNationwide().setScalingRatio(d),d=f.modelToView(f.getX()),f=f.modelToView(f.getY()),b.getNationwide().scrollToKeepViewInCenter(d,
f)):b.getStatusBar().showShortPrompt(m.get("tipsZoomMaxAlready","\u5df2\u653e\u5927\u5230\u6700\u5927\u6bd4\u4f8b\u3002"),!0)}}},!0);za.ZOOMOUT=new Ga("state_zoom_out",["operatingZoomOut","\u7f29\u5c0f\u753b\u9762"],function(){ua.call(this);var b=this.protectedMethod;this.updateCursor=function(f,d){wa.setCursor(f,"cur_zoom_out.png","default");b.updatePointCursor(d,[null,""])};this.pressDown=function(f){if(f.isInsidePage()){var d=b.getNationwide().getScalingRatio();pb.isZoomOutEnabled(d)?(d=pb.zoomOutToNextGrade(d),
b.getNationwide().setScalingRatio(d),d=f.modelToView(f.getX()),f=f.modelToView(f.getY()),b.getNationwide().scrollToKeepViewInCenter(d,f)):b.getStatusBar().showShortPrompt(m.get("tipsZoomMinAlready","\u5df2\u7f29\u5c0f\u5230\u6700\u5c0f\u6bd4\u4f8b\u3002"),!0)}}},!0);var pb=new function(){var b=[.1,.25,.5,.75,1,1.5,2,3,4,5,6,8,10];this.isZoomInEnabled=function(f){return f<b[b.length-1]};this.isZoomOutEnabled=function(f){return f>b[0]};this.zoomInToNextGrade=function(f){for(var d=0;d<b.length;d++)if(f<
b[d])return b[d];return f};this.zoomOutToNextGrade=function(f){for(var d=b.length-1;0<=d;d--)if(f>b[d])return b[d];return f};this.formatToDisplay=function(f){return parseInt(100*f)+"%"}},ub=new function(){this.formatPoint=function(f){return b(f.getEnlargedX())+", "+b(f.getEnlargedY())};this.formatPairs=function(f,d){return b(parseInt(100*f+.5))+", "+b(parseInt(100*d+.5))};var b=function(f){var d=parseInt(f/100);f-=100*d;return d+"."+(0==f?"00":10>f?"0"+f:f)}},Xa=new function(){this.draw=function(b,
f){b.isImageDesigntimeVisible()&&b.getBackImageId()?va.getImage(b.getBackImageId(),function(d){var h=new Image;h.onload=function(k){f.css("background-repeat","no-repeat");f.css("background-position","left top");f.css("background-size","100% 100%");f.css("background-image","url("+d+")")};h.src=d}):f.css("background-image","")}}})();(function(){function X(){com.kingdee.bos.qing.framework.common.AbstractRemoteCall.call(this);var T,fa;this.getRemoteUrl=function(aa){fa&&(aa.uniqueId=fa);return T};this.setRemoteUrl=function(aa){T=aa};this.setUniqueId=function(aa){fa=aa}}function la(){var T=this;this.getParamLanguage=function(){return T.getUrlParam("language")};this.getParamPathPrefix=function(){return T.getUrlParam("path")};this.getUrlParam=function(fa){return com.kingdee.bos.qing.common.Util.decodeParamFromUrl(window.location.search,
fa)}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});var ea=com.kingdee.bos.qing;ea.AbstractMapDesignerScene=function(){var T,fa,aa,ya;(function(){var ua=com.kingdee.bos.qing;T=ua.CodeLoader;ua=com.kingdee.bos.qing.framework.common;fa=ua.WebPageInitializer;aa=ua.WindowResizeObserver;ua=com.kingdee.bos.qing.map.ui;ya=ua.Designer})();var Fa=
this,Ea=new la,Ma,Oa;this.getRemoteImpl=function(){Ma||(Ma=new X,Ma.setRemoteUrl(Fa.protectedGetRemoteUrl()));return Ma};this.start=function(){T.setCallback(Ra);ea.CommonCodeImporter.importMapDesignerSkin(T);ea.CommonCodeImporter.importMapDesignerI18n(T);var ua=T.createSafety();Fa.protectedImportMoreCode(ua);ua.load()};var Ra=function(){za();Fa.protectedCustomInitEnv();Fa.protectedRegisterImplements(com.kingdee.bos.qing.map.IntegrationRegister);Oa=new ya;Oa.setRemoteImpl(Fa.getRemoteImpl());Fa.protectedInitDesigner(Oa);
Oa.createJqUi().appendTo($(document.body));Oa.resize();Fa.protectedLoading(Fa.getRemoteImpl(),Oa,function(ua){})},za=function(){fa.init();Ga();var ua=new aa;ua.setCallbackImmediately(function(){Ga()});ua.setDelay(250);ua.setCallback(function(){Oa.resize()});ua.observe()},Ga=function(){document.body.style.height=document.documentElement.clientHeight+"px"};this.protectedGetRemoteUrl=function(){throw Error("Override");};this.protectedImportMoreCode=function(ua){};this.protectedCustomInitEnv=function(){};
this.protectedRegisterImplements=function(ua){throw Error("Override");};this.protectedInitDesigner=function(ua){throw Error("Override");};this.protectedLoading=function(ua,Ta,P){throw Error("Override");};this.protectedMethod={getUrlParamUtil:function(){return Ea}}}})();
//qingVersionTag: 20250415